Changed: #1206 Correct works new settings dialog.

This commit is contained in:
dnk-88 2011-01-16 14:28:22 +02:00
parent 7d723acbf2
commit 7a441a4584
7 changed files with 12 additions and 10 deletions

View file

@ -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

View file

@ -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

View file

@ -28,7 +28,7 @@ namespace Core
{
CSearchPathsSettingsPage::CSearchPathsSettingsPage(QObject *parent)
: IOptionsPage(parent),
: QObject(parent),
_currentPage(NULL)
{
}

View file

@ -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() {}

View file

@ -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);
}

View file

@ -28,7 +28,7 @@ namespace Plugin
{
CExampleSettingsPage::CExampleSettingsPage(QObject *parent)
: IOptionsPage(parent),
: QObject(parent),
_currentPage(NULL)
{
}

View file

@ -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() {}