]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDROGUI/HYDROGUI_TwoImagesDlg.cxx
Salome HOME
5eb67671903ddb971b22d2dc37627c316965b905
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_TwoImagesDlg.cxx
1
2 #include <HYDROGUI_TwoImagesDlg.h>
3 #include <HYDROGUI_ObjSelector.h>
4 #include <HYDROGUI_ColorWidget.h>
5 #include <QLineEdit>
6 #include <QRadioButton>
7 #include <QLayout>
8
9 HYDROGUI_TwoImagesDlg::HYDROGUI_TwoImagesDlg( HYDROGUI_Module* theModule, const QString& theTitle )
10 : HYDROGUI_InputPanel( theModule, theTitle )
11 {
12   myName = new QLineEdit();
13   myImage1 = new HYDROGUI_ObjSelector( module(), 0 );
14   myImage2 = new HYDROGUI_ObjSelector( module(), 0 );
15   myTransparent = new QRadioButton( tr( "TRANSPARENT" ) );
16   myTransparent->setChecked( true );
17   myColor = new QRadioButton( tr( "COLOR" ) );
18   myColorBox = new HYDROGUI_ColorWidget( 0 );
19
20   addWidget( tr( "NAME" ), myName );
21   addSeparator();
22   addWidget( tr( "IMAGE_1" ), myImage1 );
23   addWidget( tr( "IMAGE_2" ), myImage2 );
24
25   QFrame* aBackground = new QFrame();
26   QGridLayout* aLayout = new QGridLayout( aBackground );
27   aLayout->addWidget( myTransparent, 0, 0 );
28   aLayout->addWidget( myColor, 1, 0 );
29   aLayout->addWidget( myColorBox, 1, 1 );
30
31   addWidget( tr( "BACKGROUND" ), aBackground );
32   addSeparator();
33   setRowStretch();
34 }
35
36 HYDROGUI_TwoImagesDlg::~HYDROGUI_TwoImagesDlg()
37 {
38 }
39
40 void HYDROGUI_TwoImagesDlg::GetSelectedImages( QString& theName1, QString& theName2 ) const
41 {
42   theName1 = myImage1->GetName();
43   theName2 = myImage2->GetName();
44 }