Changed: #1302 Added empty property dialog.
This commit is contained in:
parent
834ef7fe2a
commit
2650b86ca8
4 changed files with 177 additions and 2 deletions
|
@ -1,7 +1,9 @@
|
|||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${LIBXML2_INCLUDE_DIR}
|
||||
${QT_INCLUDES})
|
||||
${QT_INCLUDES}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser
|
||||
)
|
||||
|
||||
FILE(GLOB SRC *.cpp *.h)
|
||||
|
||||
|
@ -16,11 +18,13 @@ SET(OVQT_PLUGIN_WORLD_EDITOR_HDR world_editor_plugin.h
|
|||
primitives_model.h
|
||||
primitives_view.h
|
||||
project_settings_dialog.h
|
||||
property_editor_widget.h
|
||||
world_editor_settings_page.h
|
||||
)
|
||||
|
||||
SET(OVQT_PLUGIN_WORLD_EDITOR_UIS world_editor_window.ui
|
||||
project_settings_dialog.ui
|
||||
property_editor_widget.ui
|
||||
world_editor_settings_page.ui
|
||||
)
|
||||
|
||||
|
@ -45,7 +49,15 @@ ADD_LIBRARY(ovqt_plugin_world_editor MODULE ${SRC}
|
|||
${OVQT_PLUGIN_WORLD_EDITOR_UI_HDRS}
|
||||
${OVQT_PLUGIN_WORLD_EDITOR_RC_SRCS})
|
||||
|
||||
TARGET_LINK_LIBRARIES(ovqt_plugin_world_editor ovqt_plugin_core ovqt_plugin_landscape_editor nelmisc nel3d ${QT_LIBRARIES} ${QT_QTOPENGL_LIBRARY})
|
||||
TARGET_LINK_LIBRARIES( ovqt_plugin_world_editor
|
||||
ovqt_plugin_core
|
||||
ovqt_plugin_landscape_editor
|
||||
nelmisc
|
||||
nel3d
|
||||
qt_property_browser
|
||||
${QT_LIBRARIES}
|
||||
${QT_QTOPENGL_LIBRARY}
|
||||
)
|
||||
|
||||
NL_DEFAULT_PROPS(ovqt_plugin_world_editor "NeL, Tools, 3D: Object Viewer Qt Plugin: World Editor")
|
||||
NL_ADD_RUNTIME_FLAGS(ovqt_plugin_world_editor)
|
||||
|
|
|
@ -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 a new issue