diff options
author | kh1 <qt-info@nokia.com> | 2010-03-16 15:48:09 +0100 |
---|---|---|
committer | kh1 <qt-info@nokia.com> | 2010-03-16 15:54:41 +0100 |
commit | 33574581017c0c310f4ad010a6e7adea825993b9 (patch) | |
tree | ea94d9466a3f17e1cc581ce6c50eac9c20a9cee4 /src/plugins/help/docsettingspage.h | |
parent | 37871bc43cd79db68a297add2d9b84aa1bce2552 (diff) | |
download | qt-creator-33574581017c0c310f4ad010a6e7adea825993b9.tar.gz |
Some more refactoring, reuse existing code.
Reuse the core help engine in the settings pages. Do not setup the gui
help engine at all since any getter will do so. Split update documentation
into smaller pieces for better performance.
Reviewed-by: ck
Diffstat (limited to 'src/plugins/help/docsettingspage.h')
-rw-r--r-- | src/plugins/help/docsettingspage.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/plugins/help/docsettingspage.h b/src/plugins/help/docsettingspage.h index 50b0aa5b57..c8ec79f9c7 100644 --- a/src/plugins/help/docsettingspage.h +++ b/src/plugins/help/docsettingspage.h @@ -31,22 +31,18 @@ #define DOCSETTINGSPAGE_H #include "ui_docsettingspage.h" - #include <coreplugin/dialogs/ioptionspage.h> -#include <QtGui/QWidget> - -QT_FORWARD_DECLARE_CLASS(QHelpEngine) - namespace Help { namespace Internal { class DocSettingsPage : public Core::IOptionsPage { Q_OBJECT + typedef QHash<QString, QString> FilesToNameSpaceHash; public: - DocSettingsPage(QHelpEngine *helpEngine); + DocSettingsPage(); QString id() const; QString displayName() const; @@ -55,14 +51,15 @@ public: QWidget *createPage(QWidget *parent); void apply(); - void finish() { } + void finish() {} virtual bool matches(const QString &s) const; - bool applyChanges(); + QStringList docsToRegister() const; + QStringList docsToUnregister() const; signals: - void documentationAdded(); void dialogAccepted(); + void documentationChanged(); private slots: void addDocumentation(); @@ -71,13 +68,16 @@ private slots: private: bool eventFilter(QObject *object, QEvent *event); void removeDocumentation(const QList<QListWidgetItem*> items); + void addItem(const QString &nameSpace, const QString &fileName); private: - QHelpEngine *m_helpEngine; - bool m_registeredDocs; - QStringList m_removeDocs; Ui::DocSettingsPage m_ui; + QString m_searchKeywords; + QString m_recentDialogPath; + + FilesToNameSpaceHash m_filesToRegister; + FilesToNameSpaceHash m_filesToUnregister; }; } // namespace Help |