mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-12-25 02:00:54 +00:00
Changed: #1150 some layout stuff - widgets should behave better now
This commit is contained in:
parent
91f84ed9fb
commit
cb41dab265
5 changed files with 23 additions and 45 deletions
|
@ -7,5 +7,3 @@ BackgroundColor = {
|
||||||
173, 205, 234
|
173, 205, 234
|
||||||
};
|
};
|
||||||
LeveldesignPath = "D:/Dev/Ryzom/code/ryzom/common/data_leveldesign/leveldesign";
|
LeveldesignPath = "D:/Dev/Ryzom/code/ryzom/common/data_leveldesign/leveldesign";
|
||||||
QtWindowState = "%00%00%00%FF%00%00%00%00%FD%00%00%00%03%00%00%00%00%00%00%02%A6%00%00%00%E9%FC%02%00%00%00%01%FB%00%00%00%2A%00C%00G%00e%00o%00r%00g%00e%00s%00D%00i%00r%00T%00r%00e%00e%00D%00i%00a%00l%00o%00g%01%00%00%00%3B%00%00%00%E9%00%00%00t%00%FF%FF%FF%00%00%00%02%00%00%00%00%00%00%00%00%FC%01%00%00%00%01%FB%00%00%00%26%00C%00O%00b%00j%00e%00c%00t%00V%00i%00e%00w%00e%00r%00D%00i%00a%00l%00o%00g%00%00%00%00%00%FF%FF%FF%FF%00%00%00N%00%FF%FF%FF%00%00%00%03%00%00%02%A6%00%00%01c%FC%01%00%00%00%01%FB%00%00%00%22%00C%00G%00e%00o%00r%00g%00e%00s%00L%00o%00g%00D%00i%00a%00l%00o%00g%01%00%00%00%00%00%00%02%A6%00%00%00%5D%00%FF%FF%FF%00%00%00%00%00%00%00%E9%00%00%00%04%00%00%00%04%00%00%00%08%00%00%00%08%FC%00%00%00%01%00%00%00%02%00%00%00%01%FF%FF%FF%FF%01%00%00%00%00%FF%FF%FF%FF%00%00%00%00%00%00%00%00";
|
|
||||||
QtWindowGeometry = "%01%D9%D0%CB%00%01%00%00%00%00%00%D6%00%00%00%C0%00%00%03%83%00%00%03%82%00%00%00%DA%00%00%00%DE%00%00%03%7F%00%00%03~%00%00%00%00%00%00";
|
|
||||||
|
|
|
@ -26,16 +26,6 @@ LanguageCode = "en";
|
||||||
// If changes to the config should be saved on exit
|
// If changes to the config should be saved on exit
|
||||||
SaveConfig = 1;
|
SaveConfig = 1;
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Qt ////////////////////////////////////////////////////////////////////////
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
QtStyle = "Cleanlooks";
|
|
||||||
QtPalette = 0;
|
|
||||||
QtWindowState = "";
|
|
||||||
QtWindowGeometry = "";
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
// Graphics //////////////////////////////////////////////////////////////////
|
// Graphics //////////////////////////////////////////////////////////////////
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -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()
|
||||||
|
|
|
@ -57,7 +57,7 @@ namespace NLQT
|
||||||
CGeorgesTreeViewDialog* getEmptyView() { return _emptyView;}
|
CGeorgesTreeViewDialog* getEmptyView() { return _emptyView;}
|
||||||
QList<CGeorgesTreeViewDialog*>& getTreeViewList() { return _treeViewList; }
|
QList<CGeorgesTreeViewDialog*>& getTreeViewList() { return _treeViewList; }
|
||||||
QTabBar* getTabBar();
|
QTabBar* getTabBar();
|
||||||
void createEmptyView();
|
void createEmptyView(QDockWidget* w = 0);
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void open();
|
void open();
|
||||||
|
|
|
@ -47,10 +47,6 @@ namespace NLQT
|
||||||
{
|
{
|
||||||
_ui.setupUi(this);
|
_ui.setupUi(this);
|
||||||
|
|
||||||
//widget = new QWidget(dockWidgetContents);
|
|
||||||
//widget->setObjectName(QString::fromUtf8("widget"));
|
|
||||||
|
|
||||||
|
|
||||||
_nlw = new QNLWidget(_ui.dockWidgetContents);
|
_nlw = new QNLWidget(_ui.dockWidgetContents);
|
||||||
_nlw->setObjectName(QString::fromUtf8("nlwidget"));
|
_nlw->setObjectName(QString::fromUtf8("nlwidget"));
|
||||||
_ui.gridLayout->addWidget(_nlw, 0, 0, 1, 1);
|
_ui.gridLayout->addWidget(_nlw, 0, 0, 1, 1);
|
||||||
|
@ -93,18 +89,15 @@ namespace NLQT
|
||||||
{
|
{
|
||||||
// called by show()
|
// called by show()
|
||||||
// code assuming visible window needed to init the 3d driver
|
// code assuming visible window needed to init the 3d driver
|
||||||
if (visible != isVisible())
|
if (visible)
|
||||||
{
|
{
|
||||||
if (visible)
|
QDockWidget::setVisible(true);
|
||||||
{
|
updateInitialization(true);
|
||||||
QDockWidget::setVisible(true);
|
}
|
||||||
updateInitialization(true);
|
else
|
||||||
}
|
{
|
||||||
else
|
updateInitialization(false);
|
||||||
{
|
QDockWidget::setVisible(false);
|
||||||
updateInitialization(false);
|
|
||||||
QDockWidget::setVisible(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue