mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Changed: #1206 Correct works new settings dialog.
This commit is contained in:
parent
46aa4700fe
commit
fdcd2d3240
7 changed files with 12 additions and 10 deletions
|
@ -8,7 +8,7 @@ SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.
|
|||
${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h)
|
||||
|
||||
SET(OVQT_CORE_PLUGIN_HDR
|
||||
SET(OVQT_CORE_PLUGIN_HDR
|
||||
ioptions_page.h
|
||||
core_plugin.h
|
||||
core_constants.h
|
||||
|
|
|
@ -31,12 +31,9 @@ namespace Core
|
|||
@details You need to subclass this interface and put an instance of your subclass
|
||||
into the plugin manager object pool.
|
||||
*/
|
||||
class IOptionsPage : public QObject
|
||||
class IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
IOptionsPage(QObject *parent = 0) : QObject(parent) {}
|
||||
virtual ~IOptionsPage() {}
|
||||
|
||||
/// id() is a unique identifier for referencing this page
|
||||
virtual QString id() const = 0;
|
||||
|
@ -63,4 +60,6 @@ public:
|
|||
|
||||
} // namespace Core
|
||||
|
||||
Q_DECLARE_INTERFACE(Core::IOptionsPage, "dev.ryzom.com.IOptionsPage/1.0")
|
||||
|
||||
#endif // IOPTIONSPAGE_H
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Core
|
|||
{
|
||||
|
||||
CSearchPathsSettingsPage::CSearchPathsSettingsPage(QObject *parent)
|
||||
: IOptionsPage(parent),
|
||||
: QObject(parent),
|
||||
_currentPage(NULL)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -32,9 +32,10 @@ namespace Core
|
|||
/**
|
||||
@class CSearchPathsSettingsPage
|
||||
*/
|
||||
class CSearchPathsSettingsPage : public IOptionsPage
|
||||
class CSearchPathsSettingsPage : public QObject, public IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(IOptionsPage)
|
||||
public:
|
||||
CSearchPathsSettingsPage(QObject *parent = 0);
|
||||
virtual ~CSearchPathsSettingsPage() {}
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
|
||||
#include "settings_dialog.h"
|
||||
|
||||
#include "nel/misc/debug.h"
|
||||
// Qt includes
|
||||
#include <QtGui/QHeaderView>
|
||||
#include <QtGui/QPushButton>
|
||||
|
@ -64,7 +65,7 @@ CSettingsDialog::CSettingsDialog(ExtensionSystem::IPluginManager *pluginManager,
|
|||
QList<QObject *> all = _plugMan->allObjects();
|
||||
Q_FOREACH(QObject *obj, all)
|
||||
{
|
||||
IOptionsPage *page = dynamic_cast<IOptionsPage *>(obj);
|
||||
IOptionsPage *page = qobject_cast<IOptionsPage *>(obj);
|
||||
if (page)
|
||||
pages.append(page);
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace Plugin
|
|||
{
|
||||
|
||||
CExampleSettingsPage::CExampleSettingsPage(QObject *parent)
|
||||
: IOptionsPage(parent),
|
||||
: QObject(parent),
|
||||
_currentPage(NULL)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -32,9 +32,10 @@ namespace Plugin
|
|||
/**
|
||||
@class CExampleSettingsPage
|
||||
*/
|
||||
class CExampleSettingsPage : public Core::IOptionsPage
|
||||
class CExampleSettingsPage : public QObject, public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_INTERFACES(Core::IOptionsPage)
|
||||
public:
|
||||
CExampleSettingsPage(QObject *parent = 0);
|
||||
virtual ~CExampleSettingsPage() {}
|
||||
|
|
Loading…
Reference in a new issue