summaryrefslogtreecommitdiff
path: root/src/plugins/vcsbase/commonsettingspage.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-04-12 16:34:21 +0200
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2010-04-12 18:54:05 +0200
commitf9051e6f87012a95cfd0a58b84c1519028b8e795 (patch)
treeb78cc67de677884768c22325451a31d64bf9e1ca /src/plugins/vcsbase/commonsettingspage.h
parent9454fe56896c62769daec394ae60dea3c37a96ff (diff)
downloadqt-creator-f9051e6f87012a95cfd0a58b84c1519028b8e795.tar.gz
Renamed VCSBaseSettingsPage to CommonSettingsPage
To free up the name for an upcoming VCSBaseOptionsPage class that forms the base for all version control option pages. Reviewed-by: Friedemann Kleint
Diffstat (limited to 'src/plugins/vcsbase/commonsettingspage.h')
-rw-r--r--src/plugins/vcsbase/commonsettingspage.h98
1 files changed, 98 insertions, 0 deletions
diff --git a/src/plugins/vcsbase/commonsettingspage.h b/src/plugins/vcsbase/commonsettingspage.h
new file mode 100644
index 0000000000..ea47876029
--- /dev/null
+++ b/src/plugins/vcsbase/commonsettingspage.h
@@ -0,0 +1,98 @@
+/**************************************************************************
+**
+** This file is part of Qt Creator
+**
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+**
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** Commercial Usage
+**
+** Licensees holding valid Qt Commercial licenses may use this file in
+** accordance with the Qt Commercial License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Nokia.
+**
+** GNU Lesser General Public License Usage
+**
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
+**
+**************************************************************************/
+
+#ifndef COMMONOPTIONSPAGE_H
+#define COMMONOPTIONSPAGE_H
+
+#include "commonvcssettings.h"
+
+#include <coreplugin/dialogs/ioptionspage.h>
+#include <QtCore/QPointer>
+#include <QtGui/QWidget>
+
+QT_BEGIN_NAMESPACE
+namespace Ui {
+class CommonSettingsPage;
+}
+QT_END_NAMESPACE
+
+namespace VCSBase {
+namespace Internal {
+
+class CommonSettingsWidget : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit CommonSettingsWidget(QWidget *parent = 0);
+ virtual ~CommonSettingsWidget();
+
+ CommonVcsSettings settings() const;
+ void setSettings(const CommonVcsSettings &s);
+
+ QString searchKeyWordMatchString() const;
+
+private:
+ Ui::CommonSettingsPage *m_ui;
+};
+
+class CommonOptionsPage : public Core::IOptionsPage
+{
+ Q_OBJECT
+public:
+ explicit CommonOptionsPage(QObject *parent = 0);
+ virtual ~CommonOptionsPage();
+
+ virtual QString id() const;
+ virtual QString displayName() const;
+ virtual QString category() const;
+ virtual QString displayCategory() const;
+ virtual QIcon categoryIcon() const;
+
+ virtual QWidget *createPage(QWidget *parent);
+ virtual void apply();
+ virtual void finish() { }
+ virtual bool matches(const QString &key) const;
+
+ CommonVcsSettings settings() const { return m_settings; }
+
+signals:
+ void settingsChanged(const VCSBase::Internal::CommonVcsSettings &s);
+
+private:
+ void updateNickNames();
+
+ CommonSettingsWidget* m_widget;
+ CommonVcsSettings m_settings;
+ QString m_searchKeyWords;
+};
+
+} // namespace Internal
+} // namespace VCSBase
+
+#endif // COMMONOPTIONSPAGE_H