Salome HOME
Copyright update 2022
[modules/gui.git] / src / LightApp / LightApp_Dialog.h
index 51acdc5d072505ab3743d484774a9f74996f2ba3..eff139fc79def1a279ffb0b649293d37f7538274 100644 (file)
@@ -1,40 +1,48 @@
-// Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-// 
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
 // 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.
-// 
-// 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 
+// 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 
+// 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/
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File:      LightApp_Dialog.h
 // Author:    Alexander SOLOVYOV
-
+//
 #ifndef LIGHTAPP_DIALOG_H
 #define LIGHTAPP_DIALOG_H
 
 #include "LightApp.h"
 #include <QtxDialog.h>
 
-#include <qvaluelist.h>
-#include <qmap.h>
-#include <qpixmap.h>
+#include <QList>
+#include <QMap>
+#include <QPixmap>
 
 class QLineEdit;
-class QButton;
+class QAbstractButton;
 class QLabel;
 
 class SUIT_ResourceMgr;
 
+#ifdef WIN32
+#pragma warning ( disable:4251 )
+#endif
+
 /*!
   \class LightApp_Dialog
   Base class for all LightApp dialogs.
@@ -48,9 +56,9 @@ class LIGHTAPP_EXPORT LightApp_Dialog : public QtxDialog
   Q_OBJECT
   
 public:
-  typedef QValueList<int>        TypesList;
+  typedef QList<int>             TypesList;
   typedef QMap<int,QStringList>  SelectedObjects;
-  
+
   enum ObjectWg
   {
     Label   = 0x00000001,
@@ -72,7 +80,7 @@ public:
 
 public:
   LightApp_Dialog( QWidget* = 0, const char* = 0, bool = false,
-                    bool = false, const int = Standard, WFlags = 0 );
+                    bool = false, const int = Standard, Qt::WindowFlags = 0 );
   virtual ~LightApp_Dialog();
   
   virtual void    show();
@@ -149,7 +157,7 @@ public:
 
   //! Set all object selection buttons to inactive state
   void deactivateAll();
-  
+
 signals:
   //! selection in certain widget is changed
   void selectionChanged ( int );
@@ -220,7 +228,7 @@ protected:
   
   //!Change and get type name for indicating in selection widget
   QString& typeName( const int );
-  const QString& typeName( const int ) const;
+  const QString typeName( const int ) const;
   
   //! Create string contains selection list by list of names, list of types and current name indication state
   virtual QString selectionDescription( const QStringList&, const TypesList&, const NameIndication ) const;
@@ -268,12 +276,12 @@ private:
 private:
   typedef struct
   {
-    QLineEdit*      myEdit;
-    QButton*        myBtn;
-    QLabel*         myLabel;
-    QStringList     myNames, myIds;
-    TypesList       myTypes, myPossibleTypes;
-    NameIndication  myNI;
+    QLineEdit*       myEdit;
+    QAbstractButton* myBtn;
+    QLabel*          myLabel;
+    QStringList      myNames, myIds;
+    TypesList        myTypes, myPossibleTypes;
+    NameIndication   myNI;
     
   } Object;
   
@@ -281,9 +289,14 @@ private:
   
 private:
   ObjectMap           myObjects;
+  
   QMap<int,QString>   myTypeNames;
   bool                myIsExclusive, myIsBusy;
   QPixmap             myPixmap;
 };
 
+#ifdef WIN32
+#pragma warning ( default:4251 )
+#endif
+
 #endif