OSDN Git Service

Merge branch '1.3'
[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) 2009 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 #include <QtGui/QWidget>
36
37 namespace Core {
38 namespace Internal {
39
40 namespace Ui {
41     class GeneralSettings;
42 }
43
44 class GeneralSettings : public IOptionsPage
45 {
46     Q_OBJECT
47
48 public:
49     GeneralSettings();
50
51     QString id() const;
52     QString displayName() const;
53     QString category() const;
54     QString displayCategory() const;
55     QWidget* createPage(QWidget *parent);
56     void apply();
57     void finish();
58     virtual bool matches(const QString &) const;
59
60 private slots:
61     void resetInterfaceColor();
62     void resetExternalEditor();
63     void resetLanguage();
64     void showHelpForExternalEditor();
65 #ifdef Q_OS_UNIX
66 #  ifndef Q_OS_MAC
67     void showHelpForFileBrowser();
68     void resetFileBrowser();
69 #  endif
70     void resetTerminal();
71 #endif
72
73 private:
74     void variableHelpDialogCreator(const QString& helpText);
75     void fillLanguageBox() const;
76     QString language() const;
77     void setLanguage(const QString&);
78     Ui::GeneralSettings *m_page;
79     QString m_searchKeywords;
80     QPointer<QWidget> m_dialog;
81 };
82
83 } // namespace Internal
84 } // namespace Core
85
86 #endif // GENERALSETTINGS_H