Browse Source

TQt4 port koffice

This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19
tags/v3.5.13
tpearson 8 years ago
parent
commit
f008adb5a7
100 changed files with 2097 additions and 2058 deletions
  1. 5
    5
      example/example_factory.cc
  2. 3
    2
      example/example_factory.h
  3. 15
    15
      example/example_part.cc
  4. 9
    8
      example/example_part.h
  5. 9
    9
      example/example_view.cc
  6. 4
    3
      example/example_view.h
  7. 13
    13
      filters/generic_wrapper/generic_filter.cc
  8. 9
    8
      filters/generic_wrapper/generic_filter.h
  9. 17
    17
      filters/karbon/ai/ai88handler.cc
  10. 1
    1
      filters/karbon/ai/aicolor.h
  11. 95
    95
      filters/karbon/ai/aielement.cc
  12. 28
    28
      filters/karbon/ai/aielement.h
  13. 13
    13
      filters/karbon/ai/aiimport.cc
  14. 6
    5
      filters/karbon/ai/aiimport.h
  15. 12
    12
      filters/karbon/ai/ailexer.cc
  16. 6
    6
      filters/karbon/ai/ailexer.h
  17. 78
    78
      filters/karbon/ai/aiparserbase.cc
  18. 26
    26
      filters/karbon/ai/aiparserbase.h
  19. 7
    7
      filters/karbon/ai/karbonaiparserbase.cc
  20. 11
    11
      filters/karbon/ai/karbonaiparserbase.h
  21. 39
    39
      filters/karbon/applixgraphics/applixgraphicimport.cc
  22. 4
    3
      filters/karbon/applixgraphics/applixgraphicimport.h
  23. 27
    27
      filters/karbon/eps/epsexport.cc
  24. 5
    4
      filters/karbon/eps/epsexport.h
  25. 14
    14
      filters/karbon/eps/epsexportdlg.cc
  26. 6
    5
      filters/karbon/eps/epsexportdlg.h
  27. 14
    14
      filters/karbon/eps/epsimport.cc
  28. 6
    5
      filters/karbon/eps/epsimport.h
  29. 14
    14
      filters/karbon/eps/pscommentlexer.cc
  30. 5
    5
      filters/karbon/eps/pscommentlexer.h
  31. 26
    26
      filters/karbon/kontour/kontourimport.cpp
  32. 8
    7
      filters/karbon/kontour/kontourimport.h
  33. 201
    201
      filters/karbon/msod/msod.cc
  34. 93
    93
      filters/karbon/msod/msod.h
  35. 66
    66
      filters/karbon/msod/msodimport.cc
  36. 16
    15
      filters/karbon/msod/msodimport.h
  37. 138
    138
      filters/karbon/oodraw/oodrawimport.cc
  38. 24
    23
      filters/karbon/oodraw/oodrawimport.h
  39. 16
    16
      filters/karbon/png/pngexport.cc
  40. 3
    2
      filters/karbon/png/pngexport.h
  41. 2
    2
      filters/karbon/svg/color.h
  42. 40
    40
      filters/karbon/svg/svgexport.cc
  43. 15
    14
      filters/karbon/svg/svgexport.h
  44. 5
    5
      filters/karbon/svg/svggraphiccontext.h
  45. 140
    140
      filters/karbon/svg/svgimport.cc
  46. 33
    32
      filters/karbon/svg/svgimport.h
  47. 12
    12
      filters/karbon/wmf/wmfexport.cc
  48. 10
    9
      filters/karbon/wmf/wmfexport.h
  49. 6
    6
      filters/karbon/wmf/wmfimport.cc
  50. 3
    2
      filters/karbon/wmf/wmfimport.h
  51. 28
    28
      filters/karbon/wmf/wmfimportparser.cc
  52. 24
    24
      filters/karbon/wmf/wmfimportparser.h
  53. 2
    2
      filters/karbon/xaml/color.h
  54. 30
    30
      filters/karbon/xaml/xamlexport.cc
  55. 12
    11
      filters/karbon/xaml/xamlexport.h
  56. 3
    3
      filters/karbon/xaml/xamlgraphiccontext.h
  57. 117
    117
      filters/karbon/xaml/xamlimport.cc
  58. 28
    27
      filters/karbon/xaml/xamlimport.h
  59. 122
    122
      filters/karbon/xcf/xcfexport.cc
  60. 5
    4
      filters/karbon/xcf/xcfexport.h
  61. 72
    72
      filters/karbon/xfig/xfigimport.cc
  62. 13
    12
      filters/karbon/xfig/xfigimport.h
  63. 8
    8
      filters/karbon/xfig/xfigimport_factory.cc
  64. 3
    2
      filters/karbon/xfig/xfigimport_factory.h
  65. 4
    4
      filters/kchart/bmp/bmpexport.cpp
  66. 3
    2
      filters/kchart/bmp/bmpexport.h
  67. 4
    4
      filters/kchart/jpeg/jpegexport.cpp
  68. 3
    2
      filters/kchart/jpeg/jpegexport.h
  69. 9
    9
      filters/kchart/libimageexport/imageexport.cpp
  70. 6
    5
      filters/kchart/libimageexport/imageexport.h
  71. 4
    4
      filters/kchart/mng/mngexport.cpp
  72. 3
    2
      filters/kchart/mng/mngexport.h
  73. 4
    4
      filters/kchart/png/pngexport.cpp
  74. 3
    2
      filters/kchart/png/pngexport.h
  75. 10
    10
      filters/kchart/svg/svgexport.cc
  76. 3
    2
      filters/kchart/svg/svgexport.h
  77. 4
    4
      filters/kchart/xbm/xbmexport.cpp
  78. 3
    2
      filters/kchart/xbm/xbmexport.h
  79. 4
    4
      filters/kchart/xpm/xpmexport.cpp
  80. 3
    2
      filters/kchart/xpm/xpmexport.h
  81. 12
    12
      filters/kformula/latex/latexexport.cc
  82. 5
    4
      filters/kformula/latex/latexexport.h
  83. 12
    12
      filters/kformula/mathml/mathmlexport.cc
  84. 5
    4
      filters/kformula/mathml/mathmlexport.h
  85. 13
    13
      filters/kformula/mathml/mathmlimport.cc
  86. 7
    6
      filters/kformula/mathml/mathmlimport.h
  87. 7
    7
      filters/kformula/png/pngexport.cc
  88. 5
    4
      filters/kformula/png/pngexport.h
  89. 62
    62
      filters/kformula/png/pngexportdia.cc
  90. 8
    7
      filters/kformula/png/pngexportdia.h
  91. 10
    10
      filters/kformula/svg/svgexport.cc
  92. 3
    2
      filters/kformula/svg/svgexport.h
  93. 21
    21
      filters/kivio/imageexport/kivio_imageexport.cpp
  94. 3
    2
      filters/kivio/imageexport/kivio_imageexport.h
  95. 6
    6
      filters/kivio/imageexport/kivio_imageexportdialog.cpp
  96. 4
    3
      filters/kivio/imageexport/kivio_imageexportdialog.h
  97. 12
    12
      filters/kivio/imageexport/kivio_imageexportwidget.ui
  98. 4
    4
      filters/kpresenter/bmp/bmpexport.cpp
  99. 3
    2
      filters/kpresenter/bmp/bmpexport.h
  100. 0
    0
      filters/kpresenter/jpeg/jpegexport.cpp

+ 5
- 5
example/example_factory.cc View File

@@ -30,8 +30,8 @@ K_EXPORT_COMPONENT_FACTORY( libexamplepart, ExampleFactory )
30 30
 KInstance* ExampleFactory::s_global = 0L;
31 31
 KAboutData* ExampleFactory::s_aboutData = 0L;
32 32
 
33
-ExampleFactory::ExampleFactory( QObject* parent, const char* name )
34
-    : KoFactory( parent, name )
33
+ExampleFactory::ExampleFactory( TQObject* tqparent, const char* name )
34
+    : KoFactory( tqparent, name )
35 35
 {
36 36
     global();
37 37
 }
@@ -44,14 +44,14 @@ ExampleFactory::~ExampleFactory()
44 44
     s_global = 0L;
45 45
 }
46 46
 
47
-KParts::Part* ExampleFactory::createPartObject( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, const char* classname, const QStringList & )
47
+KParts::Part* ExampleFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, const char* classname, const TQStringList & )
48 48
 {
49 49
     // If classname is "KoDocument", our host is a koffice application
50 50
     // otherwise, the host wants us as a simple part, so switch to readonly and single view.
51 51
     bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 );
52 52
 
53
-    // parentWidget and widgetName are used by KoDocument for the "readonly+singleView" case.
54
-    ExamplePart *part = new ExamplePart( parentWidget, widgetName, parent, name, !bWantKoDocument );
53
+    // tqparentWidget and widgetName are used by KoDocument for the "readonly+singleView" case.
54
+    ExamplePart *part = new ExamplePart( tqparentWidget, widgetName, tqparent, name, !bWantKoDocument );
55 55
 
56 56
     if ( !bWantKoDocument )
57 57
       part->setReadWrite( false );

+ 3
- 2
example/example_factory.h View File

@@ -28,11 +28,12 @@ class KAboutData;
28 28
 class ExampleFactory : public KoFactory
29 29
 {
30 30
     Q_OBJECT
31
+  TQ_OBJECT
31 32
 public:
32
-    ExampleFactory( QObject* parent = 0, const char* name = 0 );
33
+    ExampleFactory( TQObject* tqparent = 0, const char* name = 0 );
33 34
     ~ExampleFactory();
34 35
 
35
-    virtual KParts::Part *createPartObject( QWidget *parentWidget = 0, const char *widgetName = 0, QObject *parent = 0, const char *name = 0, const char *classname = "KoDocument", const QStringList &args = QStringList() );
36
+    virtual KParts::Part *createPartObject( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject *tqparent = 0, const char *name = 0, const char *classname = "KoDocument", const TQStringList &args = TQStringList() );
36 37
 
37 38
     static KInstance* global();
38 39
 

+ 15
- 15
example/example_part.cc View File

@@ -21,15 +21,15 @@
21 21
 #include "example_factory.h"
22 22
 #include "example_view.h"
23 23
 
24
-#include <qpainter.h>
24
+#include <tqpainter.h>
25 25
 
26
-ExamplePart::ExamplePart( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, bool singleViewMode )
27
-    : KoDocument( parentWidget, widgetName, parent, name, singleViewMode )
26
+ExamplePart::ExamplePart( TQWidget *tqparentWidget, const char *widgetName, TQObject* tqparent, const char* name, bool singleViewMode )
27
+    : KoDocument( tqparentWidget, widgetName, tqparent, name, singleViewMode )
28 28
 {
29 29
     setInstance( ExampleFactory::global(), false );
30 30
 }
31 31
 
32
-bool ExamplePart::initDoc(InitDocFlags flags, QWidget* parentWidget)
32
+bool ExamplePart::initDoc(InitDocFlags flags, TQWidget* tqparentWidget)
33 33
 {
34 34
     // If nothing is loaded, do initialize here
35 35
     // Most KOffice applications use the template dialog here, with code like:
@@ -46,27 +46,27 @@ bool ExamplePart::initDoc(InitDocFlags flags, QWidget* parentWidget)
46 46
     return TRUE;
47 47
 }
48 48
 
49
-KoView* ExamplePart::createViewInstance( QWidget* parent, const char* name )
49
+KoView* ExamplePart::createViewInstance( TQWidget* tqparent, const char* name )
50 50
 {
51
-    return new ExampleView( this, parent, name );
51
+    return new ExampleView( this, tqparent, name );
52 52
 }
53 53
 
54
-bool ExamplePart::loadXML( QIODevice *, const QDomDocument & )
54
+bool ExamplePart::loadXML( TQIODevice *, const TQDomDocument & )
55 55
 {
56
-    // TODO load the document from the QDomDocument
56
+    // TODO load the document from the TQDomDocument
57 57
     return true;
58 58
 }
59 59
 
60
-QDomDocument ExamplePart::saveXML()
60
+TQDomDocument ExamplePart::saveXML()
61 61
 {
62
-    // TODO save the document into a QDomDocument
63
-    return QDomDocument();
62
+    // TODO save the document into a TQDomDocument
63
+    return TQDomDocument();
64 64
 }
65 65
 
66
-bool ExamplePart::loadOasis( const QDomDocument & doc, KoOasisStyles& oasisStyles,
67
-		const QDomDocument & settings, KoStore* store )
66
+bool ExamplePart::loadOasis( const TQDomDocument & doc, KoOasisStyles& oasisStyles,
67
+		const TQDomDocument & settings, KoStore* store )
68 68
 {
69
-    // TODO load the document from the QDomDocument
69
+    // TODO load the document from the TQDomDocument
70 70
     return true;
71 71
 }
72 72
 
@@ -76,7 +76,7 @@ bool ExamplePart::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
76 76
     return true;
77 77
 }
78 78
 
