Changed: #1206 Correct works new settings dialog.

hg/feature/sound
dnk-88 14 years ago
parent 46aa4700fe
commit fdcd2d3240

@ -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…
Cancel
Save