- QHBoxLayout* aListLayout = new QHBoxLayout();
-
- myList = new QListView( this );
- myList->setSelectionMode( QAbstractItemView::ExtendedSelection );
- myList->setDragEnabled( true );
- myList->setAcceptDrops( true );
- myList->viewport()->setAcceptDrops( true );
- myList->setDropIndicatorShown( true );
- myList->setDragDropMode( QAbstractItemView::InternalMove );
-
- HYDROGUI_ZLevelsModel* aModel = new HYDROGUI_ZLevelsModel();
- QSortFilterProxyModel* aFilteredModel = new QSortFilterProxyModel();
- aFilteredModel->setSourceModel( aModel );
- aFilteredModel->setFilterKeyColumn( 0 );
- aFilteredModel->setFilterRole( HYDROGUI_VisibleRole );
-
- myList->setModel( aFilteredModel );
-
- SUIT_ResourceMgr* aResMgr = SUIT_Session::session()->resourceMgr();
- myTop = new QToolButton;
- myTop->setIcon( aResMgr->loadPixmap( "HYDRO", tr( "ARROW_TOP_ICO" ) ) );
- myTop->setIconSize( QSize( 32, 32 ) );
- myUp = new QToolButton;
- myUp->setIcon( aResMgr->loadPixmap( "HYDRO", tr( "ARROW_UP_ICO" ) ) );
- myUp->setIconSize( myTop->iconSize() );
- myDown = new QToolButton;
- myDown->setIcon( aResMgr->loadPixmap( "HYDRO", tr( "ARROW_DOWN_ICO" ) ) );
- myDown->setIconSize( myTop->iconSize() );
- myBottom = new QToolButton;
- myBottom->setIcon( aResMgr->loadPixmap( "HYDRO", tr( "ARROW_BOTTOM_ICO" ) ) );
- myBottom->setIconSize( myTop->iconSize() );
- QVBoxLayout* aListButtonsLayout = new QVBoxLayout();
- aListButtonsLayout->addWidget( myTop );
- aListButtonsLayout->addWidget( myUp );
- aListButtonsLayout->addWidget( myDown );
- aListButtonsLayout->addWidget( myBottom );
- aListButtonsLayout->addStretch();
- aListLayout->addWidget( myList );
- aListLayout->addLayout( aListButtonsLayout );
- aMainLayout->addLayout( aListLayout );