2009-02-25 09:15:00 +01:00
|
|
|
/**************************************************************************
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
|
|
|
** This file is part of Qt Creator
|
|
|
|
**
|
2012-01-26 18:33:46 +01:00
|
|
|
** Copyright (c) 2012 Nokia Corporation and/or its subsidiary(-ies).
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2011-11-02 15:59:12 +01:00
|
|
|
** Contact: Nokia Corporation (qt-info@nokia.com)
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
** GNU Lesser General Public License Usage
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** This file may be used under the terms of the GNU Lesser General Public
|
|
|
|
** License version 2.1 as published by the Free Software Foundation and
|
|
|
|
** appearing in the file LICENSE.LGPL included in the packaging of this file.
|
|
|
|
** Please review the following information to ensure the GNU Lesser General
|
|
|
|
** Public License version 2.1 requirements will be met:
|
|
|
|
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
2008-12-02 14:17:16 +01:00
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** In addition, as a special exception, Nokia gives you certain additional
|
2011-04-13 08:42:33 +02:00
|
|
|
** rights. These rights are described in the Nokia Qt LGPL Exception
|
2010-12-17 16:01:08 +01:00
|
|
|
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
|
|
**
|
2011-04-13 08:42:33 +02:00
|
|
|
** Other Usage
|
|
|
|
**
|
|
|
|
** Alternatively, this file may be used in accordance with the terms and
|
|
|
|
** conditions contained in a signed written agreement between you and Nokia.
|
|
|
|
**
|
2010-12-17 16:01:08 +01:00
|
|
|
** If you have questions regarding the use of this file, please contact
|
2011-11-02 15:59:12 +01:00
|
|
|
** Nokia at qt-info@nokia.com.
|
2008-12-02 12:01:29 +01:00
|
|
|
**
|
2009-02-25 09:15:00 +01:00
|
|
|
**************************************************************************/
|
2008-12-02 14:09:21 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#include "modemanager.h"
|
2008-12-09 15:25:01 +01:00
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
#include "fancytabwidget.h"
|
|
|
|
#include "fancyactionbar.h"
|
2009-01-23 13:03:36 +01:00
|
|
|
#include "icore.h"
|
2008-12-02 12:01:29 +01:00
|
|
|
#include "mainwindow.h"
|
|
|
|
|
|
|
|
#include <aggregation/aggregate.h>
|
2008-12-09 15:25:01 +01:00
|
|
|
|
2009-01-13 13:39:31 +01:00
|
|
|
#include <coreplugin/actionmanager/actionmanager.h>
|
2009-01-14 13:17:53 +01:00
|
|
|
#include <coreplugin/actionmanager/command.h>
|
2008-12-02 12:01:29 +01:00
|
|
|
#include <coreplugin/coreconstants.h>
|
|
|
|
#include <coreplugin/imode.h>
|
2011-09-05 16:10:37 +02:00
|
|
|
#include <coreplugin/id.h>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2009-01-19 12:39:20 +01:00
|
|
|
#include <extensionsystem/pluginmanager.h>
|
|
|
|
|
2008-12-09 15:25:01 +01:00
|
|
|
#include <utils/qtcassert.h>
|
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QDebug>
|
|
|
|
#include <QList>
|
|
|
|
#include <QMap>
|
|
|
|
#include <QVector>
|
2010-03-18 10:59:06 +01:00
|
|
|
|
2012-02-15 10:42:41 +01:00
|
|
|
#include <QSignalMapper>
|
|
|
|
#include <QShortcut>
|
|
|
|
#include <QAction>
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-03-18 10:59:06 +01:00
|
|
|
namespace Core {
|
|
|
|
|
2011-09-02 17:15:18 +02:00
|
|
|
/*!
|
|
|
|
\class Core::ModeManager
|
|
|
|
|
|
|
|
The mode manager handles everything related to the instances of IMode
|
|
|
|
that were added to the plugin manager's object pool as well as their
|
|
|
|
buttons and the tool bar with the round buttons in the lower left
|
|
|
|
corner of Qt Creator.
|
|
|
|
*/
|
|
|
|
|
2010-06-25 12:56:16 +02:00
|
|
|
struct ModeManagerPrivate
|
|
|
|
{
|
2010-03-18 10:59:06 +01:00
|
|
|
Internal::MainWindow *m_mainWindow;
|
|
|
|
Internal::FancyTabWidget *m_modeStack;
|
|
|
|
Internal::FancyActionBar *m_actionBar;
|
2011-01-12 14:21:12 +01:00
|
|
|
QMap<QAction*, int> m_actions;
|
2010-03-18 10:59:06 +01:00
|
|
|
QVector<IMode*> m_modes;
|
|
|
|
QVector<Command*> m_modeShortcuts;
|
|
|
|
QSignalMapper *m_signalMapper;
|
2010-06-25 12:56:16 +02:00
|
|
|
Context m_addedContexts;
|
2010-03-18 10:59:06 +01:00
|
|
|
int m_oldCurrent;
|
|
|
|
};
|
|
|
|
|
2012-01-26 01:18:02 +01:00
|
|
|
static ModeManagerPrivate *d;
|
|
|
|
static ModeManager *m_instance = 0;
|
2010-03-18 10:59:06 +01:00
|
|
|
|
2012-05-07 18:28:03 +02:00
|
|
|
static int indexOf(Id id)
|
2010-03-18 10:59:06 +01:00
|
|
|
{
|
2012-01-26 01:18:02 +01:00
|
|
|
for (int i = 0; i < d->m_modes.count(); ++i) {
|
|
|
|
if (d->m_modes.at(i)->id() == id)
|
|
|
|
return i;
|
|
|
|
}
|
2012-05-07 18:28:03 +02:00
|
|
|
qDebug() << "Warning, no such mode:" << id.toString();
|
2012-01-26 01:18:02 +01:00
|
|
|
return -1;
|
2010-03-18 10:59:06 +01:00
|
|
|
}
|
2010-02-25 14:52:04 +01:00
|
|
|
|
2010-03-18 10:59:06 +01:00
|
|
|
ModeManager::ModeManager(Internal::MainWindow *mainWindow,
|
2012-01-26 01:18:02 +01:00
|
|
|
Internal::FancyTabWidget *modeStack)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2012-01-26 01:18:02 +01:00
|
|
|
m_instance = this;
|
|
|
|
d = new ModeManagerPrivate();
|
|
|
|
d->m_mainWindow = mainWindow;
|
|
|
|
d->m_modeStack = modeStack;
|
|
|
|
d->m_signalMapper = new QSignalMapper(this);
|
|
|
|
d->m_oldCurrent = -1;
|
2010-03-18 10:59:06 +01:00
|
|
|
d->m_actionBar = new Internal::FancyActionBar(modeStack);
|
|
|
|
d->m_modeStack->addCornerWidget(d->m_actionBar);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-03-18 10:59:06 +01:00
|
|
|
connect(d->m_modeStack, SIGNAL(currentAboutToShow(int)), SLOT(currentTabAboutToChange(int)));
|
|
|
|
connect(d->m_modeStack, SIGNAL(currentChanged(int)), SLOT(currentTabChanged(int)));
|
2012-05-07 18:28:03 +02:00
|
|
|
connect(d->m_signalMapper, SIGNAL(mapped(int)), this, SLOT(slotActivateMode(int)));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ModeManager::init()
|
|
|
|
{
|
|
|
|
QObject::connect(ExtensionSystem::PluginManager::instance(), SIGNAL(objectAdded(QObject*)),
|
2012-01-26 01:18:02 +01:00
|
|
|
m_instance, SLOT(objectAdded(QObject*)));
|
2008-12-02 12:01:29 +01:00
|
|
|
QObject::connect(ExtensionSystem::PluginManager::instance(), SIGNAL(aboutToRemoveObject(QObject*)),
|
2012-01-26 01:18:02 +01:00
|
|
|
m_instance, SLOT(aboutToRemoveObject(QObject*)));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2010-03-18 10:59:06 +01:00
|
|
|
ModeManager::~ModeManager()
|
|
|
|
{
|
|
|
|
delete d;
|
2012-01-26 01:18:02 +01:00
|
|
|
d = 0;
|
|
|
|
m_instance = 0;
|
2010-03-18 10:59:06 +01:00
|
|
|
}
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
void ModeManager::addWidget(QWidget *widget)
|
|
|
|
{
|
|
|
|
// We want the actionbar to stay on the bottom
|
2010-03-18 10:59:06 +01:00
|
|
|
// so d->m_modeStack->cornerWidgetCount() -1 inserts it at the position immediately above
|
2008-12-02 12:01:29 +01:00
|
|
|
// the actionbar
|
2010-03-18 10:59:06 +01:00
|
|
|
d->m_modeStack->insertCornerWidget(d->m_modeStack->cornerWidgetCount() -1, widget);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2012-01-26 01:18:02 +01:00
|
|
|
IMode *ModeManager::currentMode()
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2010-03-18 10:59:06 +01:00
|
|
|
int currentIndex = d->m_modeStack->currentIndex();
|
2009-12-15 16:42:56 +01:00
|
|
|
if (currentIndex < 0)
|
|
|
|
return 0;
|
2010-03-18 10:59:06 +01:00
|
|
|
return d->m_modes.at(currentIndex);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2012-05-07 18:28:03 +02:00
|
|
|
IMode *ModeManager::mode(Id id)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
const int index = indexOf(id);
|
|
|
|
if (index >= 0)
|
2010-03-18 10:59:06 +01:00
|
|
|
return d->m_modes.at(index);
|
2008-12-02 12:01:29 +01:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-05-07 18:28:03 +02:00
|
|
|
void ModeManager::activateModeType(Id type)
|
2010-09-14 15:15:57 +02:00
|
|
|
{
|
2010-12-01 15:08:43 +01:00
|
|
|
if (currentMode() && currentMode()->type() == type)
|
|
|
|
return;
|
2010-09-14 15:15:57 +02:00
|
|
|
int index = -1;
|
|
|
|
for (int i = 0; i < d->m_modes.count(); ++i) {
|
|
|
|
if (d->m_modes.at(i)->type() == type) {
|
|
|
|
index = i;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (index != -1)
|
|
|
|
d->m_modeStack->setCurrentIndex(index);
|
|
|
|
}
|
|
|
|
|
2012-05-07 18:28:03 +02:00
|
|
|
void ModeManager::slotActivateMode(int id)
|
2012-01-26 01:18:02 +01:00
|
|
|
{
|
2012-05-07 18:28:03 +02:00
|
|
|
m_instance->activateMode(Id::fromUniqueIdentifier(id));
|
2012-01-26 01:18:02 +01:00
|
|
|
}
|
|
|
|
|
2012-05-07 18:28:03 +02:00
|
|
|
void ModeManager::activateMode(Id id)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
|
|
|
const int index = indexOf(id);
|
|
|
|
if (index >= 0)
|
2010-03-18 10:59:06 +01:00
|
|
|
d->m_modeStack->setCurrentIndex(index);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ModeManager::objectAdded(QObject *obj)
|
|
|
|
{
|
|
|
|
IMode *mode = Aggregation::query<IMode>(obj);
|
|
|
|
if (!mode)
|
|
|
|
return;
|
|
|
|
|
2010-03-18 10:59:06 +01:00
|
|
|
d->m_mainWindow->addContextObject(mode);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
// Count the number of modes with a higher priority
|
|
|
|
int index = 0;
|
2010-03-18 10:59:06 +01:00
|
|
|
foreach (const IMode *m, d->m_modes)
|
2008-12-02 12:01:29 +01:00
|
|
|
if (m->priority() > mode->priority())
|
|
|
|
++index;
|
|
|
|
|
2010-03-18 10:59:06 +01:00
|
|
|
d->m_modes.insert(index, mode);
|
|
|
|
d->m_modeStack->insertTab(index, mode->widget(), mode->icon(), mode->displayName());
|
|
|
|
d->m_modeStack->setTabEnabled(index, mode->isEnabled());
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
// Register mode shortcut
|
2010-03-18 10:59:06 +01:00
|
|
|
ActionManager *am = d->m_mainWindow->actionManager();
|
2012-05-07 18:28:03 +02:00
|
|
|
const Id shortcutId(QLatin1String("QtCreator.Mode.") + mode->id().toString());
|
2010-03-18 10:59:06 +01:00
|
|
|
QShortcut *shortcut = new QShortcut(d->m_mainWindow);
|
2010-05-07 16:32:58 +02:00
|
|
|
shortcut->setWhatsThis(tr("Switch to <b>%1</b> mode").arg(mode->displayName()));
|
2010-06-28 14:30:03 +02:00
|
|
|
Command *cmd = am->registerShortcut(shortcut, shortcutId, Context(Constants::C_GLOBAL));
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-03-18 10:59:06 +01:00
|
|
|
d->m_modeShortcuts.insert(index, cmd);
|
2008-12-02 12:01:29 +01:00
|
|
|
connect(cmd, SIGNAL(keySequenceChanged()), this, SLOT(updateModeToolTip()));
|
2010-03-18 10:59:06 +01:00
|
|
|
for (int i = 0; i < d->m_modeShortcuts.size(); ++i) {
|
|
|
|
Command *currentCmd = d->m_modeShortcuts.at(i);
|
2010-10-08 13:18:35 +02:00
|
|
|
// we need this hack with currentlyHasDefaultSequence
|
|
|
|
// because we call setDefaultShortcut multiple times on the same cmd
|
|
|
|
// and still expect the current shortcut to change with it
|
2009-07-23 11:02:37 +02:00
|
|
|
bool currentlyHasDefaultSequence = (currentCmd->keySequence()
|
|
|
|
== currentCmd->defaultKeySequence());
|
2012-01-25 10:25:05 +01:00
|
|
|
#ifdef Q_OS_MAC
|
2011-12-22 14:44:14 +01:00
|
|
|
currentCmd->setDefaultKeySequence(QKeySequence(QString::fromLatin1("Meta+%1").arg(i+1)));
|
2008-12-02 12:01:29 +01:00
|
|
|
#else
|
2011-12-22 14:44:14 +01:00
|
|
|
currentCmd->setDefaultKeySequence(QKeySequence(QString::fromLatin1("Ctrl+%1").arg(i+1)));
|
2008-12-02 12:01:29 +01:00
|
|
|
#endif
|
2009-07-23 11:02:37 +02:00
|
|
|
if (currentlyHasDefaultSequence)
|
|
|
|
currentCmd->setKeySequence(currentCmd->defaultKeySequence());
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2012-05-07 18:28:03 +02:00
|
|
|
d->m_signalMapper->setMapping(shortcut, mode->id().uniqueIdentifier());
|
2010-03-18 10:59:06 +01:00
|
|
|
connect(shortcut, SIGNAL(activated()), d->m_signalMapper, SLOT(map()));
|
2010-02-16 16:11:51 +01:00
|
|
|
connect(mode, SIGNAL(enabledStateChanged(bool)),
|
|
|
|
this, SLOT(enabledStateChanged()));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
void ModeManager::updateModeToolTip()
|
|
|
|
{
|
2009-01-14 13:17:53 +01:00
|
|
|
Command *cmd = qobject_cast<Command *>(sender());
|
2008-12-02 12:01:29 +01:00
|
|
|
if (cmd) {
|
2010-03-18 10:59:06 +01:00
|
|
|
int index = d->m_modeShortcuts.indexOf(cmd);
|
2008-12-02 12:01:29 +01:00
|
|
|
if (index != -1)
|
2010-03-18 10:59:06 +01:00
|
|
|
d->m_modeStack->setTabToolTip(index, cmd->stringWithAppendedShortcut(cmd->shortcut()->whatsThis()));
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-02-16 16:11:51 +01:00
|
|
|
void ModeManager::enabledStateChanged()
|
|
|
|
{
|
|
|
|
IMode *mode = qobject_cast<IMode *>(sender());
|
|
|
|
QTC_ASSERT(mode, return);
|
2010-03-18 10:59:06 +01:00
|
|
|
int index = d->m_modes.indexOf(mode);
|
2010-02-16 16:11:51 +01:00
|
|
|
QTC_ASSERT(index >= 0, return);
|
2010-03-18 10:59:06 +01:00
|
|
|
d->m_modeStack->setTabEnabled(index, mode->isEnabled());
|
2010-04-12 12:43:17 +02:00
|
|
|
|
|
|
|
// Make sure we leave any disabled mode to prevent possible crashes:
|
|
|
|
if (mode == currentMode() && !mode->isEnabled()) {
|
|
|
|
// This assumes that there is always at least one enabled mode.
|
|
|
|
for (int i = 0; i < d->m_modes.count(); ++i) {
|
|
|
|
if (d->m_modes.at(i) != mode &&
|
|
|
|
d->m_modes.at(i)->isEnabled()) {
|
|
|
|
activateMode(d->m_modes.at(i)->id());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2010-02-16 16:11:51 +01:00
|
|
|
}
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
void ModeManager::aboutToRemoveObject(QObject *obj)
|
|
|
|
{
|
|
|
|
IMode *mode = Aggregation::query<IMode>(obj);
|
|
|
|
if (!mode)
|
|
|
|
return;
|
|
|
|
|
2010-03-18 10:59:06 +01:00
|
|
|
const int index = d->m_modes.indexOf(mode);
|
|
|
|
d->m_modes.remove(index);
|
|
|
|
d->m_modeShortcuts.remove(index);
|
|
|
|
d->m_modeStack->removeTab(index);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2010-03-18 10:59:06 +01:00
|
|
|
d->m_mainWindow->removeContextObject(mode);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2011-01-12 14:21:12 +01:00
|
|
|
void ModeManager::addAction(QAction *action, int priority)
|
2008-12-02 12:01:29 +01:00
|
|
|
{
|
2011-01-12 14:21:12 +01:00
|
|
|
d->m_actions.insert(action, priority);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
// Count the number of commands with a higher priority
|
|
|
|
int index = 0;
|
2010-03-18 10:59:06 +01:00
|
|
|
foreach (int p, d->m_actions) {
|
2008-12-02 12:01:29 +01:00
|
|
|
if (p > priority)
|
|
|
|
++index;
|
2009-12-09 15:30:23 +01:00
|
|
|
}
|
2008-12-02 12:01:29 +01:00
|
|
|
|
2011-01-12 14:21:12 +01:00
|
|
|
d->m_actionBar->insertAction(index, action);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
|
2010-01-21 21:12:40 +01:00
|
|
|
void ModeManager::addProjectSelector(QAction *action)
|
|
|
|
{
|
2010-03-18 10:59:06 +01:00
|
|
|
d->m_actionBar->addProjectSelector(action);
|
2010-11-12 20:42:40 +01:00
|
|
|
d->m_actions.insert(0, INT_MAX);
|
2010-01-21 21:12:40 +01:00
|
|
|
}
|
|
|
|
|
2008-12-02 12:01:29 +01:00
|
|
|
void ModeManager::currentTabAboutToChange(int index)
|
|
|
|
{
|
|
|
|
if (index >= 0) {
|
2010-03-18 10:59:06 +01:00
|
|
|
IMode *mode = d->m_modes.at(index);
|
2008-12-02 12:01:29 +01:00
|
|
|
if (mode)
|
|
|
|
emit currentModeAboutToChange(mode);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ModeManager::currentTabChanged(int index)
|
|
|
|
{
|
|
|
|
// Tab index changes to -1 when there is no tab left.
|
|
|
|
if (index >= 0) {
|
2010-03-18 10:59:06 +01:00
|
|
|
IMode *mode = d->m_modes.at(index);
|
2008-12-02 12:01:29 +01:00
|
|
|
|
|
|
|
// FIXME: This hardcoded context update is required for the Debug and Edit modes, since
|
|
|
|
// they use the editor widget, which is already a context widget so the main window won't
|
|
|
|
// go further up the parent tree to find the mode context.
|
2012-01-24 15:36:40 +01:00
|
|
|
ICore::updateAdditionalContexts(d->m_addedContexts, mode->context());
|
2010-03-18 10:59:06 +01:00
|
|
|
d->m_addedContexts = mode->context();
|
2010-03-22 18:05:22 +01:00
|
|
|
|
2010-02-25 14:52:04 +01:00
|
|
|
IMode *oldMode = 0;
|
2010-03-18 10:59:06 +01:00
|
|
|
if (d->m_oldCurrent >= 0)
|
|
|
|
oldMode = d->m_modes.at(d->m_oldCurrent);
|
|
|
|
d->m_oldCurrent = index;
|
2010-02-25 14:52:04 +01:00
|
|
|
emit currentModeChanged(mode, oldMode);
|
2008-12-02 12:01:29 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void ModeManager::setFocusToCurrentMode()
|
|
|
|
{
|
|
|
|
IMode *mode = currentMode();
|
2008-12-09 15:25:01 +01:00
|
|
|
QTC_ASSERT(mode, return);
|
2008-12-02 12:01:29 +01:00
|
|
|
QWidget *widget = mode->widget();
|
|
|
|
if (widget) {
|
|
|
|
QWidget *focusWidget = widget->focusWidget();
|
|
|
|
if (focusWidget)
|
|
|
|
focusWidget->setFocus();
|
|
|
|
else
|
|
|
|
widget->setFocus();
|
|
|
|
}
|
|
|
|
}
|
2010-03-18 10:59:06 +01:00
|
|
|
|
2010-11-11 16:49:17 +01:00
|
|
|
void ModeManager::setModeBarHidden(bool hidden)
|
|
|
|
{
|
|
|
|
d->m_modeStack->setSelectionWidgetHidden(hidden);
|
|
|
|
}
|
|
|
|
|
2010-03-18 10:59:06 +01:00
|
|
|
ModeManager *ModeManager::instance()
|
|
|
|
{
|
2012-01-26 01:18:02 +01:00
|
|
|
return m_instance;
|
2010-03-18 10:59:06 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Core
|