Salome HOME
updated copyright message
[modules/gui.git] / src / Qtx / Qtx.h
old mode 100755 (executable)
new mode 100644 (file)
index 402c9ea..9b8090a
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -6,7 +6,7 @@
 // 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
@@ -44,6 +44,7 @@
 
 #include <QString>
 #include <QList>
+#include <QFont>
 #include <QColor>
 #include <QImage>
 #include <QPixmap>
@@ -120,6 +121,7 @@ public:
 
   //! Header view flags
   typedef enum {
+    ShowNone = 0x000,                //!< Show nothing
     ShowText = 0x001,                //!< Show only text in the header
     ShowIcon = 0x010,                //!< Show only icon in the header
     ShowAll  = ShowText | ShowIcon   //!< Show icon and text in the header
@@ -149,9 +151,27 @@ public:
   {
   public:
     Localizer();
+    Localizer( int, const char* );
     ~Localizer();
   private:
-    QString myCurLocale;
+    void init( int, const char* );
+  private:
+    int myCategory;
+    QString myOriginalLocale;
+  };
+
+  class QTX_EXPORT CmdLineArgs
+  {
+  public:
+    CmdLineArgs();
+    ~CmdLineArgs();
+    
+    int argc() const;
+    char** argv() const;
+
+  private:
+    int    myArgc;
+    char** myArgv;
   };
 
   class QTX_EXPORT BackgroundData
@@ -214,6 +234,7 @@ public:
   static QString     file( const QString&, const bool = true );
   static QString     extension( const QString&, const bool = false );
 
+  static QString     libraryName( const QString& );
   static QString     library( const QString& );
 
   static QString     tmpDir();
@@ -221,6 +242,7 @@ public:
   static bool        rmDir( const QString& );
   static bool        dos2unix( const QString& );
   static QString     addSlash( const QString& );
+  static QString     joinPath( const QStringList& );
 
   static QCompleter* pathCompleter( const PathType, const QString& = QString() );
   static QString     findEnvVar( const QString&, int&, int& );
@@ -258,10 +280,19 @@ public:
   static QString        backgroundToString( const BackgroundData& );
   static BackgroundData stringToBackground( const QString& );
 
+  static long        versionToId( const QString& );
+
+  static QString     qtDir( const QString& = QString());
+
+  static QFont   stringToFont( const QString& fontDescription );
+
+  static QString     getenv( const QString& envVar );
+
 #ifndef WIN32
   static void*       getDisplay();
   static Qt::HANDLE  getVisual();
 #endif
+  static void initDefaultSurfaceFormat();
 };
 
 #endif