aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/texteditor/behaviorsettingspage.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2009-01-27 15:12:32 +0100
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2009-01-27 15:23:19 +0100
commit5dbcc615c210ad24a9abff4c7340ae64a65b75ec (patch)
tree8959257c912d418ed10cb79c4f38ae2574030746 /src/plugins/texteditor/behaviorsettingspage.h
parente33c21934a9a42fdd6938094cdeb8e9882e8847e (diff)
Split up general text editor settings
The page had grown too large so now the display settings have been split off onto their own page.
Diffstat (limited to 'src/plugins/texteditor/behaviorsettingspage.h')
-rw-r--r--src/plugins/texteditor/behaviorsettingspage.h93
1 files changed, 93 insertions, 0 deletions
diff --git a/src/plugins/texteditor/behaviorsettingspage.h b/src/plugins/texteditor/behaviorsettingspage.h
new file mode 100644
index 00000000000..68f7b408296
--- /dev/null
+++ b/src/plugins/texteditor/behaviorsettingspage.h
@@ -0,0 +1,93 @@
+/***************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+**
+** Non-Open Source Usage
+**
+** Licensees may use this file in accordance with the Qt Beta Version
+** License Agreement, Agreement version 2.2 provided with the Software or,
+** alternatively, in accordance with the terms contained in a written
+** agreement between you and Nokia.
+**
+** GNU General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License versions 2.0 or 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the packaging
+** of this file. Please review the following information to ensure GNU
+** General Public Licensing requirements will be met:
+**
+** http://www.fsf.org/licensing/licenses/info/GPLv2.html and
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt GPL Exception
+** version 1.3, included in the file GPL_EXCEPTION.txt in this package.
+**
+***************************************************************************/
+
+#ifndef BEHAVIORSETTINGSPAGE_H
+#define BEHAVIORSETTINGSPAGE_H
+
+#include "texteditor_global.h"
+
+#include <coreplugin/dialogs/ioptionspage.h>
+
+#include <QtCore/QObject>
+
+namespace TextEditor {
+
+struct TabSettings;
+struct StorageSettings;
+struct InteractionSettings;
+
+struct BehaviorSettingsPageParameters
+{
+ QString name;
+ QString category;
+ QString trCategory;
+ QString settingsPrefix;
+};
+
+class BehaviorSettingsPage : public Core::IOptionsPage
+{
+ Q_OBJECT
+
+public:
+ BehaviorSettingsPage(const BehaviorSettingsPageParameters &p, QObject *parent);
+ virtual ~BehaviorSettingsPage();
+
+ // IOptionsPage
+ QString name() const;
+ QString category() const;
+ QString trCategory() const;
+
+ QWidget *createPage(QWidget *parent);
+ void apply();
+ void finish() { }
+
+ TabSettings tabSettings() const;
+ StorageSettings storageSettings() const;
+ InteractionSettings interactionSettings() const;
+
+signals:
+ void tabSettingsChanged(const TextEditor::TabSettings &);
+ void storageSettingsChanged(const TextEditor::StorageSettings &);
+
+private:
+ void settingsFromUI(TabSettings &rc,
+ StorageSettings &storageSettings,
+ InteractionSettings &interactionSettings) const;
+ void settingsToUI();
+ struct BehaviorSettingsPagePrivate;
+ BehaviorSettingsPagePrivate *m_d;
+};
+
+} // namespace TextEditor
+
+#endif // BEHAVIORSETTINGSPAGE_H