Salome HOME
Fix for the bug #45: check and warning when the same image is used in 2 arguments.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ObjSelector.h
index 7327df516017f2cbb64f01df7297e69048297342..e44ba07a2e3faad9b78a7d76febb95941fb2e805 100644 (file)
@@ -23,6 +23,8 @@
 #ifndef HYDROGUI_OBJSELECTOR_H
 #define HYDROGUI_OBJSELECTOR_H
 
+#include <HYDROData_Object.h>
+
 #include <QAbstractButton>
 
 class QToolButton;
@@ -34,13 +36,24 @@ class HYDROGUI_ObjSelector : public QAbstractButton
   Q_OBJECT
 
 public:
-  HYDROGUI_ObjSelector( HYDROGUI_Module* theModule, QWidget* theParent );
+  HYDROGUI_ObjSelector( HYDROGUI_Module* theModule,
+                        const ObjectKind theObjectKind,
+                        QWidget* theParent );
   virtual ~HYDROGUI_ObjSelector();
 
   void Clear();
+  void SetChecked( const bool );
 
+  void SetName( const QString& );
   QString GetName() const;
 
+signals:
+  /** Signal is emitted if the name has already been selected 
+   *  in other selector of the same parent widget. 
+   * @param theName the selected object name
+   */
+  void alreadySelected( const QString& theName );
+
 protected:
   virtual void paintEvent( QPaintEvent* );
   virtual bool hitButton( const QPoint& thePnt ) const;
@@ -51,6 +64,8 @@ protected slots:
 
 private:
   HYDROGUI_Module* myModule;
+  ObjectKind myObjectKind;
+
   QToolButton* myBtn;
   QLineEdit* myObjName;
 };