From: stv Date: Tue, 7 Jun 2005 09:16:05 +0000 (+0000) Subject: Caption of the "Restore View" dialog was corrected. X-Git-Tag: T3_0_0_a2~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=03aa29cbac35da92a33646c972fb06a8ea32a162;p=modules%2Fgui.git Caption of the "Restore View" dialog was corrected. --- diff --git a/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx b/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx index 7018e7117..ad7dc2079 100755 --- a/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx +++ b/src/OCCViewer/OCCViewer_CreateRestoreViewDlg.cxx @@ -10,69 +10,71 @@ OCCViewer_CreateRestoreViewDlg::OCCViewer_CreateRestoreViewDlg( QWidget* aWin, OCCViewer_Viewer* curModel ) : QDialog( aWin ) { - myParametersMap = curModel->getViewAspects(); + setCaption( tr( "CAPTION" ) ); - myKeyFlag = 0; + myParametersMap = curModel->getViewAspects(); - int aQuantityOfItems = myParametersMap.count(); + myKeyFlag = 0; + + int aQuantityOfItems = myParametersMap.count(); - setFixedSize( 400, 300 ); + setFixedSize( 400, 300 ); - QGridLayout* aGrid = new QGridLayout( this, 2, 1, 5, 10 ); + QGridLayout* aGrid = new QGridLayout( this, 2, 1, 5, 10 ); - QWidget* aWidget1 = new QWidget( this ); - QWidget* aWidget2 = new QWidget( this ); + QWidget* aWidget1 = new QWidget( this ); + QWidget* aWidget2 = new QWidget( this ); - QHBoxLayout* aLayout = new QHBoxLayout( aWidget1 ); + QHBoxLayout* aLayout = new QHBoxLayout( aWidget1 ); - myListBox = new QtxListBox( aWidget1 ); - myListBox->installEventFilter( this ); + myListBox = new QtxListBox( aWidget1 ); + myListBox->installEventFilter( this ); - myCurViewPort = new OCCViewer_ViewPort3d( aWidget1, curModel->getViewer3d(), V3d_ORTHOGRAPHIC ); - myCurViewPort->getView()->SetBackgroundColor( Quantity_NOC_BLACK ); + myCurViewPort = new OCCViewer_ViewPort3d( aWidget1, curModel->getViewer3d(), V3d_ORTHOGRAPHIC ); + myCurViewPort->getView()->SetBackgroundColor( Quantity_NOC_BLACK ); - myListBox->setEditEnabled( 1 ); + myListBox->setEditEnabled( 1 ); - if( aQuantityOfItems ) - { - myListBox->clear(); - for( int i = 0; i < aQuantityOfItems; i++ ) - myListBox->insertItem( myParametersMap[ i ].name ); - - changeImage( myListBox->item( 0 ) ); - } - else - { - myListBox->clear(); - myListBox->insertItem( "No Items", 0 ); - myListBox->setEditEnabled( 0 ); - } - - connect( myListBox, SIGNAL( clicked( QListBoxItem* ) ), this, SLOT( changeImage( QListBoxItem* ) ) ); - connect( myListBox, SIGNAL( itemEdited( QListBoxItem* ) ), this, SLOT( editItemText( QListBoxItem* ) ) ); + if ( aQuantityOfItems ) + { + myListBox->clear(); + for( int i = 0; i < aQuantityOfItems; i++ ) + myListBox->insertItem( myParametersMap[ i ].name ); + + changeImage( myListBox->item( 0 ) ); + } + else + { + myListBox->clear(); + myListBox->insertItem( "No Items", 0 ); + myListBox->setEditEnabled( 0 ); + } + + connect( myListBox, SIGNAL( clicked( QListBoxItem* ) ), this, SLOT( changeImage( QListBoxItem* ) ) ); + connect( myListBox, SIGNAL( itemEdited( QListBoxItem* ) ), this, SLOT( editItemText( QListBoxItem* ) ) ); - aLayout->addWidget( myListBox ); - aLayout->addWidget( myCurViewPort, 30 ); + aLayout->addWidget( myListBox ); + aLayout->addWidget( myCurViewPort, 30 ); - QHBoxLayout* aButtonLayout = new QHBoxLayout( aWidget2, 0, 5 ); + QHBoxLayout* aButtonLayout = new QHBoxLayout( aWidget2, 0, 5 ); - QPushButton* theOk = new QPushButton( tr( "Ok" ), aWidget2 ); theOk->setAutoDefault( false ); - QPushButton* theCancel = new QPushButton( tr( "Cancel" ), aWidget2 ); theCancel->setAutoDefault( false ); - QPushButton* theDelete = new QPushButton( tr( "Delete" ), aWidget2 ); theDelete->setAutoDefault( false ); - QPushButton* theClearAll = new QPushButton( tr( "Clear List" ), aWidget2 ); theClearAll->setAutoDefault( false ); + QPushButton* theOk = new QPushButton( tr( "Ok" ), aWidget2 ); theOk->setAutoDefault( false ); + QPushButton* theCancel = new QPushButton( tr( "Cancel" ), aWidget2 ); theCancel->setAutoDefault( false ); + QPushButton* theDelete = new QPushButton( tr( "Delete" ), aWidget2 ); theDelete->setAutoDefault( false ); + QPushButton* theClearAll = new QPushButton( tr( "Clear List" ), aWidget2 ); theClearAll->setAutoDefault( false ); - aButtonLayout->addWidget( theOk ); - aButtonLayout->addWidget( theCancel ); - aButtonLayout->addWidget( theDelete ); - aButtonLayout->addWidget( theClearAll ); + aButtonLayout->addWidget( theOk ); + aButtonLayout->addWidget( theCancel ); + aButtonLayout->addWidget( theDelete ); + aButtonLayout->addWidget( theClearAll ); - aGrid->addWidget( aWidget1, 0, 0 ); - aGrid->addWidget( aWidget2, 1, 0 ); + aGrid->addWidget( aWidget1, 0, 0 ); + aGrid->addWidget( aWidget2, 1, 0 ); - connect( theOk, SIGNAL( clicked() ), this, SLOT( OKpressed() ) ); - connect( theCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); - connect( theDelete, SIGNAL( clicked() ), this, SLOT( deleteSelectedItems() ) ); - connect( theClearAll, SIGNAL( clicked() ), this, SLOT( clearList() ) ); + connect( theOk, SIGNAL( clicked() ), this, SLOT( OKpressed() ) ); + connect( theCancel, SIGNAL( clicked() ), this, SLOT( reject() ) ); + connect( theDelete, SIGNAL( clicked() ), this, SLOT( deleteSelectedItems() ) ); + connect( theClearAll, SIGNAL( clicked() ), this, SLOT( clearList() ) ); } OCCViewer_CreateRestoreViewDlg::~OCCViewer_CreateRestoreViewDlg() diff --git a/src/OCCViewer/resources/OCCViewer_msg_en.po b/src/OCCViewer/resources/OCCViewer_msg_en.po index a7ecd85c9..e4da092e8 100755 --- a/src/OCCViewer/resources/OCCViewer_msg_en.po +++ b/src/OCCViewer/resources/OCCViewer_msg_en.po @@ -134,15 +134,6 @@ msgstr "Restore View" msgid "DSC_PRESETS_VIEW" msgstr "Selection of the memorized state of the active view" -msgid "OCCViewer_Viewer::MEN_DUMP_VIEW" -msgstr "Dump view..." - -msgid "OCCViewer_Viewer::MEN_SHOW_TOOLBAR" -msgstr "Show toolbar" - -msgid "OCCViewer_Viewer::MEN_CHANGE_BACKGROUD" -msgstr "Change background..." - msgid "OCC_IMAGE_FILES" msgstr "Images Files (*.bmp *.png *.jpg *.jpeg)" @@ -164,5 +155,19 @@ msgstr "Error" msgid "BUT_OK" msgstr "Ok" + +msgid "OCCViewer_Viewer::MEN_DUMP_VIEW" +msgstr "Dump view..." + +msgid "OCCViewer_Viewer::MEN_SHOW_TOOLBAR" +msgstr "Show toolbar" + +msgid "OCCViewer_Viewer::MEN_CHANGE_BACKGROUD" +msgstr "Change background..." + msgid "OCCViewer_ViewManager::OCC_VIEW_TITLE" msgstr "OCC scene:%1 - viewer:%2" + + +msgid "OCCViewer_CreateRestoreViewDlg::CAPTION" +msgstr "Restore view"