summaryrefslogtreecommitdiffstats
path: root/kig/misc
diff options
context:
space:
mode:
Diffstat (limited to 'kig/misc')
-rw-r--r--kig/misc/common.cpp10
-rw-r--r--kig/misc/common.h6
-rw-r--r--kig/misc/coordinate.cpp8
-rw-r--r--kig/misc/coordinate.h4
-rw-r--r--kig/misc/coordinate_system.cpp110
-rw-r--r--kig/misc/coordinate_system.h36
-rw-r--r--kig/misc/goniometry.cc6
-rw-r--r--kig/misc/goniometry.h4
-rw-r--r--kig/misc/guiaction.cc56
-rw-r--r--kig/misc/guiaction.h52
-rw-r--r--kig/misc/kigfiledialog.cc22
-rw-r--r--kig/misc/kigfiledialog.h12
-rw-r--r--kig/misc/kiginputdialog.cc80
-rw-r--r--kig/misc/kiginputdialog.h20
-rw-r--r--kig/misc/kigpainter.cpp166
-rw-r--r--kig/misc/kigpainter.h68
-rw-r--r--kig/misc/kigtransform.cpp2
-rw-r--r--kig/misc/kigtransform.h2
-rw-r--r--kig/misc/lists.cc56
-rw-r--r--kig/misc/lists.h8
-rw-r--r--kig/misc/object_constructor.cc62
-rw-r--r--kig/misc/object_constructor.h62
-rw-r--r--kig/misc/object_hierarchy.cc54
-rw-r--r--kig/misc/object_hierarchy.h6
-rw-r--r--kig/misc/rect.cc6
-rw-r--r--kig/misc/rect.h10
-rw-r--r--kig/misc/screeninfo.cc22
-rw-r--r--kig/misc/screeninfo.h18
-rw-r--r--kig/misc/special_constructors.cc68
-rw-r--r--kig/misc/special_constructors.h46
30 files changed, 541 insertions, 541 deletions
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 <qrect.h>
+#include <tqrect.h>
#include <kdeversion.h>
#include <vector>
@@ -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 <qglobal.h>
+#include <tqglobal.h>
#include <cmath>
#include <kdebug.h>
@@ -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 <qpainter.h>
-#include <qregexp.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -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<Coordinate> 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: <b>\"x;y\"</b>, "
"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: <b>\"r; \xCE\xB8°\"</b>, "
"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<Coordinate> 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 <qnamespace.h>
+#include <tqnamespace.h>
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 <qstringlist.h>
+#include <tqstringlist.h>
#include <kdebug.h>
#include <klocale.h>
@@ -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 <qstringlist.h>
+#include <tqstringlist.h>
/**
* 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 <kiconloader.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
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( "<br>" ) +
+ TQString::fromLatin1( "<br>" ) +
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 <qstring.h>
-#include <qcstring.h>
+#include <tqstring.h>
+#include <tqcstring.h>
#include <kaction.h>
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 <qfile.h>
-#include <qpoint.h>
+#include <tqfile.h>
+#include <tqpoint.h>
#include <klocale.h>
#include <kmessagebox.h>
-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 <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qvalidator.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqvalidator.h>
+#include <tqwhatsthis.h>
#include <kcombobox.h>
#include <kdebug.h>
@@ -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.<br>\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 <qpen.h>
+#include <tqpen.h>
#include <cmath>
#include <stack>
#include <functional>
#include <algorithm>
-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<QPoint>& pts,
+void KigPainter::drawPolygon( const std::vector<TQPoint>& 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<QPoint>::const_iterator i = pts.begin(); i != pts.end(); ++i )
+ for( std::vector<TQPoint>::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<QPoint>& pts,
void KigPainter::drawArea( const std::vector<Coordinate>& 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<Coordinate>::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<ObjectHolder*>& 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<int>( Goniometry::convert( 16 * dstartangle, Goniometry::Rad, Goniometry::Deg ) );
const int angle = static_cast<int>( 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<int>( point.x() + radius * cos( dstartangle + dangle ) ),
+ TQPoint end( static_cast<int>( point.x() + radius * cos( dstartangle + dangle ) ),
static_cast<int>( 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<QPoint> arrow;
+// std::vector<TQPoint> 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<Coordinate>& pts,
bool winding, int index, int npoints )
{
using namespace std;
- vector<QPoint> points;
+ vector<TQPoint> 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 <qpainter.h>
-#include <qcolor.h>
+#include <tqpainter.h>
+#include <tqcolor.h>
#include <vector>
@@ -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<QPoint>& pts, bool winding = false, int index = 0, int npoints = -1 );
+ void drawPolygon( const std::vector<TQPoint>& pts, bool winding = false, int index = 0, int npoints = -1 );
void drawPolygon( const std::vector<Coordinate>& 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<QRect>& overlay() { return mOverlay; }
+ const std::vector<TQRect>& 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<QRect> mOverlay;
+ std::vector<TQRect> 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 <klocale.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
+#include <tqregexp.h>
#include <algorithm>
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<Macro*> ms;
ms.push_back( m );
return save( ms, f );
}
-bool MacroList::save( const std::vector<Macro*>& ms, const QString& f )
+bool MacroList::save( const std::vector<Macro*>& 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<Macro*>& 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<Macro*>& 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<Macro*>& ret, const KigPart& kdoc )
+bool MacroList::load( const TQString& f, std::vector<Macro*>& 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<Macro*>& ret, const KigPart&
}
}
-bool MacroList::loadNew( const QDomElement& docelem, std::vector<Macro*>& ret, const KigPart& )
+bool MacroList::loadNew( const TQDomElement& docelem, std::vector<Macro*>& 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<Macro*>& 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<Macro*>& ret, const KigPart& );
+ bool loadNew( const TQDomElement& docelem, std::vector<Macro*>& 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 <qpen.h>
+#include <tqpen.h>
#include <klocale.h>
#include <algorithm>
#include <functional>
-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<ObjectCalcer*> 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<ObjectCalcer*>& sel,
+TQString StandardConstructorBase::useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>& 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<ObjectCalcer*>& sel,
+TQString MergeObjectConstructor::useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>& 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<ObjectCalcer*>& input, const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>&, const int& ) const
@@ -412,7 +412,7 @@ void MacroConstructor::handleArgs( const std::vector<ObjectCalcer*>& os, KigPart
d.addObjects( hos );
}
-QString MacroConstructor::selectStatement(
+TQString MacroConstructor::selectStatement(
const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>& sel,
+TQString MacroConstructor::useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
const KigDocument&, const KigWidget&
) const
{
@@ -434,7 +434,7 @@ QString MacroConstructor::useText( const ObjectCalcer& o, const std::vector<Obje
transform( sel.begin(), sel.end(), back_inserter( args ),
mem_fun( &ObjectCalcer::imp ) );
std::string ret = mparser.usetext( o.imp(), args );
- if ( ret.empty() ) return QString::null;
+ if ( ret.empty() ) return TQString::null;
else return i18n( ret.c_str() );
}
@@ -593,17 +593,17 @@ BaseConstructMode* ObjectConstructor::constructMode( KigPart& doc )
return new ConstructMode( doc, this );
}
-void MacroConstructor::setName( const QString& name )
+void MacroConstructor::setName( const TQString& name )
{
mname = name;
}
-void MacroConstructor::setDescription( const QString& desc )
+void MacroConstructor::setDescription( const TQString& desc )
{
mdesc = desc;
}
-void MacroConstructor::setIcon( QCString& icon )
+void MacroConstructor::setIcon( TQCString& icon )
{
miconfile = icon;
}
diff --git a/kig/misc/object_constructor.h b/kig/misc/object_constructor.h
index 57261c69..eebd0497 100644
--- a/kig/misc/object_constructor.h
+++ b/kig/misc/object_constructor.h
@@ -46,9 +46,9 @@ class ObjectConstructor
public:
virtual ~ObjectConstructor();
- virtual const QString descriptiveName() const = 0;
- virtual const QString description() const = 0;
- virtual const QCString iconFileName( const bool canBeNull = false ) const = 0;
+ virtual const TQString descriptiveName() const = 0;
+ virtual const TQString description() const = 0;
+ virtual const TQCString iconFileName( const bool canBeNull = false ) const = 0;
/**
* the following function is called in case of duplication of arguments
@@ -81,7 +81,7 @@ public:
* return a string describing what you would use \p o for if it were
* selected... \p o should be part of \p sel .
*/
- virtual QString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
+ virtual TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>& 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<ObjectCalcer*>& os,
const int& ) const;
@@ -168,10 +168,10 @@ public:
virtual void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents,
const KigDocument& ) const = 0;
- QString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
+ TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
const KigDocument& d, const KigWidget& v ) const;
- QString selectStatement(
+ TQString selectStatement(
const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>& os,
const int& ) const;
@@ -308,10 +308,10 @@ public:
const KigWidget& v
) const;
- QString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
+ TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
const KigDocument& d, const KigWidget& v ) const;
- QString selectStatement(
+ TQString selectStatement(
const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>& input, const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>& os,
const int& ) const;
@@ -365,11 +365,11 @@ public:
void handleArgs( const std::vector<ObjectCalcer*>& os, KigPart& d,
KigWidget& v ) const;
- QString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
+ TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
const KigDocument& d, const KigWidget& v
) const;
- QString selectStatement(
+ TQString selectStatement(
const std::vector<ObjectCalcer*>& 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 <kglobal.h>
-#include <qdom.h>
+#include <tqdom.h>
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<bool>& dependsstack, int loc ) const;
void checkArgumentsUsed( std::vector<bool>& 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<const ObjectImp*>& stack,
@@ -408,21 +408,21 @@ ObjectHierarchy::ObjectHierarchy( const std::vector<ObjectCalcer*>& 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<const ApplyTypeNode*>( 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<const FetchPropertyNode*>( 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<const PushStackNode*>( 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<int> 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 <qrect.h>
+#include <tqrect.h>
#include <kdebug.h>
/**
- * 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 <cmath>
-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 <qrect.h>
+#include <tqrect.h>
#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 <qpen.h>
+#include <tqpen.h>
#include <klocale.h>
@@ -242,7 +242,7 @@ std::vector<ObjectHolder*> LocusConstructor::build( const std::vector<ObjectCalc
return ret;
}
-QString LocusConstructor::useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& os,
+TQString LocusConstructor::useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& os,
const KigDocument&, const KigWidget& ) const
{
if ( dynamic_cast<const ObjectTypeCalcer*>( &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<ObjectCalcer*> 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<ObjectCalcer*>& os,
+TQString PolygonBNPTypeConstructor::useText( const ObjectCalcer&, const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>&, 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<ObjectHolder*> PolygonBCVConstructor::build( const std::vector<Objec
return ret;
}
-QString PolygonBCVConstructor::useText( const ObjectCalcer&, const std::vector<ObjectCalcer*>& os,
+TQString PolygonBCVConstructor::useText( const ObjectCalcer&, const std::vector<ObjectCalcer*>& os,
const KigDocument&, const KigWidget& ) const
{
switch ( os.size() )
@@ -750,13 +750,13 @@ QString PolygonBCVConstructor::useText( const ObjectCalcer&, const std::vector<O
if ( winding > 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<O
return "";
}
-QString PolygonBCVConstructor::selectStatement(
+TQString PolygonBCVConstructor::selectStatement(
const std::vector<ObjectCalcer*>& os, const KigDocument&,
const KigWidget& ) const
{
@@ -970,7 +970,7 @@ ArcLineIntersectionConstructor::~ArcLineIntersectionConstructor()
{
}
-QString ConicRadicalConstructor::useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>&,
+TQString ConicRadicalConstructor::useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>&,
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<ObjectCalcer*>& 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<ObjectCalcer*>&, 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<ObjectCalcer*>& 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<ObjectCalcer*>& os,
return ret;
}
-QString GenericIntersectionConstructor::selectStatement(
+TQString GenericIntersectionConstructor::selectStatement(
const std::vector<ObjectCalcer*>& sel, const KigDocument&,
const KigWidget& ) const
{
@@ -1525,7 +1525,7 @@ TangentConstructor::~TangentConstructor()
{
}
-QString TangentConstructor::useText(
+TQString TangentConstructor::useText(
const ObjectCalcer& o, const std::vector<ObjectCalcer*>&,
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<ObjectCalcer*>& sel, const KigDocument&,
// const KigWidget& ) const
//{
@@ -1592,7 +1592,7 @@ CocConstructor::~CocConstructor()
{
}
-QString CocConstructor::useText(
+TQString CocConstructor::useText(
const ObjectCalcer& o, const std::vector<ObjectCalcer*>&,
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<ObjectCalcer*>& 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<ObjectCalcer*>& os,
const int& ) const;
const int wantArgs( const std::vector<ObjectCalcer*>& os,
@@ -71,10 +71,10 @@ public:
KigPart& d,
KigWidget& v
) const;
- QString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
+ TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
const KigDocument& d, const KigWidget& v
) const;
- QString selectStatement(
+ TQString selectStatement(
const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>& os,
const int& ) const;
const int wantArgs( const std::vector<ObjectCalcer*>& os,
@@ -110,10 +110,10 @@ public:
KigPart& d,
KigWidget& v
) const;
- QString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
+ TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
const KigDocument& d, const KigWidget& v
) const;
- QString selectStatement(
+ TQString selectStatement(
const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>& os,
const int& ) const;
const int wantArgs( const std::vector<ObjectCalcer*>& os,
@@ -151,10 +151,10 @@ public:
KigPart& d,
KigWidget& v
) const;
- QString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
+ TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel,
const KigDocument& d, const KigWidget& v
) const;
- QString selectStatement(
+ TQString selectStatement(
const std::vector<ObjectCalcer*>& 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<ObjectCalcer*>& sel, const KigDocument& d,
+ TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
const KigWidget& v ) const;
void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, const KigDocument& ) const;
std::vector<ObjectHolder*> build( const std::vector<ObjectCalcer*>& os, KigDocument& d, KigWidget& w ) const;
@@ -202,7 +202,7 @@ public:
const std::vector<ObjectCalcer*>& os, const KigDocument& d,
const KigWidget& v
) const;
- QString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
+ TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
const KigWidget& v ) const;
void drawprelim( const ObjectDrawer& drawer, KigPainter& p, const std::vector<ObjectCalcer*>& parents, const KigDocument& ) const;
@@ -245,9 +245,9 @@ public:
bool isIntersection() const;
- QString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
+ TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
const KigWidget& v ) const;
- QString selectStatement(
+ TQString selectStatement(
const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
const KigWidget& w ) const;
};
@@ -295,9 +295,9 @@ public:
TangentConstructor();
~TangentConstructor();
- QString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
+ TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
const KigWidget& v ) const;
-// QString selectStatement(
+// TQString selectStatement(
// const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
// const KigWidget& w ) const;
};
@@ -309,9 +309,9 @@ public:
CocConstructor();
~CocConstructor();
- QString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
+ TQString useText( const ObjectCalcer& o, const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
const KigWidget& v ) const;
-// QString selectStatement(
+// TQString selectStatement(
// const std::vector<ObjectCalcer*>& sel, const KigDocument& d,
// const KigWidget& w ) const;
};