From e03a4606bf4bdf7e2520a6d3915771406c6fdf0d Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Mon, 23 Jul 2012 23:03:58 +0200 Subject: [PATCH] ADDED: #1471 ProcList window, it will list the loaded procedures. Functionality not yet implemented. --- .../src/plugins/gui_editor/CMakeLists.txt | 6 +- .../src/plugins/gui_editor/action_editor.ui | 3 + .../plugins/gui_editor/gui_editor_window.cpp | 12 +- .../plugins/gui_editor/gui_editor_window.h | 4 +- .../src/plugins/gui_editor/link_editor.ui | 3 + .../src/plugins/gui_editor/nel3d_widget.cpp | 118 +++++++++--------- .../src/plugins/gui_editor/nelgui_widget.cpp | 3 +- .../src/plugins/gui_editor/proc_editor.ui | 3 + 8 files changed, 82 insertions(+), 70 deletions(-) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt index 2810931d5..8b31cce7c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/CMakeLists.txt @@ -15,9 +15,10 @@ SET(OVQT_PLUGIN_GUI_EDITOR_HDR gui_editor_context.h widget_properties.h widget_hierarchy.h - action_editor.h link_editor.h + proc_list.h proc_editor.h + action_editor.h property_browser_ctrl.h project_window.h nel3d_widget.h @@ -28,9 +29,10 @@ SET(OVQT_PLUGIN_GUI_EDITOR_UIS gui_editor_window.ui widget_properties.ui widget_hierarchy.ui - action_editor.ui link_editor.ui + proc_list.ui proc_editor.ui + action_editor.ui project_window.ui ) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.ui index e9d0188d9..2a243c6e6 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/action_editor.ui @@ -2,6 +2,9 @@ ActionEditor + + Qt::ApplicationModal + 0 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp index d5d7b7dc8..955bfa39a 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.cpp @@ -34,7 +34,7 @@ #include "widget_properties_parser.h" #include "widget_hierarchy.h" #include "link_editor.h" -#include "proc_editor.h" +#include "proc_list.h" #include "project_file_parser.h" #include "project_window.h" #include "nelgui_widget.h" @@ -52,7 +52,7 @@ namespace GUIEditor m_undoStack = new QUndoStack(this); widgetProps = new CWidgetProperties; linkEditor = new LinkEditor; - procEditor = new ProcEditor; + procList = new ProcList; projectWindow = new ProjectWindow; connect( projectWindow, SIGNAL( projectFilesChanged() ), this, SLOT( onProjectFilesChanged() ) ); viewPort = new NelGUIWidget; @@ -94,8 +94,8 @@ namespace GUIEditor delete linkEditor; linkEditor = NULL; - delete procEditor; - procEditor = NULL; + delete procList; + procList = NULL; delete projectWindow; projectWindow = NULL; @@ -200,8 +200,8 @@ namespace GUIEditor connect( a, SIGNAL( triggered( bool ) ), linkEditor, SLOT( show() ) ); m->addAction( a ); - a = new QAction( "Proc Editor", this ); - connect( a, SIGNAL( triggered( bool ) ), procEditor, SLOT( show() ) ); + a = new QAction( "Procedure Editor", this ); + connect( a, SIGNAL( triggered( bool ) ), procList, SLOT( show() ) ); m->addAction( a ); a = new QAction( "Project Window", this ); diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h index 83a0f04ed..d7fe15245 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/gui_editor_window.h @@ -32,7 +32,7 @@ namespace GUIEditor class CWidgetProperties; class WidgetHierarchy; class LinkEditor; - class ProcEditor; + class ProcList; class ProjectWindow; class NelGUIWidget; @@ -68,7 +68,7 @@ private: WidgetHierarchy *hierarchyView; QtTreePropertyBrowser *propBrowser; LinkEditor *linkEditor; - ProcEditor *procEditor; + ProcList *procList; ProjectWindow *projectWindow; NelGUIWidget *viewPort; diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.ui index af2c24f72..e72fe972c 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/link_editor.ui @@ -2,6 +2,9 @@ LinkEditor + + Qt::ApplicationModal + 0 diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nel3d_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nel3d_widget.cpp index e344b4fad..6e792647b 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nel3d_widget.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nel3d_widget.cpp @@ -108,65 +108,65 @@ namespace GUIEditor } -#if defined ( NL_OS_WINDOWS ) - - typedef bool ( *winProc )( NL3D::IDriver *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ); - - bool Nel3DWidget::winEvent( MSG *message, long *result ) - { - if( driver != NULL ) - { - NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); - if( iDriver != NULL ) - { - winProc proc = (winProc)iDriver->getWindowProc(); - return proc( iDriver, message->hwnd, message->message, message->wParam, message->lParam ); - } - } - - return false; - } - -#elif defined( NL_OS_MAC ) - - typedef bool ( *cocoaProc )( NL3D::IDriver *, const void *e ); - - bool Nel3DWidget::macEvent( EventHandlerCallRef caller, EventRef event ) - { - if( caller ) - nlerror( "You are using QtCarbon! Only QtCocoa supported, please upgrade Qt" ); - - if( driver != NULL ) - { - NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); - if( iDriver != NULL ) - { - cocoaProc proc = ( cocoaProc )iDriver->getWindowProc(); - return proc( iDriver, event ); - } - } - - return false; - } - -#elif defined( NL_OS_UNIX ) - - typedef bool ( *x11Proc )( NL3D::IDriver *drv, XEvent *e ); - - bool Nel3DWidget::x11Event( XEvent *event ) - { - if( driver != NULL ) - { - NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); - if( driver != NULL ) - { - x11Proc proc = ( x11Proc )iDriver->getWindowProc(); - return proc( iDriver, event ); - } - } - - return false; - } +#if defined ( NL_OS_WINDOWS ) + + typedef bool ( *winProc )( NL3D::IDriver *driver, HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam ); + + bool Nel3DWidget::winEvent( MSG *message, long *result ) + { + if( driver != NULL ) + { + NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); + if( iDriver != NULL ) + { + winProc proc = (winProc)iDriver->getWindowProc(); + return proc( iDriver, message->hwnd, message->message, message->wParam, message->lParam ); + } + } + + return false; + } + +#elif defined( NL_OS_MAC ) + + typedef bool ( *cocoaProc )( NL3D::IDriver *, const void *e ); + + bool Nel3DWidget::macEvent( EventHandlerCallRef caller, EventRef event ) + { + if( caller ) + nlerror( "You are using QtCarbon! Only QtCocoa supported, please upgrade Qt" ); + + if( driver != NULL ) + { + NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); + if( iDriver != NULL ) + { + cocoaProc proc = ( cocoaProc )iDriver->getWindowProc(); + return proc( iDriver, event ); + } + } + + return false; + } + +#elif defined( NL_OS_UNIX ) + + typedef bool ( *x11Proc )( NL3D::IDriver *drv, XEvent *e ); + + bool Nel3DWidget::x11Event( XEvent *event ) + { + if( driver != NULL ) + { + NL3D::IDriver *iDriver = dynamic_cast< NL3D::CDriverUser* >( driver )->getDriver(); + if( driver != NULL ) + { + x11Proc proc = ( x11Proc )iDriver->getWindowProc(); + return proc( iDriver, event ); + } + } + + return false; + } #endif } diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp index 006c1034a..2313c20c8 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/nelgui_widget.cpp @@ -119,7 +119,8 @@ namespace GUIEditor void NelGUIWidget::paintEvent( QPaintEvent *evnt ) { - //draw(); + if( !guiLoaded ) + clear(); } void NelGUIWidget::timerEvent( QTimerEvent *evnt ) diff --git a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.ui b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.ui index f8c17af54..cb3ce69b3 100644 --- a/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.ui +++ b/code/nel/tools/3d/object_viewer_qt/src/plugins/gui_editor/proc_editor.ui @@ -2,6 +2,9 @@ ProcEditor + + Qt::ApplicationModal + 0