QDockWindow* CGLWin::_createDockWidgetBar(QWidget *parent, const QString& appdir) { QDockWindow* p = new QDockWindow( QDockWindow::InDock, this ); p->setResizeEnabled(true); p->setCloseMode(QDockWindow::Always); addToolBar( p, Qt::DockLeft ); QToolBox* pToolBox = new QToolBox(p); p->setWidget(pToolBox); p->setFixedExtentWidth( 200 ); p->setCaption("Object List"); setDockEnabled( p, Qt::DockTop, FALSE ); setDockEnabled( p, Qt::DockBottom, FALSE ); //first node m_pListViews = new CObjectListView(m_pGLUIWin->m_SceneGraph, pToolBox); pToolBox->addItem(m_pListViews, "Objects"); /* //second node m_pMaterialTree = new CMaterialTree(appdir, pActiveSceneNode, pToolBox); pToolBox->addItem(m_pMaterialTree, "Materials"); */ return p; }
void Frame::setCategories( const QPtrList<CategoryInterface> &l ) { categories = l; QDockWindow *dw = new QDockWindow( QDockWindow::InDock, this ); dw->setResizeEnabled( TRUE ); dw->setVerticalStretchable( TRUE ); addDockWindow( dw, DockLeft ); setDockEnabled( dw, DockTop, FALSE ); setDockEnabled( dw, DockBottom, FALSE ); dw->setCloseMode( QDockWindow::Always ); toolBox = new QToolBox( dw ); dw->setWidget( toolBox ); dw->setCaption( tr( "Demo Categories" ) ); for ( int i = 0; i < categories.count(); ++i ) toolBox->addItem( createCategoryPage( categories.at(i) ), categories.at(i)->icon(), categories.at(i)->name() ); categories.first()->setCurrentCategory( 0 ); }