1 // Copyright (C) 2014-2015 EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10 // Lesser General Public License for more details.
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 #ifndef HYDROGUI_TWOIMAGESDLG_H
20 #define HYDROGUI_TWOIMAGESDLG_H
22 #include "HYDROGUI_InputPanel.h"
30 class HYDROGUI_ColorWidget;
31 class HYDROGUI_ObjSelector;
33 class HYDROGUI_TwoImagesDlg : public HYDROGUI_InputPanel
38 enum Mode { TwoFuseImage = 0, TwoCutImage, ImageAndPolyline };
41 HYDROGUI_TwoImagesDlg( HYDROGUI_Module* theModule, const QString& theTitle );
42 virtual ~HYDROGUI_TwoImagesDlg();
46 void setMode( const int theMode, const bool theIsEdit );
48 bool isModifySelected() const;
50 void setImageName( const QString& theName );
51 QString getImageName() const;
53 void setSelectedObjects( const QString& theName1,
54 const QString& theName2 );
55 bool getSelectedObjects( QString& theName1,
56 QString& theName2 ) const;
58 void setPreselectedObject( const QString& theName );
60 void setColor( const QColor& theColor );
61 QColor getColor() const;
64 /** Signal is emitted if the name has already been selected
65 * in other selector of the same parent widget.
66 * @param theName the selected object name
68 void alreadySelected( const QString& theName );
71 void onModifySelectedImage( bool theState );
75 * Returns whether the mode is to select two images, that corresponds to cut or fuse mode
77 bool isTwoImagesMode() const;
83 QLineEdit* myImageName;
84 QCheckBox* myModifySelectedImage;
86 QLabel* myImage1Label;
87 HYDROGUI_ObjSelector* myImage1;
89 QLabel* myImage2Label;
90 HYDROGUI_ObjSelector* myImage2;
92 QLabel* myPolylineLabel;
93 HYDROGUI_ObjSelector* myPolyline;
95 QFrame* myBackgroundFrame;
96 QRadioButton* myTransparent;
97 QRadioButton* myColor;
98 HYDROGUI_ColorWidget* myColorBox;