|
|
@ -69,16 +69,16 @@ namespace GUIEditor
|
|
|
|
|
|
|
|
|
|
|
|
QDockWidget *dock = new QDockWidget( "Widget Hierarchy", this );
|
|
|
|
QDockWidget *dock = new QDockWidget( "Widget Hierarchy", this );
|
|
|
|
dock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
|
|
|
|
dock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
|
|
|
|
WidgetHierarchy *ha = new WidgetHierarchy;
|
|
|
|
hierarchyView = new WidgetHierarchy;
|
|
|
|
dock->setWidget( ha );
|
|
|
|
dock->setWidget( hierarchyView );
|
|
|
|
addDockWidget( Qt::LeftDockWidgetArea, dock );
|
|
|
|
addDockWidget( Qt::LeftDockWidgetArea, dock );
|
|
|
|
|
|
|
|
|
|
|
|
dock = new QDockWidget( "Widget Properties", this );
|
|
|
|
dock = new QDockWidget( "Widget Properties", this );
|
|
|
|
dock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
|
|
|
|
dock->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
|
|
|
|
QtTreePropertyBrowser *tb = new QtTreePropertyBrowser;
|
|
|
|
QtTreePropertyBrowser *propBrowser = new QtTreePropertyBrowser;
|
|
|
|
browserCtrl.setBrowser( tb );
|
|
|
|
browserCtrl.setBrowser( propBrowser );
|
|
|
|
browserCtrl.setup();
|
|
|
|
browserCtrl.setup();
|
|
|
|
dock->setWidget( tb );
|
|
|
|
dock->setWidget( propBrowser );
|
|
|
|
addDockWidget( Qt::RightDockWidgetArea, dock );
|
|
|
|
addDockWidget( Qt::RightDockWidgetArea, dock );
|
|
|
|
|
|
|
|
|
|
|
|
viewPort->init();
|
|
|
|
viewPort->init();
|
|
|
@ -102,6 +102,10 @@ namespace GUIEditor
|
|
|
|
|
|
|
|
|
|
|
|
delete viewPort;
|
|
|
|
delete viewPort;
|
|
|
|
viewPort = NULL;
|
|
|
|
viewPort = NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// no deletion needed for these, since dockwidget owns them
|
|
|
|
|
|
|
|
hierarchyView = NULL;
|
|
|
|
|
|
|
|
propBrowser = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
QUndoStack *GUIEditorWindow::undoStack() const
|
|
|
|
QUndoStack *GUIEditorWindow::undoStack() const
|
|
|
@ -145,7 +149,10 @@ namespace GUIEditor
|
|
|
|
currentProject = projectFiles.projectName.c_str();
|
|
|
|
currentProject = projectFiles.projectName.c_str();
|
|
|
|
projectWindow->setupFiles( projectFiles );
|
|
|
|
projectWindow->setupFiles( projectFiles );
|
|
|
|
if( viewPort->parse( projectFiles ) )
|
|
|
|
if( viewPort->parse( projectFiles ) )
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
hierarchyView->buildHierarchy( projectFiles.masterGroup );
|
|
|
|
viewPort->draw();
|
|
|
|
viewPort->draw();
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
QMessageBox::critical( this,
|
|
|
|
QMessageBox::critical( this,
|
|
|
@ -168,7 +175,10 @@ namespace GUIEditor
|
|
|
|
tr( "There was an error while parsing the GUI XML files. See the log file for details." ) );
|
|
|
|
tr( "There was an error while parsing the GUI XML files. See the log file for details." ) );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
hierarchyView->buildHierarchy( projectFiles.masterGroup );
|
|
|
|
viewPort->draw();
|
|
|
|
viewPort->draw();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setCursor( Qt::ArrowCursor );
|
|
|
|
setCursor( Qt::ArrowCursor );
|
|
|
|
}
|
|
|
|
}
|
|
|
|