]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/ModuleBase/ModuleBase_WidgetChoice.h
Salome HOME
Merge branch 'Pre_2.8.0_development'
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetChoice.h
index 100f66f24a4833bf06a8e651b5fc5e48cfa60cdd..cd0fa9521b1848d7b68b96f0164811d9bd31c8a9 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        ModuleBase_WidgetChoice.h
-// Created:     03 Sept 2014
-// Author:      Vitaly Smetannikov
+// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
 
 #ifndef ModuleBase_WidgetChoice_H
 #define ModuleBase_WidgetChoice_H
@@ -23,7 +37,7 @@ class QButtonGroup;
 *   <choice id="bool_type" 
 *     label="Type" 
 *     tooltip="Type of boolean operation"
-*     string_list="Cut Fuse Common"
+*     string_list="Cut Fuse Common Smash"
 *   />
 * \endcode
 * Aditionally can be used: 
@@ -46,7 +60,7 @@ Q_OBJECT
 
   /// Defines if it is supported to set the value in this widget
   /// It returns false because this is an info widget
-  virtual bool canSetValue() const { return false; };
+  virtual bool canAcceptFocus() const { return false; };
 
   virtual bool focusTo();
 
@@ -54,13 +68,21 @@ Q_OBJECT
   /// \return a controls list
   virtual QList<QWidget*> getControls() const;
 
+  /// Returns text value for the property panel title
+  /// \param theIndex a button index
+  /// \return the title value
+  QString getPropertyPanelTitle(int theIndex);
+
 signals:
-  void itemSelected(int);
+  /// Segnal about selected item
+  /// \param theWidget selected widget
+  /// \param theIndex selected index
+  void itemSelected(ModuleBase_ModelWidget* theWidget, int theIndex);
 
 protected:
   /// Saves the internal parameters to the given feature
   /// \return True in success
-  virtual bool storeValueCustom() const;
+  virtual bool storeValueCustom();
 
   virtual bool restoreValueCustom();
 
@@ -75,6 +97,9 @@ private:
   /// The control
   QComboBox* myCombo;
   QButtonGroup* myButtons;
+
+  // XML definition of titles
+  QStringList myButtonTitles;
 };
 
 #endif