summaryrefslogtreecommitdiffstats
path: root/tools/qml/loggerwidget.h
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-05-05 18:56:41 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-05-05 18:56:41 (GMT)
commit57c6b39a72e037fe50cda7005cea79d1c4dcd888 (patch)
tree1c594add8e5b8598322d2cd88a537e965738cac0 /tools/qml/loggerwidget.h
parent0a8379d9f01118d7ff0121e6ecbbc0307e1e7f63 (diff)
parentd340dc6e4b3f1f4f8737d0d1d34e76ae68e007d6 (diff)
downloadQt-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.h32
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