From 9097149ceea07d96716ca9d3ddbb32ec1b933a61 Mon Sep 17 00:00:00 2001 From: con <qtc-committer@nokia.com> Date: Wed, 9 Dec 2009 11:05:18 +0100 Subject: [PATCH] ViewManager --> StatusBarManager --- src/plugins/coreplugin/coreplugin.pro | 4 ++-- src/plugins/coreplugin/mainwindow.cpp | 18 +++++++++--------- src/plugins/coreplugin/mainwindow.h | 5 ++--- .../{viewmanager.cpp => statusbarmanager.cpp} | 14 +++++++------- .../{viewmanager.h => statusbarmanager.h} | 12 ++++++------ 5 files changed, 26 insertions(+), 27 deletions(-) rename src/plugins/coreplugin/{viewmanager.cpp => statusbarmanager.cpp} (90%) rename src/plugins/coreplugin/{viewmanager.h => statusbarmanager.h} (90%) diff --git a/src/plugins/coreplugin/coreplugin.pro b/src/plugins/coreplugin/coreplugin.pro index 2ad662a1f19..78f57d79abf 100644 --- a/src/plugins/coreplugin/coreplugin.pro +++ b/src/plugins/coreplugin/coreplugin.pro @@ -32,7 +32,7 @@ SOURCES += mainwindow.cpp \ messageoutputwindow.cpp \ outputpane.cpp \ vcsmanager.cpp \ - viewmanager.cpp \ + statusbarmanager.cpp \ versiondialog.cpp \ editormanager/editormanager.cpp \ editormanager/editorview.cpp \ @@ -92,7 +92,7 @@ HEADERS += mainwindow.h \ messageoutputwindow.h \ outputpane.h \ vcsmanager.h \ - viewmanager.h \ + statusbarmanager.h \ editormanager/editormanager.h \ editormanager/editorview.h \ editormanager/openeditorsmodel.h \ diff --git a/src/plugins/coreplugin/mainwindow.cpp b/src/plugins/coreplugin/mainwindow.cpp index 85db4f271d5..7e66fc1b690 100644 --- a/src/plugins/coreplugin/mainwindow.cpp +++ b/src/plugins/coreplugin/mainwindow.cpp @@ -53,7 +53,7 @@ #include "settingsdialog.h" #include "variablemanager.h" #include "versiondialog.h" -#include "viewmanager.h" +#include "statusbarmanager.h" #include "uniqueidmanager.h" #include "manhattanstyle.h" #include "dialogs/iwizard.h" @@ -127,7 +127,7 @@ MainWindow::MainWindow() : m_scriptManager(new ScriptManagerPrivate(this)), m_variableManager(new VariableManager(this)), m_vcsManager(new VCSManager), - m_viewManager(0), + m_statusBarManager(0), m_modeManager(0), m_mimeDatabase(new MimeDatabase), m_navigationWidget(0), @@ -190,7 +190,7 @@ MainWindow::MainWindow() : m_modeStack = new FancyTabWidget(this); m_modeManager = new ModeManager(this, m_modeStack); m_modeManager->addWidget(m_progressManager->progressView()); - m_viewManager = new ViewManager(this); + m_statusBarManager = new StatusBarManager(this); m_messageManager = new MessageManager; m_editorManager = new EditorManager(m_coreImpl, this); m_editorManager->hide(); @@ -256,7 +256,7 @@ MainWindow::~MainWindow() pm->removeObject(m_outputMode); delete m_outputMode; m_outputMode = 0; - //we need to delete editormanager and viewmanager explicitly before the end of the destructor, + //we need to delete editormanager and statusbarmanager explicitly before the end of the destructor, //because they might trigger stuff that tries to access data from editorwindow, like removeContextWidget // All modes are now gone @@ -268,8 +268,8 @@ MainWindow::~MainWindow() delete m_editorManager; m_editorManager = 0; - delete m_viewManager; - m_viewManager = 0; + delete m_statusBarManager; + m_statusBarManager = 0; delete m_progressManager; m_progressManager = 0; pm->removeObject(m_coreImpl); @@ -294,7 +294,7 @@ bool MainWindow::init(QString *errorMessage) ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); pm->addObject(m_coreImpl); - m_viewManager->init(); + m_statusBarManager->init(); m_modeManager->init(); m_progressManager->init(); QWidget *outputModeWidget = new QWidget; @@ -322,7 +322,7 @@ bool MainWindow::init(QString *errorMessage) pm->addObject(m_shortcutSettings); // Add widget to the bottom, we create the view here instead of inside the - // OutputPaneManager, since the ViewManager needs to be initilized before + // OutputPaneManager, since the StatusBarManager needs to be initilized before m_outputView = new Core::StatusBarWidget; m_outputView->setWidget(OutputPaneManager::instance()->buttonsWidget()); m_outputView->setPosition(Core::StatusBarWidget::Second); @@ -344,7 +344,7 @@ void MainWindow::extensionsInitialized() { m_editorManager->init(); - m_viewManager->extensionsInitalized(); + m_statusBarManager->extensionsInitalized(); m_messageManager->init(); OutputPaneManager::instance()->init(); diff --git a/src/plugins/coreplugin/mainwindow.h b/src/plugins/coreplugin/mainwindow.h index b0b1e3854aa..98493638e8c 100644 --- a/src/plugins/coreplugin/mainwindow.h +++ b/src/plugins/coreplugin/mainwindow.h @@ -63,7 +63,6 @@ class SettingsDatabase; class UniqueIDManager; class VariableManager; class VCSManager; -class ViewManagerInterface; class IMode; namespace Internal { @@ -75,7 +74,7 @@ class GeneralSettings; class NavigationWidget; class ProgressManagerPrivate; class ShortcutSettings; -class ViewManager; +class StatusBarManager; class VersionDialog; class CORE_EXPORT MainWindow : public EventFilteringMainWindow @@ -189,7 +188,7 @@ private: ScriptManager *m_scriptManager; VariableManager *m_variableManager; VCSManager *m_vcsManager; - ViewManager *m_viewManager; + StatusBarManager *m_statusBarManager; ModeManager *m_modeManager; MimeDatabase *m_mimeDatabase; FancyTabWidget *m_modeStack; diff --git a/src/plugins/coreplugin/viewmanager.cpp b/src/plugins/coreplugin/statusbarmanager.cpp similarity index 90% rename from src/plugins/coreplugin/viewmanager.cpp rename to src/plugins/coreplugin/statusbarmanager.cpp index bf253e44054..687fcca2b95 100644 --- a/src/plugins/coreplugin/viewmanager.cpp +++ b/src/plugins/coreplugin/statusbarmanager.cpp @@ -27,7 +27,7 @@ ** **************************************************************************/ -#include "viewmanager.h" +#include "statusbarmanager.h" #include "coreconstants.h" #include "mainwindow.h" @@ -47,7 +47,7 @@ using namespace Core; using namespace Core::Internal; -ViewManager::ViewManager(MainWindow *mainWnd) +StatusBarManager::StatusBarManager(MainWindow *mainWnd) : QObject(mainWnd), m_mainWnd(mainWnd) { @@ -63,11 +63,11 @@ ViewManager::ViewManager(MainWindow *mainWnd) new QLabel(), 1); } -ViewManager::~ViewManager() +StatusBarManager::~StatusBarManager() { } -void ViewManager::init() +void StatusBarManager::init() { connect(ExtensionSystem::PluginManager::instance(), SIGNAL(objectAdded(QObject*)), this, SLOT(objectAdded(QObject*))); @@ -75,7 +75,7 @@ void ViewManager::init() this, SLOT(aboutToRemoveObject(QObject*))); } -void ViewManager::objectAdded(QObject *obj) +void StatusBarManager::objectAdded(QObject *obj) { StatusBarWidget *view = Aggregation::query<StatusBarWidget>(obj); if (!view) @@ -88,7 +88,7 @@ void ViewManager::objectAdded(QObject *obj) m_mainWnd->addContextObject(view); } -void ViewManager::aboutToRemoveObject(QObject *obj) +void StatusBarManager::aboutToRemoveObject(QObject *obj) { StatusBarWidget *view = Aggregation::query<StatusBarWidget>(obj); if (!view) @@ -96,6 +96,6 @@ void ViewManager::aboutToRemoveObject(QObject *obj) m_mainWnd->removeContextObject(view); } -void ViewManager::extensionsInitalized() +void StatusBarManager::extensionsInitalized() { } diff --git a/src/plugins/coreplugin/viewmanager.h b/src/plugins/coreplugin/statusbarmanager.h similarity index 90% rename from src/plugins/coreplugin/viewmanager.h rename to src/plugins/coreplugin/statusbarmanager.h index f78f9ecfeb8..879594daf78 100644 --- a/src/plugins/coreplugin/viewmanager.h +++ b/src/plugins/coreplugin/statusbarmanager.h @@ -27,8 +27,8 @@ ** **************************************************************************/ -#ifndef VIEWMANAGER_H -#define VIEWMANAGER_H +#ifndef STATUSBARMANAGER_H +#define STATUSBARMANAGER_H #include <QtCore/QMap> #include <QtGui/QWidget> @@ -50,13 +50,13 @@ namespace Internal { class MainWindow; class NavigationWidget; -class ViewManager : public QObject +class StatusBarManager : public QObject { Q_OBJECT public: - ViewManager(MainWindow *mainWnd); - ~ViewManager(); + StatusBarManager(MainWindow *mainWnd); + ~StatusBarManager(); void init(); void extensionsInitalized(); @@ -73,4 +73,4 @@ private: } // namespace Internal } // namespace Core -#endif // VIEWMANAGER_H +#endif // STATUSBARMANAGER_H -- GitLab