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