Changed: #1193 missing files for log plugin
This commit is contained in:
parent
7f7275ae6a
commit
903597d102
3 changed files with 233 additions and 0 deletions
|
@ -0,0 +1,80 @@
|
|||
// Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
// Copyright (C) 2011 Dzmitry Kamiahin <dnk-88@tut.by>
|
||||
//
|
||||
// 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "log_settings_page.h"
|
||||
|
||||
// Qt includes
|
||||
#include <QtGui/QWidget>
|
||||
|
||||
// NeL includes
|
||||
|
||||
// Project includes
|
||||
namespace ExtensionSystem
|
||||
{
|
||||
class IPluginManager;
|
||||
}
|
||||
|
||||
namespace Plugin
|
||||
{
|
||||
|
||||
CLogSettingsPage::CLogSettingsPage(QObject *parent)
|
||||
: IOptionsPage(parent),
|
||||
_currentPage(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
QString CLogSettingsPage::id() const
|
||||
{
|
||||
return QLatin1String("Log");
|
||||
}
|
||||
|
||||
QString CLogSettingsPage::trName() const
|
||||
{
|
||||
return tr("Log");
|
||||
}
|
||||
|
||||
QString CLogSettingsPage::category() const
|
||||
{
|
||||
return QLatin1String("General");
|
||||
}
|
||||
|
||||
QString CLogSettingsPage::trCategory() const
|
||||
{
|
||||
return tr("General");
|
||||
}
|
||||
|
||||
QWidget *CLogSettingsPage::createPage(QWidget *parent)
|
||||
{
|
||||
_currentPage = new QWidget(parent);
|
||||
_ui.setupUi(_currentPage);
|
||||
return _currentPage;
|
||||
}
|
||||
|
||||
void CLogSettingsPage::apply()
|
||||
{
|
||||
//ExtensionSystem::IPluginSpec *spec, _plugMan->plugins()
|
||||
//ExtensionSystem::IPluginManager;
|
||||
//if (_ui.errorCheck->isChecked()) {
|
||||
//displayer();
|
||||
//}
|
||||
//if (_ui.warningCheck->isChecked());
|
||||
//if (_ui.debugCheck->isChecked());
|
||||
//if (_ui.assertCheck->isChecked());
|
||||
//if (_ui.infoCheck->isChecked());
|
||||
}
|
||||
|
||||
} /* namespace Plugin */
|
|
@ -0,0 +1,58 @@
|
|||
// Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
// Copyright (C) 2011 Dzmitry Kamiahin <dnk-88@tut.by>
|
||||
//
|
||||
// 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#ifndef LOG_SETTINGS_PAGE_H
|
||||
#define LOG_SETTINGS_PAGE_H
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#include "../core/ioptions_page.h"
|
||||
|
||||
#include "ui_log_settings_page.h"
|
||||
|
||||
class QWidget;
|
||||
|
||||
namespace Plugin
|
||||
{
|
||||
/**
|
||||
@class CLogSettingsPage
|
||||
*/
|
||||
class CLogSettingsPage : public Core::IOptionsPage
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CLogSettingsPage(QObject *parent = 0);
|
||||
virtual ~CLogSettingsPage() {}
|
||||
|
||||
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::CLogSettingsPage _ui;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
#endif // LOG_SETTINGS_PAGE_H
|
|
@ -0,0 +1,95 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CLogSettingsPage</class>
|
||||
<widget class="QWidget" name="CLogSettingsPage">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>256</width>
|
||||
<height>207</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QGroupBox" name="displayerBox">
|
||||
<property name="title">
|
||||
<string>NeL Displayers</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_6">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="errorCheck">
|
||||
<property name="text">
|
||||
<string>Error Log</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="warningCheck">
|
||||
<property name="text">
|
||||
<string>Warning Log</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QCheckBox" name="debugCheck">
|
||||
<property name="text">
|
||||
<string>Debug Log</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QCheckBox" name="assertCheck">
|
||||
<property name="text">
|
||||
<string>Assert Log</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QCheckBox" name="infoCheck">
|
||||
<property name="text">
|
||||
<string>Info Log</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../object_viewer_qt.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in a new issue