From 9c74caa5293dcf4eea76bb75ee216ba17bed2ef5 Mon Sep 17 00:00:00 2001 From: dnk-88 Date: Sun, 16 Jan 2011 12:00:46 +0200 Subject: [PATCH] Changed: #1206 Update example plugin. --- .../plugins/example/example_settings_page.cpp | 67 ++++++++++++++ .../plugins/example/example_settings_page.h | 58 ++++++++++++ .../plugins/example/example_settings_page.ui | 89 +++++++++++++++++++ 3 files changed, 214 insertions(+) create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.cpp create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.h create mode 100644 code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.ui diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.cpp new file mode 100644 index 000000000..0cb885163 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.cpp @@ -0,0 +1,67 @@ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// 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 . + +#include "example_settings_page.h" + +// Qt includes +#include + +// NeL includes + +// Project includes + +namespace Plugin +{ + +CExampleSettingsPage::CExampleSettingsPage(QObject *parent) + : IOptionsPage(parent), + _currentPage(NULL) +{ +} + +QString CExampleSettingsPage::id() const +{ + return QLatin1String("ExamplePage"); +} + +QString CExampleSettingsPage::trName() const +{ + return tr("Example page"); +} + +QString CExampleSettingsPage::category() const +{ + return QLatin1String("General"); +} + +QString CExampleSettingsPage::trCategory() const +{ + return tr("General"); +} + +QWidget *CExampleSettingsPage::createPage(QWidget *parent) +{ + _currentPage = new QWidget(parent); + _ui.setupUi(_currentPage); + return _currentPage; +} + +void CExampleSettingsPage::apply() +{ +} + +} /* namespace Plugin */ \ No newline at end of file diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.h new file mode 100644 index 000000000..64dd940f8 --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.h @@ -0,0 +1,58 @@ +// Object Viewer Qt - MMORPG Framework +// Copyright (C) 2010 Winch Gate Property Limited +// Copyright (C) 2011 Dzmitry Kamiahin +// +// 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 . + + +#ifndef EXAMPLE_SETTINGS_PAGE_H +#define EXAMPLE_SETTINGS_PAGE_H + +#include + +#include "../core/ioptions_page.h" + +#include "ui_example_settings_page.h" + +class QWidget; + +namespace Plugin +{ +/** +@class CExampleSettingsPage +*/ +class CExampleSettingsPage : public Core::IOptionsPage +{ + Q_OBJECT +public: + CExampleSettingsPage(QObject *parent = 0); + virtual ~CExampleSettingsPage() {} + + virtual QString id() const; + virtual QString trName() const; + virtual QString category() const; + virtual QString trCategory() const; + virtual QWidget *createPage(QWidget *parent); + + virtual void apply(); + virtual void finish() {} + +private: + QWidget *_currentPage; + Ui::CExampleSettingsPage _ui; +}; + +} // namespace Plugin + +#endif // EXAMPLE_SETTINGS_H diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.ui new file mode 100644 index 000000000..224a783fa --- /dev/null +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/example/example_settings_page.ui @@ -0,0 +1,89 @@ + + + CExampleSettingsPage + + + + 0 + 0 + 458 + 479 + + + + Form + + + + + + GroupBox + + + + + + PushButton + + + + + + + + + + PushButton + + + + + + + RadioButton + + + + + + + RadioButton + + + + + + + CheckBox + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + + + + + + + + +