OSDN Git Service

Merge branch 'master' of scm.dev.nokia.troll.no:creator/mainline
[qt-creator-jp/qt-creator-jp.git] / src / plugins / coreplugin / generalsettings.h
index f31edf2..89ea180 100644 (file)
@@ -1,49 +1,49 @@
-/***************************************************************************
+/**************************************************************************
 **
 ** This file is part of Qt Creator
 **
-** Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
 **
-** Contact:  Qt Software Information (qt-info@nokia.com)
+** Contact: Nokia Corporation (qt-info@nokia.com)
 **
+** Commercial Usage
 **
-** Non-Open Source 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.
 **
-** 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 Lesser General Public License Usage
 **
-** GNU 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.
 **
-** 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:
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at http://qt.nokia.com/contact.
 **
-** 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 GENERALSETTINGS_H
 #define GENERALSETTINGS_H
 
 #include <coreplugin/dialogs/ioptionspage.h>
-#include <QtGui/QWidget>
+#include <QtCore/QPointer>
 
 QT_BEGIN_NAMESPACE
-class Ui_GeneralSettings;
+class QMessageBox;
 QT_END_NAMESPACE
 
 namespace Core {
 namespace Internal {
 
+namespace Ui {
+    class GeneralSettings;
+}
+
 class GeneralSettings : public IOptionsPage
 {
     Q_OBJECT
@@ -51,21 +51,38 @@ class GeneralSettings : public IOptionsPage
 public:
     GeneralSettings();
 
-    QString name() const;
+    QString id() const;
+    QString displayName() const;
     QString category() const;
-    QString trCategory() const;
+    QString displayCategory() const;
+    QIcon categoryIcon() const;
     QWidget* createPage(QWidget *parent);
     void apply();
     void finish();
+    virtual bool matches(const QString &) const;
 
 private slots:
     void resetInterfaceColor();
     void resetExternalEditor();
+    void resetLanguage();
     void showHelpForExternalEditor();
+#ifdef Q_OS_UNIX
+#  ifndef Q_OS_MAC
+    void showHelpForFileBrowser();
+    void resetFileBrowser();
+#  endif
+    void resetTerminal();
+#endif
 
 private:
-    Ui_GeneralSettings *m_page;
-    QWidget *m_dialog;
+    void variableHelpDialogCreator(const QString &helpText);
+    void fillLanguageBox() const;
+    QString language() const;
+    void setLanguage(const QString&);
+    Ui::GeneralSettings *m_page;
+    QString m_searchKeywords;
+    QPointer<QMessageBox> m_dialog;
+    QList<QTextCodec *> m_codecs;
 };
 
 } // namespace Internal