Same as before...
This commit is contained in:
parent
67ec1cf5be
commit
33e55d85eb
4 changed files with 152 additions and 1 deletions
|
@ -43,7 +43,6 @@ default_c
|
|||
*.so
|
||||
*.so.*
|
||||
*_debug
|
||||
core.*
|
||||
*.pc
|
||||
*.gch
|
||||
|
||||
|
|
77
code/studio/src/plugins/core/core.cpp
Normal file
77
code/studio/src/plugins/core/core.cpp
Normal file
|
@ -0,0 +1,77 @@
|
|||
// Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
// Copyright (C) 2011 Dzmitry Kamiahin <dnk-88@tut.by>
|
||||
// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "core.h"
|
||||
#include "context_manager.h"
|
||||
#include "main_window.h"
|
||||
#include "../../extension_system/iplugin_manager.h"
|
||||
|
||||
static Core::CoreImpl *m_coreInstance = 0;
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
||||
ICore *ICore::instance()
|
||||
{
|
||||
return m_coreInstance;
|
||||
}
|
||||
|
||||
CoreImpl::CoreImpl(MainWindow *mainWindow)
|
||||
{
|
||||
m_mainWindow = mainWindow;
|
||||
m_coreInstance = this;
|
||||
}
|
||||
|
||||
CoreImpl::~CoreImpl()
|
||||
{
|
||||
m_coreInstance = 0;
|
||||
}
|
||||
|
||||
bool CoreImpl::showOptionsDialog(const QString &group,
|
||||
const QString &page,
|
||||
QWidget *parent)
|
||||
{
|
||||
return m_mainWindow->showOptionsDialog(group, page, parent);
|
||||
}
|
||||
|
||||
MenuManager *CoreImpl::menuManager() const
|
||||
{
|
||||
return m_mainWindow->menuManager();
|
||||
}
|
||||
|
||||
ContextManager *CoreImpl::contextManager() const
|
||||
{
|
||||
return m_mainWindow->contextManager();
|
||||
}
|
||||
|
||||
QSettings *CoreImpl::settings() const
|
||||
{
|
||||
return m_mainWindow->settings();
|
||||
}
|
||||
|
||||
QMainWindow *CoreImpl::mainWindow() const
|
||||
{
|
||||
return m_mainWindow;
|
||||
}
|
||||
|
||||
ExtensionSystem::IPluginManager *CoreImpl::pluginManager() const
|
||||
{
|
||||
return m_mainWindow->pluginManager();
|
||||
}
|
||||
|
||||
} // namespace Core
|
54
code/studio/src/plugins/core/core.h
Normal file
54
code/studio/src/plugins/core/core.h
Normal file
|
@ -0,0 +1,54 @@
|
|||
// Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
// Copyright (C) 2011 Dzmitry Kamiahin <dnk-88@tut.by>
|
||||
// Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef CORE_H
|
||||
#define CORE_H
|
||||
|
||||
#include "icore.h"
|
||||
|
||||
namespace Core
|
||||
{
|
||||
class MainWindow;
|
||||
|
||||
class CoreImpl : public ICore
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit CoreImpl(MainWindow *mainWindow);
|
||||
virtual ~CoreImpl();
|
||||
|
||||
virtual bool showOptionsDialog(const QString &group = QString(),
|
||||
const QString &page = QString(),
|
||||
QWidget *parent = 0);
|
||||
|
||||
virtual MenuManager *menuManager() const;
|
||||
virtual ContextManager *contextManager() const;
|
||||
|
||||
virtual QSettings *settings() const;
|
||||
virtual QMainWindow *mainWindow() const;
|
||||
|
||||
virtual ExtensionSystem::IPluginManager *pluginManager() const;
|
||||
private:
|
||||
MainWindow *m_mainWindow;
|
||||
friend class MainWindow;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
#endif // CORE_H
|
21
code/studio/src/plugins/core/core.qrc
Normal file
21
code/studio/src/plugins/core/core.qrc
Normal file
|
@ -0,0 +1,21 @@
|
|||
<RCC>
|
||||
<qresource prefix="/core">
|
||||
<file>icons/ic_nel_add_item.png</file>
|
||||
<file>icons/ic_nel_redo.png</file>
|
||||
<file>icons/ic_nel_undo.png</file>
|
||||
<file>icons/ic_nel_crash.png</file>
|
||||
<file>icons/ic_nel_delete_item.png</file>
|
||||
<file>icons/ic_nel_down_item.png</file>
|
||||
<file>icons/ic_nel_generic_settings.png</file>
|
||||
<file>icons/ic_nel_open.png</file>
|
||||
<file>icons/ic_nel_new.png</file>
|
||||
<file>icons/ic_nel_save.png</file>
|
||||
<file>icons/ic_nel_save_as.png</file>
|
||||
<file>icons/ic_nel_path_settings.png</file>
|
||||
<file>icons/ic_nel_pill.png</file>
|
||||
<file>icons/ic_nel_reset_all.png</file>
|
||||
<file>icons/ic_nel_up_item.png</file>
|
||||
<file>images/nel.png</file>
|
||||
<file>images/preferences.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
Loading…
Reference in a new issue