Merge
This commit is contained in:
commit
e22507ed1f
6 changed files with 21 additions and 13 deletions
|
@ -53,32 +53,31 @@ tiles_model::tiles_model(QObject *parent)
|
||||||
|
|
||||||
QVariant tiles_model::data(const QModelIndex &index, int role) const
|
QVariant tiles_model::data(const QModelIndex &index, int role) const
|
||||||
{
|
{
|
||||||
if (!index.isValid())
|
if (!index.isValid())
|
||||||
return QVariant();
|
return QVariant();
|
||||||
|
|
||||||
if (role == Qt::DecorationRole || role == Qt::UserRole)
|
if (role == Qt::DecorationRole || role == Qt::UserRole)
|
||||||
{
|
{
|
||||||
CTile_Widget wiwi;
|
CTile_Widget wiwi;
|
||||||
wiwi.initWidget(tiles.value(index.row()).getPixmap(), tiles.value(index.row()).getPixmapSide(), tiles.value(index.row()).getTileLabel());
|
wiwi.initWidget(tiles.value(index.row()).getPixmap(), tiles.value(index.row()).getPixmapSide(), tiles.value(index.row()).getTileLabel());
|
||||||
#ifdef USE_QT5
|
#ifdef USE_QT5
|
||||||
QPixmap pixpix = wiwi.grab(wiwi.contentsRect());
|
QPixmap pixpix = wiwi.grab(wiwi.contentsRect());
|
||||||
#else
|
#else
|
||||||
QPixmap::grabWidget(wiwi, wiwi.contentsRect());
|
QPixmap pixpix = QPixmap::grabWidget(&wiwi, wiwi.contentsRect());
|
||||||
#endif
|
#endif
|
||||||
return pixpix;
|
return pixpix;
|
||||||
}
|
}
|
||||||
else if (role == Qt::UserRole + 1)
|
else if (role == Qt::UserRole + 1)
|
||||||
{
|
{
|
||||||
return tiles.value(index.row()).getIndex();
|
return tiles.value(index.row()).getIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
return QVariant();
|
return QVariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
void tiles_model::sort ( int column, Qt::SortOrder order)
|
void tiles_model::sort ( int column, Qt::SortOrder order)
|
||||||
{
|
{
|
||||||
qSort(tiles.begin(), tiles.end(), caseInsensitiveLessThan);
|
qSort(tiles.begin(), tiles.end(), caseInsensitiveLessThan);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}
|
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_INCLUDES}
|
${QT_INCLUDES}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser)
|
${LIBXML2_INCLUDE_DIR}
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser)
|
||||||
|
|
||||||
FILE(GLOB SRC *.cpp *.h)
|
FILE(GLOB SRC *.cpp *.h)
|
||||||
SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h
|
SET(OVQT_EXT_SYS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h
|
${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_manager.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h
|
${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h)
|
${CMAKE_CURRENT_SOURCE_DIR}/../../extension_system/iplugin_spec.h)
|
||||||
|
|
||||||
SET(OVQT_PLUG_GEORGES_EDITOR_HDR georges_editor_plugin.h
|
SET(OVQT_PLUG_GEORGES_EDITOR_HDR georges_editor_plugin.h
|
||||||
georges_editor_form.h
|
georges_editor_form.h
|
||||||
|
@ -49,7 +50,7 @@ SOURCE_GROUP("OVQT Extension System" FILES ${OVQT_EXT_SYS_SRC})
|
||||||
|
|
||||||
ADD_LIBRARY(studio_plugin_georges_editor MODULE ${SRC} ${OVQT_PLUG_GEORGES_EDITOR_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_GEORGES_EDITOR_UI_HDRS} ${OVQT_PLUGIN_GEORGES_EDITOR_RC_SRCS})
|
ADD_LIBRARY(studio_plugin_georges_editor MODULE ${SRC} ${OVQT_PLUG_GEORGES_EDITOR_MOC_SRC} ${OVQT_EXT_SYS_SRC} ${OVQT_PLUG_GEORGES_EDITOR_UI_HDRS} ${OVQT_PLUGIN_GEORGES_EDITOR_RC_SRCS})
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES(studio_plugin_georges_editor studio_plugin_core nelmisc nelgeorges qt_property_browser ${QT_LIBRARIES})
|
TARGET_LINK_LIBRARIES(studio_plugin_georges_editor studio_plugin_core nelmisc nelgeorges qt_property_browser ${QT_LIBRARIES} ${LIBXML2_LIBRARIES})
|
||||||
|
|
||||||
NL_DEFAULT_PROPS(studio_plugin_georges_editor "Tools: Studio Plugin: Georges Editor")
|
NL_DEFAULT_PROPS(studio_plugin_georges_editor "Tools: Studio Plugin: Georges Editor")
|
||||||
NL_ADD_RUNTIME_FLAGS(studio_plugin_georges_editor)
|
NL_ADD_RUNTIME_FLAGS(studio_plugin_georges_editor)
|
||||||
|
|
|
@ -19,6 +19,9 @@
|
||||||
#include "nel/gui/interface_group.h"
|
#include "nel/gui/interface_group.h"
|
||||||
#include "nel/gui/widget_manager.h"
|
#include "nel/gui/widget_manager.h"
|
||||||
|
|
||||||
|
#include <libxml/xmlstring.h>
|
||||||
|
#include <libxml/tree.h>
|
||||||
|
|
||||||
namespace GUIEditor
|
namespace GUIEditor
|
||||||
{
|
{
|
||||||
bool WidgetSerializer::serialize( const std::string &masterGroup )
|
bool WidgetSerializer::serialize( const std::string &masterGroup )
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}
|
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${QT_INCLUDES}
|
${QT_INCLUDES}
|
||||||
|
${LIBXML2_INCLUDE_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser
|
${CMAKE_CURRENT_SOURCE_DIR}/../../3rdparty/qtpropertybrowser
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -59,6 +60,7 @@ TARGET_LINK_LIBRARIES( studio_plugin_world_editor
|
||||||
qt_property_browser
|
qt_property_browser
|
||||||
${QT_LIBRARIES}
|
${QT_LIBRARIES}
|
||||||
${QT_QTOPENGL_LIBRARY}
|
${QT_QTOPENGL_LIBRARY}
|
||||||
|
${LIBXML2_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
NL_DEFAULT_PROPS(studio_plugin_world_editor "Tools: Studio Plugin: World Editor")
|
NL_DEFAULT_PROPS(studio_plugin_world_editor "Tools: Studio Plugin: World Editor")
|
||||||
|
|
|
@ -41,6 +41,10 @@
|
||||||
#include <QGraphicsView>
|
#include <QGraphicsView>
|
||||||
#include <QPersistentModelIndex>
|
#include <QPersistentModelIndex>
|
||||||
|
|
||||||
|
// libxml
|
||||||
|
#include <libxml/xmlstring.h>
|
||||||
|
#include <libxml/tree.h>
|
||||||
|
|
||||||
namespace WorldEditor
|
namespace WorldEditor
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
|
@ -26,8 +26,7 @@
|
||||||
#include <nel/ligo/primitive_utils.h>
|
#include <nel/ligo/primitive_utils.h>
|
||||||
#include <nel/ligo/ligo_config.h>
|
#include <nel/ligo/ligo_config.h>
|
||||||
|
|
||||||
|
#include <libxml/tree.h>
|
||||||
// Qt includes
|
|
||||||
|
|
||||||
namespace WorldEditor
|
namespace WorldEditor
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue