Salome HOME
Updated copyright comment
[modules/hexablock.git] / src / HEXABLOCKGUI / HEXABLOCKGUI_DocumentPanel.hxx
old mode 100755 (executable)
new mode 100644 (file)
index cc5ca6c..5cc654f
@@ -1,9 +1,9 @@
-// Copyright (C) 2009-2013  CEA/DEN, EDF R&D
+// Copyright (C) 2009-2024  CEA, EDF
 //
 // 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.
+// 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
@@ -23,7 +23,7 @@
 
 #define MAX_WIDTH 16777215
 #define MAX_HEIGHT 16777215
-#define MIN_WIDTH 0
+#define MIN_WIDTH 5
 #define MIN_HEIGHT 0
 
 #include <QShortcut>
@@ -64,6 +64,7 @@
 #include "ui_MakeHemiSphere_QTD.h"
 #include "ui_ModelInfo_QTD.h"
 #include "ui_AddShapeDialog_QTD.h"
+#include "ui_ComputeMesh_QTD.h"
 
 #include "HexVertex.hxx"
 #include "HexEdge.hxx"
@@ -133,10 +134,6 @@ namespace HEXABLOCK
           return HEXABLOCKGUI::currentDocGView->getPatternGeomModel();
       }
 
-      PatternBuilderModel* getPatternBuilderModel() const {
-          return HEXABLOCKGUI::currentDocGView->getPatternBuilderModel();
-      }
-
       GroupsModel* getGroupsModel() const {
           return HEXABLOCKGUI::currentDocGView->getGroupsModel();
       }
@@ -150,10 +147,6 @@ namespace HEXABLOCK
          return HEXABLOCKGUI::currentDocGView->getPatternDataSelectionModel();
       }
 
-      PatternBuilderSelectionModel* getPatternBuilderSelectionModel() const {
-         return HEXABLOCKGUI::currentDocGView->getPatternBuilderSelectionModel();
-      }
-
       PatternGeomSelectionModel* getPatternGeomSelectionModel() const {
           return HEXABLOCKGUI::currentDocGView->getPatternGeomSelectionModel();
       }
@@ -171,8 +164,6 @@ namespace HEXABLOCK
       HEXABLOCKGUI::ViewType getObjectViewType(QObject* obj);
       void modelUnregister(QWidget* widget); //unlink the widget from the model
       void resetSizeAndShow(QDockWidget* parent);
-      void lockSizeToSizeHint();
-      void unlockSizeModification();
       virtual QModelIndexList getAssocsVTK()
       {
         QModelIndexList assocs;
@@ -184,6 +175,7 @@ namespace HEXABLOCK
         return assocs;
       }
       virtual void setCurrentGeomObj(DocumentModel::GeomObj* geomObj) {}
+      virtual void computeAndSetDimension(const QModelIndex& elt);
 
       bool debugEdgeAssoc; //Temporary
       bool autoFocusSwitch;
@@ -230,13 +222,15 @@ namespace HEXABLOCK
 
     void _updateCurrentObject(QObject*);
 
+    bool isDimensionType(const QObject* obj);
+
     Mode _editMode;
 
-    QMap<QObject*, QModelIndex>   _index;
-    QObject*                      _currentObj;
+    QMap<QObject*, QModelIndex>    _index;
+    QObject*                       _currentObj;
     QMap<HexaWidgetType, QString>  _strHexaWidgetType;
-    QPushButton* _applyButton;
-    QString  _helpFileName;
+    QPushButton*                   _applyButton;
+    QString                        _helpFileName;
 
     private:
     bool _isLineOrListWidget(QObject*);
@@ -252,8 +246,6 @@ namespace HEXABLOCK
 
     };
 
-
-
     class HEXABLOCK_EXPORT VertexDialog : public HexaBaseDialog,
     public Ui::VertexDialog
     {
@@ -923,7 +915,8 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
     // Define the compute mesh dialog box
     // ----------------------------------
 
-    class HEXABLOCK_EXPORT ComputeMeshDialog : public HexaBaseDialog
+    class HEXABLOCK_EXPORT ComputeMeshDialog : public HexaBaseDialog,
+    public Ui::ComputeMeshDialog
     {
       Q_OBJECT
 
@@ -939,11 +932,6 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
 
     protected:
     void _initInputWidget( Mode editmode );
-
-    private:
-    QLineEdit* _name;
-    QSpinBox*  _dim;
-    QLineEdit* _fact;
     };
 
 
@@ -968,7 +956,9 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
 
     protected slots:
     void deleteQuadItem();
+    void deleteQuadItem2();
     void updateButtonBox();
+    //void updateHelpFileName();
 
     private:
     HEXA_NS::Elements *_value;
@@ -1079,65 +1069,7 @@ class HEXABLOCK_EXPORT EdgeAssocDialog : public HexaBaseDialog,
         virtual void onCurrentSelectionChanged();
     };
 
-
-    //*****************************  OBSOLETE: A SUPPRIMER !!!!  ************************************//
-
-        class HEXABLOCK_EXPORT CylinderDialog : public HexaBaseDialog,
-        public Ui::CylinderDialog
-        {
-          Q_OBJECT
-
-        public:
-          CylinderDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
-          virtual ~CylinderDialog();
-
-          void clear();
-
-          void setValue( HEXA_NS::Cylinder* v );
-          HEXA_NS::Cylinder* getValue();
-
-        public slots:
-        virtual bool apply(QModelIndex& result);
-
-        protected:
-        void _initInputWidget( Mode editmode );
-
-        private:
-        HEXA_NS::Cylinder   *_value;
-        QModelIndex         _ivalue;
-        };
-
-        class HEXABLOCK_EXPORT PipeDialog : public HexaBaseDialog,
-        public Ui::PipeDialog
-        {
-          Q_OBJECT
-
-        public:
-          PipeDialog( QWidget* = 0, Mode = NEW_MODE, Qt::WindowFlags = Qt::SubWindow );//= 0 );
-          virtual ~PipeDialog();
-
-          void clear();
-
-          void setValue( HEXA_NS::Pipe* p );
-          HEXA_NS::Pipe* getValue();
-
-        public slots:
-        virtual bool apply(QModelIndex& result);
-
-        protected:
-        void _initInputWidget( Mode editmode );
-
-        private:
-        HEXA_NS::Pipe   *_value;
-        QModelIndex     _ivalue;
-
-        };
-    // ************************************** FIN A SUPPRIMER ******************************************//
-
-
   }
 }
 
-
-
 #endif