79
-void ExamplePart::paintContent( QPainter& painter, const QRect& rect, bool /*transparent*/,
79
+void ExamplePart::paintContent( TQPainter& painter, const TQRect& rect, bool /*transparent*/,
80 80
                                 double /*zoomX*/, double /*zoomY*/ )
81 81
 {
82 82
     // ####### handle transparency

+ 9
- 8
example/example_part.h View File

@@ -25,22 +25,23 @@
25 25
 class ExamplePart : public KoDocument
26 26
 {
27 27
     Q_OBJECT
28
+  TQ_OBJECT
28 29
 public:
29
-    ExamplePart( QWidget *parentWidget = 0, const char *widgetName = 0, QObject* parent = 0, const char* name = 0, bool singleViewMode = false );
30
+    ExamplePart( TQWidget *tqparentWidget = 0, const char *widgetName = 0, TQObject* tqparent = 0, const char* name = 0, bool singleViewMode = false );
30 31
 
31
-    virtual void paintContent( QPainter& painter, const QRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 );
32
+    virtual void paintContent( TQPainter& painter, const TQRect& rect, bool transparent = FALSE, double zoomX = 1.0, double zoomY = 1.0 );
32 33
 
33
-    virtual bool initDoc(InitDocFlags flags, QWidget* parentWidget=0);
34
+    virtual bool initDoc(InitDocFlags flags, TQWidget* tqparentWidget=0);
34 35
 
35
-    virtual bool loadXML( QIODevice *, const QDomDocument & );
36
-    virtual QDomDocument saveXML();
36
+    virtual bool loadXML( TQIODevice *, const TQDomDocument & );
37
+    virtual TQDomDocument saveXML();
37 38
 
38
-    virtual bool loadOasis( const QDomDocument & doc, KoOasisStyles& oasisStyles,
39
-                            const QDomDocument & settings, KoStore* store );
39
+    virtual bool loadOasis( const TQDomDocument & doc, KoOasisStyles& oasisStyles,
40
+                            const TQDomDocument & settings, KoStore* store );
40 41
     virtual bool saveOasis( KoStore* store, KoXmlWriter* manifestWriter );
41 42
 
42 43
 protected:
43
-    virtual KoView* createViewInstance( QWidget* parent, const char* name );
44
+    virtual KoView* createViewInstance( TQWidget* tqparent, const char* name );
44 45
 };
45 46
 
46 47
 #endif

+ 9
- 9
example/example_view.cc View File

@@ -21,31 +21,31 @@
21 21
 #include "example_factory.h"
22 22
 #include "example_part.h"
23 23
 
24
-#include <qpainter.h>
25
-#include <qiconset.h>
24
+#include <tqpainter.h>
25
+#include <tqiconset.h>
26 26
 #include <kaction.h>
27 27
 #include <kstdaction.h>
28 28
 #include <klocale.h>
29 29
 #include <kdebug.h>
30 30
 
31
-ExampleView::ExampleView( ExamplePart* part, QWidget* parent, const char* name )
32
-    : KoView( part, parent, name )
31
+ExampleView::ExampleView( ExamplePart* part, TQWidget* tqparent, const char* name )
32
+    : KoView( part, tqparent, name )
33 33
 {
34 34
     setInstance( ExampleFactory::global() );
35 35
     if ( !part->isReadWrite() ) // readonly case, e.g. when embedded into konqueror
36 36
         setXMLFile( "example_readonly.rc" ); // simplified GUI
37 37
     else
38 38
         setXMLFile( "example.rc" );
39
-    KStdAction::copy(this, SLOT( copy() ), actionCollection(), "copy" );
40
-    KStdAction::cut(this, SLOT( cut() ), actionCollection(), "cut" );
39
+    KStdAction::copy(this, TQT_SLOT( copy() ), actionCollection(), "copy" );
40
+    KStdAction::cut(this, TQT_SLOT( cut() ), actionCollection(), "cut" );
41 41
     // Note: Prefer KStdAction::* to any custom action if possible.
42
-    //m_cut = new KAction( i18n("&Cut"), "editcut", 0, this, SLOT( cut() ),
42
+    //m_cut = new KAction( i18n("&Cut"), "editcut", 0, this, TQT_SLOT( cut() ),
43 43
     //                   actionCollection(), "cut");
44 44
 }
45 45
 
46
-void ExampleView::paintEvent( QPaintEvent* ev )
46
+void ExampleView::paintEvent( TQPaintEvent* ev )
47 47
 {
48
-    QPainter painter;
48
+    TQPainter painter;
49 49
     painter.begin( this );
50 50
 
51 51
     // ### TODO: Scaling

+ 4
- 3
example/example_view.h View File

@@ -23,22 +23,23 @@
23 23
 #include <KoView.h>
24 24
 
25 25
 class KAction;
26
-class QPaintEvent;
26
+class TQPaintEvent;
27 27
 
28 28
 class ExamplePart;
29 29
 
30 30
 class ExampleView : public KoView
31 31
 {
32 32
     Q_OBJECT
33
+  TQ_OBJECT
33 34
 public:
34
-    ExampleView( ExamplePart* part, QWidget* parent = 0, const char* name = 0 );
35
+    ExampleView( ExamplePart* part, TQWidget* tqparent = 0, const char* name = 0 );
35 36
 
36 37
 protected slots:
37 38
     void cut();
38 39
     void copy();
39 40
 
40 41
 protected:
41
-    void paintEvent( QPaintEvent* );
42
+    void paintEvent( TQPaintEvent* );
42 43
 
43 44
     virtual void updateReadWrite( bool readwrite );
44 45
 

+ 13
- 13
filters/generic_wrapper/generic_filter.cc View File

@@ -19,8 +19,8 @@
19 19
 
20 20
 #include <stdlib.h>
21 21
 
22
-#include <qtextcodec.h>
23
-#include <qfile.h>
22
+#include <tqtextcodec.h>
23
+#include <tqfile.h>
24 24
 
25 25
 #include <kdebug.h>
26 26
 #include <KoFilterChain.h>
@@ -37,11 +37,11 @@ typedef KGenericFactory<GenericFilter, KoFilter> GenericFilterFactory;
37 37
 K_EXPORT_COMPONENT_FACTORY( libgenerickofilter, GenericFilterFactory )
38 38
 
39 39
 
40
-GenericFilter::GenericFilter(KoFilter *, const char *, const QStringList&) :
40
+GenericFilter::GenericFilter(KoFilter *, const char *, const TQStringList&) :
41 41
     KoFilter() {
42 42
 }
43 43
 
44
-KoFilter::ConversionStatus GenericFilter::convert( const QCString &from, const QCString &to )
44
+KoFilter::ConversiontqStatus GenericFilter::convert( const TQCString &from, const TQCString &to )
45 45
 {
46 46
 
47 47
     //find the right script to use
@@ -80,14 +80,14 @@ KoFilter::ConversionStatus GenericFilter::convert( const QCString &from, const Q
80 80
         return KoFilter::NotImplemented;
81 81
 }
82 82
 
83
-KoFilter::ConversionStatus GenericFilter::doImport()
83
+KoFilter::ConversiontqStatus GenericFilter::doImport()
84 84
 {
85
-    KTempFile temp(QString("genericfilter-"));
85
+    KTempFile temp(TQString("genericfilter-"));
86 86
     temp.setAutoDelete(true);
87 87
 
88
-    QFile tempFile(temp.name());
88
+    TQFile tempFile(temp.name());
89 89
 
90
-    m_out = KoStore::createStore(&tempFile, KoStore::Write);
90
+    m_out = KoStore::createStore(TQT_TQIODEVICE(&tempFile), KoStore::Write);
91 91
 
92 92
     if (!m_out || !m_out->open("root"))
93 93
     {
@@ -97,15 +97,15 @@ KoFilter::ConversionStatus GenericFilter::doImport()
97 97
     }
98 98
     else
99 99
     {
100
-        QString exec = m_exec + " " + KProcess::quote(m_chain->inputFile()) + " "
100
+        TQString exec = m_exec + " " + KProcess::quote(m_chain->inputFile()) + " "
101 101
                        + KProcess::quote(m_chain->outputFile());
102
-        system(QFile::encodeName(exec));
102
+        system(TQFile::encodeName(exec));
103 103
 
104 104
         kdDebug() << "Executing: " << exec << endl;
105 105
 
106
-        QFile outFile(m_chain->outputFile());
106
+        TQFile outFile(m_chain->outputFile());
107 107
         outFile.open(IO_ReadOnly);
108
-        QByteArray outData = outFile.readAll();
108
+        TQByteArray outData = outFile.readAll();
109 109
         if (outData.size()==0) {
110 110
             m_out->close();
111 111
             return KoFilter::UnexpectedEOF;
@@ -119,7 +119,7 @@ KoFilter::ConversionStatus GenericFilter::doImport()
119 119
     return KoFilter::OK;
120 120
 }
121 121
 
122
-KoFilter::ConversionStatus GenericFilter::doExport()
122
+KoFilter::ConversiontqStatus GenericFilter::doExport()
123 123
 {
124 124
     return KoFilter::NotImplemented;
125 125
 }

+ 9
- 8
filters/generic_wrapper/generic_filter.h View File

@@ -20,8 +20,8 @@
20 20
 #ifndef __GENERICFILTER_H__
21 21
 #define __GENERICFILTER_H__
22 22
 
23
-#include <qcstring.h>
24
-#include <qstringlist.h>
23
+#include <tqcstring.h>
24
+#include <tqstringlist.h>
25 25
 
26 26
 #include <kprocess.h>
27 27
 #include <KoFilter.h>
@@ -30,17 +30,18 @@
30 30
 class GenericFilter : public KoFilter
31 31
 {
32 32
 	Q_OBJECT
33
+  TQ_OBJECT
33 34
 
34 35
 public:
35
-    GenericFilter(KoFilter *parent, const char *name, const QStringList&);
36
+    GenericFilter(KoFilter *tqparent, const char *name, const TQStringList&);
36 37
     virtual ~GenericFilter() {}
37 38
 
38
-    virtual KoFilter::ConversionStatus convert( const QCString& from,
39
-                                                const QCString& to );
39
+    virtual KoFilter::ConversiontqStatus convert( const TQCString& from,
40
+                                                const TQCString& to );
40 41
 private:
41
-    KoFilter::ConversionStatus doImport();
42
-    KoFilter::ConversionStatus doExport();
43
-    QString m_to, m_from, m_exec;
42
+    KoFilter::ConversiontqStatus doImport();
43
+    KoFilter::ConversiontqStatus doExport();
44
+    TQString m_to, m_from, m_exec;
44 45
     KoStore* m_out;
45 46
 };
46 47
 

+ 17
- 17
filters/karbon/ai/ai88handler.cc View File

@@ -326,7 +326,7 @@ void AI88Handler::_handleSetFillPattern()
326 326
   AIElement elem (m_delegate->m_stack.top());
327 327
   m_delegate->m_stack.pop();
328 328
 
329
-  const QValueVector<AIElement> aval = elem.toElementArray();
329
+  const TQValueVector<AIElement> aval = elem.toElementArray();
330 330
 
331 331
   double ka = m_delegate->getDoubleValue();
332 332
   double k = m_delegate->getDoubleValue();
@@ -341,7 +341,7 @@ void AI88Handler::_handleSetFillPattern()
341 341
   AIElement elem2 (m_delegate->m_stack.top());
342 342
   m_delegate->m_stack.pop();
343 343
 
344
-  const QString &name = elem2.toString();
344
+  const TQString &name = elem2.toString();
345 345
   if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotFillPattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
346 346
 }
347 347
 
@@ -350,7 +350,7 @@ void AI88Handler::_handleSetStrokePattern()
350 350
   AIElement elem (m_delegate->m_stack.top());
351 351
   m_delegate->m_stack.pop();
352 352
 
353
-  const QValueVector<AIElement> aval = elem.toElementArray();
353
+  const TQValueVector<AIElement> aval = elem.toElementArray();
354 354
 
355 355
   double ka = m_delegate->getDoubleValue();
356 356
   double k = m_delegate->getDoubleValue();
@@ -365,7 +365,7 @@ void AI88Handler::_handleSetStrokePattern()
365 365
   AIElement elem2 (m_delegate->m_stack.top());
366 366
   m_delegate->m_stack.pop();
367 367
 
368
-  const QString &name = elem2.toString();
368
+  const TQString &name = elem2.toString();
369 369
   if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotStrokePattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
370 370
 }
371 371
 
@@ -406,7 +406,7 @@ void AI88Handler::_handleSetStrokeColorGray()
406 406
 void AI88Handler::_handleSetFillColorCustom()
407 407
 {
408 408
   double g = m_delegate->getDoubleValue();
409
-  const QString name = m_delegate->getStringValue();
409
+  const TQString name = m_delegate->getStringValue();
410 410
   double k = m_delegate->getDoubleValue();
411 411
   double y = m_delegate->getDoubleValue();
412 412
   double m = m_delegate->getDoubleValue();
@@ -426,7 +426,7 @@ void AI88Handler::_handleSetDash()
426 426
   AIElement elem (m_delegate->m_stack.top());
427 427
   m_delegate->m_stack.pop();
428 428
 
429
-  const QValueVector<AIElement> aval = elem.toElementArray();
429
+  const TQValueVector<AIElement> aval = elem.toElementArray();
430 430
   if (m_delegate->m_gstateHandler) m_delegate->m_gstateHandler->gotDash (aval, fval);
431 431
 //  qDebug ("dash operation finished");
432 432
 }
@@ -436,7 +436,7 @@ void AI88Handler::_handlePatternDefinition()
436 436
   AIElement elem (m_delegate->m_stack.top());
437 437
   m_delegate->m_stack.pop();
438 438
 
439
-  const QValueVector<AIElement> aval = elem.toElementArray();
439
+  const TQValueVector<AIElement> aval = elem.toElementArray();
440 440
 
441 441
   double ury = m_delegate->getDoubleValue();
442 442
   double urx = m_delegate->getDoubleValue();
@@ -446,7 +446,7 @@ void AI88Handler::_handlePatternDefinition()
446 446
   AIElement elem2 (m_delegate->m_stack.top());
447 447
   m_delegate->m_stack.pop();
448 448
 
449
-  const QString &name = elem2.toString();
449
+  const TQString &name = elem2.toString();
450 450
 
451 451
   if (m_delegate->m_documentHandler) m_delegate->m_documentHandler->gotPatternDefinition (name.latin1(), aval, llx, lly, urx, ury);
452 452
 }
@@ -455,7 +455,7 @@ void AI88Handler::_handleGsaveIncludeDocument() {
455 455
   AIElement elem2 (m_delegate->m_stack.top());
456 456
   m_delegate->m_stack.pop();
457 457
 
458
-  const QString &name = elem2.toString();
458
+  const TQString &name = elem2.toString();
459 459
 
460 460
   int ury = m_delegate->getIntValue();
461 461
   int urx = m_delegate->getIntValue();
@@ -465,7 +465,7 @@ void AI88Handler::_handleGsaveIncludeDocument() {
465 465
   AIElement elem (m_delegate->m_stack.top());
466 466
   m_delegate->m_stack.pop();
467 467
 
468
-  const QValueVector<AIElement> aval = elem.toElementArray();
468
+  const TQValueVector<AIElement> aval = elem.toElementArray();
469 469
 
470 470
   if (m_delegate->m_embeddedHandler) m_delegate->m_embeddedHandler->gotGsaveIncludeDocument (aval, llx,lly,urx,ury,name.latin1());
471 471
 }
@@ -491,7 +491,7 @@ void AI88Handler::_handleSetCurrentText() {
491 491
   AIElement elem2 (m_delegate->m_stack.top());
492 492
   m_delegate->m_stack.pop();
493 493
 
494
-  const QString &fontname = elem2.toReference();
494
+  const TQString &fontname = elem2.toReference();
495 495
 
496 496
   if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotFontDefinition (fontname.latin1(), size, leading, kerning, ta);
497 497
 
@@ -502,7 +502,7 @@ void AI88Handler::_handleTextBlock (TextOperation to) {
502 502
   qDebug ("to element is (%s)",elem.typeName());
503 503
   m_delegate->m_stack.pop();
504 504
 
505
-  const QValueVector<AIElement> aval = elem.toElementArray();
505
+  const TQValueVector<AIElement> aval = elem.toElementArray();
506 506
 
507 507
   if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotTextBlockBegin (aval, to);
508 508
 }
@@ -511,7 +511,7 @@ void AI88Handler::_handleTextOutput () {
511 511
   AIElement elem (m_delegate->m_stack.top());
512 512
   m_delegate->m_stack.pop();
513 513
 
514
-  const QString &text = elem.toString();
514
+  const TQString &text = elem.toString();
515 515
 
516 516
   int length = -1;
517 517
 
@@ -535,15 +535,15 @@ void AI88Handler::_handleFontEncoding()
535 535
 
536 536
   AIElement elem (m_delegate->m_stack.top());
537 537
   m_delegate->m_stack.pop();
538
-  const QString &oldFont = elem.toReference();
538
+  const TQString &oldFont = elem.toReference();
539 539
 
540 540
   AIElement elem2 (m_delegate->m_stack.top());
541 541
   m_delegate->m_stack.pop();
542
-  const QString &newFont = elem2.toReference();
542
+  const TQString &newFont = elem2.toReference();
543 543
 
544 544
   AIElement elem3 (m_delegate->m_stack.top());
545 545
   m_delegate->m_stack.pop();
546
-  const QValueVector<AIElement> encodingData = elem3.toElementArray();
546
+  const TQValueVector<AIElement> encodingData = elem3.toElementArray();
547 547
 
548 548
   if (m_delegate->m_textHandler) m_delegate->m_textHandler->gotFontEncoding (encodingData, oldFont.latin1(), newFont.latin1());
549 549
 }
@@ -551,7 +551,7 @@ void AI88Handler::_handleFontEncoding()
551 551
 void AI88Handler::_handleSetStrokeColorCustom()
552 552
 {
553 553
   double g = m_delegate->getDoubleValue();
554
-  const QString name = m_delegate->getStringValue();
554
+  const TQString name = m_delegate->getStringValue();
555 555
   double k = m_delegate->getDoubleValue();
556 556
   double y = m_delegate->getDoubleValue();
557 557
   double m = m_delegate->getDoubleValue();

+ 1
- 1
filters/karbon/ai/aicolor.h View File

@@ -20,7 +20,7 @@
20 20
 #ifndef AICOLOR_H
21 21
 #define AICOLOR_H
22 22
 
23
-#include <qstring.h>
23
+#include <tqstring.h>
24 24
 
25 25
 /**
26 26
   *@author 

+ 95
- 95
filters/karbon/ai/aielement.cc View File

@@ -1,5 +1,5 @@
1 1
 /* This file is part of the KDE project
2
-   Copyright (C) 2002, Dirk Schönberger <dirk.schoenberger@sz-online.de>
2
+   Copyright (C) 2002, Dirk Sch�nberger <dirk.schoenberger@sz-online.de>
3 3
 
4 4
    This library is free software; you can redistribute it and/or
5 5
    modify it under the terms of the GNU Library General Public
@@ -18,7 +18,7 @@
18 18
 */
19 19
 
20 20
 #include "aielement.h"
21
-#include <qglobal.h>
21
+#include <tqglobal.h>
22 22
 
23 23
 AIElement::Private::Private()
24 24
 {
@@ -34,23 +34,23 @@ AIElement::Private::Private( Private* d )
34 34
 		case AIElement::String:
35 35
 		case AIElement::Reference:
36 36
 		case AIElement::Operator:
37
-	    value.ptr = new QString( *((QString*)d->value.ptr) );
37
+	    value.ptr = new TQString( *((TQString*)d->value.ptr) );
38 38
 	    break;
39 39
 		case AIElement::CString:
40
-	    // QCString is explicit shared
41
-	    value.ptr = new QCString( *((QCString*)d->value.ptr) );
40
+	    // TQCString is explicit shared
41
+	    value.ptr = new TQCString( *((TQCString*)d->value.ptr) );
42 42
 	    break;
43 43
 /*		case AIElement::List:
44
-	    value.ptr = new QValueList<AIElement>( *((QValueList<AIElement>*)d->value.ptr) );
44
+	    value.ptr = new TQValueList<AIElement>( *((TQValueList<AIElement>*)d->value.ptr) );
45 45
 	    break; */
46 46
 		case AIElement::ElementArray:
47
-	    value.ptr = new QValueVector<AIElement>( *((QValueVector<AIElement>*)d->value.ptr) );
47
+	    value.ptr = new TQValueVector<AIElement>( *((TQValueVector<AIElement>*)d->value.ptr) );
48 48
 	    break;
49 49
 		case AIElement::Block:
50
-	    value.ptr = new QValueVector<AIElement>( *((QValueVector<AIElement>*)d->value.ptr) );
50
+	    value.ptr = new TQValueVector<AIElement>( *((TQValueVector<AIElement>*)d->value.ptr) );
51 51
 	    break;
52 52
 		case AIElement::ByteArray:
53
-	    value.ptr = new QByteArray( *((QByteArray*)d->value.ptr) );
53
+	    value.ptr = new TQByteArray( *((TQByteArray*)d->value.ptr) );
54 54
 	    break;
55 55
 		case AIElement::Int:
56 56
 	    value.i = d->value.i;
@@ -83,22 +83,22 @@ void AIElement::Private::clear()
83 83
 		case AIElement::String:
84 84
 		case AIElement::Operator:
85 85
 		case AIElement::Reference:
86
-	    delete (QString*)value.ptr;
86
+	    delete (TQString*)value.ptr;
87 87
 	    break;
88 88
 		case AIElement::CString:
89
-	    delete (QCString*)value.ptr;
89
+	    delete (TQCString*)value.ptr;
90 90
 	    break;
91 91
 /*		case AIElement::List:
92
-	    delete (QValueList<AIElement>*)value.ptr;
92
+	    delete (TQValueList<AIElement>*)value.ptr;
93 93
 	    break; */
94 94
 		case AIElement::ElementArray:
95
-	    delete (QValueVector<AIElement>*)value.ptr;
95
+	    delete (TQValueVector<AIElement>*)value.ptr;
96 96
 	    break;
97 97
 		case AIElement::Block:
98
-	    delete (QValueVector<AIElement>*)value.ptr;
98
+	    delete (TQValueVector<AIElement>*)value.ptr;
99 99
 	    break;
100 100
 		case AIElement::ByteArray:
101
-	    delete (QByteArray*)value.ptr;
101
+	    delete (TQByteArray*)value.ptr;
102 102
 	    break;
103 103
 		case AIElement::Invalid:
104 104
 		case AIElement::Int:
@@ -136,7 +136,7 @@ AIElement::~AIElement()
136 136
 /*!
137 137
   Constructs a copy of the aielement, \a p, passed as the argument to this
138 138
   constructor. Usually this is a deep copy, but a shallow copy is made
139
-  if the stored data type is explicitly shared, as e.g. QImage is.
139
+  if the stored data type is explicitly shared, as e.g. TQImage is.
140 140
 */
141 141
 AIElement::AIElement( const AIElement& p )
142 142
 {
@@ -147,25 +147,25 @@ AIElement::AIElement( const AIElement& p )
147 147
 /*!
148 148
   Constructs a new aielement with a string value, \a val.
149 149
 */
150
-AIElement::AIElement( const QString& val, Type type )
150
+AIElement::AIElement( const TQString& val, Type type )
151 151
 {
152 152
   d = new Private;
153 153
   d->typ = type;
154
-  d->value.ptr = new QString( val );
154
+  d->value.ptr = new TQString( val );
155 155
 }
156 156
 
157 157
 /*!
158 158
   Constructs a new aielement with a C-string value, \a val.
159 159
 
160
-  If you want to modify the QCString after you've passed it to this
160
+  If you want to modify the TQCString after you've passed it to this
161 161
   constructor, we recommend passing a deep copy (see
162
-  QCString::copy()).
162
+  TQCString::copy()).
163 163
 */
164
-AIElement::AIElement( const QCString& val )
164
+AIElement::AIElement( const TQCString& val )
165 165
 {
166 166
   d = new Private;
167 167
   d->typ = CString;
168
-  d->value.ptr = new QCString( val );
168
+  d->value.ptr = new TQCString( val );
169 169
 }
170 170
 
171 171
 /*!
@@ -180,7 +180,7 @@ AIElement::AIElement( const char* val )
180 180
   if ( val == 0 )
181 181
 	  return;
182 182
   d->typ = CString;
183
-  d->value.ptr = new QCString( val );
183
+  d->value.ptr = new TQCString( val );
184 184
 }
185 185
 
186 186
 /*!
@@ -227,32 +227,32 @@ AIElement::AIElement( double val )
227 227
 /*!
228 228
   Constructs a new aielement with a list value, \a val.
229 229
 */
230
-/* AIElement::AIElement( const QValueList<AIElement>& val )
230
+/* AIElement::AIElement( const TQValueList<AIElement>& val )
231 231
 {
232 232
   d = new Private;
233 233
   d->typ = List;
234
-  d->value.ptr = new QValueList<AIElement>( val );
234
+  d->value.ptr = new TQValueList<AIElement>( val );
235 235
 }  */
236 236
 
237
-AIElement::AIElement( const QValueVector<AIElement>& val, Type type )
237
+AIElement::AIElement( const TQValueVector<AIElement>& val, Type type )
238 238
 {
239 239
   d = new Private;
240 240
   d->typ = type;
241
-  d->value.ptr = new QValueVector<AIElement>( val );
241
+  d->value.ptr = new TQValueVector<AIElement>( val );
242 242
 }
243 243
 
244
-AIElement::AIElement( const QByteArray& val )
244
+AIElement::AIElement( const TQByteArray& val )
245 245
 {
246 246
   d = new Private;
247 247
   d->typ = ByteArray;
248
-  d->value.ptr = new QByteArray( val );
248
+  d->value.ptr = new TQByteArray( val );
249 249
 }
250 250
 
251 251
 /*!
252 252
   Assigns the value of the aielement \a aielement to this aielement.
253 253
 
254 254
   This is a deep copy of the aielement, but note that if the aielement
255
-  holds an explicitly shared type such as QImage, a shallow copy
255
+  holds an explicitly shared type such as TQImage, a shallow copy
256 256
   is performed.
257 257
 */
258 258
 AIElement& AIElement::operator= ( const AIElement& aielement )
@@ -283,7 +283,7 @@ void AIElement::detach()
283 283
 /*!
284 284
   Returns the name of the type stored in the aielement.
285 285
   The returned strings describe the C++ datatype used to store the
286
-  data: for example, "QFont", "QString", or "QValueList<AIElement>".
286
+  data: for example, "TQFont", TQSTRING_OBJECT_NAME_STRING, or "TQValueList<AIElement>".
287 287
   An Invalid aielement returns 0.
288 288
 */
289 289
 const char* AIElement::typeName() const
@@ -310,16 +310,16 @@ static const int ntypes = 11;
310 310
 static const char* const type_map[ntypes] =
311 311
 {
312 312
   0,
313
-//  "QValueList<AIElement>",
314
-  "QString",
313
+//  "TQValueList<AIElement>",
314
+  TQSTRING_OBJECT_NAME_STRING,
315 315
   "int",
316 316
   "uint",
317 317
   "double",
318
-  "QCString",
318
+  "TQCString",
319 319
   "Operator",
320 320
   "Reference",
321
-  "QValueVector<AIElement>",
322
-  "QByteArray",
321
+  "TQValueVector<AIElement>",
322
+  TQBYTEARRAY_OBJECT_NAME_STRING,
323 323
   "uchar",
324 324
 };
325 325
 
@@ -351,59 +351,59 @@ AIElement::Type AIElement::nameToType( const char* name )
351 351
 }
352 352
 
353 353
 /*!
354
-  Returns the aielement as a QString if the aielement has type()
354
+  Returns the aielement as a TQString if the aielement has type()
355 355
   String, CString, ByteArray, Int, Uint, Double,
356
-  or QString::null otherwise.
356
+  or TQString() otherwise.
357 357
 
358 358
   \sa asString()
359 359
 */
360
-const QString AIElement::toString() const
360
+const TQString AIElement::toString() const
361 361
 {
362 362
   if ( d->typ == CString )
363
-	  return QString::fromLatin1( toCString() );
363
+	  return TQString::tqfromLatin1( toCString() );
364 364
   if ( d->typ == Int )
365
-	  return QString::number( toInt() );
365
+	  return TQString::number( toInt() );
366 366
   if ( d->typ == UInt )
367
-	  return QString::number( toUInt() );
367
+	  return TQString::number( toUInt() );
368 368
   if ( d->typ == Double )
369
-	  return QString::number( toDouble() );
369
+	  return TQString::number( toDouble() );
370 370
   if ( d->typ == Byte )
371
-	  return QString::number( toByte() );
371
+	  return TQString::number( toByte() );
372 372
   if ( d->typ != String )
373
-	  return QString::null;
374
-  return *((QString*)d->value.ptr);
373
+	  return TQString();
374
+  return *((TQString*)d->value.ptr);
375 375
 }
376 376
 
377
-const QString AIElement::toReference() const
377
+const TQString AIElement::toReference() const
378 378
 {
379 379
   if ( d->typ != Reference )
380
-	  return QString::null;
381
-  return *((QString*)d->value.ptr);
380
+	  return TQString();
381
+  return *((TQString*)d->value.ptr);
382 382
 }
383 383
 
384
-const QString AIElement::toOperator() const
384
+const TQString AIElement::toOperator() const
385 385
 {
386 386
   if ( d->typ != Operator )
387
-	  return QString::null;
388
-  return *((QString*)d->value.ptr);
387
+	  return TQString();
388
+  return *((TQString*)d->value.ptr);
389 389
 }
390 390
 
391 391
 /*!
392
-  Returns the aielement as a QCString if the aielement has type()
392
+  Returns the aielement as a TQCString if the aielement has type()
393 393
   CString or String, or a 0 otherwise.
394 394
 
395 395
   \sa asCString()
396 396
 */
397
-const QCString AIElement::toCString() const
397
+const TQCString AIElement::toCString() const
398 398
 {
399 399
   if ( d->typ == CString )
400
-	  return *((QCString*)d->value.ptr);
400
+	  return *((TQCString*)d->value.ptr);
401 401
   if ( d->typ == String )
402
-	  return ((QString*)d->value.ptr)->latin1();
402
+	  return ((TQString*)d->value.ptr)->latin1();
403 403
   if ( d->typ == Operator )
404
-	  return ((QString*)d->value.ptr)->latin1();
404
+	  return ((TQString*)d->value.ptr)->latin1();
405 405
   if ( d->typ == Reference )
406
-	  return ((QString*)d->value.ptr)->latin1();
406
+	  return ((TQString*)d->value.ptr)->latin1();
407 407
 
408 408
   return 0;
409 409
 }
@@ -421,9 +421,9 @@ const QCString AIElement::toCString() const
421 421
 int AIElement::toInt( bool * ok ) const
422 422
 {
423 423
   if( d->typ == String )
424
-	  return ((QString*)d->value.ptr)->toInt( ok );
424
+	  return ((TQString*)d->value.ptr)->toInt( ok );
425 425
   if ( d->typ == CString )
426
-	  return ((QCString*)d->value.ptr)->toInt( ok );
426
+	  return ((TQCString*)d->value.ptr)->toInt( ok );
427 427
   if ( ok )
428 428
 	  *ok = canCast( UInt );
429 429
   if( d->typ == Int )
@@ -440,9 +440,9 @@ int AIElement::toInt( bool * ok ) const
440 440
 uchar AIElement::toByte( bool * ok ) const
441 441
 {
442 442
   if( d->typ == String )
443
-	  return ((QString*)d->value.ptr)->toShort( ok );
443
+	  return ((TQString*)d->value.ptr)->toShort( ok );
444 444
   if ( d->typ == CString )
445
-	  return ((QCString*)d->value.ptr)->toShort( ok );
445
+	  return ((TQCString*)d->value.ptr)->toShort( ok );
446 446
   if ( ok )
447 447
 	  *ok = canCast( UInt );
448 448
   if( d->typ == Byte )
@@ -469,9 +469,9 @@ uchar AIElement::toByte( bool * ok ) const
469 469
 uint AIElement::toUInt( bool * ok ) const
470 470
 {
471 471
   if( d->typ == String )
472
-	  return ((QString*)d->value.ptr)->toUInt( ok );
472
+	  return ((TQString*)d->value.ptr)->toUInt( ok );
473 473
   if ( d->typ == CString )
474
-	  return ((QCString*)d->value.ptr)->toUInt( ok );
474
+	  return ((TQCString*)d->value.ptr)->toUInt( ok );
475 475
   if ( ok )
476 476
 	  *ok = canCast( UInt );
477 477
   if( d->typ == Int )
@@ -498,9 +498,9 @@ uint AIElement::toUInt( bool * ok ) const
498 498
 double AIElement::toDouble( bool * ok ) const
499 499
 {
500 500
   if( d->typ == String )
501
-	  return ((QString*)d->value.ptr)->toDouble( ok );
501
+	  return ((TQString*)d->value.ptr)->toDouble( ok );
502 502
   if ( d->typ == CString )
503
-	  return ((QCString*)d->value.ptr)->toDouble( ok );
503
+	  return ((TQCString*)d->value.ptr)->toDouble( ok );
504 504
   if ( ok )
505 505
 	  *ok = canCast( Double );
506 506
   if ( d->typ == Double )
@@ -515,14 +515,14 @@ double AIElement::toDouble( bool * ok ) const
515 515
 }
516 516
 
517 517
 /*!
518
-  Returns the aielement as a QValueList<AIElement> if the aielement has type()
518
+  Returns the aielement as a TQValueList<AIElement> if the aielement has type()
519 519
   List or StringList, or an empty list otherwise.
520 520
 
521 521
   Note that if you want to iterate over the list, you should
522 522
   iterate over a copy, e.g.
523 523
     \code
524
-    QValueList<AIElement> list = myAIElement.toList();
525
-    QValueList<AIElement>::Iterator it = list.begin();
524
+    TQValueList<AIElement> list = myAIElement.toList();
525
+    TQValueList<AIElement>::Iterator it = list.begin();
526 526
     while( it != list.end() ) {
527 527
 	myProcessing( *it );
528 528
 	++it;
@@ -531,40 +531,40 @@ double AIElement::toDouble( bool * ok ) const
531 531
 
532 532
   \sa asList()
533 533
 */
534
-/* const QValueList<AIElement> AIElement::toList() const
534
+/* const TQValueList<AIElement> AIElement::toList() const
535 535
 {
536 536
   if ( d->typ == List )
537
-	  return *((QValueList<AIElement>*)d->value.ptr);
538
-  return QValueList<AIElement>();
537
+	  return *((TQValueList<AIElement>*)d->value.ptr);
538
+  return TQValueList<AIElement>();
539 539
 } */
540 540
 
541
-const QValueVector<AIElement> AIElement::toElementArray() const
541
+const TQValueVector<AIElement> AIElement::toElementArray() const
542 542
 {
543 543
   if ( d->typ == ElementArray )
544
-	  return *((QValueVector<AIElement>*)d->value.ptr);
545
-  return QValueVector<AIElement>();
544
+	  return *((TQValueVector<AIElement>*)d->value.ptr);
545
+  return TQValueVector<AIElement>();
546 546
 }
547 547
 
548
-const QValueVector<AIElement> AIElement::toBlock() const
548
+const TQValueVector<AIElement> AIElement::toBlock() const
549 549
 {
550 550
   if ( d->typ == Block )
551
-	  return *((QValueVector<AIElement>*)d->value.ptr);
552
-  return QValueVector<AIElement>();
551
+	  return *((TQValueVector<AIElement>*)d->value.ptr);
552
+  return TQValueVector<AIElement>();
553 553
 }
554 554
 
555 555
 
556
-const QByteArray AIElement::toByteArray() const
556
+const TQByteArray AIElement::toByteArray() const
557 557
 {
558 558
   if ( d->typ == ByteArray )
559
-	  return *((QByteArray*)d->value.ptr);
560
-  return QByteArray();
559
+	  return *((TQByteArray*)d->value.ptr);
560
+  return TQByteArray();
561 561
 }
562 562
 
563
-#define Q_VARIANT_AS( f ) Q##f& AIElement::as##f() { \
564
-   if ( d->typ != f ) *this = AIElement( to##f() ); else detach(); return *((Q##f*)d->value.ptr);}
563
+#define TQ_VARIANT_AS( f ) TQ##f& AIElement::as##f() { \
564
+   if ( d->typ != f ) *this = AIElement( to##f() ); else detach(); return *((TQ##f*)d->value.ptr);}
565 565
 
566
-Q_VARIANT_AS(String)
567
-Q_VARIANT_AS(CString)
566
+TQ_VARIANT_AS(String)
567
+TQ_VARIANT_AS(CString)
568 568
 
569 569
 /*!
570 570
   Returns the aielement's value as int reference.
@@ -632,41 +632,41 @@ uchar& AIElement::asByte()
632 632
   Note that if you want to iterate over the list, you should
633 633
   iterate over a copy, e.g.
634 634
     \code
635
-    QValueList<AIElement> list = myAIElement.asList();
636
-    QValueList<AIElement>::Iterator it = list.begin();
635
+    TQValueList<AIElement> list = myAIElement.asList();
636
+    TQValueList<AIElement>::Iterator it = list.begin();
637 637
     while( it != list.end() ) {
638 638
 	myProcessing( *it );
639 639
 	++it;
640 640
     }
641 641
     \endcode
642 642
 */
643
-/* QValueList<AIElement>& AIElement::asList()
643
+/* TQValueList<AIElement>& AIElement::asList()
644 644
 {
645 645
   if ( d->typ != List )
646 646
 	  *this = AIElement( toList() );
647
-  return *((QValueList<AIElement>*)d->value.ptr);
647
+  return *((TQValueList<AIElement>*)d->value.ptr);
648 648
 }  */
649 649
 
650
-QValueVector<AIElement>& AIElement::asElementArray()
650
+TQValueVector<AIElement>& AIElement::asElementArray()
651 651
 {
652 652
   if ( d->typ != ElementArray )
653 653
 	  *this = AIElement( toElementArray() );
654
-  return *((QValueVector<AIElement>*)d->value.ptr);
654
+  return *((TQValueVector<AIElement>*)d->value.ptr);
655 655
 }
656 656
 
657
-QValueVector<AIElement>& AIElement::asBlock()
657
+TQValueVector<AIElement>& AIElement::asBlock()
658 658
 {
659 659
   if ( d->typ != Block )
660 660
 	  *this = AIElement( toBlock() );
661
-  return *((QValueVector<AIElement>*)d->value.ptr);
661
+  return *((TQValueVector<AIElement>*)d->value.ptr);
662 662
 }
663 663
 
664 664
 
665
-QByteArray& AIElement::asByteArray()
665
+TQByteArray& AIElement::asByteArray()
666 666
 {
667 667
   if ( d->typ != ByteArray )
668 668
 	  *this = AIElement( toByteArray() );
669
-  return *((QByteArray*)d->value.ptr);
669
+  return *((TQByteArray*)d->value.ptr);
670 670
 }
671 671
 
672 672
 /*!

+ 28
- 28
filters/karbon/ai/aielement.h View File

@@ -20,11 +20,11 @@
20 20
 #ifndef AIELEMENT_H
21 21
 #define AIELEMENT_H
22 22
 
23
-// #include <qvaluelist.h>
24
-#include <qvaluevector.h>
23
+// #include <tqvaluelist.h>
24
+#include <tqvaluevector.h>
25 25
 
26
-class QString;
27
-class QCString;
26
+class TQString;
27
+class TQCString;
28 28
 
29 29
 /**
30 30
   *@author 
@@ -52,15 +52,15 @@ public:
52 52
     AIElement();
53 53
     ~AIElement();
54 54
     AIElement( const AIElement& );
55
-    AIElement( const QString&, Type type = String );
56
-    AIElement( const QCString& );
55
+    AIElement( const TQString&, Type type = String );
56
+    AIElement( const TQCString& );
57 57
     AIElement( const char* );
58
-//    AIElement( const QValueList<AIElement>& );
59
-    AIElement( const QValueVector<AIElement>&, Type type = ElementArray);
58
+//    AIElement( const TQValueList<AIElement>& );
59
+    AIElement( const TQValueVector<AIElement>&, Type type = ElementArray);
60 60
     AIElement( int );
61 61
     AIElement( uint );
62 62
     AIElement( double );
63
-    AIElement( const QByteArray& );
63
+    AIElement( const TQByteArray& );
64 64
     AIElement( uchar );
65 65
 
66 66
     AIElement& operator= ( const AIElement& );
@@ -77,36 +77,36 @@ public:
77 77
 
78 78
     void clear();
79 79
 
80
-    const QString toString() const;
81
-    const QCString toCString() const;
80
+    const TQString toString() const;
81
+    const TQCString toCString() const;
82 82
     int toInt( bool * ok=0 ) const;
83 83
     uint toUInt( bool * ok=0 ) const;
84 84
     double toDouble( bool * ok=0 ) const;
85
-//    const QValueList<AIElement> toList() const;
86
-    const QValueVector<AIElement> toElementArray() const;
87
-    const QValueVector<AIElement> toBlock() const;
85
+//    const TQValueList<AIElement> toList() const;
86
+    const TQValueVector<AIElement> toElementArray() const;
87
+    const TQValueVector<AIElement> toBlock() const;
88 88
 
89 89
     // Custom types
90
-    const QString toReference() const;
91
-    const QString toOperator() const;
92
-    const QByteArray toByteArray() const;
90
+    const TQString toReference() const;
91
+    const TQString toOperator() const;
92
+    const TQByteArray toByteArray() const;
93 93
     uchar toByte( bool * ok=0 ) const;
94 94
 
95
-//    QValueListConstIterator<AIElement> listBegin() const;
96
-//    QValueListConstIterator<AIElement> listEnd() const;
97
-    QString& asString();
98
-    QCString& asCString();
95
+//    TQValueListConstIterator<AIElement> listBegin() const;
96
+//    TQValueListConstIterator<AIElement> listEnd() const;
97
+    TQString& asString();
98
+    TQCString& asCString();
99 99
     int& asInt();
100 100
     uint& asUInt();
101 101
     double& asDouble();
102
-//    QValueList<AIElement>& asList();
103
-    QValueVector<AIElement>& asElementArray();
104
-    QValueVector<AIElement>& asBlock();
102
+//    TQValueList<AIElement>& asList();
103
+    TQValueVector<AIElement>& asElementArray();
104
+    TQValueVector<AIElement>& asBlock();
105 105
 
106 106
     // Custom types
107
-    QString& asReference();
108
-    QString& asToken();
109
-    QByteArray& asByteArray();
107
+    TQString& asReference();
108
+    TQString& asToken();
109
+    TQByteArray& asByteArray();
110 110
     uchar& asByte();
111 111
 
112 112
     static const char* typeToName( Type typ );
@@ -115,7 +115,7 @@ public:
115 115
 private:
116 116
     void detach();
117 117
 
118
-    class Private : public QShared
118
+    class Private : public TQShared
119 119
     {
120 120
     public:
121 121
         Private();

+ 13
- 13
filters/karbon/ai/aiimport.cc View File

@@ -1,5 +1,5 @@
1 1
 /* This file is part of the KDE project
2
-   Copyright (C) 2002, Dirk Schönberger <dirk.schoenberger@sz-online.de>
2
+   Copyright (C) 2002, Dirk Sch�nberger <dirk.schoenberger@sz-online.de>
3 3
 
4 4
    This library is free software; you can redistribute it and/or
5 5
    modify it under the terms of the GNU Library General Public
@@ -17,10 +17,10 @@
17 17
  * Boston, MA 02110-1301, USA.
18 18
 */
19 19
 
20
-#include <qdom.h>
21
-#include <qcstring.h>
22
-#include <qfile.h>
23
-#include <qstring.h>
20
+#include <tqdom.h>
21
+#include <tqcstring.h>
22
+#include <tqfile.h>
23
+#include <tqstring.h>
24 24
 
25 25
 #include <kgenericfactory.h>
26 26
 #include <KoFilterChain.h>
@@ -47,7 +47,7 @@ protected:
47 47
 
48 48
 K_EXPORT_COMPONENT_FACTORY( libkarbonaiimport, AiImportFactory() )
49 49
 
50
-AiImport::AiImport( KoFilter*, const char*, const QStringList& )
50
+AiImport::AiImport( KoFilter*, const char*, const TQStringList& )
51 51
 	: KoFilter()
52 52
 {
53 53
 }
@@ -56,29 +56,29 @@ AiImport::~AiImport()
56 56
 {
57 57
 }
58 58
 
59
-KoFilter::ConversionStatus
60
-AiImport::convert( const QCString& from, const QCString& to )
59
+KoFilter::ConversiontqStatus
60
+AiImport::convert( const TQCString& from, const TQCString& to )
61 61
 {
62 62
 	if ( from != "application/illustrator" || to != "application/x-karbon" )
63 63
 	{
64 64
 		return KoFilter::NotImplemented;
65 65
 	}
66
-	QFile fileIn( m_chain->inputFile() );
66
+	TQFile fileIn( m_chain->inputFile() );
67 67
 	if( !fileIn.open( IO_ReadOnly ) )
68 68
 	{
69 69
 		fileIn.close();
70 70
 		return KoFilter::FileNotFound;
71 71
 	}
72 72
 
73
-        QDomDocument doc ("DOC");
73
+        TQDomDocument doc ("DOC");
74 74
 	KarbonAIParserBase parser;
75 75
 
76
-        if (!parser.parse (fileIn, doc))
76
+        if (!parser.parse (*TQT_TQIODEVICE(&fileIn), doc))
77 77
         {
78 78
 		fileIn.close();
79 79
 		return KoFilter::CreationError;
80 80
         }
81
-	QString result = doc.toString();
81
+	TQString result = doc.toString();
82 82
 
83 83
         kdDebug() << result << endl;
84 84
 	KoStoreDevice* storeOut = m_chain->storageFile( "root", KoStore::Write );
@@ -88,7 +88,7 @@ AiImport::convert( const QCString& from, const QCString& to )
88 88
 		return KoFilter::StorageCreationError;
89 89
 	}
90 90
 
91
-	QCString cStr = result.latin1();
91
+	TQCString cStr = result.latin1();
92 92
 	storeOut->writeBlock( cStr, cStr.size() - 1 );
93 93
 
94 94
 	return KoFilter::OK;

+ 6
- 5
filters/karbon/ai/aiimport.h View File

@@ -24,20 +24,21 @@
24 24
 
25 25
 #include "karbonaiparserbase.h"
26 26
 
27
-class QDomElement;
28
-class QTextStream;
27
+class TQDomElement;
28
+class TQTextStream;
29 29
 
30 30
 class AiImport : public KoFilter
31 31
 {
32 32
 	Q_OBJECT
33
+  TQ_OBJECT
33 34
 
34 35
 public:
35
-	AiImport( KoFilter* parent, const char* name, const QStringList& );
36
+	AiImport( KoFilter* tqparent, const char* name, const TQStringList& );
36 37
 	virtual ~AiImport();
37 38
 
38
-	virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
39
+	virtual KoFilter::ConversiontqStatus convert( const TQCString& from, const TQCString& to );
39 40
 /* private:
40
-   QString m_result; */
41
+   TQString m_result; */
41 42
 
42 43
 
43 44
 };

+ 12
- 12
filters/karbon/ai/ailexer.cc View File

@@ -19,7 +19,7 @@
19 19
 
20 20
 #include <ctype.h>
21 21
 #include <stdlib.h>
22
-#include <qstringlist.h>
22
+#include <tqstringlist.h>
23 23
 #include "ailexer.h"
24 24
 
25 25
 #define CATEGORY_WHITESPACE -1
@@ -173,7 +173,7 @@ AILexer::AILexer(){
173 173
 AILexer::~AILexer(){
174 174
 }
175 175
 
176
-bool AILexer::parse (QIODevice& fin){
176
+bool AILexer::parse (TQIODevice& fin){
177 177
   char c;
178 178
 
179 179
   m_buffer.clear();
@@ -350,7 +350,7 @@ void AILexer::gotByte (uchar value) {
350 350
   qDebug ( "got byte %d" , value );
351 351
 }
352 352
 
353
-void AILexer::gotByteArray (const QByteArray &data) {
353
+void AILexer::gotByteArray (const TQByteArray &data) {
354 354
   qDebug ( "got byte array" );
355 355
 /*  for ( uint i = 0; i < data.size(); i++ )
356 356
   {
@@ -413,11 +413,11 @@ void AILexer::doHandleByteArray ()
413 413
   uint strIdx = 0;
414 414
   uint arrayIdx = 0;
415 415
 
416
-  QByteArray data (m_buffer.length() >> 1);
416
+  TQByteArray data (m_buffer.length() >> 1);
417 417
 
418 418
   while (strIdx < m_buffer.length())
419 419
   {
420
-    const QString &item = m_buffer.mid (strIdx, 2);
420
+    const TQString &item = m_buffer.mid (strIdx, 2);
421 421
     uchar val = item.toShort(NULL, 16);
422 422
     data[arrayIdx] = val;
423 423
     strIdx += 2;
@@ -431,7 +431,7 @@ uchar AILexer::getByte()
431 431
 {
432 432
 //  qDebug ("convert string to byte (%s)", m_buffer.latin1());
433 433
 
434
-  QStringList list = QStringList::split ("#", m_buffer.toString());
434
+  TQStringList list = TQStringList::split ("#", m_buffer.toString());
435 435
   int radix = list[0].toShort();
436 436
   uchar value = list[1].toShort (NULL, radix);
437 437
 
@@ -471,8 +471,8 @@ void StringBuffer::clear(){
471 471
   m_length = 0;
472 472
 }
473 473
 
474
-QString StringBuffer::toString() const {
475
-  QString ret(m_buffer);
474
+TQString StringBuffer::toString() const {
475
+  TQString ret(m_buffer);
476 476
   return ret;
477 477
 }
478 478
 
@@ -495,12 +495,12 @@ uint StringBuffer::length() {
495 495
 }
496 496
 
497 497
 double StringBuffer::toFloat() {
498
-  QString data = toString();
498
+  TQString data = toString();
499 499
   return data.toFloat();
500 500
 }
501 501
 
502 502
 int StringBuffer::toInt() {
503
-  QString data = toString();
503
+  TQString data = toString();
504 504
   return data.toInt();
505 505
 }
506 506
 
@@ -508,7 +508,7 @@ const char *StringBuffer::latin1() {
508 508
   return m_buffer;
509 509
 }
510 510
 
511
-QString StringBuffer::mid( uint index, uint len) const {
512
-  QString data = toString();
511
+TQString StringBuffer::mid( uint index, uint len) const {
512
+  TQString data = toString();
513 513
   return data.mid(index,len);
514 514
 }

+ 6
- 6
filters/karbon/ai/ailexer.h View File

@@ -20,8 +20,8 @@
20 20
 #ifndef AILEXER_H
21 21
 #define AILEXER_H
22 22
 
23
-#include <qiodevice.h>
24
-#include <qstring.h>
23
+#include <tqiodevice.h>
24
+#include <tqstring.h>
25 25
 
26 26
 /**
27 27
   *@author Dirk Schönberger
@@ -65,12 +65,12 @@ public:
65 65
 
66 66
   void append (char c);
67 67
   void clear();
68
-  QString toString() const;
68
+  TQString toString() const;
69 69
   uint length();
70 70
   double toFloat();
71 71
   int toInt();
72 72
   const char *latin1();
73
-  QString mid( uint index, uint len=0xffffffff) const;
73
+  TQString mid( uint index, uint len=0xffffffff) const;
74 74
 private:
75 75
   char *m_buffer;
76 76
   uint m_length;
@@ -84,7 +84,7 @@ public:
84 84
 	AILexer();
85 85
 	virtual ~AILexer();
86 86
 
87
-  virtual bool parse (QIODevice& fin);
87
+  virtual bool parse (TQIODevice& fin);
88 88
 private:
89 89
   State m_curState;
90 90
   StringBuffer m_buffer;
@@ -116,7 +116,7 @@ protected:
116 116
   virtual void gotArrayStart ();
117 117
   virtual void gotArrayEnd ();
118 118
   virtual void gotByte (uchar value);
119
-  virtual void gotByteArray (const QByteArray &data);
119
+  virtual void gotByteArray (const TQByteArray &data);
120 120
 };
121 121
 
122 122
 #endif

+ 78
- 78
filters/karbon/ai/aiparserbase.cc View File

@@ -20,8 +20,8 @@
20 20
 #include "aiparserbase.h"
21 21
 #include "ai88handler.h"
22 22
 #include "ai3handler.h"
23
-#include <qregexp.h>
24
-#include <qstringlist.h>
23
+#include <tqregexp.h>
24
+#include <tqstringlist.h>
25 25
 
26 26
 typedef struct {
27 27
   char* op;
@@ -204,7 +204,7 @@ AIParserBase::~AIParserBase(){
204 204
 
205 205
 }
206 206
 
207
-bool AIParserBase::parse (QIODevice& fin){
207
+bool AIParserBase::parse (TQIODevice& fin){
208 208
   return AILexer::parse (fin);
209 209
 }
210 210
 
@@ -376,13 +376,13 @@ void AIParserBase::handleElement (AIElement &element)
376 376
   if (m_sink == DS_Array)
377 377
   {
378 378
     if (m_debug) qDebug ("in mode array");
379
-    QValueVector<AIElement> &elementArray = m_arrayStack.top();
379
+    TQValueVector<AIElement> &elementArray = m_arrayStack.top();
380 380
     elementArray.push_back(element);
381 381
   }
382 382
   if (m_sink == DS_Block)
383 383
   {
384 384
     if (m_debug) qDebug ("in mode block");
385
-    QValueVector<AIElement> &elementArray = m_blockStack.top();
385
+    TQValueVector<AIElement> &elementArray = m_blockStack.top();
386 386
     elementArray.push_back(element);
387 387
   }
388 388
   else
@@ -425,7 +425,7 @@ void AIParserBase::gotReference (const char *value) {
425 425
   if (m_ignoring) return;
426 426
   if (value == NULL) value = "";
427 427
   if (m_debug) qDebug ("reference: %s", value);
428
-  QString string(value);
428
+  TQString string(value);
429 429
   AIElement element (string, AIElement::Reference);
430 430
   handleElement (element);
431 431
   if (m_debug) qDebug ("/got reference value");
@@ -441,7 +441,7 @@ void AIParserBase::gotByte (uchar value) {
441 441
   if (m_debug) qDebug ("/got byte value");
442 442
 }
443 443
 
444
-void AIParserBase::gotByteArray (const QByteArray &data) {
444
+void AIParserBase::gotByteArray (const TQByteArray &data) {
445 445
   if (m_ignoring) return;
446 446
   AIElement element (data);
447 447
   handleElement (element);
@@ -452,7 +452,7 @@ void AIParserBase::gotArrayStart () {
452 452
   if (m_ignoring) return;
453 453
   if (m_debug) qDebug ("got array start");
454 454
 
455
-  QValueVector<AIElement> array;
455
+  TQValueVector<AIElement> array;
456 456
   m_arrayStack.push (array);
457 457
 
458 458
   m_sink = DS_Array;
@@ -462,7 +462,7 @@ void AIParserBase::gotBlockStart () {
462 462
   if (m_ignoring) return;
463 463
   if (m_debug) qDebug ("got block start");
464 464
 
465
-  QValueVector<AIElement> array;
465
+  TQValueVector<AIElement> array;
466 466
   m_blockStack.push (array);
467 467
 
468 468
   m_sink = DS_Block;
@@ -472,7 +472,7 @@ void AIParserBase::gotArrayEnd () {
472 472
   if (m_ignoring) return;
473 473
   if (m_debug) qDebug ("got array end");
474 474
 
475
-  QValueVector<AIElement> stackArray = m_arrayStack.pop();
475
+  TQValueVector<AIElement> stackArray = m_arrayStack.pop();
476 476
 
477 477
   if (m_arrayStack.empty())
478 478
   {
@@ -491,7 +491,7 @@ void AIParserBase::gotArrayEnd () {
491 491
   else
492 492
   {
493 493
     if (m_debug) qDebug ("put elements to nest stack level");
494
-    QValueVector<AIElement> currentTOS = m_arrayStack.top();
494
+    TQValueVector<AIElement> currentTOS = m_arrayStack.top();
495 495
     currentTOS.push_back (stackArray);
496 496
   }
497 497
 }
@@ -500,7 +500,7 @@ void AIParserBase::gotBlockEnd () {
500 500
   if (m_ignoring) return;
501 501
   if (m_debug) qDebug ("got block end");
502 502
 
503
-  QValueVector<AIElement> stackArray = m_blockStack.pop();
503
+  TQValueVector<AIElement> stackArray = m_blockStack.pop();
504 504
 
505 505
   if (m_blockStack.empty())
506 506
   {
@@ -519,7 +519,7 @@ void AIParserBase::gotBlockEnd () {
519 519
   else
520 520
   {
521 521
     if (m_debug) qDebug ("put elements to nest stack level");
522
-    QValueVector<AIElement> currentTOS = m_blockStack.top();
522
+    TQValueVector<AIElement> currentTOS = m_blockStack.top();
523 523
     currentTOS.push_back (stackArray);
524 524
   }
525 525
 }
@@ -531,7 +531,7 @@ void AIParserBase::gotBlockEnd () {
531 531
   AIElement elem (m_stack.top());
532 532
   m_stack.pop();
533 533
 
534
-  const QValueVector<AIElement> aval = elem.toElementArray();
534
+  const TQValueVector<AIElement> aval = elem.toElementArray();
535 535
   if (m_gstateHandler) m_gstateHandler->gotDash (aval, fval);
536 536
 } */
537 537
 
@@ -553,7 +553,7 @@ void AIParserBase::gotBlockEnd () {
553 553
   AIElement elem (m_stack.top());
554 554
   m_stack.pop();
555 555
 
556
-  const QValueVector<AIElement> aval = elem.toElementArray();
556
+  const TQValueVector<AIElement> aval = elem.toElementArray();
557 557
 
558 558
   double ka = getDoubleValue();
559 559
   double k = getDoubleValue();
@@ -568,7 +568,7 @@ void AIParserBase::gotBlockEnd () {
568 568
   AIElement elem2 (m_stack.top());
569 569
   m_stack.pop();
570 570
 
571
-  const QString &name = elem2.toString();
571
+  const TQString &name = elem2.toString();
572 572
   if (m_gstateHandler) m_gstateHandler->gotFillPattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
573 573
 } */
574 574
 
@@ -577,7 +577,7 @@ void AIParserBase::gotBlockEnd () {
577 577
   AIElement elem (m_stack.top());
578 578
   m_stack.pop();
579 579
 
580
-  const QValueVector<AIElement> aval = elem.toElementArray();
580
+  const TQValueVector<AIElement> aval = elem.toElementArray();
581 581
 
582 582
   double ka = getDoubleValue();
583 583
   double k = getDoubleValue();
@@ -592,7 +592,7 @@ void AIParserBase::gotBlockEnd () {
592 592
   AIElement elem2 (m_stack.top());
593 593
   m_stack.pop();
594 594
 
595
-  const QString &name = elem2.toString();
595
+  const TQString &name = elem2.toString();
596 596
   if (m_gstateHandler) m_gstateHandler->gotStrokePattern (name.latin1(), px, py, sx, sy, angle, rf, r, k, ka, aval);
597 597
 } */
598 598
 
@@ -632,7 +632,7 @@ void AIParserBase::gotBlockEnd () {
632 632
 /*Ai88*/ /* void AIParserBase::_handleSetFillColorCustom()
633 633
 {
634 634
   double g = getDoubleValue();
635
-  const QString &name = getStringValue();
635
+  const TQString &name = getStringValue();
636 636
   double k = getDoubleValue();
637 637
   double y = getDoubleValue();
638 638
   double m = getDoubleValue();
@@ -648,7 +648,7 @@ void AIParserBase::_handlePSGet() {
648 648
   m_stack.pop();
649 649
   m_stack.pop();
650 650
 
651
-  QString name ("xxx");
651
+  TQString name ("xxx");
652 652
   AIElement ref (name,AIElement::Reference);
653 653
   m_stack.push (ref);
654 654
 }
@@ -660,7 +660,7 @@ void AIParserBase::_handlePSExec() {
660 660
 void AIParserBase::_handlePSString() {
661 661
   m_stack.pop();
662 662
 
663
-  QString name ("stringval");
663
+  TQString name ("stringval");
664 664
   AIElement ref (name,AIElement::Reference);
665 665
   m_stack.push (ref);
666 666
 }
@@ -668,13 +668,13 @@ void AIParserBase::_handlePSString() {
668 668
 void AIParserBase::_handlePSBind() {
669 669
   m_stack.pop();
670 670
 
671
-  QString name ("bindentry");
671
+  TQString name ("bindentry");
672 672
   AIElement ref (name,AIElement::Reference);
673 673
   m_stack.push (ref);
674 674
 }
675 675
 
676 676
 void AIParserBase::_handlePSUserdict() {
677
-  QString name ("userdict");
677
+  TQString name ("userdict");
678 678
   AIElement ref (name,AIElement::Reference);
679 679
   m_stack.push (ref);
680 680
 }
@@ -684,7 +684,7 @@ void AIParserBase::_handlePSDict() {
684 684
   m_stack.pop();
685 685
   m_stack.pop();
686 686
 
687
-  QString name ("dict");
687
+  TQString name ("dict");
688 688
   AIElement ref (name,AIElement::Reference);
689 689
   m_stack.push (ref);
690 690
 }
@@ -699,7 +699,7 @@ void AIParserBase::_handlePSDup() {
699 699
 void AIParserBase::_handlePSBegin() {
700 700
   m_stack.pop();
701 701
 
702
-  QString name ("dictionary begin");
702
+  TQString name ("dictionary begin");
703 703
   AIElement ref (name,AIElement::Reference);
704 704
   m_stack.push (ref);
705 705
 }
@@ -714,7 +714,7 @@ void AIParserBase::_handlePSPut() {
714 714
   AIElement elem (m_stack.top());
715 715
   m_stack.pop();
716 716
 
717
-  const QValueVector<AIElement> aval = elem.toElementArray();
717
+  const TQValueVector<AIElement> aval = elem.toElementArray();
718 718
 
719 719
   double ury = getDoubleValue();
720 720
   double urx = getDoubleValue();
@@ -724,7 +724,7 @@ void AIParserBase::_handlePSPut() {
724 724
   AIElement elem2 (m_stack.top());
725 725
   m_stack.pop();
726 726
 
727
-  const QString &name = elem2.toString();
727
+  const TQString &name = elem2.toString();
728 728
 
729 729
   if (m_documentHandler) m_documentHandler->gotPatternDefinition (name.latin1(), aval, llx, lly, urx, ury);
730 730
 } */
@@ -740,7 +740,7 @@ void AIParserBase::_handlePSDef() {
740 740
 /*Ai88*/ /* void AIParserBase::_handleSetStrokeColorCustom()
741 741
 {
742 742
   double g = getDoubleValue();
743
-  const QString &name = getStringValue();
743
+  const TQString &name = getStringValue();
744 744
   double k = getDoubleValue();
745 745
   double y = getDoubleValue();
746 746
   double m = getDoubleValue();
@@ -763,22 +763,22 @@ void AIParserBase::_handleDocumentCustomColors(const char *) {
763 763
 
764 764
 void AIParserBase::_handleDocumentNeededResources(const char *data) {
765 765
   if (!data) return;
766
-  QStringList items = QStringList::split (' ', data);
766
+  TQStringList items = TQStringList::split (' ', data);
767 767
 
768
-  QString itemType = items[1];
769
-  QString name = items[2];
770
-  QString version = items[3];
771
-  QString release = items[4];
768
+  TQString itemType = items[1];
769
+  TQString name = items[2];
770
+  TQString version = items[3];
771
+  TQString release = items[4];
772 772
 }
773 773
 
774 774
 void AIParserBase::_handleIncludeResource(const char *data) {
775 775
   if (!data) return;
776
-  QStringList items = QStringList::split (' ', data);
776
+  TQStringList items = TQStringList::split (' ', data);
777 777
 
778
-  QString itemType = items[1];
779
-  QString name = items[2];
780
-  QString version = items[3];
781
-  QString release = items[4];
778
+  TQString itemType = items[1];
779
+  TQString name = items[2];
780
+  TQString version = items[3];
781
+  TQString release = items[4];
782 782
 
783 783
   m_modules.push_back (name);
784 784
 }
@@ -787,20 +787,20 @@ void AIParserBase::_handleDocumentProcessColors(const char *data) {
787 787
   if (!data) return;
788 788
 
789 789
   int colorSet = 0;
790
-  QString tmp (data);
790
+  TQString tmp (data);
791 791
 
792 792
   signed int index;
793 793
 
794
-  index = tmp.find ("Cyan");
794
+  index = tmp.tqfind ("Cyan");
795 795
   if (index > 0) colorSet |= PC_Cyan;
796 796
 
797
-  index = tmp.find ("Magenta");
797
+  index = tmp.tqfind ("Magenta");
798 798
   if (index > 0) colorSet |= PC_Magenta;
799 799
 
800
-  index = tmp.find ("Yellow");
800
+  index = tmp.tqfind ("Yellow");
801 801
   if (index > 0) colorSet |= PC_Yellow;
802 802
 
803
-  index = tmp.find ("Black");
803
+  index = tmp.tqfind ("Black");
804 804
   if (index > 0) colorSet |= PC_Black;
805 805
 
806 806
   if (m_documentHandler) m_documentHandler->gotProcessColors (colorSet);
@@ -813,7 +813,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
813 813
   AIElement elem2 (m_stack.top());
814 814
   m_stack.pop();
815 815
 
816
-  const QString &name = elem2.toString();
816
+  const TQString &name = elem2.toString();
817 817
 
818 818
   int ury = getIntValue();
819 819
   int urx = getIntValue();
@@ -823,7 +823,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
823 823
   AIElement elem (m_stack.top());
824 824
   m_stack.pop();
825 825
 
826
-  const QValueVector<AIElement> aval = elem.toElementArray();
826
+  const TQValueVector<AIElement> aval = elem.toElementArray();
827 827
 
828 828
   if (m_embeddedHandler) m_embeddedHandler->gotGsaveIncludeDocument (aval, llx,lly,urx,ury,name.latin1());
829 829
 } */
@@ -849,7 +849,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
849 849
   AIElement elem2 (m_stack.top());
850 850
   m_stack.pop();
851 851
 
852
-  const QString &fontname = elem2.toReference();
852
+  const TQString &fontname = elem2.toReference();
853 853
 
854 854
   if (m_textHandler) m_textHandler->gotFontDefinition (fontname.latin1(), size, leading, kerning, ta);
855 855
 } */
@@ -859,7 +859,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
859 859
   qDebug ("to element is (%s)",elem.typeName());
860 860
   m_stack.pop();
861 861
 
862
-  const QValueVector<AIElement> aval = elem.toElementArray();
862
+  const TQValueVector<AIElement> aval = elem.toElementArray();
863 863
 
864 864
   if (m_textHandler) m_textHandler->gotTextBlockBegin (aval, to);
865 865
 } */
@@ -868,7 +868,7 @@ void AIParserBase::_handleCMYKCustomColor(const char *) {
868 868
   AIElement elem (m_stack.top());
869 869
   m_stack.pop();
870 870
 
871
-  const QString &text = elem.toString();
871
+  const TQString &text = elem.toString();
872 872
 
873 873
   int length = -1;
874 874
 
@@ -888,11 +888,11 @@ void AIParserBase::_handleCreationDate (const char *data)
888 888
 {
889 889
   if (!data) return;
890 890
 
891
-  QRegExp test ("\\((.+)\\) \\((.+)\\)");
891
+  TQRegExp test ("\\((.+)\\) \\((.+)\\)");
892 892
   if (test.search (data))
893 893
   {
894
-    QString val1 = test.cap(1);
895
-    QString val2 = test.cap(2);
894
+    TQString val1 = test.cap(1);
895
+    TQString val2 = test.cap(2);
896 896
 
897 897
    if (m_documentHandler) m_documentHandler->gotCreationDate (val1.latin1(),val2.latin1());
898 898
   }
@@ -907,7 +907,7 @@ void AIParserBase::gotToken (const char *value) {
907 907
   if (m_sink == DS_Array)
908 908
   {
909 909
     if (m_debug) qDebug ("token in array");
910
-    QString op (value);
910
+    TQString op (value);
911 911
     AIElement realElement (op, AIElement::Operator);
912 912
     handleElement (realElement);
913 913
 
@@ -916,7 +916,7 @@ void AIParserBase::gotToken (const char *value) {
916 916
   if (m_sink == DS_Block)
917 917
   {
918 918
     if (m_debug) qDebug ("token in block");
919
-    QString op (value);
919
+    TQString op (value);
920 920
     AIElement realElement (op, AIElement::Operator);
921 921
     handleElement (realElement);
922 922
 
@@ -943,9 +943,9 @@ void AIParserBase::gotToken (const char *value) {
943 943
       }
944 944
       qWarning ( "unknown operator: %s", value );
945 945
 
946
-      QString string(value);
946
+      TQString string(value);
947 947
 
948
-      if (m_modules.findIndex(string) != -1)
948
+      if (m_modules.tqfindIndex(string) != -1)
949 949
       {
950 950
         AIElement element (string, AIElement::Reference);
951 951
         handleElement (element);
@@ -1019,13 +1019,13 @@ const bool AIParserBase::getBoolValue(void) {
1019 1019
   return getIntValue() == 1;
1020 1020
 }
1021 1021
 
1022
-const QString AIParserBase::getStringValue(void) {
1022
+const TQString AIParserBase::getStringValue(void) {
1023 1023
   const AIElement &elem = m_stack.pop();
1024 1024
 
1025 1025
   return elem.toString();
1026 1026
 }
1027 1027
 
1028
-const QString AIParserBase::getOperatorValue(void) {
1028
+const TQString AIParserBase::getOperatorValue(void) {
1029 1029
   const AIElement &elem = m_stack.pop();
1030 1030
 
1031 1031
   return elem.toOperator();
@@ -1034,7 +1034,7 @@ const QString AIParserBase::getOperatorValue(void) {
1034 1034
 AIOperation AIParserBase::getAIOperation (const char *operand)
1035 1035
 {
1036 1036
   int i=0;
1037
-  QString cmpValue (operand);
1037
+  TQString cmpValue (operand);
1038 1038
 
1039 1039
   for(;;) {    AIOperationMapping map = aiMappings[i];
1040 1040
     if (map.op == NULL) return AIO_Other;
@@ -1047,7 +1047,7 @@ AIOperation AIParserBase::getAIOperation (const char *operand)
1047 1047
 PSOperation AIParserBase::getPSOperation (const char *operand)
1048 1048
 {
1049 1049
   int i=0;
1050
-  QString cmpValue (operand);
1050
+  TQString cmpValue (operand);
1051 1051
 
1052 1052
   for(;;) {    PSOperationMapping map = psMappings[i];
1053 1053
     if (map.op == NULL) return PSO_Other;
@@ -1058,7 +1058,7 @@ PSOperation AIParserBase::getPSOperation (const char *operand)
1058 1058
 }
1059 1059
 
1060 1060
 CommentOperation AIParserBase::getCommentOperation (const char *command) {
1061
-  QString data (command);
1061
+  TQString data (command);
1062 1062
 
1063 1063
   signed int index;
1064 1064
 
@@ -1067,28 +1067,28 @@ CommentOperation AIParserBase::getCommentOperation (const char *command) {
1067 1067
   for(;;) {
1068 1068
     CommentOperationMapping map = commentMappings[i];
1069 1069
     if (map.op == NULL) return CO_Other;
1070
-    index = data.find (map.op);
1070
+    index = data.tqfind (map.op);
1071 1071
     if (index >= 0) return map.action;
1072 1072
     i++;
1073 1073
   }
1074 1074
 }
1075 1075
 
1076
-void GStateHandlerBase::gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData) {
1076
+void GStateHandlerBase::gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData) {
1077 1077
   qDebug ( "got fill pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka);
1078 1078
   arraytoa (transformData);
1079 1079
   qDebug ("/got fill pattern");
1080 1080
 }
1081 1081
 
1082
-void GStateHandlerBase::gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData) {
1082
+void GStateHandlerBase::gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData) {
1083 1083
   qDebug ( "got stroke pattern %s %f %f %f %f %f %f %f %f %f", pname, px, py, sx, sy, angle, rf, r, k, ka);
1084 1084
   arraytoa (transformData);
1085 1085
   qDebug ("/got stroke pattern");
1086 1086
 }
1087 1087
 
1088 1088
 const char *AIParserBase::getValue (const char *input) {
1089
-  QString data(input);
1089
+  TQString data(input);
1090 1090
 
1091
-  signed int index = data.find (':');
1091
+  signed int index = data.tqfind (':');
1092 1092
   if (index < 0) return "";
1093 1093
   index++;
1094 1094
   while (data.at(index) == ' ') index++;
@@ -1098,9 +1098,9 @@ const char *AIParserBase::getValue (const char *input) {
1098 1098
 bool AIParserBase::getRectangle (const char* input, int &llx, int &lly, int &urx, int &ury) {
1099 1099
   if (input == NULL) return false;
1100 1100
 
1101
-  QString s(input);
1102
-  if (s.contains ("(atend)")) return false;
1103
-  QStringList values = QStringList::split (" ", input);
1101
+  TQString s(input);
1102
+  if (s.tqcontains ("(atend)")) return false;
1103
+  TQStringList values = TQStringList::split (" ", input);
1104 1104
   if (values.size() < 5) return false;
1105 1105
   llx = values[1].toInt();
1106 1106
   lly = values[2].toInt();
@@ -1113,8 +1113,8 @@ bool AIParserBase::getRectangle (const char* input, int &llx, int &lly, int &urx
1113 1113
 bool AIParserBase::getPoint (const char* input, int &x, int &y) {
1114 1114
   if (input == NULL) return false;
1115 1115
 
1116
-  QString s(input);
1117
-  QStringList values = QStringList::split (" ", input);
1116
+  TQString s(input);
1117
+  TQStringList values = TQStringList::split (" ", input);
1118 1118
 
1119 1119
   if (values.size() < 3) return false;
1120 1120
 
@@ -1139,20 +1139,20 @@ void AIParserBase::cleanupArrays()
1139 1139
 
1140 1140
   AIElement elem (m_stack.top());
1141 1141
   m_stack.pop();
1142
-  const QString &oldFont = elem.toReference();
1142
+  const TQString &oldFont = elem.toReference();
1143 1143
 
1144 1144
   AIElement elem2 (m_stack.top());
1145 1145
   m_stack.pop();
1146
-  const QString &newFont = elem2.toReference();
1146
+  const TQString &newFont = elem2.toReference();
1147 1147
 
1148 1148
   AIElement elem3 (m_stack.top());
1149 1149
   m_stack.pop();
1150
-  const QValueVector<AIElement> encodingData = elem3.toElementArray();
1150
+  const TQValueVector<AIElement> encodingData = elem3.toElementArray();
1151 1151
 
1152 1152
   if (m_textHandler) m_textHandler->gotFontEncoding (encodingData, oldFont.latin1(), newFont.latin1());
1153 1153
 } */
1154 1154
 
1155
-void TextHandlerBase::gotFontEncoding (const QValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName)
1155
+void TextHandlerBase::gotFontEncoding (const TQValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName)
1156 1156
 {
1157 1157
   qDebug ("font encoding %s to %s",oldFontName, newFontName);
1158 1158
   arraytoa (encodingData);
@@ -1164,7 +1164,7 @@ void TextHandlerBase::gotFontDefinition (const char*fontName, double size, doubl
1164 1164
   qDebug ("font definition: name %s size %f leading %f kerning %f align %d", fontName, size, leading, kerning, align);
1165 1165
 }
1166 1166
 
1167
-void TextHandlerBase::gotTextBlockBegin (const QValueVector<AIElement>& transData, TextOperation mode)
1167
+void TextHandlerBase::gotTextBlockBegin (const TQValueVector<AIElement>& transData, TextOperation mode)
1168 1168
 {
1169 1169
   qDebug ("text block begin %d",mode);
1170 1170
   arraytoa (transData);
@@ -1213,7 +1213,7 @@ const void elementtoa (const AIElement &/*data*/)
1213 1213
   } */
1214 1214
 }
1215 1215
 
1216
-const void arraytoa (const QValueVector<AIElement> &/*data*/)
1216
+const void arraytoa (const TQValueVector<AIElement> &/*data*/)
1217 1217
 {
1218 1218
 /*  qDebug ("array size is %d ",data.size());
1219 1219
   if (data.size() > 0)
@@ -1227,7 +1227,7 @@ const void arraytoa (const QValueVector<AIElement> &/*data*/)
1227 1227
   } */
1228 1228
 }
1229 1229
 
1230
-const void stacktoa (const QValueStack<AIElement> &/*data*/)
1230
+const void stacktoa (const TQValueStack<AIElement> &/*data*/)
1231 1231
 {
1232 1232
 /*  qDebug ("stack size is %d",data.size());
1233 1233
   if (data.size() > 0)
@@ -1241,7 +1241,7 @@ const void stacktoa (const QValueStack<AIElement> &/*data*/)
1241 1241
   qDebug (">>>>>>>>>>>>>>>>>>"); */
1242 1242
 }
1243 1243
 
1244
-const void stacktoa2 (const QValueStack<QValueVector<AIElement> >&/*data*/)
1244
+const void stacktoa2 (const TQValueStack<TQValueVector<AIElement> >&/*data*/)
1245 1245
 {
1246 1246
 /*  qDebug ("stack size is %d",data.size());
1247 1247
 

+ 26
- 26
filters/karbon/ai/aiparserbase.h View File

@@ -22,19 +22,19 @@
22 22
 
23 23
 #include "ailexer.h"
24 24
 
25
-#include <qstring.h>
26
-#include <qvaluestack.h>
27
-#include <qvaluevector.h>
28
-#include <qvaluelist.h>
25
+#include <tqstring.h>
26
+#include <tqvaluestack.h>
27
+#include <tqvaluevector.h>
28
+#include <tqvaluelist.h>
29 29
 
30 30
 #include "aielement.h"
31 31
 #include "aicolor.h"
32 32
 
33 33
 
34
-const void arraytoa (const QValueVector<AIElement> &data);
34
+const void arraytoa (const TQValueVector<AIElement> &data);
35 35
 const void elementtoa (const AIElement &data);
36
-const void stacktoa (const QValueStack<AIElement> &data);
37
-const void stacktoa2 (const QValueStack<QValueVector<AIElement> >&data);
36
+const void stacktoa (const TQValueStack<AIElement> &data);
37
+const void stacktoa2 (const TQValueStack<TQValueVector<AIElement> >&data);
38 38
 
39 39
 class GStateHandlerBase;
40 40
 class StructureHandlerBase;
@@ -209,9 +209,9 @@ typedef enum {
209 209
 #define PatternTileFilledDefiniton "_"
210 210
 #define TextSizeUnknown -1
211 211
 
212
-/* typedef QValueVector<AElement> ElementArray;
213
-typedef QValueStack<AIElement> ElementStack;
214
-typedef QValueStack<ElementArray> ElementArrayStack; */
212
+/* typedef TQValueVector<AElement> ElementArray;
213
+typedef TQValueStack<AIElement> ElementStack;
214
+typedef TQValueStack<ElementArray> ElementArrayStack; */
215 215
 
216 216
 typedef struct {
217 217
   PathElementType petype;
@@ -234,19 +234,19 @@ protected:
234 234
   bool m_debug;
235 235
 private:
236 236
   bool m_ignoring;
237
-  QValueStack<AIElement> m_stack;
238
-  QValueStack<QValueVector<AIElement> > m_arrayStack;
239
-  QValueStack<QValueVector<AIElement> > m_blockStack;
237
+  TQValueStack<AIElement> m_stack;
238
+  TQValueStack<TQValueVector<AIElement> > m_arrayStack;
239
+  TQValueStack<TQValueVector<AIElement> > m_blockStack;
240 240
   DataSink m_sink;
241
-  QValueList<QString> m_modules;
241
+  TQValueList<TQString> m_modules;
242 242
   ContinuationMode m_continuationMode;
243 243
 
244 244
   const double getDoubleValue(void);
245 245
   const int getIntValue(void);
246 246
   const bool getBoolValue(void);
247
-  const QString getStringValue(void);
248
-  const QString& getReferenceValue(void);
249
-  const QString getOperatorValue(void);
247
+  const TQString getStringValue(void);
248
+  const TQString& getReferenceValue(void);
249
+  const TQString getOperatorValue(void);
250 250
 
251 251
 /*Ai88*/  // void _handleSetDash();
252 252
 /*Ai88*/  // void _handleGsaveIncludeDocument();
@@ -308,7 +308,7 @@ protected:
308 308
   void gotArrayStart ();
309 309
   void gotArrayEnd ();
310 310
   void gotByte (uchar value);
311
-  void gotByteArray (const QByteArray &data);
311
+  void gotByteArray (const TQByteArray &data);
312 312
 
313 313
   GStateHandlerBase *m_gstateHandler;
314 314
   StructureHandlerBase *m_structureHandler;
@@ -328,7 +328,7 @@ public:
328 328
 	AIParserBase();
329 329
 	~AIParserBase();
330 330
 
331
-  bool parse (QIODevice& fin);
331
+  bool parse (TQIODevice& fin);
332 332
 };
333 333
 
334 334
 const void aiotoa (AIOperation &data);
@@ -342,15 +342,15 @@ class GStateHandlerBase
342 342
 
343 343
     virtual void gotFillColor (AIColor &) {}
344 344
     virtual void gotStrokeColor (AIColor &) {}
345
-    virtual void gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData);
346
-    virtual void gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const QValueVector<AIElement>& transformData);
345
+    virtual void gotFillPattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData);
346
+    virtual void gotStrokePattern (const char *pname, double px, double py, double sx, double sy, double angle, double rf, double r, double k, double ka, const TQValueVector<AIElement>& transformData);
347 347
     virtual void gotFlatness (double) {}
348 348
     virtual void gotLineWidth (double) {}
349 349
     virtual void gotLineCaps (int) {}
350 350
     virtual void gotLineJoin (int) {}
351 351
     virtual void gotMiterLimit (double) {}
352 352
     virtual void gotWindingOrder (int) {}
353
-    virtual void gotDash (const QValueVector<AIElement>& /*dashData*/, double /*phase*/) {}
353
+    virtual void gotDash (const TQValueVector<AIElement>& /*dashData*/, double /*phase*/) {}
354 354
 };
355 355
 
356 356
 class StructureHandlerBase {
@@ -401,7 +401,7 @@ class DocumentHandlerBase {
401 401
     virtual void gotTemplate (const char *) {}
402 402
     virtual void gotTitle (const char *) {}
403 403
     virtual void gotCreator (const char *) {}
404
-    virtual void gotPatternDefinition (const char */*name*/, const QValueVector<AIElement>& /*layerData*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {}
404
+    virtual void gotPatternDefinition (const char */*name*/, const TQValueVector<AIElement>& /*layerData*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) {}
405 405
     virtual void gotCreationDate (const char */*val1*/,const char */*val2*/) {}
406 406
     virtual void gotProcessColors (int /*colors*/) {}
407 407
 };
@@ -420,7 +420,7 @@ class EmbeddedHandlerBase {
420 420
    	 EmbeddedHandlerBase() {}
421 421
 	  virtual ~EmbeddedHandlerBase() {}
422 422
 
423
-    virtual void gotGsaveIncludeDocument (const QValueVector<AIElement>& /*transData*/, int /*llx*/, int /*lly*/, int /*urx*/, int /*ury*/, const char*/*fileName*/) {}
423
+    virtual void gotGsaveIncludeDocument (const TQValueVector<AIElement>& /*transData*/, int /*llx*/, int /*lly*/, int /*urx*/, int /*ury*/, const char*/*fileName*/) {}
424 424
     virtual void gotGrestore () {}
425 425
 };
426 426
 
@@ -429,9 +429,9 @@ class TextHandlerBase {
429 429
    	 TextHandlerBase() {}
430 430
  	   virtual ~TextHandlerBase() {}
431 431
 
432
-    virtual void gotFontEncoding (const QValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName);
432
+    virtual void gotFontEncoding (const TQValueVector<AIElement>& encodingData, const char*oldFontName, const char*newFontName);
433 433
     virtual void gotFontDefinition (const char*fontName, double size, double leading, double kerning, TextAlign align);
434
-    virtual void gotTextBlockBegin (const QValueVector<AIElement>& transData, TextOperation mode);
434
+    virtual void gotTextBlockBegin (const TQValueVector<AIElement>& transData, TextOperation mode);
435 435
     virtual void gotTextOutput (const char*text, int length=-1);
436 436
     virtual void gotTextBlockEnd ();
437 437
 };

+ 7
- 7
filters/karbon/ai/karbonaiparserbase.cc View File

@@ -25,7 +25,7 @@
25 25
 #include <core/vclipgroup.h>
26 26
 #include <core/vvisitor.h>
27 27
 #include "aicolor.h"
28
-#include <qwmatrix.h>
28
+#include <tqwmatrix.h>
29 29
 #include <commands/vtransformcmd.h>
30 30
 
31 31
 #include <KoPageLayout.h>
@@ -90,7 +90,7 @@ void KarbonAIParserBase::parsingFinished(){
90 90
     if (m_bbox.height() > 0. )
91 91
       m_document->setHeight (m_bbox.height());
92 92
 
93
-/*    QWMatrix matrix;
93
+/*    TQWMatrix matrix;
94 94
     matrix.translate (-m_bbox.x(),-m_bbox.y());
95 95
 
96 96
     VTransformNodes translator (matrix);
@@ -101,8 +101,8 @@ void KarbonAIParserBase::parsingFinished(){
101 101
 }
102 102
 
103 103
 // generic
104
-QString KarbonAIParserBase::getParamList(Parameters& params){
105
-  QString data("");
104
+TQString KarbonAIParserBase::getParamList(Parameters& params){
105
+  TQString data("");
106 106
 
107 107
   Parameter *param;
108 108
 
@@ -450,7 +450,7 @@ void KarbonAIParserBase::doOutputCurrentPath2(PathOutputType type)
450 450
   m_curKarbonPath = new VPath( 0L );
451 451
 }
452 452
 
453
-bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc)
453
+bool KarbonAIParserBase::parse (TQIODevice& fin, TQDomDocument &doc)
454 454
 {
455 455
 
456 456
   bool res = AIParserBase::parse (fin);
@@ -461,7 +461,7 @@ bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc)
461 461
       qDebug ("before save document");
462 462
       doc = m_document->saveXML();
463 463
 	// add paper info, we always need custom for svg (Rob)
464
-	QDomElement paper = doc.createElement( "PAPER" );
464
+	TQDomElement paper = doc.createElement( "PAPER" );
465 465
 	doc.documentElement().appendChild( paper );
466 466
 	paper.setAttribute( "format", PG_CUSTOM );
467 467
 	paper.setAttribute( "width", m_document->width() );
@@ -471,7 +471,7 @@ bool KarbonAIParserBase::parse (QIODevice& fin, QDomDocument &doc)
471 471
   }
472 472
   else
473 473
   {
474
-    QDomDocument tempDoc;
474
+    TQDomDocument tempDoc;
475 475
     doc = tempDoc;
476 476
   }
477 477
 

+ 11
- 11
filters/karbon/ai/karbonaiparserbase.h View File

@@ -21,9 +21,9 @@
21 21
 #define KARBONAIPARSERBASE_H
22 22
 
23 23
 #include <aiparserbase.h>
24
-#include <qptrlist.h>
25
-#include <qstring.h>
26
-#include <qpair.h>
24
+#include <tqptrlist.h>
25
+#include <tqstring.h>
26
+#include <tqpair.h>
27 27
 
28 28
 #include "aicolor.h"
29 29
 
@@ -34,16 +34,16 @@
34 34
 #include <core/vgroup.h>
35 35
 #include <core/vfill.h>
36 36
 #include <core/vstroke.h>
37
-#include <qdom.h>
37
+#include <tqdom.h>
38 38
 
39
-#include <qptrstack.h>
39
+#include <tqptrstack.h>
40 40
 
41 41
 /**
42 42
   *@author 
43 43
   */
44
-typedef QPair<QString,QString> Parameter;
45
-typedef QPtrList<Parameter> Parameters;
46
-typedef QPtrList<PathElement> PathElements;
44
+typedef TQPair<TQString,TQString> Parameter;
45
+typedef TQPtrList<Parameter> Parameters;
46
+typedef TQPtrList<PathElement> PathElements;
47 47
 
48 48
 typedef enum { POT_Filled = 1, POT_Stroked = 2, POT_FilledStroked = 3, POT_Clip = 4, POT_Ignore = 8, POT_Leave = -1, POT_Other = 0 } PathOutputType;
49 49
 typedef enum { PTT_Output = 1, PTT_Combine = 2 } PathTransferType;
@@ -132,13 +132,13 @@ public:
132 132
 	KarbonAIParserBase();
133 133
 	~KarbonAIParserBase();
134 134
 
135
-  bool parse (QIODevice& fin, QDomDocument &doc);
135
+  bool parse (TQIODevice& fin, TQDomDocument &doc);
136 136
 private:
137 137
   VPath *m_curKarbonPath;
138 138
   VDocument *m_document;
139 139
   VLayer *m_layer;
140 140
   VPath *m_combination;
141
-  QPtrStack<VGroup> m_groupStack;
141
+  TQPtrStack<VGroup> m_groupStack;
142 142
 
143 143
   FillMode m_fm;
144 144
   PathOutputType m_pot;
@@ -171,7 +171,7 @@ protected:
171 171
   void parsingStarted();
172 172
   void parsingFinished();
173 173
 
174
-  QString getParamList(Parameters& params);
174
+  TQString getParamList(Parameters& params);
175 175
 
176 176
   void gotPathElement (PathElement &element);
177 177
   void gotFillPath (bool closed, bool reset, FillMode fm = FM_NonZero);

+ 39
- 39
filters/karbon/applixgraphics/applixgraphicimport.cc View File

@@ -25,9 +25,9 @@
25 25
 #endif
26 26
 
27 27
 #include <kdebug.h>
28
-#include <qfile.h>
29
-#include <qtextstream.h>
30
-#include <qmessagebox.h>
28
+#include <tqfile.h>
29
+#include <tqtextstream.h>
30
+#include <tqmessagebox.h>
31 31
 #include <KoFilterChain.h>
32 32
 #include <kgenericfactory.h>
33 33
 #include <math.h>
@@ -115,7 +115,7 @@ applixGraphicsRect::applixGraphicsRect() : applixGraphicsLine()
115 115
  *                                                                            *
116 116
  *                                                                            *
117 117
  ******************************************************************************/
118
-APPLIXGRAPHICImport::APPLIXGRAPHICImport (KoFilter *, const char *, const QStringList&) :
118
+APPLIXGRAPHICImport::APPLIXGRAPHICImport (KoFilter *, const char *, const TQStringList&) :
119 119
                      KoFilter ()
120 120
 {
121 121
 
@@ -133,7 +133,7 @@ APPLIXGRAPHICImport::APPLIXGRAPHICImport (KoFilter *, const char *, const QStrin
133 133
  *                                                                            *
134 134
  *                                                                            *
135 135
  ******************************************************************************/
136
-KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, const QCString& to )
136
+KoFilter::ConversiontqStatus APPLIXGRAPHICImport::convert( const TQCString& from, const TQCString& to )
137 137
 {
138 138
 
139 139
     // Check MIME Types
@@ -141,7 +141,7 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c
141 141
         return KoFilter::NotImplemented;
142 142
 
143 143
     // Open Inputfile
144
-    QFile in (m_chain->inputFile());
144
+    TQFile in (m_chain->inputFile());
145 145
     if (!in.open (IO_ReadOnly) )
146 146
     {
147 147
         kdError(30502) << "Unable to open input file!" << endl;
@@ -149,21 +149,21 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c
149 149
         return KoFilter::FileNotFound;
150 150
     }
151 151
 
152
-    QString str;
152
+    TQString str;
153 153
 
154 154
     // Create karbon header
155 155
     str += "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
156 156
     str += "<!DOCTYPE karbon>\n";
157 157
     str += " <karbon mime=\"application/x-karbon\" version=\"2\" editor=\"APPLIXGRAPHICS import filter\">\n";
158 158
 //      str += "  <head>\n";
159
-//      str += "   <layout width=\"210\" lmargin=\"0\" format=\"a4\" bmargin=\"0\" height=\"297\" rmargin=\"0\" tmargin=\"0\" orientation=\"portrait\"/>\n";
159
+//      str += "   <tqlayout width=\"210\" lmargin=\"0\" format=\"a4\" bmargin=\"0\" height=\"297\" rmargin=\"0\" tmargin=\"0\" orientation=\"portrait\"/>\n";
160 160
 //      str += "   <grid dx=\"20\" dy=\"20\" align=\"0\">\n";
161 161
 //      str += "    <helplines align=\"0\"/>\n";
162 162
 //      str += "   </grid>\n";
163 163
 //      str += "  </head>\n";
164 164
     str += "  <layer name=\"ag-layer\" visible=\"1\">\n";
165 165
 
166
-    QTextStream stream(&in);
166
+    TQTextStream stream(&in);
167 167
     int step  = in.size()/50;
168 168
     int value = 0;
169 169
     int i     = 0;
@@ -171,7 +171,7 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c
171 171
     int pos   = 0;
172 172
     int vers[3] = { 0, 0, 0 };
173 173
     int rueck;  // Check scanf inputs
174
-    QString mystr;
174
+    TQString mystr;
175 175
 
176 176
     // Read Headline
177 177
     mystr = stream.readLine ();
@@ -186,13 +186,13 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c
186 186
       kdDebug (s_area) << "Header not correkt - May be it is not an applixgraphics file" << endl;
187 187
       kdDebug (s_area) << "Headerline: " << mystr << endl;
188 188
 
189
-      QMessageBox::critical (0L, "Applixgraphics header problem",
190
-                                  QString ("The Applixgraphics header is not correct. "
189
+      TQMessageBox::critical (0L, "Applixgraphics header problem",
190
+                                  TQString ("The Applixgraphics header is not correct. "
191 191
                                            "May be it is not an applixgraphics file! <BR>"
192
-                                           "This is the header line I did read:<BR><B>%1</B>").arg(mystr.latin1()),
192
+                                           "This is the header line I did read:<BR><B>%1</B>").tqarg(mystr.latin1()),
193 193
 				    "Comma");
194 194
 
195
-      // i18n( "What is the separator used in this file ? First line is \n%1" ).arg(firstLine),
195
+      // i18n( "What is the separator used in this file ? First line is \n%1" ).tqarg(firstLine),
196 196
       return KoFilter::StupidError;
197 197
     }
198 198
 
@@ -231,11 +231,11 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c
231 231
             //mystr.remove (0, 7);
232 232
 
233 233
 
234
-            //remove_pos = mystr.find ('(');
234
+            //remove_pos = mystr.tqfind ('(');
235 235
             //mystr.remove (0, remove_pos);
236 236
             //agLine.offX= mystr.toInt();
237 237
 
238
-            //remove_pos = mystr.find (',');
238
+            //remove_pos = mystr.tqfind (',');
239 239
             //mystr.remove (0, remove_pos);
240 240
             //agLine.offY= mystr.toInt();
241 241
             rueck = sscanf ((const char *) mystr.latin1(), "(%d,%d)",
@@ -301,16 +301,16 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c
301 301
             str += "   <polyline arrow1=\"0\" arrow2=\"0\" >\n";
302 302
 //          str += "    <point x=\"" + agLine.ptX[0]  + "\" y=\"" + agLine.ptY[0] + "\" />";
303 303
             str += "    <point x=\"" ;
304
-            str += QString::number ((agLine.ptX[0] + agLine.offX)/FAKTOR);
304
+            str += TQString::number ((agLine.ptX[0] + agLine.offX)/FAKTOR);
305 305
             str += "\" y=\"";
306
-            str += QString::number ((agLine.ptY[0] + agLine.offY)/FAKTOR);
306
+            str += TQString::number ((agLine.ptY[0] + agLine.offY)/FAKTOR);
307 307
             str += "\" />\n";
308 308
 
309 309
 //          str += "    <point x=\"" + agLine.ptX[1]  + "\" y=\"" + agLine.ptY[1] + "\" />";
310 310
             str += "    <point x=\"";
311
-            str += QString::number ((agLine.ptX[1] + agLine.offX)/FAKTOR);
311
+            str += TQString::number ((agLine.ptX[1] + agLine.offX)/FAKTOR);
312 312
             str += "\" y=\"";
313
-            str += QString::number ((agLine.ptY[1] + agLine.offY)/FAKTOR);
313
+            str += TQString::number ((agLine.ptY[1] + agLine.offY)/FAKTOR);
314 314
             str += "\" />\n";
315 315
             str += "    <gobject fillstyle=\"0\" linewidth=\"1\" strokecolor=\"#000000\" strokestyle=\"1\" >\n";
316 316
             str += "     <matrix dx=\"0\" dy=\"0\" m21=\"0\" m22=\"1\" m11=\"1\" m12=\"0\" />\n";
@@ -411,8 +411,8 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c
411 411
             b = agLine.ptY[2] / 2;
412 412
             for (int i=0; i<nsides; i++)
413 413
 	    {
414
-              x[i] = qRound (a * cos (wink*M_PI/180));
415
-              y[i] = qRound (b * sin (wink*M_PI/180));
414
+              x[i] = tqRound (a * cos (wink*M_PI/180));
415
+              y[i] = tqRound (b * sin (wink*M_PI/180));
416 416
 	      wink += (360/nsides);
417 417
 	    }
418 418
 
@@ -421,9 +421,9 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c
421 421
             for (int i=0; i<nsides; i++)
422 422
 	    {
423 423
               str += "    <point x=\"" ;
424
-              str += QString::number ((x[i] + agLine.offX)/FAKTOR);
424
+              str += TQString::number ((x[i] + agLine.offX)/FAKTOR);
425 425
               str += "\" y=\"";
426
-              str += QString::number ((y[i] + agLine.offY)/FAKTOR);
426
+              str += TQString::number ((y[i] + agLine.offY)/FAKTOR);
427 427
               str += "\" />\n";
428 428
 	    }
429 429
 
@@ -514,9 +514,9 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c
514 514
             // Werte in die Struktur einlagern
515 515
             str += "   <text ";
516 516
             str += "x=\"" ;
517
-            str += QString::number (agText.offX);
517
+            str += TQString::number (agText.offX);
518 518
             str += "\" y=\"" ;
519
-            str += QString::number (agText.offY);
519
+            str += TQString::number (agText.offY);
520 520
             str += "\" >\n";
521 521
             str += "    <![CDATA[" + agText.str;
522 522
             str += "]]>\n";
@@ -672,38 +672,38 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c
672 672
             // Werte in die Struktur einlagern
673 673
             str += "   <rectangle ";
674 674
             str += "x=\"" ;
675
-            str += QString::number ((agRect.offX)/FAKTOR);
675
+            str += TQString::number ((agRect.offX)/FAKTOR);
676 676
             str += "\" y=\"";
677
-            str += QString::number ((agRect.offY)/FAKTOR);
677
+            str += TQString::number ((agRect.offY)/FAKTOR);
678 678
             str += "\" width=\"" ;
679
-            str += QString::number ((agRect.ptX[2])/FAKTOR);
679
+            str += TQString::number ((agRect.ptX[2])/FAKTOR);
680 680
             str += "\" height=\"";
681
-            str += QString::number ((agRect.ptY[2])/FAKTOR);
681
+            str += TQString::number ((agRect.ptY[2])/FAKTOR);
682 682
             str += "\" >\n";
683 683
             str += "    <polyline arrow1=\"0\" arrow2=\"0\" >\n";
684 684
 
685 685
             str += "     <point x=\"" ;
686
-            str += QString::number ((agRect.ptX[0] + agRect.offX)/FAKTOR)  ;
686
+            str += TQString::number ((agRect.ptX[0] + agRect.offX)/FAKTOR)  ;
687 687
             str += "\" y=\"" ;
688
-            str += QString::number ((agRect.ptY[0] + agRect.offY)/FAKTOR) ;
688
+            str += TQString::number ((agRect.ptY[0] + agRect.offY)/FAKTOR) ;
689 689
             str += "\" />\n";
690 690
 
691 691
             str += "     <point x=\"" ;
692
-            str += QString::number ((agRect.ptX[0] + agRect.ptX[2] + agRect.offX)/FAKTOR)  ;
692
+            str += TQString::number ((agRect.ptX[0] + agRect.ptX[2] + agRect.offX)/FAKTOR)  ;
693 693
             str += "\" y=\"" ;
694
-            str += QString::number ((agRect.ptY[0] + agRect.offY)/FAKTOR) ;
694
+            str += TQString::number ((agRect.ptY[0] + agRect.offY)/FAKTOR) ;
695 695
             str += "\" />\n";
696 696
 
697 697
             str += "     <point x=\"" ;
698
-            str += QString::number ((agRect.ptX[0] + agRect.ptX[2] + agRect.offX)/FAKTOR)  ;
698
+            str += TQString::number ((agRect.ptX[0] + agRect.ptX[2] + agRect.offX)/FAKTOR)  ;
699 699
             str += "\" y=\"" ;
700
-            str += QString::number ((agRect.ptY[0] + agRect.ptY[2] + agRect.offY)/FAKTOR) ;
700
+            str += TQString::number ((agRect.ptY[0] + agRect.ptY[2] + agRect.offY)/FAKTOR) ;
701 701
             str += "\" />\n";
702 702
 
703 703
             str += "     <point x=\"" ;
704
-            str += QString::number ((agRect.ptX[0] + agRect.offX)/FAKTOR)  ;
704
+            str += TQString::number ((agRect.ptX[0] + agRect.offX)/FAKTOR)  ;
705 705
             str += "\" y=\"" ;
706
-            str += QString::number ((agRect.ptY[0] + agRect.ptY[2] + agRect.offY)/FAKTOR) ;
706
+            str += TQString::number ((agRect.ptY[0] + agRect.ptY[2] + agRect.offY)/FAKTOR) ;
707 707
             str += "\" />\n";
708 708
 
709 709
 
@@ -818,7 +818,7 @@ KoFilter::ConversionStatus APPLIXGRAPHICImport::convert( const QCString& from, c
818 818
         return KoFilter::StorageCreationError;
819 819
     }
820 820
 
821
-    QCString cstring = str.utf8();
821
+    TQCString cstring = str.utf8();
822 822
     out->writeBlock ( (const char*)cstring, cstring.size() - 1 );
823 823
 
824 824
     in.close  ();

+ 4
- 3
filters/karbon/applixgraphics/applixgraphicimport.h View File

@@ -26,12 +26,13 @@
26 26
 class APPLIXGRAPHICImport : public KoFilter {
27 27
 
28 28
     Q_OBJECT
29
+  TQ_OBJECT
29 30
 
30 31
 public:
31</