myParametersMap = theViewWindow->getViewAspects();
- myKeyFlag = 0;
+// myKeyFlag = 0;
int aQuantityOfItems = myParametersMap.count();
myListBox->insertItem( i, myParametersMap[ i ].name );
myListBox->item( i )->setFlags( myListBox->item( i )->flags() | Qt::ItemIsEditable );
}
-
+ myListBox->item( 0 )->setSelected( true );
changeImage( myListBox->item( 0 ) );
}
else
myListBox->clear();
myListBox->insertItem( 0, "No Items" );
}
-
- connect( myListBox, SIGNAL( itemClicked( QListWidgetItem* ) ), this, SLOT( changeImage( QListWidgetItem* ) ) );
+ myListBox->setSelectionMode( QAbstractItemView::SingleSelection );
+// connect( myListBox, SIGNAL( itemClicked( QListWidgetItem* ) ), this, SLOT( changeImage( QListWidgetItem* ) ) );
+ connect( myListBox, SIGNAL( currentItemChanged(QListWidgetItem*, QListWidgetItem *)), this, SLOT( changeImage( QListWidgetItem* ) ) );
connect( myListBox, SIGNAL( itemChanged( QListWidgetItem* ) ), this, SLOT( editItemText( QListWidgetItem* ) ) );
aLayout->addWidget( myListBox );
int lowLevel = -1;
int highLevel = -1;
int index = curItem->listWidget()->row( curItem );
- if( myKeyFlag == 2 )
+ /* if( myKeyFlag == 2 )
{
for( int i = 0; i < (int)myListBox->count(); i++ )
{
myListBox->item( i )->setSelected( true );
}
}
-
+ */
Handle(V3d_View) aView3d = myCurViewPort->getView();
myCurrentItem = myParametersMap[ index ];
/*!
Custom event filter
*/
-bool OCCViewer_CreateRestoreViewDlg::eventFilter( QObject* anObj, QEvent* anEv )
+/*bool OCCViewer_CreateRestoreViewDlg::eventFilter( QObject* anObj, QEvent* anEv )
{
if( anEv->type() == QEvent::KeyPress )
{
myListBox->setSelectionMode( QAbstractItemView::SingleSelection );
}
return QWidget::eventFilter( anObj, anEv );
-}
+}*/
/*!
SLOT: called on OK click, emits dlgOk() and closes dialog
const viewAspectList& parameters() const;
viewAspect currentItem() const;
- virtual bool eventFilter( QObject*, QEvent* );
+// virtual bool eventFilter( QObject*, QEvent* );
public slots:
void OKpressed();
void dlgOk();
private:
- int myKeyFlag;
+// int myKeyFlag;
QListWidget* myListBox;
OCCViewer_ViewPort3d* myCurViewPort;
viewAspect myCurrentItem;