forked from qt-creator/qt-creator
IOptionsPage: replace virtual fuctions by data members
Change-Id: I8297df85109b67b79f90c33263a5dc7b89efbb60 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
@@ -40,10 +40,7 @@
|
||||
#include <coreplugin/icore.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QLatin1String>
|
||||
#include <QDebug>
|
||||
|
||||
#include <QIcon>
|
||||
#include <QWidget>
|
||||
|
||||
using namespace Analyzer;
|
||||
@@ -53,31 +50,11 @@ AnalyzerOptionsPage::AnalyzerOptionsPage(AbstractAnalyzerSubConfig *config, QObj
|
||||
Core::IOptionsPage(parent),
|
||||
m_config(config)
|
||||
{
|
||||
}
|
||||
|
||||
QString AnalyzerOptionsPage::id() const
|
||||
{
|
||||
return m_config->id();
|
||||
}
|
||||
|
||||
QString AnalyzerOptionsPage::displayName() const
|
||||
{
|
||||
return m_config->displayName();
|
||||
}
|
||||
|
||||
QString AnalyzerOptionsPage::category() const
|
||||
{
|
||||
return QLatin1String("T.Analyzer");
|
||||
}
|
||||
|
||||
QString AnalyzerOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Analyzer", "Analyzer");
|
||||
}
|
||||
|
||||
QIcon AnalyzerOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(":/images/analyzer_category.png"));
|
||||
setId(m_config->id());
|
||||
setDisplayName(m_config->displayName());
|
||||
setCategory(QLatin1String("T.Analyzer"));
|
||||
setDisplayCategory(QCoreApplication::translate("Analyzer", "Analyzer"));
|
||||
setCategoryIcon(QLatin1String(":/images/analyzer_category.png"));
|
||||
}
|
||||
|
||||
QWidget *AnalyzerOptionsPage::createPage(QWidget *parent)
|
||||
|
@@ -50,13 +50,6 @@ class AnalyzerOptionsPage : public Core::IOptionsPage
|
||||
public:
|
||||
explicit AnalyzerOptionsPage(AbstractAnalyzerSubConfig *config, QObject *parent = 0);
|
||||
|
||||
// IOptionsPage implementation
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
@@ -33,11 +33,9 @@
|
||||
#include "androidsettingspage.h"
|
||||
|
||||
#include "androidsettingswidget.h"
|
||||
|
||||
#include "androidconstants.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QIcon>
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
@@ -45,35 +43,12 @@ namespace Internal {
|
||||
AndroidSettingsPage::AndroidSettingsPage(QObject *parent)
|
||||
: Core::IOptionsPage(parent)
|
||||
{
|
||||
}
|
||||
|
||||
AndroidSettingsPage::~AndroidSettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString AndroidSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String(Constants::ANDROID_SETTINGS_ID);
|
||||
}
|
||||
|
||||
QString AndroidSettingsPage::displayName() const
|
||||
{
|
||||
return tr("Android Configurations");
|
||||
}
|
||||
|
||||
QString AndroidSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::ANDROID_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString AndroidSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Android", Constants::ANDROID_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon AndroidSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::ANDROID_SETTINGS_CATEGORY_ICON));
|
||||
setId(QLatin1String(Constants::ANDROID_SETTINGS_ID));
|
||||
setDisplayName(tr("Android Configurations"));
|
||||
setCategory(QLatin1String(Constants::ANDROID_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Android",
|
||||
Constants::ANDROID_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Constants::ANDROID_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
bool AndroidSettingsPage::matches(const QString &searchKeyWord) const
|
||||
|
@@ -43,19 +43,14 @@ class AndroidSettingsWidget;
|
||||
class AndroidSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AndroidSettingsPage(QObject *parent = 0);
|
||||
~AndroidSettingsPage();
|
||||
|
||||
virtual QString id() const;
|
||||
virtual QString displayName() const;
|
||||
virtual QString category() const;
|
||||
virtual QString displayCategory() const;
|
||||
virtual QIcon categoryIcon() const;
|
||||
virtual bool matches(const QString &searchKeyWord) const;
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
bool matches(const QString &searchKeyWord) const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
||||
private:
|
||||
QString m_keywords;
|
||||
|
@@ -95,16 +95,8 @@ QString OptionsPageWidget::searchKeywords() const
|
||||
|
||||
OptionsPage::OptionsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString OptionsPage::id() const
|
||||
{
|
||||
return QLatin1String(VcsBase::Constants::VCS_ID_BAZAAR);
|
||||
}
|
||||
|
||||
QString OptionsPage::displayName() const
|
||||
{
|
||||
return tr("Bazaar");
|
||||
setId(QLatin1String(VcsBase::Constants::VCS_ID_BAZAAR));
|
||||
setDisplayName(tr("Bazaar"));
|
||||
}
|
||||
|
||||
QWidget *OptionsPage::createPage(QWidget *parent)
|
||||
|
@@ -67,8 +67,6 @@ class OptionsPage : public VcsBase::VcsBaseOptionsPage
|
||||
|
||||
public:
|
||||
OptionsPage();
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
|
@@ -246,6 +246,13 @@ QString CMakeManager::qtVersionForQMake(const QString &qmakePath)
|
||||
CMakeSettingsPage::CMakeSettingsPage()
|
||||
: m_pathchooser(0)
|
||||
{
|
||||
setId(QLatin1String("Z.CMake"));
|
||||
setDisplayName(tr("CMake"));
|
||||
setCategory(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
|
||||
m_userCmake.process = 0;
|
||||
m_pathCmake.process = 0;
|
||||
m_userCmake.hasCodeBlocksMsvcGenerator = false;
|
||||
@@ -347,32 +354,6 @@ QString CMakeSettingsPage::findCmakeExecutable() const
|
||||
return env.searchInPath(QLatin1String("cmake"));
|
||||
}
|
||||
|
||||
QString CMakeSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("Z.CMake");
|
||||
}
|
||||
|
||||
QString CMakeSettingsPage::displayName() const
|
||||
{
|
||||
return tr("CMake");
|
||||
}
|
||||
|
||||
QString CMakeSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString CMakeSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("ProjectExplorer",
|
||||
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon CMakeSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *CMakeSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
QWidget *outerWidget = new QWidget(parent);
|
||||
|
@@ -110,26 +110,24 @@ struct CMakeValidator
|
||||
class CMakeSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CMakeSettingsPage();
|
||||
virtual ~CMakeSettingsPage();
|
||||
virtual QString id() const;
|
||||
virtual QString displayName() const;
|
||||
virtual QString category() const;
|
||||
virtual QString displayCategory() const;
|
||||
virtual QIcon categoryIcon() const;
|
||||
~CMakeSettingsPage();
|
||||
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
||||
QString cmakeExecutable() const;
|
||||
void setCMakeExecutable(const QString &executable);
|
||||
bool isCMakeExecutableValid() const;
|
||||
bool hasCodeBlocksMsvcGenerator() const;
|
||||
|
||||
private slots:
|
||||
void userCmakeFinished();
|
||||
void pathCmakeFinished();
|
||||
|
||||
private:
|
||||
void cmakeFinished(CMakeValidator *cmakeValidator) const;
|
||||
void saveSettings() const;
|
||||
|
@@ -62,10 +62,6 @@ CommandMappings::CommandMappings(QObject *parent)
|
||||
{
|
||||
}
|
||||
|
||||
CommandMappings::~CommandMappings()
|
||||
{
|
||||
}
|
||||
|
||||
// IOptionsPage
|
||||
|
||||
QWidget *CommandMappings::createPage(QWidget *parent)
|
||||
|
@@ -45,16 +45,7 @@ QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
|
||||
class Command;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
namespace Ui { class CommandMappings; }
|
||||
|
||||
class ActionManagerPrivate;
|
||||
class MainWindow;
|
||||
|
||||
}
|
||||
namespace Internal { namespace Ui { class CommandMappings; } }
|
||||
|
||||
class CORE_EXPORT CommandMappings : public Core::IOptionsPage
|
||||
{
|
||||
@@ -62,7 +53,6 @@ class CORE_EXPORT CommandMappings : public Core::IOptionsPage
|
||||
|
||||
public:
|
||||
CommandMappings(QObject *parent = 0);
|
||||
~CommandMappings();
|
||||
|
||||
protected slots:
|
||||
void commandChanged(QTreeWidgetItem *current);
|
||||
|
@@ -35,13 +35,9 @@
|
||||
|
||||
#include <coreplugin/core_global.h>
|
||||
|
||||
#include <QIcon>
|
||||
#include <QObject>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QIcon;
|
||||
class QWidget;
|
||||
QT_END_NAMESPACE
|
||||
|
||||
namespace Core {
|
||||
|
||||
class CORE_EXPORT IOptionsPage : public QObject
|
||||
@@ -50,18 +46,30 @@ class CORE_EXPORT IOptionsPage : public QObject
|
||||
|
||||
public:
|
||||
IOptionsPage(QObject *parent = 0) : QObject(parent) {}
|
||||
virtual ~IOptionsPage() {}
|
||||
|
||||
virtual QString id() const = 0;
|
||||
virtual QString displayName() const = 0;
|
||||
virtual QString category() const = 0;
|
||||
virtual QString displayCategory() const = 0;
|
||||
virtual QIcon categoryIcon() const = 0;
|
||||
QString id() const { return m_id; }
|
||||
QString displayName() const { return m_displayName; }
|
||||
QString category() const { return m_category; }
|
||||
QString displayCategory() const { return m_displayCategory; }
|
||||
QIcon categoryIcon() const { return QIcon(m_categoryIcon); }
|
||||
|
||||
virtual bool matches(const QString & /* searchKeyWord*/) const { return false; }
|
||||
|
||||
virtual QWidget *createPage(QWidget *parent) = 0;
|
||||
virtual void apply() = 0;
|
||||
virtual void finish() = 0;
|
||||
|
||||
protected:
|
||||
void setId(const QString &id) { m_id = id; }
|
||||
void setDisplayName(const QString &displayName) { m_displayName = displayName; }
|
||||
void setCategory(const QString &category) { m_category = category; }
|
||||
void setDisplayCategory(const QString &displayCategory) { m_displayCategory = displayCategory; }
|
||||
void setCategoryIcon(const QString &categoryIcon) { m_categoryIcon = categoryIcon; }
|
||||
|
||||
QString m_id;
|
||||
QString m_displayName;
|
||||
QString m_category;
|
||||
QString m_displayCategory;
|
||||
QString m_categoryIcon;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -78,13 +86,21 @@ class CORE_EXPORT IOptionsPageProvider : public QObject
|
||||
|
||||
public:
|
||||
IOptionsPageProvider(QObject *parent = 0) : QObject(parent) {}
|
||||
virtual ~IOptionsPageProvider() {}
|
||||
|
||||
virtual QString category() const = 0;
|
||||
virtual QString displayCategory() const = 0;
|
||||
virtual QIcon categoryIcon() const = 0;
|
||||
QString category() const { return m_category; }
|
||||
QString displayCategory() const { return m_displayCategory; }
|
||||
QIcon categoryIcon() const { return QIcon(m_categoryIcon); }
|
||||
|
||||
virtual QList<IOptionsPage *> pages() const = 0;
|
||||
|
||||
protected:
|
||||
void setCategory(const QString &category) { m_category = category; }
|
||||
void setDisplayCategory(const QString &displayCategory) { m_displayCategory = displayCategory; }
|
||||
void setCategoryIcon(const QString &categoryIcon) { m_categoryIcon = categoryIcon; }
|
||||
|
||||
QString m_category;
|
||||
QString m_displayCategory;
|
||||
QString m_categoryIcon;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
@@ -63,38 +63,12 @@ ShortcutSettings::ShortcutSettings(QObject *parent)
|
||||
{
|
||||
Core::Internal::ActionManagerPrivate *am = ActionManagerPrivate::instance();
|
||||
connect(am, SIGNAL(commandListChanged()), this, SLOT(initialize()));
|
||||
}
|
||||
|
||||
ShortcutSettings::~ShortcutSettings()
|
||||
{
|
||||
}
|
||||
|
||||
// IOptionsPage
|
||||
|
||||
|
||||
QString ShortcutSettings::id() const
|
||||
{
|
||||
return QLatin1String(Core::Constants::SETTINGS_ID_SHORTCUTS);
|
||||
}
|
||||
|
||||
QString ShortcutSettings::displayName() const
|
||||
{
|
||||
return tr("Keyboard");
|
||||
}
|
||||
|
||||
QString ShortcutSettings::category() const
|
||||
{
|
||||
return QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE);
|
||||
}
|
||||
|
||||
QString ShortcutSettings::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE);
|
||||
}
|
||||
|
||||
QIcon ShortcutSettings::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
|
||||
setId(QLatin1String(Core::Constants::SETTINGS_ID_SHORTCUTS));
|
||||
setDisplayName(tr("Keyboard"));
|
||||
setCategory(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE));
|
||||
setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE));
|
||||
setCategoryIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
|
||||
}
|
||||
|
||||
QWidget *ShortcutSettings::createPage(QWidget *parent)
|
||||
|
@@ -64,14 +64,6 @@ class ShortcutSettings : public Core::CommandMappings
|
||||
|
||||
public:
|
||||
ShortcutSettings(QObject *parent = 0);
|
||||
~ShortcutSettings();
|
||||
|
||||
// IOptionsPage
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
|
@@ -58,31 +58,11 @@ using namespace Core::Internal;
|
||||
GeneralSettings::GeneralSettings():
|
||||
m_page(0), m_dialog(0)
|
||||
{
|
||||
}
|
||||
|
||||
QString GeneralSettings::id() const
|
||||
{
|
||||
return QLatin1String(Core::Constants::SETTINGS_ID_ENVIRONMENT);
|
||||
}
|
||||
|
||||
QString GeneralSettings::displayName() const
|
||||
{
|
||||
return tr("General");
|
||||
}
|
||||
|
||||
QString GeneralSettings::category() const
|
||||
{
|
||||
return QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE);
|
||||
}
|
||||
|
||||
QString GeneralSettings::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE);
|
||||
}
|
||||
|
||||
QIcon GeneralSettings::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
|
||||
setId(QLatin1String(Core::Constants::SETTINGS_ID_ENVIRONMENT));
|
||||
setDisplayName(tr("General"));
|
||||
setCategory(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE));
|
||||
setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE));
|
||||
setCategoryIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
|
||||
}
|
||||
|
||||
static bool hasQmFilesForLocale(const QString &locale, const QString &creatorTrPath)
|
||||
|
@@ -54,11 +54,6 @@ class GeneralSettings : public IOptionsPage
|
||||
public:
|
||||
GeneralSettings();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
QWidget* createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
@@ -43,14 +43,11 @@
|
||||
#include <extensionsystem/pluginmanager.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QLatin1String>
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
#include <QSet>
|
||||
#include <QScopedPointer>
|
||||
#include <QAbstractTableModel>
|
||||
#include <QHash>
|
||||
#include <QIcon>
|
||||
#include <QTableWidgetItem>
|
||||
#include <QMessageBox>
|
||||
#include <QtAlgorithms>
|
||||
@@ -548,38 +545,20 @@ void MimeTypeSettingsPrivate::resetMimeTypes()
|
||||
MimeTypeSettings::MimeTypeSettings(QObject *parent)
|
||||
: IOptionsPage(parent)
|
||||
, d(new MimeTypeSettingsPrivate)
|
||||
{}
|
||||
{
|
||||
setId(QLatin1String(Core::Constants::SETTINGS_ID_MIMETYPES));
|
||||
setDisplayName(tr("MIME Types"));
|
||||
setCategory(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE));
|
||||
setDisplayCategory(QCoreApplication::translate("Core",
|
||||
Core::Constants::SETTINGS_TR_CATEGORY_CORE));
|
||||
setCategoryIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
|
||||
}
|
||||
|
||||
MimeTypeSettings::~MimeTypeSettings()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
QString MimeTypeSettings::id() const
|
||||
{
|
||||
return QLatin1String(Core::Constants::SETTINGS_ID_MIMETYPES);
|
||||
}
|
||||
|
||||
QString MimeTypeSettings::displayName() const
|
||||
{
|
||||
return tr("MIME Types");
|
||||
}
|
||||
|
||||
QString MimeTypeSettings::category() const
|
||||
{
|
||||
return QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE);
|
||||
}
|
||||
|
||||
QString MimeTypeSettings::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE);
|
||||
}
|
||||
|
||||
QIcon MimeTypeSettings::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
|
||||
}
|
||||
|
||||
bool MimeTypeSettings::matches(const QString &s) const
|
||||
{
|
||||
return d->m_keywords.contains(s, Qt::CaseInsensitive);
|
||||
|
@@ -48,13 +48,7 @@ public:
|
||||
MimeTypeSettings(QObject *parent = 0);
|
||||
virtual ~MimeTypeSettings();
|
||||
|
||||
virtual QString id() const;
|
||||
virtual QString displayName() const;
|
||||
virtual QString category() const;
|
||||
virtual QString displayCategory() const;
|
||||
virtual QIcon categoryIcon() const;
|
||||
virtual bool matches(const QString &s) const;
|
||||
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
|
@@ -53,39 +53,11 @@ using namespace Core::Internal;
|
||||
ToolSettings::ToolSettings(QObject *parent) :
|
||||
IOptionsPage(parent)
|
||||
{
|
||||
}
|
||||
|
||||
ToolSettings::~ToolSettings()
|
||||
{
|
||||
}
|
||||
|
||||
QString ToolSettings::id() const
|
||||
{
|
||||
return QLatin1String(Core::Constants::SETTINGS_ID_TOOLS);
|
||||
}
|
||||
|
||||
|
||||
QString ToolSettings::displayName() const
|
||||
{
|
||||
return tr("External Tools");
|
||||
}
|
||||
|
||||
|
||||
QString ToolSettings::category() const
|
||||
{
|
||||
return QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE);
|
||||
}
|
||||
|
||||
|
||||
QString ToolSettings::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE);
|
||||
}
|
||||
|
||||
|
||||
QIcon ToolSettings::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
|
||||
setId(QLatin1String(Core::Constants::SETTINGS_ID_TOOLS));
|
||||
setDisplayName(tr("External Tools"));
|
||||
setCategory(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE));
|
||||
setDisplayCategory(QCoreApplication::translate("Core", Constants::SETTINGS_TR_CATEGORY_CORE));
|
||||
setCategoryIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
|
||||
}
|
||||
|
||||
|
||||
|
@@ -45,17 +45,11 @@ class ExternalToolConfig;
|
||||
class ToolSettings : public IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ToolSettings(QObject *parent = 0);
|
||||
~ToolSettings();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
bool matches(const QString & searchKeyWord) const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
@@ -54,6 +54,12 @@ namespace CodePaster {
|
||||
|
||||
CodePasterSettingsPage::CodePasterSettingsPage()
|
||||
{
|
||||
setId(QLatin1String("C.CodePaster"));
|
||||
setDisplayName(tr("CodePaster"));
|
||||
setCategory(QLatin1String(Constants::CPASTER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("CodePaster",
|
||||
Constants::CPASTER_SETTINGS_TR_CATEGORY));
|
||||
|
||||
m_settings = Core::ICore::settings();
|
||||
if (m_settings) {
|
||||
const QString keyRoot = QLatin1String(settingsGroupC) + QLatin1Char('/');
|
||||
@@ -61,31 +67,6 @@ CodePasterSettingsPage::CodePasterSettingsPage()
|
||||
}
|
||||
}
|
||||
|
||||
QString CodePasterSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("C.CodePaster");
|
||||
}
|
||||
|
||||
QString CodePasterSettingsPage::displayName() const
|
||||
{
|
||||
return tr("CodePaster");
|
||||
}
|
||||
|
||||
QString CodePasterSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::CPASTER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString CodePasterSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("CodePaster", Constants::CPASTER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon CodePasterSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon();
|
||||
}
|
||||
|
||||
QWidget *CodePasterSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
QWidget *outerWidget = new QWidget(parent);
|
||||
|
@@ -48,17 +48,12 @@ class CodePasterSettingsPage : public Core::IOptionsPage
|
||||
public:
|
||||
CodePasterSettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
|
||||
QString hostName() const;
|
||||
|
||||
public slots:
|
||||
void serverChanged(const QString &host);
|
||||
|
||||
|
@@ -101,31 +101,10 @@ FileShareProtocolSettingsPage::FileShareProtocolSettingsPage(const QSharedPointe
|
||||
QObject *parent) :
|
||||
Core::IOptionsPage(parent), m_settings(s), m_widget(0)
|
||||
{
|
||||
}
|
||||
|
||||
QString FileShareProtocolSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("X.FileSharePaster");
|
||||
}
|
||||
|
||||
QString FileShareProtocolSettingsPage::displayName() const
|
||||
{
|
||||
return tr("Fileshare");
|
||||
}
|
||||
|
||||
QString FileShareProtocolSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::CPASTER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString FileShareProtocolSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("CodePaster", Constants::CPASTER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon FileShareProtocolSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon();
|
||||
setId(QLatin1String("X.FileSharePaster"));
|
||||
setDisplayName(tr("Fileshare"));
|
||||
setCategory(QLatin1String(Constants::CPASTER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("CodePaster", Constants::CPASTER_SETTINGS_TR_CATEGORY));
|
||||
}
|
||||
|
||||
QWidget *FileShareProtocolSettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -72,19 +72,15 @@ public:
|
||||
private:
|
||||
Internal::Ui::FileShareProtocolSettingsWidget m_ui;
|
||||
};
|
||||
|
||||
class FileShareProtocolSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FileShareProtocolSettingsPage(const QSharedPointer<FileShareProtocolSettings> &s,
|
||||
QObject *parent = 0);
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
|
@@ -81,37 +81,18 @@ Settings SettingsWidget::settings()
|
||||
SettingsPage::SettingsPage(const QSharedPointer<Settings> &settings) :
|
||||
m_settings(settings), m_widget(0)
|
||||
{
|
||||
setId(QLatin1String("A.General"));
|
||||
setDisplayName(tr("General"));
|
||||
setCategory(QLatin1String(Constants::CPASTER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("CodePaster",
|
||||
Constants::CPASTER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_CPASTER_ICON));
|
||||
}
|
||||
|
||||
SettingsPage::~SettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString SettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("A.General");
|
||||
}
|
||||
|
||||
QString SettingsPage::displayName() const
|
||||
{
|
||||
return tr("General");
|
||||
}
|
||||
|
||||
QString SettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::CPASTER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString SettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("CodePaster", Constants::CPASTER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon SettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::SETTINGS_CATEGORY_CPASTER_ICON));
|
||||
}
|
||||
|
||||
QWidget *SettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
m_widget = new SettingsWidget(m_protocols, parent);
|
||||
|
@@ -67,18 +67,12 @@ class SettingsPage : public Core::IOptionsPage
|
||||
|
||||
public:
|
||||
explicit SettingsPage(const QSharedPointer<Settings> &settings);
|
||||
virtual ~SettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
~SettingsPage();
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
virtual bool matches(const QString &) const;
|
||||
bool matches(const QString &) const;
|
||||
|
||||
void addProtocol(const QString& name);
|
||||
|
||||
|
@@ -51,6 +51,9 @@ CompletionSettingsPage::CompletionSettingsPage(QObject *parent)
|
||||
{
|
||||
if (QSettings *s = Core::ICore::settings())
|
||||
m_commentsSettings.fromSettings(QLatin1String(CPPTOOLS_SETTINGSGROUP), s);
|
||||
|
||||
setId(QLatin1String("P.Completion"));
|
||||
setDisplayName(tr("Completion"));
|
||||
}
|
||||
|
||||
CompletionSettingsPage::~CompletionSettingsPage()
|
||||
@@ -58,16 +61,6 @@ CompletionSettingsPage::~CompletionSettingsPage()
|
||||
delete m_page;
|
||||
}
|
||||
|
||||
QString CompletionSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("P.Completion");
|
||||
}
|
||||
|
||||
QString CompletionSettingsPage::displayName() const
|
||||
{
|
||||
return tr("Completion");
|
||||
}
|
||||
|
||||
QWidget *CompletionSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
QWidget *w = new QWidget(parent);
|
||||
|
@@ -55,13 +55,10 @@ public:
|
||||
CompletionSettingsPage(QObject *parent);
|
||||
~CompletionSettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
virtual bool matches(const QString &) const;
|
||||
bool matches(const QString &) const;
|
||||
|
||||
const CommentsSettings &commentsSettings() const;
|
||||
|
||||
|
@@ -479,40 +479,15 @@ void CppCodeStylePreferencesWidget::setVisualizeWhitespace(bool on)
|
||||
|
||||
// ------------------ CppCodeStyleSettingsPage
|
||||
|
||||
CppCodeStyleSettingsPage::CppCodeStyleSettingsPage(
|
||||
QWidget *parent) :
|
||||
CppCodeStyleSettingsPage::CppCodeStyleSettingsPage(QWidget *parent) :
|
||||
Core::IOptionsPage(parent),
|
||||
m_pageCppCodeStylePreferences(0)
|
||||
{
|
||||
}
|
||||
|
||||
CppCodeStyleSettingsPage::~CppCodeStyleSettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString CppCodeStyleSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String(Constants::CPP_CODE_STYLE_SETTINGS_ID);
|
||||
}
|
||||
|
||||
QString CppCodeStyleSettingsPage::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("CppTools", Constants::CPP_CODE_STYLE_SETTINGS_NAME);
|
||||
}
|
||||
|
||||
QString CppCodeStyleSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::CPP_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString CppCodeStyleSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("CppTools", Constants::CPP_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon CppCodeStyleSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::SETTINGS_CATEGORY_CPP_ICON));
|
||||
setId(QLatin1String(Constants::CPP_CODE_STYLE_SETTINGS_ID));
|
||||
setDisplayName(QCoreApplication::translate("CppTools", Constants::CPP_CODE_STYLE_SETTINGS_NAME));
|
||||
setCategory(QLatin1String(Constants::CPP_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("CppTools", Constants::CPP_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_CPP_ICON));
|
||||
}
|
||||
|
||||
QWidget *CppCodeStyleSettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -100,18 +100,11 @@ class CppCodeStyleSettingsPage : public Core::IOptionsPage
|
||||
|
||||
public:
|
||||
explicit CppCodeStyleSettingsPage(QWidget *parent = 0);
|
||||
~CppCodeStyleSettingsPage();
|
||||
|
||||
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 &) const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
QString m_searchKeywords;
|
||||
|
@@ -325,35 +325,11 @@ CppFileSettingsPage::CppFileSettingsPage(QSharedPointer<CppFileSettings> &settin
|
||||
Core::IOptionsPage(parent),
|
||||
m_settings(settings)
|
||||
{
|
||||
}
|
||||
|
||||
CppFileSettingsPage::~CppFileSettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString CppFileSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String(Constants::CPP_FILE_SETTINGS_ID);
|
||||
}
|
||||
|
||||
QString CppFileSettingsPage::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("CppTools", Constants::CPP_FILE_SETTINGS_NAME);
|
||||
}
|
||||
|
||||
QString CppFileSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::CPP_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString CppFileSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("CppTools", Constants::CPP_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon CppFileSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::SETTINGS_CATEGORY_CPP_ICON));
|
||||
setId(QLatin1String(Constants::CPP_FILE_SETTINGS_ID));
|
||||
setDisplayName(QCoreApplication::translate("CppTools", Constants::CPP_FILE_SETTINGS_NAME));
|
||||
setCategory(QLatin1String(Constants::CPP_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("CppTools", Constants::CPP_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_CPP_ICON));
|
||||
}
|
||||
|
||||
QWidget *CppFileSettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -98,18 +98,11 @@ class CppFileSettingsPage : public Core::IOptionsPage
|
||||
public:
|
||||
explicit CppFileSettingsPage(QSharedPointer<CppFileSettings> &settings,
|
||||
QObject *parent = 0);
|
||||
virtual ~CppFileSettingsPage();
|
||||
|
||||
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 &) const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
const QSharedPointer<CppFileSettings> m_settings;
|
||||
|
@@ -94,14 +94,10 @@ QString SettingsPageWidget::searchKeywords() const
|
||||
return rc;
|
||||
}
|
||||
|
||||
QString SettingsPage::id() const
|
||||
SettingsPage::SettingsPage()
|
||||
{
|
||||
return QLatin1String(VcsBase::Constants::VCS_ID_CVS);
|
||||
}
|
||||
|
||||
QString SettingsPage::displayName() const
|
||||
{
|
||||
return tr("CVS");
|
||||
setId(QLatin1String(VcsBase::Constants::VCS_ID_CVS));
|
||||
setDisplayName(tr("CVS"));
|
||||
}
|
||||
|
||||
QWidget *SettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -72,10 +72,7 @@ class SettingsPage : public VcsBase::VcsBaseOptionsPage
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SettingsPage() {}
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
SettingsPage();
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
|
@@ -230,6 +230,13 @@ CdbOptionsPage::CdbOptionsPage() :
|
||||
{
|
||||
CdbOptionsPage::m_instance = this;
|
||||
m_options->fromSettings(Core::ICore::settings());
|
||||
|
||||
setId(QLatin1String("F.Cda")); // before old CDB
|
||||
setDisplayName(tr("CDB"));
|
||||
setCategory(QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Debugger",
|
||||
Constants::DEBUGGER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
CdbOptionsPage::~CdbOptionsPage()
|
||||
@@ -237,31 +244,6 @@ CdbOptionsPage::~CdbOptionsPage()
|
||||
CdbOptionsPage::m_instance = 0;
|
||||
}
|
||||
|
||||
QString CdbOptionsPage::settingsId()
|
||||
{
|
||||
return QLatin1String("F.Cda"); // before old CDB
|
||||
}
|
||||
|
||||
QString CdbOptionsPage::displayName() const
|
||||
{
|
||||
return tr("CDB");
|
||||
}
|
||||
|
||||
QString CdbOptionsPage::category() const
|
||||
{
|
||||
return QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString CdbOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Debugger", Debugger::Constants::DEBUGGER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon CdbOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Debugger::Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *CdbOptionsPage::createPage(QWidget *parent)
|
||||
{
|
||||
m_widget = new CdbOptionsPageWidget(parent);
|
||||
|
@@ -102,18 +102,10 @@ public:
|
||||
static CdbOptionsPage *instance();
|
||||
|
||||
// IOptionsPage
|
||||
virtual QString id() const { return settingsId(); }
|
||||
virtual QString displayName() const;
|
||||
virtual QString category() const;
|
||||
virtual QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
virtual bool matches(const QString &) const;
|
||||
|
||||
static QString settingsId();
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
bool matches(const QString &) const;
|
||||
|
||||
QSharedPointer<CdbOptions> options() const { return m_options; }
|
||||
|
||||
|
@@ -152,36 +152,17 @@ void CommonOptionsPageWidget::setGlobalOptions(const GlobalDebuggerOptions &go)
|
||||
CommonOptionsPage::CommonOptionsPage(const QSharedPointer<GlobalDebuggerOptions> &go) :
|
||||
m_options(go)
|
||||
{
|
||||
setId(QLatin1String(DEBUGGER_COMMON_SETTINGS_ID));
|
||||
setDisplayName(QCoreApplication::translate("Debugger", "General"));
|
||||
setCategory(QLatin1String(DEBUGGER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Debugger", DEBUGGER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
CommonOptionsPage::~CommonOptionsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString CommonOptionsPage::id() const
|
||||
{
|
||||
return _(DEBUGGER_COMMON_SETTINGS_ID);
|
||||
}
|
||||
|
||||
QString CommonOptionsPage::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("Debugger", "General");
|
||||
}
|
||||
|
||||
QString CommonOptionsPage::category() const
|
||||
{
|
||||
return _(DEBUGGER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString CommonOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Debugger", DEBUGGER_SETTINGS_TR_CATEGORY);}
|
||||
|
||||
QIcon CommonOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
void CommonOptionsPage::apply()
|
||||
{
|
||||
QTC_ASSERT(!m_widget.isNull() && !m_group.isNull(), return);
|
||||
@@ -220,34 +201,18 @@ bool CommonOptionsPage::matches(const QString &s) const
|
||||
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// DebuggingHelperOptionPage
|
||||
// LocalsAndExpressionsOptionsPage
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
QString LocalsAndExpressionsOptionsPage::id() const
|
||||
{
|
||||
return _("Z.LocalsAndExpressions");
|
||||
}
|
||||
|
||||
QString LocalsAndExpressionsOptionsPage::displayName() const
|
||||
LocalsAndExpressionsOptionsPage::LocalsAndExpressionsOptionsPage()
|
||||
{
|
||||
setId(QLatin1String("Z.LocalsAndExpressions"));
|
||||
//: '&&' will appear as one (one is marking keyboard shortcut)
|
||||
return QCoreApplication::translate("Debugger", "Locals && Expressions");
|
||||
}
|
||||
|
||||
QString LocalsAndExpressionsOptionsPage::category() const
|
||||
{
|
||||
return _(DEBUGGER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString LocalsAndExpressionsOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Debugger", DEBUGGER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon LocalsAndExpressionsOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
|
||||
setDisplayName(QCoreApplication::translate("Debugger", "Locals && Expressions"));
|
||||
setCategory(QLatin1String(DEBUGGER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Debugger", DEBUGGER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
void LocalsAndExpressionsOptionsPage::apply()
|
||||
|
@@ -73,14 +73,9 @@ class CommonOptionsPage : public Core::IOptionsPage
|
||||
|
||||
public:
|
||||
explicit CommonOptionsPage(const QSharedPointer<GlobalDebuggerOptions> &go);
|
||||
virtual ~CommonOptionsPage();
|
||||
~CommonOptionsPage();
|
||||
|
||||
// IOptionsPage
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
@@ -103,15 +98,9 @@ private:
|
||||
class LocalsAndExpressionsOptionsPage : public Core::IOptionsPage
|
||||
{
|
||||
public:
|
||||
LocalsAndExpressionsOptionsPage() {}
|
||||
LocalsAndExpressionsOptionsPage();
|
||||
|
||||
// IOptionsPage
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
@@ -257,31 +257,12 @@ public:
|
||||
|
||||
GdbOptionsPage::GdbOptionsPage()
|
||||
: m_ui(0)
|
||||
{ }
|
||||
|
||||
QString GdbOptionsPage::settingsId()
|
||||
{
|
||||
return QLatin1String("M.Gdb");
|
||||
}
|
||||
|
||||
QString GdbOptionsPage::displayName() const
|
||||
{
|
||||
return tr("GDB");
|
||||
}
|
||||
|
||||
QString GdbOptionsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::DEBUGGER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString GdbOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Debugger", Constants::DEBUGGER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon GdbOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
|
||||
setId(QLatin1String("M.Gdb"));
|
||||
setDisplayName(tr("GDB"));
|
||||
setCategory(QLatin1String(Constants::DEBUGGER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Debugger", Constants::DEBUGGER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *GdbOptionsPage::createPage(QWidget *parent)
|
||||
|
@@ -36,8 +36,6 @@
|
||||
#include <coreplugin/dialogs/ioptionspage.h>
|
||||
#include <utils/savedaction.h>
|
||||
|
||||
namespace ProjectExplorer { class ToolChain; }
|
||||
|
||||
namespace Debugger {
|
||||
namespace Internal {
|
||||
|
||||
@@ -46,21 +44,14 @@ class GdbOptionsPageUi;
|
||||
class GdbOptionsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit GdbOptionsPage();
|
||||
GdbOptionsPage();
|
||||
|
||||
virtual QString id() const { return settingsId(); }
|
||||
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 &) const;
|
||||
|
||||
static QString settingsId();
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
GdbOptionsPageUi *m_ui;
|
||||
|
@@ -72,36 +72,12 @@ void LldbOptionsPageWidget::load()
|
||||
// ---------- LldbOptionsPage
|
||||
LldbOptionsPage::LldbOptionsPage()
|
||||
{
|
||||
// m_options->fromSettings(Core::ICore::settings());
|
||||
}
|
||||
|
||||
LldbOptionsPage::~LldbOptionsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString LldbOptionsPage::settingsId()
|
||||
{
|
||||
return QLatin1String("F.Lldb");
|
||||
}
|
||||
|
||||
QString LldbOptionsPage::displayName() const
|
||||
{
|
||||
return tr("LLDB");
|
||||
}
|
||||
|
||||
QString LldbOptionsPage::category() const
|
||||
{
|
||||
return QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString LldbOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Debugger", Debugger::Constants::DEBUGGER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon LldbOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Debugger::Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON));
|
||||
// m_options->fromSettings(Core::ICore::settings());
|
||||
setId(QLatin1String("F.Lldb"));
|
||||
setDisplayName(tr("LLDB"));
|
||||
setCategory(QLatin1String(Debugger::Constants::DEBUGGER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Debugger", Constants::DEBUGGER_SETTINGS_TR_CATEGORY);
|
||||
setCategoryIcon(QIcon(QLatin1String(Constants::DEBUGGER_COMMON_SETTINGS_CATEGORY_ICON)));
|
||||
}
|
||||
|
||||
QWidget *LldbOptionsPage::createPage(QWidget *parent)
|
||||
|
@@ -65,22 +65,13 @@ class LldbOptionsPage : public Core::IOptionsPage
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit LldbOptionsPage();
|
||||
virtual ~LldbOptionsPage();
|
||||
LldbOptionsPage();
|
||||
|
||||
// IOptionsPage
|
||||
virtual QString id() const { return settingsId(); }
|
||||
virtual QString displayName() const;
|
||||
virtual QString category() const;
|
||||
virtual QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
virtual bool matches(const QString &) const;
|
||||
|
||||
static QString settingsId();
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
QPointer<LldbOptionsPageWidget> m_widget;
|
||||
|
@@ -108,31 +108,11 @@ QString CppSettingsPageWidget::searchKeywords() const
|
||||
CppSettingsPage::CppSettingsPage(QObject *parent) : Core::IOptionsPage(parent)
|
||||
{
|
||||
m_parameters.fromSettings(Core::ICore::settings());
|
||||
}
|
||||
|
||||
QString CppSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String(Designer::Constants::SETTINGS_CPP_SETTINGS_ID);
|
||||
}
|
||||
|
||||
QString CppSettingsPage::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_CPP_SETTINGS_NAME);
|
||||
}
|
||||
|
||||
QString CppSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Designer::Constants::SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString CppSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon CppSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Designer::Constants::SETTINGS_CATEGORY_ICON));
|
||||
setId(QLatin1String(Designer::Constants::SETTINGS_CPP_SETTINGS_ID));
|
||||
setDisplayName(QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_CPP_SETTINGS_NAME));
|
||||
setCategory(QLatin1String(Designer::Constants::SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Designer::Constants::SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *CppSettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -66,16 +66,10 @@ class CppSettingsPage : public Core::IOptionsPage
|
||||
public:
|
||||
explicit CppSettingsPage(QObject *parent = 0);
|
||||
|
||||
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 &s) const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
bool matches(const QString &s) const;
|
||||
|
||||
private:
|
||||
QPointer<CppSettingsPageWidget> m_widget;
|
||||
|
@@ -49,35 +49,12 @@ using namespace Designer::Internal;
|
||||
SettingsPage::SettingsPage(QDesignerOptionsPageInterface *designerPage) :
|
||||
m_designerPage(designerPage), m_initialized(false)
|
||||
{
|
||||
}
|
||||
|
||||
SettingsPage::~SettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString SettingsPage::id() const
|
||||
{
|
||||
return m_designerPage->name();
|
||||
}
|
||||
|
||||
QString SettingsPage::displayName() const
|
||||
{
|
||||
return m_designerPage->name();
|
||||
}
|
||||
|
||||
QString SettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Designer::Constants::SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString SettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon SettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Designer::Constants::SETTINGS_CATEGORY_ICON));
|
||||
setId(m_designerPage->name());
|
||||
setDisplayName(m_designerPage->name());
|
||||
setCategory(QLatin1String(Designer::Constants::SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Designer",
|
||||
Designer::Constants::SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Designer::Constants::SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *SettingsPage::createPage(QWidget *parent)
|
||||
@@ -101,25 +78,10 @@ void SettingsPage::finish()
|
||||
SettingsPageProvider::SettingsPageProvider(QObject *parent)
|
||||
: IOptionsPageProvider(parent), m_initialized(false)
|
||||
{
|
||||
}
|
||||
|
||||
SettingsPageProvider::~SettingsPageProvider()
|
||||
{
|
||||
}
|
||||
|
||||
QString SettingsPageProvider::category() const
|
||||
{
|
||||
return QLatin1String(Designer::Constants::SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString SettingsPageProvider::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Designer", Designer::Constants::SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon SettingsPageProvider::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Designer::Constants::SETTINGS_CATEGORY_ICON));
|
||||
setCategory(QLatin1String(Designer::Constants::SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Designer",
|
||||
Designer::Constants::SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Designer::Constants::SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QList<Core::IOptionsPage *> SettingsPageProvider::pages() const
|
||||
|
@@ -50,17 +50,10 @@ class SettingsPage : public Core::IOptionsPage
|
||||
|
||||
public:
|
||||
explicit SettingsPage(QDesignerOptionsPageInterface *designerPage);
|
||||
virtual ~SettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
||||
private:
|
||||
QDesignerOptionsPageInterface *m_designerPage;
|
||||
@@ -73,11 +66,6 @@ class SettingsPageProvider : public Core::IOptionsPageProvider
|
||||
|
||||
public:
|
||||
SettingsPageProvider(QObject *parent = 0);
|
||||
~SettingsPageProvider();
|
||||
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QList<Core::IOptionsPage *> pages() const;
|
||||
|
||||
|
@@ -181,15 +181,14 @@ class FakeVimOptionPage : public Core::IOptionsPage
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FakeVimOptionPage() {}
|
||||
|
||||
// IOptionsPage
|
||||
QString id() const { return _(Constants::SETTINGS_ID); }
|
||||
QString displayName() const { return tr("General"); }
|
||||
QString category() const { return _(Constants::SETTINGS_CATEGORY); }
|
||||
QString displayCategory() const { return tr("FakeVim"); }
|
||||
QIcon categoryIcon() const
|
||||
{ return QIcon(_(Constants::SETTINGS_CATEGORY_FAKEVIM_ICON)); }
|
||||
FakeVimOptionPage()
|
||||
{
|
||||
setId(_(Constants::SETTINGS_ID));
|
||||
setDisplayName(tr("General"));
|
||||
setCategory(_(Constants::SETTINGS_CATEGORY));
|
||||
setDisplayCategory(tr("FakeVim"));
|
||||
setCategoryIcon(_(Constants::SETTINGS_CATEGORY_FAKEVIM_ICON));
|
||||
}
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply() { m_group.apply(ICore::settings()); }
|
||||
@@ -339,16 +338,15 @@ class FakeVimExCommandsPage : public Core::CommandMappings
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FakeVimExCommandsPage(FakeVimPluginPrivate *q) : m_q(q) {}
|
||||
~FakeVimExCommandsPage() {}
|
||||
|
||||
// IOptionsPage
|
||||
QString id() const { return _(Constants::SETTINGS_EX_CMDS_ID); }
|
||||
QString displayName() const { return tr("Ex Command Mapping"); }
|
||||
QString category() const { return _(Constants::SETTINGS_CATEGORY); }
|
||||
QString displayCategory() const { return tr("FakeVim"); }
|
||||
QIcon categoryIcon() const
|
||||
{ return QIcon(_(Constants::SETTINGS_CATEGORY_FAKEVIM_ICON)); }
|
||||
FakeVimExCommandsPage(FakeVimPluginPrivate *q)
|
||||
: m_q(q)
|
||||
{
|
||||
setId(_(Constants::SETTINGS_EX_CMDS_ID));
|
||||
setDisplayName(tr("Ex Command Mapping"));
|
||||
setCategory(_(Constants::SETTINGS_CATEGORY));
|
||||
setDisplayCategory(tr("FakeVim"));
|
||||
setCategoryIcon(_(Constants::SETTINGS_CATEGORY_FAKEVIM_ICON));
|
||||
}
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void initialize();
|
||||
@@ -565,16 +563,16 @@ class FakeVimUserCommandsPage : public Core::IOptionsPage
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
FakeVimUserCommandsPage(FakeVimPluginPrivate *q) : m_q(q) {}
|
||||
~FakeVimUserCommandsPage() {}
|
||||
FakeVimUserCommandsPage(FakeVimPluginPrivate *q)
|
||||
: m_q(q)
|
||||
{
|
||||
setId(_(Constants::SETTINGS_USER_CMDS_ID));
|
||||
setDisplayName(tr("User Command Mapping"));
|
||||
setCategory(_(Constants::SETTINGS_CATEGORY));
|
||||
setDisplayCategory(tr("FakeVim"));
|
||||
setCategoryIcon(_(Constants::SETTINGS_CATEGORY_FAKEVIM_ICON));
|
||||
}
|
||||
|
||||
// IOptionsPage
|
||||
QString id() const { return _(Constants::SETTINGS_USER_CMDS_ID); }
|
||||
QString displayName() const { return tr("User Command Mapping"); }
|
||||
QString category() const { return _(Constants::SETTINGS_CATEGORY); }
|
||||
QString displayCategory() const { return tr("FakeVim"); }
|
||||
QIcon categoryIcon() const
|
||||
{ return QIcon(_(Constants::SETTINGS_CATEGORY_FAKEVIM_ICON)); }
|
||||
void apply();
|
||||
void finish() {}
|
||||
|
||||
|
@@ -50,11 +50,13 @@ GerritOptionsPage::GerritOptionsPage(const QSharedPointer<GerritParameters> &p,
|
||||
: VcsBase::VcsBaseOptionsPage(parent)
|
||||
, m_parameters(p)
|
||||
{
|
||||
setId(optionsId());
|
||||
setDisplayName(tr("Gerrit"));
|
||||
}
|
||||
|
||||
QString GerritOptionsPage::displayName() const
|
||||
QString GerritOptionsPage::optionsId()
|
||||
{
|
||||
return tr("Gerrit");
|
||||
return QLatin1String("Gerrit");
|
||||
}
|
||||
|
||||
QWidget *GerritOptionsPage::createPage(QWidget *parent)
|
||||
|
@@ -73,20 +73,17 @@ private:
|
||||
class GerritOptionsPage : public VcsBase::VcsBaseOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GerritOptionsPage(const QSharedPointer<GerritParameters> &p,
|
||||
QObject *parent = 0);
|
||||
|
||||
static QString optionsId() { return QLatin1String("Gerrit"); }
|
||||
|
||||
QString id() const { return optionsId(); }
|
||||
QString displayName() const;
|
||||
static QString optionsId();
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
|
||||
virtual bool matches(const QString &) const;
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
const QSharedPointer<GerritParameters> &m_parameters;
|
||||
|
@@ -121,16 +121,8 @@ QString SettingsPageWidget::searchKeywords() const
|
||||
SettingsPage::SettingsPage() :
|
||||
m_widget(0)
|
||||
{
|
||||
}
|
||||
|
||||
QString SettingsPage::id() const
|
||||
{
|
||||
return QLatin1String(VcsBase::Constants::VCS_ID_GIT);
|
||||
}
|
||||
|
||||
QString SettingsPage::displayName() const
|
||||
{
|
||||
return tr("Git");
|
||||
setId(QLatin1String(VcsBase::Constants::VCS_ID_GIT));
|
||||
setDisplayName(tr("Git"));
|
||||
}
|
||||
|
||||
QWidget *SettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -76,7 +76,7 @@ public:
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
virtual bool matches(const QString &) const;
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
QString m_searchKeywords;
|
||||
|
@@ -45,31 +45,11 @@ using namespace Help::Internal;
|
||||
|
||||
DocSettingsPage::DocSettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString DocSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("B.Documentation");
|
||||
}
|
||||
|
||||
QString DocSettingsPage::displayName() const
|
||||
{
|
||||
return tr("Documentation");
|
||||
}
|
||||
|
||||
QString DocSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Help::Constants::HELP_CATEGORY);
|
||||
}
|
||||
|
||||
QString DocSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon DocSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Help::Constants::HELP_CATEGORY_ICON));
|
||||
setId(QLatin1String("B.Documentation"));
|
||||
setDisplayName(tr("Documentation"));
|
||||
setCategory(QLatin1String(Help::Constants::HELP_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Help::Constants::HELP_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *DocSettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -42,21 +42,14 @@ namespace Internal {
|
||||
class DocSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
typedef QHash<QString, QString> NameSpaceToPathHash;
|
||||
|
||||
public:
|
||||
DocSettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() {}
|
||||
virtual bool matches(const QString &s) const;
|
||||
bool matches(const QString &s) const;
|
||||
|
||||
private slots:
|
||||
void addDocumentation();
|
||||
@@ -73,6 +66,7 @@ private:
|
||||
QString m_searchKeywords;
|
||||
QString m_recentDialogPath;
|
||||
|
||||
typedef QHash<QString, QString> NameSpaceToPathHash;
|
||||
NameSpaceToPathHash m_filesToRegister;
|
||||
NameSpaceToPathHash m_filesToUnregister;
|
||||
};
|
||||
|
@@ -46,31 +46,11 @@ using namespace Help::Internal;
|
||||
|
||||
FilterSettingsPage::FilterSettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString FilterSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("D.Filters");
|
||||
}
|
||||
|
||||
QString FilterSettingsPage::displayName() const
|
||||
{
|
||||
return tr("Filters");
|
||||
}
|
||||
|
||||
QString FilterSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Help::Constants::HELP_CATEGORY);
|
||||
}
|
||||
|
||||
QString FilterSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon FilterSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Help::Constants::HELP_CATEGORY_ICON));
|
||||
setId(QLatin1String("D.Filters"));
|
||||
setDisplayName(tr("Filters"));
|
||||
setCategory(QLatin1String(Help::Constants::HELP_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Help::Constants::HELP_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *FilterSettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -42,21 +42,14 @@ namespace Internal {
|
||||
class FilterSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
typedef QMap<QString, QStringList> FilterMap;
|
||||
|
||||
public:
|
||||
FilterSettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
virtual bool matches(const QString &s) const;
|
||||
bool matches(const QString &s) const;
|
||||
|
||||
signals:
|
||||
void filtersChanged();
|
||||
@@ -75,6 +68,7 @@ private:
|
||||
QString msgFilterLabel(const QString &filter) const;
|
||||
Ui::FilterSettingsPage m_ui;
|
||||
|
||||
typedef QMap<QString, QStringList> FilterMap;
|
||||
FilterMap m_filterMap;
|
||||
FilterMap m_filterMapBackup;
|
||||
|
||||
|
@@ -66,31 +66,11 @@ GeneralSettingsPage::GeneralSettingsPage()
|
||||
QWebSettings* webSettings = QWebSettings::globalSettings();
|
||||
m_font.setPointSize(webSettings->fontSize(QWebSettings::DefaultFontSize));
|
||||
#endif
|
||||
}
|
||||
|
||||
QString GeneralSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("A.General settings");
|
||||
}
|
||||
|
||||
QString GeneralSettingsPage::displayName() const
|
||||
{
|
||||
return tr("General");
|
||||
}
|
||||
|
||||
QString GeneralSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Help::Constants::HELP_CATEGORY);
|
||||
}
|
||||
|
||||
QString GeneralSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon GeneralSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Help::Constants::HELP_CATEGORY_ICON));
|
||||
setId(QLatin1String("A.General settings"));
|
||||
setDisplayName(tr("General"));
|
||||
setCategory(QLatin1String(Help::Constants::HELP_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("Help", Help::Constants::HELP_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Help::Constants::HELP_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *GeneralSettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -48,16 +48,10 @@ class GeneralSettingsPage : public Core::IOptionsPage
|
||||
public:
|
||||
GeneralSettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
virtual bool matches(const QString &s) const;
|
||||
bool matches(const QString &s) const;
|
||||
|
||||
signals:
|
||||
void fontChanged();
|
||||
|
@@ -51,31 +51,11 @@ using namespace Locator::Internal;
|
||||
SettingsPage::SettingsPage(LocatorPlugin *plugin)
|
||||
: m_plugin(plugin), m_page(0)
|
||||
{
|
||||
}
|
||||
|
||||
QString SettingsPage::id() const
|
||||
{
|
||||
return QLatin1String(Constants::FILTER_OPTIONS_PAGE);
|
||||
}
|
||||
|
||||
QString SettingsPage::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("Locator", Locator::Constants::FILTER_OPTIONS_PAGE);
|
||||
}
|
||||
|
||||
QString SettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE);
|
||||
}
|
||||
|
||||
QString SettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE);
|
||||
}
|
||||
|
||||
QIcon SettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
|
||||
setId(Constants::FILTER_OPTIONS_PAGE);
|
||||
setDisplayName(QCoreApplication::translate("Locator", Locator::Constants::FILTER_OPTIONS_PAGE));
|
||||
setCategory(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE));
|
||||
setDisplayCategory(QCoreApplication::translate("Core", Core::Constants::SETTINGS_TR_CATEGORY_CORE));
|
||||
setCategoryIcon(QLatin1String(Core::Constants::SETTINGS_CATEGORY_CORE_ICON));
|
||||
}
|
||||
|
||||
QWidget *SettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -58,16 +58,11 @@ class SettingsPage : public Core::IOptionsPage
|
||||
|
||||
public:
|
||||
explicit SettingsPage(LocatorPlugin *plugin);
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
virtual bool matches(const QString &) const;
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private slots:
|
||||
void updateButtonStates();
|
||||
|
@@ -49,36 +49,11 @@ using namespace Macros::Internal;
|
||||
MacroOptionsPage::MacroOptionsPage(QObject *parent)
|
||||
: Core::IOptionsPage(parent)
|
||||
{
|
||||
}
|
||||
|
||||
MacroOptionsPage::~MacroOptionsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString MacroOptionsPage::id() const
|
||||
{
|
||||
return Constants::M_OPTIONS_PAGE;
|
||||
}
|
||||
|
||||
QString MacroOptionsPage::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("Macros", Constants::M_OPTIONS_TR_PAGE);
|
||||
}
|
||||
|
||||
QString MacroOptionsPage::category() const
|
||||
{
|
||||
return TextEditor::Constants::TEXT_EDITOR_SETTINGS_CATEGORY;
|
||||
}
|
||||
|
||||
QString MacroOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("TextEditor",
|
||||
TextEditor::Constants::TEXT_EDITOR_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon MacroOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon();
|
||||
setId(QLatin1String(Constants::M_OPTIONS_PAGE));
|
||||
setDisplayName(QCoreApplication::translate("Macros", Constants::M_OPTIONS_TR_PAGE));
|
||||
setCategory(QLatin1String(TextEditor::Constants::TEXT_EDITOR_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("TextEditor",
|
||||
TextEditor::Constants::TEXT_EDITOR_SETTINGS_TR_CATEGORY));
|
||||
}
|
||||
|
||||
QWidget *MacroOptionsPage::createPage(QWidget *parent)
|
||||
|
@@ -48,16 +48,9 @@ class MACROS_EXPORT MacroOptionsPage : public Core::IOptionsPage
|
||||
|
||||
public:
|
||||
MacroOptionsPage(QObject *parent = 0);
|
||||
~MacroOptionsPage();
|
||||
|
||||
// IOptionsPage implementation
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
|
||||
void apply();
|
||||
void finish();
|
||||
|
||||
|
@@ -105,35 +105,11 @@ private:
|
||||
MaemoQemuSettingsPage::MaemoQemuSettingsPage(QObject *parent)
|
||||
: Core::IOptionsPage(parent)
|
||||
{
|
||||
}
|
||||
|
||||
MaemoQemuSettingsPage::~MaemoQemuSettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString MaemoQemuSettingsPage::id() const
|
||||
{
|
||||
return pageId();
|
||||
}
|
||||
|
||||
QString MaemoQemuSettingsPage::displayName() const
|
||||
{
|
||||
return tr("MeeGo Qemu Settings");
|
||||
}
|
||||
|
||||
QString MaemoQemuSettingsPage::category() const
|
||||
{
|
||||
return pageCategory();
|
||||
}
|
||||
|
||||
QString MaemoQemuSettingsPage::displayCategory() const
|
||||
{
|
||||
return QString(); // Already set by device configurations page.
|
||||
}
|
||||
|
||||
QIcon MaemoQemuSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(); // See above.
|
||||
setId(pageId());
|
||||
setDisplayName(tr("MeeGo Qemu Settings"));
|
||||
setCategory(pageCategory());
|
||||
//setDisplayCategory(QString()); // Will be set by device configurations page.
|
||||
//setCategoryIcon(QIcon()) // See above.
|
||||
}
|
||||
|
||||
bool MaemoQemuSettingsPage::matches(const QString &searchKeyWord) const
|
||||
|
@@ -41,19 +41,14 @@ class MaemoQemuSettingsWidget;
|
||||
class MaemoQemuSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MaemoQemuSettingsPage(QObject *parent = 0);
|
||||
~MaemoQemuSettingsPage();
|
||||
|
||||
virtual QString id() const;
|
||||
virtual QString displayName() const;
|
||||
virtual QString category() const;
|
||||
virtual QString displayCategory() const;
|
||||
virtual QIcon categoryIcon() const;
|
||||
virtual bool matches(const QString &searchKeyWord) const;
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
bool matches(const QString &searchKeyWord) const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
||||
static void showQemuCrashDialog();
|
||||
static QString pageId();
|
||||
|
@@ -94,16 +94,8 @@ QString OptionsPageWidget::searchKeywords() const
|
||||
|
||||
OptionsPage::OptionsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString OptionsPage::id() const
|
||||
{
|
||||
return QLatin1String(VcsBase::Constants::VCS_ID_MERCURIAL);
|
||||
}
|
||||
|
||||
QString OptionsPage::displayName() const
|
||||
{
|
||||
return tr("Mercurial");
|
||||
setId(QLatin1String(VcsBase::Constants::VCS_ID_MERCURIAL));
|
||||
setDisplayName(tr("Mercurial"));
|
||||
}
|
||||
|
||||
QWidget *OptionsPage::createPage(QWidget *parent)
|
||||
|
@@ -140,16 +140,8 @@ QString SettingsPageWidget::searchKeywords() const
|
||||
|
||||
SettingsPage::SettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString SettingsPage::id() const
|
||||
{
|
||||
return QLatin1String(VcsBase::Constants::VCS_ID_PERFORCE);
|
||||
}
|
||||
|
||||
QString SettingsPage::displayName() const
|
||||
{
|
||||
return tr("Perforce");
|
||||
setId(QLatin1String(VcsBase::Constants::VCS_ID_PERFORCE));
|
||||
setDisplayName(tr("Perforce"));
|
||||
}
|
||||
|
||||
QWidget *SettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -78,13 +78,10 @@ class SettingsPage : public VcsBase::VcsBaseOptionsPage
|
||||
public:
|
||||
SettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
virtual bool matches(const QString &) const;
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
QString m_searchKeywords;
|
||||
|
@@ -44,35 +44,11 @@ namespace Internal {
|
||||
DeviceSettingsPage::DeviceSettingsPage(QObject *parent)
|
||||
: Core::IOptionsPage(parent)
|
||||
{
|
||||
}
|
||||
|
||||
DeviceSettingsPage::~DeviceSettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString DeviceSettingsPage::id() const
|
||||
{
|
||||
return pageId();
|
||||
}
|
||||
|
||||
QString DeviceSettingsPage::displayName() const
|
||||
{
|
||||
return tr("Devices");
|
||||
}
|
||||
|
||||
QString DeviceSettingsPage::category() const
|
||||
{
|
||||
return pageCategory();
|
||||
}
|
||||
|
||||
QString DeviceSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("ProjectExplorer", "Devices");
|
||||
}
|
||||
|
||||
QIcon DeviceSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(":/projectexplorer/images/MaemoDevice.png"));
|
||||
setId(QLatin1String(Constants::DEVICE_SETTINGS_PAGE_ID));
|
||||
setDisplayName(tr("Devices"));
|
||||
setCategory(QLatin1String(Constants::DEVICE_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("ProjectExplorer", "Devices"));
|
||||
setCategoryIcon(QLatin1String(":/projectexplorer/images/MaemoDevice.png"));
|
||||
}
|
||||
|
||||
bool DeviceSettingsPage::matches(const QString &searchKeyWord) const
|
||||
@@ -97,15 +73,5 @@ void DeviceSettingsPage::finish()
|
||||
{
|
||||
}
|
||||
|
||||
QString DeviceSettingsPage::pageId()
|
||||
{
|
||||
return QLatin1String(Constants::DEVICE_SETTINGS_PAGE_ID);
|
||||
}
|
||||
|
||||
QString DeviceSettingsPage::pageCategory()
|
||||
{
|
||||
return QLatin1String(Constants::DEVICE_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace ProjectExplorer
|
||||
|
@@ -35,27 +35,20 @@
|
||||
|
||||
namespace ProjectExplorer {
|
||||
namespace Internal {
|
||||
|
||||
class DeviceSettingsWidget;
|
||||
|
||||
class DeviceSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
DeviceSettingsPage(QObject *parent = 0);
|
||||
~DeviceSettingsPage();
|
||||
|
||||
virtual QString id() const;
|
||||
virtual QString displayName() const;
|
||||
virtual QString category() const;
|
||||
virtual QString displayCategory() const;
|
||||
virtual QIcon categoryIcon() const;
|
||||
virtual bool matches(const QString &searchKeyWord) const;
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
|
||||
static QString pageId();
|
||||
static QString pageCategory();
|
||||
bool matches(const QString &searchKeyWord) const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
||||
private:
|
||||
QString m_keywords;
|
||||
|
@@ -153,32 +153,16 @@ QString ProjectExplorerSettingsWidget::searchKeywords() const
|
||||
// ------------------ ProjectExplorerSettingsPage
|
||||
ProjectExplorerSettingsPage::ProjectExplorerSettingsPage()
|
||||
{
|
||||
setId(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_ID));
|
||||
setDisplayName(tr("General"));
|
||||
setCategory(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||
Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QString ProjectExplorerSettingsPage::id() const
|
||||
ProjectExplorerSettingsPage::~ProjectExplorerSettingsPage()
|
||||
{
|
||||
return QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_ID);
|
||||
}
|
||||
|
||||
QString ProjectExplorerSettingsPage::displayName() const
|
||||
{
|
||||
return tr("General");
|
||||
}
|
||||
|
||||
QString ProjectExplorerSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString ProjectExplorerSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("ProjectExplorer",
|
||||
Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon ProjectExplorerSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *ProjectExplorerSettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -73,19 +73,15 @@ private:
|
||||
class ProjectExplorerSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ProjectExplorerSettingsPage();
|
||||
~ProjectExplorerSettingsPage();
|
||||
|
||||
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 &s) const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
bool matches(const QString &s) const;
|
||||
|
||||
private:
|
||||
QString m_searchKeywords;
|
||||
|
@@ -472,32 +472,13 @@ void ToolChainModel::removeToolChain(ToolChain *tc)
|
||||
|
||||
ToolChainOptionsPage::ToolChainOptionsPage() :
|
||||
m_ui(0), m_model(0), m_selectionModel(0), m_currentTcWidget(0)
|
||||
{ }
|
||||
|
||||
QString ToolChainOptionsPage::id() const
|
||||
{
|
||||
return QLatin1String(Constants::TOOLCHAIN_SETTINGS_PAGE_ID);
|
||||
}
|
||||
|
||||
QString ToolChainOptionsPage::displayName() const
|
||||
{
|
||||
return tr("Tool Chains");
|
||||
}
|
||||
|
||||
QString ToolChainOptionsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString ToolChainOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("ProjectExplorer",
|
||||
Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon ToolChainOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
setId(QLatin1String(Constants::TOOLCHAIN_SETTINGS_PAGE_ID));
|
||||
setDisplayName(tr("Tool Chains"));
|
||||
setCategory(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||
Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *ToolChainOptionsPage::createPage(QWidget *parent)
|
||||
|
@@ -123,16 +123,10 @@ class ToolChainOptionsPage : public Core::IOptionsPage
|
||||
public:
|
||||
ToolChainOptionsPage();
|
||||
|
||||
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 &) const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private slots:
|
||||
void toolChainSelectionChanged();
|
||||
|
@@ -82,31 +82,12 @@ QString SettingsPageWidget::searchKeywords() const
|
||||
SettingsPage::SettingsPage() :
|
||||
m_widget(0)
|
||||
{
|
||||
}
|
||||
|
||||
QString SettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("B.QmlDesigner");
|
||||
}
|
||||
|
||||
QString SettingsPage::displayName() const
|
||||
{
|
||||
return tr("Qt Quick Designer");
|
||||
}
|
||||
|
||||
QString SettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML);
|
||||
}
|
||||
|
||||
QString SettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("QmlJSEditor", QmlJSEditor::Constants::SETTINGS_TR_CATEGORY_QML);
|
||||
}
|
||||
|
||||
QIcon SettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::SETTINGS_CATEGORY_QML_ICON));
|
||||
setId(QLatin1String("B.QmlDesigner"));
|
||||
setDisplayName(tr("Qt Quick Designer"));
|
||||
setCategory(QLatin1String(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML));
|
||||
setDisplayCategory(QCoreApplication::translate("QmlJSEditor",
|
||||
QmlJSEditor::Constants::SETTINGS_TR_CATEGORY_QML));
|
||||
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_QML_ICON));
|
||||
}
|
||||
|
||||
QWidget *SettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -53,6 +53,7 @@ namespace Internal {
|
||||
class SettingsPageWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SettingsPageWidget(QWidget *parent = 0);
|
||||
|
||||
@@ -73,16 +74,10 @@ class SettingsPage : public Core::IOptionsPage
|
||||
public:
|
||||
SettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
virtual bool matches(const QString &) const;
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
QString m_searchKeywords;
|
||||
|
@@ -126,31 +126,12 @@ QuickToolBarSettings QuickToolBarSettings::get()
|
||||
QuickToolBarSettingsPage::QuickToolBarSettingsPage() :
|
||||
m_widget(0)
|
||||
{
|
||||
}
|
||||
|
||||
QString QuickToolBarSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("C.QmlToolbar");
|
||||
}
|
||||
|
||||
QString QuickToolBarSettingsPage::displayName() const
|
||||
{
|
||||
return tr("Qt Quick ToolBar");
|
||||
}
|
||||
|
||||
QString QuickToolBarSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::SETTINGS_CATEGORY_QML);
|
||||
}
|
||||
|
||||
QString QuickToolBarSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("QmlJSEditor", QmlJSEditor::Constants::SETTINGS_TR_CATEGORY_QML);
|
||||
}
|
||||
|
||||
QIcon QuickToolBarSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(QmlDesigner::Constants::SETTINGS_CATEGORY_QML_ICON));
|
||||
setId(QLatin1String("C.QmlToolbar"));
|
||||
setDisplayName(tr("Qt Quick ToolBar"));
|
||||
setCategory(QLatin1String(Constants::SETTINGS_CATEGORY_QML));
|
||||
setDisplayCategory(QCoreApplication::translate("QmlJSEditor",
|
||||
QmlJSEditor::Constants::SETTINGS_TR_CATEGORY_QML));
|
||||
setCategoryIcon(QLatin1String(QmlDesigner::Constants::SETTINGS_CATEGORY_QML_ICON));
|
||||
}
|
||||
|
||||
QWidget *QuickToolBarSettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -94,16 +94,10 @@ class QuickToolBarSettingsPage : public Core::IOptionsPage
|
||||
public:
|
||||
QuickToolBarSettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
virtual bool matches(const QString &) const;
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
QString m_searchKeywords;
|
||||
|
@@ -169,35 +169,11 @@ QmlJSCodeStyleSettingsPage::QmlJSCodeStyleSettingsPage(/*QSharedPointer<CppFileS
|
||||
Core::IOptionsPage(parent),
|
||||
m_pageTabPreferences(0)
|
||||
{
|
||||
}
|
||||
|
||||
QmlJSCodeStyleSettingsPage::~QmlJSCodeStyleSettingsPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString QmlJSCodeStyleSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String(Constants::QML_JS_CODE_STYLE_SETTINGS_ID);
|
||||
}
|
||||
|
||||
QString QmlJSCodeStyleSettingsPage::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("QmlJSTools", Constants::QML_JS_CODE_STYLE_SETTINGS_NAME);
|
||||
}
|
||||
|
||||
QString QmlJSCodeStyleSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML);
|
||||
}
|
||||
|
||||
QString QmlJSCodeStyleSettingsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("QmlJSEditor", QmlJSEditor::Constants::SETTINGS_TR_CATEGORY_QML);
|
||||
}
|
||||
|
||||
QIcon QmlJSCodeStyleSettingsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(QmlDesigner::Constants::SETTINGS_CATEGORY_QML_ICON));
|
||||
setId(QLatin1String(Constants::QML_JS_CODE_STYLE_SETTINGS_ID));
|
||||
setDisplayName(QCoreApplication::translate("QmlJSTools", Constants::QML_JS_CODE_STYLE_SETTINGS_NAME));
|
||||
setCategory(QLatin1String(QmlJSEditor::Constants::SETTINGS_CATEGORY_QML));
|
||||
setDisplayCategory(QCoreApplication::translate("QmlJSEditor", QmlJSEditor::Constants::SETTINGS_TR_CATEGORY_QML));
|
||||
setCategoryIcon(QLatin1String(QmlDesigner::Constants::SETTINGS_CATEGORY_QML_ICON));
|
||||
}
|
||||
|
||||
QWidget *QmlJSCodeStyleSettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -61,10 +61,9 @@ class QmlJSCodeStylePreferencesWidget : public QWidget
|
||||
|
||||
public:
|
||||
explicit QmlJSCodeStylePreferencesWidget(QWidget *parent = 0);
|
||||
virtual ~QmlJSCodeStylePreferencesWidget();
|
||||
~QmlJSCodeStylePreferencesWidget();
|
||||
|
||||
void setPreferences(TextEditor::ICodeStylePreferences *preferences);
|
||||
|
||||
QString searchKeywords() const;
|
||||
|
||||
private slots:
|
||||
@@ -74,7 +73,6 @@ private slots:
|
||||
void updatePreview();
|
||||
|
||||
private:
|
||||
|
||||
TextEditor::ICodeStylePreferences *m_preferences;
|
||||
Ui::QmlJSCodeStyleSettingsPage *m_ui;
|
||||
};
|
||||
@@ -86,19 +84,11 @@ class QmlJSCodeStyleSettingsPage : public Core::IOptionsPage
|
||||
|
||||
public:
|
||||
explicit QmlJSCodeStyleSettingsPage(QWidget *parent = 0);
|
||||
~QmlJSCodeStyleSettingsPage();
|
||||
|
||||
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 &) const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
QString m_searchKeywords;
|
||||
|
@@ -126,32 +126,12 @@ bool UnConfiguredSettingsWidget::matches(const QString &searchKeyword)
|
||||
|
||||
UnConfiguredSettingsOptionPage::UnConfiguredSettingsOptionPage()
|
||||
{
|
||||
}
|
||||
|
||||
QString UnConfiguredSettingsOptionPage::id() const
|
||||
{
|
||||
return Constants::UNCONFIGURED_SETTINGS_PAGE_ID;
|
||||
}
|
||||
|
||||
QString UnConfiguredSettingsOptionPage::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("Qt4ProjectManager", Constants::UNCONFIGURED_SETTINGS_PAGE_NAME);
|
||||
}
|
||||
|
||||
QString UnConfiguredSettingsOptionPage::category() const
|
||||
{
|
||||
return QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString UnConfiguredSettingsOptionPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("ProjectExplorer",
|
||||
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon UnConfiguredSettingsOptionPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON);
|
||||
setId(Constants::UNCONFIGURED_SETTINGS_PAGE_ID);
|
||||
setDisplayName(QCoreApplication::translate("Qt4ProjectManager", Constants::UNCONFIGURED_SETTINGS_PAGE_NAME));
|
||||
setCategory(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
bool UnConfiguredSettingsOptionPage::matches(const QString &searchKeyword) const
|
||||
|
@@ -62,16 +62,11 @@ class UnConfiguredSettingsOptionPage : public Core::IOptionsPage
|
||||
public:
|
||||
UnConfiguredSettingsOptionPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
bool matches(const QString &searcKeyword) const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
||||
private:
|
||||
UnConfiguredSettingsWidget *m_widget;
|
||||
};
|
||||
|
@@ -71,32 +71,12 @@ using namespace QtSupport::Internal;
|
||||
QtOptionsPage::QtOptionsPage()
|
||||
: m_widget(0)
|
||||
{
|
||||
}
|
||||
|
||||
QString QtOptionsPage::id() const
|
||||
{
|
||||
return QLatin1String(Constants::QTVERSION_SETTINGS_PAGE_ID);
|
||||
}
|
||||
|
||||
QString QtOptionsPage::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("Qt4ProjectManager", Constants::QTVERSION_SETTINGS_PAGE_NAME);
|
||||
}
|
||||
|
||||
QString QtOptionsPage::category() const
|
||||
{
|
||||
return QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString QtOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("ProjectExplorer",
|
||||
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon QtOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
setId(QLatin1String(Constants::QTVERSION_SETTINGS_PAGE_ID));
|
||||
setDisplayName(QCoreApplication::translate("Qt4ProjectManager", Constants::QTVERSION_SETTINGS_PAGE_NAME));
|
||||
setCategory(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("ProjectExplorer",
|
||||
ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(ProjectExplorer::Constants::PROJECTEXPLORER_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
||||
QWidget *QtOptionsPage::createPage(QWidget *parent)
|
||||
|
@@ -139,17 +139,14 @@ private:
|
||||
class QtOptionsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QtOptionsPage();
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() {}
|
||||
virtual bool matches(const QString &) const;
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
QtOptionsPageWidget *m_widget;
|
||||
|
@@ -105,16 +105,8 @@ QString SettingsPageWidget::searchKeywords() const
|
||||
SettingsPage::SettingsPage() :
|
||||
m_widget(0)
|
||||
{
|
||||
}
|
||||
|
||||
QString SettingsPage::id() const
|
||||
{
|
||||
return QLatin1String(VcsBase::Constants::VCS_ID_SUBVERSION);
|
||||
}
|
||||
|
||||
QString SettingsPage::displayName() const
|
||||
{
|
||||
return tr("Subversion");
|
||||
setId(QLatin1String(VcsBase::Constants::VCS_ID_SUBVERSION));
|
||||
setDisplayName(tr("Subversion"));
|
||||
}
|
||||
|
||||
QWidget *SettingsPage::createPage(QWidget *parent)
|
||||
|
@@ -74,13 +74,10 @@ class SettingsPage : public VcsBase::VcsBaseOptionsPage
|
||||
public:
|
||||
SettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
virtual bool matches(const QString &) const;
|
||||
bool matches(const QString &) const;
|
||||
|
||||
private:
|
||||
QString m_searchKeywords;
|
||||
|
@@ -102,6 +102,9 @@ BehaviorSettingsPage::BehaviorSettingsPage(const BehaviorSettingsPageParameters
|
||||
d->m_defaultCodeStylePool = new CodeStylePool(0, this); // Any language
|
||||
d->m_defaultCodeStylePool->addCodeStyle(d->m_codeStyle);
|
||||
d->init();
|
||||
|
||||
setId(p.id);
|
||||
setDisplayName(p.displayName);
|
||||
}
|
||||
|
||||
BehaviorSettingsPage::~BehaviorSettingsPage()
|
||||
@@ -109,16 +112,6 @@ BehaviorSettingsPage::~BehaviorSettingsPage()
|
||||
delete d;
|
||||
}
|
||||
|
||||
QString BehaviorSettingsPage::id() const
|
||||
{
|
||||
return d->m_parameters.id;
|
||||
}
|
||||
|
||||
QString BehaviorSettingsPage::displayName() const
|
||||
{
|
||||
return d->m_parameters.displayName;
|
||||
}
|
||||
|
||||
QWidget *BehaviorSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
QWidget *w = new QWidget(parent);
|
||||
|
@@ -61,12 +61,9 @@ class BehaviorSettingsPage : public TextEditorOptionsPage
|
||||
|
||||
public:
|
||||
BehaviorSettingsPage(const BehaviorSettingsPageParameters &p, QObject *parent);
|
||||
virtual ~BehaviorSettingsPage();
|
||||
~BehaviorSettingsPage();
|
||||
|
||||
// IOptionsPage
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
@@ -65,6 +65,8 @@ DisplaySettingsPage::DisplaySettingsPage(const DisplaySettingsPageParameters &p,
|
||||
: TextEditorOptionsPage(parent),
|
||||
d(new DisplaySettingsPagePrivate(p))
|
||||
{
|
||||
setId(p.id);
|
||||
setDisplayName(p.displayName);
|
||||
}
|
||||
|
||||
DisplaySettingsPage::~DisplaySettingsPage()
|
||||
@@ -72,16 +74,6 @@ DisplaySettingsPage::~DisplaySettingsPage()
|
||||
delete d;
|
||||
}
|
||||
|
||||
QString DisplaySettingsPage::id() const
|
||||
{
|
||||
return d->m_parameters.id;
|
||||
}
|
||||
|
||||
QString DisplaySettingsPage::displayName() const
|
||||
{
|
||||
return d->m_parameters.displayName;
|
||||
}
|
||||
|
||||
QWidget *DisplaySettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
QWidget *w = new QWidget(parent);
|
||||
|
@@ -55,12 +55,9 @@ class DisplaySettingsPage : public TextEditorOptionsPage
|
||||
|
||||
public:
|
||||
DisplaySettingsPage(const DisplaySettingsPageParameters &p, QObject *parent);
|
||||
virtual ~DisplaySettingsPage();
|
||||
~DisplaySettingsPage();
|
||||
|
||||
// IOptionsPage
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
@@ -321,6 +321,8 @@ FontSettingsPage::FontSettingsPage(const FormatDescriptions &fd,
|
||||
TextEditorOptionsPage(parent),
|
||||
d_ptr(new FontSettingsPagePrivate(fd, id, tr("Font && Colors"), category()))
|
||||
{
|
||||
setId(d_ptr->m_id);
|
||||
setDisplayName(d_ptr->m_displayName);
|
||||
}
|
||||
|
||||
FontSettingsPage::~FontSettingsPage()
|
||||
@@ -328,16 +330,6 @@ FontSettingsPage::~FontSettingsPage()
|
||||
delete d_ptr;
|
||||
}
|
||||
|
||||
QString FontSettingsPage::id() const
|
||||
{
|
||||
return d_ptr->m_id;
|
||||
}
|
||||
|
||||
QString FontSettingsPage::displayName() const
|
||||
{
|
||||
return d_ptr->m_displayName;
|
||||
}
|
||||
|
||||
QWidget *FontSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
QWidget *w = new QWidget(parent);
|
||||
|
@@ -93,13 +93,10 @@ public:
|
||||
|
||||
~FontSettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
virtual bool matches(const QString &) const;
|
||||
bool matches(const QString &) const;
|
||||
|
||||
void saveSettings();
|
||||
|
||||
|
@@ -83,6 +83,8 @@ HighlighterSettingsPage::HighlighterSettingsPage(const QString &id, QObject *par
|
||||
m_requestMimeTypeRegistration(false),
|
||||
m_d(new HighlighterSettingsPagePrivate(id))
|
||||
{
|
||||
setId(m_d->m_id);
|
||||
setDisplayName(m_d->m_displayName);
|
||||
}
|
||||
|
||||
HighlighterSettingsPage::~HighlighterSettingsPage()
|
||||
@@ -90,16 +92,6 @@ HighlighterSettingsPage::~HighlighterSettingsPage()
|
||||
delete m_d;
|
||||
}
|
||||
|
||||
QString HighlighterSettingsPage::id() const
|
||||
{
|
||||
return m_d->m_id;
|
||||
}
|
||||
|
||||
QString HighlighterSettingsPage::displayName() const
|
||||
{
|
||||
return m_d->m_displayName;
|
||||
}
|
||||
|
||||
QWidget *HighlighterSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
QWidget *w = new QWidget(parent);
|
||||
|
@@ -50,12 +50,10 @@ class HighlighterSettings;
|
||||
class HighlighterSettingsPage : public TextEditorOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
HighlighterSettingsPage(const QString &id, QObject *parent);
|
||||
virtual ~HighlighterSettingsPage();
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
~HighlighterSettingsPage();
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
|
@@ -565,23 +565,16 @@ void SnippetsSettingsPagePrivate::decorateEditors(const TextEditor::FontSettings
|
||||
SnippetsSettingsPage::SnippetsSettingsPage(const QString &id, QObject *parent) :
|
||||
TextEditorOptionsPage(parent),
|
||||
d(new SnippetsSettingsPagePrivate(id))
|
||||
{}
|
||||
{
|
||||
setId(d->id());
|
||||
setDisplayName(d->displayName());
|
||||
}
|
||||
|
||||
SnippetsSettingsPage::~SnippetsSettingsPage()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
QString SnippetsSettingsPage::id() const
|
||||
{
|
||||
return d->id();
|
||||
}
|
||||
|
||||
QString SnippetsSettingsPage::displayName() const
|
||||
{
|
||||
return d->displayName();
|
||||
}
|
||||
|
||||
bool SnippetsSettingsPage::matches(const QString &s) const
|
||||
{
|
||||
return d->isKeyword(s);
|
||||
|
@@ -46,14 +46,12 @@ class SnippetsSettingsPage : public TextEditorOptionsPage
|
||||
|
||||
public:
|
||||
SnippetsSettingsPage(const QString &id, QObject *parent);
|
||||
virtual ~SnippetsSettingsPage();
|
||||
~SnippetsSettingsPage();
|
||||
|
||||
virtual QString id() const;
|
||||
virtual QString displayName() const;
|
||||
virtual bool matches(const QString &s) const;
|
||||
virtual QWidget *createPage(QWidget *parent);
|
||||
virtual void apply();
|
||||
virtual void finish();
|
||||
bool matches(const QString &s) const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
||||
private:
|
||||
SnippetsSettingsPagePrivate *d;
|
||||
|
@@ -35,26 +35,13 @@
|
||||
#include "texteditorconstants.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QIcon>
|
||||
|
||||
using namespace TextEditor;
|
||||
|
||||
TextEditorOptionsPage::TextEditorOptionsPage(QObject *parent) :
|
||||
Core::IOptionsPage(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QString TextEditorOptionsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::TEXT_EDITOR_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString TextEditorOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("TextEditor", Constants::TEXT_EDITOR_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon TextEditorOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::TEXT_EDITOR_SETTINGS_CATEGORY_ICON));
|
||||
setCategory(QLatin1String(Constants::TEXT_EDITOR_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("TextEditor", Constants::TEXT_EDITOR_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Constants::TEXT_EDITOR_SETTINGS_CATEGORY_ICON));
|
||||
}
|
||||
|
@@ -48,11 +48,6 @@ class TEXTEDITOR_EXPORT TextEditorOptionsPage : public Core::IOptionsPage
|
||||
|
||||
public:
|
||||
explicit TextEditorOptionsPage(QObject *parent = 0);
|
||||
|
||||
// IOptionsPage
|
||||
QString category() const;
|
||||
QString displayCategory() const;
|
||||
QIcon categoryIcon() const;
|
||||
};
|
||||
|
||||
} // namespace TextEditor
|
||||
|
@@ -51,10 +51,12 @@ OptionsPage::OptionsPage(const Settings &settings, QObject *parent) :
|
||||
m_dialog(0)
|
||||
{
|
||||
setSettings(settings);
|
||||
}
|
||||
|
||||
OptionsPage::~OptionsPage()
|
||||
{
|
||||
setId(QLatin1String("TodoSettings"));
|
||||
setDisplayName(tr("To-Do"));
|
||||
setCategory(QLatin1String("To-Do"));
|
||||
setDisplayCategory(tr("To-Do"));
|
||||
setCategoryIcon(QLatin1String(Constants::ICON_TODO));
|
||||
}
|
||||
|
||||
void OptionsPage::setSettings(const Settings &settings)
|
||||
@@ -62,42 +64,6 @@ void OptionsPage::setSettings(const Settings &settings)
|
||||
m_settings = settings;
|
||||
}
|
||||
|
||||
QString OptionsPage::id() const
|
||||
{
|
||||
return QLatin1String("TodoSettings");
|
||||
}
|
||||
|
||||
QString OptionsPage::trName() const
|
||||
{
|
||||
return tr("To-Do");
|
||||
}
|
||||
|
||||
QString OptionsPage::category() const
|
||||
{
|
||||
return QLatin1String("To-Do");
|
||||
}
|
||||
|
||||
QString OptionsPage::trCategory() const
|
||||
{
|
||||
return tr("To-Do");
|
||||
}
|
||||
|
||||
QString OptionsPage::displayName() const
|
||||
{
|
||||
return trName();
|
||||
}
|
||||
|
||||
QString OptionsPage::displayCategory() const
|
||||
{
|
||||
return trCategory();
|
||||
}
|
||||
|
||||
QIcon OptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::ICON_TODO));
|
||||
}
|
||||
|
||||
|
||||
QWidget *OptionsPage::createPage(QWidget *parent)
|
||||
{
|
||||
m_dialog = new OptionsDialog(parent);
|
||||
|
@@ -46,19 +46,12 @@ class OptionsDialog;
|
||||
class OptionsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
OptionsPage(const Settings &settings, QObject *parent = 0);
|
||||
~OptionsPage();
|
||||
|
||||
void setSettings(const Settings &settings);
|
||||
|
||||
QString id() const;
|
||||
QString trName() const;
|
||||
QString category() const;
|
||||
QString trCategory() const;
|
||||
QString displayName() const;
|
||||
QIcon categoryIcon() const;
|
||||
QString displayCategory() const;
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish();
|
||||
|
@@ -110,20 +110,9 @@ CommonOptionsPage::CommonOptionsPage(QObject *parent) :
|
||||
VcsBaseOptionsPage(parent)
|
||||
{
|
||||
m_settings.fromSettings(Core::ICore::settings());
|
||||
}
|
||||
|
||||
void CommonOptionsPage::updateNickNames()
|
||||
{
|
||||
}
|
||||
|
||||
QString CommonOptionsPage::id() const
|
||||
{
|
||||
return QLatin1String(Constants::VCS_COMMON_SETTINGS_ID);
|
||||
}
|
||||
|
||||
QString CommonOptionsPage::displayName() const
|
||||
{
|
||||
return QCoreApplication::translate("VcsBase", Constants::VCS_COMMON_SETTINGS_NAME);
|
||||
setId(QLatin1String(Constants::VCS_COMMON_SETTINGS_ID));
|
||||
setDisplayName(QCoreApplication::translate("VcsBase", Constants::VCS_COMMON_SETTINGS_NAME));
|
||||
}
|
||||
|
||||
QWidget *CommonOptionsPage::createPage(QWidget *parent)
|
||||
|
@@ -69,9 +69,6 @@ class CommonOptionsPage : public VcsBaseOptionsPage
|
||||
public:
|
||||
explicit CommonOptionsPage(QObject *parent = 0);
|
||||
|
||||
QString id() const;
|
||||
QString displayName() const;
|
||||
|
||||
QWidget *createPage(QWidget *parent);
|
||||
void apply();
|
||||
void finish() { }
|
||||
@@ -83,8 +80,6 @@ signals:
|
||||
void settingsChanged(const VcsBase::Internal::CommonVcsSettings &s);
|
||||
|
||||
private:
|
||||
void updateNickNames();
|
||||
|
||||
CommonSettingsWidget *m_widget;
|
||||
CommonVcsSettings m_settings;
|
||||
QString m_searchKeyWords;
|
||||
|
@@ -35,7 +35,6 @@
|
||||
#include "vcsbaseconstants.h"
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QIcon>
|
||||
|
||||
/*!
|
||||
\class VcsBase::VcsBaseOptionsPage
|
||||
@@ -48,21 +47,9 @@ namespace VcsBase {
|
||||
VcsBaseOptionsPage::VcsBaseOptionsPage(QObject *parent) :
|
||||
Core::IOptionsPage(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QString VcsBaseOptionsPage::category() const
|
||||
{
|
||||
return QLatin1String(Constants::VCS_SETTINGS_CATEGORY);
|
||||
}
|
||||
|
||||
QString VcsBaseOptionsPage::displayCategory() const
|
||||
{
|
||||
return QCoreApplication::translate("VcsBase", Constants::VCS_SETTINGS_TR_CATEGORY);
|
||||
}
|
||||
|
||||
QIcon VcsBaseOptionsPage::categoryIcon() const
|
||||
{
|
||||
return QIcon(QLatin1String(Constants::SETTINGS_CATEGORY_VCS_ICON));
|
||||
setCategory(QLatin1String(Constants::VCS_SETTINGS_CATEGORY));
|
||||
setDisplayCategory(QCoreApplication::translate("VcsBase", Constants::VCS_SETTINGS_TR_CATEGORY));
|
||||
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_VCS_ICON));
|
||||
}
|
||||
|
||||
} // namespace VcsBase
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user