diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-05-05 18:56:41 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-05-05 18:56:41 (GMT) |
commit | 57c6b39a72e037fe50cda7005cea79d1c4dcd888 (patch) | |
tree | 1c594add8e5b8598322d2cd88a537e965738cac0 /tools/qml/loggerwidget.h | |
parent | 0a8379d9f01118d7ff0121e6ecbbc0307e1e7f63 (diff) | |
parent | d340dc6e4b3f1f4f8737d0d1d34e76ae68e007d6 (diff) | |
download | Qt-57c6b39a72e037fe50cda7005cea79d1c4dcd888.zip Qt-57c6b39a72e037fe50cda7005cea79d1c4dcd888.tar.gz Qt-57c6b39a72e037fe50cda7005cea79d1c4dcd888.tar.bz2 |
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'tools/qml/loggerwidget.h')
-rw-r--r-- | tools/qml/loggerwidget.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/tools/qml/loggerwidget.h b/tools/qml/loggerwidget.h index 5c4a701..b68ecc5 100644 --- a/tools/qml/loggerwidget.h +++ b/tools/qml/loggerwidget.h @@ -50,14 +50,44 @@ class LoggerWidget : public QPlainTextEdit { Q_OBJECT public: LoggerWidget(QWidget *parent=0); + + enum Visibility { ShowWarnings, HideWarnings, AutoShowWarnings }; + + Visibility defaultVisibility() const; + void setDefaultVisibility(Visibility visibility); + + QMenu *preferencesMenu(); + QAction *showAction(); + public slots: void append(const QString &msg); + +private slots: + void warningsPreferenceChanged(QAction *action); + void readSettings(); + void saveSettings(); + protected: + void showEvent(QShowEvent *event); void closeEvent(QCloseEvent *event); + +signals: + void opened(); + void closed(); + private: - bool m_keepClosed; + void setupPreferencesMenu(); + + QMenu *m_preferencesMenu; + QAction *m_showWidgetAction; + + enum ConfigOrigin { CommandLineOrigin, SettingsOrigin }; + ConfigOrigin m_visibilityOrigin; + Visibility m_visibility; }; +Q_DECLARE_METATYPE(LoggerWidget::Visibility); + QT_END_NAMESPACE #endif // LOGGERWIDGET_H |