]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Porting to Qt4: changes for Win32 platform and MS VC++ 7.1 compiler
authorsan <san@opencascade.com>
Fri, 8 Jun 2007 08:16:16 +0000 (08:16 +0000)
committersan <san@opencascade.com>
Fri, 8 Jun 2007 08:16:16 +0000 (08:16 +0000)
src/DDS/DDS_DicGroup.h
src/DDS/DDS_DicItem.h
src/DDS/DDS_Dictionary.h
src/DDS/DDS_KeyWords.h
src/GLViewer/GLViewer_BaseObjects.cxx
src/GLViewer/GLViewer_Drawer.cxx
src/GLViewer/GLViewer_ViewFrame.cxx
src/GLViewer/GLViewer_ViewPort.cxx
src/GLViewer/GLViewer_ViewPort2d.cxx
src/GLViewer/GLViewer_Viewer2d.cxx
src/VTKViewer/VTKViewer_RenderWindow.cxx

index 9fc525b770082cde0b21fb646a924cb6a007904d..a804776eaac6d1b3bb550ed0bcaeafea6e002241 100644 (file)
 class LDOM_Element;
 class TColStd_SequenceOfAsciiString;
 
-class Standard_EXPORT DDS_DicGroup : public MMgt_TShared
+DEFINE_STANDARD_HANDLE(DDS_DicGroup, MMgt_TShared)
+
+class DDS_DicGroup : public MMgt_TShared
 {
 public:
   DDS_DicGroup( const TCollection_AsciiString& );
 
-  TCollection_AsciiString    GetName() const;
+  TCollection_AsciiString                    GetName() const;
 
-  Handle_DDS_DicItem         GetDicItem( const TCollection_AsciiString& ) const;
+  Standard_EXPORT Handle(DDS_DicItem)        GetDicItem( const TCollection_AsciiString& ) const;
 
-  void                       GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
-  TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
+  Standard_EXPORT void                       GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
+  Standard_EXPORT TCollection_ExtendedString GetUnitSystemLabel( const TCollection_AsciiString& ) const;
 
-  TCollection_AsciiString    GetActiveUnitSystem() const;
-  void                       SetActiveUnitSystem( const TCollection_AsciiString& );
+  Standard_EXPORT TCollection_AsciiString    GetActiveUnitSystem() const;
+  Standard_EXPORT void                       SetActiveUnitSystem( const TCollection_AsciiString& );
 
 private:
   DDS_DicGroup( const DDS_DicGroup& );
 
-  void                       operator=( const DDS_DicGroup& );
+  void                                       operator=( const DDS_DicGroup& );
 
-  void                       FillDataMap( const LDOM_Element&, const LDOM_Element& );
+  void                                       FillDataMap( const LDOM_Element&, const LDOM_Element& );
 
 private:
   typedef NCollection_DataMap<TCollection_AsciiString,
                               TCollection_ExtendedString> UnitSystemMap;
 
 private:
-  TCollection_AsciiString       myName;
-  DDS_IndexedDataMapOfDicItems  myDataMap;
-  UnitSystemMap                 myUnitSystem;
-  TCollection_AsciiString       myActiveSystem;
+  TCollection_AsciiString                    myName;
+  DDS_IndexedDataMapOfDicItems               myDataMap;
+  UnitSystemMap                              myUnitSystem;
+  TCollection_AsciiString                    myActiveSystem;
 
   friend class DDS_Dictionary;
 
@@ -70,8 +72,6 @@ public:
   DEFINE_STANDARD_RTTI(DDS_DicGroup)
 };
 
-DEFINE_STANDARD_HANDLE(DDS_DicGroup, MMgt_TShared)
-
 DEFINE_BASECOLLECTION(DDS_BaseCollectionOfDicGroups, Handle(DDS_DicGroup))
 DEFINE_INDEXEDDATAMAP(DDS_IndexedDataMapOfDicGroups, DDS_BaseCollectionOfDicGroups,
                       TCollection_AsciiString, Handle(DDS_DicGroup))
index f6c7dcc87208bd3964dd538cde60229452ce042f..b326399002c7ed99237cb63f0c69b5ae9d68d58d 100644 (file)
@@ -38,10 +38,16 @@ class TColStd_SequenceOfInteger;
 class TColStd_SequenceOfAsciiString;
 class TColStd_SequenceOfExtendedString;
 
