forked from qt-creator/qt-creator
ViewManager --> StatusBarManager
This commit is contained in:
@@ -32,7 +32,7 @@ SOURCES += mainwindow.cpp \
|
|||||||
messageoutputwindow.cpp \
|
messageoutputwindow.cpp \
|
||||||
outputpane.cpp \
|
outputpane.cpp \
|
||||||
vcsmanager.cpp \
|
vcsmanager.cpp \
|
||||||
viewmanager.cpp \
|
statusbarmanager.cpp \
|
||||||
versiondialog.cpp \
|
versiondialog.cpp \
|
||||||
editormanager/editormanager.cpp \
|
editormanager/editormanager.cpp \
|
||||||
editormanager/editorview.cpp \
|
editormanager/editorview.cpp \
|
||||||
@@ -92,7 +92,7 @@ HEADERS += mainwindow.h \
|
|||||||
messageoutputwindow.h \
|
messageoutputwindow.h \
|
||||||
outputpane.h \
|
outputpane.h \
|
||||||
vcsmanager.h \
|
vcsmanager.h \
|
||||||
viewmanager.h \
|
statusbarmanager.h \
|
||||||
editormanager/editormanager.h \
|
editormanager/editormanager.h \
|
||||||
editormanager/editorview.h \
|
editormanager/editorview.h \
|
||||||
editormanager/openeditorsmodel.h \
|
editormanager/openeditorsmodel.h \
|
||||||
|
@@ -53,7 +53,7 @@
|
|||||||
#include "settingsdialog.h"
|
#include "settingsdialog.h"
|
||||||
#include "variablemanager.h"
|
#include "variablemanager.h"
|
||||||
#include "versiondialog.h"
|
#include "versiondialog.h"
|
||||||
#include "viewmanager.h"
|
#include "statusbarmanager.h"
|
||||||
#include "uniqueidmanager.h"
|
#include "uniqueidmanager.h"
|
||||||
#include "manhattanstyle.h"
|
#include "manhattanstyle.h"
|
||||||
#include "dialogs/iwizard.h"
|
#include "dialogs/iwizard.h"
|
||||||
@@ -127,7 +127,7 @@ MainWindow::MainWindow() :
|
|||||||
m_scriptManager(new ScriptManagerPrivate(this)),
|
m_scriptManager(new ScriptManagerPrivate(this)),
|
||||||
m_variableManager(new VariableManager(this)),
|
m_variableManager(new VariableManager(this)),
|
||||||
m_vcsManager(new VCSManager),
|
m_vcsManager(new VCSManager),
|
||||||
m_viewManager(0),
|
m_statusBarManager(0),
|
||||||
m_modeManager(0),
|
m_modeManager(0),
|
||||||
m_mimeDatabase(new MimeDatabase),
|
m_mimeDatabase(new MimeDatabase),
|
||||||
m_navigationWidget(0),
|
m_navigationWidget(0),
|
||||||
@@ -190,7 +190,7 @@ MainWindow::MainWindow() :
|
|||||||
m_modeStack = new FancyTabWidget(this);
|
m_modeStack = new FancyTabWidget(this);
|
||||||
m_modeManager = new ModeManager(this, m_modeStack);
|
m_modeManager = new ModeManager(this, m_modeStack);
|
||||||
m_modeManager->addWidget(m_progressManager->progressView());
|
m_modeManager->addWidget(m_progressManager->progressView());
|
||||||
m_viewManager = new ViewManager(this);
|
m_statusBarManager = new StatusBarManager(this);
|
||||||
m_messageManager = new MessageManager;
|
m_messageManager = new MessageManager;
|
||||||
m_editorManager = new EditorManager(m_coreImpl, this);
|
m_editorManager = new EditorManager(m_coreImpl, this);
|
||||||
m_editorManager->hide();
|
m_editorManager->hide();
|
||||||
@@ -256,7 +256,7 @@ MainWindow::~MainWindow()
|
|||||||
pm->removeObject(m_outputMode);
|
pm->removeObject(m_outputMode);
|
||||||
delete m_outputMode;
|
delete m_outputMode;
|
||||||
m_outputMode = 0;
|
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
|
//because they might trigger stuff that tries to access data from editorwindow, like removeContextWidget
|
||||||
|
|
||||||
// All modes are now gone
|
// All modes are now gone
|
||||||
@@ -268,8 +268,8 @@ MainWindow::~MainWindow()
|
|||||||
|
|
||||||
delete m_editorManager;
|
delete m_editorManager;
|
||||||
m_editorManager = 0;
|
m_editorManager = 0;
|
||||||
delete m_viewManager;
|
delete m_statusBarManager;
|
||||||
m_viewManager = 0;
|
m_statusBarManager = 0;
|
||||||
delete m_progressManager;
|
delete m_progressManager;
|
||||||
m_progressManager = 0;
|
m_progressManager = 0;
|
||||||
pm->removeObject(m_coreImpl);
|
pm->removeObject(m_coreImpl);
|
||||||
@@ -294,7 +294,7 @@ bool MainWindow::init(QString *errorMessage)
|
|||||||
|
|
||||||
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance();
|
||||||
pm->addObject(m_coreImpl);
|
pm->addObject(m_coreImpl);
|
||||||
m_viewManager->init();
|
m_statusBarManager->init();
|
||||||
m_modeManager->init();
|
m_modeManager->init();
|
||||||
m_progressManager->init();
|
m_progressManager->init();
|
||||||
QWidget *outputModeWidget = new QWidget;
|
QWidget *outputModeWidget = new QWidget;
|
||||||
@@ -322,7 +322,7 @@ bool MainWindow::init(QString *errorMessage)
|
|||||||
pm->addObject(m_shortcutSettings);
|
pm->addObject(m_shortcutSettings);
|
||||||
|
|
||||||
// Add widget to the bottom, we create the view here instead of inside the
|
// 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 = new Core::StatusBarWidget;
|
||||||
m_outputView->setWidget(OutputPaneManager::instance()->buttonsWidget());
|
m_outputView->setWidget(OutputPaneManager::instance()->buttonsWidget());
|
||||||
m_outputView->setPosition(Core::StatusBarWidget::Second);
|
m_outputView->setPosition(Core::StatusBarWidget::Second);
|
||||||
@@ -344,7 +344,7 @@ void MainWindow::extensionsInitialized()
|
|||||||
{
|
{
|
||||||
m_editorManager->init();
|
m_editorManager->init();
|
||||||
|
|
||||||
m_viewManager->extensionsInitalized();
|
m_statusBarManager->extensionsInitalized();
|
||||||
|
|
||||||
m_messageManager->init();
|
m_messageManager->init();
|
||||||
OutputPaneManager::instance()->init();
|
OutputPaneManager::instance()->init();
|
||||||
|
@@ -63,7 +63,6 @@ class SettingsDatabase;
|
|||||||
class UniqueIDManager;
|
class UniqueIDManager;
|
||||||
class VariableManager;
|
class VariableManager;
|
||||||
class VCSManager;
|
class VCSManager;
|
||||||
class ViewManagerInterface;
|
|
||||||
class IMode;
|
class IMode;
|
||||||
|
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
@@ -75,7 +74,7 @@ class GeneralSettings;
|
|||||||
class NavigationWidget;
|
class NavigationWidget;
|
||||||
class ProgressManagerPrivate;
|
class ProgressManagerPrivate;
|
||||||
class ShortcutSettings;
|
class ShortcutSettings;
|
||||||
class ViewManager;
|
class StatusBarManager;
|
||||||
class VersionDialog;
|
class VersionDialog;
|
||||||
|
|
||||||
class CORE_EXPORT MainWindow : public EventFilteringMainWindow
|
class CORE_EXPORT MainWindow : public EventFilteringMainWindow
|
||||||
@@ -189,7 +188,7 @@ private:
|
|||||||
ScriptManager *m_scriptManager;
|
ScriptManager *m_scriptManager;
|
||||||
VariableManager *m_variableManager;
|
VariableManager *m_variableManager;
|
||||||
VCSManager *m_vcsManager;
|
VCSManager *m_vcsManager;
|
||||||
ViewManager *m_viewManager;
|
StatusBarManager *m_statusBarManager;
|
||||||
ModeManager *m_modeManager;
|
ModeManager *m_modeManager;
|
||||||
MimeDatabase *m_mimeDatabase;
|
MimeDatabase *m_mimeDatabase;
|
||||||
FancyTabWidget *m_modeStack;
|
FancyTabWidget *m_modeStack;
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#include "viewmanager.h"
|
#include "statusbarmanager.h"
|
||||||
|
|
||||||
#include "coreconstants.h"
|
#include "coreconstants.h"
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
using namespace Core;
|
using namespace Core;
|
||||||
using namespace Core::Internal;
|
using namespace Core::Internal;
|
||||||
|
|
||||||
ViewManager::ViewManager(MainWindow *mainWnd)
|
StatusBarManager::StatusBarManager(MainWindow *mainWnd)
|
||||||
: QObject(mainWnd),
|
: QObject(mainWnd),
|
||||||
m_mainWnd(mainWnd)
|
m_mainWnd(mainWnd)
|
||||||
{
|
{
|
||||||
@@ -63,11 +63,11 @@ ViewManager::ViewManager(MainWindow *mainWnd)
|
|||||||
new QLabel(), 1);
|
new QLabel(), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewManager::~ViewManager()
|
StatusBarManager::~StatusBarManager()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewManager::init()
|
void StatusBarManager::init()
|
||||||
{
|
{
|
||||||
connect(ExtensionSystem::PluginManager::instance(), SIGNAL(objectAdded(QObject*)),
|
connect(ExtensionSystem::PluginManager::instance(), SIGNAL(objectAdded(QObject*)),
|
||||||
this, SLOT(objectAdded(QObject*)));
|
this, SLOT(objectAdded(QObject*)));
|
||||||
@@ -75,7 +75,7 @@ void ViewManager::init()
|
|||||||
this, SLOT(aboutToRemoveObject(QObject*)));
|
this, SLOT(aboutToRemoveObject(QObject*)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewManager::objectAdded(QObject *obj)
|
void StatusBarManager::objectAdded(QObject *obj)
|
||||||
{
|
{
|
||||||
StatusBarWidget *view = Aggregation::query<StatusBarWidget>(obj);
|
StatusBarWidget *view = Aggregation::query<StatusBarWidget>(obj);
|
||||||
if (!view)
|
if (!view)
|
||||||
@@ -88,7 +88,7 @@ void ViewManager::objectAdded(QObject *obj)
|
|||||||
m_mainWnd->addContextObject(view);
|
m_mainWnd->addContextObject(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewManager::aboutToRemoveObject(QObject *obj)
|
void StatusBarManager::aboutToRemoveObject(QObject *obj)
|
||||||
{
|
{
|
||||||
StatusBarWidget *view = Aggregation::query<StatusBarWidget>(obj);
|
StatusBarWidget *view = Aggregation::query<StatusBarWidget>(obj);
|
||||||
if (!view)
|
if (!view)
|
||||||
@@ -96,6 +96,6 @@ void ViewManager::aboutToRemoveObject(QObject *obj)
|
|||||||
m_mainWnd->removeContextObject(view);
|
m_mainWnd->removeContextObject(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ViewManager::extensionsInitalized()
|
void StatusBarManager::extensionsInitalized()
|
||||||
{
|
{
|
||||||
}
|
}
|
@@ -27,8 +27,8 @@
|
|||||||
**
|
**
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
#ifndef VIEWMANAGER_H
|
#ifndef STATUSBARMANAGER_H
|
||||||
#define VIEWMANAGER_H
|
#define STATUSBARMANAGER_H
|
||||||
|
|
||||||
#include <QtCore/QMap>
|
#include <QtCore/QMap>
|
||||||
#include <QtGui/QWidget>
|
#include <QtGui/QWidget>
|
||||||
@@ -50,13 +50,13 @@ namespace Internal {
|
|||||||
class MainWindow;
|
class MainWindow;
|
||||||
class NavigationWidget;
|
class NavigationWidget;
|
||||||
|
|
||||||
class ViewManager : public QObject
|
class StatusBarManager : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ViewManager(MainWindow *mainWnd);
|
StatusBarManager(MainWindow *mainWnd);
|
||||||
~ViewManager();
|
~StatusBarManager();
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
void extensionsInitalized();
|
void extensionsInitalized();
|
||||||
@@ -73,4 +73,4 @@ private:
|
|||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Core
|
} // namespace Core
|
||||||
|
|
||||||
#endif // VIEWMANAGER_H
|
#endif // STATUSBARMANAGER_H
|
Reference in New Issue
Block a user