📄 qmcontrolbar.h
字号:
/* ;-*-c++-*- * * qmcontrolbar.h * * $Id: qmcontrolbar.h,v 1.25 2002/04/15 11:47:38 amos Exp $ * * Apollo sound player: http://www.apolloplayer.org * Copyright(C) 2000-2002 Apollo Team. See CREDITS file. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * The GNU General Public License is also available online at: * * http://www.gnu.org/copyleft/gpl.html */#ifndef QMCONTROLBAR_H_INCLUDED#define QMCONTROLBAR_H_INCLUDED#include <qtoolbar.h>#include <qlist.h>#include <qmap.h>class QFileDialog;class QPopupMenu;class QTimer;class QAction;class QToolButton;class QmCompactWindow;class QmFileDialog;class QmMainWindow;class QmMenuButton;/*! \file qmcontrolbar.h Declaration of QmControlBar class which contain most of the player controls.*/class QmControlBar : public QToolBar{ Q_OBJECTpublic: enum ActionItem { ActionAddSongs, ActionAddDir, ActionAddPlaylist, ActionMarkEdit, ActionSettings, ActionRespawn, ActionAbout }; QmControlBar(QmMainWindow *parent, const char *name = 0); virtual ~QmControlBar(); void updateWidgets(); void updateControls(); void updatePositionControls(); void setPauseEnabled(bool b); void setStopEnabled(bool b); void setPlayEnabled(bool b); void save(); void toggleCompactWindow(); QAction *systrayAction( ActionItem ) const;signals: void prev(); void next(); void play(); void stop(); void pause();public slots: void addFiles(); void openConfigDialog(); void showCompactWindow(); void about(); void toggleBrowser();private slots: void addDir(); void doAddFiles( QFileDialog *dlg, int val ); void doAddDir( QFileDialog *dlg, int val ); void addPlayList(); void savePlayList(); void doAddPlayList( QFileDialog *dlg, int val ); void doSavePlayList( QFileDialog *dlg, int val ); void loadPlayListTree(); void doLoadPLList( QFileDialog *dlg, int val ); void aboutQt(); void cleanup(); void togglePlayList();protected: void updatePositionControls(bool prev, bool next); private: void trash( QObject *obj ); QmFileDialog *makeDialog(); void destroyDialog(QFileDialog *dlg); void showDialog(QFileDialog *dlg); QmMainWindow *m_pMainWindow; QmCompactWindow *m_pCompactWindow; QPopupMenu *m_pFileMenu; QPopupMenu *m_pPlayListMenu; QPopupMenu *m_pOptionsMenu; QPopupMenu *m_pBrowserMenu; QmMenuButton *m_pAddFiles; QmMenuButton *m_pPlayListButton; QmMenuButton *m_pOptions; QToolButton *m_pPlay; QToolButton *m_pStop; QToolButton *m_pNext; QToolButton *m_pPrev; QToolButton *m_pPause; QToolButton *m_pRestart; QToolButton *m_pRandom; QToolButton *m_pLoop; QToolButton *m_pMinimize; QmFileDialog *m_pMainFileDialog; QMap<ActionItem, QAction *> m_pSystrayActionMap; bool m_MainFileDialogAvailable; bool m_StopClicked; QTimer *m_pTrashTimer; QList<QObject> m_Trash; int m_BrowserId; int m_BrowserLeftId; int m_BrowserRightId; int m_BrowserTopId; int m_BrowserBottomId; int m_BrowserFullId;};#endif // QMCONTROLBAR_H_INCLUDED
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -