forked from qt-creator/qt-creator
Rename ThemeSettingsWidget -> ThemeChooser
Change-Id: Ie61dc07d9f8bc8639ff80368a0b2ad4dd62cacb3 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
3ac3fe9389
commit
9d0d39495f
@@ -32,7 +32,7 @@
|
||||
#include "modemanager.h"
|
||||
#include "infobar.h"
|
||||
#include "iwizardfactory.h"
|
||||
#include "themesettings.h"
|
||||
#include "themechooser.h"
|
||||
|
||||
#include <coreplugin/actionmanager/actionmanager.h>
|
||||
#include <coreplugin/documentmanager.h>
|
||||
|
||||
@@ -19,7 +19,7 @@ SOURCES += corejsextensions.cpp \
|
||||
fancyactionbar.cpp \
|
||||
fancytabwidget.cpp \
|
||||
generalsettings.cpp \
|
||||
themesettings.cpp \
|
||||
themechooser.cpp \
|
||||
id.cpp \
|
||||
icontext.cpp \
|
||||
jsexpander.cpp \
|
||||
@@ -118,7 +118,7 @@ HEADERS += corejsextensions.h \
|
||||
fancyactionbar.h \
|
||||
fancytabwidget.h \
|
||||
generalsettings.h \
|
||||
themesettings.h \
|
||||
themechooser.h \
|
||||
id.h \
|
||||
jsexpander.h \
|
||||
messagemanager.h \
|
||||
|
||||
@@ -99,7 +99,7 @@ QtcPlugin {
|
||||
"styleanimator.cpp", "styleanimator.h",
|
||||
"systemsettings.cpp", "systemsettings.h", "systemsettings.ui",
|
||||
"textdocument.cpp", "textdocument.h",
|
||||
"themesettings.cpp", "themesettings.h",
|
||||
"themechooser.cpp", "themechooser.h",
|
||||
"toolsettings.cpp", "toolsettings.h",
|
||||
"variablechooser.cpp", "variablechooser.h",
|
||||
"vcsmanager.cpp", "vcsmanager.h",
|
||||
|
||||
@@ -119,7 +119,7 @@ void GeneralSettings::apply()
|
||||
setLanguage(m_page->languageBox->itemData(currentIndex, Qt::UserRole).toString());
|
||||
// Apply the new base color if accepted
|
||||
StyleHelper::setBaseColor(m_page->colorButton->color());
|
||||
m_page->themeWidget->apply();
|
||||
m_page->themeChooser->apply();
|
||||
}
|
||||
|
||||
void GeneralSettings::finish()
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Core::Internal::ThemeSettingsWidget" name="themeWidget" native="true"/>
|
||||
<widget class="Core::Internal::ThemeChooser" name="themeChooser" native="true"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="languageLabel">
|
||||
@@ -149,9 +149,9 @@
|
||||
<header location="global">utils/qtcolorbutton.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Core::Internal::ThemeSettingsWidget</class>
|
||||
<class>Core::Internal::ThemeChooser</class>
|
||||
<extends>QWidget</extends>
|
||||
<header location="global">coreplugin/themesettings.h</header>
|
||||
<header location="global">coreplugin/themechooser.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
#include "fancytabwidget.h"
|
||||
#include "documentmanager.h"
|
||||
#include "generalsettings.h"
|
||||
#include "themesettings.h"
|
||||
#include "helpmanager.h"
|
||||
#include "idocumentfactory.h"
|
||||
#include "messagemanager.h"
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include "coreconstants.h"
|
||||
#include "icore.h"
|
||||
#include "manhattanstyle.h"
|
||||
#include "themesettings.h"
|
||||
#include "themechooser.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
#include <utils/theme/theme.h>
|
||||
@@ -119,11 +119,11 @@ private:
|
||||
};
|
||||
|
||||
|
||||
class ThemeSettingsPrivate
|
||||
class ThemeChooserPrivate
|
||||
{
|
||||
public:
|
||||
ThemeSettingsPrivate(QWidget *widget);
|
||||
~ThemeSettingsPrivate();
|
||||
ThemeChooserPrivate(QWidget *widget);
|
||||
~ThemeChooserPrivate();
|
||||
|
||||
public:
|
||||
ThemeListModel *m_themeListModel;
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
bool m_refreshingThemeList;
|
||||
};
|
||||
|
||||
ThemeSettingsPrivate::ThemeSettingsPrivate(QWidget *widget)
|
||||
ThemeChooserPrivate::ThemeChooserPrivate(QWidget *widget)
|
||||
: m_themeListModel(new ThemeListModel)
|
||||
, m_themeComboBox(new QComboBox)
|
||||
, m_refreshingThemeList(false)
|
||||
@@ -144,25 +144,25 @@ ThemeSettingsPrivate::ThemeSettingsPrivate(QWidget *widget)
|
||||
m_themeComboBox->setModel(m_themeListModel);
|
||||
}
|
||||
|
||||
ThemeSettingsPrivate::~ThemeSettingsPrivate()
|
||||
ThemeChooserPrivate::~ThemeChooserPrivate()
|
||||
{
|
||||
delete m_themeListModel;
|
||||
}
|
||||
|
||||
ThemeSettingsWidget::ThemeSettingsWidget(QWidget *parent) :
|
||||
ThemeChooser::ThemeChooser(QWidget *parent) :
|
||||
QWidget(parent)
|
||||
{
|
||||
d = new ThemeSettingsPrivate(this);
|
||||
d = new ThemeChooserPrivate(this);
|
||||
|
||||
refreshThemeList();
|
||||
}
|
||||
|
||||
ThemeSettingsWidget::~ThemeSettingsWidget()
|
||||
ThemeChooser::~ThemeChooser()
|
||||
{
|
||||
delete d;
|
||||
}
|
||||
|
||||
void ThemeSettingsWidget::refreshThemeList()
|
||||
void ThemeChooser::refreshThemeList()
|
||||
{
|
||||
const QList<ThemeEntry> themes = ThemeEntry::availableThemes();
|
||||
const int selected = Utils::indexOf(themes, Utils::equal(&ThemeEntry::id,
|
||||
@@ -175,7 +175,7 @@ void ThemeSettingsWidget::refreshThemeList()
|
||||
d->m_refreshingThemeList = false;
|
||||
}
|
||||
|
||||
void ThemeSettingsWidget::apply()
|
||||
void ThemeChooser::apply()
|
||||
{
|
||||
const int index = d->m_themeComboBox->currentIndex();
|
||||
if (index == -1)
|
||||
@@ -23,8 +23,8 @@
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef THEMESETTINGS_H
|
||||
#define THEMESETTINGS_H
|
||||
#ifndef THEMECHOOSER_H
|
||||
#define THEMECHOOSER_H
|
||||
|
||||
#include "id.h"
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
namespace Core {
|
||||
namespace Internal {
|
||||
|
||||
class ThemeSettingsPrivate;
|
||||
class ThemeChooserPrivate;
|
||||
|
||||
class ThemeEntry
|
||||
{
|
||||
@@ -54,19 +54,19 @@ private:
|
||||
mutable QString m_displayName;
|
||||
};
|
||||
|
||||
class ThemeSettingsWidget : public QWidget
|
||||
class ThemeChooser : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ThemeSettingsWidget(QWidget *parent = 0);
|
||||
~ThemeSettingsWidget();
|
||||
ThemeChooser(QWidget *parent = 0);
|
||||
~ThemeChooser();
|
||||
|
||||
void apply();
|
||||
|
||||
private:
|
||||
void refreshThemeList();
|
||||
ThemeSettingsPrivate *d;
|
||||
ThemeChooserPrivate *d;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
Reference in New Issue
Block a user