mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-30 04:40:53 +00:00
MODIFIED: #20 Resolved some GCC build in the GUI Editor.
This commit is contained in:
parent
b25d4b628f
commit
8a486224d7
6 changed files with 12 additions and 8 deletions
|
@ -33,6 +33,7 @@ FIND_PACKAGE(Libwww REQUIRED)
|
||||||
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}
|
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
${LIBXML2_INCLUDE_DIR}
|
${LIBXML2_INCLUDE_DIR}
|
||||||
|
${LUA_INCLUDE_DIR}
|
||||||
${QT_INCLUDES})
|
${QT_INCLUDES})
|
||||||
|
|
||||||
FILE(GLOB SRC *.cpp *.h)
|
FILE(GLOB SRC *.cpp *.h)
|
||||||
|
@ -108,6 +109,7 @@ TARGET_LINK_LIBRARIES(
|
||||||
${LUABIND_LIBRARIES}
|
${LUABIND_LIBRARIES}
|
||||||
${CURL_LIBRARIES}
|
${CURL_LIBRARIES}
|
||||||
${LIBWWW_LIBRARIES}
|
${LIBWWW_LIBRARIES}
|
||||||
|
${LIBXML2_LIBRARIES}
|
||||||
)
|
)
|
||||||
|
|
||||||
NL_DEFAULT_PROPS(ovqt_plugin_gui_editor "NeL, Tools, 3D: Object Viewer Qt Plugin: GUI Editor")
|
NL_DEFAULT_PROPS(ovqt_plugin_gui_editor "NeL, Tools, 3D: Object Viewer Qt Plugin: GUI Editor")
|
||||||
|
|
|
@ -148,7 +148,8 @@ namespace GUIEditor
|
||||||
|
|
||||||
projectParser.clear();
|
projectParser.clear();
|
||||||
|
|
||||||
if( !projectParser.parseProjectFile( fileName.toStdString() ) )
|
std::string projectFileName = fileName.toStdString();
|
||||||
|
if( !projectParser.parseProjectFile( projectFileName ) )
|
||||||
{
|
{
|
||||||
QMessageBox::critical( this,
|
QMessageBox::critical( this,
|
||||||
tr( "Error parsing project file" ),
|
tr( "Error parsing project file" ),
|
||||||
|
|
|
@ -137,7 +137,8 @@ namespace GUIEditor
|
||||||
if( item->parent() == NULL )
|
if( item->parent() == NULL )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
std::string selection = makeFullName( item, item->text( 0 ).toStdString() );
|
std::string n = item->text( 0 ).toStdString();
|
||||||
|
std::string selection = makeFullName( item, n );
|
||||||
CWidgetManager::getInstance()->setCurrentEditorSelection( selection );
|
CWidgetManager::getInstance()->setCurrentEditorSelection( selection );
|
||||||
|
|
||||||
Q_EMIT selectionChanged( selection );
|
Q_EMIT selectionChanged( selection );
|
||||||
|
|
|
@ -43,7 +43,7 @@ namespace GUIEditor
|
||||||
std::vector< SPropEntry >::const_iterator itr = parentInfo.props.begin();
|
std::vector< SPropEntry >::const_iterator itr = parentInfo.props.begin();
|
||||||
while( itr != parentInfo.props.end() )
|
while( itr != parentInfo.props.end() )
|
||||||
{
|
{
|
||||||
std::vector< SPropEntry >::const_iterator fItr;
|
std::vector< SPropEntry >::iterator fItr;
|
||||||
fItr = std::find( props.begin(), props.end(), *itr );
|
fItr = std::find( props.begin(), props.end(), *itr );
|
||||||
if( fItr == props.end() )
|
if( fItr == props.end() )
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -82,7 +82,7 @@ namespace GUIEditor
|
||||||
/// Remove child by name
|
/// Remove child by name
|
||||||
bool removeChildByName( const std::string &name )
|
bool removeChildByName( const std::string &name )
|
||||||
{
|
{
|
||||||
for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr )
|
for( std::vector< CWidgetInfoTreeNode* >::iterator itr = children.begin(); itr != children.end(); ++itr )
|
||||||
{
|
{
|
||||||
if( ( *itr )->getInfo().name == name )
|
if( ( *itr )->getInfo().name == name )
|
||||||
{
|
{
|
||||||
|
@ -98,7 +98,7 @@ namespace GUIEditor
|
||||||
/// Remove child by name, but don't delete the child
|
/// Remove child by name, but don't delete the child
|
||||||
bool removeChildByNameND( const std::string &name )
|
bool removeChildByNameND( const std::string &name )
|
||||||
{
|
{
|
||||||
for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr )
|
for( std::vector< CWidgetInfoTreeNode* >::iterator itr = children.begin(); itr != children.end(); ++itr )
|
||||||
{
|
{
|
||||||
if( ( *itr )->getInfo().name == name )
|
if( ( *itr )->getInfo().name == name )
|
||||||
{
|
{
|
||||||
|
@ -113,7 +113,7 @@ namespace GUIEditor
|
||||||
/// Remove child by ancestor's name
|
/// Remove child by ancestor's name
|
||||||
bool removeChildByAncestor( const std::string &ancestor )
|
bool removeChildByAncestor( const std::string &ancestor )
|
||||||
{
|
{
|
||||||
for( std::vector< CWidgetInfoTreeNode* >::const_iterator itr = children.begin(); itr != children.end(); ++itr )
|
for( std::vector< CWidgetInfoTreeNode* >::iterator itr = children.begin(); itr != children.end(); ++itr )
|
||||||
{
|
{
|
||||||
if( ( *itr )->getInfo().ancestor == ancestor )
|
if( ( *itr )->getInfo().ancestor == ancestor )
|
||||||
{
|
{
|
||||||
|
@ -172,7 +172,7 @@ namespace GUIEditor
|
||||||
/// Removes this property from the node
|
/// Removes this property from the node
|
||||||
void removeProperty( const SPropEntry &prop )
|
void removeProperty( const SPropEntry &prop )
|
||||||
{
|
{
|
||||||
std::vector< SPropEntry >::const_iterator itr = info.props.begin();
|
std::vector< SPropEntry >::iterator itr = info.props.begin();
|
||||||
while( itr != info.props.end() )
|
while( itr != info.props.end() )
|
||||||
{
|
{
|
||||||
if( ( itr->propName == prop.propName ) &&
|
if( ( itr->propName == prop.propName ) &&
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
#include "widget_info_serializer.h"
|
#include "widget_info_serializer.h"
|
||||||
#include "new_property_widget.h"
|
#include "new_property_widget.h"
|
||||||
#include "new_widget_widget.h"
|
#include "new_widget_widget.h"
|
||||||
#include <qmessagebox>
|
#include <QMessageBox>
|
||||||
|
|
||||||
namespace GUIEditor{
|
namespace GUIEditor{
|
||||||
CWidgetProperties::CWidgetProperties( QWidget *parent ) :
|
CWidgetProperties::CWidgetProperties( QWidget *parent ) :
|
||||||
|
|
Loading…
Reference in a new issue