OSDN Git Service

Header cleaning spree in Core/Debugger and Symbian/Maemo-code of Qt4.
[qt-creator-jp/qt-creator-jp.git] / src / plugins / coreplugin / generalsettings.h
1 /**************************************************************************
2 **
3 ** This file is part of Qt Creator
4 **
5 ** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
6 **
7 ** Contact: Nokia Corporation (qt-info@nokia.com)
8 **
9 ** Commercial Usage
10 **
11 ** Licensees holding valid Qt Commercial licenses may use this file in
12 ** accordance with the Qt Commercial License Agreement provided with the
13 ** Software or, alternatively, in accordance with the terms contained in
14 ** a written agreement between you and Nokia.
15 **
16 ** GNU Lesser General Public License Usage
17 **
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file.  Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** If you are unsure which license is appropriate for your use, please
26 ** contact the sales department at http://qt.nokia.com/contact.
27 **
28 **************************************************************************/
29
30 #ifndef GENERALSETTINGS_H
31 #define GENERALSETTINGS_H
32
33 #include <coreplugin/dialogs/ioptionspage.h>
34 #include <QtCore/QPointer>
35
36 QT_BEGIN_NAMESPACE
37 class QMessageBox;
38 QT_END_NAMESPACE
39
40 namespace Core {
41 namespace Internal {
42
43 namespace Ui {
44     class GeneralSettings;
45 }
46
47 class GeneralSettings : public IOptionsPage
48 {
49     Q_OBJECT
50
51 public:
52     GeneralSettings();
53
54     QString id() const;
55     QString displayName() const;
56     QString category() const;
57     QString displayCategory() const;
58     QWidget* createPage(QWidget *parent);
59     void apply();
60     void finish();
61     virtual bool matches(const QString &) const;
62
63 private slots:
64     void resetInterfaceColor();
65     void resetExternalEditor();
66     void resetLanguage();
67     void showHelpForExternalEditor();
68 #ifdef Q_OS_UNIX
69 #  ifndef Q_OS_MAC
70     void showHelpForFileBrowser();
71     void resetFileBrowser();
72 #  endif
73     void resetTerminal();
74 #endif
75
76 private:
77     void variableHelpDialogCreator(const QString &helpText);
78     void fillLanguageBox() const;
79     QString language() const;
80     void setLanguage(const QString&);
81     Ui::GeneralSettings *m_page;
82     QString m_searchKeywords;
83     QPointer<QMessageBox> m_dialog;
84 };
85
86 } // namespace Internal
87 } // namespace Core
88
89 #endif // GENERALSETTINGS_H