-class Standard_EXPORT DDS_DicItem : public MMgt_TShared
+//  Class, containing all information about one parameter:
+//  unique    : id
+//  obligative: label, type, short description, required
+//  optional  : format, units,
+//              min value, max value, default value.
+
+class DDS_DicItem : public MMgt_TShared
 {
 public:
-  //! Enum describes type of datum value
+  /*! Enum describes type of datum value */
   enum Type
   {
     String,  //!< String type of value
@@ -51,7 +57,7 @@ public:
     Unknown  //!< Unknown or undefined type of value
   };
 
-  //! Enum describes the flags for existance of domain data
+  /*! Enum describes the flags for existance of domain data */
   enum Data
   {
     MinValue = 0x01,    //!< Flag of minimum value definition existence
@@ -59,7 +65,7 @@ public:
     DefaultValue = 0x04 //!< Flag of default value definition existence
   };
 
-  //! This struct is intended for map of Format, Units, Precision and Scale
+  // This struct is intended for map of Format, Units, Precision and Scale
   struct UnitData
   {
     Standard_Real           myZero;
@@ -74,88 +80,88 @@ public:
 public:
   DDS_DicItem();
 
-  TCollection_AsciiString    GetId() const;
-  DDS_DicItem::Type          GetType() const;
-  TCollection_ExtendedString GetLabel() const;
-  TCollection_ExtendedString GetFilter() const;
-  TCollection_ExtendedString GetRequired() const;
-  DDS_MsgType                GetWarningLevel() const;
-  TCollection_ExtendedString GetLongDescription() const;
-  TCollection_ExtendedString GetShortDescription() const;
-  TCollection_AsciiString    GetComponent() const;
+  Standard_EXPORT TCollection_AsciiString    GetId() const;
+  Standard_EXPORT DDS_DicItem::Type          GetType() const;
+  Standard_EXPORT TCollection_ExtendedString GetLabel() const;
+  Standard_EXPORT TCollection_ExtendedString GetFilter() const;
+  Standard_EXPORT TCollection_ExtendedString GetRequired() const;
+  Standard_EXPORT DDS_MsgType                GetWarningLevel() const;
+  Standard_EXPORT TCollection_ExtendedString GetLongDescription() const;
+  Standard_EXPORT TCollection_ExtendedString GetShortDescription() const;
+  Standard_EXPORT TCollection_AsciiString    GetComponent() const;
 
-  TCollection_AsciiString    GetUnits() const;
-  TCollection_AsciiString    GetUnits( const UnitSystem& ) const;
+  Standard_EXPORT TCollection_AsciiString    GetUnits() const;
+  Standard_EXPORT TCollection_AsciiString    GetUnits( const UnitSystem& ) const;
 
-  TCollection_ExtendedString GetDefaultValue() const;
-  TCollection_ExtendedString GetDefaultValue( const UnitSystem& ) const;
+  Standard_EXPORT TCollection_ExtendedString GetDefaultValue() const;
+  Standard_EXPORT TCollection_ExtendedString GetDefaultValue( const UnitSystem& ) const;
 
-  Standard_Real              GetMinValue() const;
-  Standard_Real              GetMinValue( const UnitSystem& ) const;
+  Standard_EXPORT Standard_Real              GetMinValue() const;
+  Standard_EXPORT Standard_Real              GetMinValue( const UnitSystem& ) const;
 
-  Standard_Real              GetMaxValue() const;
-  Standard_Real              GetMaxValue( const UnitSystem& ) const;
+  Standard_EXPORT Standard_Real              GetMaxValue() const;
+  Standard_EXPORT Standard_Real              GetMaxValue( const UnitSystem& ) const;
 
-  Standard_Integer           GetPrecision() const;
-  Standard_Integer           GetPrecision( const UnitSystem& ) const;
+  Standard_EXPORT Standard_Integer           GetPrecision() const;
+  Standard_EXPORT Standard_Integer           GetPrecision( const UnitSystem& ) const;
 
-  TCollection_AsciiString    GetFormat( const Standard_Boolean = Standard_True ) const;
-  TCollection_AsciiString    GetFormat( const UnitSystem&,
-                                       const Standard_Boolean = Standard_True ) const;
-  TCollection_ExtendedString GetNameOfValues() const;
-  Standard_Boolean           GetListOfValues( Handle(TColStd_HArray1OfExtendedString)&,
-                                             Handle(TColStd_HArray1OfInteger)& ) const;
-  Standard_Boolean           GetListOfValues( Handle(TColStd_HArray1OfExtendedString)&,
-                                             Handle(TColStd_HArray1OfInteger)&,
-                                             Handle(TColStd_HArray1OfExtendedString)& ) const;
-  Standard_Boolean           GetSpecialValues( TColStd_MapOfReal& ) const;
+  Standard_EXPORT TCollection_AsciiString    GetFormat( const Standard_Boolean = Standard_True ) const;
+  Standard_EXPORT TCollection_AsciiString    GetFormat( const UnitSystem&,
+                                                        const Standard_Boolean = Standard_True ) const;
+  Standard_EXPORT TCollection_ExtendedString GetNameOfValues() const;
+  Standard_EXPORT Standard_Boolean           GetListOfValues( Handle(TColStd_HArray1OfExtendedString)&,
+                                                              Handle(TColStd_HArray1OfInteger)& ) const;
+  Standard_EXPORT Standard_Boolean           GetListOfValues( Handle(TColStd_HArray1OfExtendedString)&,
+                                                              Handle(TColStd_HArray1OfInteger)&,
+                                                              Handle(TColStd_HArray1OfExtendedString)& ) const;
+  Standard_EXPORT Standard_Boolean           GetSpecialValues( TColStd_MapOfReal& ) const;
 
-  Standard_Real              GetMinZoom() const;
-  Standard_Real              GetMaxZoom() const;
-  Standard_Real              GetZoomOrder() const;
+  Standard_EXPORT Standard_Real              GetMinZoom() const;
+  Standard_EXPORT Standard_Real              GetMaxZoom() const;
+  Standard_EXPORT Standard_Real              GetZoomOrder() const;
 
-  Standard_Real              ToSI( const Standard_Real ) const;
-  Standard_Real              FromSI( const Standard_Real ) const;
+  Standard_EXPORT Standard_Real              ToSI( const Standard_Real ) const;
+  Standard_EXPORT Standard_Real              FromSI( const Standard_Real ) const;
 
-  Standard_Real              ToSI( const Standard_Real, const UnitSystem& ) const;
-  Standard_Real              FromSI( const Standard_Real, const UnitSystem& ) const;
+  Standard_EXPORT Standard_Real              ToSI( const Standard_Real, const UnitSystem& ) const;
+  Standard_EXPORT Standard_Real              FromSI( const Standard_Real, const UnitSystem& ) const;
 
-  Standard_Boolean           HasData( const Standard_Integer ) const;
+  Standard_EXPORT Standard_Boolean           HasData( const Standard_Integer ) const;
 
-  TCollection_ExtendedString GetOption( const TCollection_AsciiString& ) const;
-  Standard_Boolean           GetOptionNames( TColStd_SequenceOfAsciiString& ) const;
+  Standard_EXPORT TCollection_ExtendedString GetOption( const TCollection_AsciiString& ) const;
+  Standard_EXPORT Standard_Boolean           GetOptionNames( TColStd_SequenceOfAsciiString& ) const;
 
 private:
   DDS_DicItem( const DDS_DicItem& );
-  void                       operator=( const DDS_DicItem& );
-  void                       FillDataMap( TCollection_AsciiString, const LDOM_Element&,
-                                         const LDOM_Element&, const LDOM_Element&,
-                                         const TColStd_SequenceOfAsciiString& );
-  void                       PrepareFormats( const TCollection_AsciiString& );
-  void                       GetDefaultFormat();
-  UnitSystem                 GetActiveUnitSystem() const;
-
-  void                       GetStringFormat( const TCollection_AsciiString&,
-                                             const TCollection_AsciiString&,
-                                             const TCollection_AsciiString&,
-                                             const TCollection_AsciiString&,
-                                             TCollection_AsciiString& );
-  void                       GetIntegerFormat( const TCollection_AsciiString&,
-                                              const TCollection_AsciiString&,
-                                              const TCollection_AsciiString&,
-                                              const TCollection_AsciiString&,
-                                              const Standard_Character,
-                                              TCollection_AsciiString& );
-  void                       GetFloatFormat( const TCollection_AsciiString&,
-                                            const TCollection_AsciiString&,
-                                            const TCollection_AsciiString&,
-                                            const TCollection_AsciiString&,
-                                            const Standard_Character,
-                                            TCollection_AsciiString& );
-  void                       Split( const TCollection_AsciiString&,
-                                   Handle(TColStd_HArray1OfExtendedString)& );
-  
-  UnitData*                  GetUnitData( const UnitSystem& ) const;
+  void                                       operator=( const DDS_DicItem& );
+  void                                       FillDataMap( TCollection_AsciiString, const LDOM_Element&,
+                                                          const LDOM_Element&, const LDOM_Element&,
+                                                          const TColStd_SequenceOfAsciiString& );
+  void                                       PrepareFormats( const TCollection_AsciiString& );
+  void                                       GetDefaultFormat();
+  UnitSystem                                 GetActiveUnitSystem() const;
+
+  void                                       GetStringFormat( const TCollection_AsciiString&,
+                                                              const TCollection_AsciiString&,
+                                                              const TCollection_AsciiString&,
+                                                              const TCollection_AsciiString&,
+                                                              TCollection_AsciiString& );
+  void                                       GetIntegerFormat( const TCollection_AsciiString&,
+                                                               const TCollection_AsciiString&,
+                                                               const TCollection_AsciiString&,
+                                                               const TCollection_AsciiString&,
+                                                               const Standard_Character,
+                                                               TCollection_AsciiString& );
+  void                                       GetFloatFormat( const TCollection_AsciiString&,
+                                                             const TCollection_AsciiString&,
+                                                             const TCollection_AsciiString&,
+                                                             const TCollection_AsciiString&,
+                                                             const Standard_Character,
+                                                             TCollection_AsciiString& );
+  void                                       Split( const TCollection_AsciiString&,
+                                                    Handle(TColStd_HArray1OfExtendedString)& );
+
+  UnitData*                                  GetUnitData( const UnitSystem& ) const;
 
 private:
   typedef NCollection_DataMap<TCollection_AsciiString, TCollection_ExtendedString> OptionsMap;
@@ -179,12 +185,14 @@ private:
 
   Standard_Integer                           myData;
 
+  // valueList
   TCollection_ExtendedString                 myListName;
 
   Handle(TColStd_HArray1OfExtendedString)    myListRef;
   Handle(TColStd_HArray1OfInteger)           myListRefID;
   Handle(TColStd_HArray1OfExtendedString)    myListRefIcons;
 
+  // presentation
   Standard_Real                              myMinZoom;
   Standard_Real                              myMaxZoom;
   Standard_Real                              myZoomOrder;
@@ -192,6 +200,7 @@ private:
   Handle(Standard_Transient)                 myComponent;
 
   OptionsMap                                 myOptions;
+  // unitData
   NCollection_DataMap<UnitSystem, UnitData>  myUnitData;
 
   friend class DDS_DicGroup;
index 289eb7d5dba1976340e3c4cf1015b6e3b6e52e58..9a5d5a886620a378ac109de2ecb56f415ea4c658 100644 (file)
 
 #include <MMgt_TShared.hxx>
 
-DEFINE_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared)
-
 class LDOM_Element;
 class TCollection_AsciiString;
 
-class Standard_EXPORT DDS_Dictionary : public MMgt_TShared
+DEFINE_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared)
+
+class DDS_Dictionary : public MMgt_TShared
 {
 public:
-  static Handle_DDS_Dictionary   Get();
+  Standard_EXPORT static Handle(DDS_Dictionary)  Get();
+
+  // Return instance of data dictionary. Create instance if it is NULL.
+
+  Standard_EXPORT Handle(DDS_DicItem)            GetDicItem( const TCollection_AsciiString& ) const;
+  Standard_EXPORT Handle(DDS_DicItem)            GetDicItem( const TCollection_AsciiString&,
+                                                             const TCollection_AsciiString& ) const;
 
-  Handle_DDS_DicItem             GetDicItem( const TCollection_AsciiString& ) const;
-  Handle_DDS_DicItem             GetDicItem( const TCollection_AsciiString&,
-                                            const TCollection_AsciiString& ) const;
+  Standard_EXPORT void                           GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
+  Standard_EXPORT void                           GetUnitSystems( TColStd_SequenceOfAsciiString&,
+                                                                 const TCollection_AsciiString& ) const;
+  Standard_EXPORT TCollection_ExtendedString     GetUnitSystemLabel( const TCollection_AsciiString& ) const;
+  Standard_EXPORT TCollection_ExtendedString     GetUnitSystemLabel( const TCollection_AsciiString&,
+                                                                     const TCollection_AsciiString& ) const;
+  Standard_EXPORT TCollection_AsciiString        GetActiveUnitSystem() const;
+  Standard_EXPORT TCollection_AsciiString        GetActiveUnitSystem( const TCollection_AsciiString& ) const;
+  Standard_EXPORT void                           SetActiveUnitSystem( const TCollection_AsciiString& );
+  Standard_EXPORT void                           SetActiveUnitSystem( const TCollection_AsciiString&,
+                                                                      const TCollection_AsciiString& );
 
-  void                           GetUnitSystems( TColStd_SequenceOfAsciiString& ) const;
-  void                           GetUnitSystems( TColStd_SequenceOfAsciiString&,
-                                                const TCollection_AsciiString& ) const;
-  TCollection_ExtendedString     GetUnitSystemLabel( const TCollection_AsciiString& ) const;
-  TCollection_ExtendedString     GetUnitSystemLabel( const TCollection_AsciiString&,
-                                                    const TCollection_AsciiString& ) const;
-  TCollection_AsciiString        GetActiveUnitSystem() const;
-  TCollection_AsciiString        GetActiveUnitSystem( const TCollection_AsciiString& ) const;
-  void                           SetActiveUnitSystem( const TCollection_AsciiString& );
-  void                           SetActiveUnitSystem( const TCollection_AsciiString&,
-                                                     const TCollection_AsciiString& );
-  
 
-  static Standard_Boolean        Load( const TCollection_AsciiString );
+  static Standard_EXPORT Standard_Boolean        Load( const TCollection_AsciiString );
 
-  static Standard_Real           ToSI( const Standard_Real, const Standard_CString );
-  static Standard_Real           FromSI( const Standard_Real, const Standard_CString );
+  static Standard_EXPORT Standard_Real           ToSI( const Standard_Real, const Standard_CString );
+  static Standard_EXPORT Standard_Real           FromSI( const Standard_Real, const Standard_CString );
 
-  static LDOMString              KeyWord( const TCollection_AsciiString& );
+  static Standard_EXPORT LDOMString              KeyWord( const TCollection_AsciiString& );
 
 private:
   DDS_Dictionary();
   DDS_Dictionary( const DDS_Dictionary& );
 
-  void                           operator=( const DDS_Dictionary& );
+  void                                           operator=( const DDS_Dictionary& );
 
-  void                           FillDataMap( const LDOM_Element&, const LDOM_Element& );
+  void                                           FillDataMap( const LDOM_Element&, const LDOM_Element& );
 
 private:
-  DDS_IndexedDataMapOfDicGroups  myGroupMap;
+  DDS_IndexedDataMapOfDicGroups                  myGroupMap;
 
 public:
   DEFINE_STANDARD_RTTI(DDS_Dictionary)
index f42fb4f667d5009539f0b8ce40c1de245670b89f..2161f71f3338eba070d98979e6ddb7533408b7d2 100644 (file)
@@ -29,14 +29,14 @@ DEFINE_STANDARD_HANDLE(DDS_KeyWords, MMgt_TShared)
 
 class TCollection_AsciiString;
 
-class Standard_EXPORT DDS_KeyWords : public MMgt_TShared
+class DDS_KeyWords : public MMgt_TShared
 {
 public:
-  static Handle_DDS_KeyWords  Get();
+  Standard_EXPORT static Handle(DDS_KeyWords) Get();
 
-  TCollection_AsciiString     GetKeyWord( const TCollection_AsciiString& ) const;
-  void                        SetKeyWord( const TCollection_AsciiString&,
-                                         const TCollection_AsciiString& );
+  Standard_EXPORT TCollection_AsciiString     GetKeyWord( const TCollection_AsciiString& ) const;
+  Standard_EXPORT void                        SetKeyWord( const TCollection_AsciiString&,
+                                                          const TCollection_AsciiString& );
 
 private:
   DDS_KeyWords();
@@ -46,7 +46,7 @@ private:
                               TCollection_AsciiString> KeyWordMap;
 
 private:
-  KeyWordMap                  myKeyWord;
+  KeyWordMap                                  myKeyWord;
 
 public:
   DEFINE_STANDARD_RTTI(DDS_KeyWords)
index ad1190e0ac2854220e42a0508a1db66357cf0863..7a049ffc655a22ad3bde28f7e32b9e9b2b466769 100644 (file)
@@ -1442,7 +1442,7 @@ bool GLViewer_TextObject::translateToEMF( HDC dc, GLViewer_CoordSystem* aViewerC
            y = double( yPos );
 
     aViewerCS->transform( *aEMFCS, x, y );
-    const char* str = aText.ascii();
+    const char* str = aText.toAscii();
 
     int nHeight = 35*14;       // height of font
     int nWidth = 35*12;        // average character width
index 433074a460dfbca1b48ee21977fb87a2ca9d707f..6fbf36182b49126aa622e514d5f2738b6d84901f 100644 (file)
@@ -390,8 +390,8 @@ static GLuint displayListBase( QFont* theFont )
     QMap<GLViewer_TexFindId, GLuint>::iterator it = GLViewer_TexFont::BitmapFontCache.begin();
     for ( ; it != GLViewer_TexFont::BitmapFontCache.end(); ++it )
     {
-      if ( it.key().myViewPortId == (int)ctx && it.data() > listBase )
-        listBase = it.data();
+      if ( it.key().myViewPortId == (int)ctx && it.value() > listBase )
+        listBase = it.value();
     }
     listBase += 256;
 
index 11e1229daf1b10320dc4deb9d019f0dae8fe4d76..0461a4eddca31f26ad878beb56d63aa3ff91fefe 100644 (file)
 #include <QKeyEvent>
 #include <QWheelEvent>
 
+#ifdef WIN32
+#include <Standard_Integer.hxx>
+#include <iostream>
+using namespace std;
+#endif
+
 /*!
     Constructor
 */
index 5f9a48434c4aa18b2dfddf4e7ba22052b0467460..663afcf4512d28521bff4ceb17821d0cb4574f48 100644 (file)
 #include <QColormap>
 #include <QMouseEvent>
 #include <QCoreApplication>
-#include <QX11Info>
 
 #include <stdlib.h>
 
 #if !defined WIN32
+#include <QX11Info>
 #include <GL/glx.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>
index 25fd15ac69342eb0d0224e7e13a49085f704a694..d80bddadb8c86936f47a4338753da86f113ed8ba 100644 (file)
@@ -34,7 +34,8 @@
 #include "GLViewer_Grid.h"
 #include "GLViewer_Drawer.h"
 
-#include <QtxToolTip.h>
+// TODO: Porting to Qt4
+//#include <QtxToolTip.h>
 
 #include <QHBoxLayout>
 #include <QMouseEvent>
@@ -104,10 +105,11 @@ GLViewer_ViewPort2d::GLViewer_ViewPort2d( QWidget* parent, GLViewer_ViewFrame* t
     mypFirstPoint = NULL;
     mypLastPoint = NULL;
 
-    myObjectTip = new QtxToolTip( myGLWidget );///GLViewer_ObjectTip( this );
+    // TODO: Porting to Qt4
+    /*myObjectTip = new QtxToolTip( myGLWidget );///GLViewer_ObjectTip( this );
     myObjectTip->setShowDelayTime( 60000 );
     connect( myObjectTip, SIGNAL( maybeTip( QPoint, QString&, QFont&, QRect&, QRect& ) ),
-             this, SLOT( onMaybeTip( QPoint, QString&, QFont&, QRect&, QRect& ) ) );
+             this, SLOT( onMaybeTip( QPoint, QString&, QFont&, QRect&, QRect& ) ) );*/
 //    myGLWidget->installEventFilter( myObjectTip );
 }
 
index 0f69c54e1f6a6633541fa500bdb7ed41782e8bd2..3a51f5c893f8b45efce1f7abb473a54258a46418 100644 (file)
@@ -794,7 +794,7 @@ bool GLViewer_Viewer2d::translateTo( VectorFileType aType, QString FileName, Pap
         HDC screen_dc = GetDC( 0 ); //The screen device context
         HDC bitDC = CreateCompatibleDC ( screen_dc ); //The context compatible with screen
 
-        hMetaFileDC = CreateEnhMetaFile( bitDC, FileName.ascii(), &r, "" );
+        hMetaFileDC = CreateEnhMetaFile( bitDC, FileName.toAscii(), &r, "" );
         SetMapMode( hMetaFileDC, MM_HIMETRIC );
         SetWindowOrgEx( hMetaFileDC, 0, r.bottom, NULL );
         HRGN ClipRgn = CreateRectRgn( 0, 0, AW, AH );
index a0d7e7195c68d69ed3df4bfb9ab4fe9895b82dce..69971a7b2aa8d8920b571f9945b59b6fabbf9764 100755 (executable)
@@ -19,7 +19,6 @@
 #include "VTKViewer_RenderWindow.h"
 
 #include <QColorDialog>
-#include <QX11Info>
 #include <QContextMenuEvent>
 
 #include <stdlib.h>
@@ -29,6 +28,7 @@
 #include <vtkRendererCollection.h>
 #include <vtkCamera.h>
 #ifndef WIN32
+#include <QX11Info>
 #include <vtkXOpenGLRenderWindow.h>
 //#include <GL/gl.h>
 //#include <GL/glu.h>