mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-11 17:59:02 +00:00
ADDED: #1471 ProcList window, it will list the loaded procedures. Functionality not yet implemented.
This commit is contained in:
parent
effdf45a70
commit
e03a4606bf
8 changed files with 82 additions and 70 deletions
|
@ -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
|
||||
)
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<ui version="4.0">
|
||||
<class>ActionEditor</class>
|
||||
<widget class="QWidget" name="ActionEditor">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<ui version="4.0">
|
||||
<class>LinkEditor</class>
|
||||
<widget class="QWidget" name="LinkEditor">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
|
|
@ -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
|
||||
|
||||
}
|
||||
|
|
|
@ -119,7 +119,8 @@ namespace GUIEditor
|
|||
|
||||
void NelGUIWidget::paintEvent( QPaintEvent *evnt )
|
||||
{
|
||||
//draw();
|
||||
if( !guiLoaded )
|
||||
clear();
|
||||
}
|
||||
|
||||
void NelGUIWidget::timerEvent( QTimerEvent *evnt )
|
||||
|
|
|
@ -2,6 +2,9 @@
|
|||
<ui version="4.0">
|
||||
<class>ProcEditor</class>
|
||||
<widget class="QWidget" name="ProcEditor">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::ApplicationModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
|
|
Loading…
Reference in a new issue