|
|
@ -79,8 +79,6 @@ namespace NLQT
|
|
|
|
|
|
|
|
|
|
|
|
// create NeL viewport dock widget
|
|
|
|
// create NeL viewport dock widget
|
|
|
|
_ObjectViewerDialog = new CObjectViewerDialog(this);
|
|
|
|
_ObjectViewerDialog = new CObjectViewerDialog(this);
|
|
|
|
//_ObjectViewerDialog->setAllowedAreas(Qt::LeftDockWidgetArea );
|
|
|
|
|
|
|
|
//_ObjectViewerDialog->hide();
|
|
|
|
|
|
|
|
addDockWidget(Qt::LeftDockWidgetArea, _ObjectViewerDialog);
|
|
|
|
addDockWidget(Qt::LeftDockWidgetArea, _ObjectViewerDialog);
|
|
|
|
|
|
|
|
|
|
|
|
createActions();
|
|
|
|
createActions();
|
|
|
@ -95,11 +93,6 @@ namespace NLQT
|
|
|
|
restoreGeometry(settings.value("QtWindowGeometry").toByteArray());
|
|
|
|
restoreGeometry(settings.value("QtWindowGeometry").toByteArray());
|
|
|
|
settings.endGroup();
|
|
|
|
settings.endGroup();
|
|
|
|
|
|
|
|
|
|
|
|
// setup Qt style and palette from config file
|
|
|
|
|
|
|
|
//_originalPalette = QApplication::palette();
|
|
|
|
|
|
|
|
//Modules::config().setAndCallback("QtStyle", CConfigCallback(this, &CMainWindow::cfcbQtStyle));
|
|
|
|
|
|
|
|
//Modules::config().setAndCallback("QtPalette", CConfigCallback(this, &CMainWindow::cfcbQtPalette));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
setWindowIcon(QIcon(":/images/khead.png"));
|
|
|
|
setWindowIcon(QIcon(":/images/khead.png"));
|
|
|
|
|
|
|
|
|
|
|
|
_statusBarTimer = new QTimer(this);
|
|
|
|
_statusBarTimer = new QTimer(this);
|
|
|
@ -119,9 +112,6 @@ namespace NLQT
|
|
|
|
settings.setValue("QtWindowGeometry", saveGeometry());
|
|
|
|
settings.setValue("QtWindowGeometry", saveGeometry());
|
|
|
|
settings.endGroup();
|
|
|
|
settings.endGroup();
|
|
|
|
|
|
|
|
|
|
|
|
//Modules::config().dropCallback("QtPalette");
|
|
|
|
|
|
|
|
//Modules::config().dropCallback("QtStyle");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_statusBarTimer->stop();
|
|
|
|
_statusBarTimer->stop();
|
|
|
|
|
|
|
|
|
|
|
|
delete _ObjectViewerDialog;
|
|
|
|
delete _ObjectViewerDialog;
|
|
|
@ -151,11 +141,11 @@ namespace NLQT
|
|
|
|
if (_treeViewList.isEmpty())
|
|
|
|
if (_treeViewList.isEmpty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_emptyView->deleteLater();
|
|
|
|
_emptyView->deleteLater();
|
|
|
|
addDockWidget(Qt::TopDockWidgetArea, newView);
|
|
|
|
tabifyDockWidget(_emptyView, newView);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tabifyDockWidget(_treeViewList.first(),newView);
|
|
|
|
tabifyDockWidget(_currentView,newView);
|
|
|
|
QTabBar* tb = Modules::mainWin().getTabBar();
|
|
|
|
QTabBar* tb = Modules::mainWin().getTabBar();
|
|
|
|
if (tb)
|
|
|
|
if (tb)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -175,6 +165,7 @@ namespace NLQT
|
|
|
|
connect(newView, SIGNAL(modified(bool)),
|
|
|
|
connect(newView, SIGNAL(modified(bool)),
|
|
|
|
_saveAction, SLOT(setEnabled(bool)));
|
|
|
|
_saveAction, SLOT(setEnabled(bool)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
QApplication::processEvents();
|
|
|
|
newView->raise();
|
|
|
|
newView->raise();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -251,11 +242,17 @@ namespace NLQT
|
|
|
|
{
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CMainWindow::createEmptyView()
|
|
|
|
void CMainWindow::createEmptyView(QDockWidget* w)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_emptyView = new CGeorgesTreeViewDialog(this, true);
|
|
|
|
_emptyView = new CGeorgesTreeViewDialog(this, true);
|
|
|
|
//_emptyView->setAllowedAreas(Qt::TopDockWidgetArea);
|
|
|
|
if(w)
|
|
|
|
addDockWidget(Qt::TopDockWidgetArea,_emptyView);
|
|
|
|
{
|
|
|
|
|
|
|
|
tabifyDockWidget(w, _emptyView);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
addDockWidget(Qt::TopDockWidgetArea, _emptyView);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CMainWindow::createActions()
|
|
|
|
void CMainWindow::createActions()
|
|
|
|