parent
3ede2b845b
commit
434ce9d6a9
@ -0,0 +1,60 @@
|
|||||||
|
// Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||||
|
// 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/>.
|
||||||
|
|
||||||
|
// Project includes
|
||||||
|
#include "property_editor_widget.h"
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
#include <nel/misc/debug.h>
|
||||||
|
|
||||||
|
// STL includes
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
// Qt includes
|
||||||
|
#include <QtCore/QModelIndex>
|
||||||
|
|
||||||
|
namespace WorldEditor
|
||||||
|
{
|
||||||
|
|
||||||
|
PropertyEditorWidget::PropertyEditorWidget(QWidget *parent)
|
||||||
|
: QWidget(parent)
|
||||||
|
{
|
||||||
|
m_ui.setupUi(this);
|
||||||
|
|
||||||
|
m_variantManager = new QtVariantPropertyManager(this);
|
||||||
|
|
||||||
|
connect(m_variantManager, SIGNAL(valueChanged(QtProperty *, const QVariant &)),
|
||||||
|
this, SLOT(valueChanged(QtProperty *, const QVariant &)));
|
||||||
|
|
||||||
|
QtVariantEditorFactory *variantFactory = new QtVariantEditorFactory(this);
|
||||||
|
m_ui.treePropertyBrowser->setFactoryForManager(m_variantManager, variantFactory);
|
||||||
|
}
|
||||||
|
|
||||||
|
PropertyEditorWidget::~PropertyEditorWidget()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditorWidget::clearProperties()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void PropertyEditorWidget::setCurrentPrimitive(PrimitiveNode *node)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
} /* namespace WorldEditor */
|
@ -0,0 +1,63 @@
|
|||||||
|
// Object Viewer Qt - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||||
|
// 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 PROPERTY_EDITOR_WIDGET_H
|
||||||
|
#define PROPERTY_EDITOR_WIDGET_H
|
||||||
|
|
||||||
|
// Project includes
|
||||||
|
#include "ui_property_editor_widget.h"
|
||||||
|
#include "primitives_model.h"
|
||||||
|
#include "primitive_item.h"
|
||||||
|
|
||||||
|
|
||||||
|
// 3rdparty
|
||||||
|
#include "qtvariantproperty.h"
|
||||||
|
#include "qtpropertymanager.h"
|
||||||
|
#include "qteditorfactory.h"
|
||||||
|
|
||||||
|
// NeL includes
|
||||||
|
|
||||||
|
// Qt includes
|
||||||
|
|
||||||
|
namespace WorldEditor
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
@class PropertyEditorWidget
|
||||||
|
@brief PropertyEditorWidget
|
||||||
|
@details
|
||||||
|
*/
|
||||||
|
class PropertyEditorWidget: public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
PropertyEditorWidget(QWidget *parent = 0);
|
||||||
|
~PropertyEditorWidget();
|
||||||
|
|
||||||
|
public Q_SLOTS:
|
||||||
|
void clearProperties();
|
||||||
|
void setCurrentPrimitive(PrimitiveNode *node);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
QtVariantPropertyManager *m_variantManager;
|
||||||
|
Ui::PropertyEditorWidget m_ui;
|
||||||
|
}; /* PropertyEditorWidget */
|
||||||
|
|
||||||
|
} /* namespace WorldEditor */
|
||||||
|
|
||||||
|
#endif // PROPERTY_EDITOR_WIDGET_H
|
@ -0,0 +1,40 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>PropertyEditorWidget</class>
|
||||||
|
<widget class="QWidget" name="PropertyEditorWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>183</width>
|
||||||
|
<height>128</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<property name="margin">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>3</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QtTreePropertyBrowser" name="treePropertyBrowser" native="true"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>QtTreePropertyBrowser</class>
|
||||||
|
<extends>QWidget</extends>
|
||||||
|
<header>qttreepropertybrowser.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
|
<resources>
|
||||||
|
<include location="../core/core.qrc"/>
|
||||||
|
</resources>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
Loading…
Reference in New Issue