Commit b85229f3 authored by Eike Ziller's avatar Eike Ziller

Rename SettingsPage -> LocatorSettingsPage

Change-Id: I05ed009c597032ab1242ca2d69d7b0f7bd6da558
Reviewed-by: default avatarEike Ziller <eike.ziller@theqtcompany.com>
parent e57bb773
......@@ -280,9 +280,9 @@ QtcPlugin {
"locatorwidget.h",
"opendocumentsfilter.cpp",
"opendocumentsfilter.h",
"settingspage.cpp",
"settingspage.h",
"settingspage.ui",
"locatorsettingspage.cpp",
"locatorsettingspage.h",
"locatorsettingspage.ui",
"images/locator.png",
"images/reload.png",
]
......
......@@ -35,7 +35,7 @@
#include "locatorwidget.h"
#include "opendocumentsfilter.h"
#include "filesystemfilter.h"
#include "settingspage.h"
#include "locatorsettingspage.h"
#include <coreplugin/coreplugin.h>
#include <coreplugin/statusbarwidget.h>
......@@ -86,7 +86,7 @@ void Locator::initialize(CorePlugin *corePlugin, const QStringList &, QString *)
{
m_corePlugin = corePlugin;
m_settingsPage = new SettingsPage(this);
m_settingsPage = new LocatorSettingsPage(this);
m_corePlugin->addObject(m_settingsPage);
m_locatorWidget = new LocatorWidget(this);
......
......@@ -49,7 +49,7 @@ class CorePlugin;
class LocatorWidget;
class OpenDocumentsFilter;
class FileSystemFilter;
class SettingsPage;
class LocatorSettingsPage;
class Locator : public QObject
{
......@@ -86,7 +86,7 @@ private:
void loadSettingsHelper(S *settings);
LocatorWidget *m_locatorWidget;
SettingsPage *m_settingsPage;
LocatorSettingsPage *m_settingsPage;
bool m_settingsInitialized;
QList<ILocatorFilter *> m_filters;
......
......@@ -3,7 +3,6 @@ HEADERS += \
$$PWD/commandlocator.h \
$$PWD/locatorwidget.h \
$$PWD/locatorfiltersfilter.h \
$$PWD/settingspage.h \
$$PWD/ilocatorfilter.h \
$$PWD/opendocumentsfilter.h \
$$PWD/filesystemfilter.h \
......@@ -12,7 +11,8 @@ HEADERS += \
$$PWD/locatormanager.h \
$$PWD/basefilefilter.h \
$$PWD/executefilter.h \
$$PWD/locatorsearchutils.h
$$PWD/locatorsearchutils.h \
$$PWD/locatorsettingspage.h
SOURCES += \
$$PWD/locator.cpp \
......@@ -21,18 +21,18 @@ SOURCES += \
$$PWD/locatorfiltersfilter.cpp \
$$PWD/opendocumentsfilter.cpp \
$$PWD/filesystemfilter.cpp \
$$PWD/settingspage.cpp \
$$PWD/directoryfilter.cpp \
$$PWD/locatormanager.cpp \
$$PWD/basefilefilter.cpp \
$$PWD/ilocatorfilter.cpp \
$$PWD/executefilter.cpp \
$$PWD/locatorsearchutils.cpp
$$PWD/locatorsearchutils.cpp \
$$PWD/locatorsettingspage.cpp
FORMS += \
$$PWD/settingspage.ui \
$$PWD/filesystemfilter.ui \
$$PWD/directoryfilter.ui
$$PWD/directoryfilter.ui \
$$PWD/locatorsettingspage.ui
RESOURCES += \
$$PWD/locator.qrc
......
......@@ -28,7 +28,7 @@
**
****************************************************************************/
#include "settingspage.h"
#include "locatorsettingspage.h"
#include "locatorconstants.h"
#include "locator.h"
......@@ -45,7 +45,7 @@ Q_DECLARE_METATYPE(Core::ILocatorFilter*)
using namespace Core;
using namespace Core::Internal;
SettingsPage::SettingsPage(Locator *plugin)
LocatorSettingsPage::LocatorSettingsPage(Locator *plugin)
: m_plugin(plugin), m_widget(0)
{
setId(Constants::FILTER_OPTIONS_PAGE);
......@@ -55,7 +55,7 @@ SettingsPage::SettingsPage(Locator *plugin)
setCategoryIcon(QLatin1String(Constants::SETTINGS_CATEGORY_CORE_ICON));
}
QWidget *SettingsPage::widget()
QWidget *LocatorSettingsPage::widget()
{
if (!m_widget) {
m_widget = new QWidget;
......@@ -81,7 +81,7 @@ QWidget *SettingsPage::widget()
return m_widget;
}
void SettingsPage::apply()
void LocatorSettingsPage::apply()
{
// Delete removed filters and clear added filters
qDeleteAll(m_removedFilters);
......@@ -97,7 +97,7 @@ void SettingsPage::apply()
saveFilterStates();
}
void SettingsPage::finish()
void LocatorSettingsPage::finish()
{
// If settings were applied, this shouldn't change anything. Otherwise it
// makes sure the filter states aren't changed permanently.
......@@ -115,26 +115,26 @@ void SettingsPage::finish()
delete m_widget;
}
void SettingsPage::requestRefresh()
void LocatorSettingsPage::requestRefresh()
{
if (!m_refreshFilters.isEmpty())
m_plugin->refresh(m_refreshFilters);
}
void SettingsPage::saveFilterStates()
void LocatorSettingsPage::saveFilterStates()
{
m_filterStates.clear();
foreach (ILocatorFilter *filter, m_filters)
m_filterStates.insert(filter, filter->saveState());
}
void SettingsPage::restoreFilterStates()
void LocatorSettingsPage::restoreFilterStates()
{
foreach (ILocatorFilter *filter, m_filterStates.keys())
filter->restoreState(m_filterStates.value(filter));
}
void SettingsPage::updateFilterList()
void LocatorSettingsPage::updateFilterList()
{
m_ui.filterList->clear();
foreach (ILocatorFilter *filter, m_filters) {
......@@ -154,7 +154,7 @@ void SettingsPage::updateFilterList()
m_ui.filterList->setCurrentRow(0);
}
void SettingsPage::updateButtonStates()
void LocatorSettingsPage::updateButtonStates()
{
QListWidgetItem *item = m_ui.filterList->currentItem();
ILocatorFilter *filter = (item ? item->data(Qt::UserRole).value<ILocatorFilter *>() : 0);
......@@ -162,7 +162,7 @@ void SettingsPage::updateButtonStates()
m_ui.removeButton->setEnabled(filter && m_customFilters.contains(filter));
}
void SettingsPage::configureFilter(QListWidgetItem *item)
void LocatorSettingsPage::configureFilter(QListWidgetItem *item)
{
if (!item)
item = m_ui.filterList->currentItem();
......@@ -179,7 +179,7 @@ void SettingsPage::configureFilter(QListWidgetItem *item)
updateFilterList();
}
void SettingsPage::addCustomFilter()
void LocatorSettingsPage::addCustomFilter()
{
ILocatorFilter *filter = new DirectoryFilter(
Id(Constants::CUSTOM_FILTER_BASEID).withSuffix(m_customFilters.size() + 1));
......@@ -193,7 +193,7 @@ void SettingsPage::addCustomFilter()
}
}
void SettingsPage::removeCustomFilter()
void LocatorSettingsPage::removeCustomFilter()
{
QListWidgetItem *item = m_ui.filterList->currentItem();
QTC_ASSERT(item, return);
......
......@@ -28,10 +28,10 @@
**
****************************************************************************/
#ifndef SETTINGSPAGE_H
#define SETTINGSPAGE_H
#ifndef LOCATORSETTINGSPAGE_H
#define LOCATORSETTINGSPAGE_H
#include "ui_settingspage.h"
#include "ui_locatorsettingspage.h"
#include <coreplugin/dialogs/ioptionspage.h>
......@@ -50,12 +50,12 @@ namespace Internal {
class Locator;
class SettingsPage : public IOptionsPage
class LocatorSettingsPage : public IOptionsPage
{
Q_OBJECT
public:
explicit SettingsPage(Locator *plugin);
explicit LocatorSettingsPage(Locator *plugin);
QWidget *widget();
void apply();
......@@ -87,4 +87,4 @@ private:
} // namespace Internal
} // namespace Core
#endif // SETTINGSPAGE_H
#endif // LOCATORSETTINGSPAGE_H
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment