public:
static MainWindow* instance();
MainWindow();
- ~MainWindow();
#ifdef APP_PHONON_SEEK
Phonon::SeekSlider* getSeekSlider() { return seekSlider; }
#else
#endif
#ifdef APP_PHONON
Phonon::AudioOutput* getAudioOutput() { return audioOutput; }
+ Phonon::VolumeSlider *getVolumeSlider() { return volumeSlider; }
#endif
+ QLabel *getCurrentTimeLabel() { return currentTime; }
void readSettings();
void writeSettings();
static void printHelp();
MediaView* getMediaView() { return mediaView; }
QToolButton* getRegionButton() { return regionButton; }
QAction* getRegionAction() { return regionAction; }
+ SearchLineEdit *getToolbarSearch() { return toolbarSearch; }
+
void showActionInStatusBar(QAction*, bool show);
+ void setStatusBarVisibility(bool show);
+ void adjustStatusBarVisibility();
public slots:
void showHome(bool transition = true);
void suggestionAccepted(Suggestion *suggestion);
void search(const QString &query);
void goBack();
- void showMessage(QString message);
+ void showMessage(const QString &message);
#ifdef APP_ACTIVATION
void showActivationView(bool transition = true);
void showActivationDialog();
bool isReallyFullScreen();
bool isCompact() { return m_compact; }
+signals:
+ void currentTimeChanged(const QString &s);
+
protected:
- void changeEvent(QEvent *);
- void closeEvent(QCloseEvent *);
- bool eventFilter(QObject *obj, QEvent *event);
- void dragEnterEvent(QDragEnterEvent *event);
- void dropEvent(QDropEvent *event);
- void resizeEvent(QResizeEvent *);
+ void changeEvent(QEvent *e);
+ void closeEvent(QCloseEvent *e);
+ void showEvent(QShowEvent *e);
+ bool eventFilter(QObject *obj, QEvent *e);
+ void dragEnterEvent(QDragEnterEvent *e);
+ void dropEvent(QDropEvent *e);
+ void resizeEvent(QResizeEvent *e);
+ void moveEvent(QMoveEvent *e);
private slots:
void lazyInit();
void checkForUpdate();
- void gotNewVersion(QString version);
+ void gotNewVersion(const QString &version);
void visitSite();
void donate();
void reportIssue();
void searchFocus();
void tick(qint64 time);
void totalTimeChanged(qint64 time);
- void setDefinitionMode(QString definitionName);
+ void setDefinitionMode(const QString &definitionName);
void toggleDefinitionMode();
void clearRecentKeywords();
void showFullscreenPlaylist(bool show);
void setManualPlay(bool enabled);
- void updateDownloadMessage(QString);
+ void updateDownloadMessage(const QString &);
void downloadsFinished();
void toggleDownloads(bool show);
- void floatOnTop(bool);
+ void floatOnTop(bool, bool showAction = true);
+ void adjustWindowSizeChanged(bool enabled);
+
void showStopAfterThisInStatusBar(bool show);
void hideMouse();
void createToolBars();
void createStatusBar();
void showWidget(QWidget*, bool transition = true);
- static QString formatTime(qint64 time);
+ static QString formatTime(qint64 duration);
bool confirmQuit();
- void simpleUpdateDialog(QString version);
+ void simpleUpdateDialog(const QString &version);
+ bool needStatusBar();
+ void adjustMessageLabelPosition();
UpdateChecker *updateChecker;
// view mechanism
QStackedWidget *views;
- QStack<QWidget*> *history;
+ QStack<QWidget*> history;
QList<QAction*> viewActions;
// view widgets
QLabel *currentTime;
// QLabel *totalTime;
- // fullscreen
- bool m_fullscreen;
+ bool fullscreenFlag;
bool m_maximized;
QTimer *mouseTimer;
bool m_compact;
+ bool initialized;
+
+ QLabel *messageLabel;
+ QTimer *messageTimer;
};