Changed: #1150 some layout stuff - widgets should behave better now

This commit is contained in:
aquiles 2010-11-08 14:19:01 +01:00
parent 22d6499610
commit ebc2101c1f
5 changed files with 23 additions and 45 deletions

View file

@ -7,5 +7,3 @@ BackgroundColor = {
173, 205, 234
};
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";

View file

@ -26,16 +26,6 @@ LanguageCode = "en";
// If changes to the config should be saved on exit
SaveConfig = 1;
//////////////////////////////////////////////////////////////////////////////
// Qt ////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////
QtStyle = "Cleanlooks";
QtPalette = 0;
QtWindowState = "";
QtWindowGeometry = "";
//////////////////////////////////////////////////////////////////////////////
// Graphics //////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////

View file

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

View file

@ -57,7 +57,7 @@ namespace NLQT
CGeorgesTreeViewDialog* getEmptyView() { return _emptyView;}
QList<CGeorgesTreeViewDialog*>& getTreeViewList() { return _treeViewList; }
QTabBar* getTabBar();
void createEmptyView();
void createEmptyView(QDockWidget* w = 0);
private Q_SLOTS:
void open();

View file

@ -47,10 +47,6 @@ namespace NLQT
{
_ui.setupUi(this);
//widget = new QWidget(dockWidgetContents);
//widget->setObjectName(QString::fromUtf8("widget"));
_nlw = new QNLWidget(_ui.dockWidgetContents);
_nlw->setObjectName(QString::fromUtf8("nlwidget"));
_ui.gridLayout->addWidget(_nlw, 0, 0, 1, 1);
@ -93,8 +89,6 @@ namespace NLQT
{
// called by show()
// code assuming visible window needed to init the 3d driver
if (visible != isVisible())
{
if (visible)
{
QDockWidget::setVisible(true);
@ -106,7 +100,6 @@ namespace NLQT
QDockWidget::setVisible(false);
}
}
}
void CObjectViewerDialog::updateInitialization(bool visible)
{