]> SALOME platform Git repositories - plugins/hexoticplugin.git/blobdiff - src/GUI/HexoticPluginGUI_HypothesisCreator.h
Salome HOME
IMP: HexoticPLUGIN/Size Maps: Added some warnings to avoid 0 value of the local size...
[plugins/hexoticplugin.git] / src / GUI / HexoticPluginGUI_HypothesisCreator.h
index 219c25081a5cff2cd080ff8f81c6fe47725d21f9..a786356d8c3164fdbbcf2f77213a4d69c1bf1d05 100644 (file)
 #include "StdMeshersGUI_ObjectReferenceParamWdg.h"
 #include "HexoticPlugin_Hypothesis.hxx"
 
+#include <QItemDelegate>
+
 class QtxIntSpinBox;
 class QCheckBox;
 class QLineEdit;
+class QTableWidgetItem;
 
 class HexoticPluginGUI_StdWidget;
 class HexoticPluginGUI_SizeMapsWidget;
@@ -98,11 +101,37 @@ private:
 
   bool                           myIs3D;
   std::vector< std::string >     mySizeMapsToRemove;
+  QVariant                       myNotModifiedSize;
  
 protected slots:
   void             onAddLocalSize();
   void             onRemoveLocalSize();
+  void             onItemChanged(QTableWidgetItem*);
+  void             onItemDoubleClicked(QTableWidgetItem*);
   
 };
 
+class SizeMapsTableWidgetDelegate : public QItemDelegate
+{
+    Q_OBJECT
+
+public:
+  SizeMapsTableWidgetDelegate(QObject *parent = 0);
+
+  QWidget *createEditor(QWidget *parent, 
+                        const QStyleOptionViewItem &option,
+                        const QModelIndex &index) const;
+
+  void setEditorData(QWidget *editor, 
+                     const QModelIndex &index) const;
+                     
+  void setModelData(QWidget *editor, 
+                    QAbstractItemModel *model,
+                    const QModelIndex &index) const;
+
+  void updateEditorGeometry(QWidget *editor, 
+                            const QStyleOptionViewItem &option,
+                            const QModelIndex &index) const;
+};
+
 #endif