From 0a6e0958c03e41c87b15557b6f407874f20c2f8d Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:39:55 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1157642 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kig/filters/cabri-filter.cc | 56 ++++++------ kig/filters/cabri-filter.h | 6 +- kig/filters/drgeo-filter-chooser.cc | 10 +-- kig/filters/drgeo-filter-chooser.h | 4 +- kig/filters/drgeo-filter.cc | 90 +++++++++---------- kig/filters/drgeo-filter.h | 6 +- kig/filters/exporter.cc | 80 ++++++++--------- kig/filters/exporter.h | 18 ++-- kig/filters/filter.cc | 20 ++--- kig/filters/filter.h | 22 ++--- kig/filters/filters-common.cc | 8 +- kig/filters/filters-common.h | 2 +- kig/filters/imageexporteroptions.cc | 10 +-- kig/filters/imageexporteroptions.h | 4 +- kig/filters/kgeo-filter.cc | 20 ++--- kig/filters/kgeo-filter.h | 6 +- kig/filters/kgeo-resource.h | 2 +- kig/filters/kseg-defs.h | 2 +- kig/filters/kseg-filter.cc | 46 +++++----- kig/filters/kseg-filter.h | 6 +- kig/filters/latexexporter.cc | 62 ++++++------- kig/filters/latexexporter.h | 6 +- kig/filters/native-filter.cc | 156 ++++++++++++++++----------------- kig/filters/native-filter.h | 16 ++-- kig/filters/svgexporter.cc | 26 +++--- kig/filters/svgexporter.h | 6 +- kig/kfile/kfile_drgeo.cpp | 36 ++++---- kig/kfile/kfile_drgeo.h | 2 +- kig/kfile/kfile_kig.cpp | 52 +++++------ kig/kfile/kfile_kig.h | 2 +- kig/kig/kig.cpp | 38 ++++---- kig/kig/kig.h | 6 +- kig/kig/kig_commands.cpp | 8 +- kig/kig/kig_commands.h | 4 +- kig/kig/kig_iface.h | 2 +- kig/kig/kig_part.cpp | 156 ++++++++++++++++----------------- kig/kig/kig_part.h | 24 +++--- kig/kig/kig_view.cpp | 90 +++++++++---------- kig/kig/kig_view.h | 48 +++++------ kig/kig/main.cpp | 8 +- kig/misc/common.cpp | 10 +-- kig/misc/common.h | 6 +- kig/misc/coordinate.cpp | 8 +- kig/misc/coordinate.h | 4 +- kig/misc/coordinate_system.cpp | 110 +++++++++++------------ kig/misc/coordinate_system.h | 36 ++++---- kig/misc/goniometry.cc | 6 +- kig/misc/goniometry.h | 4 +- kig/misc/guiaction.cc | 56 ++++++------ kig/misc/guiaction.h | 52 +++++------ kig/misc/kigfiledialog.cc | 22 ++--- kig/misc/kigfiledialog.h | 12 +-- kig/misc/kiginputdialog.cc | 80 ++++++++--------- kig/misc/kiginputdialog.h | 20 ++--- kig/misc/kigpainter.cpp | 166 +++++++++++++++++------------------ kig/misc/kigpainter.h | 68 +++++++-------- kig/misc/kigtransform.cpp | 2 +- kig/misc/kigtransform.h | 2 +- kig/misc/lists.cc | 56 ++++++------ kig/misc/lists.h | 8 +- kig/misc/object_constructor.cc | 62 ++++++------- kig/misc/object_constructor.h | 62 ++++++------- kig/misc/object_hierarchy.cc | 54 ++++++------ kig/misc/object_hierarchy.h | 6 +- kig/misc/rect.cc | 6 +- kig/misc/rect.h | 10 +-- kig/misc/screeninfo.cc | 22 ++--- kig/misc/screeninfo.h | 18 ++-- kig/misc/special_constructors.cc | 68 +++++++-------- kig/misc/special_constructors.h | 46 +++++----- kig/modes/base_mode.cc | 24 +++--- kig/modes/base_mode.h | 32 +++---- kig/modes/construct_mode.cc | 62 ++++++------- kig/modes/construct_mode.h | 38 ++++---- kig/modes/dragrectmode.cc | 44 +++++----- kig/modes/dragrectmode.h | 40 ++++----- kig/modes/edittype.cc | 14 +-- kig/modes/edittype.h | 14 +-- kig/modes/label.cc | 58 ++++++------- kig/modes/label.h | 14 +-- kig/modes/linkslabel.cpp | 48 +++++------ kig/modes/linkslabel.h | 10 +-- kig/modes/macro.cc | 14 +-- kig/modes/macro.h | 14 +-- kig/modes/macrowizard.cc | 16 ++-- kig/modes/macrowizard.h | 4 +- kig/modes/mode.cc | 20 ++--- kig/modes/mode.h | 22 ++--- kig/modes/moving.cc | 10 +-- kig/modes/moving.h | 6 +- kig/modes/normal.cc | 18 ++-- kig/modes/normal.h | 14 +-- kig/modes/popup.cc | 168 ++++++++++++++++++------------------ kig/modes/popup.h | 20 ++--- kig/modes/textlabelwizard.cc | 22 ++--- kig/modes/textlabelwizard.h | 2 +- kig/modes/typesdialog.cpp | 76 ++++++++-------- kig/modes/typesdialog.h | 12 +-- kig/objects/angle_type.cc | 6 +- kig/objects/angle_type.h | 2 +- kig/objects/arc_type.cc | 2 +- kig/objects/bogus_imp.cc | 16 ++-- kig/objects/bogus_imp.h | 24 +++--- kig/objects/circle_imp.cc | 12 +-- kig/objects/circle_imp.h | 6 +- kig/objects/common.h | 8 +- kig/objects/conic_imp.cc | 10 +-- kig/objects/conic_imp.h | 6 +- kig/objects/conic_types.cc | 4 +- kig/objects/conic_types.h | 2 +- kig/objects/cubic_imp.cc | 4 +- kig/objects/cubic_imp.h | 2 +- kig/objects/line_imp.cc | 8 +- kig/objects/line_imp.h | 2 +- kig/objects/line_type.cc | 6 +- kig/objects/line_type.h | 2 +- kig/objects/object_drawer.cc | 22 ++--- kig/objects/object_drawer.h | 20 ++--- kig/objects/object_factory.cc | 8 +- kig/objects/object_factory.h | 8 +- kig/objects/object_holder.cc | 8 +- kig/objects/object_holder.h | 8 +- kig/objects/object_imp.cc | 22 ++--- kig/objects/object_imp.h | 18 ++-- kig/objects/object_imp_factory.cc | 132 ++++++++++++++-------------- kig/objects/object_imp_factory.h | 4 +- kig/objects/object_type.cc | 6 +- kig/objects/object_type.h | 2 +- kig/objects/object_type_factory.cc | 2 +- kig/objects/point_imp.cc | 2 +- kig/objects/point_imp.h | 2 +- kig/objects/point_type.cc | 10 +-- kig/objects/point_type.h | 6 +- kig/objects/text_imp.cc | 4 +- kig/objects/text_imp.h | 6 +- kig/objects/text_type.cc | 10 +-- kig/objects/text_type.h | 2 +- kig/scripting/newscriptwizard.cc | 26 +++--- kig/scripting/newscriptwizard.h | 6 +- kig/scripting/python_type.cc | 2 +- kig/scripting/python_type.h | 2 +- kig/scripting/script-common.cc | 16 ++-- kig/scripting/script-common.h | 6 +- kig/scripting/script_mode.cc | 26 +++--- kig/scripting/script_mode.h | 14 +-- 145 files changed, 1803 insertions(+), 1803 deletions(-) (limited to 'kig') diff --git a/kig/filters/cabri-filter.cc b/kig/filters/cabri-filter.cc index 6d19027b..3cadf522 100644 --- a/kig/filters/cabri-filter.cc +++ b/kig/filters/cabri-filter.cc @@ -41,9 +41,9 @@ #include "../objects/transform_types.h" #include "../objects/vector_type.h" -#include -#include -#include +#include +#include +#include #include #include @@ -108,10 +108,10 @@ struct CabriObject { uint id; - QCString type; + TQCString type; uint numberOfParents; - QColor color; - QColor fillColor; + TQColor color; + TQColor fillColor; int thick; int lineSegLength; int lineSegSplit; @@ -130,7 +130,7 @@ KigFilterCabri::~KigFilterCabri() { } -bool KigFilterCabri::supportMime( const QString& mime ) +bool KigFilterCabri::supportMime( const TQString& mime ) { // ugly hack to avoid duplicate extension ( XFig and Cabri files // have the same .fig extension ). @@ -138,9 +138,9 @@ bool KigFilterCabri::supportMime( const QString& mime ) ( mime == "application/x-cabri" ); } -static QString readLine( QFile& file ) +static TQString readLine( TQFile& file ) { - QString ret; + TQString ret; file.readLine( ret, 10000L ); if ( ret[ret.length() - 1] == '\n' ) ret.truncate( ret.length() - 1 ); @@ -149,7 +149,7 @@ static QString readLine( QFile& file ) return ret; } -static QColor translatecolor( const QString& s ) +static TQColor translatecolor( const TQString& s ) { if ( s == "R" ) return Qt::red; if ( s == "O" ) return Qt::magenta; @@ -160,8 +160,8 @@ static QColor translatecolor( const QString& s ) if ( s == "lBl" ) return Qt::cyan; // TODO: bright blue if ( s == "G" ) return Qt::green; if ( s == "dG" ) return Qt::darkGreen; - if ( s == "Br" ) return QColor( 165, 42, 42 ); - if ( s == "dBr" ) return QColor( 128, 128, 0 ); + if ( s == "Br" ) return TQColor( 165, 42, 42 ); + if ( s == "dBr" ) return TQColor( 128, 128, 0 ); if ( s == "lGr" ) return Qt::lightGray; if ( s == "Gr" ) return Qt::gray; if ( s == "dGr" ) return Qt::darkGray; @@ -172,24 +172,24 @@ static QColor translatecolor( const QString& s ) return Qt::black; } -bool KigFilterCabri::readObject( QFile& f, CabriObject& myobj ) +bool KigFilterCabri::readObject( TQFile& f, CabriObject& myobj ) { // there are 4 lines per object in the file, so we read them all // four now. - QString line1, line2, line3, s; - QString file = f.name(); + TQString line1, line2, line3, s; + TQString file = f.name(); line1 = readLine( f ); line2 = readLine( f ); line3 = readLine( f ); // ignore line 4, it is empty.. s = readLine( f ); - QRegExp firstlinere( "^([^:]+): ([^,]+), ([^,]+), CN:([^,]*), VN:(.*)$" ); + TQRegExp firstlinere( "^([^:]+): ([^,]+), ([^,]+), CN:([^,]*), VN:(.*)$" ); if ( ! firstlinere.exactMatch( line1 ) ) KIG_FILTER_PARSE_ERROR; bool ok; - QString tmp; + TQString tmp; tmp = firstlinere.cap( 1 ); myobj.id = tmp.toInt( &ok ); @@ -208,7 +208,7 @@ bool KigFilterCabri::readObject( QFile& f, CabriObject& myobj ) tmp = firstlinere.cap( 5 ); // i have no idea what this number means.. - QRegExp secondlinere( "^([^,]+), ([^,]+), ([^,]+), DS:([^ ]+) ([^,]+), GT:([^,]+), ([^,]+), (.*)$" ); + TQRegExp secondlinere( "^([^,]+), ([^,]+), ([^,]+), DS:([^ ]+) ([^,]+), GT:([^,]+), ([^,]+), (.*)$" ); if ( ! secondlinere.exactMatch( line2 ) ) KIG_FILTER_PARSE_ERROR; @@ -241,13 +241,13 @@ bool KigFilterCabri::readObject( QFile& f, CabriObject& myobj ) tmp = secondlinere.cap( 8 ); myobj.fixed = tmp == "St"; - QRegExp thirdlinere( "^(Const: ([^,]*),? ?)?(Val: (.*))?$" ); + TQRegExp thirdlinere( "^(Const: ([^,]*),? ?)?(Val: (.*))?$" ); if ( ! thirdlinere.exactMatch( line3 ) ) KIG_FILTER_PARSE_ERROR; tmp = thirdlinere.cap( 2 ); - QStringList parentsids = QStringList::split( ' ', tmp ); - for ( QStringList::iterator i = parentsids.begin(); + TQStringList parentsids = TQStringList::split( ' ', tmp ); + for ( TQStringList::iterator i = parentsids.begin(); i != parentsids.end(); ++i ) { myobj.parents.push_back( ( *i ).toInt( &ok ) ); @@ -257,8 +257,8 @@ bool KigFilterCabri::readObject( QFile& f, CabriObject& myobj ) KIG_FILTER_PARSE_ERROR; tmp = thirdlinere.cap( 4 ); - QStringList valIds = QStringList::split( ' ', tmp ); - for ( QStringList::iterator i = valIds.begin(); + TQStringList valIds = TQStringList::split( ' ', tmp ); + for ( TQStringList::iterator i = valIds.begin(); i != valIds.end(); ++i ) { myobj.data.push_back( ( *i ).toDouble( &ok ) ); @@ -287,9 +287,9 @@ bool KigFilterCabri::readObject( QFile& f, CabriObject& myobj ) return true; } -KigDocument* KigFilterCabri::load( const QString& file ) +KigDocument* KigFilterCabri::load( const TQString& file ) { - QFile f( file ); + TQFile f( file ); if ( ! f.open( IO_ReadOnly ) ) { fileNotFound( file ); @@ -298,9 +298,9 @@ KigDocument* KigFilterCabri::load( const QString& file ) KigDocument* ret = new KigDocument(); - QString s = readLine( f ); - QString a = s.left( 21 ); - QString b = s.mid( 21 ); + TQString s = readLine( f ); + TQString a = s.left( 21 ); + TQString b = s.mid( 21 ); if( a != "FIGURE CabriII vers. " || ( b != "DOS 1.0" && b != "MS-Windows 1.0" ) ) { diff --git a/kig/filters/cabri-filter.h b/kig/filters/cabri-filter.h index 5760040f..c1f3febb 100644 --- a/kig/filters/cabri-filter.h +++ b/kig/filters/cabri-filter.h @@ -45,10 +45,10 @@ class KigFilterCabri public: static KigFilterCabri* instance(); - bool supportMime ( const QString& mime ); - KigDocument* load ( const QString& fromfile ); + bool supportMime ( const TQString& mime ); + KigDocument* load ( const TQString& fromfile ); private: - bool readObject( QFile& f, CabriObject& myobj ); + bool readObject( TQFile& f, CabriObject& myobj ); }; diff --git a/kig/filters/drgeo-filter-chooser.cc b/kig/filters/drgeo-filter-chooser.cc index 424a3462..3369af92 100644 --- a/kig/filters/drgeo-filter-chooser.cc +++ b/kig/filters/drgeo-filter-chooser.cc @@ -25,7 +25,7 @@ #include #include -KigFilterDrgeoChooser::KigFilterDrgeoChooser( const QStringList& l ) +KigFilterDrgeoChooser::KigFilterDrgeoChooser( const TQStringList& l ) : KigFilterDrgeoChooserBase( 0, "drgeo_filter", true ) { OKButton->setGuiItem( KStdGuiItem::ok() ); @@ -33,9 +33,9 @@ KigFilterDrgeoChooser::KigFilterDrgeoChooser( const QStringList& l ) FigureListBox->insertStringList( l ); - connect( OKButton, SIGNAL( clicked() ), SLOT( slotOKPressed() ) ); - connect( CancelButton, SIGNAL( clicked() ), SLOT( slotCancelPressed() ) ); - connect( FigureListBox, SIGNAL( executed( QListBoxItem* ) ), SLOT( slotExecuted( QListBoxItem* ) ) ); + connect( OKButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotOKPressed() ) ); + connect( CancelButton, TQT_SIGNAL( clicked() ), TQT_SLOT( slotCancelPressed() ) ); + connect( FigureListBox, TQT_SIGNAL( executed( TQListBoxItem* ) ), TQT_SLOT( slotExecuted( TQListBoxItem* ) ) ); } void KigFilterDrgeoChooser::slotOKPressed() @@ -59,7 +59,7 @@ KigFilterDrgeoChooser::~KigFilterDrgeoChooser() } -void KigFilterDrgeoChooser::slotExecuted( QListBoxItem* i ) +void KigFilterDrgeoChooser::slotExecuted( TQListBoxItem* i ) { done( FigureListBox->index( i ) ); } diff --git a/kig/filters/drgeo-filter-chooser.h b/kig/filters/drgeo-filter-chooser.h index fd4ce606..7cc3c76a 100644 --- a/kig/filters/drgeo-filter-chooser.h +++ b/kig/filters/drgeo-filter-chooser.h @@ -30,12 +30,12 @@ class KigFilterDrgeoChooser Q_OBJECT public: - KigFilterDrgeoChooser( const QStringList& l ); + KigFilterDrgeoChooser( const TQStringList& l ); ~KigFilterDrgeoChooser(); public slots: void slotOKPressed(); void slotCancelPressed(); - void slotExecuted( QListBoxItem* ); + void slotExecuted( TQListBoxItem* ); }; #endif diff --git a/kig/filters/drgeo-filter.cc b/kig/filters/drgeo-filter.cc index 8fa306cc..82438a57 100644 --- a/kig/filters/drgeo-filter.cc +++ b/kig/filters/drgeo-filter.cc @@ -51,8 +51,8 @@ #include -#include -#include +#include +#include #include @@ -61,8 +61,8 @@ struct DrGeoHierarchyElement { - QString id; - std::vector parents; + TQString id; + std::vector parents; }; KigFilterDrgeo::KigFilterDrgeo() @@ -73,30 +73,30 @@ KigFilterDrgeo::~KigFilterDrgeo() { } -bool KigFilterDrgeo::supportMime( const QString& mime ) +bool KigFilterDrgeo::supportMime( const TQString& mime ) { return mime == "application/x-drgeo"; } -KigDocument* KigFilterDrgeo::load( const QString& file ) +KigDocument* KigFilterDrgeo::load( const TQString& file ) { - QFile f( file ); + TQFile f( file ); if ( ! f.open( IO_ReadOnly ) ) { fileNotFound( file ); return 0; } - QStringList figures; - QDomDocument doc( "drgenius" ); + TQStringList figures; + TQDomDocument doc( "drgenius" ); if ( !doc.setContent( &f ) ) KIG_FILTER_PARSE_ERROR; - QDomElement main = doc.documentElement(); + TQDomElement main = doc.documentElement(); int nmacros = 0; // reading figures... - for ( QDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.isNull() ) continue; else if ( e.tagName() == "drgeo" ) figures.append( e.attribute( "name" ) ); @@ -132,9 +132,9 @@ KigDocument* KigFilterDrgeo::load( const QString& file ) #endif int curfig = -1; - for ( QDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.isNull() ) continue; else if ( e.tagName() == "drgeo" ) { @@ -154,7 +154,7 @@ KigDocument* KigFilterDrgeo::load( const QString& file ) return 0; } -int convertDrgeoIndex( const std::vector es, const QString myid ) +int convertDrgeoIndex( const std::vector es, const TQString myid ) { for ( uint i = 0; i < es.size(); ++i ) if ( es[i].id == myid ) @@ -178,7 +178,7 @@ const Coordinate convertDrgeoHalflineParam( const double param, const LineData& return p; } -KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, const bool grid ) +KigDocument* KigFilterDrgeo::importFigure( TQDomNode f, const TQString& file, const bool grid ) { KigDocument* ret = new KigDocument(); @@ -187,9 +187,9 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons int withoutid = 0; // 1st: fetch relationships and build an appropriate structure - for (QDomNode a = f; ! a.isNull(); a = a.nextSibling() ) + for (TQDomNode a = f; ! a.isNull(); a = a.nextSibling() ) { - QDomElement domelem = a.toElement(); + TQDomElement domelem = a.toElement(); if ( domelem.isNull() ) continue; else { @@ -197,21 +197,21 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons #ifdef DRGEO_DEBUG kdDebug() << " * " << domelem.tagName() << "(" << domelem.attribute("type") << ")" << endl; #endif - for ( QDomNode c = domelem.firstChild(); ! c.isNull(); c = c.nextSibling() ) + for ( TQDomNode c = domelem.firstChild(); ! c.isNull(); c = c.nextSibling() ) { - QDomElement ce = c.toElement(); + TQDomElement ce = c.toElement(); if ( ce.isNull() ) continue; else if ( ce.tagName() == "parent" ) elem.parents.push_back( ce.attribute( "ref" ) ); } - QString curid = domelem.attribute( "id" ); - elem.id = !curid.isNull() ? curid : QString::number( withoutid++ ) ; + TQString curid = domelem.attribute( "id" ); + elem.id = !curid.isNull() ? curid : TQString::number( withoutid++ ) ; elems.push_back( elem ); } } #ifdef DRGEO_DEBUG - QString x; + TQString x; kdDebug() << "+++ elems" << endl; for ( uint i = 0; i < elems.size(); ++i ) { @@ -235,7 +235,7 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons // there's no need to sort the objects because it seems that DrGeo objects // appear in the right order... so let's go! - for (QDomNode a = f; ! a.isNull(); a = a.nextSibling() ) + for (TQDomNode a = f; ! a.isNull(); a = a.nextSibling() ) { #ifdef DRGEO_DEBUG kdDebug() << "+++ id: " << curid << endl; @@ -249,7 +249,7 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons KIG_FILTER_PARSE_ERROR; parents.push_back( holders[parentid-nignored]->calcer() ); }; - QDomElement domelem = a.toElement(); + TQDomElement domelem = a.toElement(); #ifdef DRGEO_DEBUG if ( parents.size() > 0 ) @@ -266,12 +266,12 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons if ( domelem.isNull() ) continue; else if ( domelem.tagName() == "point" ) { - QString xs; - QString ys; - QString values; - for ( QDomNode c = domelem.firstChild(); ! c.isNull(); c = c.nextSibling() ) + TQString xs; + TQString ys; + TQString values; + for ( TQDomNode c = domelem.firstChild(); ! c.isNull(); c = c.nextSibling() ) { - QDomElement ce = c.toElement(); + TQDomElement ce = c.toElement(); if ( ce.isNull() ) continue; else if ( ce.tagName() == "x" ) xs = ce.text(); @@ -501,12 +501,12 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons else if( ( domelem.tagName() == "numeric" ) || ( domelem.tagName() == "equation" ) ) { - QString xs; - QString ys; - QString value; - for ( QDomNode c = domelem.firstChild(); ! c.isNull(); c = c.nextSibling() ) + TQString xs; + TQString ys; + TQString value; + for ( TQDomNode c = domelem.firstChild(); ! c.isNull(); c = c.nextSibling() ) { - QDomElement ce = c.toElement(); + TQDomElement ce = c.toElement(); if ( ce.isNull() ) continue; else if ( ce.tagName() == "x" ) xs = ce.text(); @@ -529,7 +529,7 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons bool ok3; double dvalue = value.toDouble( &ok3 ); if ( ok3 ) - value = QString( "%1" ).arg( dvalue, 0, 'g', 3 ); + value = TQString( "%1" ).arg( dvalue, 0, 'g', 3 ); oc = fact->labelCalcer( value, m, false, std::vector(), *ret ); } else if ( domelem.attribute( "type" ) == "pt_abscissa" ) @@ -646,12 +646,12 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons } else if ( domelem.tagName() == "script" ) { - QString xs; - QString ys; - QString text; - for ( QDomNode c = domelem.firstChild(); ! c.isNull(); c = c.nextSibling() ) + TQString xs; + TQString ys; + TQString text; + for ( TQDomNode c = domelem.firstChild(); ! c.isNull(); c = c.nextSibling() ) { - QDomElement ce = c.toElement(); + TQDomElement ce = c.toElement(); if ( ce.isNull() ) continue; else if ( ce.tagName() == "x" ) xs = ce.text(); @@ -718,7 +718,7 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons continue; // reading color - QColor co( domelem.attribute( "color" ) ); + TQColor co( domelem.attribute( "color" ) ); if ( ! co.isValid() ) if ( domelem.attribute( "color" ) == "Bordeaux" ) co.setRgb( 145, 0, 0 ); @@ -744,7 +744,7 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons if ( domelem.attribute( "thickness" ) == "Thick" ) w = 2; } - QString ps = domelem.attribute( "style" ); + TQString ps = domelem.attribute( "style" ); int pointstyle = ObjectDrawer::pointStyleFromString( ps ); // show this object? bool show = ( ( domelem.attribute( "masked" ) != "True" ) && @@ -752,7 +752,7 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons // costructing the ObjectDrawer* ObjectDrawer* d = new ObjectDrawer( co, w, show, s, pointstyle ); // reading object name - QString strname = domelem.attribute( "name" ); + TQString strname = domelem.attribute( "name" ); ObjectConstCalcer* name = new ObjectConstCalcer( new StringImp( strname ) ); // creating the ObjectHolder* @@ -770,7 +770,7 @@ KigDocument* KigFilterDrgeo::importFigure( QDomNode f, const QString& file, cons { std::vector args2; args2.push_back( o->nameCalcer() ); - oc2 = fact->attachedLabelCalcer( QString::fromLatin1( "%1" ), oc, + oc2 = fact->attachedLabelCalcer( TQString::fromLatin1( "%1" ), oc, static_cast( oc->imp() )->coordinate(), false, args2, *ret ); co = Qt::black; diff --git a/kig/filters/drgeo-filter.h b/kig/filters/drgeo-filter.h index 7485fd5b..d684c5e5 100644 --- a/kig/filters/drgeo-filter.h +++ b/kig/filters/drgeo-filter.h @@ -37,10 +37,10 @@ protected: public: static KigFilterDrgeo* instance(); - bool supportMime( const QString& mime ); - KigDocument* load( const QString& file ); + bool supportMime( const TQString& mime ); + KigDocument* load( const TQString& file ); private: - KigDocument* importFigure( QDomNode f, const QString& file, const bool grid ); + KigDocument* importFigure( TQDomNode f, const TQString& file, const bool grid ); }; #endif diff --git a/kig/filters/exporter.cc b/kig/filters/exporter.cc index c2ece44e..b44888f0 100644 --- a/kig/filters/exporter.cc +++ b/kig/filters/exporter.cc @@ -36,11 +36,11 @@ #include "../objects/point_imp.h" #include "../objects/text_imp.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -52,7 +52,7 @@ #include // we need this for storing colors in a std::map.. -static bool operator<( const QColor& a, const QColor& b ) +static bool operator<( const TQColor& a, const TQColor& b ) { return a.rgb() < b.rgb(); } @@ -74,13 +74,13 @@ ExporterAction::ExporterAction( const KigPart* doc, KigWidget* w, : KAction( exp->menuEntryName(), KShortcut(), 0, 0, parent ), mexp( exp ), mdoc( doc ), mw( w ) { - QString iconstr = exp->menuIcon(); + TQString iconstr = exp->menuIcon(); if ( iconstr.isEmpty() ) return; KIconLoader* l = doc->instance()->iconLoader(); - QPixmap icon = l->loadIcon( iconstr, KIcon::Small, 16, KIcon::DefaultState, 0L, true ); + TQPixmap icon = l->loadIcon( iconstr, KIcon::Small, 16, KIcon::DefaultState, 0L, true ); if ( !icon.isNull() ) - setIconSet( QIconSet( icon ) ); + setIconSet( TQIconSet( icon ) ); } void ExporterAction::slotActivated() @@ -96,17 +96,17 @@ ImageExporter::~ImageExporter() { } -QString ImageExporter::exportToStatement() const +TQString ImageExporter::exportToStatement() const { return i18n( "&Export to image" ); } -QString ImageExporter::menuEntryName() const +TQString ImageExporter::menuEntryName() const { return i18n( "&Image..." ); } -QString ImageExporter::menuIcon() const +TQString ImageExporter::menuIcon() const { return "image"; } @@ -121,7 +121,7 @@ void ImageExporter::run( const KigPart& doc, KigWidget& w ) } KigFileDialog* kfd = new KigFileDialog( - QString::null, KImageIO::pattern( KImageIO::Writing ), + TQString::null, KImageIO::pattern( KImageIO::Writing ), i18n( "Export as Image" ), &w ); kfd->setOptionCaption( i18n( "Image Options" ) ); ImageExporterOptions* opts = new ImageExporterOptions( 0L, w.size() ); @@ -133,7 +133,7 @@ void ImageExporter::run( const KigPart& doc, KigWidget& w ) if ( !kfd->exec() ) return; - QString filename = kfd->selectedFile(); + TQString filename = kfd->selectedFile(); bool showgrid = opts->showGridCheckBox->isOn(); bool showaxes = opts->showAxesCheckBox->isOn(); int width = opts->WidthInput->value(); @@ -142,7 +142,7 @@ void ImageExporter::run( const KigPart& doc, KigWidget& w ) delete opts; delete kfd; - QString type = KImageIO::type( filename ); + TQString type = KImageIO::type( filename ); if ( type.isNull() ) { KMessageBox::sorry( &w, i18n( "Sorry, this file format is not supported." ) ); @@ -151,7 +151,7 @@ void ImageExporter::run( const KigPart& doc, KigWidget& w ) kdDebug() << k_funcinfo << type << endl; - QFile file( filename ); + TQFile file( filename ); if ( ! file.open( IO_WriteOnly ) ) { KMessageBox::sorry( &w, @@ -160,7 +160,7 @@ void ImageExporter::run( const KigPart& doc, KigWidget& w ) return; }; - QPixmap img( QSize( width, height ) ); + TQPixmap img( TQSize( width, height ) ); img.fill( Qt::white ); KigPainter p( ScreenInfo( w.screenInfo().shownRect(), img.rect() ), &img, doc.document() ); p.setWholeWinOverlay(); @@ -208,18 +208,18 @@ XFigExporter::~XFigExporter() { } -QString XFigExporter::exportToStatement() const +TQString XFigExporter::exportToStatement() const { return i18n( "Export to &XFig file" ); } -QString XFigExporter::menuEntryName() const +TQString XFigExporter::menuEntryName() const { return i18n( "&XFig File..." ); } -QString XFigExporter::menuIcon() const +TQString XFigExporter::menuIcon() const { return "kig_xfig"; } @@ -227,15 +227,15 @@ QString XFigExporter::menuIcon() const class XFigExportImpVisitor : public ObjectImpVisitor { - QTextStream& mstream; + TQTextStream& mstream; ObjectHolder* mcurobj; const KigWidget& mw; Rect msr; - std::map mcolormap; + std::map mcolormap; int mnextcolorid; int mcurcolorid; - QPoint convertCoord( const Coordinate& c ) + TQPoint convertCoord( const Coordinate& c ) { Coordinate ret = ( c - msr.bottomLeft() ); ret.y = msr.height() - ret.y; @@ -252,7 +252,7 @@ public: void visit( ObjectHolder* obj ); void mapColor( const ObjectDrawer* obj ); - XFigExportImpVisitor( QTextStream& s, const KigWidget& w ) + XFigExportImpVisitor( TQTextStream& s, const KigWidget& w ) : mstream( s ), mw( w ), msr( mw.showingRect() ), mnextcolorid( 32 ) { @@ -283,7 +283,7 @@ public: void XFigExportImpVisitor::mapColor( const ObjectDrawer* obj ) { if ( ! obj->shown() ) return; - QColor color = obj->color(); + TQColor color = obj->color(); if ( mcolormap.find( color ) == mcolormap.end() ) { int newcolorid = mnextcolorid++; @@ -351,15 +351,15 @@ void XFigExportImpVisitor::emitLine( const Coordinate& a, const Coordinate& b, i << "165.00 " // arrow_height << "\n\t"; } - QPoint ca = convertCoord( a ); - QPoint cb = convertCoord( b ); + TQPoint ca = convertCoord( a ); + TQPoint cb = convertCoord( b ); mstream << ca.x() << " " << ca.y() << " " << cb.x() << " " << cb.y() << "\n"; } void XFigExportImpVisitor::visit( const PointImp* imp ) { - const QPoint center = convertCoord( imp->coordinate() ); + const TQPoint center = convertCoord( imp->coordinate() ); int width = mcurobj->drawer()->width(); if ( width == -1 ) width = 5; width *= 10; @@ -387,8 +387,8 @@ void XFigExportImpVisitor::visit( const PointImp* imp ) void XFigExportImpVisitor::visit( const TextImp* imp ) { - QString text = imp->text(); - QPoint coord = convertCoord( imp->surroundingRect().bottomLeft() ); + TQString text = imp->text(); + TQPoint coord = convertCoord( imp->surroundingRect().bottomLeft() ); mstream << "4 " // text type << "0 " // subtype: left justfied @@ -424,7 +424,7 @@ void XFigExportImpVisitor::visit( const LocusImp* ) void XFigExportImpVisitor::visit( const CircleImp* imp ) { - const QPoint center = convertCoord( imp->center() ); + const TQPoint center = convertCoord( imp->center() ); const int radius = ( convertCoord( imp->center() + Coordinate( imp->radius(), 0 ) ) - center ).x(); @@ -477,12 +477,12 @@ void XFigExportImpVisitor::visit( const ConicImp* imp ) double radiusy = sqrt( r*r - d*d ); Coordinate center = data.focus1 - Coordinate( cos( anglex ), sin( anglex ) ).normalize( d ); - const QPoint qcenter = convertCoord( center ); + const TQPoint qcenter = convertCoord( center ); const int radius_x = ( convertCoord( center + Coordinate( radiusx, 0 ) ) - convertCoord( center ) ).x(); const int radius_y = ( convertCoord( center + Coordinate( radiusy, 0 ) ) - convertCoord( center ) ).x(); - const QPoint qpoint2 = convertCoord( center + Coordinate( -sin( anglex ), cos( anglex ) ) * radiusy ); + const TQPoint qpoint2 = convertCoord( center + Coordinate( -sin( anglex ), cos( anglex ) ) * radiusy ); mstream << "1 " // ellipse type << "1 " // subtype: ellipse defined by readii @@ -544,10 +544,10 @@ void XFigExportImpVisitor::visit( const ArcImp* imp ) const Coordinate ad = Coordinate( cos( startangle ), sin( startangle ) ).normalize( radius ); const Coordinate bd = Coordinate( cos( middleangle ), sin( middleangle ) ).normalize( radius ); const Coordinate cd = Coordinate( cos( endangle ), sin( endangle ) ).normalize( radius ); - const QPoint a = convertCoord( center + ad ); - const QPoint b = convertCoord( center + bd ); - const QPoint c = convertCoord( center + cd ); - const QPoint cent = convertCoord( center ); + const TQPoint a = convertCoord( center + ad ); + const TQPoint b = convertCoord( center + bd ); + const TQPoint c = convertCoord( center + cd ); + const TQPoint cent = convertCoord( center ); mstream << "5 " // Ellipse type << "1 " // subtype: open ended arc @@ -584,11 +584,11 @@ void XFigExporter::run( const KigPart& doc, KigWidget& w ) if ( !kfd->exec() ) return; - QString file_name = kfd->selectedFile(); + TQString file_name = kfd->selectedFile(); delete kfd; - QFile file( file_name ); + TQFile file( file_name ); if ( ! file.open( IO_WriteOnly ) ) { KMessageBox::sorry( &w, i18n( "The file \"%1\" could not be opened. Please " @@ -596,7 +596,7 @@ void XFigExporter::run( const KigPart& doc, KigWidget& w ) .arg( file_name ) ); return; }; - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << "#FIG 3.2\n"; stream << "Landscape\n"; stream << "Center\n"; diff --git a/kig/filters/exporter.h b/kig/filters/exporter.h index 4fc74453..42670abf 100644 --- a/kig/filters/exporter.h +++ b/kig/filters/exporter.h @@ -52,15 +52,15 @@ public: /** * Returns a statement like i18n( "Export to image" ) */ - virtual QString exportToStatement() const = 0; + virtual TQString exportToStatement() const = 0; /** * Returns a string like i18n( "Image..." ) */ - virtual QString menuEntryName() const = 0; + virtual TQString menuEntryName() const = 0; /** * Returns a string with the name of the icon */ - virtual QString menuIcon() const = 0; + virtual TQString menuIcon() const = 0; /** * Do what you need to do. It's up to the individual exporters to @@ -78,9 +78,9 @@ class ImageExporter { public: ~ImageExporter(); - QString exportToStatement() const; - QString menuEntryName() const; - QString menuIcon() const; + TQString exportToStatement() const; + TQString menuEntryName() const; + TQString menuIcon() const; void run( const KigPart& doc, KigWidget& w ); }; @@ -94,9 +94,9 @@ class XFigExporter { public: ~XFigExporter(); - QString exportToStatement() const; - QString menuEntryName() const; - QString menuIcon() const; + TQString exportToStatement() const; + TQString menuEntryName() const; + TQString menuIcon() const; void run( const KigPart& doc, KigWidget& w ); }; #endif diff --git a/kig/filters/filter.cc b/kig/filters/filter.cc index 70290e8a..81cd1ef4 100644 --- a/kig/filters/filter.cc +++ b/kig/filters/filter.cc @@ -31,7 +31,7 @@ KigFilters* KigFilters::sThis; -KigFilter* KigFilters::find(const QString& mime) +KigFilter* KigFilters::find(const TQString& mime) { for (vect::iterator i = mFilters.begin(); i != mFilters.end(); ++i) { @@ -62,12 +62,12 @@ KigFilter::~KigFilter() { } -bool KigFilter::supportMime( const QString& ) +bool KigFilter::supportMime( const TQString& ) { return false; } -void KigFilter::fileNotFound( const QString& file ) const +void KigFilter::fileNotFound( const TQString& file ) const { KMessageBox::sorry( 0, i18n( "The file \"%1\" could not be opened. " @@ -76,12 +76,12 @@ void KigFilter::fileNotFound( const QString& file ) const "its permissions" ).arg( file ) ); } -void KigFilter::parseError( const QString& file, const QString& explanation ) const +void KigFilter::parseError( const TQString& file, const TQString& explanation ) const { - const QString text = + const TQString text = i18n( "An error was encountered while parsing the file \"%1\". It " "cannot be opened." ).arg( file ); - const QString title = i18n( "Parse Error" ); + const TQString title = i18n( "Parse Error" ); if ( explanation.isNull() ) KMessageBox::sorry( 0, text, title ); @@ -89,25 +89,25 @@ void KigFilter::parseError( const QString& file, const QString& explanation ) co KMessageBox::detailedSorry( 0, text, explanation, title ); } -void KigFilter::notSupported( const QString& file, const QString& explanation ) const +void KigFilter::notSupported( const TQString& file, const TQString& explanation ) const { KMessageBox::detailedSorry( 0, i18n( "Kig cannot open the file \"%1\"." ).arg( file ), explanation, i18n( "Not Supported" ) ); } -void KigFilter::warning( const QString& explanation ) const +void KigFilter::warning( const TQString& explanation ) const { KMessageBox::information( 0, explanation ); } -bool KigFilters::save( const KigDocument& data, const QString& tofile ) +bool KigFilters::save( const KigDocument& data, const TQString& tofile ) { return KigFilterNative::instance()->save( data, tofile ); } /* -bool KigFilters::save( const KigDocument& data, QTextStream& stream ) +bool KigFilters::save( const KigDocument& data, TQTextStream& stream ) { return KigFilterNative::instance()->save( data, stream ); } diff --git a/kig/filters/filter.h b/kig/filters/filter.h index f5d8b0f9..c887b05c 100644 --- a/kig/filters/filter.h +++ b/kig/filters/filter.h @@ -19,7 +19,7 @@ #ifndef FILTER_H #define FILTER_H -#include +#include #include @@ -34,14 +34,14 @@ class KigFilters { public: static KigFilters* instance(); - KigFilter* find (const QString& mime); + KigFilter* find (const TQString& mime); -// bool save ( const KigDocument& data, QTextStream& stream ); +// bool save ( const KigDocument& data, TQTextStream& stream ); /** * saving is always done with the native filter. We don't support * output filters.. */ - bool save ( const KigDocument& data, const QString& outfile ); + bool save ( const KigDocument& data, const TQString& outfile ); protected: KigFilters(); static KigFilters* sThis; @@ -53,7 +53,7 @@ protected: // return a very useful parse error in a filter's load function.. #define KIG_FILTER_PARSE_ERROR \ { \ - QString locs = i18n( "An error was encountered at " \ + TQString locs = i18n( "An error was encountered at " \ "line %1 in file %2." ) \ .arg( __LINE__ ).arg( __FILE__ ); \ parseError( file, locs ); \ @@ -70,10 +70,10 @@ class KigFilter { protected: // shows errors to the user.. - void fileNotFound( const QString& file ) const; - void parseError( const QString& file, const QString& explanation = QString::null ) const; - void notSupported( const QString& file, const QString& explanation ) const; - void warning( const QString& explanation ) const; + void fileNotFound( const TQString& file ) const; + void parseError( const TQString& file, const TQString& explanation = TQString::null ) const; + void notSupported( const TQString& file, const TQString& explanation ) const; + void warning( const TQString& explanation ) const; public: KigFilter(); virtual ~KigFilter(); @@ -81,7 +81,7 @@ public: /** * can the filter handle the mimetype \p mime ? */ - virtual bool supportMime ( const QString& mime ); + virtual bool supportMime ( const TQString& mime ); /** * load file \p fromfile and build a KigDocument from it.. If this @@ -91,6 +91,6 @@ public: * functions ). If this functions returns non-0, the caller owns * the returned KigDocument ( that was allocated with "new" ). */ - virtual KigDocument* load ( const QString& fromfile ) = 0; + virtual KigDocument* load ( const TQString& fromfile ) = 0; }; #endif diff --git a/kig/filters/filters-common.cc b/kig/filters/filters-common.cc index d25c2e14..4ba24e9f 100644 --- a/kig/filters/filters-common.cc +++ b/kig/filters/filters-common.cc @@ -19,21 +19,21 @@ #include -#include -#include +#include +#include #include "../objects/object_calcer.h" #include "../objects/object_factory.h" ObjectTypeCalcer* filtersConstructTextObject( const Coordinate& c, ObjectCalcer* o, - const QCString& arg, const KigDocument& doc, bool needframe ) + const TQCString& arg, const KigDocument& doc, bool needframe ) { const ObjectFactory* fact = ObjectFactory::instance(); ObjectCalcer* propo = fact->propertyObjectCalcer( o, arg ); propo->calc( doc ); std::vector args; args.push_back( propo ); - return fact->labelCalcer( QString::fromLatin1( "%1" ), c, needframe, + return fact->labelCalcer( TQString::fromLatin1( "%1" ), c, needframe, args, doc ); } diff --git a/kig/filters/filters-common.h b/kig/filters/filters-common.h index c46facc4..6bc8a57a 100644 --- a/kig/filters/filters-common.h +++ b/kig/filters/filters-common.h @@ -27,4 +27,4 @@ class KigDocument; */ ObjectTypeCalcer* filtersConstructTextObject( const Coordinate& c, ObjectCalcer* o, - const QCString& arg, const KigDocument& doc, bool needframe ); + const TQCString& arg, const KigDocument& doc, bool needframe ); diff --git a/kig/filters/imageexporteroptions.cc b/kig/filters/imageexporteroptions.cc index cb996926..cd68a0af 100644 --- a/kig/filters/imageexporteroptions.cc +++ b/kig/filters/imageexporteroptions.cc @@ -18,18 +18,18 @@ #include "imageexporteroptions.h" #include "imageexporteroptions.moc" -#include -#include +#include +#include #include -ImageExporterOptions::ImageExporterOptions( QWidget* parent, const QSize& s ) +ImageExporterOptions::ImageExporterOptions( TQWidget* parent, const TQSize& s ) : ImageExporterOptionsBase( parent, "imageexporteroptions" ), msize( s ), minternallysettingstuff( false ) { keepAspectRatio->setChecked( true ); - connect( WidthInput, SIGNAL( valueChanged( int ) ), this, SLOT( slotWidthChanged( int ) ) ); - connect( HeightInput, SIGNAL( valueChanged( int ) ), this, SLOT( slotHeightChanged( int ) ) ); + connect( WidthInput, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotWidthChanged( int ) ) ); + connect( HeightInput, TQT_SIGNAL( valueChanged( int ) ), this, TQT_SLOT( slotHeightChanged( int ) ) ); } ImageExporterOptions::~ImageExporterOptions() diff --git a/kig/filters/imageexporteroptions.h b/kig/filters/imageexporteroptions.h index 1ef6a855..69922803 100644 --- a/kig/filters/imageexporteroptions.h +++ b/kig/filters/imageexporteroptions.h @@ -27,14 +27,14 @@ class ImageExporterOptions { Q_OBJECT - QSize msize; + TQSize msize; // this is set by slotWidthChanged() when they set the other input // widget's value, to avoid reacting to internal changes to the // value like to user changes... bool minternallysettingstuff; public: - ImageExporterOptions( QWidget* parent, const QSize& s ); + ImageExporterOptions( TQWidget* parent, const TQSize& s ); ~ImageExporterOptions(); protected slots: diff --git a/kig/filters/kgeo-filter.cc b/kig/filters/kgeo-filter.cc index da26457d..02c1efde 100644 --- a/kig/filters/kgeo-filter.cc +++ b/kig/filters/kgeo-filter.cc @@ -47,12 +47,12 @@ #include #include -bool KigFilterKGeo::supportMime( const QString& mime ) +bool KigFilterKGeo::supportMime( const TQString& mime ) { return mime == "application/x-kgeo"; } -KigDocument* KigFilterKGeo::load( const QString& sFrom ) +KigDocument* KigFilterKGeo::load( const TQString& sFrom ) { // kgeo uses a KSimpleConfig to save its contents... KSimpleConfig config ( sFrom ); @@ -100,13 +100,13 @@ static std::vector sortElems( const std::vectorsetGroup("Main"); int number = c->readNumEntry ("Number"); @@ -125,12 +125,12 @@ KigDocument* KigFilterKGeo::loadObjects( const QString& file, KSimpleConfig* c ) group.setNum( i + 1 ); group.prepend( "Object " ); c->setGroup( group ); - QStrList parents; + TQStrList parents; c->readListEntry( "Parents", parents ); elems.push_back( elem ); for ( const char* parent = parents.first(); parent; parent = parents.next() ) { - int parentIndex = QString::fromLatin1( parent ).toInt( &ok ); + int parentIndex = TQString::fromLatin1( parent ).toInt( &ok ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; if ( parentIndex != 0 ) elems[i].parents.push_back( parentIndex - 1 ); @@ -166,8 +166,8 @@ KigDocument* KigFilterKGeo::loadObjects( const QString& file, KSimpleConfig* c ) case ID_point: { // fetch the coordinates... - QString strX = c->readEntry("QPointX"); - QString strY = c->readEntry("QPointY"); + TQString strX = c->readEntry("QPointX"); + TQString strY = c->readEntry("QPointY"); double x = strX.toDouble(&ok); if (!ok) KIG_FILTER_PARSE_ERROR; double y = strY.toDouble(&ok); @@ -251,7 +251,7 @@ KigDocument* KigFilterKGeo::loadObjects( const QString& file, KSimpleConfig* c ) bool frame = c->readBoolEntry( "Frame" ); double x = c->readDoubleNumEntry( "TextRectCenterX" ); double y = c->readDoubleNumEntry( "TextRectCenterY" ); - QString text = c->readEntry( "TextRectEntry" ); + TQString text = c->readEntry( "TextRectEntry" ); double height = c->readNumEntry( "TextRectHeight" ); double width = c->readNumEntry( "TextRectWidth" ); // we don't want the center, but the top left.. @@ -344,7 +344,7 @@ KigDocument* KigFilterKGeo::loadObjects( const QString& file, KSimpleConfig* c ) }; // set the color... - QColor co = c->readColorEntry( "Color" ); + TQColor co = c->readColorEntry( "Color" ); if( !co.isValid() ) co = Qt::blue; ObjectDrawer* d = new ObjectDrawer( co ); diff --git a/kig/filters/kgeo-filter.h b/kig/filters/kgeo-filter.h index 1a2ff83d..f8accd91 100644 --- a/kig/filters/kgeo-filter.h +++ b/kig/filters/kgeo-filter.h @@ -37,14 +37,14 @@ class KigFilterKGeo { public: static KigFilterKGeo* instance(); - bool supportMime ( const QString& mime ); - KigDocument* load ( const QString& from ); + bool supportMime ( const TQString& mime ); + KigDocument* load ( const TQString& from ); protected: KigFilterKGeo(); ~KigFilterKGeo(); void loadMetrics ( KSimpleConfig* ); - KigDocument* loadObjects ( const QString& file, KSimpleConfig* ); + KigDocument* loadObjects ( const TQString& file, KSimpleConfig* ); int xMax; int yMax; diff --git a/kig/filters/kgeo-resource.h b/kig/filters/kgeo-resource.h index 2a272ed0..f7af0f64 100644 --- a/kig/filters/kgeo-resource.h +++ b/kig/filters/kgeo-resource.h @@ -47,7 +47,7 @@ #endif #include -#include +#include #include /////////////////////////////////////////////////////////////////// diff --git a/kig/filters/kseg-defs.h b/kig/filters/kseg-defs.h index ad90fa1a..59dd3e4c 100644 --- a/kig/filters/kseg-defs.h +++ b/kig/filters/kseg-defs.h @@ -47,7 +47,7 @@ #include #include -#include +#include using namespace std; diff --git a/kig/filters/kseg-filter.cc b/kig/filters/kseg-filter.cc index f2ba901b..fb96c25c 100644 --- a/kig/filters/kseg-filter.cc +++ b/kig/filters/kseg-filter.cc @@ -43,12 +43,12 @@ #include "../objects/transform_types.h" #include "../objects/vector_type.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -60,7 +60,7 @@ KigFilterKSeg::~KigFilterKSeg() { } -bool KigFilterKSeg::supportMime( const QString& mime ) +bool KigFilterKSeg::supportMime( const TQString& mime ) { return mime == "application/x-kseg"; } @@ -68,12 +68,12 @@ bool KigFilterKSeg::supportMime( const QString& mime ) struct drawstyle { Q_INT8 pointstyle; - QFont font; - QPen pen; - QBrush brush; + TQFont font; + TQPen pen; + TQBrush brush; }; -static Coordinate readKSegCoordinate( QDataStream& stream ) +static Coordinate readKSegCoordinate( TQDataStream& stream ) { // read the coord.. float inx, iny; @@ -135,7 +135,7 @@ static ObjectTypeCalcer* intersectionPoint( const std::vector& pa else return 0; } -ObjectCalcer* KigFilterKSeg::transformObject( const QString& file, KigDocument& kigdoc, +ObjectCalcer* KigFilterKSeg::transformObject( const TQString& file, KigDocument& kigdoc, std::vector& parents, int subtype, bool& ok ) { @@ -196,9 +196,9 @@ ObjectCalcer* KigFilterKSeg::transformObject( const QString& file, KigDocument& return retobj; } -KigDocument* KigFilterKSeg::load( const QString& file ) +KigDocument* KigFilterKSeg::load( const TQString& file ) { - QFile ffile( file ); + TQFile ffile( file ); if ( ! ffile.open( IO_ReadOnly ) ) { fileNotFound( file ); @@ -207,18 +207,18 @@ KigDocument* KigFilterKSeg::load( const QString& file ) KigDocument* retdoc = new KigDocument(); - QDataStream fstream( &ffile ); + TQDataStream fstream( &ffile ); - QString versionstring; + TQString versionstring; fstream >> versionstring; if ( !versionstring.startsWith( "KSeg Document Version " ) ) KIG_FILTER_PARSE_ERROR; - QByteArray array; + TQByteArray array; fstream >> array; - QBuffer buf( array ); + TQBuffer buf( array ); buf.open( IO_ReadOnly ); - QDataStream stream( &buf ); + TQDataStream stream( &buf ); stream.setVersion( 3 ); @@ -281,7 +281,7 @@ KigDocument* KigFilterKSeg::load( const QString& file ) if ( type == G_LOOP ) continue; // read the label.. - QString labeltext; + TQString labeltext; stream >> labeltext; Coordinate relcoord = readKSegCoordinate( stream ); // shut up gcc @@ -298,7 +298,7 @@ KigDocument* KigFilterKSeg::load( const QString& file ) ObjectCalcer* o = 0; bool ok = true; - QColor color = style.pen.color(); + TQColor color = style.pen.color(); int width = style.pen.width(); /* @@ -636,7 +636,7 @@ KigDocument* KigFilterKSeg::load( const QString& file ) std::vector args2; args2.push_back( object->nameCalcer() ); ObjectCalcer* oc2 = fact->attachedLabelCalcer( - QString::fromLatin1( "%1" ), object->calcer(), + TQString::fromLatin1( "%1" ), object->calcer(), static_cast( object->imp() )->coordinate(), false, args2, *retdoc ); oc2->calc( *retdoc ); @@ -652,7 +652,7 @@ KigDocument* KigFilterKSeg::load( const QString& file ) stream >> selgroupcount; for ( int i = 0; i < selgroupcount; ++i ) { - QString name; + TQString name; stream >> name; int size; stream >> size; diff --git a/kig/filters/kseg-filter.h b/kig/filters/kseg-filter.h index af475a7a..03d03958 100644 --- a/kig/filters/kseg-filter.h +++ b/kig/filters/kseg-filter.h @@ -28,15 +28,15 @@ class KigFilterKSeg KigFilterKSeg(); ~KigFilterKSeg(); - ObjectCalcer* transformObject( const QString& file, KigDocument& kigdoc, + ObjectCalcer* transformObject( const TQString& file, KigDocument& kigdoc, std::vector& parents, int subtype, bool& ok ); public: static KigFilterKSeg* instance(); - bool supportMime ( const QString& mime ); - KigDocument* load ( const QString& fromfile ); + bool supportMime ( const TQString& mime ); + KigDocument* load ( const TQString& fromfile ); }; #endif diff --git a/kig/filters/latexexporter.cc b/kig/filters/latexexporter.cc index 955ac148..98d3fc2e 100644 --- a/kig/filters/latexexporter.cc +++ b/kig/filters/latexexporter.cc @@ -44,10 +44,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -59,25 +59,25 @@ #endif struct ColorMap { - QColor color; - QString name; + TQColor color; + TQString name; }; LatexExporter::~LatexExporter() { } -QString LatexExporter::exportToStatement() const +TQString LatexExporter::exportToStatement() const { return i18n( "Export to &Latex..." ); } -QString LatexExporter::menuEntryName() const +TQString LatexExporter::menuEntryName() const { return i18n( "&Latex..." ); } -QString LatexExporter::menuIcon() const +TQString LatexExporter::menuIcon() const { // TODO return "tex"; @@ -86,17 +86,17 @@ QString LatexExporter::menuIcon() const class LatexExportImpVisitor : public ObjectImpVisitor { - QTextStream& mstream; + TQTextStream& mstream; ObjectHolder* mcurobj; const KigWidget& mw; Rect msr; std::vector mcolors; - QString mcurcolorid; + TQString mcurcolorid; public: void visit( ObjectHolder* obj ); - void mapColor( QColor color ); + void mapColor( TQColor color ); - LatexExportImpVisitor( QTextStream& s, const KigWidget& w ) + LatexExportImpVisitor( TQTextStream& s, const KigWidget& w ) : mstream( s ), mw( w ), msr( mw.showingRect() ) { } @@ -135,7 +135,7 @@ private: * Searches if a color is already mapped into mcolors, and returns its * index or -1 if not found. */ - int findColor( QColor c ); + int findColor( TQColor c ); /** * Use to convert a dimension "on the screen" to a dimension wrt. * Kig coordinate system. @@ -144,7 +144,7 @@ private: /** * Converts a pen style into latex style string. */ - QString writeStyle( Qt::PenStyle style ); + TQString writeStyle( Qt::PenStyle style ); /** * Plots a generic curve though its points calc'ed with getPoint. */ @@ -177,7 +177,7 @@ void LatexExportImpVisitor::newLine() mstream << "\n"; } -int LatexExportImpVisitor::findColor( QColor c ) +int LatexExportImpVisitor::findColor( TQColor c ) { for ( uint i = 0; i < mcolors.size(); ++i ) { @@ -187,13 +187,13 @@ int LatexExportImpVisitor::findColor( QColor c ) return -1; } -void LatexExportImpVisitor::mapColor( QColor color ) +void LatexExportImpVisitor::mapColor( TQColor color ) { if ( findColor( color ) == -1 ) { ColorMap newcolor; newcolor.color = color; - QString tmpname = color.name(); + TQString tmpname = color.name(); tmpname.replace( "#", "" ); newcolor.name = tmpname; mcolors.push_back( newcolor ); @@ -205,14 +205,14 @@ void LatexExportImpVisitor::mapColor( QColor color ) double LatexExportImpVisitor::dimRealToCoord( int dim ) { - QRect qr( 0, 0, dim, dim ); + TQRect qr( 0, 0, dim, dim ); Rect r = mw.screenInfo().fromScreen( qr ); return fabs( r.width() ); } -QString LatexExportImpVisitor::writeStyle( Qt::PenStyle style ) +TQString LatexExportImpVisitor::writeStyle( Qt::PenStyle style ) { - QString ret( "linestyle=" ); + TQString ret( "linestyle=" ); if ( style == Qt::DashLine ) ret += "dashed"; else if ( style == Qt::DotLine ) @@ -227,7 +227,7 @@ void LatexExportImpVisitor::plotGenericCurve( const CurveImp* imp ) int width = mcurobj->drawer()->width(); if ( width == -1 ) width = 1; - QString prefix = QString( "\\pscurve[linecolor=%1,linewidth=%2,%3]" ) + TQString prefix = TQString( "\\pscurve[linecolor=%1,linewidth=%2,%3]" ) .arg( mcurcolorid ) .arg( width / 100.0 ) .arg( writeStyle( mcurobj->drawer()->style() ) ); @@ -319,7 +319,7 @@ void LatexExportImpVisitor::visit( const PointImp* imp ) mstream << "\\psdots[linecolor=" << mcurcolorid << ",dotscale=" << width << ",dotstyle="; const int ps = mcurobj->drawer()->pointStyle(); - QString pss( "*,fillstyle=solid,fillcolor=" + mcurcolorid ); + TQString pss( "*,fillstyle=solid,fillcolor=" + mcurcolorid ); if ( ps == 1 ) pss = "o,fillstyle=none"; else if ( ps == 2 ) @@ -483,7 +483,7 @@ void LatexExportImpVisitor::visit( const PolygonImp* imp ) void LatexExporter::run( const KigPart& doc, KigWidget& w ) { KigFileDialog* kfd = new KigFileDialog( - QString::null, i18n( "*.tex|Latex Documents (*.tex)" ), + TQString::null, i18n( "*.tex|Latex Documents (*.tex)" ), i18n( "Export as Latex" ), &w ); kfd->setOptionCaption( i18n( "Latex Options" ) ); LatexExporterOptions* opts = new LatexExporterOptions( 0L ); @@ -494,7 +494,7 @@ void LatexExporter::run( const KigPart& doc, KigWidget& w ) if ( !kfd->exec() ) return; - QString file_name = kfd->selectedFile(); + TQString file_name = kfd->selectedFile(); bool showgrid = opts->showGridCheckBox->isOn(); bool showaxes = opts->showAxesCheckBox->isOn(); bool showframe = opts->showExtraFrameCheckBox->isOn(); @@ -502,7 +502,7 @@ void LatexExporter::run( const KigPart& doc, KigWidget& w ) delete opts; delete kfd; - QFile file( file_name ); + TQFile file( file_name ); if ( ! file.open( IO_WriteOnly ) ) { KMessageBox::sorry( &w, i18n( "The file \"%1\" could not be opened. Please " @@ -511,7 +511,7 @@ void LatexExporter::run( const KigPart& doc, KigWidget& w ) return; }; - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << "\\documentclass[a4paper]{minimal}\n"; // stream << "\\usepackage[latin1]{inputenc}\n"; stream << "\\usepackage{pstricks}\n"; @@ -549,10 +549,10 @@ void LatexExporter::run( const KigPart& doc, KigWidget& w ) if ( ! ( *i )->shown() ) continue; visitor.mapColor( ( *i )->drawer()->color() ); }; - visitor.mapColor( QColor( 255, 255, 222 ) ); // ffffde - text label background - visitor.mapColor( QColor( 197, 194, 197 ) ); // c5c2c5 - text label border line - visitor.mapColor( QColor( 160, 160, 164 ) ); // a0a0a4 - axes color - visitor.mapColor( QColor( 192, 192, 192 ) ); // c0c0c0 - grid color + visitor.mapColor( TQColor( 255, 255, 222 ) ); // ffffde - text label background + visitor.mapColor( TQColor( 197, 194, 197 ) ); // c5c2c5 - text label border line + visitor.mapColor( TQColor( 160, 160, 164 ) ); // a0a0a4 - axes color + visitor.mapColor( TQColor( 192, 192, 192 ) ); // c0c0c0 - grid color // extra frame if ( showframe ) diff --git a/kig/filters/latexexporter.h b/kig/filters/latexexporter.h index 32638de1..23d9d7aa 100644 --- a/kig/filters/latexexporter.h +++ b/kig/filters/latexexporter.h @@ -32,9 +32,9 @@ class LatexExporter { public: ~LatexExporter(); - QString exportToStatement() const; - QString menuEntryName() const; - QString menuIcon() const; + TQString exportToStatement() const; + TQString menuEntryName() const; + TQString menuIcon() const; void run( const KigPart& doc, KigWidget& w ); }; diff --git a/kig/filters/native-filter.cc b/kig/filters/native-filter.cc index 6cecf09b..a5378263 100644 --- a/kig/filters/native-filter.cc +++ b/kig/filters/native-filter.cc @@ -32,9 +32,9 @@ #include "config.h" -#include -#include -#include +#include +#include +#include #include #include @@ -52,7 +52,7 @@ struct HierElem { int id; std::vector parents; - QDomElement el; + TQDomElement el; }; static void extendVect( std::vector& vect, uint size ) @@ -97,21 +97,21 @@ KigFilterNative::~KigFilterNative() { } -bool KigFilterNative::supportMime( const QString& mime ) +bool KigFilterNative::supportMime( const TQString& mime ) { return mime == "application/x-kig"; } -KigDocument* KigFilterNative::load( const QString& file ) +KigDocument* KigFilterNative::load( const TQString& file ) { - QFile ffile( file ); + TQFile ffile( file ); if ( ! ffile.open( IO_ReadOnly ) ) { fileNotFound( file ); return 0; }; - QFile kigdoc( file ); + TQFile kigdoc( file ); #ifndef KIG_NO_COMPRESSED_FILES bool iscompressed = false; if ( !file.endsWith( ".kig", false ) ) @@ -120,14 +120,14 @@ KigDocument* KigFilterNative::load( const QString& file ) // kig file inside it... iscompressed = true; - QString tempdir = KGlobal::dirs()->saveLocation( "tmp" ); + TQString tempdir = KGlobal::dirs()->saveLocation( "tmp" ); if ( tempdir.isEmpty() ) KIG_FILTER_PARSE_ERROR; - QString tempname = file.section( '/', -1 ); + TQString tempname = file.section( '/', -1 ); if ( file.endsWith( ".kigz", false ) ) { - tempname.remove( QRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); + tempname.remove( TQRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); } else KIG_FILTER_PARSE_ERROR; @@ -136,8 +136,8 @@ KigDocument* KigFilterNative::load( const QString& file ) ark->open( IO_ReadOnly ); const KArchiveDirectory* dir = ark->directory(); // assert( dir ); - QStringList entries = dir->entries(); - QStringList kigfiles = entries.grep( QRegExp( "\\.kig$" ) ); + TQStringList entries = dir->entries(); + TQStringList kigfiles = entries.grep( TQRegExp( "\\.kig$" ) ); if ( kigfiles.count() != 1 ) // I throw a generic parse error here, but I should warn the user that // this kig archive file doesn't contain one kig file (it contains no @@ -148,7 +148,7 @@ KigDocument* KigFilterNative::load( const QString& file ) KIG_FILTER_PARSE_ERROR; dynamic_cast( kigz )->copyTo( tempdir ); kdDebug() << "extracted file: " << tempdir + kigz->name() << endl - << "exists: " << QFile::exists( tempdir + kigz->name() ) << endl; + << "exists: " << TQFile::exists( tempdir + kigz->name() ) << endl; kigdoc.setName( tempdir + kigz->name() ); } @@ -157,7 +157,7 @@ KigDocument* KigFilterNative::load( const QString& file ) if ( !kigdoc.open( IO_ReadOnly ) ) KIG_FILTER_PARSE_ERROR; - QDomDocument doc( "KigDocument" ); + TQDomDocument doc( "KigDocument" ); if ( !doc.setContent( &kigdoc ) ) KIG_FILTER_PARSE_ERROR; kigdoc.close(); @@ -168,16 +168,16 @@ KigDocument* KigFilterNative::load( const QString& file ) kigdoc.remove(); #endif - QDomElement main = doc.documentElement(); + TQDomElement main = doc.documentElement(); - QString version = main.attribute( "CompatibilityVersion" ); + TQString version = main.attribute( "CompatibilityVersion" ); if ( version.isEmpty() ) version = main.attribute( "Version" ); if ( version.isEmpty() ) version = main.attribute( "version" ); if ( version.isEmpty() ) KIG_FILTER_PARSE_ERROR; // matches 0.1, 0.2.0, 153.128.99 etc. - QRegExp versionre( "(\\d+)\\.(\\d+)(\\.(\\d+))?" ); + TQRegExp versionre( "(\\d+)\\.(\\d+)(\\.(\\d+))?" ); if ( ! versionre.exactMatch( version ) ) KIG_FILTER_PARSE_ERROR; bool ok = true; @@ -213,19 +213,19 @@ KigDocument* KigFilterNative::load( const QString& file ) return load07( file, main ); } -KigDocument* KigFilterNative::load04( const QString& file, const QDomElement& docelem ) +KigDocument* KigFilterNative::load04( const TQString& file, const TQDomElement& docelem ) { bool ok = true; KigDocument* ret = new KigDocument(); - for ( QDomNode n = docelem.firstChild(); ! n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = docelem.firstChild(); ! n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.isNull() ) continue; if ( e.tagName() == "CoordinateSystem" ) { - const QCString type = e.text().latin1(); + const TQCString type = e.text().latin1(); CoordinateSystem* s = CoordinateSystemFactory::build( type ); if ( ! s ) { @@ -244,8 +244,8 @@ KigDocument* KigFilterNative::load04( const QString& file, const QDomElement& do // first pass: do a topological sort of the objects, to support // randomly ordered files... std::vector elems; - QDomElement objectselem = e; - for ( QDomNode o = objectselem.firstChild(); ! o.isNull(); o = o.nextSibling() ) + TQDomElement objectselem = e; + for ( TQDomNode o = objectselem.firstChild(); ! o.isNull(); o = o.nextSibling() ) { e = o.toElement(); if ( e.isNull() ) continue; @@ -253,7 +253,7 @@ KigDocument* KigFilterNative::load04( const QString& file, const QDomElement& do if ( e.tagName() == "Data" || e.tagName() == "Property" || e.tagName() == "Object" ) { // fetch the id - QString tmp = e.attribute("id"); + TQString tmp = e.attribute("id"); id = tmp.toInt(&ok); if ( !ok ) KIG_FILTER_PARSE_ERROR; @@ -262,13 +262,13 @@ KigDocument* KigFilterNative::load04( const QString& file, const QDomElement& do } else continue; - for ( QDomNode p = e.firstChild(); !p.isNull(); p = p.nextSibling() ) + for ( TQDomNode p = e.firstChild(); !p.isNull(); p = p.nextSibling() ) { - QDomElement f = p.toElement(); + TQDomElement f = p.toElement(); if ( f.isNull() ) continue; if ( f.tagName() == "Parent" ) { - QString tmp = f.attribute( "id" ); + TQString tmp = f.attribute( "id" ); uint pid = tmp.toInt( &ok ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; @@ -288,15 +288,15 @@ KigDocument* KigFilterNative::load04( const QString& file, const QDomElement& do for ( std::vector::iterator i = elems.begin(); i != elems.end(); ++i ) { - QDomElement e = i->el; + TQDomElement e = i->el; bool internal = e.attribute( "internal" ) == "true" ? true : false; ObjectCalcer* o = 0; if ( e.tagName() == "Data" ) { - QString tmp = e.attribute( "type" ); + TQString tmp = e.attribute( "type" ); if ( tmp.isNull() ) KIG_FILTER_PARSE_ERROR; - QString error; + TQString error; ObjectImp* imp = ObjectImpFactory::instance()->deserialize( tmp, e, error ); if ( ( !imp ) && !error.isEmpty() ) { @@ -307,8 +307,8 @@ KigDocument* KigFilterNative::load04( const QString& file, const QDomElement& do } else if ( e.tagName() == "Property" ) { - QCString propname; - for ( QDomElement ec = e.firstChild().toElement(); !ec.isNull(); + TQCString propname; + for ( TQDomElement ec = e.firstChild().toElement(); !ec.isNull(); ec = ec.nextSibling().toElement() ) { if ( ec.tagName() == "Property" ) @@ -326,7 +326,7 @@ KigDocument* KigFilterNative::load04( const QString& file, const QDomElement& do } else if ( e.tagName() == "Object" ) { - QString tmp = e.attribute( "type" ); + TQString tmp = e.attribute( "type" ); if ( tmp.isNull() ) KIG_FILTER_PARSE_ERROR; @@ -356,8 +356,8 @@ KigDocument* KigFilterNative::load04( const QString& file, const QDomElement& do if ( ! internal ) { - QString tmp = e.attribute( "color" ); - QColor color( tmp ); + TQString tmp = e.attribute( "color" ); + TQColor color( tmp ); if ( !color.isValid() ) KIG_FILTER_PARSE_ERROR; @@ -386,7 +386,7 @@ KigFilterNative* KigFilterNative::instance() return &f; } -KigDocument* KigFilterNative::load07( const QString& file, const QDomElement& docelem ) +KigDocument* KigFilterNative::load07( const TQString& file, const TQDomElement& docelem ) { KigDocument* ret = new KigDocument(); @@ -394,19 +394,19 @@ KigDocument* KigFilterNative::load07( const QString& file, const QDomElement& do std::vector calcers; std::vector holders; - QString t = docelem.attribute( "grid" ); + TQString t = docelem.attribute( "grid" ); bool tmphide = ( t == "false" ) || ( t == "no" ) || ( t == "0" ); ret->setGrid( !tmphide ); t = docelem.attribute( "axes" ); tmphide = ( t == "false" ) || ( t == "no" ) || ( t == "0" ); ret->setAxes( !tmphide ); - for ( QDomElement subsectionelement = docelem.firstChild().toElement(); ! subsectionelement.isNull(); + for ( TQDomElement subsectionelement = docelem.firstChild().toElement(); ! subsectionelement.isNull(); subsectionelement = subsectionelement.nextSibling().toElement() ) { if ( subsectionelement.tagName() == "CoordinateSystem" ) { - QString tmptype = subsectionelement.text(); + TQString tmptype = subsectionelement.text(); // compatibility code - to support Invisible coord system... if ( tmptype == "Invisible" ) { @@ -414,7 +414,7 @@ KigDocument* KigFilterNative::load07( const QString& file, const QDomElement& do ret->setGrid( false ); ret->setAxes( false ); } - const QCString type = tmptype.latin1(); + const TQCString type = tmptype.latin1(); CoordinateSystem* s = CoordinateSystemFactory::build( type ); if ( ! s ) { @@ -427,19 +427,19 @@ KigDocument* KigFilterNative::load07( const QString& file, const QDomElement& do } else if ( subsectionelement.tagName() == "Hierarchy" ) { - for ( QDomElement e = subsectionelement.firstChild().toElement(); ! e.isNull(); + for ( TQDomElement e = subsectionelement.firstChild().toElement(); ! e.isNull(); e = e.nextSibling().toElement() ) { - QString tmp = e.attribute( "id" ); + TQString tmp = e.attribute( "id" ); uint id = tmp.toInt( &ok ); if ( id <= 0 ) KIG_FILTER_PARSE_ERROR; std::vector parents; - for ( QDomElement parentel = e.firstChild().toElement(); ! parentel.isNull(); + for ( TQDomElement parentel = e.firstChild().toElement(); ! parentel.isNull(); parentel = parentel.nextSibling().toElement() ) { if ( parentel.tagName() != "Parent" ) continue; - QString tmp = parentel.attribute( "id" ); + TQString tmp = parentel.attribute( "id" ); uint parentid = tmp.toInt( &ok ); if ( ! ok ) KIG_FILTER_PARSE_ERROR; if ( parentid == 0 || parentid > calcers.size() ) KIG_FILTER_PARSE_ERROR; @@ -453,8 +453,8 @@ KigDocument* KigFilterNative::load07( const QString& file, const QDomElement& do if ( e.tagName() == "Data" ) { if ( !parents.empty() ) KIG_FILTER_PARSE_ERROR; - QString tmp = e.attribute( "type" ); - QString error; + TQString tmp = e.attribute( "type" ); + TQString error; ObjectImp* imp = ObjectImpFactory::instance()->deserialize( tmp, e, error ); if ( ( !imp ) && !error.isEmpty() ) { @@ -466,7 +466,7 @@ KigDocument* KigFilterNative::load07( const QString& file, const QDomElement& do else if ( e.tagName() == "Property" ) { if ( parents.size() != 1 ) KIG_FILTER_PARSE_ERROR; - QCString propname = e.attribute( "which" ).latin1(); + TQCString propname = e.attribute( "which" ).latin1(); ObjectCalcer* parent = parents[0]; int propid = parent->imp()->propertiesInternalNames().findIndex( propname ); @@ -476,7 +476,7 @@ KigDocument* KigFilterNative::load07( const QString& file, const QDomElement& do } else if ( e.tagName() == "Object" ) { - QString tmp = e.attribute( "type" ); + TQString tmp = e.attribute( "type" ); const ObjectType* type = ObjectTypeFactory::instance()->find( tmp.latin1() ); if ( ! type ) @@ -511,12 +511,12 @@ KigDocument* KigFilterNative::load07( const QString& file, const QDomElement& do } else if ( subsectionelement.tagName() == "View" ) { - for ( QDomElement e = subsectionelement.firstChild().toElement(); ! e.isNull(); + for ( TQDomElement e = subsectionelement.firstChild().toElement(); ! e.isNull(); e = e.nextSibling().toElement() ) { if ( e.tagName() != "Draw" ) KIG_FILTER_PARSE_ERROR; - QString tmp = e.attribute( "object" ); + TQString tmp = e.attribute( "object" ); uint id = tmp.toInt( &ok ); if ( !ok ) KIG_FILTER_PARSE_ERROR; if ( id <= 0 || id > calcers.size() ) @@ -524,7 +524,7 @@ KigDocument* KigFilterNative::load07( const QString& file, const QDomElement& do ObjectCalcer* calcer = calcers[id-1].get(); tmp = e.attribute( "color" ); - QColor color( tmp ); + TQColor color( tmp ); if ( !color.isValid() ) KIG_FILTER_PARSE_ERROR; @@ -564,17 +564,17 @@ KigDocument* KigFilterNative::load07( const QString& file, const QDomElement& do return ret; } -bool KigFilterNative::save07( const KigDocument& kdoc, QTextStream& stream ) +bool KigFilterNative::save07( const KigDocument& kdoc, TQTextStream& stream ) { - QDomDocument doc( "KigDocument" ); + TQDomDocument doc( "KigDocument" ); - QDomElement docelem = doc.createElement( "KigDocument" ); + TQDomElement docelem = doc.createElement( "KigDocument" ); docelem.setAttribute( "Version", KIGVERSION ); docelem.setAttribute( "CompatibilityVersion", "0.7.0" ); docelem.setAttribute( "grid", kdoc.grid() ); docelem.setAttribute( "axes", kdoc.axes() ); - QDomElement cselem = doc.createElement( "CoordinateSystem" ); + TQDomElement cselem = doc.createElement( "CoordinateSystem" ); cselem.appendChild( doc.createTextNode( kdoc.coordinateSystem().type() ) ); docelem.appendChild( cselem ); @@ -582,7 +582,7 @@ bool KigFilterNative::save07( const KigDocument& kdoc, QTextStream& stream ) std::vector calcers = getAllParents( getAllCalcers( holders ) ); calcers = calcPath( calcers ); - QDomElement hierelem = doc.createElement( "Hierarchy" ); + TQDomElement hierelem = doc.createElement( "Hierarchy" ); std::map idmap; for ( std::vector::const_iterator i = calcers.begin(); i != calcers.end(); ++i ) @@ -591,11 +591,11 @@ bool KigFilterNative::save07( const KigDocument& kdoc, QTextStream& stream ) for ( std::vector::const_iterator i = calcers.begin(); i != calcers.end(); ++i ) { - QDomElement objectelem; + TQDomElement objectelem; if ( dynamic_cast( *i ) ) { objectelem = doc.createElement( "Data" ); - QString ser = + TQString ser = ObjectImpFactory::instance()->serialize( *(*i)->imp(), objectelem, doc ); objectelem.setAttribute( "type", ser ); } @@ -604,7 +604,7 @@ bool KigFilterNative::save07( const KigDocument& kdoc, QTextStream& stream ) const ObjectPropertyCalcer* o = static_cast( *i ); objectelem = doc.createElement( "Property" ); - QCString propname = o->parent()->imp()->propertiesInternalNames()[o->propId()]; + TQCString propname = o->parent()->imp()->propertiesInternalNames()[o->propId()]; objectelem.setAttribute( "which", propname ); } else if ( dynamic_cast( *i ) ) @@ -621,7 +621,7 @@ bool KigFilterNative::save07( const KigDocument& kdoc, QTextStream& stream ) std::map::const_iterator idp = idmap.find( *i ); assert( idp != idmap.end() ); int pid = idp->second; - QDomElement pel = doc.createElement( "Parent" ); + TQDomElement pel = doc.createElement( "Parent" ); pel.setAttribute( "id", pid ); objectelem.appendChild( pel ); } @@ -631,7 +631,7 @@ bool KigFilterNative::save07( const KigDocument& kdoc, QTextStream& stream ) } docelem.appendChild( hierelem ); - QDomElement windowelem = doc.createElement( "View" ); + TQDomElement windowelem = doc.createElement( "View" ); for ( std::vector::iterator i = holders.begin(); i != holders.end(); ++i ) { std::map::const_iterator idp = idmap.find( ( *i )->calcer() ); @@ -639,11 +639,11 @@ bool KigFilterNative::save07( const KigDocument& kdoc, QTextStream& stream ) int id = idp->second; const ObjectDrawer* d = ( *i )->drawer(); - QDomElement drawelem = doc.createElement( "Draw" ); + TQDomElement drawelem = doc.createElement( "Draw" ); drawelem.setAttribute( "object", id ); drawelem.setAttribute( "color", d->color().name() ); - drawelem.setAttribute( "shown", QString::fromLatin1( d->shown() ? "true" : "false" ) ); - drawelem.setAttribute( "width", QString::number( d->width() ) ); + drawelem.setAttribute( "shown", TQString::fromLatin1( d->shown() ? "true" : "false" ) ); + drawelem.setAttribute( "width", TQString::number( d->width() ) ); drawelem.setAttribute( "style", d->styleToString() ); drawelem.setAttribute( "point-style", d->pointStyleToString() ); @@ -669,17 +669,17 @@ bool KigFilterNative::save07( const KigDocument& kdoc, QTextStream& stream ) return true; } -bool KigFilterNative::save( const KigDocument& data, const QString& file ) +bool KigFilterNative::save( const KigDocument& data, const TQString& file ) { return save07( data, file ); } -bool KigFilterNative::save07( const KigDocument& data, const QString& outfile ) +bool KigFilterNative::save07( const KigDocument& data, const TQString& outfile ) { // we have an empty outfile, so we have to print all to stdout if ( outfile.isEmpty() ) { - QTextStream stdoutstream( stdout, IO_WriteOnly ); + TQTextStream stdoutstream( stdout, IO_WriteOnly ); return save07( data, stdoutstream ); } #ifndef KIG_NO_COMPRESSED_FILES @@ -688,21 +688,21 @@ bool KigFilterNative::save07( const KigDocument& data, const QString& outfile ) // the user wants to save a compressed file, so we have to save our kig // file to a temp file and then compress it... - QString tempdir = KGlobal::dirs()->saveLocation( "tmp" ); + TQString tempdir = KGlobal::dirs()->saveLocation( "tmp" ); if ( tempdir.isEmpty() ) return false; - QString tempname = outfile.section( '/', -1 ); + TQString tempname = outfile.section( '/', -1 ); if ( outfile.endsWith( ".kigz", false ) ) - tempname.remove( QRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); + tempname.remove( TQRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); else return false; - QString tmpfile = tempdir + tempname + ".kig"; - QFile ftmpfile( tmpfile ); + TQString tmpfile = tempdir + tempname + ".kig"; + TQFile ftmpfile( tmpfile ); if ( !ftmpfile.open( IO_WriteOnly ) ) return false; - QTextStream stream( &ftmpfile ); + TQTextStream stream( &ftmpfile ); if ( !save07( data, stream ) ) return false; ftmpfile.close(); @@ -716,20 +716,20 @@ bool KigFilterNative::save07( const KigDocument& data, const QString& outfile ) ark->close(); // finally, removing temp file - QFile::remove( tmpfile ); + TQFile::remove( tmpfile ); return true; } else { #endif - QFile file( outfile ); + TQFile file( outfile ); if ( ! file.open( IO_WriteOnly ) ) { fileNotFound( outfile ); return false; } - QTextStream stream( &file ); + TQTextStream stream( &file ); return save07( data, stream ); #ifndef KIG_NO_COMPRESSED_FILES } @@ -740,7 +740,7 @@ bool KigFilterNative::save07( const KigDocument& data, const QString& outfile ) } /* -bool KigFilterNative::save( const KigDocument& data, QTextStream& stream ) +bool KigFilterNative::save( const KigDocument& data, TQTextStream& stream ) { return save07( data, stream ); } diff --git a/kig/filters/native-filter.h b/kig/filters/native-filter.h index 12778f35..22b8b1e2 100644 --- a/kig/filters/native-filter.h +++ b/kig/filters/native-filter.h @@ -38,29 +38,29 @@ private: * this is the load function for the Kig format that is used, * starting at Kig 0.4 */ - KigDocument* load04( const QString& file, const QDomElement& doc ); + KigDocument* load04( const TQString& file, const TQDomElement& doc ); /** * this is the load function for the Kig format that is used * starting at Kig 0.7 */ - KigDocument* load07( const QString& file, const QDomElement& doc ); + KigDocument* load07( const TQString& file, const TQDomElement& doc ); /** * save in the Kig format that is used starting at Kig 0.7 */ - bool save07( const KigDocument& data, const QString& outfile ); - bool save07( const KigDocument& data, QTextStream& file ); + bool save07( const KigDocument& data, const TQString& outfile ); + bool save07( const KigDocument& data, TQTextStream& file ); KigFilterNative(); ~KigFilterNative(); public: static KigFilterNative* instance(); - bool supportMime( const QString& mime ); - KigDocument* load( const QString& file ); + bool supportMime( const TQString& mime ); + KigDocument* load( const TQString& file ); - bool save( const KigDocument& data, const QString& file ); -// bool save( const KigDocument& data, QTextStream& stream ); + bool save( const KigDocument& data, const TQString& file ); +// bool save( const KigDocument& data, TQTextStream& stream ); }; #endif diff --git a/kig/filters/svgexporter.cc b/kig/filters/svgexporter.cc index 6e945de2..57413004 100644 --- a/kig/filters/svgexporter.cc +++ b/kig/filters/svgexporter.cc @@ -26,10 +26,10 @@ #include "../misc/kigfiledialog.h" #include "../misc/kigpainter.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -40,17 +40,17 @@ SVGExporter::~SVGExporter() { } -QString SVGExporter::exportToStatement() const +TQString SVGExporter::exportToStatement() const { return i18n( "&Export to SVG..." ); } -QString SVGExporter::menuEntryName() const +TQString SVGExporter::menuEntryName() const { return i18n( "&SVG..." ); } -QString SVGExporter::menuIcon() const +TQString SVGExporter::menuIcon() const { // TODO return "vectorgfx"; @@ -59,7 +59,7 @@ QString SVGExporter::menuIcon() const void SVGExporter::run( const KigPart& part, KigWidget& w ) { KigFileDialog* kfd = new KigFileDialog( - QString::null, i18n( "*.svg|Scalable Vector Graphics (*.svg)" ), + TQString::null, i18n( "*.svg|Scalable Vector Graphics (*.svg)" ), i18n( "Export as SVG" ), &w ); kfd->setOptionCaption( i18n( "SVG Options" ) ); SVGExporterOptions* opts = new SVGExporterOptions( 0L ); @@ -69,14 +69,14 @@ void SVGExporter::run( const KigPart& part, KigWidget& w ) if ( !kfd->exec() ) return; - QString file_name = kfd->selectedFile(); + TQString file_name = kfd->selectedFile(); bool showgrid = opts->showGridCheckBox->isOn(); bool showaxes = opts->showAxesCheckBox->isOn(); delete opts; delete kfd; - QFile file( file_name ); + TQFile file( file_name ); if ( ! file.open( IO_WriteOnly ) ) { KMessageBox::sorry( &w, i18n( "The file \"%1\" could not be opened. Please " @@ -85,10 +85,10 @@ void SVGExporter::run( const KigPart& part, KigWidget& w ) return; }; - QRect viewrect( w.screenInfo().viewRect() ); - QRect r( 0, 0, viewrect.width(), viewrect.height() ); + TQRect viewrect( w.screenInfo().viewRect() ); + TQRect r( 0, 0, viewrect.width(), viewrect.height() ); - QPicture pic; + TQPicture pic; pic.setBoundingRect( r ); KigPainter* p = new KigPainter( ScreenInfo( w.screenInfo().shownRect(), viewrect ), &pic, part.document() ); diff --git a/kig/filters/svgexporter.h b/kig/filters/svgexporter.h index 17193673..86cfaac4 100644 --- a/kig/filters/svgexporter.h +++ b/kig/filters/svgexporter.h @@ -32,9 +32,9 @@ class SVGExporter { public: ~SVGExporter(); - QString exportToStatement() const; - QString menuEntryName() const; - QString menuIcon() const; + TQString exportToStatement() const; + TQString menuEntryName() const; + TQString menuIcon() const; void run( const KigPart& part, KigWidget& w ); }; diff --git a/kig/kfile/kfile_drgeo.cpp b/kig/kfile/kfile_drgeo.cpp index 26ed7923..b921131b 100644 --- a/kig/kfile/kfile_drgeo.cpp +++ b/kig/kfile/kfile_drgeo.cpp @@ -20,8 +20,8 @@ #include "kfile_drgeo.h" -#include -#include +#include +#include #include @@ -29,16 +29,16 @@ typedef KGenericFactory drgeoFactory; K_EXPORT_COMPONENT_FACTORY( kfile_drgeo, drgeoFactory( "kfile_drgeo" ) ) -DrgeoPlugin::DrgeoPlugin( QObject *parent, const char *name, const QStringList &args ) +DrgeoPlugin::DrgeoPlugin( TQObject *parent, const char *name, const TQStringList &args ) : KFilePlugin( parent, name, args ) { info = addMimeTypeInfo( "application/x-drgeo" ); KFileMimeTypeInfo::GroupInfo* group = addGroupInfo( info, "DrgeoInfo", i18n( "Summary" ) ); KFileMimeTypeInfo::ItemInfo* item; - item = addItemInfo( group, "NumOfFigures", i18n( "Figures" ), QVariant::Int ); - item = addItemInfo( group, "NumOfTexts", i18n( "Texts" ), QVariant::Int ); - item = addItemInfo( group, "NumOfMacros", i18n( "Macros" ), QVariant::Int ); + item = addItemInfo( group, "NumOfFigures", i18n( "Figures" ), TQVariant::Int ); + item = addItemInfo( group, "NumOfTexts", i18n( "Texts" ), TQVariant::Int ); + item = addItemInfo( group, "NumOfMacros", i18n( "Macros" ), TQVariant::Int ); group_contents = addGroupInfo( info, "DrgeoContents", i18n( "Translators: what this drgeo " "file contains", "Contents" ) ); @@ -50,39 +50,39 @@ bool DrgeoPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) KFileMimeTypeInfo::ItemInfo* item; - QFile f( metainfo.path() ); - QDomDocument doc( "drgenius" ); + TQFile f( metainfo.path() ); + TQDomDocument doc( "drgenius" ); if ( !doc.setContent( &f ) ) return false; - QDomElement main = doc.documentElement(); + TQDomElement main = doc.documentElement(); int numfig = 0; int numtext = 0; int nummacro = 0; - QString sectname; + TQString sectname; // reading figures... - for ( QDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) + for ( TQDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.isNull() ) continue; else if ( e.tagName() == "drgeo" ) { numfig++; - sectname = QString( "Figure" ) + QString::number( numfig ); - item = addItemInfo( group_contents, sectname, i18n( "Figure" ), QVariant::String ); + sectname = TQString( "Figure" ) + TQString::number( numfig ); + item = addItemInfo( group_contents, sectname, i18n( "Figure" ), TQVariant::String ); appendItem( metagroup, sectname, e.attribute( "name" ) ); } else if ( e.tagName() == "text" ) { numtext++; - sectname = QString( "Text" ) + QString::number( numtext ); - item = addItemInfo( group_contents, sectname, i18n( "Text" ), QVariant::String ); + sectname = TQString( "Text" ) + TQString::number( numtext ); + item = addItemInfo( group_contents, sectname, i18n( "Text" ), TQVariant::String ); appendItem( metagroup, sectname, e.attribute( "name" ) ); } else if ( e.tagName() == "macro" ) { nummacro++; - sectname = QString( "Macro" ) + QString::number( nummacro ); - item = addItemInfo( group_contents, sectname, i18n( "Macro" ), QVariant::String ); + sectname = TQString( "Macro" ) + TQString::number( nummacro ); + item = addItemInfo( group_contents, sectname, i18n( "Macro" ), TQVariant::String ); appendItem( metagroup, sectname, e.attribute( "name" ) ); } } diff --git a/kig/kfile/kfile_drgeo.h b/kig/kfile/kfile_drgeo.h index b6e388da..e2c5d156 100644 --- a/kig/kfile/kfile_drgeo.h +++ b/kig/kfile/kfile_drgeo.h @@ -30,7 +30,7 @@ class DrgeoPlugin: public KFilePlugin Q_OBJECT public: - DrgeoPlugin( QObject *parent, const char *name, const QStringList& args ); + DrgeoPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& metainfo, uint what); protected: diff --git a/kig/kfile/kfile_kig.cpp b/kig/kfile/kfile_kig.cpp index eca2f79d..bd54a036 100644 --- a/kig/kfile/kfile_kig.cpp +++ b/kig/kfile/kfile_kig.cpp @@ -20,9 +20,9 @@ #include "kfile_kig.h" -#include -#include -#include +#include +#include +#include #include #include @@ -35,7 +35,7 @@ typedef KGenericFactory kigFactory; K_EXPORT_COMPONENT_FACTORY( kfile_kig, kigFactory( "kfile_kig" ) ) -KigPlugin::KigPlugin( QObject *parent, const char *name, const QStringList &args ) +KigPlugin::KigPlugin( TQObject *parent, const char *name, const TQStringList &args ) : KFilePlugin( parent, name, args ) { KFileMimeTypeInfo::ItemInfo* item; @@ -43,33 +43,33 @@ KigPlugin::KigPlugin( QObject *parent, const char *name, const QStringList &args info = addMimeTypeInfo( "application/x-kig" ); group = addGroupInfo( info, "KigInfo", i18n( "Summary" ) ); - item = addItemInfo( group, "Version", i18n( "Version" ), QVariant::String ); - item = addItemInfo( group, "CompatVersion", i18n( "Compatibility Version" ), QVariant::String ); - item = addItemInfo( group, "CoordSystem", i18n( "Coordinate System" ), QVariant::String ); - item = addItemInfo( group, "Grid", i18n( "Grid" ), QVariant::String ); - item = addItemInfo( group, "Axes", i18n( "Axes" ), QVariant::String ); - item = addItemInfo( group, "Compressed", i18n( "Compressed" ), QVariant::String ); + item = addItemInfo( group, "Version", i18n( "Version" ), TQVariant::String ); + item = addItemInfo( group, "CompatVersion", i18n( "Compatibility Version" ), TQVariant::String ); + item = addItemInfo( group, "CoordSystem", i18n( "Coordinate System" ), TQVariant::String ); + item = addItemInfo( group, "Grid", i18n( "Grid" ), TQVariant::String ); + item = addItemInfo( group, "Axes", i18n( "Axes" ), TQVariant::String ); + item = addItemInfo( group, "Compressed", i18n( "Compressed" ), TQVariant::String ); } bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) { KFileMetaInfoGroup metagroup = appendGroup( metainfo, "KigInfo"); - QString sfile = metainfo.path(); + TQString sfile = metainfo.path(); bool iscompressed = false; - QFile f( sfile ); + TQFile f( sfile ); if ( !sfile.endsWith( ".kig", false ) ) { iscompressed = true; - QString tempdir = KGlobal::dirs()->saveLocation( "tmp" ); + TQString tempdir = KGlobal::dirs()->saveLocation( "tmp" ); if ( tempdir.isEmpty() ) return false; - QString tempname = sfile.section( '/', -1 ); + TQString tempname = sfile.section( '/', -1 ); if ( sfile.endsWith( ".kigz", false ) ) { - tempname.remove( QRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); + tempname.remove( TQRegExp( "\\.[Kk][Ii][Gg][Zz]$" ) ); } else return false; @@ -77,8 +77,8 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) KTar* ark = new KTar( sfile, "application/x-gzip" ); ark->open( IO_ReadOnly ); const KArchiveDirectory* dir = ark->directory(); - QStringList entries = dir->entries(); - QStringList kigfiles = entries.grep( QRegExp( "\\.kig$" ) ); + TQStringList entries = dir->entries(); + TQStringList kigfiles = entries.grep( TQRegExp( "\\.kig$" ) ); if ( kigfiles.count() != 1 ) return false; const KArchiveEntry* kigz = dir->entry( kigfiles[0] ); @@ -92,7 +92,7 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) if ( !f.open( IO_ReadOnly ) ) return false; - QDomDocument doc( "KigDocument" ); + TQDomDocument doc( "KigDocument" ); if ( !doc.setContent( &f ) ) return false; @@ -102,26 +102,26 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) if ( iscompressed ) f.remove(); - QDomElement main = doc.documentElement(); + TQDomElement main = doc.documentElement(); // reading the version... - QString version = main.attribute( "Version" ); + TQString version = main.attribute( "Version" ); if ( version.isEmpty() ) version = main.attribute( "version" ); if ( version.isEmpty() ) version = i18n( "Translators: Not Available", "n/a" ); appendItem( metagroup, "Version", version ); // reading the compatibility version... - QString compatversion = main.attribute( "CompatibilityVersion" ); + TQString compatversion = main.attribute( "CompatibilityVersion" ); if ( compatversion.isEmpty() ) compatversion = i18n( "%1 represents Kig version", "%1 (as the version)" ).arg( version ); appendItem( metagroup, "CompatVersion", compatversion ); // reading the Coordinate System... - QCString coordsystem; - for ( QDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) + TQCString coordsystem; + for ( TQDomNode n = main.firstChild(); ! n.isNull(); n = n.nextSibling() ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.isNull() ) continue; if ( e.tagName() == "CoordinateSystem" ) coordsystem = e.text().latin1(); @@ -130,10 +130,10 @@ bool KigPlugin::readInfo( KFileMetaInfo& metainfo, uint /*what*/ ) // has Kig document the grid? bool btmp = true; - QString stmp = main.attribute( "grid" ); + TQString stmp = main.attribute( "grid" ); if ( !( stmp.isEmpty() || ( stmp != "0" ) ) ) btmp = ( stmp != "0" ); - QString stmp2 = btmp ? i18n( "Yes" ) : i18n( "No" ); + TQString stmp2 = btmp ? i18n( "Yes" ) : i18n( "No" ); appendItem( metagroup, "Grid", stmp2 ); // has Kig document the axes? diff --git a/kig/kfile/kfile_kig.h b/kig/kfile/kfile_kig.h index 8580ec48..8abacaaf 100644 --- a/kig/kfile/kfile_kig.h +++ b/kig/kfile/kfile_kig.h @@ -30,7 +30,7 @@ class KigPlugin: public KFilePlugin Q_OBJECT public: - KigPlugin( QObject *parent, const char *name, const QStringList& args ); + KigPlugin( TQObject *parent, const char *name, const TQStringList& args ); virtual bool readInfo( KFileMetaInfo& metainfo, uint what); protected: diff --git a/kig/kig/kig.cpp b/kig/kig/kig.cpp index 2429c843..ed954d26 100644 --- a/kig/kig/kig.cpp +++ b/kig/kig/kig.cpp @@ -21,8 +21,8 @@ #include "kig.h" #include "kig.moc" -#include -#include +#include +#include #include #include @@ -78,7 +78,7 @@ Kig::Kig() // and integrate the part's GUI with the shell's createGUI(m_part); // finally show tip-of-day ( if the user wants it :) ) - QTimer::singleShot( 0, this, SLOT( startupTipOfDay() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( startupTipOfDay() ) ); } } else @@ -105,30 +105,30 @@ Kig::~Kig() void Kig::setupActions() { - KStdAction::openNew(this, SLOT(fileNew()), actionCollection()); - KStdAction::open(this, SLOT(fileOpen()), actionCollection()); - KStdAction::quit(this, SLOT(close()), actionCollection()); + KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); + KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); + KStdAction::quit(this, TQT_SLOT(close()), actionCollection()); #ifdef KIG_DONT_USE_NEW_KMAINWINDOW_FEATURES - m_toolbarAction = KStdAction::showToolbar(this, SLOT(optionsShowToolbar()), actionCollection()); - m_statusbarAction = KStdAction::showStatusbar(this, SLOT(optionsShowStatusbar()), actionCollection()); + m_toolbarAction = KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection()); + m_statusbarAction = KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection()); #else createStandardStatusBarAction(); setStandardToolBarMenuEnabled(true); #endif // FIXME: this (recent files) should be app-wide, not specific to each window... - m_recentFilesAction = KStdAction::openRecent(this, SLOT(openURL(const KURL&)), actionCollection()); + m_recentFilesAction = KStdAction::openRecent(this, TQT_SLOT(openURL(const KURL&)), actionCollection()); m_recentFilesAction->loadEntries(config); #if KDE_IS_VERSION( 3, 2, 90 ) - KStdAction::keyBindings( guiFactory(), SLOT( configureShortcuts() ), actionCollection() ); + KStdAction::keyBindings( guiFactory(), TQT_SLOT( configureShortcuts() ), actionCollection() ); #else - KStdAction::keyBindings(this, SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection()); #endif - KStdAction::configureToolbars(this, SLOT(optionsConfigureToolbars()), actionCollection()); + KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection()); - KStdAction::tipOfDay( this, SLOT( tipOfDay() ), actionCollection(), "help_tipofday" ); + KStdAction::tipOfDay( this, TQT_SLOT( tipOfDay() ), actionCollection(), "help_tipofday" ); } void Kig::saveProperties(KConfig* config) @@ -203,8 +203,8 @@ void Kig::optionsConfigureToolbars() // use the standard toolbar editor KEditToolbar dlg(factory()); - connect(&dlg, SIGNAL(newToolbarConfig()), - this, SLOT(applyNewToolbarConfig())); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + this, TQT_SLOT(applyNewToolbarConfig())); dlg.exec(); } @@ -236,12 +236,12 @@ bool Kig::queryClose() }; } -void Kig::dragEnterEvent(QDragEnterEvent* e) +void Kig::dragEnterEvent(TQDragEnterEvent* e) { e->accept(KURLDrag::canDecode(e)); } -void Kig::dropEvent(QDropEvent* e) +void Kig::dropEvent(TQDropEvent* e) { KURL::List urls; if ( KURLDrag::decode (e, urls) ) @@ -257,7 +257,7 @@ void Kig::dropEvent(QDropEvent* e) void Kig::fileOpen() { - QString formats = + TQString formats = i18n( "*.kig *.kigz *.kgeo *.seg|All Supported Files (*.kig *.kigz *.kgeo *.seg)\n" "*.kig|Kig Documents (*.kig)\n" "*.kigz|Compressed Kig Documents (*.kigz)\n" @@ -267,7 +267,7 @@ void Kig::fileOpen() "*.fig *.FIG|Cabri Documents (*.fig *.FIG)" ); // this slot is connected to the KStdAction::open action... - QString file_name = KFileDialog::getOpenFileName(":document", formats ); + TQString file_name = KFileDialog::getOpenFileName(":document", formats ); if (!file_name.isEmpty()) openURL(file_name); } diff --git a/kig/kig/kig.h b/kig/kig/kig.h index d6ad9fea..51c236f2 100644 --- a/kig/kig/kig.h +++ b/kig/kig/kig.h @@ -72,7 +72,7 @@ class Kig : public KParts::MainWindow * * \param s the url of the file to open */ - void openURL (const QString& s) { openURL(KURL(s)); } + void openURL (const TQString& s) { openURL(KURL(s)); } void openURL (const KURL& s); protected: @@ -82,14 +82,14 @@ class Kig : public KParts::MainWindow * * \param e */ - void dragEnterEvent(QDragEnterEvent* e); + void dragEnterEvent(TQDragEnterEvent* e); /** * The user dropped something onto us... * * \param e */ - void dropEvent (QDropEvent* e); + void dropEvent (TQDropEvent* e); /** * this is called by the framework before closing the window, to diff --git a/kig/kig/kig_commands.cpp b/kig/kig/kig_commands.cpp index b9846fa6..d4668f55 100644 --- a/kig/kig/kig_commands.cpp +++ b/kig/kig/kig_commands.cpp @@ -45,7 +45,7 @@ public: vector tasks; }; -KigCommand::KigCommand( KigPart& doc, const QString& name ) +KigCommand::KigCommand( KigPart& doc, const TQString& name ) : KNamedCommand(name), d( new Private( doc ) ) { } @@ -93,7 +93,7 @@ KigCommand* KigCommand::addCommand( KigPart& doc, ObjectHolder* o ) KigCommand* KigCommand::removeCommand( KigPart& doc, const std::vector& os ) { assert( os.size() > 0 ); - QString text; + TQString text; if ( os.size() == 1 ) text = os.back()->imp()->type()->removeAStatement(); else @@ -105,7 +105,7 @@ KigCommand* KigCommand::removeCommand( KigPart& doc, const std::vector& os ) { - QString text; + TQString text; if ( os.size() == 1 ) text = os.back()->imp()->type()->addAStatement(); else @@ -117,7 +117,7 @@ KigCommand* KigCommand::addCommand( KigPart& doc, const std::vectorid() ); + TQString text = CoordinateSystemFactory::setCoordinateSystemStatement( s->id() ); KigCommand* ret = new KigCommand( doc, text ); ret->addTask( new ChangeCoordSystemTask( s ) ); return ret; diff --git a/kig/kig/kig_commands.h b/kig/kig/kig_commands.h index 8e4fd044..0dd7c93a 100644 --- a/kig/kig/kig_commands.h +++ b/kig/kig/kig_commands.h @@ -41,13 +41,13 @@ class Rect; * Used mainly in the Undo/Redo stuff... */ class KigCommand - : public QObject, public KNamedCommand + : public TQObject, public KNamedCommand { Q_OBJECT class Private; Private* d; public: - KigCommand( KigPart& inDoc, const QString& name ); + KigCommand( KigPart& inDoc, const TQString& name ); ~KigCommand(); /** diff --git a/kig/kig/kig_iface.h b/kig/kig/kig_iface.h index d3f74e19..d727600a 100644 --- a/kig/kig/kig_iface.h +++ b/kig/kig/kig_iface.h @@ -31,7 +31,7 @@ public: KigIface(); ~KigIface(); k_dcop: - virtual void openURL(const QString& s) = 0; + virtual void openURL(const TQString& s) = 0; }; #endif diff --git a/kig/kig/kig_part.cpp b/kig/kig/kig_part.cpp index 163f5429..1f891bb9 100644 --- a/kig/kig/kig_part.cpp +++ b/kig/kig/kig_part.cpp @@ -61,19 +61,19 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #if QT_VERSION >= 0x030100 -#include +#include #endif using namespace std; -static const QString typesFile = "macros.kigt"; +static const TQString typesFile = "macros.kigt"; // export this library... typedef KParts::GenericFactory KigPartFactory; @@ -114,47 +114,47 @@ class KigPrintDialogPage : public KPrintDialogPage { public: - KigPrintDialogPage( QWidget* parent = 0, const char* name = 0 ); + KigPrintDialogPage( TQWidget* parent = 0, const char* name = 0 ); ~KigPrintDialogPage(); - void getOptions( QMap& opts, bool ); - void setOptions( const QMap& opts ); - bool isValid( QString& ); + void getOptions( TQMap& opts, bool ); + void setOptions( const TQMap& opts ); + bool isValid( TQString& ); private: - QCheckBox *showgrid; - QCheckBox *showaxes; + TQCheckBox *showgrid; + TQCheckBox *showaxes; }; -KigPrintDialogPage::KigPrintDialogPage( QWidget* parent, const char* name ) +KigPrintDialogPage::KigPrintDialogPage( TQWidget* parent, const char* name ) : KPrintDialogPage( parent, name ) { setTitle( i18n( "Kig Options" ) ); - QVBoxLayout* vl = new QVBoxLayout( this, 0 , 11 ); + TQVBoxLayout* vl = new TQVBoxLayout( this, 0 , 11 ); - showgrid = new QCheckBox( i18n( "Show grid" ), this ); + showgrid = new TQCheckBox( i18n( "Show grid" ), this ); vl->addWidget( showgrid ); - showaxes = new QCheckBox( i18n( "Show axes" ), this ); + showaxes = new TQCheckBox( i18n( "Show axes" ), this ); vl->addWidget( showaxes ); - vl->addItem( new QSpacerItem( 10, 10, QSizePolicy::Fixed, QSizePolicy::Expanding ) ); + vl->addItem( new TQSpacerItem( 10, 10, TQSizePolicy::Fixed, TQSizePolicy::Expanding ) ); } KigPrintDialogPage::~KigPrintDialogPage() { } -void KigPrintDialogPage::getOptions( QMap< QString, QString >& opts, bool ) +void KigPrintDialogPage::getOptions( TQMap< TQString, TQString >& opts, bool ) { - opts[ "kde-kig-showgrid" ] = QString::number( showgrid->isChecked() ); - opts[ "kde-kig-showaxes" ] = QString::number( showaxes->isChecked() ); + opts[ "kde-kig-showgrid" ] = TQString::number( showgrid->isChecked() ); + opts[ "kde-kig-showaxes" ] = TQString::number( showaxes->isChecked() ); } -void KigPrintDialogPage::setOptions( const QMap< QString, QString >& opts ) +void KigPrintDialogPage::setOptions( const TQMap< TQString, TQString >& opts ) { - QString tmp = opts[ "kde-kig-showgrid" ]; + TQString tmp = opts[ "kde-kig-showgrid" ]; bool bt = ( tmp != "0" ); showgrid->setChecked( bt ); tmp = opts[ "kde-kig-showaxes" ]; @@ -162,14 +162,14 @@ void KigPrintDialogPage::setOptions( const QMap< QString, QString >& opts ) showaxes->setChecked( bt ); } -bool KigPrintDialogPage::isValid( QString& ) +bool KigPrintDialogPage::isValid( TQString& ) { return true; } -KigPart::KigPart( QWidget *parentWidget, const char *, - QObject *parent, const char *name, - const QStringList& ) +KigPart::KigPart( TQWidget *parentWidget, const char *, + TQObject *parent, const char *name, + const TQStringList& ) : KParts::ReadWritePart( parent, name ), mMode( 0 ), mdocument( new KigDocument() ) { @@ -195,7 +195,7 @@ KigPart::KigPart( QWidget *parentWidget, const char *, // construct our command history mhistory = new KCommandHistory(actionCollection()); mhistory->documentSaved(); - connect( mhistory, SIGNAL( documentRestored() ), this, SLOT( setUnmodified() ) ); + connect( mhistory, TQT_SIGNAL( documentRestored() ), this, TQT_SLOT( setUnmodified() ) ); // we are read-write by default setReadWrite(true); @@ -208,72 +208,72 @@ KigPart::KigPart( QWidget *parentWidget, const char *, void KigPart::setupActions() { // save actions.. - (void) KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection()); - (void) KStdAction::save(this, SLOT(fileSave()), actionCollection()); + (void) KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); + (void) KStdAction::save(this, TQT_SLOT(fileSave()), actionCollection()); // print actions - (void) KStdAction::print( this, SLOT( filePrint() ), actionCollection() ); - (void) KStdAction::printPreview( this, SLOT( filePrintPreview() ), actionCollection() ); + (void) KStdAction::print( this, TQT_SLOT( filePrint() ), actionCollection() ); + (void) KStdAction::printPreview( this, TQT_SLOT( filePrintPreview() ), actionCollection() ); // selection actions aSelectAll = KStdAction::selectAll( - this, SLOT( slotSelectAll() ), actionCollection() ); + this, TQT_SLOT( slotSelectAll() ), actionCollection() ); aDeselectAll = KStdAction::deselect( - this, SLOT( slotDeselectAll() ), actionCollection() ); + this, TQT_SLOT( slotDeselectAll() ), actionCollection() ); aInvertSelection = new KAction( i18n( "Invert Selection" ), "", 0, this, - SLOT( slotInvertSelection() ), actionCollection(), + TQT_SLOT( slotInvertSelection() ), actionCollection(), "edit_invert_selection" ); // we need icons... KIconLoader* l = instance()->iconLoader(); - QPixmap tmp; + TQPixmap tmp; aDeleteObjects = new KAction( i18n("&Delete Objects"), "editdelete", Key_Delete, this, - SLOT(deleteObjects()), actionCollection(), "delete_objects"); + TQT_SLOT(deleteObjects()), actionCollection(), "delete_objects"); aDeleteObjects->setToolTip(i18n("Delete the selected objects")); aCancelConstruction = new KAction( i18n("Cancel Construction"), "stop", Key_Escape, this, - SLOT(cancelConstruction()), actionCollection(), "cancel_construction"); + TQT_SLOT(cancelConstruction()), actionCollection(), "cancel_construction"); aCancelConstruction->setToolTip( i18n("Cancel the construction of the object being constructed")); aCancelConstruction->setEnabled(false); aShowHidden = new KAction( - i18n("U&nhide All"), 0, this, SLOT( showHidden() ), + i18n("U&nhide All"), 0, this, TQT_SLOT( showHidden() ), actionCollection(), "edit_unhide_all"); aShowHidden->setToolTip(i18n("Show all hidden objects")); aShowHidden->setEnabled( true ); aNewMacro = new KAction( - i18n("&New Macro..."), "gear", 0, this, SLOT(newMacro()), + i18n("&New Macro..."), "gear", 0, this, TQT_SLOT(newMacro()), actionCollection(), "macro_action"); aNewMacro->setToolTip(i18n("Define a new macro")); aConfigureTypes = new KAction( - i18n("Manage &Types..."), 0, this, SLOT(editTypes()), + i18n("Manage &Types..."), 0, this, TQT_SLOT(editTypes()), actionCollection(), "types_edit"); aConfigureTypes->setToolTip(i18n("Manage macro types.")); KigExportManager::instance()->addMenuAction( this, m_widget->realWidget(), actionCollection() ); - KAction* a = KStdAction::zoomIn( m_widget, SLOT( slotZoomIn() ), + KAction* a = KStdAction::zoomIn( m_widget, TQT_SLOT( slotZoomIn() ), actionCollection() ); a->setToolTip( i18n( "Zoom in on the document" ) ); a->setWhatsThis( i18n( "Zoom in on the document" ) ); - a = KStdAction::zoomOut( m_widget, SLOT( slotZoomOut() ), + a = KStdAction::zoomOut( m_widget, TQT_SLOT( slotZoomOut() ), actionCollection() ); a->setToolTip( i18n( "Zoom out of the document" ) ); a->setWhatsThis( i18n( "Zoom out of the document" ) ); - a = KStdAction::fitToPage( m_widget, SLOT( slotRecenterScreen() ), + a = KStdAction::fitToPage( m_widget, TQT_SLOT( slotRecenterScreen() ), actionCollection() ); // grr.. why isn't there an icon for this.. - a->setIconSet( QIconSet( l->loadIcon( "view_fit_to_page", KIcon::Toolbar ) ) ); + a->setIconSet( TQIconSet( l->loadIcon( "view_fit_to_page", KIcon::Toolbar ) ) ); a->setToolTip( i18n( "Recenter the screen on the document" ) ); a->setWhatsThis( i18n( "Recenter the screen on the document" ) ); @@ -283,12 +283,12 @@ void KigPart::setupActions() #endif #endif #ifdef KIG_PART_CPP_STD_FULLSCREEN_ACTION - a = KStdAction::fullScreen( m_widget, SLOT( toggleFullScreen() ), actionCollection(), (QWidget*)(widget()->parent()),"fullscreen" ); + a = KStdAction::fullScreen( m_widget, TQT_SLOT( toggleFullScreen() ), actionCollection(), (TQWidget*)(widget()->parent()),"fullscreen" ); #else tmp = l->loadIcon( "window_fullscreen", KIcon::Toolbar ); a = new KAction( i18n( "Full Screen" ), tmp, CTRL+SHIFT+Key_F, - m_widget, SLOT( toggleFullScreen() ), + m_widget, TQT_SLOT( toggleFullScreen() ), actionCollection(), "fullscreen" ); #endif a->setToolTip( i18n( "View this document full-screen." ) ); @@ -296,31 +296,31 @@ void KigPart::setupActions() // TODO: an icon for this.. a = new KAction( - i18n( "&Select Shown Area" ), "viewmagfit", 0, m_widget, SLOT( zoomRect() ), + i18n( "&Select Shown Area" ), "viewmagfit", 0, m_widget, TQT_SLOT( zoomRect() ), actionCollection(), "view_select_shown_rect" ); a->setToolTip( i18n( "Select the area that you want to be shown in the window." ) ); a->setWhatsThis( i18n( "Select the area that you want to be shown in the window." ) ); a = new KAction( - i18n( "S&elect Zoom Area" ), "viewmag", 0, m_widget, SLOT( zoomArea() ), + i18n( "S&elect Zoom Area" ), "viewmag", 0, m_widget, TQT_SLOT( zoomArea() ), actionCollection(), "view_zoom_area" ); // a->setToolTip( i18n( "Select the area that you want to be shown in the window." ) ); // a->setWhatsThis( i18n( "Select the area that you want to be shown in the window." ) ); aToggleGrid = new KToggleAction( - i18n( "Show &Grid" ), 0, this, SLOT( toggleGrid() ), + i18n( "Show &Grid" ), 0, this, TQT_SLOT( toggleGrid() ), actionCollection(), "settings_show_grid" ); aToggleGrid->setToolTip( i18n( "Show or hide the grid." ) ); aToggleGrid->setChecked( true ); aToggleAxes = new KToggleAction( - i18n( "Show &Axes" ), 0, this, SLOT( toggleAxes() ), + i18n( "Show &Axes" ), 0, this, TQT_SLOT( toggleAxes() ), actionCollection(), "settings_show_axes" ); aToggleAxes->setToolTip( i18n( "Show or hide the axes." ) ); aToggleAxes->setChecked( true ); aToggleNightVision = new KToggleAction( - i18n( "Wear Infrared Glasses" ), 0, this, SLOT( toggleNightVision() ), + i18n( "Wear Infrared Glasses" ), 0, this, TQT_SLOT( toggleNightVision() ), actionCollection(), "settings_toggle_nightvision" ); aToggleNightVision->setToolTip( i18n( "Enable/Disable hidden objects visibility." ) ); aToggleNightVision->setChecked( false ); @@ -366,7 +366,7 @@ KigPart::~KigPart() bool KigPart::openFile() { - QFileInfo fileinfo( m_file ); + TQFileInfo fileinfo( m_file ); if ( ! fileinfo.exists() ) { KMessageBox::sorry( widget(), @@ -591,7 +591,7 @@ void KigPart::plugActionLists() plugActionList( "user_types", aMNewAll ); } -void KigPart::emitStatusBarText( const QString& text ) +void KigPart::emitStatusBarText( const TQString& text ) { emit setStatusBarText( text ); } @@ -609,15 +609,15 @@ void KigPart::fileSave() bool KigPart::internalSaveAs() { // this slot is connected to the KStdAction::saveAs action... - QString formats = i18n( "*.kig|Kig Documents (*.kig)\n" + TQString formats = i18n( "*.kig|Kig Documents (*.kig)\n" "*.kigz|Compressed Kig Documents (*.kigz)" ); // formats += "\n"; // formats += KImageIO::pattern( KImageIO::Writing ); - QString file_name = KFileDialog::getSaveFileName(":document", formats ); + TQString file_name = KFileDialog::getSaveFileName(":document", formats ); if (file_name.isEmpty()) return false; - else if ( QFileInfo( file_name ).exists() ) + else if ( TQFileInfo( file_name ).exists() ) { int ret = KMessageBox::warningContinueCancel( m_widget, i18n( "The file \"%1\" already exists. Do you wish to overwrite it?" ) @@ -710,11 +710,11 @@ void KigPart::setupMacroTypes() alreadysetup = true; // the user's saved macro types: - QStringList dataFiles = + TQStringList dataFiles = KGlobal::dirs()->findAllResources("appdata", "kig-types/*.kigt", true, false ); std::vector macros; - for ( QStringList::iterator file = dataFiles.begin(); + for ( TQStringList::iterator file = dataFiles.begin(); file != dataFiles.end(); ++file ) { std::vector nmacros; @@ -726,7 +726,7 @@ void KigPart::setupMacroTypes() }; // hack: we need to plug the action lists _after_ the gui is // built.. i can't find a better solution than this... - QTimer::singleShot( 0, this, SLOT( plugActionLists() ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( plugActionLists() ) ); } void KigPart::setupBuiltinMacros() @@ -737,9 +737,9 @@ void KigPart::setupBuiltinMacros() alreadysetup = true; // builtin macro types ( we try to make the user think these are // normal types ).. - QStringList builtinfiles = + TQStringList builtinfiles = KGlobal::dirs()->findAllResources( "appdata", "builtin-macros/*.kigt", true, false ); - for ( QStringList::iterator file = builtinfiles.begin(); + for ( TQStringList::iterator file = builtinfiles.begin(); file != builtinfiles.end(); ++file ) { std::vector macros; @@ -784,8 +784,8 @@ void KigPart::filePrint() KigPrintDialogPage* kp = new KigPrintDialogPage(); printer.addDialogPage( kp ); printer.setFullPage( true ); - printer.setOption( "kde-kig-showgrid", QString::number( document().grid() ) ); - printer.setOption( "kde-kig-showaxes", QString::number( document().axes() ) ); + printer.setOption( "kde-kig-showgrid", TQString::number( document().grid() ) ); + printer.setOption( "kde-kig-showaxes", TQString::number( document().axes() ) ); printer.setPageSelection( KPrinter::ApplicationSide ); if ( printer.setup( m_widget, i18n("Print Geometry") ) ) { @@ -795,9 +795,9 @@ void KigPart::filePrint() void KigPart::doPrint( KPrinter& printer ) { - QPaintDeviceMetrics metrics( &printer ); + TQPaintDeviceMetrics metrics( &printer ); Rect rect = document().suggestedRect(); - QRect qrect( 0, 0, metrics.width(), metrics.height() ); + TQRect qrect( 0, 0, metrics.width(), metrics.height() ); if ( rect.width() * qrect.height() > rect.height() * qrect.width() ) { // qrect is too high.. @@ -910,7 +910,7 @@ KigDocument& KigPart::document() return *mdocument; } -extern "C" int convertToNative( const KURL& url, const QCString& outfile ) +extern "C" int convertToNative( const KURL& url, const TQCString& outfile ) { kdDebug() << "converting " << url.prettyURL() << " to " << outfile << endl; @@ -921,9 +921,9 @@ extern "C" int convertToNative( const KURL& url, const QCString& outfile ) return -1; } - QString file = url.path(); + TQString file = url.path(); - QFileInfo fileinfo( file ); + TQFileInfo fileinfo( file ); if ( ! fileinfo.exists() ) { kdError() << "The file \"" << file << "\" does not exist" << endl; @@ -952,7 +952,7 @@ extern "C" int convertToNative( const KURL& url, const QCString& outfile ) for ( std::vector::iterator i = tmp.begin(); i != tmp.end(); ++i ) ( *i )->calc( *doc ); - QString out = ( outfile == "-" ) ? QString::null : outfile; + TQString out = ( outfile == "-" ) ? TQString::null : outfile; bool success = KigFilters::instance()->save( *doc, out ); if ( !success ) { @@ -999,14 +999,14 @@ void KigPart::coordSystemChanged( int id ) void KigPart::saveTypes() { - QString typesDir = KGlobal::dirs()->saveLocation( "appdata", "kig-types" ); + TQString typesDir = KGlobal::dirs()->saveLocation( "appdata", "kig-types" ); if ( typesDir[ typesDir.length() - 1 ] != '/' ) typesDir += '/'; - QString typesFileWithPath = typesDir + typesFile; + TQString typesFileWithPath = typesDir + typesFile; // removing existant types file - if ( QFile::exists( typesFileWithPath ) ) - QFile::remove( typesFileWithPath ); + if ( TQFile::exists( typesFileWithPath ) ) + TQFile::remove( typesFileWithPath ); MacroList* macrolist = MacroList::instance(); macrolist->save( macrolist->macros(), typesFileWithPath ); @@ -1014,12 +1014,12 @@ void KigPart::saveTypes() void KigPart::loadTypes() { - QString typesDir = KGlobal::dirs()->saveLocation( "appdata", "kig-types" ); + TQString typesDir = KGlobal::dirs()->saveLocation( "appdata", "kig-types" ); if ( typesDir[ typesDir.length() - 1 ] != '/' ) typesDir += '/'; - QString typesFileWithPath = typesDir + typesFile; + TQString typesFileWithPath = typesDir + typesFile; - if ( QFile::exists( typesFileWithPath ) ) + if ( TQFile::exists( typesFileWithPath ) ) { std::vector macros; MacroList::instance()->load( typesFileWithPath, macros, *this ); diff --git a/kig/kig/kig_part.h b/kig/kig/kig_part.h index 2084d0a9..49204346 100644 --- a/kig/kig/kig_part.h +++ b/kig/kig/kig_part.h @@ -22,7 +22,7 @@ #ifndef KIGPART_H #define KIGPART_H -#include +#include #include @@ -65,9 +65,9 @@ public: /** * Default constructor */ - KigPart( QWidget* parentWidget, const char* widgetName, - QObject* parent = 0, const char* name = 0, - const QStringList& = QStringList() + KigPart( TQWidget* parentWidget, const char* widgetName, + TQObject* parent = 0, const char* name = 0, + const TQStringList& = TQStringList() ); /** @@ -89,7 +89,7 @@ protected: virtual bool saveFile(); public: - void emitStatusBarText( const QString& text ); + void emitStatusBarText( const TQString& text ); void redrawScreen(); void redrawScreen( KigWidget* w ); @@ -191,13 +191,13 @@ public: // the previous mode. Enabling/disabling is done at the same time, // of course.. // some MenuActions.. - QPtrList aMNewSegment; - QPtrList aMNewPoint; - QPtrList aMNewCircle; - QPtrList aMNewLine; - QPtrList aMNewOther; - QPtrList aMNewAll; - QPtrList aMNewConic; + TQPtrList aMNewSegment; + TQPtrList aMNewPoint; + TQPtrList aMNewCircle; + TQPtrList aMNewLine; + TQPtrList aMNewOther; + TQPtrList aMNewAll; + TQPtrList aMNewConic; KAction* aCancelConstruction; diff --git a/kig/kig/kig_view.cpp b/kig/kig/kig_view.cpp index 7d36bc14..fbf16517 100644 --- a/kig/kig/kig_view.cpp +++ b/kig/kig/kig_view.cpp @@ -30,11 +30,11 @@ #include "../modes/mode.h" #include "../modes/dragrectmode.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -47,7 +47,7 @@ #include #include -kdbgstream& operator<< ( kdbgstream& s, const QPoint& t ) +kdbgstream& operator<< ( kdbgstream& s, const TQPoint& t ) { s << "x: " << t.x() << " y: " << t.y(); return s; @@ -55,10 +55,10 @@ kdbgstream& operator<< ( kdbgstream& s, const QPoint& t ) KigWidget::KigWidget( KigPart* part, KigView* view, - QWidget* parent, + TQWidget* parent, const char* name, bool fullscreen ) - : QWidget( parent, name, + : TQWidget( parent, name, fullscreen ? WStyle_Customize | WStyle_NoBorder : 0 ), mpart( part ), mview( view ), @@ -82,12 +82,12 @@ KigWidget::~KigWidget() mpart->delWidget( this ); } -void KigWidget::paintEvent(QPaintEvent*) +void KigWidget::paintEvent(TQPaintEvent*) { updateEntireWidget(); } -void KigWidget::mousePressEvent (QMouseEvent* e) +void KigWidget::mousePressEvent (TQMouseEvent* e) { if( e->button() & Qt::LeftButton ) return mpart->mode()->leftClicked( e, this ); @@ -97,7 +97,7 @@ void KigWidget::mousePressEvent (QMouseEvent* e) return mpart->mode()->rightClicked( e, this ); } -void KigWidget::mouseMoveEvent (QMouseEvent* e) +void KigWidget::mouseMoveEvent (TQMouseEvent* e) { if( e->state() & Qt::LeftButton ) return mpart->mode()->leftMouseMoved( e, this ); @@ -108,7 +108,7 @@ void KigWidget::mouseMoveEvent (QMouseEvent* e) return mpart->mode()->mouseMoved( e, this ); } -void KigWidget::mouseReleaseEvent (QMouseEvent* e) +void KigWidget::mouseReleaseEvent (TQMouseEvent* e) { if( e->state() & Qt::LeftButton ) return mpart->mode()->leftReleased( e, this ); @@ -118,18 +118,18 @@ void KigWidget::mouseReleaseEvent (QMouseEvent* e) return mpart->mode()->rightReleased( e, this ); } -void KigWidget::updateWidget( const std::vector& overlay ) +void KigWidget::updateWidget( const std::vector& overlay ) { #undef SHOW_OVERLAY_RECTS #ifdef SHOW_OVERLAY_RECTS - QPainter debug (this, this); + TQPainter debug (this, this); debug.setPen(Qt::yellow); #endif // SHOW_OVERLAY_RECTS // we undo our old changes... - for ( std::vector::const_iterator i = oldOverlay.begin(); i != oldOverlay.end(); ++i ) + for ( std::vector::const_iterator i = oldOverlay.begin(); i != oldOverlay.end(); ++i ) bitBlt( this, i->topLeft(), &curPix, *i ); // we add our new changes... - for ( std::vector::const_iterator i = overlay.begin(); i != overlay.end(); ++i ) + for ( std::vector::const_iterator i = overlay.begin(); i != overlay.end(); ++i ) { bitBlt( this, i->topLeft(), &curPix, *i ); #ifdef SHOW_OVERLAY_RECTS @@ -141,15 +141,15 @@ void KigWidget::updateWidget( const std::vector& overlay ) void KigWidget::updateEntireWidget() { - std::vector overlay; - overlay.push_back( QRect( QPoint( 0, 0 ), size() ) ); + std::vector overlay; + overlay.push_back( TQRect( TQPoint( 0, 0 ), size() ) ); updateWidget( overlay ); } -void KigWidget::resizeEvent( QResizeEvent* e ) +void KigWidget::resizeEvent( TQResizeEvent* e ) { - QSize osize = e->oldSize(); - QSize nsize = e->size(); + TQSize osize = e->oldSize(); + TQSize nsize = e->size(); Rect orect = msi.shownRect(); curPix.resize( nsize ); @@ -173,12 +173,12 @@ void KigWidget::resizeEvent( QResizeEvent* e ) updateScrollBars(); } -void KigWidget::updateCurPix( const std::vector& ol ) +void KigWidget::updateCurPix( const std::vector& ol ) { // we make curPix look like stillPix again... - for ( std::vector::const_iterator i = oldOverlay.begin(); i != oldOverlay.end(); ++i ) + for ( std::vector::const_iterator i = oldOverlay.begin(); i != oldOverlay.end(); ++i ) bitBlt( &curPix, i->topLeft(), &stillPix, *i ); - for ( std::vector::const_iterator i = ol.begin(); i != ol.end(); ++i ) + for ( std::vector::const_iterator i = ol.begin(); i != ol.end(); ++i ) bitBlt( &curPix, i->topLeft(), &stillPix, *i ); // we add ol to oldOverlay, so that part of the widget will be @@ -233,7 +233,7 @@ void KigWidget::clearStillPix() { stillPix.fill(Qt::white); oldOverlay.clear(); - oldOverlay.push_back ( QRect( QPoint(0,0), size() ) ); + oldOverlay.push_back ( TQRect( TQPoint(0,0), size() ) ); } void KigWidget::redrawScreen( const std::vector& selection, bool dos ) @@ -264,7 +264,7 @@ const Rect KigWidget::showingRect() const return msi.shownRect(); } -const Coordinate KigWidget::fromScreen( const QPoint& p ) +const Coordinate KigWidget::fromScreen( const TQPoint& p ) { return msi.fromScreen( p ); } @@ -274,7 +274,7 @@ double KigWidget::pixelWidth() const return msi.pixelWidth(); } -const Rect KigWidget::fromScreen( const QRect& r ) +const Rect KigWidget::fromScreen( const TQRect& r ) { return msi.fromScreen( r ); } @@ -287,28 +287,28 @@ void KigWidget::updateScrollBars() KigView::KigView( KigPart* part, bool fullscreen, - QWidget* parent, + TQWidget* parent, const char* name ) - : QWidget( parent, name ), + : TQWidget( parent, name ), mlayout( 0 ), mrightscroll( 0 ), mbottomscroll( 0 ), mupdatingscrollbars( false ), mrealwidget( 0 ), mpart( part ) { - connect( part, SIGNAL( recenterScreen() ), this, SLOT( slotInternalRecenterScreen() ) ); + connect( part, TQT_SIGNAL( recenterScreen() ), this, TQT_SLOT( slotInternalRecenterScreen() ) ); - mlayout = new QGridLayout( this, 2, 2 ); - mrightscroll = new QScrollBar( Vertical, this, "Right Scrollbar" ); + mlayout = new TQGridLayout( this, 2, 2 ); + mrightscroll = new TQScrollBar( Vertical, this, "Right Scrollbar" ); // TODO: make this configurable... mrightscroll->setTracking( true ); - connect( mrightscroll, SIGNAL( valueChanged( int ) ), - this, SLOT( slotRightScrollValueChanged( int ) ) ); - connect( mrightscroll, SIGNAL( sliderReleased() ), - this, SLOT( updateScrollBars() ) ); - mbottomscroll = new QScrollBar( Horizontal, this, "Bottom Scrollbar" ); - connect( mbottomscroll, SIGNAL( valueChanged( int ) ), - this, SLOT( slotBottomScrollValueChanged( int ) ) ); - connect( mbottomscroll, SIGNAL( sliderReleased() ), - this, SLOT( updateScrollBars() ) ); + connect( mrightscroll, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( slotRightScrollValueChanged( int ) ) ); + connect( mrightscroll, TQT_SIGNAL( sliderReleased() ), + this, TQT_SLOT( updateScrollBars() ) ); + mbottomscroll = new TQScrollBar( Horizontal, this, "Bottom Scrollbar" ); + connect( mbottomscroll, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( slotBottomScrollValueChanged( int ) ) ); + connect( mbottomscroll, TQT_SIGNAL( sliderReleased() ), + this, TQT_SLOT( updateScrollBars() ) ); mrealwidget = new KigWidget( part, this, this, "Kig Widget", fullscreen ); mlayout->addWidget( mbottomscroll, 1, 0 ); mlayout->addWidget( mrealwidget, 0, 0 ); @@ -443,12 +443,12 @@ const KigDocument& KigWidget::document() const return mpart->document(); } -QSize KigWidget::sizeHint() const +TQSize KigWidget::sizeHint() const { - return QSize( 630, 450 ); + return TQSize( 630, 450 ); } -void KigWidget::wheelEvent( QWheelEvent* e ) +void KigWidget::wheelEvent( TQWheelEvent* e ) { int delta = e->delta(); Qt::Orientation orient = e->orientation(); @@ -568,7 +568,7 @@ void KigWidget::zoomArea() KigInputDialog::getTwoCoordinates( i18n( "Select Zoom Area" ), i18n( "Select the zoom area by entering the coordinates of " "the upper left corner and the lower right corner." ) + - QString::fromLatin1("
") + + TQString::fromLatin1("
") + mpart->document().coordinateSystem().coordinateFormatNoticeMarkup(), this, &ok, mpart->document(), &tl, &br ); if ( ok ) diff --git a/kig/kig/kig_view.h b/kig/kig/kig_view.h index 7970e088..ef8c6860 100644 --- a/kig/kig/kig_view.h +++ b/kig/kig/kig_view.h @@ -22,8 +22,8 @@ #ifndef KIG_VIEW_H #define KIG_VIEW_H -#include -#include +#include +#include #include @@ -54,14 +54,14 @@ class KigWidget : public QWidget KigPart* mpart; KigView* mview; - // we reimplement these from QWidget to suit our needs - void mousePressEvent( QMouseEvent* e ); - void mouseMoveEvent( QMouseEvent* e ); - void mouseReleaseEvent( QMouseEvent* e ); - void paintEvent( QPaintEvent* e ); - void wheelEvent( QWheelEvent* e ); - void resizeEvent( QResizeEvent* ); - QSize sizeHint() const; + // we reimplement these from TQWidget to suit our needs + void mousePressEvent( TQMouseEvent* e ); + void mouseMoveEvent( TQMouseEvent* e ); + void mouseReleaseEvent( TQMouseEvent* e ); + void paintEvent( TQPaintEvent* e ); + void wheelEvent( TQWheelEvent* e ); + void resizeEvent( TQResizeEvent* ); + TQSize sizeHint() const; /** * this is called to match a rect's dimensions to the dimensions of @@ -76,15 +76,15 @@ public: * wondering if this is appropriate, maybe it should be part of * MovingMode ? */ - QPixmap stillPix; + TQPixmap stillPix; /** * temporary, gets bitBlt'd (copied) onto the widget * (to avoid flickering) */ - QPixmap curPix; + TQPixmap curPix; protected: - std::vector oldOverlay; + std::vector oldOverlay; /** * this is a class that maps from our widget coordinates to the @@ -104,7 +104,7 @@ public: */ KigWidget( KigPart* doc, KigView* view, - QWidget* parent = 0, + TQWidget* parent = 0, const char* name = 0, bool fullscreen = false ); @@ -127,7 +127,7 @@ public: * i tried to optimise the drawing as much as possible, using * much ideas from kgeo * DOUBLE BUFFERING: - * we don't draw on the widget directly, we draw on a QPixmap ( + * we don't draw on the widget directly, we draw on a TQPixmap ( * curPix ), and bitBlt that onto the widget to avoid flickering. * TRIPLE BUFFERING: * we also currently keep an extra pixmap of what the widget looks @@ -153,12 +153,12 @@ public: /** * update curPix (bitBlt stillPix onto curPix..) */ - void updateCurPix( const std::vector& = std::vector()); + void updateCurPix( const std::vector& = std::vector()); /** * this means bitBlting curPix on the actual widget... */ - void updateWidget( const std::vector& = std::vector() ); + void updateWidget( const std::vector& = std::vector() ); void updateEntireWidget(); /** @@ -174,8 +174,8 @@ public: const Rect showingRect() const; void setShowingRect( const Rect& r ); - const Coordinate fromScreen( const QPoint& p ); - const Rect fromScreen( const QRect& r ); + const Coordinate fromScreen( const TQPoint& p ); + const Rect fromScreen( const TQRect& r ); double pixelWidth() const; /** @@ -228,12 +228,12 @@ class KigView { Q_OBJECT - QGridLayout* mlayout; - QScrollBar* mrightscroll; - QScrollBar* mbottomscroll; + TQGridLayout* mlayout; + TQScrollBar* mrightscroll; + TQScrollBar* mbottomscroll; /** - * apparently, QScrollBar also emits its signals when you update it + * apparently, TQScrollBar also emits its signals when you update it * manually, so we ignore them while we're in \ref updateScrollBars()... */ bool mupdatingscrollbars; @@ -244,7 +244,7 @@ class KigView public: KigView( KigPart* part, bool fullscreen = false, - QWidget* parent = 0, + TQWidget* parent = 0, const char* name = 0 ); ~KigView(); diff --git a/kig/kig/main.cpp b/kig/kig/main.cpp index d0a70404..577ebda1 100644 --- a/kig/kig/main.cpp +++ b/kig/kig/main.cpp @@ -87,12 +87,12 @@ void KigApplication::handleArgs( KCmdLineArgs* args ) } } -static int convertToNative( const KURL& file, const QCString& outfile ) +static int convertToNative( const KURL& file, const TQCString& outfile ) { KigApplication app( false ); KLibrary* library = KLibLoader::self()->globalLibrary( "libkigpart" ); - int ( *converterfunction )( const KURL&, const QCString& ); - converterfunction = ( int ( * )( const KURL&, const QCString& ) ) library->symbol( "convertToNative" ); + int ( *converterfunction )( const KURL&, const TQCString& ); + converterfunction = ( int ( * )( const KURL&, const TQCString& ) ) library->symbol( "convertToNative" ); if ( !converterfunction ) { kdError() << "Error: broken Kig installation: different library and application version !" << endl; @@ -112,7 +112,7 @@ int main(int argc, char **argv) KCmdLineArgs* args = KCmdLineArgs::parsedArgs(); if ( args->isSet( "convert-to-native" ) ) { - QCString outfile = args->getOption( "outfile" ); + TQCString outfile = args->getOption( "outfile" ); if ( outfile.isNull() ) outfile = "-"; diff --git a/kig/misc/common.cpp b/kig/misc/common.cpp index fccd384f..b41b9284 100644 --- a/kig/misc/common.cpp +++ b/kig/misc/common.cpp @@ -346,20 +346,20 @@ Coordinate calcCircleRadicalStartPoint( const Coordinate& ca, const Coordinate& return m + direc; } -double getDoubleFromUser( const QString& caption, const QString& label, double value, - QWidget* parent, bool* ok, double min, double max, int decimals ) +double getDoubleFromUser( const TQString& caption, const TQString& label, double value, + TQWidget* parent, bool* ok, double min, double max, int decimals ) { #ifdef KIG_USE_KDOUBLEVALIDATOR KDoubleValidator vtor( min, max, decimals, 0, 0 ); #else - KFloatValidator vtor( min, max, (QWidget*) 0, 0 ); + KFloatValidator vtor( min, max, (TQWidget*) 0, 0 ); #endif #if KDE_IS_VERSION( 3, 1, 90 ) - QString input = KInputDialog::getText( + TQString input = KInputDialog::getText( caption, label, KGlobal::locale()->formatNumber( value, decimals ), ok, parent, "getDoubleFromUserDialog", &vtor ); #else - QString input = + TQString input = KLineEditDlg::getText( caption, label, KGlobal::locale()->formatNumber( value, decimals ), ok, parent, &vtor ); diff --git a/kig/misc/common.h b/kig/misc/common.h index 77a1faa2..d1969df3 100644 --- a/kig/misc/common.h +++ b/kig/misc/common.h @@ -25,7 +25,7 @@ #include "coordinate.h" #include "rect.h" -#include +#include #include #include @@ -51,8 +51,8 @@ extern const double double_inf; * various places... */ -double getDoubleFromUser( const QString& caption, const QString& label, double value, - QWidget* parent, bool* ok, double min, double max, int decimals ); +double getDoubleFromUser( const TQString& caption, const TQString& label, double value, + TQWidget* parent, bool* ok, double min, double max, int decimals ); /** * Simple class representing a line. Used by various functions in Kig. diff --git a/kig/misc/coordinate.cpp b/kig/misc/coordinate.cpp index 13501bc9..f2c272f2 100644 --- a/kig/misc/coordinate.cpp +++ b/kig/misc/coordinate.cpp @@ -17,7 +17,7 @@ #include "coordinate.h" -#include +#include #include #include @@ -25,7 +25,7 @@ using namespace std; -Coordinate Coordinate::fromQPoint( const QPoint& p ) +Coordinate Coordinate::fromQPoint( const TQPoint& p ) { return Coordinate( p.x(), p.y() ); } @@ -162,10 +162,10 @@ const Coordinate Coordinate::round() const return Coordinate( qRound( x ), qRound( y ) ); } -QPoint Coordinate::toQPoint() const +TQPoint Coordinate::toQPoint() const { Coordinate t = round(); - return QPoint( (int) t.x, (int) t.y ); + return TQPoint( (int) t.x, (int) t.y ); } Coordinate Coordinate::invalidCoord() diff --git a/kig/misc/coordinate.h b/kig/misc/coordinate.h index a56edb76..96576a48 100644 --- a/kig/misc/coordinate.h +++ b/kig/misc/coordinate.h @@ -33,7 +33,7 @@ class kdbgstream; class Coordinate { public: - static Coordinate fromQPoint( const QPoint& p ); + static Coordinate fromQPoint( const TQPoint& p ); /** Constructor. Construct a new Coordinate, with a given x and y * value. @@ -102,7 +102,7 @@ public: * x/y ratio untouched... */ const Coordinate normalize( double length = 1 ) const; - QPoint toQPoint() const; + TQPoint toQPoint() const; Coordinate& operator= ( const Coordinate& c ); /** Add. Add c to this Coordinate diff --git a/kig/misc/coordinate_system.cpp b/kig/misc/coordinate_system.cpp index dd5181c2..859ed81d 100644 --- a/kig/misc/coordinate_system.cpp +++ b/kig/misc/coordinate_system.cpp @@ -28,8 +28,8 @@ #include "goniometry.h" #include "kigpainter.h" -#include -#include +#include +#include #include #include @@ -48,17 +48,17 @@ class CoordinateValidator #else KFloatValidator mdv; #endif - mutable QRegExp mre; + mutable TQRegExp mre; public: CoordinateValidator( bool polar ); ~CoordinateValidator(); - State validate ( QString & input, int & pos ) const; - void fixup ( QString & input ) const; + State validate ( TQString & input, int & pos ) const; + void fixup ( TQString & input ) const; }; CoordinateValidator::CoordinateValidator( bool polar ) - : QValidator( 0, 0 ), mpolar( polar ), mdv( 0, 0 ), + : TQValidator( 0, 0 ), mpolar( polar ), mdv( 0, 0 ), mre( polar ? "\\(? ?([0-9.,+-]+); ?([0-9.,+-]+) ?°? ?\\)?" : "\\(? ?([0-9.,+-]+); ?([0-9.,+-]+) ?\\)?" ) { @@ -68,9 +68,9 @@ CoordinateValidator::~CoordinateValidator() { } -QValidator::State CoordinateValidator::validate( QString & input, int & pos ) const +TQValidator::State CoordinateValidator::validate( TQString & input, int & pos ) const { - QString tinput = input; + TQString tinput = input; if ( tinput[tinput.length() - 1 ] == ')' ) tinput.truncate( tinput.length() - 1 ); if ( mpolar ) { @@ -84,8 +84,8 @@ QValidator::State CoordinateValidator::validate( QString & input, int & pos ) co if ( scp == -1 ) return mdv.validate( tinput, pos ) == Invalid ? Invalid : Valid; else { - QString p1 = tinput.left( scp ); - QString p2 = tinput.mid( scp + 1 ); + TQString p1 = tinput.left( scp ); + TQString p2 = tinput.mid( scp + 1 ); State ret = Acceptable; @@ -99,7 +99,7 @@ QValidator::State CoordinateValidator::validate( QString & input, int & pos ) co }; } -void CoordinateValidator::fixup( QString & input ) const +void CoordinateValidator::fixup( TQString & input ) const { int nsc = input.contains( ';' ); if ( nsc > 1 ) @@ -116,26 +116,26 @@ void CoordinateValidator::fixup( QString & input ) const sc = input.length(); KLocale* l = KGlobal::locale(); if ( mpolar ) - input.append( QString::fromLatin1( ";" ) + l->positiveSign() + - QString::fromLatin1( "0°" ) ); + input.append( TQString::fromLatin1( ";" ) + l->positiveSign() + + TQString::fromLatin1( "0°" ) ); else - input.append( QString::fromLatin1( ";" ) + l->positiveSign() + - QString::fromLatin1( "0" ) + l->decimalSymbol() + - QString::fromLatin1( "0" ) ); + input.append( TQString::fromLatin1( ";" ) + l->positiveSign() + + TQString::fromLatin1( "0" ) + l->decimalSymbol() + + TQString::fromLatin1( "0" ) ); }; mre.exactMatch( input ); - QString ds1 = mre.cap( 1 ); + TQString ds1 = mre.cap( 1 ); mdv.fixup( ds1 ); - QString ds2 = mre.cap( 2 ); + TQString ds2 = mre.cap( 2 ); mdv.fixup( ds2 ); - input = ds1 + QString::fromLatin1( "; " ) + ds2; + input = ds1 + TQString::fromLatin1( "; " ) + ds2; } EuclideanCoords::EuclideanCoords() { } -QString EuclideanCoords::fromScreen( const Coordinate& p, const KigDocument& d ) const +TQString EuclideanCoords::fromScreen( const Coordinate& p, const KigDocument& d ) const { // i used to use the widget size here, but that's no good idea, // since an object isn't asked to recalc every time the widget size @@ -144,19 +144,19 @@ QString EuclideanCoords::fromScreen( const Coordinate& p, const KigDocument& d ) Rect sr = d.suggestedRect(); double m = kigMax( sr.width(), sr.height() ); int l = kigMax( 0, (int) ( 3 - log10( m ) ) ); - QString xs = KGlobal::locale()->formatNumber( p.x, l ); - QString ys = KGlobal::locale()->formatNumber( p.y, l ); - return QString::fromLatin1( "( %1; %2 )" ).arg( xs ).arg( ys ); + TQString xs = KGlobal::locale()->formatNumber( p.x, l ); + TQString ys = KGlobal::locale()->formatNumber( p.y, l ); + return TQString::fromLatin1( "( %1; %2 )" ).arg( xs ).arg( ys ); } -Coordinate EuclideanCoords::toScreen(const QString& s, bool& ok) const +Coordinate EuclideanCoords::toScreen(const TQString& s, bool& ok) const { - QRegExp r( "\\(? ?([0-9.,+-]+); ?([0-9.,+-]+) ?\\)?" ); + TQRegExp r( "\\(? ?([0-9.,+-]+); ?([0-9.,+-]+) ?\\)?" ); ok = ( r.search(s) == 0 ); if (ok) { - QString xs = r.cap(1); - QString ys = r.cap(2); + TQString xs = r.cap(1); + TQString ys = r.cap(2); KLocale* l = KGlobal::locale(); double x = l->readNumber( xs, &ok ); if ( ! ok ) x = xs.toDouble( &ok ); @@ -241,7 +241,7 @@ void EuclideanCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) co /****** the grid lines ******/ if ( showgrid ) { - p.setPen( QPen( lightGray, 0, DotLine ) ); + p.setPen( TQPen( lightGray, 0, DotLine ) ); // vertical lines... for ( double i = hgraphmin; i <= hgraphmax + hd/2; i += hd ) p.drawSegment( Coordinate( i, vgraphmin ), @@ -255,7 +255,7 @@ void EuclideanCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) co /****** the axes ******/ if ( showaxes ) { - p.setPen( QPen( Qt::gray, 1, Qt::SolidLine ) ); + p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) ); // x axis p.drawSegment( Coordinate( hmin, 0 ), Coordinate( hmax, 0 ) ); // y axis @@ -286,8 +286,8 @@ void EuclideanCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) co ); }; // arrows on the ends of the axes... - p.setPen( QPen( Qt::gray, 1, Qt::SolidLine ) ); - p.setBrush( QBrush( Qt::gray ) ); + p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) ); + p.setBrush( TQBrush( Qt::gray ) ); std::vector a; // the arrow on the right end of the X axis... @@ -310,13 +310,13 @@ void EuclideanCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) co }; // if( showaxes ) } -QString EuclideanCoords::coordinateFormatNotice() const +TQString EuclideanCoords::coordinateFormatNotice() const { return i18n( "Enter coordinates in the following format: \"x;y\",\n" "where x is the x coordinate, and y is the y coordinate." ); } -QString EuclideanCoords::coordinateFormatNoticeMarkup() const +TQString EuclideanCoords::coordinateFormatNoticeMarkup() const { return i18n( "Enter coordinates in the following format: \"x;y\", " "where x is the x coordinate, and y is the y coordinate." ); @@ -342,7 +342,7 @@ PolarCoords::~PolarCoords() { } -QString PolarCoords::fromScreen( const Coordinate& pt, const KigDocument& d ) const +TQString PolarCoords::fromScreen( const Coordinate& pt, const KigDocument& d ) const { Rect sr = d.suggestedRect(); double m = kigMax( sr.width(), sr.height() ); @@ -351,37 +351,37 @@ QString PolarCoords::fromScreen( const Coordinate& pt, const KigDocument& d ) co double r = pt.length(); double theta = Goniometry::convert( atan2( pt.y, pt.x ), Goniometry::Rad, Goniometry::Deg ); - QString rs = KGlobal::locale()->formatNumber( r, l ); - QString ts = KGlobal::locale()->formatNumber( theta, 0 ); + TQString rs = KGlobal::locale()->formatNumber( r, l ); + TQString ts = KGlobal::locale()->formatNumber( theta, 0 ); - return QString::fromLatin1("( %1; %2° )").arg( rs ).arg( ts ); + return TQString::fromLatin1("( %1; %2° )").arg( rs ).arg( ts ); } -QString PolarCoords::coordinateFormatNotice() const +TQString PolarCoords::coordinateFormatNotice() const { // \xCE\xB8 is utf8 for the greek theta sign.. return i18n( "Enter coordinates in the following format: \"r; \xCE\xB8°\",\n" "where r and \xCE\xB8 are the polar coordinates." ); } -QString PolarCoords::coordinateFormatNoticeMarkup() const +TQString PolarCoords::coordinateFormatNoticeMarkup() const { // \xCE\xB8 is utf8 for the greek theta sign.. return i18n( "Enter coordinates in the following format: \"r; \xCE\xB8°\", " "where r and \xCE\xB8 are the polar coordinates." ); } -Coordinate PolarCoords::toScreen(const QString& s, bool& ok) const +Coordinate PolarCoords::toScreen(const TQString& s, bool& ok) const { - QRegExp regexp("\\(? ?([0-9.,+-]+); ?([0-9.,+-]+) ?°? ?\\)?" ); + TQRegExp regexp("\\(? ?([0-9.,+-]+); ?([0-9.,+-]+) ?°? ?\\)?" ); ok = ( regexp.search( s ) == 0 ); if (ok) { - QString rs = regexp.cap( 1 ); + TQString rs = regexp.cap( 1 ); double r = KGlobal::locale()->readNumber( rs, &ok ); if ( ! ok ) r = rs.toDouble( &ok ); if ( ! ok ) return Coordinate(); - QString ts = regexp.cap( 2 ); + TQString ts = regexp.cap( 2 ); double theta = KGlobal::locale()->readNumber( ts, &ok ); if ( ! ok ) theta = ts.toDouble( &ok ); if ( ! ok ) return Coordinate(); @@ -442,7 +442,7 @@ void PolarCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) const // we also want the circles that don't fit entirely in the // screen.. Coordinate c( 0, 0 ); - p.setPen( QPen( lightGray, 0, DotLine ) ); + p.setPen( TQPen( lightGray, 0, DotLine ) ); for ( double i = begin; i <= end + d / 2; i += d ) drawGridLine( p, c, fabs( i ) ); } @@ -450,7 +450,7 @@ void PolarCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) const /****** the axes ******/ if ( showaxes ) { - p.setPen( QPen( Qt::gray, 1, Qt::SolidLine ) ); + p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) ); // x axis p.drawSegment( Coordinate( hmin, 0 ), Coordinate( hmax, 0 ) ); // y axis @@ -465,7 +465,7 @@ void PolarCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) const // through the 0 etc. ) if( fabs( i ) < 1e-8 ) continue; - QString is = KGlobal::locale()->formatNumber( fabs( i ), nfrac ); + TQString is = KGlobal::locale()->formatNumber( fabs( i ), nfrac ); p.drawText( Rect( Coordinate( i, 0 ), hd, -2*vd ).normalized(), is, AlignLeft | AlignTop ); @@ -475,15 +475,15 @@ void PolarCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) const { if( fabs( i ) < 1e-8 ) continue; - QString is = KGlobal::locale()->formatNumber( fabs( i ), nfrac ); + TQString is = KGlobal::locale()->formatNumber( fabs( i ), nfrac ); p.drawText ( Rect( Coordinate( 0, i ), hd, vd ).normalized(), is, AlignBottom | AlignLeft ); }; // arrows on the ends of the axes... - p.setPen( QPen( Qt::gray, 1, Qt::SolidLine ) ); - p.setBrush( QBrush( Qt::gray ) ); + p.setPen( TQPen( Qt::gray, 1, Qt::SolidLine ) ); + p.setBrush( TQBrush( Qt::gray ) ); std::vector a; // the arrow on the right end of the X axis... @@ -506,19 +506,19 @@ void PolarCoords::drawGrid( KigPainter& p, bool showgrid, bool showaxes ) const }; // if( showaxes ) } -QValidator* EuclideanCoords::coordinateValidator() const +TQValidator* EuclideanCoords::coordinateValidator() const { return new CoordinateValidator( false ); } -QValidator* PolarCoords::coordinateValidator() const +TQValidator* PolarCoords::coordinateValidator() const { return new CoordinateValidator( true ); } -QStringList CoordinateSystemFactory::names() +TQStringList CoordinateSystemFactory::names() { - QStringList ret; + TQStringList ret; ret << i18n( "&Euclidean" ) << i18n( "&Polar" ); return ret; @@ -565,7 +565,7 @@ int PolarCoords::id() const return CoordinateSystemFactory::Polar; } -QString CoordinateSystemFactory::setCoordinateSystemStatement( int id ) +TQString CoordinateSystemFactory::setCoordinateSystemStatement( int id ) { switch( id ) { @@ -575,7 +575,7 @@ QString CoordinateSystemFactory::setCoordinateSystemStatement( int id ) return i18n( "Set Polar Coordinate System" ); default: assert( false ); - return QString::null; + return TQString::null; } } diff --git a/kig/misc/coordinate_system.h b/kig/misc/coordinate_system.h index af426909..000b52d1 100644 --- a/kig/misc/coordinate_system.h +++ b/kig/misc/coordinate_system.h @@ -21,7 +21,7 @@ #ifndef KIG_MISC_COORDINATE_SYSTEM_H #define KIG_MISC_COORDINATE_SYSTEM_H -#include +#include class KigPainter; class KigDocument; @@ -42,8 +42,8 @@ class CoordinateSystemFactory public: enum { Euclidean = 0, Polar = 1 }; - static QStringList names(); - static QString setCoordinateSystemStatement( int id ); + static TQStringList names(); + static TQString setCoordinateSystemStatement( int id ); static CoordinateSystem* build( int which ); static CoordinateSystem* build( const char* type ); }; @@ -65,23 +65,23 @@ public: CoordinateSystem(); virtual ~CoordinateSystem(); - virtual QString fromScreen ( const Coordinate& pt, const KigDocument& w ) const = 0; + virtual TQString fromScreen ( const Coordinate& pt, const KigDocument& w ) const = 0; /** * This returns a notice to say in which format coordinates should * be entered. This should be something like: * i18n( "Enter coordinates in the following form: \"(x,y)\", where * x is the x coordinate, and y is the y coordinate." ); */ - virtual QString coordinateFormatNotice() const = 0; + virtual TQString coordinateFormatNotice() const = 0; /** * Like \ref coordinateFormatNotice(), but with HTML tags useful to * have a rich text... */ - virtual QString coordinateFormatNoticeMarkup() const = 0; - virtual Coordinate toScreen (const QString& pt, bool& ok) const = 0; + virtual TQString coordinateFormatNoticeMarkup() const = 0; + virtual Coordinate toScreen (const TQString& pt, bool& ok) const = 0; virtual void drawGrid ( KigPainter& p, bool showgrid = true, bool showaxes = true ) const = 0; - virtual QValidator* coordinateValidator() const = 0; + virtual TQValidator* coordinateValidator() const = 0; virtual Coordinate snapToGrid( const Coordinate& c, const KigWidget& w ) const = 0; @@ -95,13 +95,13 @@ class EuclideanCoords public: EuclideanCoords(); ~EuclideanCoords(); - QString fromScreen( const Coordinate& pt, const KigDocument& w ) const; - QString coordinateFormatNotice() const; - QString coordinateFormatNoticeMarkup() const; - Coordinate toScreen (const QString& pt, bool& ok) const; + TQString fromScreen( const Coordinate& pt, const KigDocument& w ) const; + TQString coordinateFormatNotice() const; + TQString coordinateFormatNoticeMarkup() const; + Coordinate toScreen (const TQString& pt, bool& ok) const; void drawGrid ( KigPainter& p, bool showgrid = true, bool showaxes = true ) const; - QValidator* coordinateValidator() const; + TQValidator* coordinateValidator() const; Coordinate snapToGrid( const Coordinate& c, const KigWidget& w ) const; @@ -117,13 +117,13 @@ class PolarCoords public: PolarCoords(); ~PolarCoords(); - QString fromScreen( const Coordinate& pt, const KigDocument& w ) const; - QString coordinateFormatNotice() const; - QString coordinateFormatNoticeMarkup() const; - Coordinate toScreen (const QString& pt, bool& ok) const; + TQString fromScreen( const Coordinate& pt, const KigDocument& w ) const; + TQString coordinateFormatNotice() const; + TQString coordinateFormatNoticeMarkup() const; + Coordinate toScreen (const TQString& pt, bool& ok) const; void drawGrid ( KigPainter& p, bool showgrid = true, bool showaxes = true ) const; - QValidator* coordinateValidator() const; + TQValidator* coordinateValidator() const; Coordinate snapToGrid( const Coordinate& c, const KigWidget& w ) const; diff --git a/kig/misc/goniometry.cc b/kig/misc/goniometry.cc index 13d72fdb..61e13358 100644 --- a/kig/misc/goniometry.cc +++ b/kig/misc/goniometry.cc @@ -22,7 +22,7 @@ #include "goniometry.h" -#include +#include #include #include @@ -115,9 +115,9 @@ double Goniometry::convert( const double angle, const Goniometry::System from, c return angle; } -QStringList Goniometry::systemList() +TQStringList Goniometry::systemList() { - QStringList sl; + TQStringList sl; sl << i18n( "Translators: Degrees", "Deg" ); sl << i18n( "Translators: Radians", "Rad" ); sl << i18n( "Translators: Gradians", "Grad" ); diff --git a/kig/misc/goniometry.h b/kig/misc/goniometry.h index eae84ced..8c5bb51d 100644 --- a/kig/misc/goniometry.h +++ b/kig/misc/goniometry.h @@ -20,7 +20,7 @@ #ifndef KIG_MISC_GONIOMETRY_H #define KIG_MISC_GONIOMETRY_H -#include +#include /** * Manage an angle and convert it from/to other goniometric systems. @@ -58,7 +58,7 @@ public: /** * Get a list of the supported goniometric systems. */ - static QStringList systemList(); + static TQStringList systemList(); static Goniometry::System intToSystem( const int index ); Goniometry& operator= ( const Goniometry& g ); diff --git a/kig/misc/guiaction.cc b/kig/misc/guiaction.cc index d4be4ded..c9435d2b 100644 --- a/kig/misc/guiaction.cc +++ b/kig/misc/guiaction.cc @@ -34,7 +34,7 @@ #include #include -#include +#include int GUIAction::shortcut() const { @@ -51,23 +51,23 @@ ConstructibleAction::~ConstructibleAction() ConstructibleAction::ConstructibleAction( ObjectConstructor* ctor, - const QCString& actionname, + const TQCString& actionname, int shortcut ) : GUIAction(), mctor( ctor ), mactionname( actionname ), mshortcut( shortcut ) { } -QString ConstructibleAction::description() const +TQString ConstructibleAction::description() const { return mctor->description(); } -QCString ConstructibleAction::iconFileName() const +TQCString ConstructibleAction::iconFileName() const { return mctor->iconFileName(); } -QString ConstructibleAction::descriptiveName() const +TQString ConstructibleAction::descriptiveName() const { return mctor->descriptiveName(); } @@ -81,7 +81,7 @@ void ConstructibleAction::act( KigPart& d ) KigGUIAction::KigGUIAction( GUIAction* act, KigPart& doc, - QObject* parent ) + TQObject* parent ) : KAction( act->descriptiveName(), doc.instance()->iconLoader()->loadIcon( act->iconFileName(), KIcon::Toolbar, 0, KIcon::DefaultState, 0L, true ), @@ -92,8 +92,8 @@ KigGUIAction::KigGUIAction( GUIAction* act, mdoc( doc ) { setWhatsThis( act->description() ); - QString tooltip = act->descriptiveName(); - tooltip.replace( QRegExp( "&&" ), "&" ); + TQString tooltip = act->descriptiveName(); + tooltip.replace( TQRegExp( "&&" ), "&" ); setToolTip( tooltip ); } @@ -111,7 +111,7 @@ ConstructPointAction::~ConstructPointAction() { } -QString ConstructPointAction::description() const +TQString ConstructPointAction::description() const { return i18n( "A normal point, i.e. one that is either independent or attached " @@ -119,12 +119,12 @@ QString ConstructPointAction::description() const ); } -QCString ConstructPointAction::iconFileName() const +TQCString ConstructPointAction::iconFileName() const { return "point"; } -QString ConstructPointAction::descriptiveName() const +TQString ConstructPointAction::descriptiveName() const { return i18n("Point"); } @@ -165,17 +165,17 @@ void ConstructibleAction::plug( KigPart* doc, KigGUIAction* kact ) mctor->plug( doc, kact ); } -QString ConstructTextLabelAction::description() const +TQString ConstructTextLabelAction::description() const { return i18n( "Construct a text label." ); } -QCString ConstructTextLabelAction::iconFileName() const +TQCString ConstructTextLabelAction::iconFileName() const { return "kig_text"; } -QString ConstructTextLabelAction::descriptiveName() const +TQString ConstructTextLabelAction::descriptiveName() const { return i18n( "Text Label" ); } @@ -196,17 +196,17 @@ ConstructTextLabelAction::ConstructTextLabelAction( const char* actionname ) { } -QString AddFixedPointAction::description() const +TQString AddFixedPointAction::description() const { return i18n( "Construct a Point by its Coordinates" ); } -QCString AddFixedPointAction::iconFileName() const +TQCString AddFixedPointAction::iconFileName() const { return "pointxy"; } -QString AddFixedPointAction::descriptiveName() const +TQString AddFixedPointAction::descriptiveName() const { return i18n( "Point by Coordinates" ); } @@ -223,7 +223,7 @@ void AddFixedPointAction::act( KigPart& doc ) KigInputDialog::getCoordinate( i18n( "Fixed Point" ), i18n( "Enter the coordinates for the new point." ) + - QString::fromLatin1( "
" ) + + TQString::fromLatin1( "
" ) + doc.document().coordinateSystem().coordinateFormatNoticeMarkup(), doc.widget(), &ok, doc.document(), &c ); if ( ! ok ) return; @@ -270,19 +270,19 @@ TestAction::~TestAction() { } -QString TestAction::description() const +TQString TestAction::description() const { - return QString::fromLatin1( "Test stuff !!!" ); + return TQString::fromLatin1( "Test stuff !!!" ); } -QCString TestAction::iconFileName() const +TQCString TestAction::iconFileName() const { return "new"; } -QString TestAction::descriptiveName() const +TQString TestAction::descriptiveName() const { - return QString::fromLatin1( "Test stuff !!!" ); + return TQString::fromLatin1( "Test stuff !!!" ); } const char* TestAction::actionName() const @@ -297,7 +297,7 @@ void TestAction::act( KigPart& doc ) Object* constantpoint = ObjectFactory::instance()->fixedPoint( Coordinate( -1, -1 ) ); constantpoint->calc( doc ); - Object* codeobject = new DataObject( new StringImp( QString::fromLatin1( script ) ) ); + Object* codeobject = new DataObject( new StringImp( TQString::fromLatin1( script ) ) ); Object* compiledcode = new RealObject( PythonCompileType::instance(), Objects( codeobject ) ); compiledcode->calc( doc ); @@ -322,7 +322,7 @@ NewScriptAction::NewScriptAction( const char* descname, const char* description, : GUIAction(), mactionname( actionname ), mdescname( descname ), mdescription( description ), micon( icon ), mtype( type ) { - if ( QString( micon ).isEmpty() ) + if ( TQString( micon ).isEmpty() ) { micon = ScriptType::icon( type ); } @@ -332,17 +332,17 @@ NewScriptAction::~NewScriptAction() { } -QString NewScriptAction::description() const +TQString NewScriptAction::description() const { return i18n( mdescription ); } -QCString NewScriptAction::iconFileName() const +TQCString NewScriptAction::iconFileName() const { return micon; } -QString NewScriptAction::descriptiveName() const +TQString NewScriptAction::descriptiveName() const { return i18n( mdescname ); } diff --git a/kig/misc/guiaction.h b/kig/misc/guiaction.h index c188a492..e2e3de54 100644 --- a/kig/misc/guiaction.h +++ b/kig/misc/guiaction.h @@ -24,8 +24,8 @@ #include "../scripting/script-common.h" #endif -#include -#include +#include +#include #include class GUIAction; @@ -40,7 +40,7 @@ class KigGUIAction public: KigGUIAction( GUIAction* act, KigPart& doc, - QObject* parent ); + TQObject* parent ); void slotActivated(); GUIAction* guiAction(); @@ -53,9 +53,9 @@ class GUIAction public: virtual ~GUIAction(); - virtual QString description() const = 0; - virtual QCString iconFileName() const = 0; - virtual QString descriptiveName() const = 0; + virtual TQString description() const = 0; + virtual TQCString iconFileName() const = 0; + virtual TQString descriptiveName() const = 0; virtual const char* actionName() const = 0; virtual int shortcut() const = 0; virtual void act( KigPart& ) = 0; @@ -69,15 +69,15 @@ class ConstructibleAction : public GUIAction { ObjectConstructor* mctor; - QCString mactionname; + TQCString mactionname; int mshortcut; public: - ConstructibleAction( ObjectConstructor* ctor, const QCString& actionname, + ConstructibleAction( ObjectConstructor* ctor, const TQCString& actionname, int shortcut = 0 ); ~ConstructibleAction(); - QString description() const; - QCString iconFileName() const; - QString descriptiveName() const; + TQString description() const; + TQCString iconFileName() const; + TQString descriptiveName() const; const char* actionName() const; int shortcut() const; void act( KigPart& ); @@ -92,9 +92,9 @@ public: ConstructPointAction( const char* actionname ); ~ConstructPointAction(); - QString description() const; - QCString iconFileName() const; - QString descriptiveName() const; + TQString description() const; + TQCString iconFileName() const; + TQString descriptiveName() const; const char* actionName() const; int shortcut() const; void act( KigPart& ); @@ -107,9 +107,9 @@ class ConstructTextLabelAction public: ConstructTextLabelAction( const char* actionname ); - QString description() const; - QCString iconFileName() const; - QString descriptiveName() const; + TQString description() const; + TQCString iconFileName() const; + TQString descriptiveName() const; const char* actionName() const; int shortcut() const; void act( KigPart& ); @@ -122,9 +122,9 @@ class AddFixedPointAction public: AddFixedPointAction( const char* actionname ); ~AddFixedPointAction(); - QString description() const; - QCString iconFileName() const; - QString descriptiveName() const; + TQString description() const; + TQCString iconFileName() const; + TQString descriptiveName() const; const char* actionName() const; int shortcut() const; void act( KigPart& ); @@ -138,9 +138,9 @@ class TestAction public: TestAction( const char* actionname ); ~TestAction(); - QString description() const; - QCString iconFileName() const; - QString descriptiveName() const; + TQString description() const; + TQCString iconFileName() const; + TQString descriptiveName() const; const char* actionName() const; void act( KigPart& ); }; @@ -161,9 +161,9 @@ public: const char* actionname, const ScriptType::Type type, const char* icon = "" ); ~NewScriptAction(); - QString description() const; - QCString iconFileName() const; - QString descriptiveName() const; + TQString description() const; + TQCString iconFileName() const; + TQString descriptiveName() const; const char* actionName() const; void act( KigPart& ); int shortcut() const; diff --git a/kig/misc/kigfiledialog.cc b/kig/misc/kigfiledialog.cc index 6b8d8cb4..2d7ea08f 100644 --- a/kig/misc/kigfiledialog.cc +++ b/kig/misc/kigfiledialog.cc @@ -18,14 +18,14 @@ #include "kigfiledialog.h" #include "kigfiledialog.moc" -#include -#include +#include +#include #include #include -KigFileDialog::KigFileDialog( const QString& startDir, const QString& filter, - const QString& caption, QWidget* parent ) +KigFileDialog::KigFileDialog( const TQString& startDir, const TQString& filter, + const TQString& caption, TQWidget* parent ) : KFileDialog( startDir, filter, parent, "kigfiledialog", true ), mow( 0L ) { @@ -35,7 +35,7 @@ KigFileDialog::KigFileDialog( const QString& startDir, const QString& filter, moptcaption = i18n( "Options" ); } -void KigFileDialog::setOptionsWidget( QWidget* w ) +void KigFileDialog::setOptionsWidget( TQWidget* w ) { mow = w; } @@ -46,10 +46,10 @@ void KigFileDialog::accept() // the selected file name _before_ the dialog is accept()'ed or // reject()'ed... in every case, below we make sure to accept() or // reject()... - setResult( QDialog::Accepted ); + setResult( TQDialog::Accepted ); - QString sFile = selectedFile(); - if ( QFile::exists( sFile ) ) + TQString sFile = selectedFile(); + if ( TQFile::exists( sFile ) ) { int ret = KMessageBox::warningContinueCancel( this, i18n( "The file \"%1\" already exists. Do you wish to overwrite it?" ) @@ -64,15 +64,15 @@ void KigFileDialog::accept() { KDialogBase* optdlg = new KDialogBase( this, "optdlg", true, moptcaption, Cancel|Ok, Cancel, true ); - mow->reparent( optdlg, QPoint() ); + mow->reparent( optdlg, TQPoint() ); optdlg->setMainWidget( mow ); - optdlg->exec() == QDialog::Accepted ? KFileDialog::accept() : KFileDialog::reject(); + optdlg->exec() == TQDialog::Accepted ? KFileDialog::accept() : KFileDialog::reject(); } else KFileDialog::accept(); } -void KigFileDialog::setOptionCaption( const QString& caption ) +void KigFileDialog::setOptionCaption( const TQString& caption ) { if ( caption.isEmpty() ) return; diff --git a/kig/misc/kigfiledialog.h b/kig/misc/kigfiledialog.h index 0337236d..8c243131 100644 --- a/kig/misc/kigfiledialog.h +++ b/kig/misc/kigfiledialog.h @@ -33,9 +33,9 @@ private: /** * Options widget */ - QWidget* mow; + TQWidget* mow; - QString moptcaption; + TQString moptcaption; public: /** @@ -47,8 +47,8 @@ public: * \param caption the caption of this file dialog * \param parent the parent for this file dialog */ - KigFileDialog( const QString& startDir, const QString& filter, - const QString& caption, QWidget *parent ); + KigFileDialog( const TQString& startDir, const TQString& filter, + const TQString& caption, TQWidget *parent ); /** * Use this to set the widget containing the options of eg an export filter. @@ -60,14 +60,14 @@ public: * * \param w the option widget */ - void setOptionsWidget( QWidget* w ); + void setOptionsWidget( TQWidget* w ); /** * Set the caption of the option dialog * * \param caption the caption of the option dialog */ - void setOptionCaption( const QString& caption ); + void setOptionCaption( const TQString& caption ); protected slots: virtual void accept(); diff --git a/kig/misc/kiginputdialog.cc b/kig/misc/kiginputdialog.cc index 8a2c38e5..ea0aeb66 100644 --- a/kig/misc/kiginputdialog.cc +++ b/kig/misc/kiginputdialog.cc @@ -27,11 +27,11 @@ #include "../kig/kig_document.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -44,7 +44,7 @@ class KigInputDialogPrivate public: KigInputDialogPrivate(); - QLabel* m_label; + TQLabel* m_label; KLineEdit* m_lineEditFirst; KLineEdit* m_lineEditSecond; KComboBox* m_comboBox; @@ -53,7 +53,7 @@ public: Coordinate m_coord1; Coordinate m_coord2; KigDocument m_doc; - QValidator* m_vtor; + TQValidator* m_vtor; Goniometry m_gonio; bool m_gonioIsNum; }; @@ -64,8 +64,8 @@ KigInputDialogPrivate::KigInputDialogPrivate() { } -KigInputDialog::KigInputDialog( const QString& caption, const QString& label, - QWidget* parent, const KigDocument& doc, Coordinate* c1, Coordinate* c2 ) +KigInputDialog::KigInputDialog( const TQString& caption, const TQString& label, + TQWidget* parent, const KigDocument& doc, Coordinate* c1, Coordinate* c2 ) : KDialogBase( parent, "kigdialog", true, caption, Ok|Cancel, Cancel, true ), d( new KigInputDialogPrivate() ) { @@ -77,8 +77,8 @@ KigInputDialog::KigInputDialog( const QString& caption, const QString& label, int deltay = 0; bool ok = false; - QFrame* frame = makeMainWidget(); - QVBoxLayout* mainlay = new QVBoxLayout( frame, 0, spacingHint() ); + TQFrame* frame = makeMainWidget(); + TQVBoxLayout* mainlay = new TQVBoxLayout( frame, 0, spacingHint() ); mainlay->activate(); d->m_textEdit = new KTextEdit( frame ); @@ -86,7 +86,7 @@ KigInputDialog::KigInputDialog( const QString& caption, const QString& label, d->m_textEdit->setReadOnly( true ); d->m_textEdit->setFocusPolicy( NoFocus ); // d->m_textEdit->setAlignment( d->m_textEdit->alignment() | Qt::WordBreak ); - d->m_textEdit->setFrameStyle( QFrame::NoFrame ); + d->m_textEdit->setFrameStyle( TQFrame::NoFrame ); mainlay->addWidget( d->m_textEdit ); d->m_lineEditFirst = new KLineEdit( frame ); @@ -98,8 +98,8 @@ KigInputDialog::KigInputDialog( const QString& caption, const QString& label, } mainlay->addWidget( d->m_lineEditFirst ); - connect( d->m_lineEditFirst, SIGNAL(textChanged(const QString&)), - this, SLOT(slotCoordsChanged(const QString&)) ); + connect( d->m_lineEditFirst, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotCoordsChanged(const TQString&)) ); if ( d->m_coord2.valid() ) { @@ -108,8 +108,8 @@ KigInputDialog::KigInputDialog( const QString& caption, const QString& label, d->m_lineEditSecond->setText( d->m_doc.coordinateSystem().fromScreen( d->m_coord2, d->m_doc ) ); mainlay->addWidget( d->m_lineEditSecond ); - connect( d->m_lineEditSecond, SIGNAL(textChanged(const QString&)), - this, SLOT(slotCoordsChanged(const QString&)) ); + connect( d->m_lineEditSecond, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotCoordsChanged(const TQString&)) ); deltay += d->m_lineEditSecond->height() + spacingHint(); } @@ -121,27 +121,27 @@ KigInputDialog::KigInputDialog( const QString& caption, const QString& label, enableButtonOK( ok ); } -KigInputDialog::KigInputDialog( QWidget* parent, const Goniometry& g ) +KigInputDialog::KigInputDialog( TQWidget* parent, const Goniometry& g ) : KDialogBase( parent, "kigdialog", true, i18n( "Set Angle Size" ), Ok|Cancel, Cancel, true ), d( new KigInputDialogPrivate() ) { d->m_gonio = g; d->m_gonioIsNum = true; - QFrame* frame = makeMainWidget(); - QVBoxLayout* mainlay = new QVBoxLayout( frame, 0, spacingHint() ); + TQFrame* frame = makeMainWidget(); + TQVBoxLayout* mainlay = new TQVBoxLayout( frame, 0, spacingHint() ); mainlay->activate(); - d->m_label = new QLabel( frame ); + d->m_label = new TQLabel( frame ); d->m_label->setText( i18n( "Insert the new size of this angle:" ) ); mainlay->addWidget( d->m_label ); - QHBoxLayout* horlay = new QHBoxLayout( 0, 0, spacingHint() ); + TQHBoxLayout* horlay = new TQHBoxLayout( 0, 0, spacingHint() ); horlay->activate(); d->m_lineEditFirst = new KLineEdit( frame ); - d->m_lineEditFirst->setText( QString::number( d->m_gonio.value() ) ); - QWhatsThis::add( + d->m_lineEditFirst->setText( TQString::number( d->m_gonio.value() ) ); + TQWhatsThis::add( d->m_lineEditFirst, i18n( "Use this edit field to modify the size of this angle." ) ); horlay->addWidget( d->m_lineEditFirst ); @@ -149,7 +149,7 @@ KigInputDialog::KigInputDialog( QWidget* parent, const Goniometry& g ) d->m_comboBox = new KComboBox( frame ); d->m_comboBox->insertStringList( Goniometry::systemList() ); d->m_comboBox->setCurrentItem( d->m_gonio.system() ); - QWhatsThis::add( + TQWhatsThis::add( d->m_comboBox, i18n( "Choose from this list the goniometric unit you want to use to " "modify the size of this angle.
\n" @@ -159,17 +159,17 @@ KigInputDialog::KigInputDialog( QWidget* parent, const Goniometry& g ) mainlay->addLayout( horlay ); - connect( d->m_lineEditFirst, SIGNAL(textChanged(const QString&)), - this, SLOT(slotGonioTextChanged(const QString&)) ); - connect( d->m_comboBox, SIGNAL(activated(int)), - this, SLOT(slotGonioSystemChanged(int)) ); + connect( d->m_lineEditFirst, TQT_SIGNAL(textChanged(const TQString&)), + this, TQT_SLOT(slotGonioTextChanged(const TQString&)) ); + connect( d->m_comboBox, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotGonioSystemChanged(int)) ); resize( 350, 100 ); d->m_lineEditFirst->setFocus(); } -void KigInputDialog::keyPressEvent( QKeyEvent* e ) +void KigInputDialog::keyPressEvent( TQKeyEvent* e ) { if ( ( e->key() == Qt::Key_Return ) && ( e->state() == 0 ) ) { @@ -189,18 +189,18 @@ void KigInputDialog::keyPressEvent( QKeyEvent* e ) } -void KigInputDialog::slotCoordsChanged( const QString& ) +void KigInputDialog::slotCoordsChanged( const TQString& ) { int p = 0; - QString t = d->m_lineEditFirst->text(); - bool ok = d->m_vtor->validate( t, p ) == QValidator::Acceptable; + TQString t = d->m_lineEditFirst->text(); + bool ok = d->m_vtor->validate( t, p ) == TQValidator::Acceptable; if ( ok ) d->m_coord1 = d->m_doc.coordinateSystem().toScreen( t, ok ); if ( d->m_lineEditSecond ) { p = 0; t = d->m_lineEditSecond->text(); - ok &= d->m_vtor->validate( t, p ) == QValidator::Acceptable; + ok &= d->m_vtor->validate( t, p ) == TQValidator::Acceptable; if ( ok ) d->m_coord2 = d->m_doc.coordinateSystem().toScreen( t, ok ); } @@ -214,11 +214,11 @@ void KigInputDialog::slotGonioSystemChanged( int index ) { Goniometry::System newsys = Goniometry::intToSystem( index ); d->m_gonio.convertTo( newsys ); - d->m_lineEditFirst->setText( QString::number( d->m_gonio.value() ) ); + d->m_lineEditFirst->setText( TQString::number( d->m_gonio.value() ) ); } } -void KigInputDialog::slotGonioTextChanged( const QString& txt ) +void KigInputDialog::slotGonioTextChanged( const TQString& txt ) { if ( txt.isNull() ) d->m_gonioIsNum = false; @@ -246,14 +246,14 @@ Goniometry KigInputDialog::goniometry() const return d->m_gonio; } -void KigInputDialog::getCoordinate( const QString& caption, const QString& label, - QWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue ) +void KigInputDialog::getCoordinate( const TQString& caption, const TQString& label, + TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue ) { getTwoCoordinates( caption, label, parent, ok, doc, cvalue, 0 ); } -void KigInputDialog::getTwoCoordinates( const QString& caption, const QString& label, - QWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue, +void KigInputDialog::getTwoCoordinates( const TQString& caption, const TQString& label, + TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue, Coordinate* cvalue2 ) { KigInputDialog dlg( caption, label, parent, doc, cvalue, cvalue2 ); @@ -273,7 +273,7 @@ void KigInputDialog::getTwoCoordinates( const QString& caption, const QString& l } -Goniometry KigInputDialog::getAngle( QWidget* parent, bool* ok, const Goniometry& g ) +Goniometry KigInputDialog::getAngle( TQWidget* parent, bool* ok, const Goniometry& g ) { KigInputDialog dlg( parent, g ); diff --git a/kig/misc/kiginputdialog.h b/kig/misc/kiginputdialog.h index afdd303d..28d5ae83 100644 --- a/kig/misc/kiginputdialog.h +++ b/kig/misc/kiginputdialog.h @@ -45,11 +45,11 @@ Q_OBJECT public: private: - KigInputDialog( const QString& caption, const QString& label, QWidget* parent, + KigInputDialog( const TQString& caption, const TQString& label, TQWidget* parent, const KigDocument& doc, Coordinate* c1, Coordinate* c2 ); - KigInputDialog( QWidget* parent, const Goniometry& g ); + KigInputDialog( TQWidget* parent, const Goniometry& g ); - virtual void keyPressEvent( QKeyEvent* e ); + virtual void keyPressEvent( TQKeyEvent* e ); KigInputDialogPrivate* const d; friend class KInputDialogPrivate; @@ -59,9 +59,9 @@ private: Goniometry goniometry() const; private slots: - void slotCoordsChanged( const QString& ); + void slotCoordsChanged( const TQString& ); void slotGonioSystemChanged( int index ); - void slotGonioTextChanged( const QString& txt ); + void slotGonioTextChanged( const TQString& txt ); public: /** @@ -78,8 +78,8 @@ public: * here. If this points to a valid Coordinate, then it will be * displayed as initial value of the correspondenting text edit */ - static void getCoordinate( const QString& caption, const QString& label, - QWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue ); + static void getCoordinate( const TQString& caption, const TQString& label, + TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue ); /** * Static convenience function to get two Coordinates at once from the user. @@ -101,8 +101,8 @@ public: * Coordinate, then it will be displayed as initial value of * the text edit representing the second Coordinate. */ - static void getTwoCoordinates( const QString& caption, const QString& label, - QWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue, + static void getTwoCoordinates( const TQString& caption, const TQString& label, + TQWidget* parent, bool* ok, const KigDocument& doc, Coordinate* cvalue, Coordinate* cvalue2 ); /** @@ -117,7 +117,7 @@ public: * * \return a Goniometry class containing the new angle */ - static Goniometry getAngle( QWidget* parent, bool* ok, const Goniometry& g ); + static Goniometry getAngle( TQWidget* parent, bool* ok, const Goniometry& g ); }; #endif diff --git a/kig/misc/kigpainter.cpp b/kig/misc/kigpainter.cpp index e2b2f440..98594ecb 100644 --- a/kig/misc/kigpainter.cpp +++ b/kig/misc/kigpainter.cpp @@ -32,14 +32,14 @@ #include "cubic-common.h" #include "coordinate_system.h" -#include +#include #include #include #include #include -KigPainter::KigPainter( const ScreenInfo& si, QPaintDevice* device, +KigPainter::KigPainter( const ScreenInfo& si, TQPaintDevice* device, const KigDocument& doc, bool no ) : mP ( device ), color( Qt::blue ), @@ -63,13 +63,13 @@ KigPainter::~KigPainter() void KigPainter::drawRect( const Rect& r ) { Rect rt = r.normalized(); - QRect qr = toScreen(rt); + TQRect qr = toScreen(rt); qr.normalize(); mP.drawRect(qr); if( mNeedOverlay ) mOverlay.push_back( qr ); } -void KigPainter::drawRect( const QRect& r ) +void KigPainter::drawRect( const TQRect& r ) { mP.drawRect(r); if( mNeedOverlay ) mOverlay.push_back( r ); @@ -80,14 +80,14 @@ void KigPainter::drawCircle( const Coordinate& center, const double radius ) Coordinate bottomLeft = center - Coordinate(radius, radius); Coordinate topRight = center + Coordinate(radius, radius); Rect r( bottomLeft, topRight ); - QRect qr = toScreen( r ); + TQRect qr = toScreen( r ); mP.drawEllipse ( qr ); if( mNeedOverlay ) circleOverlay( center, radius ); } void KigPainter::drawSegment( const Coordinate& from, const Coordinate& to ) { - QPoint tF = toScreen(from), tT = toScreen(to); + TQPoint tF = toScreen(from), tT = toScreen(to); mP.drawLine( tF, tT ); if( mNeedOverlay ) segmentOverlay( from, to ); } @@ -95,7 +95,7 @@ void KigPainter::drawSegment( const Coordinate& from, const Coordinate& to ) void KigPainter::drawFatPoint( const Coordinate& p ) { int twidth = width == -1 ? 5 : width; - mP.setPen( QPen( color, 1, style ) ); + mP.setPen( TQPen( color, 1, style ) ); switch ( pointstyle ) { case 0: @@ -107,7 +107,7 @@ void KigPainter::drawFatPoint( const Coordinate& p ) Coordinate tl = p - rad; Coordinate br = p + rad; Rect r( tl, br ); - QRect qr = toScreen( r ); + TQRect qr = toScreen( r ); mP.drawEllipse( qr ); if( mNeedOverlay ) mOverlay.push_back( qr ); break; @@ -121,7 +121,7 @@ void KigPainter::drawFatPoint( const Coordinate& p ) Coordinate tl = p - rad; Coordinate br = p + rad; Rect r( tl, br ); - QRect qr = toScreen( r ); + TQRect qr = toScreen( r ); mP.drawEllipse( qr ); if( mNeedOverlay ) mOverlay.push_back( qr ); break; @@ -134,9 +134,9 @@ void KigPainter::drawFatPoint( const Coordinate& p ) Coordinate tl = p - rad; Coordinate br = p + rad; Rect r( tl, br ); - QRect qr = toScreen( r ); + TQRect qr = toScreen( r ); mP.drawRect( qr ); - mP.fillRect( qr, QBrush( color, Qt::SolidPattern ) ); + mP.fillRect( qr, TQBrush( color, Qt::SolidPattern ) ); if( mNeedOverlay ) mOverlay.push_back( qr ); break; } @@ -148,7 +148,7 @@ void KigPainter::drawFatPoint( const Coordinate& p ) Coordinate tl = p - rad; Coordinate br = p + rad; Rect r( tl, br ); - QRect qr = toScreen( r ); + TQRect qr = toScreen( r ); mP.drawRect( qr ); if( mNeedOverlay ) mOverlay.push_back( qr ); break; @@ -161,15 +161,15 @@ void KigPainter::drawFatPoint( const Coordinate& p ) Coordinate tl = p - rad; Coordinate br = p + rad; Rect r( tl, br ); - QRect qr = toScreen( r ); - mP.setPen( QPen( color, 2 ) ); + TQRect qr = toScreen( r ); + mP.setPen( TQPen( color, 2 ) ); mP.drawLine( qr.topLeft(), qr.bottomRight() ); mP.drawLine( qr.topRight(), qr.bottomLeft() ); if( mNeedOverlay ) mOverlay.push_back( qr ); break; } } - mP.setPen( QPen( color, twidth, style ) ); + mP.setPen( TQPen( color, twidth, style ) ); } void KigPainter::drawPoint( const Coordinate& p ) @@ -183,9 +183,9 @@ void KigPainter::drawLine( const Coordinate& p1, const Coordinate& p2 ) drawLine( LineData( p1, p2 ) ); } -void KigPainter::drawText( const Rect p, const QString s, int textFlags, int len ) +void KigPainter::drawText( const Rect p, const TQString s, int textFlags, int len ) { - QRect t = toScreen(p); + TQRect t = toScreen(p); int tf = textFlags; t.moveBy( 2, 2 ); t.setWidth( t.width() - 4 ); @@ -194,41 +194,41 @@ void KigPainter::drawText( const Rect p, const QString s, int textFlags, int len if( mNeedOverlay ) textOverlay( t, s, tf, len ); } -void KigPainter::textOverlay( const QRect& r, const QString s, int textFlags, int len ) +void KigPainter::textOverlay( const TQRect& r, const TQString s, int textFlags, int len ) { // kdDebug() << Rect::fromQRect( mP.boundingRect( r, textFlags, s, len ) ) << endl; - QRect newr( mP.boundingRect( r, textFlags, s, len ) ); + TQRect newr( mP.boundingRect( r, textFlags, s, len ) ); newr.setWidth( newr.width() + 4 ); newr.setHeight( newr.height() + 4 ); mOverlay.push_back( newr ); } -const Rect KigPainter::boundingRect( const Rect& r, const QString s, +const Rect KigPainter::boundingRect( const Rect& r, const TQString s, int f, int l ) const { - QRect qr = mP.boundingRect( toScreen( r ), f, s, l ); + TQRect qr = mP.boundingRect( toScreen( r ), f, s, l ); qr.setWidth( qr.width() + 4 ); qr.setHeight( qr.height() + 4 ); return fromScreen( qr ); } -void KigPainter::setColor( const QColor& c ) +void KigPainter::setColor( const TQColor& c ) { color = c; - mP.setPen( QPen( color, width == -1 ? 1 : width, style ) ); + mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) ); } void KigPainter::setStyle( const PenStyle c ) { style = c; - mP.setPen( QPen( color, width == -1 ? 1 : width, style ) ); + mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) ); } void KigPainter::setWidth( const int c ) { width = c; if (c > 0) overlayenlarge = c - 1; - mP.setPen( QPen( color, width == -1 ? 1 : width, style ) ); + mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) ); } void KigPainter::setPointStyle( const int p ) @@ -236,7 +236,7 @@ void KigPainter::setPointStyle( const int p ) pointstyle = p; } -void KigPainter::setPen( const QPen& p ) +void KigPainter::setPen( const TQPen& p ) { color = p.color(); width = p.width(); @@ -244,7 +244,7 @@ void KigPainter::setPen( const QPen& p ) mP.setPen(p); } -void KigPainter::setBrush( const QBrush& b ) +void KigPainter::setBrush( const TQBrush& b ) { brushStyle = b.style(); brushColor = b.color(); @@ -254,13 +254,13 @@ void KigPainter::setBrush( const QBrush& b ) void KigPainter::setBrushStyle( const BrushStyle c ) { brushStyle = c; - mP.setBrush( QBrush( brushColor, brushStyle ) ); + mP.setBrush( TQBrush( brushColor, brushStyle ) ); } -void KigPainter::setBrushColor( const QColor& c ) +void KigPainter::setBrushColor( const TQColor& c ) { brushColor = c; - mP.setBrush( QBrush( brushColor, brushStyle ) ); + mP.setBrush( TQBrush( brushColor, brushStyle ) ); } bool KigPainter::getNightVision( ) const @@ -268,13 +268,13 @@ bool KigPainter::getNightVision( ) const return mdoc.getNightVision(); } -QColor KigPainter::getColor() const +TQColor KigPainter::getColor() const { return color; } /* -static void setContains( QRect& r, const QPoint& p ) +static void setContains( TQRect& r, const TQPoint& p ) { if ( r.left() > p.x() ) r.setLeft( p.x() ); if ( r.right() < p.x() ) r.setRight( p.x() ); @@ -285,18 +285,18 @@ static void setContains( QRect& r, const QPoint& p ) } */ -void KigPainter::drawPolygon( const std::vector& pts, +void KigPainter::drawPolygon( const std::vector& pts, bool winding, int index, int npoints ) { - QPen oldpen = mP.pen(); - QBrush oldbrush = mP.brush(); - setBrush( QBrush( color, Dense4Pattern ) ); + TQPen oldpen = mP.pen(); + TQBrush oldbrush = mP.brush(); + setBrush( TQBrush( color, Dense4Pattern ) ); setPen( Qt::NoPen ); // i know this isn't really fast, but i blame it all on Qt with its // stupid container classes... what's wrong with the STL ? - QPointArray t( pts.size() ); + TQPointArray t( pts.size() ); int c = 0; - for( std::vector::const_iterator i = pts.begin(); i != pts.end(); ++i ) + for( std::vector::const_iterator i = pts.begin(); i != pts.end(); ++i ) { t.putPoints( c++, 1, i->x(), i->y() ); }; @@ -308,18 +308,18 @@ void KigPainter::drawPolygon( const std::vector& pts, void KigPainter::drawArea( const std::vector& pts, bool border ) { - QPen oldpen = mP.pen(); - QBrush oldbrush = mP.brush(); - setBrush( QBrush( color, SolidPattern ) ); + TQPen oldpen = mP.pen(); + TQBrush oldbrush = mP.brush(); + setBrush( TQBrush( color, SolidPattern ) ); if ( border ) - setPen( QPen( color, width == -1 ? 1 : width ) ); + setPen( TQPen( color, width == -1 ? 1 : width ) ); else setPen( Qt::NoPen ); - QPointArray t( pts.size() ); + TQPointArray t( pts.size() ); int c = 0; for( std::vector::const_iterator i = pts.begin(); i != pts.end(); ++i ) { - QPoint p = toScreen( *i ); + TQPoint p = toScreen( *i ); t.putPoints( c++, 1, p.x(), p.y() ); } mP.drawPolygon( t ); @@ -476,7 +476,7 @@ void KigPainter::setWholeWinOverlay() mNeedOverlay = false; } -QPoint KigPainter::toScreen( const Coordinate p ) const +TQPoint KigPainter::toScreen( const Coordinate p ) const { return msi.toScreen( p ); } @@ -497,21 +497,21 @@ void KigPainter::drawObjects( const std::vector& os, bool sel ) drawObjects( os.begin(), os.end(), sel ); } -void KigPainter::drawFilledRect( const QRect& r ) +void KigPainter::drawFilledRect( const TQRect& r ) { - QPen pen( Qt::black, 1, Qt::DotLine ); + TQPen pen( Qt::black, 1, Qt::DotLine ); setPen( pen ); - setBrush( QBrush( Qt::cyan, Dense6Pattern ) ); + setBrush( TQBrush( Qt::cyan, Dense6Pattern ) ); drawRect( r.normalize() ); } -void KigPainter::drawTextStd( const QPoint& p, const QString& s ) +void KigPainter::drawTextStd( const TQPoint& p, const TQString& s ) { if ( s.isNull() ) return; // tf = text formatting flags int tf = AlignLeft | AlignTop | DontClip | WordBreak; // we need the rect where we're going to paint text - setPen(QPen(Qt::blue, 1, SolidLine)); + setPen(TQPen(Qt::blue, 1, SolidLine)); setBrush(Qt::NoBrush); drawText( Rect( msi.fromScreen(p), window().bottomRight() @@ -519,16 +519,16 @@ void KigPainter::drawTextStd( const QPoint& p, const QString& s ) } -QRect KigPainter::toScreen( const Rect r ) const +TQRect KigPainter::toScreen( const Rect r ) const { return msi.toScreen( r ); } -QRect KigPainter::toScreenEnlarge( const Rect r ) const +TQRect KigPainter::toScreenEnlarge( const Rect r ) const { if ( overlayenlarge == 0 ) return msi.toScreen( r ); - QRect qr = msi.toScreen( r ); + TQRect qr = msi.toScreen( r ); qr.moveBy ( -overlayenlarge, -overlayenlarge ); int w = qr.width(); int h = qr.height(); @@ -537,37 +537,37 @@ QRect KigPainter::toScreenEnlarge( const Rect r ) const return qr; } -void KigPainter::drawSimpleText( const Coordinate& c, const QString s ) +void KigPainter::drawSimpleText( const Coordinate& c, const TQString s ) { int tf = AlignLeft | AlignTop | DontClip | WordBreak; drawText( c, s, tf); } -void KigPainter::drawText( const Coordinate p, const QString s, +void KigPainter::drawText( const Coordinate p, const TQString s, int textFlags, int len ) { drawText( Rect( p, mP.window().right(), mP.window().top() ), s, textFlags, len ); } -const Rect KigPainter::simpleBoundingRect( const Coordinate& c, const QString s ) +const Rect KigPainter::simpleBoundingRect( const Coordinate& c, const TQString s ) { int tf = AlignLeft | AlignTop | DontClip | WordBreak; return boundingRect( c, s, tf ); } -const Rect KigPainter::boundingRect( const Coordinate& c, const QString s, +const Rect KigPainter::boundingRect( const Coordinate& c, const TQString s, int f, int l ) const { return boundingRect( Rect( c, mP.window().right(), mP.window().top() ), s, f, l ); } -Coordinate KigPainter::fromScreen( const QPoint& p ) const +Coordinate KigPainter::fromScreen( const TQPoint& p ) const { return msi.fromScreen( p ); } -Rect KigPainter::fromScreen( const QRect& r ) const +Rect KigPainter::fromScreen( const TQRect& r ) const { return msi.fromScreen( r ); } @@ -616,29 +616,29 @@ void KigPainter::drawAngle( const Coordinate& cpoint, const double dstartangle, const int startangle = static_cast( Goniometry::convert( 16 * dstartangle, Goniometry::Rad, Goniometry::Deg ) ); const int angle = static_cast( Goniometry::convert( 16 * dangle, Goniometry::Rad, Goniometry::Deg ) ); - QPoint point = toScreen( cpoint ); + TQPoint point = toScreen( cpoint ); // int radius = mP.window().width() / 5; int radius = 50; - QRect surroundingRect( 0, 0, radius*2, radius*2 ); + TQRect surroundingRect( 0, 0, radius*2, radius*2 ); surroundingRect.moveCenter( point ); mP.drawArc( surroundingRect, startangle, angle ); // now for the arrow... - QPoint end( static_cast( point.x() + radius * cos( dstartangle + dangle ) ), + TQPoint end( static_cast( point.x() + radius * cos( dstartangle + dangle ) ), static_cast( point.y() - radius * sin( dstartangle + dangle ) ) ); - QPoint vect = (end - point); + TQPoint vect = (end - point); double vectlen = sqrt( float( vect.x() * vect.x() + vect.y() * vect.y() ) ); - QPoint orthvect( -vect.y(), vect.x() ); + TQPoint orthvect( -vect.y(), vect.x() ); vect = vect * 6 / vectlen; orthvect = orthvect * 6 / vectlen; - QPointArray arrow( 3 ); + TQPointArray arrow( 3 ); arrow.setPoint( 0, end ); arrow.setPoint( 1, end + orthvect + vect ); arrow.setPoint( 2, end + orthvect - vect ); -// std::vector arrow; +// std::vector arrow; // arrow.push_back( end ); // arrow.push_back( end + orthvect + vect ); // arrow.push_back( end + orthvect - vect ); @@ -656,7 +656,7 @@ void KigPainter::drawPolygon( const std::vector& pts, bool winding, int index, int npoints ) { using namespace std; - vector points; + vector points; for ( uint i = 0; i < pts.size(); ++i ) points.push_back( toScreen( pts[i] ) ); drawPolygon( points, winding, index, npoints ); @@ -679,11 +679,11 @@ void KigPainter::drawVector( const Coordinate& a, const Coordinate& b ) Coordinate c = b - dir + perp; Coordinate d = b - dir - perp; // draw the arrow lines with a normal style - mP.setPen( QPen( color, width == -1 ? 1 : width, Qt::SolidLine ) ); + mP.setPen( TQPen( color, width == -1 ? 1 : width, Qt::SolidLine ) ); drawSegment( b, c ); drawSegment( b, d ); // setting again the original style - mP.setPen( QPen( color, width == -1 ? 1 : width, style ) ); + mP.setPen( TQPen( color, width == -1 ? 1 : width, style ) ); } /* *** this function is commented out *** @@ -733,7 +733,7 @@ void KigPainter::drawCurve( const CurveImp* curve ) bool tNeedOverlay = mNeedOverlay; mNeedOverlay = false; - QPen pen = mP.pen(); + TQPen pen = mP.pen(); // this stack contains pairs of Coordinates ( parameter intervals ) // that we still need to process: @@ -790,11 +790,11 @@ void KigPainter::drawCurve( const CurveImp* curve ) // what this algorithm does is approximating the curve with a set of // segments. we don't draw the individual segments, but use - // QPainter::drawPolyline() so that the line styles work properly. + // TQPainter::drawPolyline() so that the line styles work properly. // Possibly there are performance advantages as well ? this array // is a buffer of the polyline approximation of the part of the // curve that we are currently processing. - QPointArray curpolyline( 1000 ); + TQPointArray curpolyline( 1000 ); int curpolylinenextfree = 0; // we don't use recursion, but a stack based approach for efficiency @@ -853,9 +853,9 @@ void KigPainter::drawCurve( const CurveImp* curve ) if ( dodraw ) { // draw the two segments - QPoint tp0 = toScreen(p0); - QPoint tp1 = toScreen(p1); - QPoint tp2 = toScreen(p2); + TQPoint tp0 = toScreen(p0); + TQPoint tp1 = toScreen(p1); + TQPoint tp2 = toScreen(p2); if ( curpolylinenextfree > 0 && curpolyline[curpolylinenextfree - 1] != tp1 ) { // flush the current part of the curve @@ -904,20 +904,20 @@ void KigPainter::drawCurve( const CurveImp* curve ) } void KigPainter::drawTextFrame( const Rect& frame, - const QString& s, bool needframe ) + const TQString& s, bool needframe ) { - QPen oldpen = mP.pen(); - QBrush oldbrush = mP.brush(); + TQPen oldpen = mP.pen(); + TQBrush oldbrush = mP.brush(); if ( needframe ) { // inspired upon kgeo, thanks to Marc Bartsch, i've taken some of // his code too.. - setPen( QPen( Qt::black, 1 ) ); - setBrush( QBrush( QColor( 255, 255, 222 ) ) ); + setPen( TQPen( Qt::black, 1 ) ); + setBrush( TQBrush( TQColor( 255, 255, 222 ) ) ); drawRect( frame ); - setPen( QPen( QColor( 197, 194, 197 ), 1, Qt::SolidLine ) ); + setPen( TQPen( TQColor( 197, 194, 197 ), 1, Qt::SolidLine ) ); - QRect qr = toScreen( frame ); + TQRect qr = toScreen( frame ); mP.drawLine( qr.topLeft(), qr.topRight() ); mP.drawLine( qr.topLeft(), qr.bottomLeft() ); @@ -944,7 +944,7 @@ void KigPainter::drawArc( const Coordinate& center, const double radius, { Rect krect( 0, 0, 2*radius, 2*radius ); krect.setCenter( center ); - QRect rect = toScreen( krect ); + TQRect rect = toScreen( krect ); mP.drawArc( rect, startangle, angle ); setWholeWinOverlay(); diff --git a/kig/misc/kigpainter.h b/kig/misc/kigpainter.h index e7f884f4..226b2c46 100644 --- a/kig/misc/kigpainter.h +++ b/kig/misc/kigpainter.h @@ -26,8 +26,8 @@ #include "rect.h" #include "screeninfo.h" -#include -#include +#include +#include #include @@ -43,7 +43,7 @@ class KigDocument; class ObjectHolder; /** - * KigPainter is an extended QPainter. + * KigPainter is an extended TQPainter. * * Currently the only difference is that it translates coordinates * from and to the internal coordinates/ the widget coordinates... @@ -56,14 +56,14 @@ class KigPainter protected: // don't blaim me for this mutable hack. It's TT that hasn't got // its consts correctly... - mutable QPainter mP; + mutable TQPainter mP; - QColor color; + TQColor color; PenStyle style; int pointstyle; int width; BrushStyle brushStyle; - QColor brushColor; + TQColor brushColor; const KigDocument& mdoc; ScreenInfo msi; @@ -78,7 +78,7 @@ public: * needOverlay sets whether we try to remember the places we're * drawing on using the various overlay methods. @see overlay() */ - KigPainter( const ScreenInfo& r, QPaintDevice* device, const KigDocument& doc, + KigPainter( const ScreenInfo& r, TQPaintDevice* device, const KigDocument& doc, bool needOverlay = true ); ~KigPainter(); @@ -87,27 +87,27 @@ public: */ Rect window(); - QPoint toScreen( const Coordinate p ) const; - QRect toScreen( const Rect r ) const; - QRect toScreenEnlarge( const Rect r ) const; - Coordinate fromScreen( const QPoint& p ) const; - Rect fromScreen( const QRect& r ) const; + TQPoint toScreen( const Coordinate p ) const; + TQRect toScreen( const Rect r ) const; + TQRect toScreenEnlarge( const Rect r ) const; + Coordinate fromScreen( const TQPoint& p ) const; + Rect fromScreen( const TQRect& r ) const; // colors and stuff... void setStyle( const PenStyle c ); - void setColor( const QColor& c ); + void setColor( const TQColor& c ); /** * setting this to -1 means to use the default width for the object * being drawn.. a point -> 5, other objects -> 1 */ void setWidth( const int c ); void setPointStyle( const int p ); - void setPen( const QPen& p ); + void setPen( const TQPen& p ); void setBrushStyle( const BrushStyle c ); - void setBrush( const QBrush& b ); - void setBrushColor( const QColor& c ); + void setBrush( const TQBrush& b ); + void setBrushColor( const TQColor& c ); - QColor getColor() const; + TQColor getColor() const; bool getNightVision( ) const; double pixelWidth(); @@ -141,12 +141,12 @@ public: /** * draws text in a standard manner, convenience function... */ - void drawTextStd( const QPoint& p, const QString& s ); + void drawTextStd( const TQPoint& p, const TQString& s ); /** * draws a rect filled up with a pattern of cyan lines... */ - void drawFilledRect( const QRect& ); + void drawFilledRect( const TQRect& ); /** * draw a rect.. @@ -157,7 +157,7 @@ public: * overload, mainly for drawing the selection rectangle by * KigWidget... */ - void drawRect( const QRect& r ); + void drawRect( const TQRect& r ); /** * draw a circle... @@ -184,7 +184,7 @@ public: /** * draw a point... This means a single point, as in - * QPainter::drawPoint(), unlike drawFatPoint()... + * TQPainter::drawPoint(), unlike drawFatPoint()... */ void drawPoint( const Coordinate& p ); @@ -198,7 +198,7 @@ public: /** * draw a polygon defined by the points in pts... */ - void drawPolygon( const std::vector& pts, bool winding = false, int index = 0, int npoints = -1 ); + void drawPolygon( const std::vector& pts, bool winding = false, int index = 0, int npoints = -1 ); void drawPolygon( const std::vector& pts, bool winding = false, int index = 0, int npoints = -1 ); /** @@ -230,27 +230,27 @@ public: /** * draw text... - * \see QPainter::drawText() + * \see TQPainter::drawText() */ - void drawText( const Rect r, const QString s, int textFlags = 0, + void drawText( const Rect r, const TQString s, int textFlags = 0, int len = -1); - void drawText( const Coordinate p, const QString s, + void drawText( const Coordinate p, const TQString s, int textFlags = 0, int len = -1); - void drawSimpleText( const Coordinate& c, const QString s ); - void drawTextFrame( const Rect& frame, const QString& s, bool needframe ); + void drawSimpleText( const Coordinate& c, const TQString s ); + void drawTextFrame( const Rect& frame, const TQString& s, bool needframe ); - const Rect boundingRect( const Rect& r, const QString s, + const Rect boundingRect( const Rect& r, const TQString s, int f = 0, int l = -1 ) const; - const Rect boundingRect( const Coordinate& c, const QString s, + const Rect boundingRect( const Coordinate& c, const TQString s, int f = 0, int l = -1 ) const; - const Rect simpleBoundingRect( const Coordinate& c, const QString s ); + const Rect simpleBoundingRect( const Coordinate& c, const TQString s ); void drawGrid( const CoordinateSystem& c, bool showGrid = true, bool showAxes = true ); - const std::vector& overlay() { return mOverlay; } + const std::vector& overlay() { return mOverlay; } protected: /** @@ -276,16 +276,16 @@ protected: /** * ... - * \see drawText(), QPainter::boundingRect() + * \see drawText(), TQPainter::boundingRect() */ - void textOverlay( const QRect& r, const QString s, int textFlags, int len ); + void textOverlay( const TQRect& r, const TQString s, int textFlags, int len ); /** * the size we want the overlay rects to be... */ double overlayRectSize(); - std::vector mOverlay; + std::vector mOverlay; }; #endif diff --git a/kig/misc/kigtransform.cpp b/kig/misc/kigtransform.cpp index a297ed6e..bc446403 100644 --- a/kig/misc/kigtransform.cpp +++ b/kig/misc/kigtransform.cpp @@ -173,7 +173,7 @@ // return tNotGood; // } -// QString getTransformMessage ( const Objects& os, const Object *o ) +// TQString getTransformMessage ( const Objects& os, const Object *o ) // { // int size = os.size(); // switch (size) diff --git a/kig/misc/kigtransform.h b/kig/misc/kigtransform.h index 252a0f72..52d5942a 100644 --- a/kig/misc/kigtransform.h +++ b/kig/misc/kigtransform.h @@ -183,7 +183,7 @@ bool operator==( const Transformation& lhs, const Transformation& rhs ); // tWantArgsResult WantTransformation ( Objects::const_iterator& i, // const Objects& os ); -// QString getTransformMessage ( const Objects& os, const Object *o ); +// TQString getTransformMessage ( const Objects& os, const Object *o ); // bool isHomoteticTransformation ( double transformation[3][3] ); diff --git a/kig/misc/lists.cc b/kig/misc/lists.cc index e93700a1..d3a4fb4d 100644 --- a/kig/misc/lists.cc +++ b/kig/misc/lists.cc @@ -26,10 +26,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include using namespace std; @@ -238,18 +238,18 @@ Macro::~Macro() { } -bool MacroList::save( Macro* m, const QString& f ) +bool MacroList::save( Macro* m, const TQString& f ) { std::vector ms; ms.push_back( m ); return save( ms, f ); } -bool MacroList::save( const std::vector& ms, const QString& f ) +bool MacroList::save( const std::vector& ms, const TQString& f ) { - QDomDocument doc( "KigMacroFile" ); + TQDomDocument doc( "KigMacroFile" ); - QDomElement docelem = doc.createElement( "KigMacroFile" ); + TQDomElement docelem = doc.createElement( "KigMacroFile" ); docelem.setAttribute( "Version", KIGVERSION ); docelem.setAttribute( "Number", ms.size() ); @@ -257,29 +257,29 @@ bool MacroList::save( const std::vector& ms, const QString& f ) { MacroConstructor* ctor = ms[i]->ctor; - QDomElement macroelem = doc.createElement( "Macro" ); + TQDomElement macroelem = doc.createElement( "Macro" ); // name - QDomElement nameelem = doc.createElement( "Name" ); + TQDomElement nameelem = doc.createElement( "Name" ); nameelem.appendChild( doc.createTextNode( ctor->descriptiveName() ) ); macroelem.appendChild( nameelem ); // desc - QDomElement descelem = doc.createElement( "Description" ); + TQDomElement descelem = doc.createElement( "Description" ); descelem.appendChild( doc.createTextNode( ctor->description() ) ); macroelem.appendChild( descelem ); // icon - QCString icon = ctor->iconFileName( true ); + TQCString icon = ctor->iconFileName( true ); if ( !icon.isNull() ) { - QDomElement descelem = doc.createElement( "IconFileName" ); + TQDomElement descelem = doc.createElement( "IconFileName" ); descelem.appendChild( doc.createTextNode( icon ) ); macroelem.appendChild( descelem ); } // data - QDomElement hierelem = doc.createElement( "Construction" ); + TQDomElement hierelem = doc.createElement( "Construction" ); ctor->hierarchy().serialize( hierelem, doc ); macroelem.appendChild( hierelem ); @@ -288,30 +288,30 @@ bool MacroList::save( const std::vector& ms, const QString& f ) doc.appendChild( docelem ); - QFile file( f ); + TQFile file( f ); if ( ! file.open( IO_WriteOnly ) ) return false; - QTextStream stream( &file ); + TQTextStream stream( &file ); stream << doc.toCString(); return true; } -bool MacroList::load( const QString& f, std::vector& ret, const KigPart& kdoc ) +bool MacroList::load( const TQString& f, std::vector& ret, const KigPart& kdoc ) { - QFile file( f ); + TQFile file( f ); if ( ! file.open( IO_ReadOnly ) ) { KMessageBox::sorry( 0, i18n( "Could not open macro file '%1'" ).arg( f ) ); return false; } - QDomDocument doc( "KigMacroFile" ); + TQDomDocument doc( "KigMacroFile" ); if ( !doc.setContent( &file ) ) { KMessageBox::sorry( 0, i18n( "Could not open macro file '%1'" ).arg( f ) ); return false; } file.close(); - QDomElement main = doc.documentElement(); + TQDomElement main = doc.documentElement(); if ( main.tagName() == "KigMacroFile" ) return loadNew( main, ret, kdoc ); @@ -328,15 +328,15 @@ bool MacroList::load( const QString& f, std::vector& ret, const KigPart& } } -bool MacroList::loadNew( const QDomElement& docelem, std::vector& ret, const KigPart& ) +bool MacroList::loadNew( const TQDomElement& docelem, std::vector& ret, const KigPart& ) { bool sok = true; // unused.. // int number = docelem.attribute( "Number" ).toInt( &sok ); if ( ! sok ) return false; - QString version = docelem.attribute( "Version" ); -// QRegExp re( "(\\d+)\\.(\\d+)\\.(\\d+)" ); + TQString version = docelem.attribute( "Version" ); +// TQRegExp re( "(\\d+)\\.(\\d+)\\.(\\d+)" ); // re.match( version ); // unused.. // int major = re.cap( 1 ).toInt( &sok ); @@ -345,16 +345,16 @@ bool MacroList::loadNew( const QDomElement& docelem, std::vector& ret, c // if ( ! sok ) return false; int unnamedindex = 1; - QString tmp; + TQString tmp; - for ( QDomElement macroelem = docelem.firstChild().toElement(); + for ( TQDomElement macroelem = docelem.firstChild().toElement(); ! macroelem.isNull(); macroelem = macroelem.nextSibling().toElement() ) { - QString name, description; + TQString name, description; ObjectHierarchy* hierarchy = 0; - QCString actionname, iconfile; + TQCString actionname, iconfile; if ( macroelem.tagName() != "Macro" ) continue; // forward compat ? - for ( QDomElement dataelem = macroelem.firstChild().toElement(); + for ( TQDomElement dataelem = macroelem.firstChild().toElement(); ! dataelem.isNull(); dataelem = dataelem.nextSibling().toElement() ) { if ( dataelem.tagName() == "Name" ) diff --git a/kig/misc/lists.h b/kig/misc/lists.h index a3f97f1d..40276bb2 100644 --- a/kig/misc/lists.h +++ b/kig/misc/lists.h @@ -141,11 +141,11 @@ public: /** * Save macro \p m to file \p f .. */ - bool save( Macro* m, const QString& f ); + bool save( Macro* m, const TQString& f ); /** * Save macros \p ms to file \p f .. */ - bool save( const vectype& ms, const QString& f ); + bool save( const vectype& ms, const TQString& f ); /** * load macro's from file \p f .. @@ -156,7 +156,7 @@ public: * semantically incorrect, but i haven't been able to work around * it.. */ - bool load( const QString& f, vectype& ret, const KigPart& ); + bool load( const TQString& f, vectype& ret, const KigPart& ); /** * get access to the list of macro's.. @@ -164,7 +164,7 @@ public: const vectype& macros() const; private: - bool loadNew( const QDomElement& docelem, std::vector& ret, const KigPart& ); + bool loadNew( const TQDomElement& docelem, std::vector& ret, const KigPart& ); }; #endif diff --git a/kig/misc/object_constructor.cc b/kig/misc/object_constructor.cc index 5634d0d2..ce48a636 100644 --- a/kig/misc/object_constructor.cc +++ b/kig/misc/object_constructor.cc @@ -36,24 +36,24 @@ #include "../modes/construct_mode.h" -#include +#include #include #include #include -const QString StandardConstructorBase::descriptiveName() const +const TQString StandardConstructorBase::descriptiveName() const { return i18n( mdescname ); } -const QString StandardConstructorBase::description() const +const TQString StandardConstructorBase::description() const { return i18n( mdesc ); } -const QCString StandardConstructorBase::iconFileName( const bool ) const +const TQCString StandardConstructorBase::iconFileName( const bool ) const { return miconfile; } @@ -103,7 +103,7 @@ void StandardConstructorBase::handlePrelim( std::vector args = margsparser.parse( os ); p.setBrushStyle( Qt::NoBrush ); p.setBrushColor( Qt::red ); - p.setPen( QPen ( Qt::red, 1) ); + p.setPen( TQPen ( Qt::red, 1) ); p.setWidth( -1 ); // -1 means the default width for the object being // drawn.. @@ -236,17 +236,17 @@ void MergeObjectConstructor::merge( ObjectConstructor* e ) mctors.push_back( e ); } -const QString MergeObjectConstructor::descriptiveName() const +const TQString MergeObjectConstructor::descriptiveName() const { return i18n( mdescname ); } -const QString MergeObjectConstructor::description() const +const TQString MergeObjectConstructor::description() const { return i18n( mdesc ); } -const QCString MergeObjectConstructor::iconFileName( const bool ) const +const TQCString MergeObjectConstructor::iconFileName( const bool ) const { return miconfilename; } @@ -297,7 +297,7 @@ void MergeObjectConstructor::handlePrelim( }; } -QString StandardConstructorBase::useText( const ObjectCalcer& o, const std::vector& sel, +TQString StandardConstructorBase::useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument&, const KigWidget& ) const { using namespace std; @@ -305,11 +305,11 @@ QString StandardConstructorBase::useText( const ObjectCalcer& o, const std::vect transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = margsparser.usetext( o.imp(), args ); - if ( ret.empty() ) return QString::null; + if ( ret.empty() ) return TQString::null; return i18n( ret.c_str() ); } -QString StandardConstructorBase::selectStatement( +TQString StandardConstructorBase::selectStatement( const std::vector& sel, const KigDocument&, const KigWidget& ) const { @@ -318,11 +318,11 @@ QString StandardConstructorBase::selectStatement( transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = margsparser.selectStatement( args ); - if ( ret.empty() ) return QString::null; + if ( ret.empty() ) return TQString::null; return i18n( ret.c_str() ); } -QString MergeObjectConstructor::useText( const ObjectCalcer& o, const std::vector& sel, +TQString MergeObjectConstructor::useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const { for ( vectype::const_iterator i = mctors.begin(); i != mctors.end(); ++i ) @@ -331,10 +331,10 @@ QString MergeObjectConstructor::useText( const ObjectCalcer& o, const std::vecto int w = (*i)->wantArgs( args, d, v ); if ( w != ArgsParser::Invalid ) return (*i)->useText( o, sel, d, v ); }; - return QString::null; + return TQString::null; } -QString MergeObjectConstructor::selectStatement( +TQString MergeObjectConstructor::selectStatement( const std::vector& sel, const KigDocument& d, const KigWidget& w ) const { @@ -344,11 +344,11 @@ QString MergeObjectConstructor::selectStatement( int wa = (*i)->wantArgs( args, d, w ); if ( wa != ArgsParser::Invalid ) return (*i)->selectStatement( sel, d, w ); }; - return QString::null; + return TQString::null; } -MacroConstructor::MacroConstructor( const ObjectHierarchy& hier, const QString& name, - const QString& desc, const QCString& iconfile ) +MacroConstructor::MacroConstructor( const ObjectHierarchy& hier, const TQString& name, + const TQString& desc, const TQCString& iconfile ) : ObjectConstructor(), mhier( hier ), mname( name ), mdesc( desc ), mbuiltin( false ), miconfile( iconfile ), mparser( mhier.argParser() ) @@ -357,8 +357,8 @@ MacroConstructor::MacroConstructor( const ObjectHierarchy& hier, const QString& MacroConstructor::MacroConstructor( const std::vector& input, const std::vector& output, - const QString& name, const QString& description, - const QCString& iconfile ) + const TQString& name, const TQString& description, + const TQCString& iconfile ) : ObjectConstructor(), mhier( input, output ), mname( name ), mdesc( description ), mbuiltin( false ), miconfile( iconfile ), @@ -370,19 +370,19 @@ MacroConstructor::~MacroConstructor() { } -const QString MacroConstructor::descriptiveName() const +const TQString MacroConstructor::descriptiveName() const { return mname; } -const QString MacroConstructor::description() const +const TQString MacroConstructor::description() const { return mdesc; } -const QCString MacroConstructor::iconFileName( const bool canBeNull ) const +const TQCString MacroConstructor::iconFileName( const bool canBeNull ) const { - return ( miconfile.isNull() && !canBeNull ) ? QCString( "gear" ) : miconfile; + return ( miconfile.isNull() && !canBeNull ) ? TQCString( "gear" ) : miconfile; } const bool MacroConstructor::isAlreadySelectedOK( const std::vector&, const int& ) const @@ -412,7 +412,7 @@ void MacroConstructor::handleArgs( const std::vector& os, KigPart d.addObjects( hos ); } -QString MacroConstructor::selectStatement( +TQString MacroConstructor::selectStatement( const std::vector& sel, const KigDocument&, const KigWidget& ) const { @@ -421,11 +421,11 @@ QString MacroConstructor::selectStatement( transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = mparser.selectStatement( args ); - if ( ret.empty() ) return QString::null; + if ( ret.empty() ) return TQString::null; else return i18n( ret.c_str() ); } -QString MacroConstructor::useText( const ObjectCalcer& o, const std::vector& sel, +TQString MacroConstructor::useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument&, const KigWidget& ) const { @@ -434,7 +434,7 @@ QString MacroConstructor::useText( const ObjectCalcer& o, const std::vector& sel, + virtual TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const = 0; @@ -89,7 +89,7 @@ public: * return a string describing what argument you want next, if the * given selection of objects were selected. */ - virtual QString selectStatement( + virtual TQString selectStatement( const std::vector& sel, const KigDocument& d, const KigWidget& w ) const = 0; @@ -145,9 +145,9 @@ public: virtual ~StandardConstructorBase(); - const QString descriptiveName() const; - const QString description() const; - const QCString iconFileName( const bool canBeNull = false ) const; + const TQString descriptiveName() const; + const TQString description() const; + const TQCString iconFileName( const bool canBeNull = false ) const; const bool isAlreadySelectedOK( const std::vector& os, const int& ) const; @@ -168,10 +168,10 @@ public: virtual void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, const KigDocument& ) const = 0; - QString useText( const ObjectCalcer& o, const std::vector& sel, + TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; - QString selectStatement( + TQString selectStatement( const std::vector& sel, const KigDocument& d, const KigWidget& w ) const; @@ -297,9 +297,9 @@ public: void merge( ObjectConstructor* e ); - const QString descriptiveName() const; - const QString description() const; - const QCString iconFileName( const bool canBeNull = false ) const; + const TQString descriptiveName() const; + const TQString description() const; + const TQCString iconFileName( const bool canBeNull = false ) const; const bool isAlreadySelectedOK( const std::vector& os, const int& ) const; @@ -308,10 +308,10 @@ public: const KigWidget& v ) const; - QString useText( const ObjectCalcer& o, const std::vector& sel, + TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; - QString selectStatement( + TQString selectStatement( const std::vector& sel, const KigDocument& d, const KigWidget& w ) const; @@ -337,25 +337,25 @@ class MacroConstructor : public ObjectConstructor { ObjectHierarchy mhier; - QString mname; - QString mdesc; + TQString mname; + TQString mdesc; bool mbuiltin; - QCString miconfile; + TQCString miconfile; ArgsParser mparser; public: MacroConstructor( const std::vector& input, const std::vector& output, - const QString& name, const QString& description, - const QCString& iconfile = 0 ); - MacroConstructor( const ObjectHierarchy& hier, const QString& name, - const QString& desc, - const QCString& iconfile = 0 ); + const TQString& name, const TQString& description, + const TQCString& iconfile = 0 ); + MacroConstructor( const ObjectHierarchy& hier, const TQString& name, + const TQString& desc, + const TQCString& iconfile = 0 ); ~MacroConstructor(); const ObjectHierarchy& hierarchy() const; - const QString descriptiveName() const; - const QString description() const; - const QCString iconFileName( const bool canBeNull = false ) const; + const TQString descriptiveName() const; + const TQString description() const; + const TQCString iconFileName( const bool canBeNull = false ) const; const bool isAlreadySelectedOK( const std::vector& os, const int& ) const; @@ -365,11 +365,11 @@ public: void handleArgs( const std::vector& os, KigPart& d, KigWidget& v ) const; - QString useText( const ObjectCalcer& o, const std::vector& sel, + TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; - QString selectStatement( + TQString selectStatement( const std::vector& sel, const KigDocument& d, const KigWidget& w ) const; @@ -388,9 +388,9 @@ public: */ bool isTransform() const; - void setName( const QString& name ); - void setDescription( const QString& desc ); - void setIcon( QCString& icon ); + void setName( const TQString& name ); + void setDescription( const TQString& desc ); + void setIcon( TQCString& icon ); }; #endif diff --git a/kig/misc/object_hierarchy.cc b/kig/misc/object_hierarchy.cc index 9102051a..c2365aaa 100644 --- a/kig/misc/object_hierarchy.cc +++ b/kig/misc/object_hierarchy.cc @@ -27,7 +27,7 @@ #include "../objects/object_type.h" #include -#include +#include class ObjectHierarchy::Node { @@ -187,13 +187,13 @@ class FetchPropertyNode { mutable int mpropid; int mparent; - const QCString mname; + const TQCString mname; public: // propid is a cache of the location of name in the parent's // propertiesInternalNames(), just as it is in PropertyObject. We // don't want to ever save this value, since we cannot guarantee it // remains consistent if we add properties some place.. - FetchPropertyNode( const int parent, const QCString& name, const int propid = -1 ) + FetchPropertyNode( const int parent, const TQCString& name, const int propid = -1 ) : mpropid( propid ), mparent( parent ), mname( name ) {} ~FetchPropertyNode(); Node* copy() const; @@ -201,7 +201,7 @@ public: void checkDependsOnGiven( std::vector& dependsstack, int loc ) const; void checkArgumentsUsed( std::vector& usedstack ) const; int parent() const { return mparent; } - const QCString& propinternalname() const { return mname; } + const TQCString& propinternalname() const { return mname; } int id() const; void apply( std::vector& stack, @@ -408,21 +408,21 @@ ObjectHierarchy::ObjectHierarchy( const std::vector& from, const init( from, to ); } -void ObjectHierarchy::serialize( QDomElement& parent, QDomDocument& doc ) const +void ObjectHierarchy::serialize( TQDomElement& parent, TQDomDocument& doc ) const { int id = 1; for ( uint i = 0; i < mnumberofargs; ++i ) { - QDomElement e = doc.createElement( "input" ); + TQDomElement e = doc.createElement( "input" ); e.setAttribute( "id", id++ ); e.setAttribute( "requirement", margrequirements[i]->internalName() ); // we don't save these atm, since the user can't define them. // we only load them from builtin macro's. -// QDomElement ut = doc.createElement( "UseText" ); -// ut.appendChild( doc.createTextNode( QString::fromLatin1(musetexts[i].c_str() ) ) ); +// TQDomElement ut = doc.createElement( "UseText" ); +// ut.appendChild( doc.createTextNode( TQString::fromLatin1(musetexts[i].c_str() ) ) ); // e.appendChild( ut ); -// QDomElement ss = doc.createElement( "SelectStatement" ); -// ss.appendChild( doc.createTextNode( QString::fromLatin1(mselectstatements[i].c_str() ) ) ); +// TQDomElement ss = doc.createElement( "SelectStatement" ); +// ss.appendChild( doc.createTextNode( TQString::fromLatin1(mselectstatements[i].c_str() ) ) ); // e.appendChild( ss ); parent.appendChild( e ); } @@ -430,19 +430,19 @@ void ObjectHierarchy::serialize( QDomElement& parent, QDomDocument& doc ) const for ( uint i = 0; i < mnodes.size(); ++i ) { bool result = mnodes.size() - ( id - mnumberofargs - 1 ) <= mnumberofresults; - QDomElement e = doc.createElement( result ? "result" : "intermediate" ); + TQDomElement e = doc.createElement( result ? "result" : "intermediate" ); e.setAttribute( "id", id++ ); if ( mnodes[i]->id() == Node::ID_ApplyType ) { const ApplyTypeNode* node = static_cast( mnodes[i] ); e.setAttribute( "action", "calc" ); - e.setAttribute( "type", QString::fromLatin1( node->type()->fullName() ) ); + e.setAttribute( "type", TQString::fromLatin1( node->type()->fullName() ) ); for ( uint i = 0; i < node->parents().size(); ++i ) { int parent = node->parents()[i] + 1; - QDomElement arge = doc.createElement( "arg" ); - arge.appendChild( doc.createTextNode( QString::number( parent ) ) ); + TQDomElement arge = doc.createElement( "arg" ); + arge.appendChild( doc.createTextNode( TQString::number( parent ) ) ); e.appendChild( arge ); }; } @@ -451,8 +451,8 @@ void ObjectHierarchy::serialize( QDomElement& parent, QDomDocument& doc ) const const FetchPropertyNode* node = static_cast( mnodes[i] ); e.setAttribute( "action", "fetch-property" ); e.setAttribute( "property", node->propinternalname() ); - QDomElement arge = doc.createElement( "arg" ); - arge.appendChild( doc.createTextNode( QString::number( node->parent() + 1 ) ) ); + TQDomElement arge = doc.createElement( "arg" ); + arge.appendChild( doc.createTextNode( TQString::number( node->parent() + 1 ) ) ); e.appendChild( arge ); } else @@ -460,7 +460,7 @@ void ObjectHierarchy::serialize( QDomElement& parent, QDomDocument& doc ) const assert( mnodes[i]->id() == ObjectHierarchy::Node::ID_PushStack ); const PushStackNode* node = static_cast( mnodes[i] ); e.setAttribute( "action", "push" ); - QString type = ObjectImpFactory::instance()->serialize( *node->imp(), e, doc ); + TQString type = ObjectImpFactory::instance()->serialize( *node->imp(), e, doc ); e.setAttribute( "type", type ); }; @@ -473,7 +473,7 @@ ObjectHierarchy::ObjectHierarchy() { } -ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const QDomElement& parent, QString& error ) +ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const TQDomElement& parent, TQString& error ) { #define KIG_GENERIC_PARSE_ERROR \ { \ @@ -485,8 +485,8 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const QDomElement& p ObjectHierarchy* obhi = new ObjectHierarchy(); bool ok = true; - QString tmp; - QDomElement e = parent.firstChild().toElement(); + TQString tmp; + TQDomElement e = parent.firstChild().toElement(); for (; !e.isNull(); e = e.nextSibling().toElement() ) { if ( e.tagName() != "input" ) break; @@ -505,7 +505,7 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const QDomElement& p obhi->mselectstatements.resize( obhi->mnumberofargs, "" ); obhi->margrequirements[id - 1] = req; obhi->musetexts[id - 1] = req->selectStatement(); - QDomElement esub = e.firstChild().toElement(); + TQDomElement esub = e.firstChild().toElement(); for ( ; !esub.isNull(); esub = esub.nextSibling().toElement() ) { if ( esub.tagName() == "UseText" ) @@ -536,7 +536,7 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const QDomElement& p if ( tmp == "calc" ) { // ApplyTypeNode - QCString typen = e.attribute( "type" ).latin1(); + TQCString typen = e.attribute( "type" ).latin1(); const ObjectType* type = ObjectTypeFactory::instance()->find( typen ); if ( ! type ) { @@ -549,9 +549,9 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const QDomElement& p } std::vector parents; - for ( QDomNode p = e.firstChild(); !p.isNull(); p = p.nextSibling() ) + for ( TQDomNode p = e.firstChild(); !p.isNull(); p = p.nextSibling() ) { - QDomElement q = p.toElement(); + TQDomElement q = p.toElement(); if ( q.isNull() ) KIG_GENERIC_PARSE_ERROR; // see above if ( q.tagName() != "arg" ) KIG_GENERIC_PARSE_ERROR; int pid = q.text().toInt(&ok ); @@ -563,8 +563,8 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const QDomElement& p else if ( tmp == "fetch-property" ) { // FetchPropertyNode - QCString propname = e.attribute( "property" ).latin1(); - QDomElement arge = e.firstChild().toElement(); + TQCString propname = e.attribute( "property" ).latin1(); + TQDomElement arge = e.firstChild().toElement(); int parent = arge.text().toInt( &ok ); if ( !ok ) KIG_GENERIC_PARSE_ERROR; newnode = new FetchPropertyNode( parent - 1, propname ); @@ -573,7 +573,7 @@ ObjectHierarchy* ObjectHierarchy::buildSafeObjectHierarchy( const QDomElement& p { // PushStackNode if ( e.attribute( "action" ) != "push" ) KIG_GENERIC_PARSE_ERROR; - QString typen = e.attribute( "type" ); + TQString typen = e.attribute( "type" ); if ( typen.isNull() ) KIG_GENERIC_PARSE_ERROR; ObjectImp* imp = ObjectImpFactory::instance()->deserialize( typen, e, error ); if ( ( ! imp ) && !error.isEmpty() ) return 0; diff --git a/kig/misc/object_hierarchy.h b/kig/misc/object_hierarchy.h index 3133dc7c..60df8a59 100644 --- a/kig/misc/object_hierarchy.h +++ b/kig/misc/object_hierarchy.h @@ -75,14 +75,14 @@ public: /** * saves the ObjectHierarchy data in children xml tags of \p parent .. */ - void serialize( QDomElement& parent, QDomDocument& doc ) const; + void serialize( TQDomElement& parent, TQDomDocument& doc ) const; /** * Deserialize the ObjectHierarchy data from the xml element \p parent .. * Since this operation can fail for some reasons, we provide it as a * static to return 0 in case of error. */ - static ObjectHierarchy* buildSafeObjectHierarchy( const QDomElement& parent, QString& error ); -// ObjectHierarchy( const QDomElement& parent ); + static ObjectHierarchy* buildSafeObjectHierarchy( const TQDomElement& parent, TQString& error ); +// ObjectHierarchy( const TQDomElement& parent ); /** * build a set of objects that interdepend according to this diff --git a/kig/misc/rect.cc b/kig/misc/rect.cc index dc28de82..183f50f8 100644 --- a/kig/misc/rect.cc +++ b/kig/misc/rect.cc @@ -153,9 +153,9 @@ void Rect::scale( const double r ) } -QRect Rect::toQRect() const +TQRect Rect::toQRect() const { - return QRect(mBottomLeft.toQPoint(), topRight().toQPoint()); + return TQRect(mBottomLeft.toQPoint(), topRight().toQPoint()); } Coordinate Rect::bottomLeft() const @@ -253,7 +253,7 @@ Rect Rect::normalized() const return t; } -Rect Rect::fromQRect( const QRect& r ) +Rect Rect::fromQRect( const TQRect& r ) { return Rect( r.left(), r.top(), r.right(), r.bottom() ); } diff --git a/kig/misc/rect.h b/kig/misc/rect.h index a222d1ab..1fe0b071 100644 --- a/kig/misc/rect.h +++ b/kig/misc/rect.h @@ -24,12 +24,12 @@ #include "coordinate.h" -#include +#include #include /** - * like Coordinate is a QPoint replacement with doubles, this is a - * QRect replacement with doubles... + * like Coordinate is a TQPoint replacement with doubles, this is a + * TQRect replacement with doubles... */ class Rect { @@ -103,7 +103,7 @@ public: */ Rect matchShape( const Rect& rhs, bool shrink = false ) const; - QRect toQRect() const; + TQRect toQRect() const; Coordinate bottomLeft() const; Coordinate bottomRight() const; Coordinate topLeft() const; @@ -121,7 +121,7 @@ public: Rect normalized() const; friend kdbgstream& operator<<( kdbgstream& s, const Rect& t ); - static Rect fromQRect( const QRect& ); + static Rect fromQRect( const TQRect& ); protected: Coordinate mBottomLeft; double mwidth; diff --git a/kig/misc/screeninfo.cc b/kig/misc/screeninfo.cc index c1418876..91a6cb74 100644 --- a/kig/misc/screeninfo.cc +++ b/kig/misc/screeninfo.cc @@ -19,12 +19,12 @@ #include -ScreenInfo::ScreenInfo( const Rect& docRect, const QRect& viewRect ) +ScreenInfo::ScreenInfo( const Rect& docRect, const TQRect& viewRect ) : mkrect( docRect.normalized() ), mqrect( viewRect.normalize() ) { } -Rect ScreenInfo::fromScreen( const QRect& r ) const +Rect ScreenInfo::fromScreen( const TQRect& r ) const { return Rect( fromScreen( r.topLeft() ), @@ -32,7 +32,7 @@ Rect ScreenInfo::fromScreen( const QRect& r ) const ).normalized(); } -Coordinate ScreenInfo::fromScreen( const QPoint& p ) const +Coordinate ScreenInfo::fromScreen( const TQPoint& p ) const { // invert the y-axis: 0 is at the bottom ! Coordinate t( p.x(), mqrect.height() - p.y() ); @@ -41,18 +41,18 @@ Coordinate ScreenInfo::fromScreen( const QPoint& p ) const return t + mkrect.bottomLeft(); } -QPoint ScreenInfo::toScreen( const Coordinate& p ) const +TQPoint ScreenInfo::toScreen( const Coordinate& p ) const { Coordinate t = p - mkrect.bottomLeft(); t *= mqrect.width(); t /= mkrect.width(); // invert the y-axis: 0 is at the bottom ! - return QPoint( (int) t.x, mqrect.height() - (int) t.y ); + return TQPoint( (int) t.x, mqrect.height() - (int) t.y ); } -QRect ScreenInfo::toScreen( const Rect& r ) const +TQRect ScreenInfo::toScreen( const Rect& r ) const { - return QRect( + return TQRect( toScreen( r.bottomLeft() ), toScreen( r.topRight() ) ).normalize(); @@ -60,8 +60,8 @@ QRect ScreenInfo::toScreen( const Rect& r ) const double ScreenInfo::pixelWidth() const { - Coordinate a = fromScreen( QPoint( 0, 0 ) ); - Coordinate b = fromScreen( QPoint( 0, 1000 ) ); + Coordinate a = fromScreen( TQPoint( 0, 0 ) ); + Coordinate b = fromScreen( TQPoint( 0, 1000 ) ); return std::fabs( b.y - a.y ) / 1000; } @@ -75,12 +75,12 @@ void ScreenInfo::setShownRect( const Rect& r ) mkrect = r; } -const QRect ScreenInfo::viewRect() const +const TQRect ScreenInfo::viewRect() const { return mqrect; } -void ScreenInfo::setViewRect( const QRect& r ) +void ScreenInfo::setViewRect( const TQRect& r ) { mqrect = r; } diff --git a/kig/misc/screeninfo.h b/kig/misc/screeninfo.h index b7f94c49..570e1a8f 100644 --- a/kig/misc/screeninfo.h +++ b/kig/misc/screeninfo.h @@ -18,7 +18,7 @@ #ifndef SCREENINFO_H #define SCREENINFO_H -#include +#include #include "rect.h" @@ -31,15 +31,15 @@ class ScreenInfo { Rect mkrect; - QRect mqrect; + TQRect mqrect; public: - ScreenInfo( const Rect& docRect, const QRect& viewRect ); + ScreenInfo( const Rect& docRect, const TQRect& viewRect ); - Coordinate fromScreen( const QPoint& p ) const; - Rect fromScreen( const QRect& r ) const; + Coordinate fromScreen( const TQPoint& p ) const; + Rect fromScreen( const TQRect& r ) const; - QPoint toScreen( const Coordinate& p ) const; - QRect toScreen( const Rect& r ) const; + TQPoint toScreen( const Coordinate& p ) const; + TQRect toScreen( const Rect& r ) const; double pixelWidth() const; @@ -49,9 +49,9 @@ public: void setShownRect( const Rect& r ); - const QRect viewRect() const; + const TQRect viewRect() const; - void setViewRect( const QRect& r ); + void setViewRect( const TQRect& r ); }; #endif diff --git a/kig/misc/special_constructors.cc b/kig/misc/special_constructors.cc index 04c8a097..d419a546 100644 --- a/kig/misc/special_constructors.cc +++ b/kig/misc/special_constructors.cc @@ -52,7 +52,7 @@ #include "../objects/text_imp.h" #include "../objects/transform_types.h" -#include +#include #include @@ -242,7 +242,7 @@ std::vector LocusConstructor::build( const std::vector& os, +TQString LocusConstructor::useText( const ObjectCalcer& o, const std::vector& os, const KigDocument&, const KigWidget& ) const { if ( dynamic_cast( &o ) && @@ -284,17 +284,17 @@ PolygonBNPTypeConstructor::~PolygonBNPTypeConstructor() { } -const QString PolygonBNPTypeConstructor::descriptiveName() const +const TQString PolygonBNPTypeConstructor::descriptiveName() const { return i18n("Polygon by Its Vertices"); } -const QString PolygonBNPTypeConstructor::description() const +const TQString PolygonBNPTypeConstructor::description() const { return i18n("Construct a polygon by giving its vertices"); } -const QCString PolygonBNPTypeConstructor::iconFileName( const bool ) const +const TQCString PolygonBNPTypeConstructor::iconFileName( const bool ) const { return "kig_polygon"; } @@ -351,7 +351,7 @@ void PolygonBNPTypeConstructor::handlePrelim( std::vector args = os; p.setBrushStyle( Qt::NoBrush ); p.setBrushColor( Qt::red ); - p.setPen( QPen ( Qt::red, 1) ); + p.setPen( TQPen ( Qt::red, 1) ); p.setWidth( -1 ); // -1 means the default width for the object being // drawn.. @@ -359,7 +359,7 @@ void PolygonBNPTypeConstructor::handlePrelim( drawprelim( drawer, p, args, d ); } -QString PolygonBNPTypeConstructor::useText( const ObjectCalcer&, const std::vector& os, +TQString PolygonBNPTypeConstructor::useText( const ObjectCalcer&, const std::vector& os, const KigDocument&, const KigWidget& ) const { if ( os.size() > 3 ) @@ -367,7 +367,7 @@ QString PolygonBNPTypeConstructor::useText( const ObjectCalcer&, const std::vect else return i18n("Construct a polygon with this vertex"); } -QString PolygonBNPTypeConstructor::selectStatement( +TQString PolygonBNPTypeConstructor::selectStatement( const std::vector&, const KigDocument&, const KigWidget& ) const { @@ -568,17 +568,17 @@ PolygonBCVConstructor::~PolygonBCVConstructor() { } -const QString PolygonBCVConstructor::descriptiveName() const +const TQString PolygonBCVConstructor::descriptiveName() const { return i18n("Regular Polygon with Given Center"); } -const QString PolygonBCVConstructor::description() const +const TQString PolygonBCVConstructor::description() const { return i18n("Construct a regular polygon with a given center and vertex"); } -const QCString PolygonBCVConstructor::iconFileName( const bool ) const +const TQCString PolygonBCVConstructor::iconFileName( const bool ) const { return "hexagonbcv"; } @@ -660,7 +660,7 @@ void PolygonBCVConstructor::handlePrelim( p.setBrushStyle( Qt::NoBrush ); p.setBrushColor( Qt::red ); - p.setPen( QPen ( Qt::red, 1) ); + p.setPen( TQPen ( Qt::red, 1) ); p.setWidth( -1 ); // -1 means the default width for the object being // drawn.. @@ -682,7 +682,7 @@ void PolygonBCVConstructor::handlePrelim( ptn = PointImp( where ); ptn.draw( p ); if ( i > 5 ) continue; - text = TextImp( QString( "(%1)" ).arg(i), where, false ); + text = TextImp( TQString( "(%1)" ).arg(i), where, false ); text.draw( p ); } p.setStyle( Qt::DotLine ); @@ -728,7 +728,7 @@ std::vector PolygonBCVConstructor::build( const std::vector& os, +TQString PolygonBCVConstructor::useText( const ObjectCalcer&, const std::vector& os, const KigDocument&, const KigWidget& ) const { switch ( os.size() ) @@ -750,13 +750,13 @@ QString PolygonBCVConstructor::useText( const ObjectCalcer&, const std::vector 1 ) { - QString result = QString( + TQString result = TQString( i18n( "Adjust the number of sides (%1/%2)" ) ).arg( nsides ).arg( winding ); return result; } else { - QString result = QString( + TQString result = TQString( i18n( "Adjust the number of sides (%1)" ) ).arg( nsides ); return result; @@ -767,7 +767,7 @@ QString PolygonBCVConstructor::useText( const ObjectCalcer&, const std::vector& os, const KigDocument&, const KigWidget& ) const { @@ -970,7 +970,7 @@ ArcLineIntersectionConstructor::~ArcLineIntersectionConstructor() { } -QString ConicRadicalConstructor::useText( const ObjectCalcer& o, const std::vector&, +TQString ConicRadicalConstructor::useText( const ObjectCalcer& o, const std::vector&, const KigDocument&, const KigWidget& ) const { if ( o.imp()->inherits( CircleImp::stype() ) ) @@ -1099,17 +1099,17 @@ MeasureTransportConstructor::~MeasureTransportConstructor() { } -const QString MeasureTransportConstructor::descriptiveName() const +const TQString MeasureTransportConstructor::descriptiveName() const { return i18n("Measure Transport"); } -const QString MeasureTransportConstructor::description() const +const TQString MeasureTransportConstructor::description() const { return i18n("Transport the measure of a segment or arc over a line or circle."); } -const QCString MeasureTransportConstructor::iconFileName( const bool ) const +const TQCString MeasureTransportConstructor::iconFileName( const bool ) const { return "measuretransport"; } @@ -1180,7 +1180,7 @@ void MeasureTransportConstructor::handlePrelim( { p.setBrushStyle( Qt::NoBrush ); p.setBrushColor( Qt::red ); - p.setPen( QPen ( Qt::red, 1) ); + p.setPen( TQPen ( Qt::red, 1) ); p.setWidth( -1 ); // -1 means the default width for the object being // drawn.. @@ -1202,7 +1202,7 @@ void MeasureTransportConstructor::drawprelim( const ObjectDrawer& drawer, delete data; } -QString MeasureTransportConstructor::useText( const ObjectCalcer& o, +TQString MeasureTransportConstructor::useText( const ObjectCalcer& o, const std::vector& os, const KigDocument&, const KigWidget& ) const { @@ -1227,7 +1227,7 @@ QString MeasureTransportConstructor::useText( const ObjectCalcer& o, return ""; } -QString MeasureTransportConstructor::selectStatement( +TQString MeasureTransportConstructor::selectStatement( const std::vector&, const KigDocument&, const KigWidget& ) const { @@ -1323,11 +1323,11 @@ bool GenericIntersectionConstructor::isIntersection() const return true; } -QString GenericIntersectionConstructor::useText( +TQString GenericIntersectionConstructor::useText( const ObjectCalcer& o, const std::vector& os, const KigDocument&, const KigWidget& ) const { - QString preamble; + TQString preamble; switch (os.size()) { case 1: @@ -1362,7 +1362,7 @@ QString GenericIntersectionConstructor::useText( break; } - return QString::null; + return TQString::null; } static const ArgsParser::spec argsspecMidPointOfTwoPoints[] = @@ -1475,7 +1475,7 @@ const int TestConstructor::wantArgs( const std::vector& os, return ret; } -QString GenericIntersectionConstructor::selectStatement( +TQString GenericIntersectionConstructor::selectStatement( const std::vector& sel, const KigDocument&, const KigWidget& ) const { @@ -1525,7 +1525,7 @@ TangentConstructor::~TangentConstructor() { } -QString TangentConstructor::useText( +TQString TangentConstructor::useText( const ObjectCalcer& o, const std::vector&, const KigDocument&, const KigWidget& ) const { @@ -1542,10 +1542,10 @@ QString TangentConstructor::useText( else if ( o.imp()->inherits( PointImp::stype() ) ) return i18n( "Tangent at This Point" ); // else assert( false ); - return QString::null; + return TQString::null; } -//QString TangentConstructor::selectStatement( +//TQString TangentConstructor::selectStatement( // const std::vector& sel, const KigDocument&, // const KigWidget& ) const //{ @@ -1592,7 +1592,7 @@ CocConstructor::~CocConstructor() { } -QString CocConstructor::useText( +TQString CocConstructor::useText( const ObjectCalcer& o, const std::vector&, const KigDocument&, const KigWidget& ) const { @@ -1604,7 +1604,7 @@ QString CocConstructor::useText( return i18n( "Center of Curvature of This Curve" ); else if ( o.imp()->inherits( PointImp::stype() ) ) return i18n( "Center of Curvature at This Point" ); - return QString::null; + return TQString::null; } bool relativePrimes( int n, int p ) @@ -1617,7 +1617,7 @@ bool relativePrimes( int n, int p ) return relativePrimes( p, n-d*p ); } -//QString CocConstructor::selectStatement( +//TQString CocConstructor::selectStatement( // const std::vector& sel, const KigDocument&, // const KigWidget& ) const //{ diff --git a/kig/misc/special_constructors.h b/kig/misc/special_constructors.h index 99760be3..5b80693c 100644 --- a/kig/misc/special_constructors.h +++ b/kig/misc/special_constructors.h @@ -58,9 +58,9 @@ public: PolygonBNPTypeConstructor(); ~PolygonBNPTypeConstructor(); - const QString descriptiveName() const; - const QString description() const; - const QCString iconFileName( const bool canBeNull = false ) const; + const TQString descriptiveName() const; + const TQString description() const; + const TQCString iconFileName( const bool canBeNull = false ) const; const bool isAlreadySelectedOK( const std::vector& os, const int& ) const; const int wantArgs( const std::vector& os, @@ -71,10 +71,10 @@ public: KigPart& d, KigWidget& v ) const; - QString useText( const ObjectCalcer& o, const std::vector& sel, + TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; - QString selectStatement( + TQString selectStatement( const std::vector& sel, const KigDocument& d, const KigWidget& w ) const; void handlePrelim( KigPainter& p, @@ -97,9 +97,9 @@ public: PolygonBCVConstructor(); ~PolygonBCVConstructor(); - const QString descriptiveName() const; - const QString description() const; - const QCString iconFileName( const bool canBeNull = false ) const; + const TQString descriptiveName() const; + const TQString description() const; + const TQCString iconFileName( const bool canBeNull = false ) const; const bool isAlreadySelectedOK( const std::vector& os, const int& ) const; const int wantArgs( const std::vector& os, @@ -110,10 +110,10 @@ public: KigPart& d, KigWidget& v ) const; - QString useText( const ObjectCalcer& o, const std::vector& sel, + TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; - QString selectStatement( + TQString selectStatement( const std::vector& sel, const KigDocument& d, const KigWidget& w ) const; void handlePrelim( KigPainter& p, @@ -138,9 +138,9 @@ public: MeasureTransportConstructor(); ~MeasureTransportConstructor(); - const QString descriptiveName() const; - const QString description() const; - const QCString iconFileName( const bool canBeNull = false ) const; + const TQString descriptiveName() const; + const TQString description() const; + const TQCString iconFileName( const bool canBeNull = false ) const; const bool isAlreadySelectedOK( const std::vector& os, const int& ) const; const int wantArgs( const std::vector& os, @@ -151,10 +151,10 @@ public: KigPart& d, KigWidget& v ) const; - QString useText( const ObjectCalcer& o, const std::vector& sel, + TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; - QString selectStatement( + TQString selectStatement( const std::vector& sel, const KigDocument& d, const KigWidget& w ) const; void handlePrelim( KigPainter& p, @@ -177,7 +177,7 @@ class ConicRadicalConstructor public: ConicRadicalConstructor(); ~ConicRadicalConstructor(); - QString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, + TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, const KigDocument& ) const; std::vector build( const std::vector& os, KigDocument& d, KigWidget& w ) const; @@ -202,7 +202,7 @@ public: const std::vector& os, const KigDocument& d, const KigWidget& v ) const; - QString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, + TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector& parents, const KigDocument& ) const; @@ -245,9 +245,9 @@ public: bool isIntersection() const; - QString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, + TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; - QString selectStatement( + TQString selectStatement( const std::vector& sel, const KigDocument& d, const KigWidget& w ) const; }; @@ -295,9 +295,9 @@ public: TangentConstructor(); ~TangentConstructor(); - QString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, + TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; -// QString selectStatement( +// TQString selectStatement( // const std::vector& sel, const KigDocument& d, // const KigWidget& w ) const; }; @@ -309,9 +309,9 @@ public: CocConstructor(); ~CocConstructor(); - QString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, + TQString useText( const ObjectCalcer& o, const std::vector& sel, const KigDocument& d, const KigWidget& v ) const; -// QString selectStatement( +// TQString selectStatement( // const std::vector& sel, const KigDocument& d, // const KigWidget& w ) const; }; diff --git a/kig/modes/base_mode.cc b/kig/modes/base_mode.cc index 9e92274a..d968566b 100644 --- a/kig/modes/base_mode.cc +++ b/kig/modes/base_mode.cc @@ -23,7 +23,7 @@ #include "../kig/kig_part.h" #include "../kig/kig_document.h" -#include +#include #include BaseMode::BaseMode( KigPart& d ) @@ -35,7 +35,7 @@ BaseMode::~BaseMode() { } -void BaseMode::leftClicked( QMouseEvent* e, KigWidget* v ) +void BaseMode::leftClicked( TQMouseEvent* e, KigWidget* v ) { // touch screens don't send a mouseMoved event before a click event, // apparently, so we simulate it. @@ -64,7 +64,7 @@ void BaseMode::leftClicked( QMouseEvent* e, KigWidget* v ) }; } -void BaseMode::leftMouseMoved( QMouseEvent* e, KigWidget* w ) +void BaseMode::leftMouseMoved( TQMouseEvent* e, KigWidget* w ) { if( !moco.empty() && ( mplc - e->pos() ).manhattanLength() > 3 ) dragObject( moco, mplc, *w, @@ -72,7 +72,7 @@ void BaseMode::leftMouseMoved( QMouseEvent* e, KigWidget* w ) ); } -void BaseMode::leftReleased( QMouseEvent* e, KigWidget* v ) +void BaseMode::leftReleased( TQMouseEvent* e, KigWidget* v ) { if( (mplc - e->pos()).manhattanLength() > 4 ) return; @@ -93,7 +93,7 @@ void BaseMode::leftReleased( QMouseEvent* e, KigWidget* v ) leftClickedObject( o, e->pos(), *v, keyCtrl ); } -void BaseMode::midClicked( QMouseEvent* e, KigWidget* v ) +void BaseMode::midClicked( TQMouseEvent* e, KigWidget* v ) { // get rid of text still showing... v->updateCurPix(); @@ -103,14 +103,14 @@ void BaseMode::midClicked( QMouseEvent* e, KigWidget* v ) moco = mdoc.document().whatAmIOn( v->fromScreen( e->pos() ), *v ); } -void BaseMode::midReleased( QMouseEvent* e, KigWidget* v ) +void BaseMode::midReleased( TQMouseEvent* e, KigWidget* v ) { if( (e->pos() - mplc).manhattanLength() > 4 ) return; midClicked( mplc, *v ); } -void BaseMode::rightClicked( QMouseEvent* e, KigWidget* w ) +void BaseMode::rightClicked( TQMouseEvent* e, KigWidget* w ) { // get rid of text still showing... w->updateCurPix(); @@ -124,22 +124,22 @@ void BaseMode::rightClicked( QMouseEvent* e, KigWidget* w ) rightClicked( moco, mplc, *w ); } -void BaseMode::mouseMoved( QMouseEvent* e, KigWidget* w ) +void BaseMode::mouseMoved( TQMouseEvent* e, KigWidget* w ) { std::vector os = mdoc.document().whatAmIOn( w->fromScreen( e->pos() ), *w ); mouseMoved( os, e->pos(), *w, e->state() & Qt::ShiftButton ); } -void BaseMode::dragRect( const QPoint&, KigWidget& ) +void BaseMode::dragRect( const TQPoint&, KigWidget& ) { } -void BaseMode::leftClickedObject( ObjectHolder*, const QPoint&, +void BaseMode::leftClickedObject( ObjectHolder*, const TQPoint&, KigWidget&, bool ) { } -void BaseMode::dragObject( const std::vector&, const QPoint&, +void BaseMode::dragObject( const std::vector&, const TQPoint&, KigWidget&, bool ) { } @@ -154,7 +154,7 @@ std::vector BaseMode::oco() return moco; } -QPoint BaseMode::pointLocation() +TQPoint BaseMode::pointLocation() { return mplc; } diff --git a/kig/modes/base_mode.h b/kig/modes/base_mode.h index 2f89996f..cb029abf 100644 --- a/kig/modes/base_mode.h +++ b/kig/modes/base_mode.h @@ -20,7 +20,7 @@ #include "mode.h" -#include +#include #include class KigWidget; @@ -30,31 +30,31 @@ class ObjectHolder; class BaseMode : public KigMode { - QPoint mplc; + TQPoint mplc; std::vector moco; - void leftClicked( QMouseEvent* e, KigWidget* v ); - void leftMouseMoved( QMouseEvent*, KigWidget* ); - void leftReleased( QMouseEvent* e, KigWidget* v ); - void midClicked( QMouseEvent* e, KigWidget* v ); - void midReleased( QMouseEvent* e, KigWidget* v ); - void rightClicked( QMouseEvent*, KigWidget* ); - void mouseMoved( QMouseEvent* e, KigWidget* v ); + void leftClicked( TQMouseEvent* e, KigWidget* v ); + void leftMouseMoved( TQMouseEvent*, KigWidget* ); + void leftReleased( TQMouseEvent* e, KigWidget* v ); + void midClicked( TQMouseEvent* e, KigWidget* v ); + void midReleased( TQMouseEvent* e, KigWidget* v ); + void rightClicked( TQMouseEvent*, KigWidget* ); + void mouseMoved( TQMouseEvent* e, KigWidget* v ); protected: void enableActions(); std::vector oco(); - QPoint pointLocation(); + TQPoint pointLocation(); protected: - virtual void dragRect( const QPoint& p, KigWidget& w ); - virtual void dragObject( const std::vector& os, const QPoint& pointClickedOn, KigWidget& w, bool ctrlOrShiftDown ); - virtual void leftClickedObject( ObjectHolder* o, const QPoint& p, + virtual void dragRect( const TQPoint& p, KigWidget& w ); + virtual void dragObject( const std::vector& os, const TQPoint& pointClickedOn, KigWidget& w, bool ctrlOrShiftDown ); + virtual void leftClickedObject( ObjectHolder* o, const TQPoint& p, KigWidget& w, bool ctrlOrShiftDown ) = 0; - virtual void midClicked( const QPoint& p, KigWidget& w ) = 0; - virtual void rightClicked( const std::vector& oco, const QPoint& p, KigWidget& w ) = 0; - virtual void mouseMoved( const std::vector& os, const QPoint& p, KigWidget& w, bool shiftpressed ) = 0; + virtual void midClicked( const TQPoint& p, KigWidget& w ) = 0; + virtual void rightClicked( const std::vector& oco, const TQPoint& p, KigWidget& w ) = 0; + virtual void mouseMoved( const std::vector& os, const TQPoint& p, KigWidget& w, bool shiftpressed ) = 0; protected: BaseMode( KigPart& ); diff --git a/kig/modes/construct_mode.cc b/kig/modes/construct_mode.cc index 9618aded..b535ee5c 100644 --- a/kig/modes/construct_mode.cc +++ b/kig/modes/construct_mode.cc @@ -63,7 +63,7 @@ BaseConstructMode::~BaseConstructMode() // delete mcursorholder; } -void BaseConstructMode::leftReleased( QMouseEvent* e, KigWidget* v ) +void BaseConstructMode::leftReleased( TQMouseEvent* e, KigWidget* v ) { if( (pointLocation() - e->pos()).manhattanLength() > 4 ) return; @@ -101,7 +101,7 @@ void BaseConstructMode::leftReleased( QMouseEvent* e, KigWidget* v ) } void BaseConstructMode::leftClickedObject( - ObjectHolder* o, const QPoint& p, KigWidget& w, bool ) + ObjectHolder* o, const TQPoint& p, KigWidget& w, bool ) { std::vector::iterator it = std::find( mparents.begin(), mparents.end(), o ); std::vector nargs = getCalcers( mparents ); @@ -155,7 +155,7 @@ void BaseConstructMode::leftClickedObject( } } -void BaseConstructMode::midClicked( const QPoint& p, KigWidget& w ) +void BaseConstructMode::midClicked( const TQPoint& p, KigWidget& w ) { std::vector args = getCalcers( mparents ); args.push_back( mpt.get() ); @@ -171,12 +171,12 @@ void BaseConstructMode::midClicked( const QPoint& p, KigWidget& w ) } } -void BaseConstructMode::rightClicked( const std::vector&, const QPoint&, KigWidget& ) +void BaseConstructMode::rightClicked( const std::vector&, const TQPoint&, KigWidget& ) { // TODO ? } -void BaseConstructMode::mouseMoved( const std::vector& os, const QPoint& p, +void BaseConstructMode::mouseMoved( const std::vector& os, const TQPoint& p, KigWidget& w, bool shiftpressed ) { mdoc.emitStatusBarText( selectStatement( getCalcers( mparents ), w ) ); @@ -259,10 +259,10 @@ void BaseConstructMode::mouseMoved( const std::vector& os, const } if ( !text && ( goodargs.size() > 1 ) ) { - QString strwhich = i18n( "Which object?" ); + TQString strwhich = i18n( "Which object?" ); mdoc.emitStatusBarText( strwhich ); - QPoint textloc = p; + TQPoint textloc = p; textloc.setX( textloc.x() + 15 ); pter.drawTextStd( textloc, strwhich ); @@ -303,21 +303,21 @@ PointConstructMode::~PointConstructMode() } void PointConstructMode::leftClickedObject( - ObjectHolder*, const QPoint&, KigWidget& w, bool ) + ObjectHolder*, const TQPoint&, KigWidget& w, bool ) { mdoc.addObject( new ObjectHolder( mpt.get() ) ); w.redrawScreen( std::vector() ); - mdoc.emitStatusBarText( QString::null ); + mdoc.emitStatusBarText( TQString::null ); mdoc.doneMode( this ); } -void PointConstructMode::midClicked( const QPoint& p, KigWidget& w ) +void PointConstructMode::midClicked( const TQPoint& p, KigWidget& w ) { leftClickedObject( 0, p, w, true ); } -void PointConstructMode::rightClicked( const std::vector&, const QPoint&, +void PointConstructMode::rightClicked( const std::vector&, const TQPoint&, KigWidget& ) { // TODO ? @@ -325,7 +325,7 @@ void PointConstructMode::rightClicked( const std::vector&, const void PointConstructMode::mouseMoved( const std::vector&, - const QPoint& p, + const TQPoint& p, KigWidget& w, bool shiftpressed ) { @@ -379,15 +379,15 @@ void BaseConstructMode::selectObjects( const std::vector& os, Kig }; } -void ConstructMode::handlePrelim( const std::vector& args, const QPoint& p, KigPainter& pter, KigWidget& w ) +void ConstructMode::handlePrelim( const std::vector& args, const TQPoint& p, KigPainter& pter, KigWidget& w ) { // set the text next to the arrow cursor like in modes/normal.cc - QPoint textloc = p; + TQPoint textloc = p; textloc.setX( textloc.x() + 15 ); mctor->handlePrelim( pter, args, mdoc.document(), w ); - QString o = mctor->useText( *args.back(), args, mdoc.document(), w ); + TQString o = mctor->useText( *args.back(), args, mdoc.document(), w ); pter.drawTextStd( textloc, o ); } @@ -419,15 +419,15 @@ ConstructMode::~ConstructMode() // does a test result have a frame by default ? static const bool test_has_frame_dflt = true; -void TestConstructMode::handlePrelim( const std::vector& os, const QPoint& p, KigPainter& pter, KigWidget& w ) +void TestConstructMode::handlePrelim( const std::vector& os, const TQPoint& p, KigPainter& pter, KigWidget& w ) { Args args; std::transform( os.begin(), os.end(), std::back_inserter( args ), std::mem_fun( &ObjectCalcer::imp ) ); // usetext - QString usetext = i18n( mtype->argsParser().usetext( args.back(), args ).c_str() ); - QPoint textloc = p; + TQString usetext = i18n( mtype->argsParser().usetext( args.back(), args ).c_str() ); + TQPoint textloc = p; textloc.setX( textloc.x() + 15 ); pter.drawTextStd( textloc, usetext ); @@ -435,8 +435,8 @@ void TestConstructMode::handlePrelim( const std::vector& os, cons ObjectImp* data = mtype->calc( args, mdoc.document() ); if ( ! data->valid() ) return; assert( data->inherits( TestResultImp::stype() ) ); - QString outputtext = static_cast( data )->data(); - TextImp ti( outputtext, w.fromScreen( p + QPoint( - 40, 30 ) ), test_has_frame_dflt ); + TQString outputtext = static_cast( data )->data(); + TextImp ti( outputtext, w.fromScreen( p + TQPoint( - 40, 30 ) ), test_has_frame_dflt ); ti.draw( pter ); delete data; @@ -475,17 +475,17 @@ void TestConstructMode::handleArgs( const std::vector& args, KigW mdoc.emitStatusBarText( i18n( "Now select the location for the result label." ) ); } -void TestConstructMode::leftClickedObject( ObjectHolder* o, const QPoint& p, +void TestConstructMode::leftClickedObject( ObjectHolder* o, const TQPoint& p, KigWidget& w, bool ctrlOrShiftDown ) { if ( mresult ) { - QPoint qloc = p + QPoint( -40, 0 ); + TQPoint qloc = p + TQPoint( -40, 0 ); Coordinate loc = w.fromScreen( qloc ); std::vector parents; parents.push_back( new ObjectConstCalcer( new IntImp( test_has_frame_dflt ) ) ); parents.push_back( new ObjectConstCalcer( new PointImp( loc ) ) ); - parents.push_back( new ObjectConstCalcer( new StringImp( QString::fromLatin1( "%1" ) ) ) ); + parents.push_back( new ObjectConstCalcer( new StringImp( TQString::fromLatin1( "%1" ) ) ) ); assert( mresult->imp()->inherits( TestResultImp::stype() ) ); parents.push_back( new ObjectPropertyCalcer( @@ -497,7 +497,7 @@ void TestConstructMode::leftClickedObject( ObjectHolder* o, const QPoint& p, mdoc.addObject( new ObjectHolder( ret ) ); w.unsetCursor(); - mdoc.emitStatusBarText( QString::null ); + mdoc.emitStatusBarText( TQString::null ); finish(); } @@ -505,7 +505,7 @@ void TestConstructMode::leftClickedObject( ObjectHolder* o, const QPoint& p, BaseConstructMode::leftClickedObject( o, p, w, ctrlOrShiftDown ); } -void TestConstructMode::midClicked( const QPoint& p, KigWidget& w ) +void TestConstructMode::midClicked( const TQPoint& p, KigWidget& w ) { if ( mresult ) { // nothing to be done here, really @@ -514,7 +514,7 @@ void TestConstructMode::midClicked( const QPoint& p, KigWidget& w ) BaseConstructMode::midClicked( p, w ); } -void TestConstructMode::rightClicked( const std::vector& oco, const QPoint& p, KigWidget& w ) +void TestConstructMode::rightClicked( const std::vector& oco, const TQPoint& p, KigWidget& w ) { if ( mresult ) { // nothing to be done here, really @@ -523,7 +523,7 @@ void TestConstructMode::rightClicked( const std::vector& oco, con BaseConstructMode::rightClicked( oco, p, w ); } -void TestConstructMode::mouseMoved( const std::vector& os, const QPoint& p, KigWidget& w, bool shiftPressed ) +void TestConstructMode::mouseMoved( const std::vector& os, const TQPoint& p, KigWidget& w, bool shiftPressed ) { if ( mresult ) { w.setCursor( KCursor::blankCursor() ); @@ -531,7 +531,7 @@ void TestConstructMode::mouseMoved( const std::vector& os, const w.updateCurPix(); KigPainter pter( w.screenInfo(), &w.curPix, mdoc.document() ); - QPoint qloc = p + QPoint( -40, 0 ); + TQPoint qloc = p + TQPoint( -40, 0 ); Coordinate loc = w.fromScreen( qloc ); assert( dynamic_cast( mresult->imp() ) ); TextImp ti( static_cast( mresult->imp() )->data(), loc, test_has_frame_dflt ); @@ -545,19 +545,19 @@ void TestConstructMode::mouseMoved( const std::vector& os, const BaseConstructMode::mouseMoved( os, p, w, shiftPressed ); } -QString ConstructMode::selectStatement( const std::vector& args, const KigWidget& w ) +TQString ConstructMode::selectStatement( const std::vector& args, const KigWidget& w ) { return mctor->selectStatement( args, mdoc.document(), w ); } -QString TestConstructMode::selectStatement( const std::vector& sel, const KigWidget& ) +TQString TestConstructMode::selectStatement( const std::vector& sel, const KigWidget& ) { using namespace std; Args args; transform( sel.begin(), sel.end(), back_inserter( args ), mem_fun( &ObjectCalcer::imp ) ); std::string ret = mtype->argsParser().selectStatement( args ); - if ( ret.empty() ) return QString::null; + if ( ret.empty() ) return TQString::null; return i18n( ret.c_str() ); } diff --git a/kig/modes/construct_mode.h b/kig/modes/construct_mode.h index fa1be86e..be937723 100644 --- a/kig/modes/construct_mode.h +++ b/kig/modes/construct_mode.h @@ -38,11 +38,11 @@ public: PointConstructMode( KigPart& d ); ~PointConstructMode(); protected: - void leftClickedObject( ObjectHolder* o, const QPoint& p, + void leftClickedObject( ObjectHolder* o, const TQPoint& p, KigWidget& w, bool ctrlOrShiftDown ); - void midClicked( const QPoint& p, KigWidget& w ); - void rightClicked( const std::vector& oco, const QPoint& p, KigWidget& w ); - void mouseMoved( const std::vector& os, const QPoint& p, KigWidget& w, bool shiftpressed ); + void midClicked( const TQPoint& p, KigWidget& w ); + void rightClicked( const std::vector& oco, const TQPoint& p, KigWidget& w ); + void mouseMoved( const std::vector& os, const TQPoint& p, KigWidget& w, bool shiftpressed ); void enableActions(); void cancelConstruction(); @@ -73,7 +73,7 @@ class BaseConstructMode // ObjectHolder* mcursorholder; std::vector mparents; - void leftReleased( QMouseEvent* e, KigWidget* v ); + void leftReleased( TQMouseEvent* e, KigWidget* v ); public: void selectObject( ObjectHolder* o, KigWidget& w ); @@ -82,19 +82,19 @@ public: protected: BaseConstructMode( KigPart& d ); protected: - void leftClickedObject( ObjectHolder* o, const QPoint& p, + void leftClickedObject( ObjectHolder* o, const TQPoint& p, KigWidget& w, bool ctrlOrShiftDown ); - void midClicked( const QPoint& p, KigWidget& w ); - void rightClicked( const std::vector& oco, const QPoint& p, KigWidget& w ); - void mouseMoved( const std::vector& os, const QPoint& p, KigWidget& w, bool shiftpressed ); + void midClicked( const TQPoint& p, KigWidget& w ); + void rightClicked( const std::vector& oco, const TQPoint& p, KigWidget& w ); + void mouseMoved( const std::vector& os, const TQPoint& p, KigWidget& w, bool shiftpressed ); void enableActions(); void cancelConstruction(); void finish(); protected: - virtual void handlePrelim( const std::vector& os, const QPoint& p, KigPainter&, KigWidget& w ) = 0; - virtual QString selectStatement( const std::vector& args, const KigWidget& w ) = 0; + virtual void handlePrelim( const std::vector& os, const TQPoint& p, KigPainter&, KigWidget& w ) = 0; + virtual TQString selectStatement( const std::vector& args, const KigWidget& w ) = 0; virtual int isAlreadySelectedOK( const std::vector&, const int& ) = 0; virtual int wantArgs( const std::vector&, KigDocument& d, KigWidget& w ) = 0; virtual void handleArgs( const std::vector& args, KigWidget& w ) = 0; @@ -110,8 +110,8 @@ public: ConstructMode( KigPart& d, const ObjectConstructor* ctor ); ~ConstructMode(); - void handlePrelim( const std::vector& os, const QPoint& p, KigPainter&, KigWidget& w ); - QString selectStatement( const std::vector& args, const KigWidget& w ); + void handlePrelim( const std::vector& os, const TQPoint& p, KigPainter&, KigWidget& w ); + TQString selectStatement( const std::vector& args, const KigWidget& w ); int isAlreadySelectedOK( const std::vector&, const int& ); int wantArgs( const std::vector&, KigDocument& d, KigWidget& w ); void handleArgs( const std::vector& args, KigWidget& w ); @@ -138,17 +138,17 @@ public: TestConstructMode( KigPart& d, const ArgsParserObjectType* type ); ~TestConstructMode(); - void handlePrelim( const std::vector& os, const QPoint& p, KigPainter&, KigWidget& w ); - QString selectStatement( const std::vector& args, const KigWidget& w ); + void handlePrelim( const std::vector& os, const TQPoint& p, KigPainter&, KigWidget& w ); + TQString selectStatement( const std::vector& args, const KigWidget& w ); int isAlreadySelectedOK( const std::vector&, const int& ); int wantArgs( const std::vector&, KigDocument& d, KigWidget& w ); void handleArgs( const std::vector& args, KigWidget& w ); - void leftClickedObject( ObjectHolder* o, const QPoint& p, + void leftClickedObject( ObjectHolder* o, const TQPoint& p, KigWidget& w, bool ctrlOrShiftDown ); - void midClicked( const QPoint& p, KigWidget& w ); - void rightClicked( const std::vector& oco, const QPoint& p, KigWidget& w ); - void mouseMoved( const std::vector& os, const QPoint& p, KigWidget& w, bool shiftpressed ); + void midClicked( const TQPoint& p, KigWidget& w ); + void rightClicked( const std::vector& oco, const TQPoint& p, KigWidget& w ); + void mouseMoved( const std::vector& os, const TQPoint& p, KigWidget& w, bool shiftpressed ); }; #endif diff --git a/kig/modes/dragrectmode.cc b/kig/modes/dragrectmode.cc index a3c8c033..3a827009 100644 --- a/kig/modes/dragrectmode.cc +++ b/kig/modes/dragrectmode.cc @@ -22,11 +22,11 @@ #include "../kig/kig_view.h" #include "../misc/kigpainter.h" -#include -#include +#include +#include #include -DragRectMode::DragRectMode( const QPoint& start, KigPart& d, KigWidget& w ) +DragRectMode::DragRectMode( const TQPoint& start, KigPart& d, KigWidget& w ) : KigMode( d ), mstart( start ), mnc( true ), mstartselected( true ), mcancelled( false ) { @@ -41,25 +41,25 @@ DragRectMode::DragRectMode( KigPart& d, KigWidget& w ) w.updateWidget(); } -void DragRectMode::moved( const QPoint& p, KigWidget& w ) +void DragRectMode::moved( const TQPoint& p, KigWidget& w ) { // update the rect... w.updateCurPix(); - std::vector overlay; + std::vector overlay; if ( mstartselected ) { KigPainter pt( w.screenInfo(), &w.curPix, mdoc.document() ); - pt.drawFilledRect( QRect( p, mstart ) ); + pt.drawFilledRect( TQRect( p, mstart ) ); overlay = pt.overlay(); }; w.updateWidget( overlay ); } -void DragRectMode::released( const QPoint& p, KigWidget& w, bool nc ) +void DragRectMode::released( const TQPoint& p, KigWidget& w, bool nc ) { if ( mstartselected ) { - mrect = w.fromScreen( QRect( mstart, p ) ); + mrect = w.fromScreen( TQRect( mstart, p ) ); mret = mdoc.document().whatIsInHere( mrect, w ); mnc = nc; @@ -84,12 +84,12 @@ bool DragRectMode::needClear() const return mnc; } -void DragRectMode::moved( QMouseEvent* e, KigWidget& w ) +void DragRectMode::moved( TQMouseEvent* e, KigWidget& w ) { moved( e->pos(), w ); } -void DragRectMode::released( QMouseEvent* e, KigWidget& w ) +void DragRectMode::released( TQMouseEvent* e, KigWidget& w ) { released( e->pos(), w, ! ( e->state() & ( ControlButton | ShiftButton ) ) ); } @@ -98,37 +98,37 @@ DragRectMode::~DragRectMode() { } -void DragRectMode::mouseMoved( QMouseEvent* e, KigWidget* w ) +void DragRectMode::mouseMoved( TQMouseEvent* e, KigWidget* w ) { moved( e, *w ); } -void DragRectMode::leftMouseMoved( QMouseEvent* e, KigWidget* w ) +void DragRectMode::leftMouseMoved( TQMouseEvent* e, KigWidget* w ) { moved( e, *w ); } -void DragRectMode::midMouseMoved( QMouseEvent* e, KigWidget* w ) +void DragRectMode::midMouseMoved( TQMouseEvent* e, KigWidget* w ) { moved( e, *w ); } -void DragRectMode::rightMouseMoved( QMouseEvent* e, KigWidget* w ) +void DragRectMode::rightMouseMoved( TQMouseEvent* e, KigWidget* w ) { moved( e, *w ); } -void DragRectMode::leftReleased( QMouseEvent* e, KigWidget* w ) +void DragRectMode::leftReleased( TQMouseEvent* e, KigWidget* w ) { released( e, *w ); } -void DragRectMode::midReleased( QMouseEvent* e, KigWidget* w ) +void DragRectMode::midReleased( TQMouseEvent* e, KigWidget* w ) { released( e, *w ); } -void DragRectMode::rightReleased( QMouseEvent* e, KigWidget* w ) +void DragRectMode::rightReleased( TQMouseEvent* e, KigWidget* w ) { released( e, *w ); } @@ -138,27 +138,27 @@ Rect DragRectMode::rect() const return mrect; } -void DragRectMode::clicked( const QMouseEvent* e, KigWidget& w ) +void DragRectMode::clicked( const TQMouseEvent* e, KigWidget& w ) { clicked( e->pos(), w ); } -void DragRectMode::leftClicked( QMouseEvent* e, KigWidget* w ) +void DragRectMode::leftClicked( TQMouseEvent* e, KigWidget* w ) { clicked( e, *w ); } -void DragRectMode::midClicked( QMouseEvent* e, KigWidget* w ) +void DragRectMode::midClicked( TQMouseEvent* e, KigWidget* w ) { clicked( e, *w ); } -void DragRectMode::rightClicked( QMouseEvent* e, KigWidget* w ) +void DragRectMode::rightClicked( TQMouseEvent* e, KigWidget* w ) { clicked( e, *w ); } -void DragRectMode::clicked( const QPoint& p, KigWidget& ) +void DragRectMode::clicked( const TQPoint& p, KigWidget& ) { if ( !mstartselected ) { diff --git a/kig/modes/dragrectmode.h b/kig/modes/dragrectmode.h index 29f92139..d0348f31 100644 --- a/kig/modes/dragrectmode.h +++ b/kig/modes/dragrectmode.h @@ -23,7 +23,7 @@ #include "../misc/rect.h" -#include +#include #include class ObjectHolder; @@ -40,37 +40,37 @@ class ObjectHolder; class DragRectMode : public KigMode { - QPoint mstart; + TQPoint mstart; std::vector mret; Rect mrect; bool mnc; bool mstartselected; bool mcancelled; private: - void clicked( const QPoint& p, KigWidget& w ); - void clicked( const QMouseEvent* e, KigWidget& w ); - void released( const QPoint& p, KigWidget& w, bool nc ); - void released( QMouseEvent* e, KigWidget& w ); - void moved( const QPoint& p, KigWidget& w ); - void moved( QMouseEvent*, KigWidget& w ); - - void leftClicked( QMouseEvent*, KigWidget* ); - void leftMouseMoved( QMouseEvent*, KigWidget* ); - void leftReleased( QMouseEvent*, KigWidget* ); - void midClicked( QMouseEvent*, KigWidget* ); - void midMouseMoved( QMouseEvent*, KigWidget* ); - void midReleased( QMouseEvent*, KigWidget* ); - void rightClicked( QMouseEvent*, KigWidget* ); - void rightMouseMoved( QMouseEvent*, KigWidget* ); - void rightReleased( QMouseEvent*, KigWidget* ); - void mouseMoved( QMouseEvent*, KigWidget* ); + void clicked( const TQPoint& p, KigWidget& w ); + void clicked( const TQMouseEvent* e, KigWidget& w ); + void released( const TQPoint& p, KigWidget& w, bool nc ); + void released( TQMouseEvent* e, KigWidget& w ); + void moved( const TQPoint& p, KigWidget& w ); + void moved( TQMouseEvent*, KigWidget& w ); + + void leftClicked( TQMouseEvent*, KigWidget* ); + void leftMouseMoved( TQMouseEvent*, KigWidget* ); + void leftReleased( TQMouseEvent*, KigWidget* ); + void midClicked( TQMouseEvent*, KigWidget* ); + void midMouseMoved( TQMouseEvent*, KigWidget* ); + void midReleased( TQMouseEvent*, KigWidget* ); + void rightClicked( TQMouseEvent*, KigWidget* ); + void rightMouseMoved( TQMouseEvent*, KigWidget* ); + void rightReleased( TQMouseEvent*, KigWidget* ); + void mouseMoved( TQMouseEvent*, KigWidget* ); void cancelConstruction(); void enableActions(); public: - DragRectMode( const QPoint& start, KigPart& d, KigWidget& w ); + DragRectMode( const TQPoint& start, KigPart& d, KigWidget& w ); DragRectMode( KigPart& d, KigWidget& w ); ~DragRectMode(); diff --git a/kig/modes/edittype.cc b/kig/modes/edittype.cc index 8c6b538f..f4ed323e 100644 --- a/kig/modes/edittype.cc +++ b/kig/modes/edittype.cc @@ -31,7 +31,7 @@ #include #include -EditType::EditType( QWidget* parent, QString name, QString desc, QString icon ) +EditType::EditType( TQWidget* parent, TQString name, TQString desc, TQString icon ) : EditTypeBase( parent, "edittype", true ), mname( name ), mdesc( desc ), micon( icon ) { // improving GUI look'n'feel... @@ -50,13 +50,13 @@ EditType::~EditType() void EditType::helpSlot() { - kapp->invokeHelp( QString::fromLatin1( "working-with-types" ), - QString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::fromLatin1( "working-with-types" ), + TQString::fromLatin1( "kig" ) ); } void EditType::okSlot() { - QString tmp = editName->text(); + TQString tmp = editName->text(); if ( tmp.isEmpty() ) { KMessageBox::information( this, i18n( "The name of the macro can not be empty." ) ); @@ -91,17 +91,17 @@ void EditType::cancelSlot() done( 0 ); } -const QString EditType::name() const +const TQString EditType::name() const { return mname; } -const QString EditType::description() const +const TQString EditType::description() const { return mdesc; } -const QString EditType::icon() const +const TQString EditType::icon() const { return micon; } diff --git a/kig/modes/edittype.h b/kig/modes/edittype.h index c6530df5..c6f40783 100644 --- a/kig/modes/edittype.h +++ b/kig/modes/edittype.h @@ -29,15 +29,15 @@ class EditType : public EditTypeBase { Q_OBJECT - QString mname; - QString mdesc; - QString micon; + TQString mname; + TQString mdesc; + TQString micon; public: - EditType( QWidget* parent, QString name = QString::null, QString desc = QString::null, QString icon = QString::null ); + EditType( TQWidget* parent, TQString name = TQString::null, TQString desc = TQString::null, TQString icon = TQString::null ); ~EditType(); - const QString name() const; - const QString description() const; - const QString icon() const; + const TQString name() const; + const TQString description() const; + const TQString icon() const; public slots: void helpSlot(); diff --git a/kig/modes/label.cc b/kig/modes/label.cc index cd726918..578e15dd 100644 --- a/kig/modes/label.cc +++ b/kig/modes/label.cc @@ -38,12 +38,12 @@ #include #include #include -#include +#include #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -52,14 +52,14 @@ class TextLabelModeBase::Private { public: // point last clicked.. - QPoint plc; + TQPoint plc; // the currently selected coordinate Coordinate mcoord; // the possible parent object that defines the location of the label.. ObjectCalcer* locationparent; // the text is only kept in the text input widget, not here - // QString mtext; + // TQString mtext; // the property objects we'll be using as args, we keep a reference // to them in the args object, and keep a pointer to them ( or 0 ) @@ -96,7 +96,7 @@ TextLabelModeBase::TextLabelModeBase( KigPart& doc ) d->wiz = new TextLabelWizard( doc.widget(), this ); } -void TextLabelModeBase::leftClicked( QMouseEvent* e, KigWidget* ) +void TextLabelModeBase::leftClicked( TQMouseEvent* e, KigWidget* ) { d->plc = e->pos(); switch( d->mwawd ) @@ -111,7 +111,7 @@ void TextLabelModeBase::leftClicked( QMouseEvent* e, KigWidget* ) }; } -void TextLabelModeBase::leftReleased( QMouseEvent* e, KigWidget* v ) +void TextLabelModeBase::leftReleased( TQMouseEvent* e, KigWidget* v ) { switch( d->mwawd ) { @@ -132,19 +132,19 @@ void TextLabelModeBase::leftReleased( QMouseEvent* e, KigWidget* v ) std::vector os = mdoc.document().whatAmIOn( v->fromScreen( d->plc ), *v ); if ( os.empty() ) break; ObjectHolder* o = os[0]; - QPopupMenu* p = new QPopupMenu( v, "text_label_select_arg_popup" ); + TQPopupMenu* p = new TQPopupMenu( v, "text_label_select_arg_popup" ); p->insertItem( i18n( "Name" ), 0 ); QCStringList l = o->imp()->properties(); assert( l.size() == o->imp()->numberOfProperties() ); for ( int i = 0; static_cast( i ) < l.size(); ++i ) { - QString s = i18n( l[i] ); + TQString s = i18n( l[i] ); const char* iconfile = o->imp()->iconForProperty( i ); int t; if ( iconfile && *iconfile ) { - QPixmap pix = mdoc.instance()->iconLoader()->loadIcon( iconfile, KIcon::User ); - t = p->insertItem( QIconSet( pix ), s, i + 1 ); + TQPixmap pix = mdoc.instance()->iconLoader()->loadIcon( iconfile, KIcon::User ); + t = p->insertItem( TQIconSet( pix ), s, i + 1 ); } else { @@ -200,7 +200,7 @@ void TextLabelModeBase::enableActions() mdoc.aCancelConstruction->setEnabled( true ); } -void TextLabelModeBase::mouseMoved( QMouseEvent* e, KigWidget* w ) +void TextLabelModeBase::mouseMoved( TQMouseEvent* e, KigWidget* w ) { if ( d->mwawd == ReallySelectingArgs ) { @@ -228,13 +228,13 @@ void TextLabelModeBase::mouseMoved( QMouseEvent* e, KigWidget* w ) if ( attachable ) { w->setCursor( KCursor::handCursor() ); - QString s = d->locationparent->imp()->type()->attachToThisStatement(); + TQString s = d->locationparent->imp()->type()->attachToThisStatement(); mdoc.emitStatusBarText( s ); KigPainter p( w->screenInfo(), &w->curPix, mdoc.document() ); // set the text next to the arrow cursor - QPoint point = e->pos(); + TQPoint point = e->pos(); point.setX(point.x()+15); p.drawTextStd( point, s ); @@ -263,10 +263,10 @@ void TextLabelModeBase::cancelPressed() cancelConstruction(); } -static uint percentCount( const QString& s ) +static uint percentCount( const TQString& s ) { -// QRegExp re( QString::fromUtf8( "%[0-9]" ) ); - QRegExp re( QString::fromUtf8( "%[\\d]+" ) ); +// TQRegExp re( TQString::fromUtf8( "%[0-9]" ) ); + TQRegExp re( TQString::fromUtf8( "%[\\d]+" ) ); int offset = 0; uint percentcount = 0; while ( ( offset = re.search( s, offset ) ) != -1 ) @@ -280,7 +280,7 @@ static uint percentCount( const QString& s ) void TextLabelModeBase::finishPressed() { bool needframe = d->wiz->needFrameCheckBox->isChecked(); - QString s = d->wiz->labelTextInput->text(); + TQString s = d->wiz->labelTextInput->text(); assert( percentCount( s ) == d->args.size() ); if ( d->wiz->currentPage() == d->wiz->enter_text_page ) @@ -303,7 +303,7 @@ void TextLabelModeBase::finishPressed() void TextLabelModeBase::updateWiz() { - QString s = d->wiz->labelTextInput->text(); + TQString s = d->wiz->labelTextInput->text(); uint percentcount = percentCount( s ); if ( d->lpc > percentcount ) { @@ -344,9 +344,9 @@ void TextLabelModeBase::labelTextChanged() void TextLabelModeBase::updateLinksLabel() { LinksLabel::LinksLabelEditBuf buf = d->wiz->myCustomWidget1->startEdit(); - QString s = d->wiz->labelTextInput->text(); -// QRegExp re( "%[0-9]" ); - QRegExp re( "%[\\d]+" ); + TQString s = d->wiz->labelTextInput->text(); +// TQRegExp re( "%[0-9]" ); + TQRegExp re( "%[\\d]+" ); int prevpos = 0; int pos = 0; uint count = 0; @@ -361,12 +361,12 @@ void TextLabelModeBase::updateLinksLabel() // "link"... assert( prevpos < pos ); // fetch the text part... - QString subs = s.mid( prevpos, pos - prevpos ); + TQString subs = s.mid( prevpos, pos - prevpos ); // and add it... d->wiz->myCustomWidget1->addText( subs, buf ); }; // we always need a link part... - QString linktext( "%1" ); + TQString linktext( "%1" ); assert( count < d->args.size() ); if ( d->args[count] ) { @@ -428,7 +428,7 @@ void TextLabelModeBase::setCoordinate( const Coordinate& coord ) }; } -void TextLabelModeBase::setText( const QString& s ) +void TextLabelModeBase::setText( const TQString& s ) { d->wiz->labelTextInput->setText( s ); } @@ -450,7 +450,7 @@ TextLabelConstructionMode::~TextLabelConstructionMode() } void TextLabelConstructionMode::finish( - const Coordinate& coord, const QString& s, + const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, ObjectCalcer* locationparent ) { @@ -483,7 +483,7 @@ TextLabelRedefineMode::TextLabelRedefineMode( KigPart& d, ObjectTypeCalcer* labe bool frame = static_cast( firstthree[0]->imp() )->data() != 0; Coordinate coord = static_cast( firstthree[1]->imp() )->coordinate(); - QString text = static_cast( firstthree[2]->imp() )->data(); + TQString text = static_cast( firstthree[2]->imp() )->data(); // don't set it, let the user redefine it.. // setCoordinate( coord ); @@ -505,7 +505,7 @@ TextLabelRedefineMode::~TextLabelRedefineMode() } void TextLabelRedefineMode::finish( - const Coordinate& coord, const QString& s, + const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, ObjectCalcer* locationparent ) { diff --git a/kig/modes/label.h b/kig/modes/label.h index 4a3d09f7..1bb82f9a 100644 --- a/kig/modes/label.h +++ b/kig/modes/label.h @@ -61,7 +61,7 @@ protected: ~TextLabelModeBase(); void setCoordinate( const Coordinate& coord ); - void setText( const QString& s ); + void setText( const TQString& s ); void setLocationParent( ObjectCalcer* o ); /** * objects you pass here, should be newly created property objects, @@ -70,16 +70,16 @@ protected: void setPropertyObjects( const argvect& props ); void setFrame( bool f ); - virtual void finish( const Coordinate& c, const QString& s, + virtual void finish( const Coordinate& c, const TQString& s, const argvect& props, bool needframe, ObjectCalcer* locationparent ) = 0; private: // the KigMode interface.. - void leftClicked( QMouseEvent*, KigWidget* ); - void leftReleased( QMouseEvent*, KigWidget* ); + void leftClicked( TQMouseEvent*, KigWidget* ); + void leftReleased( TQMouseEvent*, KigWidget* ); - void mouseMoved( QMouseEvent*, KigWidget* ); + void mouseMoved( TQMouseEvent*, KigWidget* ); void enableActions(); @@ -109,7 +109,7 @@ public: TextLabelConstructionMode( KigPart& d ); ~TextLabelConstructionMode(); - void finish( const Coordinate& coord, const QString& s, + void finish( const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, ObjectCalcer* locationparent ); }; @@ -118,7 +118,7 @@ class TextLabelRedefineMode : public TextLabelModeBase { ObjectTypeCalcer* mlabel; - void finish( const Coordinate& coord, const QString& s, + void finish( const Coordinate& coord, const TQString& s, const argvect& props, bool needframe, ObjectCalcer* locationparent ); public: diff --git a/kig/modes/linkslabel.cpp b/kig/modes/linkslabel.cpp index 572c0bf8..96a73a8f 100644 --- a/kig/modes/linkslabel.cpp +++ b/kig/modes/linkslabel.cpp @@ -19,9 +19,9 @@ #include "linkslabel.h" #include "linkslabel.moc" -#include +#include #include -#include +#include #include #include @@ -33,27 +33,27 @@ using namespace std; class LinksLabel::Private { public: - QHBoxLayout* layout; - std::vector labels; + TQHBoxLayout* layout; + std::vector labels; std::vector urllabels; }; -LinksLabel::LinksLabel( QWidget* parent, const char* name ) - : QWidget( parent, name ) +LinksLabel::LinksLabel( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { p = new Private; - p->layout = new QHBoxLayout( this ); + p->layout = new TQHBoxLayout( this ); - QLabel* l = new QLabel( QString::fromUtf8( "Dit is een " ), this ); + TQLabel* l = new TQLabel( TQString::fromUtf8( "Dit is een " ), this ); p->labels.push_back( l ); p->layout->addWidget( l ); - KURLLabel* u = new KURLLabel( QString::fromUtf8( "http://www.kde.org/" ), - QString::fromUtf8( "url"), this ); + KURLLabel* u = new KURLLabel( TQString::fromUtf8( "http://www.kde.org/" ), + TQString::fromUtf8( "url"), this ); p->urllabels.push_back( u ); p->layout->addWidget( u ); - l = new QLabel( QString::fromUtf8( " !" ), this ); + l = new TQLabel( TQString::fromUtf8( " !" ), this ); p->labels.push_back( l ); p->layout->addWidget(l ); @@ -67,7 +67,7 @@ LinksLabel::~LinksLabel() void LinksLabel::urlClicked() { - const QObject* o = sender(); + const TQObject* o = sender(); std::vector::iterator i = std::find( p->urllabels.begin(), p->urllabels.end(), static_cast( o ) ); assert( i != p->urllabels.end() ); emit linkClicked( i - p->urllabels.begin() ); @@ -78,18 +78,18 @@ LinksLabel::LinksLabelEditBuf LinksLabel::startEdit() return LinksLabelEditBuf(); } -void LinksLabel::addText( const QString& s, LinksLabelEditBuf& buf ) +void LinksLabel::addText( const TQString& s, LinksLabelEditBuf& buf ) { - buf.data.push_back( std::pair( false, s ) ); + buf.data.push_back( std::pair( false, s ) ); } -void LinksLabel::addLink( const QString& s, LinksLabelEditBuf& buf ) +void LinksLabel::addLink( const TQString& s, LinksLabelEditBuf& buf ) { - buf.data.push_back( std::pair( true, s ) ); + buf.data.push_back( std::pair( true, s ) ); } namespace { - void deleteObj( QObject* o ) { delete o; } + void deleteObj( TQObject* o ) { delete o; } } void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) @@ -100,7 +100,7 @@ void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) p->labels.clear(); delete p->layout; - p->layout = new QHBoxLayout( this ); + p->layout = new TQHBoxLayout( this ); for ( LinksLabelEditBuf::vec::iterator i = buf.data.begin(); i != buf.data.end(); ++i ) { @@ -108,27 +108,27 @@ void LinksLabel::applyEdit( LinksLabelEditBuf& buf ) { // we need a KURLLabel... // the url is an unused stub... - KURLLabel* l = new KURLLabel( QString::fromUtf8( "http://edu.kde.org/kig" ), + KURLLabel* l = new KURLLabel( TQString::fromUtf8( "http://edu.kde.org/kig" ), i->second, this ); p->urllabels.push_back( l ); p->layout->addWidget( l ); - connect( l, SIGNAL( leftClickedURL() ), SLOT( urlClicked() ) ); + connect( l, TQT_SIGNAL( leftClickedURL() ), TQT_SLOT( urlClicked() ) ); } else { // we need a normal label... - QLabel* l = new QLabel( i->second, this ); + TQLabel* l = new TQLabel( i->second, this ); p->labels.push_back( l ); p->layout->addWidget( l ); }; }; - QSpacerItem* spacer = new QSpacerItem( 40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); + TQSpacerItem* spacer = new TQSpacerItem( 40, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); p->layout->addItem( spacer ); p->layout->activate(); - std::for_each( p->urllabels.begin(), p->urllabels.end(), mem_fun( &QWidget::show ) ); - std::for_each( p->labels.begin(), p->labels.end(), mem_fun( &QWidget::show ) ); + std::for_each( p->urllabels.begin(), p->urllabels.end(), mem_fun( &TQWidget::show ) ); + std::for_each( p->labels.begin(), p->labels.end(), mem_fun( &TQWidget::show ) ); } diff --git a/kig/modes/linkslabel.h b/kig/modes/linkslabel.h index ba64dbc2..89d1c76e 100644 --- a/kig/modes/linkslabel.h +++ b/kig/modes/linkslabel.h @@ -18,7 +18,7 @@ #ifndef KIG_lINKS_LABEL_H #define KIG_lINKS_LABEL_H -#include +#include #include #include @@ -32,7 +32,7 @@ class LinksLabel : public QWidget Q_OBJECT public: - LinksLabel( QWidget* parent = 0, const char* name = 0 ); + LinksLabel( TQWidget* parent = 0, const char* name = 0 ); ~LinksLabel(); class LinksLabelEditBuf @@ -43,7 +43,7 @@ public: private: // declare these private so only LinksLabel can use them... LinksLabelEditBuf() {} - typedef std::vector > vec; + typedef std::vector > vec; vec data; }; @@ -55,11 +55,11 @@ public: /** * add a piece of normal text.. */ - void addText( const QString& s, LinksLabelEditBuf& buf ); + void addText( const TQString& s, LinksLabelEditBuf& buf ); /** * add a link... */ - void addLink( const QString& s, LinksLabelEditBuf& buf ); + void addLink( const TQString& s, LinksLabelEditBuf& buf ); /** * apply the changes... This clears the current contents and adds * the new data... diff --git a/kig/modes/macro.cc b/kig/modes/macro.cc index 879466dc..bc6f5dc5 100644 --- a/kig/modes/macro.cc +++ b/kig/modes/macro.cc @@ -161,7 +161,7 @@ void DefineMacroMode::macroNameChanged() ); } -void DefineMacroMode::dragRect( const QPoint& p, KigWidget& w ) +void DefineMacroMode::dragRect( const TQPoint& p, KigWidget& w ) { if ( mwizard->currentPage() == mwizard->mpname ) return; std::vector* objs = mwizard->currentPage() == mwizard->mpgiven ? &mgiven : &mfinal; @@ -186,7 +186,7 @@ void DefineMacroMode::dragRect( const QPoint& p, KigWidget& w ) updateNexts(); } -void DefineMacroMode::leftClickedObject( ObjectHolder* o, const QPoint&, +void DefineMacroMode::leftClickedObject( ObjectHolder* o, const TQPoint&, KigWidget& w, bool ) { if ( mwizard->currentPage() == mwizard->mpname ) return; @@ -204,7 +204,7 @@ void DefineMacroMode::leftClickedObject( ObjectHolder* o, const QPoint&, updateNexts(); } -void DefineMacroMode::mouseMoved( const std::vector& os, const QPoint& pt, KigWidget& w, bool ) +void DefineMacroMode::mouseMoved( const std::vector& os, const TQPoint& pt, KigWidget& w, bool ) { w.updateCurPix(); @@ -220,14 +220,14 @@ void DefineMacroMode::mouseMoved( const std::vector& os, const QP // and set statusbar text w.setCursor( KCursor::handCursor() ); - QString selectstat = os.front()->selectStatement(); + TQString selectstat = os.front()->selectStatement(); // statusbar text mdoc.emitStatusBarText( selectstat ); KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() ); // set the text next to the arrow cursor - QPoint point = pt; + TQPoint point = pt; point.setX(point.x()+15); p.drawTextStd( point, selectstat ); @@ -235,11 +235,11 @@ void DefineMacroMode::mouseMoved( const std::vector& os, const QP } } -void DefineMacroMode::rightClicked( const std::vector&, const QPoint&, KigWidget& ) +void DefineMacroMode::rightClicked( const std::vector&, const TQPoint&, KigWidget& ) { } -void DefineMacroMode::midClicked( const QPoint&, KigWidget& ) +void DefineMacroMode::midClicked( const TQPoint&, KigWidget& ) { } diff --git a/kig/modes/macro.h b/kig/modes/macro.h index 4bf8c43e..8725f0c8 100644 --- a/kig/modes/macro.h +++ b/kig/modes/macro.h @@ -20,7 +20,7 @@ #include "base_mode.h" -#include +#include class MacroWizard; @@ -31,12 +31,12 @@ public: DefineMacroMode( KigPart& ); ~DefineMacroMode(); - void dragRect( const QPoint& p, KigWidget& w ); - void leftClickedObject( ObjectHolder* o, const QPoint& p, + void dragRect( const TQPoint& p, KigWidget& w ); + void leftClickedObject( ObjectHolder* o, const TQPoint& p, KigWidget& w, bool ctrlOrShiftDown ); - void rightClicked( const std::vector& oco, const QPoint& p, KigWidget& w ); - void midClicked( const QPoint& p, KigWidget& w ); - void mouseMoved( const std::vector& os, const QPoint& p, KigWidget& w, bool shiftpressed ); + void rightClicked( const std::vector& oco, const TQPoint& p, KigWidget& w ); + void midClicked( const TQPoint& p, KigWidget& w ); + void mouseMoved( const std::vector& os, const TQPoint& p, KigWidget& w, bool shiftpressed ); // called by MacroWizard class void givenPageEntered(); @@ -57,7 +57,7 @@ protected: */ void abandonMacro(); - QPoint plc; + TQPoint plc; MacroWizard* mwizard; // we can't use a set for this because the order is important diff --git a/kig/modes/macrowizard.cc b/kig/modes/macrowizard.cc index e6315caf..662e3a0d 100644 --- a/kig/modes/macrowizard.cc +++ b/kig/modes/macrowizard.cc @@ -24,13 +24,13 @@ #include #include -MacroWizard::MacroWizard( QWidget* parent, DefineMacroMode* m ) +MacroWizard::MacroWizard( TQWidget* parent, DefineMacroMode* m ) : MacroWizardBase( parent, "Define Macro Wizard", false ), mmode( m ) { - connect( KLineEdit2, SIGNAL( textChanged( const QString& ) ), - this, SLOT( nameTextChanged( const QString& ) ) ); - connect( this, SIGNAL( helpClicked() ), this, - SLOT( slotHelpClicked() ) ); + connect( KLineEdit2, TQT_SIGNAL( textChanged( const TQString& ) ), + this, TQT_SLOT( nameTextChanged( const TQString& ) ) ); + connect( this, TQT_SIGNAL( helpClicked() ), this, + TQT_SLOT( slotHelpClicked() ) ); } MacroWizard::~MacroWizard() @@ -73,7 +73,7 @@ void MacroWizard::reject() mmode->cancelPressed(); } -void MacroWizard::nameTextChanged( const QString& ) +void MacroWizard::nameTextChanged( const TQString& ) { mmode->macroNameChanged(); } @@ -85,6 +85,6 @@ void MacroWizard::accept() void MacroWizard::slotHelpClicked() { - kapp->invokeHelp( QString::fromLatin1( "defining-macros"), - QString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::fromLatin1( "defining-macros"), + TQString::fromLatin1( "kig" ) ); } diff --git a/kig/modes/macrowizard.h b/kig/modes/macrowizard.h index dfce8b06..96318ec9 100644 --- a/kig/modes/macrowizard.h +++ b/kig/modes/macrowizard.h @@ -26,7 +26,7 @@ class MacroWizard : public MacroWizardBase { Q_OBJECT public: - MacroWizard( QWidget* parent, DefineMacroMode* m ); + MacroWizard( TQWidget* parent, DefineMacroMode* m ); ~MacroWizard(); void back(); @@ -34,7 +34,7 @@ public: void reject(); void accept(); private slots: - void nameTextChanged( const QString& ); + void nameTextChanged( const TQString& ); void slotHelpClicked(); private: DefineMacroMode* mmode; diff --git a/kig/modes/mode.cc b/kig/modes/mode.cc index 9d95b64d..76edc4f1 100644 --- a/kig/modes/mode.cc +++ b/kig/modes/mode.cc @@ -48,46 +48,46 @@ KigMode::KigMode( KigPart& d ) { } -void KigMode::leftClicked( QMouseEvent*, KigWidget* ) +void KigMode::leftClicked( TQMouseEvent*, KigWidget* ) { } -void KigMode::leftMouseMoved( QMouseEvent*, KigWidget* ) +void KigMode::leftMouseMoved( TQMouseEvent*, KigWidget* ) { } -void KigMode::leftReleased( QMouseEvent*, KigWidget* ) +void KigMode::leftReleased( TQMouseEvent*, KigWidget* ) { /* insist disabling the undo button to avoid crashes */ mdoc.action( "edit_undo" )->setEnabled( false ); mdoc.action( "edit_redo" )->setEnabled( false ); } -void KigMode::midClicked( QMouseEvent*, KigWidget* ) +void KigMode::midClicked( TQMouseEvent*, KigWidget* ) { } -void KigMode::midMouseMoved( QMouseEvent*, KigWidget* ) +void KigMode::midMouseMoved( TQMouseEvent*, KigWidget* ) { } -void KigMode::midReleased( QMouseEvent*, KigWidget* ) +void KigMode::midReleased( TQMouseEvent*, KigWidget* ) { } -void KigMode::rightClicked( QMouseEvent*, KigWidget* ) +void KigMode::rightClicked( TQMouseEvent*, KigWidget* ) { } -void KigMode::rightMouseMoved( QMouseEvent*, KigWidget* ) +void KigMode::rightMouseMoved( TQMouseEvent*, KigWidget* ) { } -void KigMode::rightReleased( QMouseEvent*, KigWidget* ) +void KigMode::rightReleased( TQMouseEvent*, KigWidget* ) { } -void KigMode::mouseMoved( QMouseEvent*, KigWidget* ) +void KigMode::mouseMoved( TQMouseEvent*, KigWidget* ) { } diff --git a/kig/modes/mode.h b/kig/modes/mode.h index 6f476072..9dede83b 100644 --- a/kig/modes/mode.h +++ b/kig/modes/mode.h @@ -21,7 +21,7 @@ #ifndef KIG_PART_MODE_H #define KIG_PART_MODE_H -#include +#include class KigDocument; class KigPart; @@ -41,23 +41,23 @@ public: virtual StdConstructionMode* toStdConstructionMode(); - virtual void leftClicked( QMouseEvent*, KigWidget* ); + virtual void leftClicked( TQMouseEvent*, KigWidget* ); /** * this means: mouse moved with left mouse button down (in case that * wasn't clear...) */ - virtual void leftMouseMoved( QMouseEvent*, KigWidget* ); - virtual void leftReleased( QMouseEvent*, KigWidget* ); - virtual void midClicked( QMouseEvent*, KigWidget* ); - virtual void midMouseMoved( QMouseEvent*, KigWidget* ); - virtual void midReleased( QMouseEvent*, KigWidget* ); - virtual void rightClicked( QMouseEvent*, KigWidget* ); - virtual void rightMouseMoved( QMouseEvent*, KigWidget* ); - virtual void rightReleased( QMouseEvent*, KigWidget* ); + virtual void leftMouseMoved( TQMouseEvent*, KigWidget* ); + virtual void leftReleased( TQMouseEvent*, KigWidget* ); + virtual void midClicked( TQMouseEvent*, KigWidget* ); + virtual void midMouseMoved( TQMouseEvent*, KigWidget* ); + virtual void midReleased( TQMouseEvent*, KigWidget* ); + virtual void rightClicked( TQMouseEvent*, KigWidget* ); + virtual void rightMouseMoved( TQMouseEvent*, KigWidget* ); + virtual void rightReleased( TQMouseEvent*, KigWidget* ); /** * mouse moved without any buttons down... */ - virtual void mouseMoved( QMouseEvent*, KigWidget* ); + virtual void mouseMoved( TQMouseEvent*, KigWidget* ); /** * actions: we enable the actions we want when our mode is made diff --git a/kig/modes/moving.cc b/kig/modes/moving.cc index e628a7ce..533b15d4 100644 --- a/kig/modes/moving.cc +++ b/kig/modes/moving.cc @@ -29,7 +29,7 @@ #include "../misc/calcpaths.h" #include "../misc/coordinate_system.h" -#include +#include #include #include @@ -65,7 +65,7 @@ void MovingModeBase::initScreen( const std::vector& in ) p2.drawObjects( drawableset.begin(), drawableset.end(), true ); } -void MovingModeBase::leftReleased( QMouseEvent*, KigWidget* v ) +void MovingModeBase::leftReleased( TQMouseEvent*, KigWidget* v ) { // clean up after ourselves: for ( std::vector::iterator i = mcalcable.begin(); @@ -81,7 +81,7 @@ void MovingModeBase::leftReleased( QMouseEvent*, KigWidget* v ) mdoc.doneMode( this ); } -void MovingModeBase::mouseMoved( QMouseEvent* e, KigWidget* v ) +void MovingModeBase::mouseMoved( TQMouseEvent* e, KigWidget* v ) { v->updateCurPix(); Coordinate c = v->fromScreen( e->pos() ); @@ -152,7 +152,7 @@ MovingMode::MovingMode( const std::vector& os, const Coordinate& void MovingMode::stopMove() { - QString text = d->emo.size() == 1 ? + TQString text = d->emo.size() == 1 ? d->emo[0]->imp()->type()->moveAStatement() : i18n( "Move %1 Objects" ).arg( d->emo.size() ); KigCommand* mc = new KigCommand( mdoc, text ); @@ -208,7 +208,7 @@ MovingModeBase::~MovingModeBase() { } -void MovingModeBase::leftMouseMoved( QMouseEvent* e, KigWidget* v ) +void MovingModeBase::leftMouseMoved( TQMouseEvent* e, KigWidget* v ) { mouseMoved( e, v ); } diff --git a/kig/modes/moving.h b/kig/modes/moving.h index 32828db3..7c27aa4e 100644 --- a/kig/modes/moving.h +++ b/kig/modes/moving.h @@ -66,9 +66,9 @@ protected: virtual void moveTo( const Coordinate& o, bool snaptogrid ) = 0; public: - void leftReleased( QMouseEvent*, KigWidget* ); - void leftMouseMoved( QMouseEvent*, KigWidget* ); - void mouseMoved( QMouseEvent*, KigWidget* ); + void leftReleased( TQMouseEvent*, KigWidget* ); + void leftMouseMoved( TQMouseEvent*, KigWidget* ); + void mouseMoved( TQMouseEvent*, KigWidget* ); }; class MovingMode diff --git a/kig/modes/normal.cc b/kig/modes/normal.cc index ecf5f5c1..1fa45d00 100644 --- a/kig/modes/normal.cc +++ b/kig/modes/normal.cc @@ -128,7 +128,7 @@ NormalMode::~NormalMode() { } -void NormalMode::dragRect( const QPoint& p, KigWidget& w ) +void NormalMode::dragRect( const TQPoint& p, KigWidget& w ) { DragRectMode d( p, mdoc, w ); mdoc.runMode( &d ); @@ -153,7 +153,7 @@ void NormalMode::dragRect( const QPoint& p, KigWidget& w ) w.updateWidget(); } -void NormalMode::dragObject( const std::vector& oco, const QPoint& pco, +void NormalMode::dragObject( const std::vector& oco, const TQPoint& pco, KigWidget& w, bool ctrlOrShiftDown ) { // first determine what to move... @@ -171,7 +171,7 @@ void NormalMode::dragObject( const std::vector& oco, const QPoint mdoc.runMode( &m ); } -void NormalMode::leftClickedObject( ObjectHolder* o, const QPoint&, +void NormalMode::leftClickedObject( ObjectHolder* o, const TQPoint&, KigWidget& w, bool ctrlOrShiftDown ) { KigPainter pter( w.screenInfo(), &w.stillPix, mdoc.document() ); @@ -202,7 +202,7 @@ void NormalMode::leftClickedObject( ObjectHolder* o, const QPoint&, w.updateWidget(); } -void NormalMode::midClicked( const QPoint& p, KigWidget& w ) +void NormalMode::midClicked( const TQPoint& p, KigWidget& w ) { ObjectHolder* pto = ObjectFactory::instance()->sensiblePoint( w.fromScreen( p ), mdoc.document(), w ); pto->calc( mdoc.document() ); @@ -215,11 +215,11 @@ void NormalMode::midClicked( const QPoint& p, KigWidget& w ) } void NormalMode::rightClicked( const std::vector& os, - const QPoint& plc, + const TQPoint& plc, KigWidget& w ) { // saving the current cursor position - QPoint pt = QCursor::pos(); + TQPoint pt = TQCursor::pos(); if( !os.empty() ) { ObjectHolder* o = 0; @@ -246,7 +246,7 @@ void NormalMode::rightClicked( const std::vector& os, } void NormalMode::mouseMoved( const std::vector& os, - const QPoint& plc, + const TQPoint& plc, KigWidget& w, bool ) { @@ -265,14 +265,14 @@ void NormalMode::mouseMoved( const std::vector& os, w.setCursor( KCursor::handCursor() ); int id = ObjectChooserPopup::getObjectFromList( plc, &w, os, false ); - QString stat = id == 0 ? os.front()->selectStatement() : i18n( "Which object?" ); + TQString stat = id == 0 ? os.front()->selectStatement() : i18n( "Which object?" ); // statusbar text mdoc.emitStatusBarText( stat ); KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() ); // set the text next to the arrow cursor - QPoint point = plc; + TQPoint point = plc; point.setX(point.x()+15); p.drawTextStd( point, stat ); diff --git a/kig/modes/normal.h b/kig/modes/normal.h index dd51c854..314b7e20 100644 --- a/kig/modes/normal.h +++ b/kig/modes/normal.h @@ -20,7 +20,7 @@ #include "base_mode.h" -#include +#include #include class NormalMode @@ -30,14 +30,14 @@ public: NormalMode( KigPart& ); ~NormalMode(); protected: - void dragRect( const QPoint& p, KigWidget& w ); - void dragObject( const std::vector& os, const QPoint& pointClickedOn, + void dragRect( const TQPoint& p, KigWidget& w ); + void dragObject( const std::vector& os, const TQPoint& pointClickedOn, KigWidget& w, bool ctrlOrShiftDown ); - void leftClickedObject( ObjectHolder* o, const QPoint& p, + void leftClickedObject( ObjectHolder* o, const TQPoint& p, KigWidget& w, bool ctrlOrShiftDown ); - void midClicked( const QPoint& p, KigWidget& w ); - void rightClicked( const std::vector& os, const QPoint& p, KigWidget& w ); - void mouseMoved( const std::vector& os, const QPoint& p, KigWidget& w, + void midClicked( const TQPoint& p, KigWidget& w ); + void rightClicked( const std::vector& os, const TQPoint& p, KigWidget& w ); + void mouseMoved( const std::vector& os, const TQPoint& p, KigWidget& w, bool shiftpressed ); void selectAll(); void deselectAll(); diff --git a/kig/modes/popup.cc b/kig/modes/popup.cc index b71d9896..489b4985 100644 --- a/kig/modes/popup.cc +++ b/kig/modes/popup.cc @@ -46,11 +46,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -184,21 +184,21 @@ NormalModePopupObjects::NormalModePopupObjects( KigPart& part, KigWidget& view, NormalMode& mode, const std::vector& objs, - const QPoint& plc ) + const TQPoint& plc ) : KPopupMenu( &view ), mplc( plc ), mpart( part ), mview( view ), mobjs( objs ), mmode( mode ), monlylabels( false ) { bool empty = objs.empty(); bool single = objs.size() == 1; - connect( this, SIGNAL( activated( int ) ), this, SLOT( toplevelMenuSlot( int ) ) ); + connect( this, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( toplevelMenuSlot( int ) ) ); - QString title; + TQString title; if ( empty ) title = i18n( "Kig Document" ); else if ( single ) { if ( !objs[0]->name().isNull() ) - title = QString::fromLatin1( "%1 %2" ).arg( objs[0]->imp()->type()->translatedName() ).arg( objs[0]->name() ); + title = TQString::fromLatin1( "%1 %2" ).arg( objs[0]->imp()->type()->translatedName() ).arg( objs[0]->name() ); else title = objs[0]->imp()->type()->translatedName(); } @@ -244,26 +244,26 @@ NormalModePopupObjects::NormalModePopupObjects( KigPart& part, #endif for ( uint i = 0; i < NumberOfMenus; ++i ) - mmenus[i] = new QPopupMenu( this ); - - connect( mmenus[TransformMenu], SIGNAL( activated( int ) ), - this, SLOT( transformMenuSlot( int ) ) ); - connect( mmenus[TestMenu], SIGNAL( activated( int ) ), - this, SLOT( testMenuSlot( int ) ) ); - connect( mmenus[ConstructMenu], SIGNAL( activated( int ) ), - this, SLOT( constructMenuSlot( int ) ) ); - connect( mmenus[StartMenu], SIGNAL( activated( int ) ), - this, SLOT( startMenuSlot( int ) ) ); - connect( mmenus[ShowMenu], SIGNAL( activated( int ) ), - this, SLOT( showMenuSlot( int ) ) ); - connect( mmenus[SetColorMenu], SIGNAL( activated( int ) ), - this, SLOT( setColorMenuSlot( int ) ) ); - connect( mmenus[SetSizeMenu], SIGNAL( activated( int ) ), - this, SLOT( setSizeMenuSlot( int ) ) ); - connect( mmenus[SetStyleMenu], SIGNAL( activated( int ) ), - this, SLOT( setStyleMenuSlot( int ) ) ); - connect( mmenus[SetCoordinateSystemMenu], SIGNAL( activated( int ) ), - this, SLOT( setCoordinateSystemMenuSlot( int ) ) ); + mmenus[i] = new TQPopupMenu( this ); + + connect( mmenus[TransformMenu], TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( transformMenuSlot( int ) ) ); + connect( mmenus[TestMenu], TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( testMenuSlot( int ) ) ); + connect( mmenus[ConstructMenu], TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( constructMenuSlot( int ) ) ); + connect( mmenus[StartMenu], TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( startMenuSlot( int ) ) ); + connect( mmenus[ShowMenu], TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( showMenuSlot( int ) ) ); + connect( mmenus[SetColorMenu], TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setColorMenuSlot( int ) ) ); + connect( mmenus[SetSizeMenu], TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setSizeMenuSlot( int ) ) ); + connect( mmenus[SetStyleMenu], TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setStyleMenuSlot( int ) ) ); + connect( mmenus[SetCoordinateSystemMenu], TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setCoordinateSystemMenuSlot( int ) ) ); for ( int i = 0; i <= NumberOfMenus; ++i ) { @@ -271,7 +271,7 @@ NormalModePopupObjects::NormalModePopupObjects( KigPart& part, for ( uint j = 0; j < mproviders.size(); ++j ) mproviders[j]->fillUpMenu( *this, i, nextfree ); }; - static const QString menunames[NumberOfMenus] = + static const TQString menunames[NumberOfMenus] = { i18n( "&Transform" ), i18n( "T&est" ), @@ -281,22 +281,22 @@ NormalModePopupObjects::NormalModePopupObjects( KigPart& part, i18n( "Set Co&lor" ), i18n( "Set &Pen Width" ), i18n( "Set St&yle" ), - QString::null, + TQString::null, i18n( "Set Coordinate S&ystem" ) }; - static const QString menuicons[NumberOfMenus] = + static const TQString menuicons[NumberOfMenus] = { "centralsymmetry", "test", - QString::null, + TQString::null, "launch", "kig_text", "color_fill", // "colorize", "sizer", "paintbrush", - QString::null, - QString::null + TQString::null, + TQString::null }; int index = 1; for ( int i = 0; i < NumberOfMenus; ++i ) @@ -307,8 +307,8 @@ NormalModePopupObjects::NormalModePopupObjects( KigPart& part, else { KIconLoader* l = part.instance()->iconLoader(); - QPixmap icon = l->loadIcon( menuicons[i], KIcon::Small, 22, KIcon::DefaultState, 0L, true ); - insertItem( QIconSet( icon ), menunames[i], mmenus[i], i, index++ ); + TQPixmap icon = l->loadIcon( menuicons[i], KIcon::Small, 22, KIcon::DefaultState, 0L, true ); + insertItem( TQIconSet( icon ), menunames[i], mmenus[i], i, index++ ); } }; } @@ -358,7 +358,7 @@ NormalModePopupObjects::~NormalModePopupObjects() delete_all ( mproviders.begin(), mproviders.end() ); } -static const QColor* colors[] = +static const TQColor* colors[] = { &Qt::blue, &Qt::black, @@ -369,7 +369,7 @@ static const QColor* colors[] = &Qt::yellow, &Qt::darkRed }; -static const int numberofcolors = sizeof( colors ) / sizeof( QColor* ); +static const int numberofcolors = sizeof( colors ) / sizeof( TQColor* ); void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, int menu, int& nextfree ) { @@ -397,15 +397,15 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in popup.addAction( menu, i18n( "&Show" ), nextfree+1 ); } nextfree += 2; - QPixmap p = l->loadIcon( "move", KIcon::Toolbar ); + TQPixmap p = l->loadIcon( "move", KIcon::Toolbar ); popup.addAction( menu, p, i18n( "&Move" ), nextfree++ ); p = l->loadIcon( "editdelete", KIcon::Toolbar ); popup.addAction( menu, p, i18n( "&Delete" ), nextfree++ ); } else if ( menu == NormalModePopupObjects::SetColorMenu ) { - QPixmap p( 50, 20 ); - for( const QColor** c = colors; c < colors + numberofcolors; ++c ) + TQPixmap p( 50, 20 ); + for( const TQColor** c = colors; c < colors + numberofcolors; ++c ) { p.fill( **c ); popup.addAction( menu, p, nextfree++ ); @@ -417,7 +417,7 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in bool point = true; bool samecolor = true; std::vector os = popup.objects(); - QColor color = os.front()->drawer()->color(); + TQColor color = os.front()->drawer()->color(); for ( std::vector::const_iterator i = os.begin(); i != os.end(); ++i ) { if ( ! (*i)->imp()->inherits( PointImp::stype() ) ) @@ -425,23 +425,23 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in if ( (*i)->drawer()->color() != color ) samecolor = false; }; if ( ! samecolor ) color = Qt::blue; - QPixmap p( point ? 20 : 50, 20 ); + TQPixmap p( point ? 20 : 50, 20 ); for ( int i = 1; i < 8; ++i ) { p.fill( popup.eraseColor() ); - QPainter ptr( &p ); - ptr.setPen( QPen( color, 1 ) ); - ptr.setBrush( QBrush( color, Qt::SolidPattern ) ); + TQPainter ptr( &p ); + ptr.setPen( TQPen( color, 1 ) ); + ptr.setBrush( TQBrush( color, Qt::SolidPattern ) ); if ( point ) { int size = 2*i; - QRect r( ( 20 - size ) / 2, ( 20 - size ) / 2, size, size ); + TQRect r( ( 20 - size ) / 2, ( 20 - size ) / 2, size, size ); ptr.drawEllipse( r ); } else { - ptr.setPen( QPen( color, -1 + 2*i ) ); - ptr.drawLine( QPoint( 0, 10 ), QPoint( 50, 10 ) ); + ptr.setPen( TQPen( color, -1 + 2*i ) ); + ptr.drawLine( TQPoint( 0, 10 ), TQPoint( 50, 10 ) ); }; ptr.end(); popup.addAction( menu, p, nextfree++ ); @@ -453,7 +453,7 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in int npoints = 0; int nothers = 0; std::vector os = popup.objects(); - QColor color = os.front()->drawer()->color(); + TQColor color = os.front()->drawer()->color(); for ( std::vector::const_iterator i = os.begin(); i != os.end(); ++i ) { if ( (*i)->imp()->inherits( PointImp::stype() ) ) @@ -467,7 +467,7 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in if ( point ) for ( int i = 0; i < 5; ++i ) { - QPixmap p( 20, 20 ); + TQPixmap p( 20, 20 ); p.fill( popup.eraseColor() ); ScreenInfo si( Rect( -1, -1, 2, 2 ), p.rect() ); KigPainter ptr( si, &p, popup.part().document(), false ); @@ -481,7 +481,7 @@ void BuiltinObjectActionsProvider::fillUpMenu( NormalModePopupObjects& popup, in Qt::PenStyle penstyles[] = {Qt::SolidLine, Qt::DashLine, Qt::DashDotLine, Qt::DashDotDotLine, Qt::DotLine}; for ( int i = 0; i < (int) ( sizeof( penstyles ) / sizeof( Qt::PenStyle ) ); ++i ) { - QPixmap p( 50, 20 ); + TQPixmap p( 50, 20 ); p.fill( popup.eraseColor() ); ScreenInfo si( Rect( -2.5, -1, 5, 2 ), p.rect() ); KigPainter ptr( si, &p, popup.part().document(), false ); @@ -518,7 +518,7 @@ static void addNameLabel( ObjectCalcer* object, ObjectCalcer* namecalcer, const object->imp()->inherits( CurveImp::stype() ) ) attachto = object; ObjectHolder* label = ObjectFactory::instance()->attachedLabel( - QString::fromLatin1( "%1" ), attachto, loc, namelabelneedsframe, args, doc.document() ); + TQString::fromLatin1( "%1" ), attachto, loc, namelabelneedsframe, args, doc.document() ); doc.addObject( label ); } @@ -534,12 +534,12 @@ bool NameObjectActionsProvider::executeAction( return false; } assert( os.size() == 1 ); - QString name = os[0]->name(); + TQString name = os[0]->name(); bool ok; - QRegExp re( ".*" ); - QRegExpValidator* rev = new QRegExpValidator( re, &doc ); - QString caption = i18n( "Set Object Name" ); - QString label = i18n( "Set Name of this Object:" ); + TQRegExp re( ".*" ); + TQRegExpValidator* rev = new TQRegExpValidator( re, &doc ); + TQString caption = i18n( "Set Object Name" ); + TQString label = i18n( "Set Name of this Object:" ); #if KDE_IS_VERSION( 3, 1, 90 ) name = KInputDialog::getText( caption, label, name, &ok, &w, 0, rev ); #else @@ -567,7 +567,7 @@ bool NameObjectActionsProvider::executeAction( // if we just added the name, we add a label to show it to the user. if ( justadded ) addNameLabel( os[0]->calcer(), namecalcer, -// w.fromScreen( w.mapFromGlobal( popup.mapToGlobal( QPoint( 5, 0 ) ) ) ), +// w.fromScreen( w.mapFromGlobal( popup.mapToGlobal( TQPoint( 5, 0 ) ) ) ), w.fromScreen( popup.plc() ), doc ); } @@ -589,7 +589,7 @@ bool NameObjectActionsProvider::executeAction( namecalcer = c; } addNameLabel( os[0]->calcer(), namecalcer, -// w.fromScreen( w.mapFromGlobal( popup.mapToGlobal( QPoint( 5, 0 ) ) ) ), doc ); +// w.fromScreen( w.mapFromGlobal( popup.mapToGlobal( TQPoint( 5, 0 ) ) ) ), doc ); w.fromScreen( popup.plc() ), doc ); return true; } @@ -623,8 +623,8 @@ bool BuiltinObjectActionsProvider::executeAction( case 2: { // move - QCursor::setPos( popup.mapToGlobal( QPoint( 0, 0 ) ) ); - QPoint p = w.mapFromGlobal( QCursor::pos() ); + TQCursor::setPos( popup.mapToGlobal( TQPoint( 0, 0 ) ) ); + TQPoint p = w.mapFromGlobal( TQCursor::pos() ); Coordinate c = w.fromScreen( p ); MovingMode m( os, c, w, doc ); doc.runMode( &m ); @@ -648,7 +648,7 @@ bool BuiltinObjectActionsProvider::executeAction( id -= numberofcolors + 1; return false; }; - QColor color; + TQColor color; if ( id < numberofcolors ) color = *colors[id]; else @@ -753,10 +753,10 @@ void ObjectConstructorActionsProvider::fillUpMenu( NormalModePopupObjects& popup }; if ( add ) { - QCString iconfile = (*i)->iconFileName(); + TQCString iconfile = (*i)->iconFileName(); if ( !iconfile.isEmpty() && !iconfile.isNull() ) { - QPixmap icon = popup.part().instance()->iconLoader()->loadIcon( iconfile, KIcon::Toolbar, 22, KIcon::DefaultState, 0L, true ); + TQPixmap icon = popup.part().instance()->iconLoader()->loadIcon( iconfile, KIcon::Toolbar, 22, KIcon::DefaultState, 0L, true ); popup.addAction( menu, icon, (*i)->descriptiveName(), nextfree++ ); } else @@ -794,9 +794,9 @@ bool ObjectConstructorActionsProvider::executeAction( return true; } -void NormalModePopupObjects::addAction( int menu, const QPixmap& pix, int id ) +void NormalModePopupObjects::addAction( int menu, const TQPixmap& pix, int id ) { - QPopupMenu* m = 0; + TQPopupMenu* m = 0; if ( menu == ToplevelMenu ) m = this; else m = mmenus[menu]; int ret = m->insertItem( pix, id ); @@ -825,20 +825,20 @@ void NormalModePopupObjects::setCoordinateSystemMenuSlot( int i ) activateAction( SetCoordinateSystemMenu, i ); } -void NormalModePopupObjects::addAction( int menu, const QPixmap& icon, const QString& name, int id ) +void NormalModePopupObjects::addAction( int menu, const TQPixmap& icon, const TQString& name, int id ) { - QPopupMenu* m = 0; + TQPopupMenu* m = 0; if ( menu == ToplevelMenu ) m = this; else m = mmenus[menu]; - int ret = m->insertItem( QIconSet( icon ), name, id ); + int ret = m->insertItem( TQIconSet( icon ), name, id ); assert( ret == id ); // pretend to use this var.. (void)ret; } -void NormalModePopupObjects::addAction( int menu, const QString& name, int id ) +void NormalModePopupObjects::addAction( int menu, const TQString& name, int id ) { - QPopupMenu* m = 0; + TQPopupMenu* m = 0; if ( menu == ToplevelMenu ) m = this; else m = mmenus[menu]; int ret = m->insertItem( name, id ); @@ -881,7 +881,7 @@ void PropertiesActionsProvider::fillUpMenu( NormalModePopupObjects& popup, { if ( iconfile && *iconfile ) { - QPixmap pix = popup.part().instance()->iconLoader()->loadIcon( iconfile, KIcon::Toolbar, 22, KIcon::DefaultState, 0L, true ); + TQPixmap pix = popup.part().instance()->iconLoader()->loadIcon( iconfile, KIcon::Toolbar, 22, KIcon::DefaultState, 0L, true ); popup.addAction( menu, pix, i18n( o->imp()->properties()[i] ), nextfree++ ); } else @@ -917,14 +917,14 @@ bool PropertiesActionsProvider::executeAction( args.back()->calc( doc.document() ); // TODO: recover the cursor position somehow... the following does not work // in general... -// Coordinate c = w.fromScreen( w.mapFromGlobal( popup.mapToGlobal( QPoint( 5, 0 ) ) ) ); +// Coordinate c = w.fromScreen( w.mapFromGlobal( popup.mapToGlobal( TQPoint( 5, 0 ) ) ) ); // mp: it seems that we have no idea where to position the label, // btw what's the meaning of (5,0)? let the // attach method decide what to do... (passing an invalidCoord) // /////// Coordinate c = Coordinate::invalidCoord(); Coordinate c = w.fromScreen( popup.plc() ); ObjectHolder* label = ObjectFactory::instance()->attachedLabel( - QString::fromLatin1( "%1" ), parent->calcer(), c, + TQString::fromLatin1( "%1" ), parent->calcer(), c, false, args, doc.document() ); doc.addObject( label ); } @@ -948,7 +948,7 @@ void ObjectTypeActionsProvider::fillUpMenu( if ( ! c ) return; const ObjectType* t = c->type(); - QStringList l = t->specialActions(); + TQStringList l = t->specialActions(); mnoa = l.count(); for ( int i = 0; i < mnoa; ++i ) popup.addAction( menu, l[i], nextfree++ ); @@ -986,7 +986,7 @@ void BuiltinDocumentActionsProvider::fillUpMenu( NormalModePopupObjects& popup, else if ( menu == NormalModePopupObjects::SetCoordinateSystemMenu ) { int idoffset = nextfree; - QStringList l = CoordinateSystemFactory::names(); + TQStringList l = CoordinateSystemFactory::names(); mnumberofcoordsystems = l.count(); for ( uint i = 0; i < l.count(); ++i ) popup.addAction( menu, l[i], nextfree++ ); @@ -1053,7 +1053,7 @@ void ScriptActionsProvider::fillUpMenu( NormalModePopupObjects& popup, int menu, if ( menu == NormalModePopupObjects::StartMenu ) { KIconLoader* l = popup.part().instance()->iconLoader(); - QPixmap p = l->loadIcon( ScriptType::icon( ScriptType::Python ), KIcon::Toolbar, 22, KIcon::DefaultState, 0L, true ); + TQPixmap p = l->loadIcon( ScriptType::icon( ScriptType::Python ), KIcon::Toolbar, 22, KIcon::DefaultState, 0L, true ); popup.addAction( menu, p, i18n( "Python Script" ), nextfree++ ); mns++; } @@ -1115,7 +1115,7 @@ bool ScriptActionsProvider::executeAction( } #endif -int ObjectChooserPopup::getObjectFromList( const QPoint& p, KigWidget* w, +int ObjectChooserPopup::getObjectFromList( const TQPoint& p, KigWidget* w, const std::vector& objs, bool givepopup ) { @@ -1153,7 +1153,7 @@ int ObjectChooserPopup::getObjectFromList( const QPoint& p, KigWidget* w, if ( givepopup ) { ObjectChooserPopup* ppp = new ObjectChooserPopup( p, *w, objs ); - ppp->exec( QCursor::pos() ); + ppp->exec( TQCursor::pos() ); id = ppp->mselected; @@ -1175,19 +1175,19 @@ int ObjectChooserPopup::getObjectFromList( const QPoint& p, KigWidget* w, return id; } -ObjectChooserPopup::ObjectChooserPopup( const QPoint& p, KigWidget& view, +ObjectChooserPopup::ObjectChooserPopup( const TQPoint& p, KigWidget& view, const std::vector& objs ) : KPopupMenu(), mplc( p ), mview( view ), mobjs( objs ), mselected( -1 ) { for ( uint i = 0; i < mobjs.size(); i++ ) { insertItem( !mobjs[i]->name().isEmpty() - ? QString::fromLatin1( "%1 %2" ).arg( mobjs[i]->imp()->type()->translatedName() ).arg( mobjs[i]->name() ) + ? TQString::fromLatin1( "%1 %2" ).arg( mobjs[i]->imp()->type()->translatedName() ).arg( mobjs[i]->name() ) : mobjs[i]->imp()->type()->translatedName(), i ); } - connect( this, SIGNAL( activated( int ) ), this, SLOT( actionActivatedSlot( int ) ) ); + connect( this, TQT_SIGNAL( activated( int ) ), this, TQT_SLOT( actionActivatedSlot( int ) ) ); } ObjectChooserPopup::~ObjectChooserPopup() diff --git a/kig/modes/popup.h b/kig/modes/popup.h index 405bcee6..76574b74 100644 --- a/kig/modes/popup.h +++ b/kig/modes/popup.h @@ -51,7 +51,7 @@ class NormalModePopupObjects public: NormalModePopupObjects( KigPart& part, KigWidget& view, NormalMode& mode, - const std::vector& objs, const QPoint& p ); + const std::vector& objs, const TQPoint& p ); ~NormalModePopupObjects(); // the different "menu's", the toplevel is considered as just @@ -61,9 +61,9 @@ public: SetCoordinateSystemMenu, NumberOfMenus }; // used by the PopupActionProvider's to add actions to us.. - void addAction( int menu, const QString& name, int id ); - void addAction( int menu, const QPixmap& icon, const QString& name, int id ); - void addAction( int menu, const QPixmap& pix, int id ); + void addAction( int menu, const TQString& name, int id ); + void addAction( int menu, const TQPixmap& icon, const TQString& name, int id ); + void addAction( int menu, const TQPixmap& pix, int id ); /** * set the checked state of the \p n 'th item in \p menu to \p checked .. @@ -73,7 +73,7 @@ public: std::vector objects() const { return mobjs; } KigPart& part() { return mpart; } KigWidget& widget() { return mview; } - QPoint plc() { return mplc; } + TQPoint plc() { return mplc; } bool onlyLabels() const { return monlylabels; } @@ -93,7 +93,7 @@ private slots: void setCoordinateSystemMenuSlot( int ); protected: - QPoint mplc; + TQPoint mplc; KigPart& mpart; KigWidget& mview; std::vector mobjs; @@ -101,7 +101,7 @@ protected: std::vector mproviders; - QPopupMenu* mmenus[NumberOfMenus]; + TQPopupMenu* mmenus[NumberOfMenus]; private: bool monlylabels; @@ -130,12 +130,12 @@ public: * \return the index of the chosen element ( starting from 0 ), or -1 * if none was selected. */ - static int getObjectFromList( const QPoint& p, KigWidget* w, + static int getObjectFromList( const TQPoint& p, KigWidget* w, const std::vector& objs, bool givepopup = true ); protected: - ObjectChooserPopup( const QPoint& p, KigWidget& view, + ObjectChooserPopup( const TQPoint& p, KigWidget& view, const std::vector& objs ); ~ObjectChooserPopup(); @@ -143,7 +143,7 @@ protected slots: void actionActivatedSlot( int ); protected: - QPoint mplc; + TQPoint mplc; KigWidget& mview; std::vector mobjs; diff --git a/kig/modes/textlabelwizard.cc b/kig/modes/textlabelwizard.cc index 803ca819..d562bbf3 100644 --- a/kig/modes/textlabelwizard.cc +++ b/kig/modes/textlabelwizard.cc @@ -21,20 +21,20 @@ #include "label.h" #include "linkslabel.h" -#include +#include #include -#include +#include -TextLabelWizard::TextLabelWizard( QWidget* parent, TextLabelModeBase* mode ) +TextLabelWizard::TextLabelWizard( TQWidget* parent, TextLabelModeBase* mode ) : TextLabelWizardBase( parent, "TextLabelWizard", false ), mmode( mode ) { - connect( labelTextInput, SIGNAL( textChanged() ), - SLOT( textChanged() ) ); - connect( myCustomWidget1, SIGNAL( linkClicked( int ) ), - SLOT( linkClicked( int ) ) ); - connect( this, SIGNAL( helpClicked() ), - this, SLOT( slotHelpClicked() ) ); + connect( labelTextInput, TQT_SIGNAL( textChanged() ), + TQT_SLOT( textChanged() ) ); + connect( myCustomWidget1, TQT_SIGNAL( linkClicked( int ) ), + TQT_SLOT( linkClicked( int ) ) ); + connect( this, TQT_SIGNAL( helpClicked() ), + this, TQT_SLOT( slotHelpClicked() ) ); labelTextInput->setFocus(); } @@ -89,7 +89,7 @@ void TextLabelWizard::relayoutArgsPage() void TextLabelWizard::slotHelpClicked() { - kapp->invokeHelp( QString::fromLatin1( "text-labels" ), - QString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::fromLatin1( "text-labels" ), + TQString::fromLatin1( "kig" ) ); } diff --git a/kig/modes/textlabelwizard.h b/kig/modes/textlabelwizard.h index 787e0803..bd51c1e0 100644 --- a/kig/modes/textlabelwizard.h +++ b/kig/modes/textlabelwizard.h @@ -26,7 +26,7 @@ class TextLabelWizard : public TextLabelWizardBase { Q_OBJECT public: - TextLabelWizard( QWidget* parent, TextLabelModeBase* mode ); + TextLabelWizard( TQWidget* parent, TextLabelModeBase* mode ); ~TextLabelWizard(); void back(); diff --git a/kig/modes/typesdialog.cpp b/kig/modes/typesdialog.cpp index 67621c20..e14ceee8 100644 --- a/kig/modes/typesdialog.cpp +++ b/kig/modes/typesdialog.cpp @@ -35,10 +35,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -53,12 +53,12 @@ public: }; MacroListElement::MacroListElement( KListView* lv, Macro* m ) - : QListViewItem( lv, QString::null, m->action->descriptiveName(), m->action->description() ), + : TQListViewItem( lv, TQString::null, m->action->descriptiveName(), m->action->description() ), macro( m ) { } -TypesDialog::TypesDialog( QWidget* parent, KigPart& part ) +TypesDialog::TypesDialog( TQWidget* parent, KigPart& part ) : TypesDialogBase( parent, "types_dialog", true ), mpart( part ) { // improving GUI look'n'feel... @@ -66,10 +66,10 @@ TypesDialog::TypesDialog( QWidget* parent, KigPart& part ) buttonOk->setGuiItem( KStdGuiItem::ok() ); buttonCancel->setGuiItem( KStdGuiItem::cancel() ); il = part.instance()->iconLoader(); - buttonEdit->setIconSet( QIconSet( il->loadIcon( "edit", KIcon::Small ) ) ); - buttonRemove->setIconSet( QIconSet( il->loadIcon( "editdelete", KIcon::Small ) ) ); - buttonExport->setIconSet( QIconSet( il->loadIcon( "fileexport", KIcon::Small ) ) ); - buttonImport->setIconSet( QIconSet( il->loadIcon( "fileimport", KIcon::Small ) ) ); + buttonEdit->setIconSet( TQIconSet( il->loadIcon( "edit", KIcon::Small ) ) ); + buttonRemove->setIconSet( TQIconSet( il->loadIcon( "editdelete", KIcon::Small ) ) ); + buttonExport->setIconSet( TQIconSet( il->loadIcon( "fileexport", KIcon::Small ) ) ); + buttonImport->setIconSet( TQIconSet( il->loadIcon( "fileimport", KIcon::Small ) ) ); typeList->setColumnWidth( 0, 22 ); typeList->setColumnWidth( 1, 140 ); @@ -78,23 +78,23 @@ TypesDialog::TypesDialog( QWidget* parent, KigPart& part ) // loading macros... loadAllMacros(); - popup = new QPopupMenu( this ); - popup->insertItem( SmallIcon( "edit" ), i18n( "&Edit..." ), this, SLOT( editType() ) ); - popup->insertItem( SmallIcon( "editdelete" ), i18n( "&Delete" ), this, SLOT( deleteType() ) ); + popup = new TQPopupMenu( this ); + popup->insertItem( SmallIcon( "edit" ), i18n( "&Edit..." ), this, TQT_SLOT( editType() ) ); + popup->insertItem( SmallIcon( "editdelete" ), i18n( "&Delete" ), this, TQT_SLOT( deleteType() ) ); popup->insertSeparator(); - popup->insertItem( SmallIcon( "fileexport" ), i18n( "E&xport..." ), this, SLOT( exportType() ) ); + popup->insertItem( SmallIcon( "fileexport" ), i18n( "E&xport..." ), this, TQT_SLOT( exportType() ) ); // saving types part.saveTypes(); } -QListViewItem* TypesDialog::newListItem( Macro* m ) +TQListViewItem* TypesDialog::newListItem( Macro* m ) { MacroListElement* e = new MacroListElement( typeList, m ); - QCString ifn = m->action->iconFileName(); + TQCString ifn = m->action->iconFileName(); if ( !ifn.isNull() ) { - QPixmap p = il->loadIcon( ifn, KIcon::Small ); + TQPixmap p = il->loadIcon( ifn, KIcon::Small ); e->setPixmap( 0, p ); } return e; @@ -106,8 +106,8 @@ TypesDialog::~TypesDialog() void TypesDialog::helpSlot() { - kapp->invokeHelp( QString::fromLatin1( "working-with-types" ), - QString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::fromLatin1( "working-with-types" ), + TQString::fromLatin1( "kig" ) ); } void TypesDialog::okSlot() @@ -120,9 +120,9 @@ void TypesDialog::okSlot() void TypesDialog::deleteType() { - std::vector items; + std::vector items; std::vector selectedTypes; - QListViewItemIterator it( typeList ); + TQListViewItemIterator it( typeList ); while ( it.current() ) { if ( ( it.current() )->isSelected() ) { @@ -132,7 +132,7 @@ void TypesDialog::deleteType() ++it; } if (selectedTypes.empty()) return; - QStringList types; + TQStringList types; for ( std::vector::iterator j = selectedTypes.begin(); j != selectedTypes.end(); ++j ) types << ( *j )->action->descriptiveName(); @@ -142,7 +142,7 @@ void TypesDialog::deleteType() types, i18n("Are You Sure?"), KStdGuiItem::cont(), "deleteTypeWarning") == KMessageBox::Cancel ) return; - for ( std::vector::iterator i = items.begin(); i != items.end(); ++i) + for ( std::vector::iterator i = items.begin(); i != items.end(); ++i) { int appel = typeList->itemIndex(*i); assert (appel != -1); @@ -156,7 +156,7 @@ void TypesDialog::deleteType() void TypesDialog::exportType() { std::vector types; - QListViewItemIterator it( typeList ); + TQListViewItemIterator it( typeList ); while ( it.current() ) { if ( ( it.current() )->isSelected() ) { @@ -165,10 +165,10 @@ void TypesDialog::exportType() ++it; } if (types.empty()) return; - QString file_name = KFileDialog::getSaveFileName(":macro", i18n("*.kigt|Kig Types Files\n*|All Files"), this, i18n( "Export Types" ) ); + TQString file_name = KFileDialog::getSaveFileName(":macro", i18n("*.kigt|Kig Types Files\n*|All Files"), this, i18n( "Export Types" ) ); if ( file_name.isNull() ) return; - QFile fi( file_name ); + TQFile fi( file_name ); if ( fi.exists() ) if ( KMessageBox::warningContinueCancel( this, i18n( "The file \"%1\" already exists. " "Do you wish to overwrite it?" ).arg( fi.name() ), @@ -179,12 +179,12 @@ void TypesDialog::exportType() void TypesDialog::importTypes() { - QStringList file_names = + TQStringList file_names = KFileDialog::getOpenFileNames(":importTypes", i18n("*.kigt|Kig Types Files\n*|All Files"), this, i18n( "Import Types" )); std::vector macros; - for ( QStringList::Iterator i = file_names.begin(); + for ( TQStringList::Iterator i = file_names.begin(); i != file_names.end(); ++i) { std::vector nmacros; @@ -199,9 +199,9 @@ void TypesDialog::importTypes() typeList->insertItem( newListItem( macros[i] ) ); } -QString TypesDialog::fetchIconFromListItem( QListViewItem* i ) +TQString TypesDialog::fetchIconFromListItem( TQListViewItem* i ) { - QListViewItemIterator it( typeList ); + TQListViewItemIterator it( typeList ); Macro* ai = static_cast( i )->getMacro(); while ( it.current() ) { if ( ( it.current() )->isSelected() ) @@ -219,8 +219,8 @@ QString TypesDialog::fetchIconFromListItem( QListViewItem* i ) void TypesDialog::editType() { - std::vector items; - QListViewItemIterator it( typeList ); + std::vector items; + TQListViewItemIterator it( typeList ); while ( it.current() ) { if ( ( it.current() )->isSelected() ) items.push_back( it.current() ); @@ -237,19 +237,19 @@ void TypesDialog::editType() i18n( "More Than One Type Selected" ) ); return; } - QListViewItem* i = items[0]; + TQListViewItem* i = items[0]; EditType* d = new EditType( this, i->text( 1 ), i->text( 2 ), fetchIconFromListItem( i ) ); if ( d->exec() ) { - QString newname = d->name(); - QString newdesc = d->description(); - QString newicon = d->icon(); + TQString newname = d->name(); + TQString newdesc = d->description(); + TQString newicon = d->icon(); Macro* oldmacro = static_cast( i )->getMacro(); // mpart.unplugActionLists(); oldmacro->ctor->setName( newname ); oldmacro->ctor->setDescription( newdesc ); - QCString ncicon( newicon.utf8() ); + TQCString ncicon( newicon.utf8() ); oldmacro->ctor->setIcon( ncicon ); // mpart.plugActionLists(); @@ -260,7 +260,7 @@ void TypesDialog::editType() delete d; } -void TypesDialog::contextMenuRequested( QListViewItem*, const QPoint& p, int ) +void TypesDialog::contextMenuRequested( TQListViewItem*, const TQPoint& p, int ) { popup->exec( p ); } diff --git a/kig/modes/typesdialog.h b/kig/modes/typesdialog.h index 6f0e4702..2e914bcd 100644 --- a/kig/modes/typesdialog.h +++ b/kig/modes/typesdialog.h @@ -25,7 +25,7 @@ #include "../misc/lists.h" -#include +#include #include #include @@ -43,9 +43,9 @@ class TypesDialog : public TypesDialogBase // necessary because some MacroList functions need it.. KigPart& mpart; const KIconLoader* il; - QPopupMenu* popup; + TQPopupMenu* popup; public: - TypesDialog( QWidget* parent, KigPart& ); + TypesDialog( TQWidget* parent, KigPart& ); ~TypesDialog(); public slots: @@ -58,11 +58,11 @@ protected slots: void exportType(); void importTypes(); void editType(); - void contextMenuRequested( QListViewItem* i, const QPoint& p, int c ); + void contextMenuRequested( TQListViewItem* i, const TQPoint& p, int c ); private: - QListViewItem* newListItem( Macro* m ); - QString fetchIconFromListItem( QListViewItem* i ); + TQListViewItem* newListItem( Macro* m ); + TQString fetchIconFromListItem( TQListViewItem* i ); void loadAllMacros(); typedef MacroList::vectype vec; }; diff --git a/kig/objects/angle_type.cc b/kig/objects/angle_type.cc index 89a17131..7b86411b 100644 --- a/kig/objects/angle_type.cc +++ b/kig/objects/angle_type.cc @@ -33,7 +33,7 @@ #include #include -#include +#include static const char* constructanglethroughpoint = I18N_NOOP( "Construct an angle through this point" ); @@ -97,9 +97,9 @@ const ObjectImpType* AngleType::resultId() const return AngleImp::stype(); } -QStringList AngleType::specialActions() const +TQStringList AngleType::specialActions() const { - QStringList ret; + TQStringList ret; ret << i18n( "Set Si&ze" ); return ret; } diff --git a/kig/objects/angle_type.h b/kig/objects/angle_type.h index 796143b4..e885bdbe 100644 --- a/kig/objects/angle_type.h +++ b/kig/objects/angle_type.h @@ -31,7 +31,7 @@ public: ObjectImp* calc( const Args& args, const KigDocument& ) const; const ObjectImpType* resultId() const; - QStringList specialActions() const; + TQStringList specialActions() const; void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& c, KigPart& d, KigWidget& w, NormalMode& m ) const; }; diff --git a/kig/objects/arc_type.cc b/kig/objects/arc_type.cc index f6c660f2..59d38054 100644 --- a/kig/objects/arc_type.cc +++ b/kig/objects/arc_type.cc @@ -36,7 +36,7 @@ using std::find; -#include +#include static const char constructarcstartingstat[] = I18N_NOOP( "Construct an arc starting at this point" ); diff --git a/kig/objects/bogus_imp.cc b/kig/objects/bogus_imp.cc index c1ed6526..b7b8f41e 100644 --- a/kig/objects/bogus_imp.cc +++ b/kig/objects/bogus_imp.cc @@ -17,8 +17,8 @@ #include "bogus_imp.h" -#include -#include +#include +#include #include #include "../misc/rect.h" @@ -52,7 +52,7 @@ IntImp::IntImp( const int d ) { } -StringImp::StringImp( const QString& d ) +StringImp::StringImp( const TQString& d ) : mdata( d ) { } @@ -86,22 +86,22 @@ InvalidImp::InvalidImp() { } -void InvalidImp::fillInNextEscape( QString& s, const KigDocument& ) const +void InvalidImp::fillInNextEscape( TQString& s, const KigDocument& ) const { s = s.arg( "[invalid]" ); } -void DoubleImp::fillInNextEscape( QString& s, const KigDocument& ) const +void DoubleImp::fillInNextEscape( TQString& s, const KigDocument& ) const { s = s.arg( mdata ); } -void IntImp::fillInNextEscape( QString& s, const KigDocument& ) const +void IntImp::fillInNextEscape( TQString& s, const KigDocument& ) const { s = s.arg( mdata ); } -void StringImp::fillInNextEscape( QString& s, const KigDocument& ) const +void StringImp::fillInNextEscape( TQString& s, const KigDocument& ) const { s = s.arg( mdata ); } @@ -300,7 +300,7 @@ const ObjectImpType* TestResultImp::stype() } -TestResultImp::TestResultImp( const QString& s ) +TestResultImp::TestResultImp( const TQString& s ) : mdata( s ) { } diff --git a/kig/objects/bogus_imp.h b/kig/objects/bogus_imp.h index 8e9386a8..c8f3ee2b 100644 --- a/kig/objects/bogus_imp.h +++ b/kig/objects/bogus_imp.h @@ -22,7 +22,7 @@ #include "../misc/object_hierarchy.h" #include "../misc/kigtransform.h" -#include +#include /** * This is the base class for the so-called BogusImp's. These @@ -78,7 +78,7 @@ public: void visit( ObjectImpVisitor* vtor ) const; bool canFillInNextEscape() const; - void fillInNextEscape( QString& s, const KigDocument& ) const; + void fillInNextEscape( TQString& s, const KigDocument& ) const; bool equals( const ObjectImp& rhs ) const; }; @@ -117,7 +117,7 @@ public: void visit( ObjectImpVisitor* vtor ) const; bool canFillInNextEscape() const; - void fillInNextEscape( QString& s, const KigDocument& ) const; + void fillInNextEscape( TQString& s, const KigDocument& ) const; bool equals( const ObjectImp& rhs ) const; }; @@ -156,7 +156,7 @@ public: void visit( ObjectImpVisitor* vtor ) const; bool canFillInNextEscape() const; - void fillInNextEscape( QString& s, const KigDocument& ) const; + void fillInNextEscape( TQString& s, const KigDocument& ) const; bool equals( const ObjectImp& rhs ) const; }; @@ -167,7 +167,7 @@ public: class StringImp : public BogusImp { - QString mdata; + TQString mdata; public: /** * Returns the ObjectImpType representing the StringImp type.. @@ -178,16 +178,16 @@ public: /** * Construct a new StringImp containing the string d. */ - StringImp( const QString& d ); + StringImp( const TQString& d ); /** * Get hold of the contained data. */ - const QString& data() const { return mdata; } + const TQString& data() const { return mdata; } /** * Set the contained data. */ - void setData( const QString& s ) { mdata = s; } + void setData( const TQString& s ) { mdata = s; } StringImp* copy() const; @@ -195,7 +195,7 @@ public: void visit( ObjectImpVisitor* vtor ) const; bool canFillInNextEscape() const; - void fillInNextEscape( QString& s, const KigDocument& ) const; + void fillInNextEscape( TQString& s, const KigDocument& ) const; bool equals( const ObjectImp& rhs ) const; }; @@ -253,16 +253,16 @@ public: class TestResultImp : public BogusImp { - const QString mdata; + const TQString mdata; public: static const ObjectImpType* stype(); typedef BogusImp Parent; - TestResultImp( const QString& s ); + TestResultImp( const TQString& s ); TestResultImp* copy() const; - const QString& data() const { return mdata; } + const TQString& data() const { return mdata; } const ObjectImpType* type() const; void visit( ObjectImpVisitor* vtor ) const; diff --git a/kig/objects/circle_imp.cc b/kig/objects/circle_imp.cc index 13ceef93..38522c22 100644 --- a/kig/objects/circle_imp.cc +++ b/kig/objects/circle_imp.cc @@ -231,18 +231,18 @@ double CircleImp::circumference() const return 2 * M_PI * radius(); } -QString CircleImp::polarEquationString( const KigDocument& w ) const +TQString CircleImp::polarEquationString( const KigDocument& w ) const { - QString ret = i18n( "rho = %1 [centered at %2]" ); + TQString ret = i18n( "rho = %1 [centered at %2]" ); ConicPolarData data = polarData(); ret = ret.arg( data.pdimen, 0, 'g', 3 ); ret = ret.arg( w.coordinateSystem().fromScreen( data.focus1, w ) ); return ret; } -QString CircleImp::cartesianEquationString( const KigDocument& ) const +TQString CircleImp::cartesianEquationString( const KigDocument& ) const { - QString ret = i18n( "x² + y² + %1 x + %2 y + %3 = 0" ); + TQString ret = i18n( "x² + y² + %1 x + %2 y + %3 = 0" ); ConicCartesianData data = cartesianData(); ret = ret.arg( data.coeffs[3], 0, 'g', 3 ); ret = ret.arg( data.coeffs[4], 0, 'g', 3 ); @@ -250,9 +250,9 @@ QString CircleImp::cartesianEquationString( const KigDocument& ) const return ret; } -QString CircleImp::simplyCartesianEquationString( const KigDocument& ) const +TQString CircleImp::simplyCartesianEquationString( const KigDocument& ) const { - QString ret = i18n( "( x - %1 )² + ( y - %2 )² = %3" ); + TQString ret = i18n( "( x - %1 )² + ( y - %2 )² = %3" ); ret = ret.arg( mcenter.x, 0, 'g', 3 ); ret = ret.arg( mcenter.y, 0, 'g', 3 ); ret = ret.arg( mradius * mradius, 0, 'g', 3 ); diff --git a/kig/objects/circle_imp.h b/kig/objects/circle_imp.h index d38716a6..1ccede6a 100644 --- a/kig/objects/circle_imp.h +++ b/kig/objects/circle_imp.h @@ -107,17 +107,17 @@ public: * Return a string containing the cartesian equation of this circle. * This will be of the form "x^2 + y^2 + a x + b y + c = 0" */ - QString cartesianEquationString( const KigDocument& w ) const; + TQString cartesianEquationString( const KigDocument& w ) const; /** * Return a string containing the cartesian equation of this circle. * This will be of the form "( x - x0 )^2 + ( y - y0 )^2 = r^2" */ - QString simplyCartesianEquationString( const KigDocument& w ) const; + TQString simplyCartesianEquationString( const KigDocument& w ) const; /** * Return a string containing the polar equation of this circle. * This will be of the form "rho = r [centered at p]" */ - QString polarEquationString( const KigDocument& w ) const; + TQString polarEquationString( const KigDocument& w ) const; bool equals( const ObjectImp& rhs ) const; }; diff --git a/kig/objects/common.h b/kig/objects/common.h index a26a92cd..f876315f 100644 --- a/kig/objects/common.h +++ b/kig/objects/common.h @@ -20,9 +20,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include @@ -47,7 +47,7 @@ class ScreenInfo; class Transformation; typedef std::vector Args; -typedef QValueList QCStringList; +typedef TQValueList QCStringList; template void delete_all( T begin, T end ) diff --git a/kig/objects/conic_imp.cc b/kig/objects/conic_imp.cc index a65d8511..81331522 100644 --- a/kig/objects/conic_imp.cc +++ b/kig/objects/conic_imp.cc @@ -184,7 +184,7 @@ int ConicImp::conicType() const return 0; } -QString ConicImp::conicTypeString() const +TQString ConicImp::conicTypeString() const { switch (conicType()) { @@ -200,9 +200,9 @@ QString ConicImp::conicTypeString() const } } -QString ConicImp::cartesianEquationString( const KigDocument& ) const +TQString ConicImp::cartesianEquationString( const KigDocument& ) const { - QString ret = i18n( "%1 x² + %2 y² + %3 xy + %4 x + %5 y + %6 = 0" ); + TQString ret = i18n( "%1 x² + %2 y² + %3 xy + %4 x + %5 y + %6 = 0" ); ConicCartesianData data = cartesianData(); ret = ret.arg( data.coeffs[0], 0, 'g', 3 ); ret = ret.arg( data.coeffs[1], 0, 'g', 3 ); @@ -213,9 +213,9 @@ QString ConicImp::cartesianEquationString( const KigDocument& ) const return ret; } -QString ConicImp::polarEquationString( const KigDocument& w ) const +TQString ConicImp::polarEquationString( const KigDocument& w ) const { - QString ret = i18n( "rho = %1/(1 + %2 cos theta + %3 sin theta)\n [centered at %4]" ); + TQString ret = i18n( "rho = %1/(1 + %2 cos theta + %3 sin theta)\n [centered at %4]" ); const ConicPolarData data = polarData(); ret = ret.arg( data.pdimen, 0, 'g', 3 ); diff --git a/kig/objects/conic_imp.h b/kig/objects/conic_imp.h index 55ba65ca..29068a7b 100644 --- a/kig/objects/conic_imp.h +++ b/kig/objects/conic_imp.h @@ -82,18 +82,18 @@ public: /** * A string containing "Hyperbola", "Parabola" or "Ellipse". */ - virtual QString conicTypeString() const; + virtual TQString conicTypeString() const; /** * A string containing the cartesian equation of the conic. This * will be of the form "a x^2 + b y^2 + c xy + d x + e y + f = 0". */ - virtual QString cartesianEquationString( const KigDocument& w ) const; + virtual TQString cartesianEquationString( const KigDocument& w ) const; /** * A string containing the polar equation of the conic. This will * be of the form "rho = pdimen/(1 + ect cos( theta ) + est sin( * theta ) )\n [centered at p]" */ - virtual QString polarEquationString( const KigDocument& w ) const; + virtual TQString polarEquationString( const KigDocument& w ) const; /** * Return the cartesian representation of this conic. */ diff --git a/kig/objects/conic_types.cc b/kig/objects/conic_types.cc index 6e32f844..34396369 100644 --- a/kig/objects/conic_types.cc +++ b/kig/objects/conic_types.cc @@ -663,9 +663,9 @@ const ObjectImpType* ConicRadicalType::resultId() const return LineImp::stype(); } -QStringList ConicRadicalType::specialActions() const +TQStringList ConicRadicalType::specialActions() const { - QStringList ret; + TQStringList ret; ret << i18n( "Switch Radical Lines" ); return ret; } diff --git a/kig/objects/conic_types.h b/kig/objects/conic_types.h index e2a1881d..858ca057 100644 --- a/kig/objects/conic_types.h +++ b/kig/objects/conic_types.h @@ -175,7 +175,7 @@ public: static const ConicRadicalType* instance(); ObjectImp* calc( const Args& parents, const KigDocument& ) const; const ObjectImpType* resultId() const; - QStringList specialActions() const; + TQStringList specialActions() const; void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& t, KigPart& d, KigWidget& w, NormalMode& m ) const; }; diff --git a/kig/objects/cubic_imp.cc b/kig/objects/cubic_imp.cc index 51bb5d9f..3879c5d9 100644 --- a/kig/objects/cubic_imp.cc +++ b/kig/objects/cubic_imp.cc @@ -406,7 +406,7 @@ Rect CubicImp::surroundingRect() const return Rect::invalidRect(); } -QString CubicImp::cartesianEquationString( const KigDocument& ) const +TQString CubicImp::cartesianEquationString( const KigDocument& ) const { /* * unfortunately QStrings.arg method is limited to %1, %9, so we cannot @@ -416,7 +416,7 @@ QString CubicImp::cartesianEquationString( const KigDocument& ) const * the equation (removal of zeros, avoid " ... + -1234 x ", etc.) */ - QString ret = i18n( "%6 x³ + %9 y³ + %7 x²y + %8 xy² + %5 y² + %3 x² + %4 xy + %1 x + %2 y" ); + TQString ret = i18n( "%6 x³ + %9 y³ + %7 x²y + %8 xy² + %5 y² + %3 x² + %4 xy + %1 x + %2 y" ); ret = ret.arg( mdata.coeffs[1], 0, 'g', 3 ); ret = ret.arg( mdata.coeffs[2], 0, 'g', 3 ); ret = ret.arg( mdata.coeffs[3], 0, 'g', 3 ); diff --git a/kig/objects/cubic_imp.h b/kig/objects/cubic_imp.h index bb7d89c7..5e9e6a2c 100644 --- a/kig/objects/cubic_imp.h +++ b/kig/objects/cubic_imp.h @@ -43,7 +43,7 @@ public: bool contains( const Coordinate& p, int width, const KigWidget& ) const; bool inRect( const Rect& r, int width, const KigWidget& ) const; Rect surroundingRect() const; - QString cartesianEquationString( const KigDocument& ) const; + TQString cartesianEquationString( const KigDocument& ) const; const uint numberOfProperties() const; const QCStringList properties() const; diff --git a/kig/objects/line_imp.cc b/kig/objects/line_imp.cc index 6f3c6002..a49078a1 100644 --- a/kig/objects/line_imp.cc +++ b/kig/objects/line_imp.cc @@ -174,7 +174,7 @@ double AbstractLineImp::slope() const return diff.y / diff.x; } -const QString AbstractLineImp::equationString() const +const TQString AbstractLineImp::equationString() const { Coordinate p = mdata.a; Coordinate q = mdata.b; @@ -182,9 +182,9 @@ const QString AbstractLineImp::equationString() const double m = ( q.y - p.y ) / ( q.x - p.x ); double r = - ( q.y - p.y ) * p.x / ( q.x - p.x ) + p.y; - QString ret = QString::fromUtf8( "y = %1x " ) + - QString::fromUtf8( r > 0 ? "+" : "-" ) + - QString::fromUtf8( " %2" ); + TQString ret = TQString::fromUtf8( "y = %1x " ) + + TQString::fromUtf8( r > 0 ? "+" : "-" ) + + TQString::fromUtf8( " %2" ); ret = ret.arg( m, 0, 'g', 3 ); ret = ret.arg( abs( r ), 0, 'g', 3 ); diff --git a/kig/objects/line_imp.h b/kig/objects/line_imp.h index c9014613..b12c045d 100644 --- a/kig/objects/line_imp.h +++ b/kig/objects/line_imp.h @@ -66,7 +66,7 @@ public: * Get a string containing the equation of this line in the form "y * = a * x + b ". */ - const QString equationString() const; + const TQString equationString() const; /** * Get the LineData for this AbstractLineImp. */ diff --git a/kig/objects/line_type.cc b/kig/objects/line_type.cc index a2c0734b..a02cc80b 100644 --- a/kig/objects/line_type.cc +++ b/kig/objects/line_type.cc @@ -29,7 +29,7 @@ #include "../misc/common.h" #include "../misc/calcpaths.h" -#include +#include #include @@ -218,9 +218,9 @@ const ObjectImpType* LineParallelLPType::resultId() const return LineImp::stype(); } -QStringList SegmentABType::specialActions() const +TQStringList SegmentABType::specialActions() const { - QStringList ret; + TQStringList ret; ret << i18n( "Set &Length..." ); return ret; } diff --git a/kig/objects/line_type.h b/kig/objects/line_type.h index a3ded322..69a7b3a8 100644 --- a/kig/objects/line_type.h +++ b/kig/objects/line_type.h @@ -33,7 +33,7 @@ public: ObjectImp* calc( const Coordinate& a, const Coordinate& b ) const; const ObjectImpType* resultId() const; - QStringList specialActions() const; + TQStringList specialActions() const; /** * execute the \p i 'th action from the specialActions above.. */ diff --git a/kig/objects/object_drawer.cc b/kig/objects/object_drawer.cc index 0989d4f2..f92fabe7 100644 --- a/kig/objects/object_drawer.cc +++ b/kig/objects/object_drawer.cc @@ -20,8 +20,8 @@ #include "object_imp.h" #include "../misc/kigpainter.h" -#include -#include +#include +#include #include #include @@ -33,7 +33,7 @@ void ObjectDrawer::draw( const ObjectImp& imp, KigPainter& p, bool sel ) const { p.setBrushStyle( Qt::NoBrush ); p.setBrushColor( sel ? Qt::red : ( mshown?mcolor:Qt::gray ) ); - p.setPen( QPen ( sel ? Qt::red : ( mshown?mcolor:Qt::gray ), 1) ); + p.setPen( TQPen ( sel ? Qt::red : ( mshown?mcolor:Qt::gray ), 1) ); p.setWidth( mwidth ); p.setStyle( mstyle ); p.setPointStyle( mpointstyle ); @@ -52,7 +52,7 @@ bool ObjectDrawer::shown( ) const return mshown; } -QColor ObjectDrawer::color() const +TQColor ObjectDrawer::color() const { return mcolor; } @@ -68,7 +68,7 @@ ObjectDrawer* ObjectDrawer::getCopyShown( bool s ) const return ret; } -ObjectDrawer* ObjectDrawer::getCopyColor( const QColor& c ) const +ObjectDrawer* ObjectDrawer::getCopyColor( const TQColor& c ) const { ObjectDrawer* ret = new ObjectDrawer; ret->mcolor = c; @@ -127,7 +127,7 @@ int ObjectDrawer::pointStyle() const return mpointstyle; } -ObjectDrawer::ObjectDrawer( const QColor& color, int width, bool shown, Qt::PenStyle style, int pointStyle ) +ObjectDrawer::ObjectDrawer( const TQColor& color, int width, bool shown, Qt::PenStyle style, int pointStyle ) : mcolor( color ), mshown( shown ), mwidth( width ), mstyle( style ), mpointstyle( pointStyle ) { } @@ -142,7 +142,7 @@ bool ObjectDrawer::inRect( const ObjectImp& imp, const Rect& r, const KigWidget& return mshown && imp.inRect( r, mwidth, w ); } -int ObjectDrawer::pointStyleFromString( const QString& style ) +int ObjectDrawer::pointStyleFromString( const TQString& style ) { if ( style == "Round" ) return 0; @@ -157,7 +157,7 @@ int ObjectDrawer::pointStyleFromString( const QString& style ) return 0; } -QString ObjectDrawer::pointStyleToString() const +TQString ObjectDrawer::pointStyleToString() const { if ( mpointstyle == 0 ) return "Round"; @@ -170,10 +170,10 @@ QString ObjectDrawer::pointStyleToString() const else if ( mpointstyle == 4 ) return "Cross"; assert( false ); - return QString::null; + return TQString::null; } -Qt::PenStyle ObjectDrawer::styleFromString( const QString& style ) +Qt::PenStyle ObjectDrawer::styleFromString( const TQString& style ) { if ( style == "SolidLine" ) return Qt::SolidLine; @@ -188,7 +188,7 @@ Qt::PenStyle ObjectDrawer::styleFromString( const QString& style ) else return Qt::SolidLine; } -QString ObjectDrawer::styleToString() const +TQString ObjectDrawer::styleToString() const { if ( mstyle == Qt::SolidLine ) return "SolidLine"; diff --git a/kig/objects/object_drawer.h b/kig/objects/object_drawer.h index 2781acdc..6206522e 100644 --- a/kig/objects/object_drawer.h +++ b/kig/objects/object_drawer.h @@ -18,8 +18,8 @@ #ifndef KIG_OBJECTS_OBJECT_DRAWER_H #define KIG_OBJECTS_OBJECT_DRAWER_H -#include -#include +#include +#include class ObjectImp; class KigPainter; @@ -45,7 +45,7 @@ class Rect; */ class ObjectDrawer { - QColor mcolor; + TQColor mcolor; bool mshown; int mwidth; Qt::PenStyle mstyle; @@ -57,7 +57,7 @@ public: * and pointstyle ( 0 ) */ ObjectDrawer(); - ObjectDrawer( const QColor& color, int width = -1, bool shown = true, Qt::PenStyle = Qt::SolidLine, int pointStyle = 0 ); + ObjectDrawer( const TQColor& color, int width = -1, bool shown = true, Qt::PenStyle = Qt::SolidLine, int pointStyle = 0 ); /** * Draw the object \p imp on kigpainter \p p . If \p selected is true, it is * drawn in red, otherwise in its normal color. @@ -83,7 +83,7 @@ public: /** * returns the color that the object will be drawn in */ - QColor color() const; + TQColor color() const; /** * return the width of the object */ @@ -99,11 +99,11 @@ public: /** * return pointStyle trasnformed in a string */ - QString pointStyleToString() const; + TQString pointStyleToString() const; /** * return style trasnformed in a string */ - QString styleToString() const; + TQString styleToString() const; /** * returns a new ObjectDrawer that is identical to this one.. except * that the shown state is set to \p s .. @@ -113,7 +113,7 @@ public: * returns a new ObjectDrawer that is identical to this one.. except * that the color is set to \p c .. */ - ObjectDrawer* getCopyColor( const QColor& c ) const; + ObjectDrawer* getCopyColor( const TQColor& c ) const; /** * returns a new ObjectDrawer that is identical to this one.. except * that the width is set to \p w .. @@ -134,13 +134,13 @@ public: * the given \p style string is unknown. In that case it returns a * default value. */ - static int pointStyleFromString( const QString& style ); + static int pointStyleFromString( const TQString& style ); /** * Note that this returns a valid style in every case, even if the * given \p style string is unknown. In that case it returns a default * value. */ - static Qt::PenStyle styleFromString( const QString& style ); + static Qt::PenStyle styleFromString( const TQString& style ); }; #endif diff --git a/kig/objects/object_factory.cc b/kig/objects/object_factory.cc index a54e01f0..f2957a7e 100644 --- a/kig/objects/object_factory.cc +++ b/kig/objects/object_factory.cc @@ -178,7 +178,7 @@ ObjectHolder* ObjectFactory::locus( ObjectCalcer* a, ObjectCalcer* b ) const } ObjectHolder* ObjectFactory::label( - const QString& s, const Coordinate& loc, + const TQString& s, const Coordinate& loc, bool needframe, const std::vector& parents, const KigDocument& doc ) const { @@ -186,7 +186,7 @@ ObjectHolder* ObjectFactory::label( } ObjectTypeCalcer* ObjectFactory::labelCalcer( - const QString& s, const Coordinate& loc, + const TQString& s, const Coordinate& loc, bool needframe, const std::vector& parents, const KigDocument& doc ) const { @@ -194,7 +194,7 @@ ObjectTypeCalcer* ObjectFactory::labelCalcer( } ObjectTypeCalcer* ObjectFactory::attachedLabelCalcer( - const QString& s, ObjectCalcer* p, + const TQString& s, ObjectCalcer* p, const Coordinate& loc, bool needframe, const std::vector& nparents, const KigDocument& doc ) const @@ -266,7 +266,7 @@ ObjectCalcer* ObjectFactory::getAttachPoint( } ObjectHolder* ObjectFactory::attachedLabel( - const QString& s, ObjectCalcer* locationparent, + const TQString& s, ObjectCalcer* locationparent, const Coordinate& loc, bool needframe, const std::vector& parents, const KigDocument& doc ) const diff --git a/kig/objects/object_factory.h b/kig/objects/object_factory.h index 0ce6ce62..30f080d9 100644 --- a/kig/objects/object_factory.h +++ b/kig/objects/object_factory.h @@ -98,11 +98,11 @@ public: * is calced already... */ ObjectHolder* label( - const QString& s, const Coordinate& loc, + const TQString& s, const Coordinate& loc, bool needframe, const std::vector& parents, const KigDocument& doc ) const; ObjectTypeCalcer* labelCalcer( - const QString& s, const Coordinate& loc, + const TQString& s, const Coordinate& loc, bool needframe, const std::vector& parents, const KigDocument& doc ) const; @@ -111,7 +111,7 @@ public: * attached to locationparent if it is non-null.. */ ObjectTypeCalcer* attachedLabelCalcer( - const QString& s, ObjectCalcer* locationparent, + const TQString& s, ObjectCalcer* locationparent, const Coordinate& loc, bool needframe, const std::vector& parents, const KigDocument& doc ) const; @@ -125,7 +125,7 @@ public: const Coordinate& loc, const KigDocument& doc ) const; ObjectHolder* attachedLabel( - const QString& s, ObjectCalcer* locationparent, + const TQString& s, ObjectCalcer* locationparent, const Coordinate& loc, bool needframe, const std::vector& parents, const KigDocument& doc ) const; diff --git a/kig/objects/object_holder.cc b/kig/objects/object_holder.cc index 5a2c0765..70e1100b 100644 --- a/kig/objects/object_holder.cc +++ b/kig/objects/object_holder.cc @@ -137,7 +137,7 @@ bool ObjectHolder::shown( ) const return mdrawer->shown( ); } -const QString ObjectHolder::name() const +const TQString ObjectHolder::name() const { if ( mnamecalcer ) { @@ -145,7 +145,7 @@ const QString ObjectHolder::name() const return static_cast( mnamecalcer->imp() )->data(); } else - return QString::null; + return TQString::null; } void ObjectHolder::setNameCalcer( ObjectConstCalcer* namecalcer ) @@ -154,9 +154,9 @@ void ObjectHolder::setNameCalcer( ObjectConstCalcer* namecalcer ) mnamecalcer = namecalcer; } -QString ObjectHolder::selectStatement() const +TQString ObjectHolder::selectStatement() const { - const QString n = name(); + const TQString n = name(); if ( n.isEmpty() ) return i18n( imp()->type()->selectStatement() ); else diff --git a/kig/objects/object_holder.h b/kig/objects/object_holder.h index 9b30453d..0afd3892 100644 --- a/kig/objects/object_holder.h +++ b/kig/objects/object_holder.h @@ -20,7 +20,7 @@ #include "object_calcer.h" -#include +#include /** * An ObjectHolder represents an object as it is known to the @@ -77,9 +77,9 @@ public: void setNameCalcer( ObjectConstCalcer* namecalcer ); /** - * returns QString::null if no name is set. + * returns TQString::null if no name is set. */ - const QString name() const; + const TQString name() const; /** * Set the ObjectDrawer of this ObjectHolder to \p d , the old * ObjectDrawer is deleted. @@ -139,7 +139,7 @@ public: * "select segment ab" depending on whether this ObjectHolder has a * name. */ - QString selectStatement() const; + TQString selectStatement() const; }; #endif diff --git a/kig/objects/object_imp.cc b/kig/objects/object_imp.cc index 6cb6650f..9a3ee679 100644 --- a/kig/objects/object_imp.cc +++ b/kig/objects/object_imp.cc @@ -27,7 +27,7 @@ class ObjectImpType::StaticPrivate { public: - std::map namemap; + std::map namemap; }; ObjectImp::ObjectImp() @@ -43,7 +43,7 @@ bool ObjectImp::valid() const return ! type()->inherits( InvalidImp::stype() ); } -void ObjectImp::fillInNextEscape( QString&, const KigDocument& ) const +void ObjectImp::fillInNextEscape( TQString&, const KigDocument& ) const { assert( false ); } @@ -215,7 +215,7 @@ const char* ObjectImpType::internalName() const return minternalname; } -QString ObjectImpType::translatedName() const +TQString ObjectImpType::translatedName() const { return i18n( mtranslatedname ); } @@ -230,25 +230,25 @@ const char* ObjectImpType::selectNameStatement() const return mselectnamestatement; } -QString ObjectImpType::removeAStatement() const +TQString ObjectImpType::removeAStatement() const { return i18n( mremoveastatement ); } -QString ObjectImpType::addAStatement() const +TQString ObjectImpType::addAStatement() const { return i18n( maddastatement ); } -QString ObjectImpType::moveAStatement() const +TQString ObjectImpType::moveAStatement() const { return i18n( mmoveastatement ); } const ObjectImpType* ObjectImpType::typeFromInternalName( const char* string ) { - QCString s( string ); - std::map::iterator i = sd()->namemap.find( s ); + TQCString s( string ); + std::map::iterator i = sd()->namemap.find( s ); if ( i == sd()->namemap.end() ) return 0; else return i->second; @@ -286,17 +286,17 @@ bool ObjectImp::isCache() const return false; } -QString ObjectImpType::attachToThisStatement() const +TQString ObjectImpType::attachToThisStatement() const { return i18n( mattachtothisstatement ); } -QString ObjectImpType::showAStatement() const +TQString ObjectImpType::showAStatement() const { return i18n( mshowastatement ); } -QString ObjectImpType::hideAStatement() const +TQString ObjectImpType::hideAStatement() const { return i18n( mhideastatement ); } diff --git a/kig/objects/object_imp.h b/kig/objects/object_imp.h index 2c032f99..eaf29328 100644 --- a/kig/objects/object_imp.h +++ b/kig/objects/object_imp.h @@ -158,7 +158,7 @@ public: /** * The name of this type, translated to the currently used language. */ - QString translatedName() const; + TQString translatedName() const; /** * Returns a translatable string of the form "Select this %1". * E.g. "Select this segment". Note that users of this function @@ -178,35 +178,35 @@ public: * Returns a translated string of the form "Remove a xxx". * E.g. "Remove a Segment". */ - QString removeAStatement() const; + TQString removeAStatement() const; /** * Returns a translated string of the form "Add a xxx". * E.g. "Add a Segment". */ - QString addAStatement() const; + TQString addAStatement() const; /** * Returns a translated string of the form "Move a xxx". * E.g. "Move a Segment". */ - QString moveAStatement() const; + TQString moveAStatement() const; /** * Returns a translated string of the form "Attach to this xxx". * E.g. "Attach to this segment". * \internal This is used by the text label construction mode */ - QString attachToThisStatement() const; + TQString attachToThisStatement() const; /** * Returns a translated string of the form "Show a xxx". * E.g. "Show a Segment". */ - QString showAStatement() const; + TQString showAStatement() const; /** * Returns a translated string of the form "Hide a xxx". * E.g. "Hide a Segment". */ - QString hideAStatement() const; + TQString hideAStatement() const; }; /** @@ -328,7 +328,7 @@ public: // s is a string with at least one escape ( "%N" where N is a // number ) somewhere. This function replaces the first escape it - // sees with the "value" of this imp ( using the QString::arg + // sees with the "value" of this imp ( using the TQString::arg // functions ). This is e.g. used by TextType to turn its variable // args into strings.. // if you implement this, then you should return true in @@ -336,7 +336,7 @@ public: // override fillInNextEscape() ( standard implementation does an // assert( false ) ).. virtual bool canFillInNextEscape() const; - virtual void fillInNextEscape( QString& s, const KigDocument& ) const; + virtual void fillInNextEscape( TQString& s, const KigDocument& ) const; /** * Returns true if this ObjectImp is equal to rhs. diff --git a/kig/objects/object_imp_factory.cc b/kig/objects/object_imp_factory.cc index bfeb1358..65cd9c94 100644 --- a/kig/objects/object_imp_factory.cc +++ b/kig/objects/object_imp_factory.cc @@ -30,7 +30,7 @@ #include "../misc/coordinate.h" -#include +#include #include @@ -48,94 +48,94 @@ ObjectImpFactory::~ObjectImpFactory() { } -static void addXYElements( const Coordinate& c, QDomElement& parent, QDomDocument& doc ) +static void addXYElements( const Coordinate& c, TQDomElement& parent, TQDomDocument& doc ) { - QDomElement xe = doc.createElement( "x" ); + TQDomElement xe = doc.createElement( "x" ); xe.appendChild( doc.createTextNode( - QString::number( c.x ) ) ); + TQString::number( c.x ) ) ); parent.appendChild( xe ); - QDomElement ye = doc.createElement( "y" ); + TQDomElement ye = doc.createElement( "y" ); ye.appendChild( doc.createTextNode( - QString::number( c.y ) ) ); + TQString::number( c.y ) ) ); parent.appendChild( ye ); } -static void addDoubleElement( const char* name, double d, QDomElement& parent, QDomDocument& doc ) +static void addDoubleElement( const char* name, double d, TQDomElement& parent, TQDomDocument& doc ) { - QDomElement e = doc.createElement( name ); - e.appendChild( doc.createTextNode( QString::number( d ) ) ); + TQDomElement e = doc.createElement( name ); + e.appendChild( doc.createTextNode( TQString::number( d ) ) ); parent.appendChild( e ); } -static void addCoordinateElement( const char* name, const Coordinate& d, QDomElement& p, QDomDocument& doc ) +static void addCoordinateElement( const char* name, const Coordinate& d, TQDomElement& p, TQDomDocument& doc ) { - QDomElement e = doc.createElement( name ); + TQDomElement e = doc.createElement( name ); addXYElements( d, e, doc ); p.appendChild( e ); } -QString ObjectImpFactory::serialize( const ObjectImp& d, QDomElement& parent, - QDomDocument& doc ) const +TQString ObjectImpFactory::serialize( const ObjectImp& d, TQDomElement& parent, + TQDomDocument& doc ) const { if( d.inherits( IntImp::stype() ) ) { parent.appendChild( doc.createTextNode( - QString::number( static_cast( d ).data() ) ) ); - return QString::fromLatin1( "int" ); + TQString::number( static_cast( d ).data() ) ) ); + return TQString::fromLatin1( "int" ); } else if ( d.inherits( DoubleImp::stype() ) ) { parent.appendChild( doc.createTextNode( - QString::number( static_cast( d ).data() ) ) ); - return QString::fromLatin1( "double" ); + TQString::number( static_cast( d ).data() ) ) ); + return TQString::fromLatin1( "double" ); } else if( d.inherits( StringImp::stype() ) ) { parent.appendChild( doc.createTextNode( static_cast( d ).data() ) ); - return QString::fromLatin1( "string" ); + return TQString::fromLatin1( "string" ); } else if ( d.inherits( TestResultImp::stype() ) ) { parent.appendChild( doc.createTextNode( static_cast( d ).data() ) ); - return QString::fromLatin1( "testresult" ); + return TQString::fromLatin1( "testresult" ); } else if( d.inherits( HierarchyImp::stype() ) ) { static_cast( d ).data().serialize( parent, doc ); - return QString::fromLatin1( "hierarchy" ); + return TQString::fromLatin1( "hierarchy" ); } else if ( d.inherits( TransformationImp::stype() ) ) { const Transformation& trans = static_cast( d ).data(); - QDomElement matrixe = doc.createElement( "matrix" ); + TQDomElement matrixe = doc.createElement( "matrix" ); for ( int i = 0; i < 3; ++i ) { for ( int j = 0; j < 3; ++j ) { - QDomElement elel = doc.createElement( "element" ); - elel.setAttribute( "row", QString::number( i ) ); - elel.setAttribute( "column", QString::number( j ) ); - elel.appendChild( doc.createTextNode( QString::number( trans.data( i, j ) ) ) ); + TQDomElement elel = doc.createElement( "element" ); + elel.setAttribute( "row", TQString::number( i ) ); + elel.setAttribute( "column", TQString::number( j ) ); + elel.appendChild( doc.createTextNode( TQString::number( trans.data( i, j ) ) ) ); matrixe.appendChild( elel ); }; } parent.appendChild( matrixe ); - QDomElement homothetye = doc.createElement( "homothetic" ); + TQDomElement homothetye = doc.createElement( "homothetic" ); const char* ishomothety = trans.isHomothetic() ? "true" : "false"; homothetye.appendChild( doc.createTextNode( ishomothety ) ); parent.appendChild( homothetye ); - return QString::fromLatin1( "transformation" ); + return TQString::fromLatin1( "transformation" ); } else if( d.inherits( AbstractLineImp::stype() ) ) { @@ -143,28 +143,28 @@ QString ObjectImpFactory::serialize( const ObjectImp& d, QDomElement& parent, addCoordinateElement( "a", l.a, parent, doc ); addCoordinateElement( "b", l.b, parent, doc ); if( d.inherits( SegmentImp::stype() ) ) - return QString::fromLatin1( "segment" ); + return TQString::fromLatin1( "segment" ); else if( d.inherits( RayImp::stype() ) ) - return QString::fromLatin1( "ray" ); - else return QString::fromLatin1( "line" ); + return TQString::fromLatin1( "ray" ); + else return TQString::fromLatin1( "line" ); } else if( d.inherits( PointImp::stype() ) ) { addXYElements( static_cast( d ).coordinate(), parent, doc ); - return QString::fromLatin1( "point" ); + return TQString::fromLatin1( "point" ); } else if( d.inherits( TextImp::stype() ) ) { - QString text = static_cast( d ).text(); + TQString text = static_cast( d ).text(); parent.appendChild( doc.createTextNode( text ) ); - return QString::fromLatin1( "text" ); + return TQString::fromLatin1( "text" ); } else if( d.inherits( AngleImp::stype() ) ) { addDoubleElement( "size", static_cast( d ).size(), parent, doc ); - return QString::fromLatin1( "angle" ); + return TQString::fromLatin1( "angle" ); } else if ( d.inherits( ArcImp::stype() ) ) { @@ -173,38 +173,38 @@ QString ObjectImpFactory::serialize( const ObjectImp& d, QDomElement& parent, addDoubleElement( "radius", a.radius(), parent, doc ); addDoubleElement( "startangle", a.startAngle(), parent, doc ); addDoubleElement( "angle", a.angle(), parent, doc ); - return QString::fromLatin1( "arc" ); + return TQString::fromLatin1( "arc" ); } else if( d.inherits( VectorImp::stype() ) ) { Coordinate dir = static_cast( d ).dir(); addXYElements( dir, parent, doc ); - return QString::fromLatin1( "vector" ); + return TQString::fromLatin1( "vector" ); } else if( d.inherits( LocusImp::stype() ) ) { const LocusImp& locus = static_cast( d ); // serialize the curve.. - QDomElement curve = doc.createElement( "curve" ); + TQDomElement curve = doc.createElement( "curve" ); const CurveImp& curveimp = *locus.curve(); - QString type = serialize( curveimp, curve, doc ); + TQString type = serialize( curveimp, curve, doc ); curve.setAttribute( "type", type ); parent.appendChild( curve ); // serialize the hierarchy.. - QDomElement hier = doc.createElement( "calculation" ); + TQDomElement hier = doc.createElement( "calculation" ); locus.hierarchy().serialize( hier, doc ); parent.appendChild( hier ); - return QString::fromLatin1( "locus" ); + return TQString::fromLatin1( "locus" ); } else if( d.inherits( CircleImp::stype() ) ) { const CircleImp& c = static_cast( d ); addCoordinateElement( "center", c.center(), parent, doc ); addDoubleElement( "radius", c.radius(), parent, doc ); - return QString::fromLatin1( "circle" ); + return TQString::fromLatin1( "circle" ); } else if( d.inherits( ConicImp::stype() ) ) { @@ -213,12 +213,12 @@ QString ObjectImpFactory::serialize( const ObjectImp& d, QDomElement& parent, addDoubleElement( "pdimen", data.pdimen, parent, doc ); addDoubleElement( "ecostheta0", data.ecostheta0, parent, doc ); addDoubleElement( "esintheta0", data.esintheta0, parent, doc ); - return QString::fromLatin1( "conic" ); + return TQString::fromLatin1( "conic" ); } else if( d.inherits( CubicImp::stype() ) ) { const CubicCartesianData data = static_cast( d ).data(); - QDomElement coeffs = doc.createElement( "coefficients" ); + TQDomElement coeffs = doc.createElement( "coefficients" ); addDoubleElement( "a000", data.coeffs[0], coeffs, doc ); addDoubleElement( "a001", data.coeffs[1], coeffs, doc ); addDoubleElement( "a002", data.coeffs[2], coeffs, doc ); @@ -230,17 +230,17 @@ QString ObjectImpFactory::serialize( const ObjectImp& d, QDomElement& parent, addDoubleElement( "a122", data.coeffs[8], coeffs, doc ); addDoubleElement( "a222", data.coeffs[9], coeffs, doc ); parent.appendChild( coeffs ); - return QString::fromLatin1( "cubic" ); + return TQString::fromLatin1( "cubic" ); } assert( false ); - return QString::null; + return TQString::null; } -static Coordinate readXYElements( const QDomElement& e, bool& ok ) +static Coordinate readXYElements( const TQDomElement& e, bool& ok ) { double x, y; ok = true; - QDomElement xe = e.firstChild().toElement(); + TQDomElement xe = e.firstChild().toElement(); if ( xe.isNull() || xe.tagName() != "x" ) { ok = false; @@ -248,7 +248,7 @@ static Coordinate readXYElements( const QDomElement& e, bool& ok ) } else x = xe.text().toDouble( &ok ); - QDomElement ye = xe.nextSibling().toElement(); + TQDomElement ye = xe.nextSibling().toElement(); if ( ye.isNull() || ye.tagName() != "y" ) { ok = false; @@ -259,10 +259,10 @@ static Coordinate readXYElements( const QDomElement& e, bool& ok ) return Coordinate( x, y ); } -static Coordinate readCoordinateElement( QDomNode n, bool& ok, +static Coordinate readCoordinateElement( TQDomNode n, bool& ok, const char* tagname ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.isNull() || e.tagName() != tagname ) { ok = false; @@ -272,10 +272,10 @@ static Coordinate readCoordinateElement( QDomNode n, bool& ok, return readXYElements( e, ok ); } -static double readDoubleElement( QDomNode n, bool& ok, +static double readDoubleElement( TQDomNode n, bool& ok, const char* tagname ) { - QDomElement e = n.toElement(); + TQDomElement e = n.toElement(); if ( e.isNull() || e.tagName() != tagname ) { ok = false; @@ -284,9 +284,9 @@ static double readDoubleElement( QDomNode n, bool& ok, return e.text().toDouble( &ok ); } -ObjectImp* ObjectImpFactory::deserialize( const QString& type, - const QDomElement& parent, - QString& error ) const +ObjectImp* ObjectImpFactory::deserialize( const TQString& type, + const TQDomElement& parent, + TQString& error ) const { #define KIG_GENERIC_PARSE_ERROR \ { \ @@ -328,12 +328,12 @@ ObjectImp* ObjectImpFactory::deserialize( const QString& type, { double data[3][3]; bool homothetic = false; - for ( QDomElement childe = parent.firstChild().toElement(); + for ( TQDomElement childe = parent.firstChild().toElement(); ! childe.isNull(); childe = childe.nextSibling().toElement() ) { if ( childe.tagName() == "matrix" ) { - for ( QDomElement elel = childe.firstChild().toElement(); + for ( TQDomElement elel = childe.firstChild().toElement(); ! elel.isNull(); elel = elel.nextSibling().toElement() ) { if ( elel.tagName() != "element" ) KIG_GENERIC_PARSE_ERROR; @@ -363,7 +363,7 @@ ObjectImp* ObjectImpFactory::deserialize( const QString& type, } else if ( type == "line" || type == "segment" || type == "ray" ) { - QDomNode n = parent.firstChild(); + TQDomNode n = parent.firstChild(); Coordinate a = readCoordinateElement( n, ok, "a" ); if ( !ok ) KIG_GENERIC_PARSE_ERROR; n = n.nextSibling(); @@ -381,7 +381,7 @@ ObjectImp* ObjectImpFactory::deserialize( const QString& type, } else if ( type == "arc" ) { - QDomNode n = parent.firstChild(); + TQDomNode n = parent.firstChild(); Coordinate center = readCoordinateElement( n, ok, "center" ); if ( ! ok ) KIG_GENERIC_PARSE_ERROR; n = n.nextSibling(); @@ -403,21 +403,21 @@ ObjectImp* ObjectImpFactory::deserialize( const QString& type, } else if( type == "locus" ) { - QDomElement curvee = parent.firstChild().toElement(); + TQDomElement curvee = parent.firstChild().toElement(); if ( curvee.isNull() || curvee.tagName() != "curve" ) KIG_GENERIC_PARSE_ERROR; - QString type = curvee.attribute( "type" ); + TQString type = curvee.attribute( "type" ); ObjectImp* oi = deserialize( type, curvee, error ); if ( ! oi || ! oi->inherits( CurveImp::stype() ) ) KIG_GENERIC_PARSE_ERROR; //CurveImp* curvei = static_cast( oi ); - QDomElement hiere = curvee.nextSibling().toElement(); + TQDomElement hiere = curvee.nextSibling().toElement(); if ( hiere.isNull() || hiere.tagName() != "calculation" ) KIG_GENERIC_PARSE_ERROR; assert( false ); // TODO // return new LocusImp( curvei, hier ); } else if( type == "circle" ) { - QDomNode n = parent.firstChild(); + TQDomNode n = parent.firstChild(); Coordinate center = readCoordinateElement( n, ok, "center" ); if ( ! ok ) KIG_GENERIC_PARSE_ERROR; @@ -429,7 +429,7 @@ ObjectImp* ObjectImpFactory::deserialize( const QString& type, } else if( type == "conic" ) { - QDomNode n = parent.firstChild(); + TQDomNode n = parent.firstChild(); Coordinate focus1 = readCoordinateElement( n, ok, "focus1" ); if ( ! ok ) KIG_GENERIC_PARSE_ERROR; @@ -450,11 +450,11 @@ ObjectImp* ObjectImpFactory::deserialize( const QString& type, } else if( type == "cubic" ) { - QDomElement coeffse = parent.firstChild().toElement(); + TQDomElement coeffse = parent.firstChild().toElement(); if ( coeffse.isNull() || coeffse.tagName() != "coefficients" ) KIG_GENERIC_PARSE_ERROR; - QDomNode n = coeffse.firstChild(); + TQDomNode n = coeffse.firstChild(); double a000 = readDoubleElement( n, ok, "a000" ); if ( ! ok ) KIG_GENERIC_PARSE_ERROR; diff --git a/kig/objects/object_imp_factory.h b/kig/objects/object_imp_factory.h index 1ab82bb4..1ac08dde 100644 --- a/kig/objects/object_imp_factory.h +++ b/kig/objects/object_imp_factory.h @@ -30,11 +30,11 @@ public: * loads data from \p parent , and returns a new ObjectImp from the type * string \p type . */ - ObjectImp* deserialize( const QString& type, const QDomElement& parent, QString& error ) const; + ObjectImp* deserialize( const TQString& type, const TQDomElement& parent, TQString& error ) const; /** * adds data to \p parent , and returns a type string.. */ - QString serialize( const ObjectImp& d, QDomElement& parent, QDomDocument& doc ) const; + TQString serialize( const ObjectImp& d, TQDomElement& parent, TQDomDocument& doc ) const; }; #endif diff --git a/kig/objects/object_type.cc b/kig/objects/object_type.cc index 9ac2845b..ea85e4f8 100644 --- a/kig/objects/object_type.cc +++ b/kig/objects/object_type.cc @@ -22,7 +22,7 @@ #include "../misc/coordinate.h" -#include +#include #include @@ -86,9 +86,9 @@ bool ObjectType::isTransform() const return false; } -QStringList ObjectType::specialActions() const +TQStringList ObjectType::specialActions() const { - return QStringList(); + return TQStringList(); } void ObjectType::executeAction( int, ObjectHolder&, ObjectTypeCalcer&, KigPart&, KigWidget&, diff --git a/kig/objects/object_type.h b/kig/objects/object_type.h index f0ac49af..54471e46 100644 --- a/kig/objects/object_type.h +++ b/kig/objects/object_type.h @@ -98,7 +98,7 @@ public: /** * return i18n'd names for the special actions.. */ - virtual QStringList specialActions() const; + virtual TQStringList specialActions() const; /** * execute the \p i 'th action from the specialActions above.. */ diff --git a/kig/objects/object_type_factory.cc b/kig/objects/object_type_factory.cc index ee3024fd..a6d527ce 100644 --- a/kig/objects/object_type_factory.cc +++ b/kig/objects/object_type_factory.cc @@ -35,7 +35,7 @@ #include "../scripting/python_type.h" #endif -#include +#include #include ObjectTypeFactory::ObjectTypeFactory() diff --git a/kig/objects/point_imp.cc b/kig/objects/point_imp.cc index 02d4d360..539f98b3 100644 --- a/kig/objects/point_imp.cc +++ b/kig/objects/point_imp.cc @@ -135,7 +135,7 @@ void PointImp::setCoordinate( const Coordinate& c ) mc = c; } -void PointImp::fillInNextEscape( QString& s, const KigDocument& doc ) const +void PointImp::fillInNextEscape( TQString& s, const KigDocument& doc ) const { s = s.arg( doc.coordinateSystem().fromScreen( mc, doc ) ); } diff --git a/kig/objects/point_imp.h b/kig/objects/point_imp.h index a5e8eb98..dac0576c 100644 --- a/kig/objects/point_imp.h +++ b/kig/objects/point_imp.h @@ -72,7 +72,7 @@ public: const ObjectImpType* type() const; void visit( ObjectImpVisitor* vtor ) const; - void fillInNextEscape( QString& s, const KigDocument& ) const; + void fillInNextEscape( TQString& s, const KigDocument& ) const; bool canFillInNextEscape() const; bool equals( const ObjectImp& rhs ) const; diff --git a/kig/objects/point_type.cc b/kig/objects/point_type.cc index 04f8272c..2acd8479 100644 --- a/kig/objects/point_type.cc +++ b/kig/objects/point_type.cc @@ -360,17 +360,17 @@ const ObjectImpType* MidPointType::resultId() const return PointImp::stype(); } -QStringList FixedPointType::specialActions() const +TQStringList FixedPointType::specialActions() const { - QStringList ret; + TQStringList ret; ret << i18n( "Set &Coordinate..." ); ret << i18n( "Redefine" ); return ret; } -QStringList ConstrainedPointType::specialActions() const +TQStringList ConstrainedPointType::specialActions() const { - QStringList ret; + TQStringList ret; ret << i18n( "Set &Parameter..." ); ret << i18n( "Redefine" ); return ret; @@ -395,7 +395,7 @@ void FixedPointType::executeAction( Coordinate oldc = static_cast( o.imp() )->coordinate(); KigInputDialog::getCoordinate( i18n( "Set Coordinate" ), - i18n( "Enter the new coordinate." ) + QString::fromLatin1( "
" ) + + i18n( "Enter the new coordinate." ) + TQString::fromLatin1( "
" ) + d.document().coordinateSystem().coordinateFormatNoticeMarkup(), &w, &ok, d.document(), &oldc ); if ( ! ok ) break; diff --git a/kig/objects/point_type.h b/kig/objects/point_type.h index 231ad6c5..69a7e2e8 100644 --- a/kig/objects/point_type.h +++ b/kig/objects/point_type.h @@ -43,7 +43,7 @@ public: const KigDocument& ) const; const ObjectImpType* resultId() const; - QStringList specialActions() const; + TQStringList specialActions() const; void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& t, KigPart& d, KigWidget& w, NormalMode& m ) const; }; @@ -67,7 +67,7 @@ public: const KigDocument& ) const; const ObjectImpType* resultId() const; -// QStringList specialActions() const; +// TQStringList specialActions() const; // void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& t, // KigPart& d, KigWidget& w, NormalMode& m ) const; }; @@ -112,7 +112,7 @@ public: const KigDocument& ) const; const ObjectImpType* resultId() const; - QStringList specialActions() const; + TQStringList specialActions() const; void executeAction( int i, ObjectHolder&, ObjectTypeCalcer& o, KigPart& d, KigWidget& w, NormalMode& m ) const; }; diff --git a/kig/objects/text_imp.cc b/kig/objects/text_imp.cc index f7b2f1be..32591c16 100644 --- a/kig/objects/text_imp.cc +++ b/kig/objects/text_imp.cc @@ -20,7 +20,7 @@ #include "bogus_imp.h" #include "../misc/kigpainter.h" -TextImp::TextImp( const QString& text, const Coordinate& loc, bool frame ) +TextImp::TextImp( const TQString& text, const Coordinate& loc, bool frame ) : mtext( text), mloc( loc ), mframe( frame ), mboundrect( Rect::invalidRect() ) { } @@ -112,7 +112,7 @@ ObjectImp* TextImp::property( uint which, const KigDocument& w ) const return new InvalidImp; } -QString TextImp::text() const +TQString TextImp::text() const { return mtext; } diff --git a/kig/objects/text_imp.h b/kig/objects/text_imp.h index 8ad92b84..54e33f79 100644 --- a/kig/objects/text_imp.h +++ b/kig/objects/text_imp.h @@ -26,7 +26,7 @@ class TextImp : public ObjectImp { - QString mtext; + TQString mtext; Coordinate mloc; bool mframe; // with this var, we keep track of the place we drew in, for use in @@ -37,7 +37,7 @@ public: static const ObjectImpType* stype(); Coordinate attachPoint() const; - TextImp( const QString& text, const Coordinate& loc, bool frame = false ); + TextImp( const TQString& text, const Coordinate& loc, bool frame = false ); TextImp* copy() const; ~TextImp(); @@ -60,7 +60,7 @@ public: const ObjectImpType* type() const; void visit( ObjectImpVisitor* vtor ) const; - QString text() const; + TQString text() const; const Coordinate coordinate() const; bool hasFrame() const; diff --git a/kig/objects/text_type.cc b/kig/objects/text_type.cc index 6594c05a..214b35c2 100644 --- a/kig/objects/text_type.cc +++ b/kig/objects/text_type.cc @@ -30,8 +30,8 @@ #include -#include -#include +#include +#include #include @@ -87,7 +87,7 @@ ObjectImp* TextType::calc( const Args& parents, const KigDocument& doc ) const int frame = static_cast( firstthree[0] )->data(); bool needframe = frame != 0; const Coordinate t = static_cast( firstthree[1] )->coordinate(); - QString s = static_cast( firstthree[2] )->data(); + TQString s = static_cast( firstthree[2] )->data(); for ( Args::iterator i = varargs.begin(); i != varargs.end(); ++i ) (*i)->fillInNextEscape( s, doc ); @@ -120,9 +120,9 @@ void TextType::move( ObjectTypeCalcer& ourobj, const Coordinate& to, firstthree[1]->move( to, d ); } -QStringList TextType::specialActions() const +TQStringList TextType::specialActions() const { - QStringList ret; + TQStringList ret; ret << i18n( "&Copy Text" ); ret << i18n( "&Toggle Frame" ); ret << i18n( "&Redefine..." ); diff --git a/kig/objects/text_type.h b/kig/objects/text_type.h index 6368cafa..8f97d4ea 100644 --- a/kig/objects/text_type.h +++ b/kig/objects/text_type.h @@ -45,7 +45,7 @@ public: void move( ObjectTypeCalcer& ourobj, const Coordinate& to, const KigDocument& ) const; - QStringList specialActions() const; + TQStringList specialActions() const; void executeAction( int i, ObjectHolder& o, ObjectTypeCalcer& c, KigPart& d, KigWidget& w, NormalMode& m ) const; diff --git a/kig/scripting/newscriptwizard.cc b/kig/scripting/newscriptwizard.cc index 165f8e98..de959ce2 100644 --- a/kig/scripting/newscriptwizard.cc +++ b/kig/scripting/newscriptwizard.cc @@ -20,8 +20,8 @@ #include "script_mode.h" -#include -#include +#include +#include //#include //#include @@ -56,7 +56,7 @@ NewScriptWizard::~NewScriptWizard() } } -NewScriptWizard::NewScriptWizard( QWidget* parent, ScriptModeBase* mode ) +NewScriptWizard::NewScriptWizard( TQWidget* parent, ScriptModeBase* mode ) : NewScriptWizardBase( parent, "New Script Wizard" ), mmode( mode ) { @@ -97,11 +97,11 @@ NewScriptWizard::NewScriptWizard( QWidget* parent, ScriptModeBase* mode ) KPopupMenu* pm = new KPopupMenu( editor ); // creating the actions for the code editor... KActionCollection* ac = new KActionCollection( editor ); - KAction* undoAction = KStdAction::undo( this, SLOT( slotUndo() ), ac ); - KAction* redoAction = KStdAction::redo( this, SLOT( slotRedo() ), ac ); - KAction* cutAction = KStdAction::cut( this, SLOT( slotCut() ), ac ); - KAction* copyAction = KStdAction::copy( this, SLOT( slotCopy() ), ac ); - KAction* pasteAction = KStdAction::paste( this, SLOT( slotPaste() ), ac ); + KAction* undoAction = KStdAction::undo( this, TQT_SLOT( slotUndo() ), ac ); + KAction* redoAction = KStdAction::redo( this, TQT_SLOT( slotRedo() ), ac ); + KAction* cutAction = KStdAction::cut( this, TQT_SLOT( slotCut() ), ac ); + KAction* copyAction = KStdAction::copy( this, TQT_SLOT( slotCopy() ), ac ); + KAction* pasteAction = KStdAction::paste( this, TQT_SLOT( slotPaste() ), ac ); // ... and plugging them into the popup menu (to build it, of course :) ) undoAction->plug( pm ); redoAction->plug( pm ); @@ -114,7 +114,7 @@ NewScriptWizard::NewScriptWizard( QWidget* parent, ScriptModeBase* mode ) dynamic_cast( editor )->installPopup( pm ); } - connect( this, SIGNAL( helpClicked() ), this, SLOT( slotHelpClicked() ) ); + connect( this, TQT_SIGNAL( helpClicked() ), this, TQT_SLOT( slotHelpClicked() ) ); } void NewScriptWizard::back() @@ -159,11 +159,11 @@ void NewScriptWizard::accept() void NewScriptWizard::slotHelpClicked() { - kapp->invokeHelp( QString::fromLatin1( "scripting" ), - QString::fromLatin1( "kig" ) ); + kapp->invokeHelp( TQString::fromLatin1( "scripting" ), + TQString::fromLatin1( "kig" ) ); } -void NewScriptWizard::setText( const QString& text ) +void NewScriptWizard::setText( const TQString& text ) { if ( !document ) { @@ -175,7 +175,7 @@ void NewScriptWizard::setText( const QString& text ) } } -QString NewScriptWizard::text() +TQString NewScriptWizard::text() { if ( !document ) { diff --git a/kig/scripting/newscriptwizard.h b/kig/scripting/newscriptwizard.h index 67b51d94..d1831b96 100644 --- a/kig/scripting/newscriptwizard.h +++ b/kig/scripting/newscriptwizard.h @@ -37,15 +37,15 @@ class NewScriptWizard Q_OBJECT ScriptModeBase* mmode; public: - NewScriptWizard( QWidget* parent, ScriptModeBase* mode ); + NewScriptWizard( TQWidget* parent, ScriptModeBase* mode ); ~NewScriptWizard(); void back(); void next(); void reject(); - void setText( const QString& text ); - QString text(); + void setText( const TQString& text ); + TQString text(); void setType( ScriptType::Type type ); diff --git a/kig/scripting/python_type.cc b/kig/scripting/python_type.cc index 0180e828..cc5a00ea 100644 --- a/kig/scripting/python_type.cc +++ b/kig/scripting/python_type.cc @@ -114,7 +114,7 @@ ObjectImp* PythonCompileType::calc( const Args& parents, const KigDocument& ) co if ( !parents[0]->inherits( StringImp::stype() ) ) return new InvalidImp; const StringImp* si = static_cast( parents[0] ); - QString s = si->data(); + TQString s = si->data(); CompiledPythonScript cs = PythonScripter::instance()->compile( s.latin1() ); diff --git a/kig/scripting/python_type.h b/kig/scripting/python_type.h index 1e76b0b8..db623ab6 100644 --- a/kig/scripting/python_type.h +++ b/kig/scripting/python_type.h @@ -55,7 +55,7 @@ public: std::vector sortArgs( const std::vector& args ) const; Args sortArgs( const Args& args ) const; -// virtual QStringList specialActions() const; +// virtual TQStringList specialActions() const; // virtual void executeAction( int i, RealObject* o, KigDocument& d, KigWidget& w, // NormalMode& m ) const; }; diff --git a/kig/scripting/script-common.cc b/kig/scripting/script-common.cc index 4bd2cbd8..2eb2da81 100644 --- a/kig/scripting/script-common.cc +++ b/kig/scripting/script-common.cc @@ -17,7 +17,7 @@ #include "script-common.h" -#include +#include #include #include @@ -35,18 +35,18 @@ static const script_prop scripts_properties[] = { I18N_NOOP( "Now fill in the Python code:" ), "source_py", "Python-Kig" } }; -QString ScriptType::fillCodeStatement( ScriptType::Type type ) +TQString ScriptType::fillCodeStatement( ScriptType::Type type ) { return i18n( scripts_properties[type].fillCodeStatement ); } -QString ScriptType::templateCode( ScriptType::Type type, std::list args ) +TQString ScriptType::templateCode( ScriptType::Type type, std::list args ) { if ( type == Python ) { - QString tempcode = QString::fromLatin1( "def calc( " ); + TQString tempcode = TQString::fromLatin1( "def calc( " ); bool firstarg = true; - QString temparg = i18n( "Note to translators: this should be a default " + TQString temparg = i18n( "Note to translators: this should be a default " "name for an argument in a Python function. The " "default is \"arg%1\" which would become arg1, " "arg2, etc. Give something which seems " @@ -57,7 +57,7 @@ QString ScriptType::templateCode( ScriptType::Type type, std::listname(); + TQString n = ( *i )->name(); tempcode += n.isEmpty() ? temparg.arg( id ) : n; id++; }; @@ -81,9 +81,9 @@ const char* ScriptType::icon( ScriptType::Type type ) return scripts_properties[type].icon; } -QString ScriptType::highlightStyle( ScriptType::Type type ) +TQString ScriptType::highlightStyle( ScriptType::Type type ) { - return QString( scripts_properties[type].highlightStyle ); + return TQString( scripts_properties[type].highlightStyle ); } ScriptType::Type ScriptType::intToType( int type ) diff --git a/kig/scripting/script-common.h b/kig/scripting/script-common.h index 1c384453..360df862 100644 --- a/kig/scripting/script-common.h +++ b/kig/scripting/script-common.h @@ -38,11 +38,11 @@ public: * Returns an i18n'ed statement like 'Now fill in the code:' with * the name of the script language. */ - static QString fillCodeStatement( ScriptType::Type type ); + static TQString fillCodeStatement( ScriptType::Type type ); /** * Returns a template code for a script language. */ - static QString templateCode( ScriptType::Type type, std::list args ); + static TQString templateCode( ScriptType::Type type, std::list args ); /** * Returns the icon's name for a script language. */ @@ -50,7 +50,7 @@ public: /** * Returns the Kate highlight stytle name for a script language. */ - static QString highlightStyle( ScriptType::Type type ); + static TQString highlightStyle( ScriptType::Type type ); /** * Converts an int to a ScriptType::Type. Useful when reading script * types from files. diff --git a/kig/scripting/script_mode.cc b/kig/scripting/script_mode.cc index 000b99f8..adbcc857 100644 --- a/kig/scripting/script_mode.cc +++ b/kig/scripting/script_mode.cc @@ -30,14 +30,14 @@ #include "../objects/bogus_imp.h" #include "../objects/object_imp.h" -#include -#include +#include +#include #include #include #include -void ScriptModeBase::dragRect( const QPoint& p, KigWidget& w ) +void ScriptModeBase::dragRect( const TQPoint& p, KigWidget& w ) { if ( mwawd != SelectingArgs ) return; @@ -60,7 +60,7 @@ void ScriptModeBase::dragRect( const QPoint& p, KigWidget& w ) w.updateWidget(); } -void ScriptModeBase::leftClickedObject( ObjectHolder* o, const QPoint&, +void ScriptModeBase::leftClickedObject( ObjectHolder* o, const TQPoint&, KigWidget& w, bool ) { std::list::iterator dup_o; @@ -84,7 +84,7 @@ void ScriptModeBase::leftClickedObject( ObjectHolder* o, const QPoint&, } void ScriptModeBase::mouseMoved( const std::vector& os, - const QPoint& pt, KigWidget& w, bool ) + const TQPoint& pt, KigWidget& w, bool ) { if ( mwawd != SelectingArgs ) return; @@ -101,14 +101,14 @@ void ScriptModeBase::mouseMoved( const std::vector& os, // and set statusbar text w.setCursor( KCursor::handCursor() ); - QString selectstat = os.front()->selectStatement(); + TQString selectstat = os.front()->selectStatement(); // statusbar text mdoc.emitStatusBarText( selectstat ); KigPainter p( w.screenInfo(), &w.curPix, mdoc.document() ); // set the text next to the arrow cursor - QPoint point = pt; + TQPoint point = pt; point.setX(point.x()+15); p.drawTextStd( point, selectstat ); @@ -157,7 +157,7 @@ void ScriptModeBase::codePageEntered() if ( mwizard->text().isEmpty() ) { // insert template code.. - QString tempcode = ScriptType::templateCode( mtype, margs ); + TQString tempcode = ScriptType::templateCode( mtype, margs ); mwizard->setText( tempcode ); }; mwizard->setFinishEnabled( mwizard->mpcode, true ); @@ -178,7 +178,7 @@ bool ScriptCreationMode::queryFinish() { std::vector args; - QString script = mwizard->text(); + TQString script = mwizard->text(); args.push_back( new ObjectConstCalcer( new StringImp( script ) ) ); ObjectTypeCalcer* compiledscript = @@ -198,7 +198,7 @@ bool ScriptCreationMode::queryFinish() if ( reto->imp()->inherits( InvalidImp::stype() ) ) { PythonScripter* inst = PythonScripter::instance(); - QCString errtrace = inst->lastErrorExceptionTraceback().c_str(); + TQCString errtrace = inst->lastErrorExceptionTraceback().c_str(); if ( inst->errorOccurred() ) { KMessageBox::detailedSorry( @@ -224,12 +224,12 @@ bool ScriptCreationMode::queryFinish() } } -void ScriptModeBase::midClicked( const QPoint&, KigWidget& ) +void ScriptModeBase::midClicked( const TQPoint&, KigWidget& ) { } void ScriptModeBase::rightClicked( const std::vector&, - const QPoint&, KigWidget& ) + const TQPoint&, KigWidget& ) { } @@ -316,7 +316,7 @@ bool ScriptEditMode::queryFinish() if ( mexecuted->imp()->inherits( InvalidImp::stype() ) ) { PythonScripter* inst = PythonScripter::instance(); - QCString errtrace = inst->lastErrorExceptionTraceback().c_str(); + TQCString errtrace = inst->lastErrorExceptionTraceback().c_str(); if ( inst->errorOccurred() ) { KMessageBox::detailedSorry( diff --git a/kig/scripting/script_mode.h b/kig/scripting/script_mode.h index 4cbfd737..7f6ff171 100644 --- a/kig/scripting/script_mode.h +++ b/kig/scripting/script_mode.h @@ -52,14 +52,14 @@ private: public: virtual ~ScriptModeBase(); - void dragRect( const QPoint& p, KigWidget& w ); -// void dragObject( const Objects& os, const QPoint& pointClickedOn, KigWidget& w, bool ctrlOrShiftDown ); - void leftClickedObject( ObjectHolder* o, const QPoint& p, + void dragRect( const TQPoint& p, KigWidget& w ); +// void dragObject( const Objects& os, const TQPoint& pointClickedOn, KigWidget& w, bool ctrlOrShiftDown ); + void leftClickedObject( ObjectHolder* o, const TQPoint& p, KigWidget& w, bool actrlOrShiftDown ); - void mouseMoved( const std::vector& os, const QPoint& p, + void mouseMoved( const std::vector& os, const TQPoint& p, KigWidget& w, bool shiftpressed ); - void midClicked( const QPoint&, KigWidget& ); - void rightClicked( const std::vector&, const QPoint&, KigWidget& ); + void midClicked( const TQPoint&, KigWidget& ); + void rightClicked( const std::vector&, const TQPoint&, KigWidget& ); void argsPageEntered(); void codePageEntered(); @@ -106,7 +106,7 @@ private: std::vector mexecargs; std::vector mcompiledargs; - QString morigscript; + TQString morigscript; public: ScriptEditMode( ObjectTypeCalcer* exec_calc, KigPart& doc ); -- cgit v1.2.1