diff options
Diffstat (limited to 'kpovmodeler')
491 files changed, 7601 insertions, 7601 deletions
diff --git a/kpovmodeler/pm2dcontrolpoint.cpp b/kpovmodeler/pm2dcontrolpoint.cpp index 66e7a85a..f8450715 100644 --- a/kpovmodeler/pm2dcontrolpoint.cpp +++ b/kpovmodeler/pm2dcontrolpoint.cpp @@ -21,7 +21,7 @@ PM2DControlPoint::PM2DControlPoint( const PMVector& point, PM2DControlPoint::CPType type, int id, - const QString& description ) + const TQString& description ) : PMControlPoint( id, description ) { m_point = point; @@ -34,7 +34,7 @@ PM2DControlPoint::PM2DControlPoint( const PMVector& point, void PM2DControlPoint::graphicalChangeStarted( ) { - QPtrListIterator<PM2DControlPoint> it( m_linkedPoints ); + TQPtrListIterator<PM2DControlPoint> it( m_linkedPoints ); for( ; *it; ++it ) if( !( *it )->selected( ) ) ( *it )->graphicalChangeStarted( ); @@ -63,7 +63,7 @@ void PM2DControlPoint::graphicalChange( const PMVector& startPoint, m_point = op; } - QPtrListIterator<PM2DControlPoint> it( m_linkedPoints ); + TQPtrListIterator<PM2DControlPoint> it( m_linkedPoints ); for( ; *it; ++it ) { ( *it )->m_point = m_point + ( *it )->m_original2DPoint @@ -110,7 +110,7 @@ void PM2DControlPoint::snapToGrid( ) if( diff ) m_point += m_pBasePoint->m_point; - QPtrListIterator<PM2DControlPoint> it( m_linkedPoints ); + TQPtrListIterator<PM2DControlPoint> it( m_linkedPoints ); for( ; *it; ++it ) { ( *it )->m_point += change; diff --git a/kpovmodeler/pm2dcontrolpoint.h b/kpovmodeler/pm2dcontrolpoint.h index f949570b..40b26d85 100644 --- a/kpovmodeler/pm2dcontrolpoint.h +++ b/kpovmodeler/pm2dcontrolpoint.h @@ -25,7 +25,7 @@ #include "pmcontrolpoint.h" -#include <qptrlist.h> +#include <tqptrlist.h> /** * Class for free moveable control points @@ -41,7 +41,7 @@ public: * Creates a PM2DControlPoint with id. Point has to be a 2D vector. */ PM2DControlPoint( const PMVector& point, CPType type, - int id, const QString& description ); + int id, const TQString& description ); /** * Deletes the PM2DControlPoint */ @@ -128,7 +128,7 @@ private: double m_thirdCoordinate; double m_scale; PM2DControlPoint* m_pBasePoint; - QPtrList<PM2DControlPoint> m_linkedPoints; + TQPtrList<PM2DControlPoint> m_linkedPoints; PM2DControlPoint* m_pLatheLink; }; diff --git a/kpovmodeler/pm3dcontrolpoint.cpp b/kpovmodeler/pm3dcontrolpoint.cpp index 7bd4e10e..d430eac7 100644 --- a/kpovmodeler/pm3dcontrolpoint.cpp +++ b/kpovmodeler/pm3dcontrolpoint.cpp @@ -20,7 +20,7 @@ #include <math.h> PM3DControlPoint::PM3DControlPoint( const PMVector& point, int id, - const QString& description ) + const TQString& description ) : PMControlPoint( id, description ) { m_point = point; diff --git a/kpovmodeler/pm3dcontrolpoint.h b/kpovmodeler/pm3dcontrolpoint.h index 765c4e43..3af82a28 100644 --- a/kpovmodeler/pm3dcontrolpoint.h +++ b/kpovmodeler/pm3dcontrolpoint.h @@ -35,7 +35,7 @@ public: /** * Creates a PM3DControlPoint with id. */ - PM3DControlPoint( const PMVector& point, int id, const QString& description ); + PM3DControlPoint( const PMVector& point, int id, const TQString& description ); /** * Deletes the PM3DControlPoint */ diff --git a/kpovmodeler/pmactions.cpp b/kpovmodeler/pmactions.cpp index b84e42da..12bb479b 100644 --- a/kpovmodeler/pmactions.cpp +++ b/kpovmodeler/pmactions.cpp @@ -17,12 +17,12 @@ #include "pmactions.h" -#include <qcombobox.h> -#include <qwhatsthis.h> -#include <qspinbox.h> -#include <qlabel.h> -#include <qstyle.h> -#include <qpainter.h> +#include <tqcombobox.h> +#include <tqwhatsthis.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqstyle.h> +#include <tqpainter.h> #include <ktoolbar.h> #include <ktoolbarbutton.h> @@ -34,25 +34,25 @@ class PMComboBox : public QComboBox { public: - PMComboBox( QWidget* parent, const char* name = 0 ) - : QComboBox( parent, name ) + PMComboBox( TQWidget* parent, const char* name = 0 ) + : TQComboBox( parent, name ) { } - virtual QSize minimumSizeHint( ) const + virtual TQSize minimumSizeHint( ) const { - QSize s = QComboBox::minimumSizeHint( ); + TQSize s = TQComboBox::minimumSizeHint( ); return s.expandedTo( minimumSize( ) ); } - virtual QSize sizeHint( ) const + virtual TQSize sizeHint( ) const { - QSize s = QComboBox::sizeHint( ); + TQSize s = TQComboBox::sizeHint( ); return s.expandedTo( minimumSize( ) ); } }; -PMComboAction::PMComboAction( const QString& text, int accel, const QObject* receiver, const char* member, - QObject* parent, const char* name ) +PMComboAction::PMComboAction( const TQString& text, int accel, const TQObject* receiver, const char* member, + TQObject* parent, const char* name ) : KAction( text, accel, parent, name ) { m_receiver = receiver; @@ -65,7 +65,7 @@ PMComboAction::~PMComboAction( ) { } -int PMComboAction::plug( QWidget* w, int index ) +int PMComboAction::plug( TQWidget* w, int index ) { if( !w->inherits( "KToolBar" ) ) return -1; @@ -74,7 +74,7 @@ int PMComboAction::plug( QWidget* w, int index ) int id = KAction::getToolButtonID( ); - QComboBox* comboBox = new PMComboBox( toolBar ); + TQComboBox* comboBox = new PMComboBox( toolBar ); if( m_minWidth > 0 ) comboBox->setMinimumWidth( m_minWidth ); if( m_maxWidth > 0 ) @@ -82,11 +82,11 @@ int PMComboAction::plug( QWidget* w, int index ) toolBar->insertWidget( id, m_minWidth > 0 ? m_minWidth : 300, comboBox, index ); - connect( comboBox, SIGNAL( activated( int ) ), m_receiver, m_member ); + connect( comboBox, TQT_SIGNAL( activated( int ) ), m_receiver, m_member ); addContainer( toolBar, id ); - connect( toolBar, SIGNAL( destroyed( ) ), this, SLOT( slotDestroyed( ) ) ); + connect( toolBar, TQT_SIGNAL( destroyed( ) ), this, TQT_SLOT( slotDestroyed( ) ) ); //toolBar->setItemAutoSized( id, true ); @@ -94,12 +94,12 @@ int PMComboAction::plug( QWidget* w, int index ) emit plugged( ); - QWhatsThis::add( comboBox, whatsThis( ) ); + TQWhatsThis::add( comboBox, whatsThis( ) ); return containerCount( ) - 1; } -void PMComboAction::unplug( QWidget *w ) +void PMComboAction::unplug( TQWidget *w ) { if( !w->inherits( "KToolBar" ) ) return; @@ -120,40 +120,40 @@ void PMComboAction::unplug( QWidget *w ) class PMToolBarLabel : public QToolButton { public: - PMToolBarLabel( const QString& text, QWidget* parent = 0, const char* name = 0 ) - : QToolButton( parent, name ) + PMToolBarLabel( const TQString& text, TQWidget* parent = 0, const char* name = 0 ) + : TQToolButton( parent, name ) { setText( text ); } protected: - QSize sizeHint( ) const + TQSize sizeHint( ) const { int w = fontMetrics( ).width( text( ) ); int h = fontMetrics( ).height( ); - return QSize( w, h ); + return TQSize( w, h ); } - void drawButton( QPainter* p ) + void drawButton( TQPainter* p ) { #if ( QT_VERSION >= 300 ) // Draw the background - style( ).drawComplexControl( QStyle::CC_ToolButton, p, this, rect( ), colorGroup( ), - QStyle::Style_Enabled, QStyle::SC_ToolButton ); + style( ).drawComplexControl( TQStyle::CC_ToolButton, p, this, rect( ), colorGroup( ), + TQStyle::Style_Enabled, TQStyle::SC_ToolButton ); // Draw the label - style( ).drawControl( QStyle::CE_ToolButtonLabel, p, this, rect( ), colorGroup( ), - QStyle::Style_Enabled ); + style( ).drawControl( TQStyle::CE_ToolButtonLabel, p, this, rect( ), colorGroup( ), + TQStyle::Style_Enabled ); #else p->drawText( rect( ), Qt::AlignVCenter | Qt::AlignLeft, text( ) ); #endif } }; -PMLabelAction::PMLabelAction( const QString &text, QObject *parent, const char *name ) +PMLabelAction::PMLabelAction( const TQString &text, TQObject *parent, const char *name ) : KAction( text, 0, parent, name ) { m_button = 0; } -int PMLabelAction::plug( QWidget *widget, int index ) +int PMLabelAction::plug( TQWidget *widget, int index ) { //do not call the previous implementation here @@ -168,7 +168,7 @@ int PMLabelAction::plug( QWidget *widget, int index ) addContainer( tb, id ); - connect( tb, SIGNAL( destroyed( ) ), this, SLOT( slotDestroyed( ) ) ); + connect( tb, TQT_SIGNAL( destroyed( ) ), this, TQT_SLOT( slotDestroyed( ) ) ); return containerCount( ) - 1; } @@ -176,7 +176,7 @@ int PMLabelAction::plug( QWidget *widget, int index ) return -1; } -void PMLabelAction::unplug( QWidget *widget ) +void PMLabelAction::unplug( TQWidget *widget ) { if( widget->inherits( "KToolBar" ) ) { @@ -196,8 +196,8 @@ void PMLabelAction::unplug( QWidget *widget ) } -PMSpinBoxAction::PMSpinBoxAction( const QString& text, int accel, const QObject* receiver, const char* member, - QObject* parent, const char* name ) +PMSpinBoxAction::PMSpinBoxAction( const TQString& text, int accel, const TQObject* receiver, const char* member, + TQObject* parent, const char* name ) : KAction( text, accel, parent, name ) { m_receiver = receiver; @@ -208,7 +208,7 @@ PMSpinBoxAction::~PMSpinBoxAction( ) { } -int PMSpinBoxAction::plug( QWidget* w, int index ) +int PMSpinBoxAction::plug( TQWidget* w, int index ) { if( !w->inherits( "KToolBar" ) ) return -1; @@ -217,26 +217,26 @@ int PMSpinBoxAction::plug( QWidget* w, int index ) int id = KAction::getToolButtonID( ); - QSpinBox* spinBox = new QSpinBox( -1000, 1000, 1, w ); + TQSpinBox* spinBox = new TQSpinBox( -1000, 1000, 1, w ); toolBar->insertWidget( id, 70, spinBox, index ); - connect( spinBox, SIGNAL( valueChanged( int ) ), m_receiver, m_member ); + connect( spinBox, TQT_SIGNAL( valueChanged( int ) ), m_receiver, m_member ); addContainer( toolBar, id ); - connect( toolBar, SIGNAL( destroyed( ) ), this, SLOT( slotDestroyed( ) ) ); + connect( toolBar, TQT_SIGNAL( destroyed( ) ), this, TQT_SLOT( slotDestroyed( ) ) ); //toolBar->setItemAutoSized( id, false ); m_spinBox = spinBox; emit plugged( ); - QWhatsThis::add( spinBox, whatsThis( ) ); + TQWhatsThis::add( spinBox, whatsThis( ) ); return containerCount( ) - 1; } -void PMSpinBoxAction::unplug( QWidget *w ) +void PMSpinBoxAction::unplug( TQWidget *w ) { if( !w->inherits( "KToolBar" ) ) return; diff --git a/kpovmodeler/pmactions.h b/kpovmodeler/pmactions.h index f4f8e9e4..6575caa8 100644 --- a/kpovmodeler/pmactions.h +++ b/kpovmodeler/pmactions.h @@ -20,13 +20,13 @@ #ifndef PMACTIONS_H #define PMACTIONS_H -#include <qguardedptr.h> +#include <tqguardedptr.h> #include <kaction.h> -class QComboBox; -class QSpinBox; -class QLabel; -class QToolButton; +class TQComboBox; +class TQSpinBox; +class TQLabel; +class TQToolButton; /** * Combobox action for the toolbar. @@ -37,14 +37,14 @@ class PMComboAction : public KAction { Q_OBJECT public: - PMComboAction( const QString& text, int accel, const QObject* receiver, const char* member, QObject* parent, const char* name ); + PMComboAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* parent, const char* name ); ~PMComboAction( ); - virtual int plug( QWidget* w, int index = -1 ); + virtual int plug( TQWidget* w, int index = -1 ); - virtual void unplug( QWidget* w ); + virtual void unplug( TQWidget* w ); - QGuardedPtr<QComboBox> combo( ) { return m_combo; } + TQGuardedPtr<TQComboBox> combo( ) { return m_combo; } void setMaximumWidth( int w ) { m_maxWidth = w; } void setMinimumWidth( int w ) { m_minWidth = w; } @@ -53,8 +53,8 @@ signals: void plugged( ); private: - QGuardedPtr<QComboBox> m_combo; - const QObject* m_receiver; + TQGuardedPtr<TQComboBox> m_combo; + const TQObject* m_receiver; const char* m_member; int m_minWidth, m_maxWidth; }; @@ -68,14 +68,14 @@ class PMLabelAction : public KAction { Q_OBJECT public: - PMLabelAction( const QString &text, QObject *parent = 0, const char *name = 0 ); + PMLabelAction( const TQString &text, TQObject *parent = 0, const char *name = 0 ); - virtual int plug( QWidget *widget, int index = -1 ); - virtual void unplug( QWidget *widget ); - QToolButton* button( ) { return m_button; } + virtual int plug( TQWidget *widget, int index = -1 ); + virtual void unplug( TQWidget *widget ); + TQToolButton* button( ) { return m_button; } private: - QToolButton* m_button; + TQToolButton* m_button; }; /** @@ -85,20 +85,20 @@ class PMSpinBoxAction : public KAction { Q_OBJECT public: - PMSpinBoxAction( const QString& text, int accel, const QObject* receiver, const char* member, QObject* parent, const char* name ); + PMSpinBoxAction( const TQString& text, int accel, const TQObject* receiver, const char* member, TQObject* parent, const char* name ); ~PMSpinBoxAction( ); - virtual int plug( QWidget* w, int index = -1 ); - virtual void unplug( QWidget* w ); + virtual int plug( TQWidget* w, int index = -1 ); + virtual void unplug( TQWidget* w ); - QGuardedPtr<QSpinBox> spinBox( ) { return m_spinBox; } + TQGuardedPtr<TQSpinBox> spinBox( ) { return m_spinBox; } signals: void plugged( ); private: - QGuardedPtr<QSpinBox> m_spinBox; - const QObject* m_receiver; + TQGuardedPtr<TQSpinBox> m_spinBox; + const TQObject* m_receiver; const char* m_member; }; diff --git a/kpovmodeler/pmbicubicpatch.cpp b/kpovmodeler/pmbicubicpatch.cpp index cbc633a9..2c1c99dd 100644 --- a/kpovmodeler/pmbicubicpatch.cpp +++ b/kpovmodeler/pmbicubicpatch.cpp @@ -161,12 +161,12 @@ PMBicubicPatch::~PMBicubicPatch( ) { } -QString PMBicubicPatch::description( ) const +TQString PMBicubicPatch::description( ) const { return i18n( "bicubic patch" ); } -void PMBicubicPatch::serialize( QDomElement& e, QDomDocument& doc ) const +void PMBicubicPatch::serialize( TQDomElement& e, TQDomDocument& doc ) const { int i; @@ -177,10 +177,10 @@ void PMBicubicPatch::serialize( QDomElement& e, QDomDocument& doc ) const e.setAttribute( "uvEnabled", m_uvEnabled ); for( i = 0; i < 16; i++ ) - e.setAttribute( QString( "cp%1" ).arg( i ), m_point[i].serializeXML( ) ); + e.setAttribute( TQString( "cp%1" ).arg( i ), m_point[i].serializeXML( ) ); for( i = 0; i < 4; ++i ) - e.setAttribute( QString( "uv%1" ).arg( i ), m_uvVectors[i].serializeXML( ) ); + e.setAttribute( TQString( "uv%1" ).arg( i ), m_uvVectors[i].serializeXML( ) ); Base::serialize( e, doc ); } @@ -198,7 +198,7 @@ void PMBicubicPatch::readAttributes( const PMXMLHelper& h ) for( v = 0; v < 4; v++ ) for( u = 0; u < 4; u++ ) - m_point[u+v*4] = h.vectorAttribute( QString( "cp%1" ).arg( u+v*4 ), + m_point[u+v*4] = h.vectorAttribute( TQString( "cp%1" ).arg( u+v*4 ), PMVector( o + s * u, 0, o + s * v ) ); m_uvVectors[0] = h.vectorAttribute( "uv0", c_defaultUVVector0 ); @@ -365,7 +365,7 @@ PMVector PMBicubicPatch::uvVector( int i ) const return PMVector( 0.0, 0.0 ); } -PMDialogEditBase* PMBicubicPatch::editWidget( QWidget* parent ) const +PMDialogEditBase* PMBicubicPatch::editWidget( TQWidget* parent ) const { return new PMBicubicPatchEdit( parent ); } diff --git a/kpovmodeler/pmbicubicpatch.h b/kpovmodeler/pmbicubicpatch.h index c7ca6b3b..d14f7821 100644 --- a/kpovmodeler/pmbicubicpatch.h +++ b/kpovmodeler/pmbicubicpatch.h @@ -53,25 +53,25 @@ public: /** */ virtual PMObject* copy( ) const { return new PMBicubicPatch( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMBicubicPatchEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmbicubicpatch" ); } + virtual TQString pixmap( ) const { return TQString( "pmbicubicpatch" ); } /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmbicubicpatchedit.cpp b/kpovmodeler/pmbicubicpatchedit.cpp index 6ead96ae..8dff49b0 100644 --- a/kpovmodeler/pmbicubicpatchedit.cpp +++ b/kpovmodeler/pmbicubicpatchedit.cpp @@ -23,13 +23,13 @@ #include "pmvectorlistedit.h" #include "pmpart.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <klocale.h> -PMBicubicPatchEdit::PMBicubicPatchEdit( QWidget* parent, const char* name ) +PMBicubicPatchEdit::PMBicubicPatchEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -39,54 +39,54 @@ void PMBicubicPatchEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout; + TQHBoxLayout* layout; - m_pType = new QComboBox( false, this ); + m_pType = new TQComboBox( false, this ); m_pType->insertItem( i18n( "Normal (type 0)" ) ); m_pType->insertItem( i18n( "Preprocessed (type 1)" ) ); - layout = new QHBoxLayout( topLayout( ) ); - layout->addWidget( new QLabel( i18n( "Type:" ), this ) ); + layout = new TQHBoxLayout( topLayout( ) ); + layout->addWidget( new TQLabel( i18n( "Type:" ), this ) ); layout->addWidget( m_pType ); layout->addStretch( 1 ); m_pUSteps = new PMIntEdit( this ); m_pUSteps->setValidation( true, 0, false, 0 ); - layout = new QHBoxLayout( topLayout( ) ); - layout->addWidget( new QLabel( i18n( "Steps:" ) + " u", this ) ); + layout = new TQHBoxLayout( topLayout( ) ); + layout->addWidget( new TQLabel( i18n( "Steps:" ) + " u", this ) ); layout->addWidget( m_pUSteps ); m_pVSteps = new PMIntEdit( this ); m_pVSteps->setValidation( true, 0, false, 0 ); - layout->addWidget( new QLabel( "v", this ) ); + layout->addWidget( new TQLabel( "v", this ) ); layout->addWidget( m_pVSteps ); m_pFlatness = new PMFloatEdit( this ); m_pFlatness->setValidation( true, 0.0, false, 0.0 ); - layout = new QHBoxLayout( topLayout( ) ); - layout->addWidget( new QLabel( i18n( "Flatness:" ), this ) ); + layout = new TQHBoxLayout( topLayout( ) ); + layout->addWidget( new TQLabel( i18n( "Flatness:" ), this ) ); layout->addWidget( m_pFlatness ); layout->addStretch( 1 ); - topLayout( )->addWidget( new QLabel( i18n( "Points:" ), this ) ); + topLayout( )->addWidget( new TQLabel( i18n( "Points:" ), this ) ); m_pPoints = new PMVectorListEdit( "x", "y", "z", this ); m_pPoints->setSize( 16 ); topLayout( )->addWidget( m_pPoints ); - m_pUVEnabled = new QCheckBox( i18n( "UV vectors" ), this ); + m_pUVEnabled = new TQCheckBox( i18n( "UV vectors" ), this ); topLayout( )->addWidget( m_pUVEnabled ); m_pUVVectors = new PMVectorListEdit( "u", "v", this ); m_pUVVectors->setSize( 4 ); topLayout( )->addWidget( m_pUVVectors ); - connect( m_pType, SIGNAL( highlighted( int ) ), SLOT( slotTypeSelected( int ) ) ); - connect( m_pUSteps, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pVSteps, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFlatness, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPoints, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPoints, SIGNAL( selectionChanged( ) ), - SLOT( slotSelectionChanged( ) ) ); - connect( m_pUVEnabled, SIGNAL( clicked( ) ), SLOT( slotUVEnabledClicked( ) ) ); - connect( m_pUVVectors, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pType, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( slotTypeSelected( int ) ) ); + connect( m_pUSteps, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pVSteps, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFlatness, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPoints, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPoints, TQT_SIGNAL( selectionChanged( ) ), + TQT_SLOT( slotSelectionChanged( ) ) ); + connect( m_pUVEnabled, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotUVEnabledClicked( ) ) ); + connect( m_pUVVectors, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMBicubicPatchEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmbicubicpatchedit.h b/kpovmodeler/pmbicubicpatchedit.h index 41d173c1..ac00f00a 100644 --- a/kpovmodeler/pmbicubicpatchedit.h +++ b/kpovmodeler/pmbicubicpatchedit.h @@ -30,8 +30,8 @@ class PMBicubicPatch; class PMIntEdit; class PMFloatEdit; class PMVectorListEdit; -class QComboBox; -class QCheckBox; +class TQComboBox; +class TQCheckBox; /** * Dialog edit class for @ref PMBicubicPatch @@ -44,7 +44,7 @@ public: /** * Creates a PMBicubicPatchEdit with parent and name */ - PMBicubicPatchEdit( QWidget* parent, const char* name = 0 ); + PMBicubicPatchEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -65,12 +65,12 @@ protected: virtual void saveContents( ); private: - QComboBox* m_pType; + TQComboBox* m_pType; PMIntEdit* m_pUSteps; PMIntEdit* m_pVSteps; PMFloatEdit* m_pFlatness; PMVectorListEdit* m_pPoints; - QCheckBox* m_pUVEnabled; + TQCheckBox* m_pUVEnabled; PMVectorListEdit* m_pUVVectors; PMBicubicPatch* m_pDisplayedObject; diff --git a/kpovmodeler/pmblendmapmodifiers.cpp b/kpovmodeler/pmblendmapmodifiers.cpp index 0259fb90..9d26419e 100644 --- a/kpovmodeler/pmblendmapmodifiers.cpp +++ b/kpovmodeler/pmblendmapmodifiers.cpp @@ -85,12 +85,12 @@ PMMetaObject* PMBlendMapModifiers::metaObject( ) const PMWaveFormProperty* p = new PMWaveFormProperty( "waveForm", &PMBlendMapModifiers::setWaveFormType, &PMBlendMapModifiers::waveFormType ); - p->addEnumValue( QString( "RampWave" ), RampWave ); - p->addEnumValue( QString( "TriangleWave" ), TriangleWave ); - p->addEnumValue( QString( "SineWave" ), SineWave ); - p->addEnumValue( QString( "ScallopWave" ), ScallopWave ); - p->addEnumValue( QString( "CubicWave" ), CubicWave ); - p->addEnumValue( QString( "PolyWave" ), PolyWave ); + p->addEnumValue( TQString( "RampWave" ), RampWave ); + p->addEnumValue( TQString( "TriangleWave" ), TriangleWave ); + p->addEnumValue( TQString( "SineWave" ), SineWave ); + p->addEnumValue( TQString( "ScallopWave" ), ScallopWave ); + p->addEnumValue( TQString( "CubicWave" ), CubicWave ); + p->addEnumValue( TQString( "PolyWave" ), PolyWave ); s_pMetaObject->addProperty( p ); } return s_pMetaObject; @@ -106,12 +106,12 @@ void PMBlendMapModifiers::cleanUp( ) const Base::cleanUp( ); } -QString PMBlendMapModifiers::description( ) const +TQString PMBlendMapModifiers::description( ) const { return i18n( "blend map modifiers" ); } -void PMBlendMapModifiers::serialize( QDomElement& e, QDomDocument& ) const +void PMBlendMapModifiers::serialize( TQDomElement& e, TQDomDocument& ) const { e.setAttribute( "frequency", m_frequency ); e.setAttribute( "phase", m_phase ); @@ -144,7 +144,7 @@ void PMBlendMapModifiers::serialize( QDomElement& e, QDomDocument& ) const void PMBlendMapModifiers::readAttributes( const PMXMLHelper& h ) { - QString str = h.stringAttribute( "waveform_type", "ramp" ); + TQString str = h.stringAttribute( "waveform_type", "ramp" ); if( str == "ramp" ) m_waveFormType = RampWave; @@ -236,7 +236,7 @@ void PMBlendMapModifiers::setWaveFormType( PMWaveFormType c ) } } -PMDialogEditBase* PMBlendMapModifiers::editWidget( QWidget* parent ) const +PMDialogEditBase* PMBlendMapModifiers::editWidget( TQWidget* parent ) const { return new PMBlendMapModifiersEdit( parent ); } diff --git a/kpovmodeler/pmblendmapmodifiers.h b/kpovmodeler/pmblendmapmodifiers.h index 1fa45528..ecf0bfed 100644 --- a/kpovmodeler/pmblendmapmodifiers.h +++ b/kpovmodeler/pmblendmapmodifiers.h @@ -54,7 +54,7 @@ public: virtual PMObject* copy( ) const { return new PMBlendMapModifiers( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -62,16 +62,16 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMBlendMapModifiersEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmblendmapmodifiers" ); } + virtual TQString pixmap( ) const { return TQString( "pmblendmapmodifiers" ); } /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmblendmapmodifiersedit.cpp b/kpovmodeler/pmblendmapmodifiersedit.cpp index 8e8ff150..fd443623 100644 --- a/kpovmodeler/pmblendmapmodifiersedit.cpp +++ b/kpovmodeler/pmblendmapmodifiersedit.cpp @@ -24,20 +24,20 @@ #include "pmlineedits.h" #include "pmvector.h" -#include <qwidget.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include <ktabctl.h> #include <klocale.h> #include <kmessagebox.h> #include <kdialog.h> #include <kfiledialog.h> -PMBlendMapModifiersEdit::PMBlendMapModifiersEdit( QWidget* parent, const char* name ) +PMBlendMapModifiersEdit::PMBlendMapModifiersEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -45,27 +45,27 @@ PMBlendMapModifiersEdit::PMBlendMapModifiersEdit( QWidget* parent, const char* n void PMBlendMapModifiersEdit::createTopWidgets( ) { - QHBoxLayout* hl; + TQHBoxLayout* hl; Base::createTopWidgets( ); - hl = new QHBoxLayout( topLayout( ) ); - m_pEnableFrequencyEdit = new QCheckBox( i18n( "Frequency:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pEnableFrequencyEdit = new TQCheckBox( i18n( "Frequency:" ), this ); m_pFrequencyEdit = new PMFloatEdit( this ); hl->addWidget( m_pEnableFrequencyEdit ); hl->addWidget( m_pFrequencyEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - m_pEnablePhaseEdit = new QCheckBox( i18n( "Phase:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pEnablePhaseEdit = new TQCheckBox( i18n( "Phase:" ), this ); m_pPhaseEdit = new PMFloatEdit( this ); hl->addWidget( m_pEnablePhaseEdit ); hl->addWidget( m_pPhaseEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - m_pEnableWaveFormEdit = new QCheckBox( i18n( "Wave form:" ), this ); - m_pWaveTypeCombo = new QComboBox( this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pEnableWaveFormEdit = new TQCheckBox( i18n( "Wave form:" ), this ); + m_pWaveTypeCombo = new TQComboBox( this ); m_pWaveTypeCombo->insertItem( i18n( "Ramp" ) ); m_pWaveTypeCombo->insertItem( i18n( "Triangle" ) ); m_pWaveTypeCombo->insertItem( i18n( "Sine" ) ); @@ -76,25 +76,25 @@ void PMBlendMapModifiersEdit::createTopWidgets( ) hl->addWidget( m_pWaveTypeCombo ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - m_pWaveExponentLabel = new QLabel( i18n( "Exponent:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pWaveExponentLabel = new TQLabel( i18n( "Exponent:" ), this ); m_pWaveExponentEdit = new PMFloatEdit( this ); hl->addWidget( m_pWaveExponentLabel ); hl->addWidget( m_pWaveExponentEdit ); hl->addStretch( 1 ); - connect( m_pEnableFrequencyEdit, SIGNAL( clicked( ) ), SLOT( slotFrequencyClicked( ) ) ); - connect( m_pFrequencyEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEnablePhaseEdit, SIGNAL( clicked( ) ), SLOT( slotPhaseClicked( ) ) ); - connect( m_pPhaseEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEnableWaveFormEdit, SIGNAL( clicked( ) ), SLOT( slotWaveFormClicked( ) ) ); - connect( m_pWaveExponentEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pWaveTypeCombo, SIGNAL( activated( int ) ), SLOT( slotTypeComboChanged( int ) ) ); + connect( m_pEnableFrequencyEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFrequencyClicked( ) ) ); + connect( m_pFrequencyEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEnablePhaseEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotPhaseClicked( ) ) ); + connect( m_pPhaseEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEnableWaveFormEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotWaveFormClicked( ) ) ); + connect( m_pWaveExponentEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pWaveTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotTypeComboChanged( int ) ) ); } void PMBlendMapModifiersEdit::displayObject( PMObject* o ) { - QString str; + TQString str; if( o->isA( "BlendMapModifiers" ) ) { diff --git a/kpovmodeler/pmblendmapmodifiersedit.h b/kpovmodeler/pmblendmapmodifiersedit.h index eb4e40b5..18f3fa87 100644 --- a/kpovmodeler/pmblendmapmodifiersedit.h +++ b/kpovmodeler/pmblendmapmodifiersedit.h @@ -28,14 +28,14 @@ class PMBlendMapModifiers; class PMVectorEdit; -class QComboBox; +class TQComboBox; class PMFloatEdit; class PMIntEdit; -class QLabel; -class QCheckBox; -class QWidget; -class QLineEdit; -class QPushButton; +class TQLabel; +class TQCheckBox; +class TQWidget; +class TQLineEdit; +class TQPushButton; /** * Dialog edit class for @ref PMBlendMapModifiers. @@ -48,7 +48,7 @@ public: /** * Creates a PMBlendMapModifiersEdit with parent and name */ - PMBlendMapModifiersEdit( QWidget* parent, const char* name = 0 ); + PMBlendMapModifiersEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -86,14 +86,14 @@ private: void setBlendMapModifiersType( int i ); PMBlendMapModifiers* m_pDisplayedObject; - QComboBox* m_pWaveTypeCombo; + TQComboBox* m_pWaveTypeCombo; PMFloatEdit* m_pFrequencyEdit; PMFloatEdit* m_pPhaseEdit; PMFloatEdit* m_pWaveExponentEdit; - QLabel* m_pWaveExponentLabel; - QCheckBox* m_pEnableFrequencyEdit; - QCheckBox* m_pEnablePhaseEdit; - QCheckBox* m_pEnableWaveFormEdit; + TQLabel* m_pWaveExponentLabel; + TQCheckBox* m_pEnableFrequencyEdit; + TQCheckBox* m_pEnablePhaseEdit; + TQCheckBox* m_pEnableWaveFormEdit; }; diff --git a/kpovmodeler/pmblob.cpp b/kpovmodeler/pmblob.cpp index 800c3b5a..6621cadf 100644 --- a/kpovmodeler/pmblob.cpp +++ b/kpovmodeler/pmblob.cpp @@ -56,12 +56,12 @@ PMBlob::~PMBlob( ) { } -QString PMBlob::description( ) const +TQString PMBlob::description( ) const { return i18n( "blob" ); } -void PMBlob::serialize( QDomElement& e, QDomDocument& doc ) const +void PMBlob::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "threshold", m_threshold ); e.setAttribute( "sturm", m_sturm ); @@ -139,7 +139,7 @@ void PMBlob::setHierarchy( bool h ) } } -PMDialogEditBase* PMBlob::editWidget( QWidget* parent ) const +PMDialogEditBase* PMBlob::editWidget( TQWidget* parent ) const { return new PMBlobEdit( parent ); } diff --git a/kpovmodeler/pmblob.h b/kpovmodeler/pmblob.h index 986cec8c..2c764590 100644 --- a/kpovmodeler/pmblob.h +++ b/kpovmodeler/pmblob.h @@ -50,25 +50,25 @@ public: /** */ virtual PMObject* copy( ) const { return new PMBlob( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMBlobEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmblob" ); } + virtual TQString pixmap( ) const { return TQString( "pmblob" ); } /** * Returns the threshold diff --git a/kpovmodeler/pmblobcylinder.cpp b/kpovmodeler/pmblobcylinder.cpp index 687ce132..d166a6a3 100644 --- a/kpovmodeler/pmblobcylinder.cpp +++ b/kpovmodeler/pmblobcylinder.cpp @@ -70,12 +70,12 @@ PMBlobCylinder::~PMBlobCylinder( ) { } -QString PMBlobCylinder::description( ) const +TQString PMBlobCylinder::description( ) const { return i18n( "blob cylinder" ); } -void PMBlobCylinder::serialize( QDomElement& e, QDomDocument& doc ) const +void PMBlobCylinder::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "end_a", m_end1.serializeXML( ) ); e.setAttribute( "end_b", m_end2.serializeXML( ) ); @@ -160,7 +160,7 @@ void PMBlobCylinder::setStrength( double s ) } } -PMDialogEditBase* PMBlobCylinder::editWidget( QWidget* parent ) const +PMDialogEditBase* PMBlobCylinder::editWidget( TQWidget* parent ) const { return new PMBlobCylinderEdit( parent ); } diff --git a/kpovmodeler/pmblobcylinder.h b/kpovmodeler/pmblobcylinder.h index 80986cfe..1e9a10f1 100644 --- a/kpovmodeler/pmblobcylinder.h +++ b/kpovmodeler/pmblobcylinder.h @@ -54,23 +54,23 @@ public: virtual PMObject* copy( ) const { return new PMBlobCylinder( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMBlobCylinderEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ - virtual QString pixmap( ) const { return QString( "pmblobcylinder" ); } + virtual TQString pixmap( ) const { return TQString( "pmblobcylinder" ); } /** * Return the end_1 diff --git a/kpovmodeler/pmblobcylinderedit.cpp b/kpovmodeler/pmblobcylinderedit.cpp index 9313b8af..34910df0 100644 --- a/kpovmodeler/pmblobcylinderedit.cpp +++ b/kpovmodeler/pmblobcylinderedit.cpp @@ -21,12 +21,12 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> -PMBlobCylinderEdit::PMBlobCylinderEdit( QWidget* parent, const char* name ) +PMBlobCylinderEdit::PMBlobCylinderEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -36,32 +36,32 @@ void PMBlobCylinderEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout; - QGridLayout* gl; + TQHBoxLayout* layout; + TQGridLayout* gl; m_pEnd1 = new PMVectorEdit( "x", "y", "z", this ); m_pEnd2 = new PMVectorEdit( "x", "y", "z", this ); m_pRadius = new PMFloatEdit( this ); m_pStrength = new PMFloatEdit( this ); - gl = new QGridLayout( topLayout( ), 2, 2 ); - gl->addWidget( new QLabel( i18n( "End 1:" ), this ), 0, 0 ); + gl = new TQGridLayout( topLayout( ), 2, 2 ); + gl->addWidget( new TQLabel( i18n( "End 1:" ), this ), 0, 0 ); gl->addWidget( m_pEnd1, 0, 1 ); - gl->addWidget( new QLabel( i18n( "End 2:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 ); gl->addWidget( m_pEnd2, 1, 1 ); - layout = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( layout, 2, 2 ); - gl->addWidget( new QLabel( i18n( "Radius:" ), this ), 0, 0 ); + layout = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( layout, 2, 2 ); + gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 ); gl->addWidget( m_pRadius, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Strength:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Strength:" ), this ), 1, 0 ); gl->addWidget( m_pStrength, 1, 1 ); layout->addStretch( 1 ); - connect( m_pEnd1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEnd2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pStrength, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pEnd1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEnd2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pStrength, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMBlobCylinderEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmblobcylinderedit.h b/kpovmodeler/pmblobcylinderedit.h index d156e412..b9ab169e 100644 --- a/kpovmodeler/pmblobcylinderedit.h +++ b/kpovmodeler/pmblobcylinderedit.h @@ -38,7 +38,7 @@ public: /** * Creates a PMBlobCylinderEdit with parent and name */ - PMBlobCylinderEdit( QWidget* parent, const char* name = 0 ); + PMBlobCylinderEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmblobedit.cpp b/kpovmodeler/pmblobedit.cpp index 80ebd510..a38d9639 100644 --- a/kpovmodeler/pmblobedit.cpp +++ b/kpovmodeler/pmblobedit.cpp @@ -20,12 +20,12 @@ #include "pmblob.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> #include <klocale.h> -PMBlobEdit::PMBlobEdit( QWidget* parent, const char* name ) +PMBlobEdit::PMBlobEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -35,8 +35,8 @@ void PMBlobEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Threshold:" ), this ) ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Threshold:" ), this ) ); m_pThreshold = new PMFloatEdit( this ); hl->addWidget( m_pThreshold ); m_pThreshold->setValidation( true, 0.0, false, 0 ); @@ -44,14 +44,14 @@ void PMBlobEdit::createTopWidgets( ) PMFloatEdit::OpLess ); hl->addStretch( 1 ); - m_pSturm = new QCheckBox( i18n( "Sturm" ), this ); + m_pSturm = new TQCheckBox( i18n( "Sturm" ), this ); topLayout( )->addWidget( m_pSturm ); - m_pHierarchy = new QCheckBox( i18n( "Hierarchy" ), this ); + m_pHierarchy = new TQCheckBox( i18n( "Hierarchy" ), this ); topLayout( )->addWidget( m_pHierarchy ); - connect( m_pThreshold, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pHierarchy, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pThreshold, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pHierarchy, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMBlobEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmblobedit.h b/kpovmodeler/pmblobedit.h index df07ba30..5677fb9b 100644 --- a/kpovmodeler/pmblobedit.h +++ b/kpovmodeler/pmblobedit.h @@ -28,7 +28,7 @@ class PMBlob; class PMFloatEdit; -class QCheckBox; +class TQCheckBox; /** * Dialog edit class for @ref PMBlob @@ -41,7 +41,7 @@ public: /** * Creates a PMBlobEdit with parent and name */ - PMBlobEdit( QWidget* parent, const char* name = 0 ); + PMBlobEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -57,8 +57,8 @@ protected: private: PMBlob* m_pDisplayedObject; PMFloatEdit* m_pThreshold; - QCheckBox* m_pSturm; - QCheckBox* m_pHierarchy; + TQCheckBox* m_pSturm; + TQCheckBox* m_pHierarchy; }; diff --git a/kpovmodeler/pmblobsphere.cpp b/kpovmodeler/pmblobsphere.cpp index 6ca96769..cbcd33a4 100644 --- a/kpovmodeler/pmblobsphere.cpp +++ b/kpovmodeler/pmblobsphere.cpp @@ -67,7 +67,7 @@ PMBlobSphere::~PMBlobSphere( ) } -QString PMBlobSphere::description( ) const +TQString PMBlobSphere::description( ) const { return i18n( "blob sphere" ); } @@ -91,7 +91,7 @@ PMMetaObject* PMBlobSphere::metaObject( ) const return s_pMetaObject; } -void PMBlobSphere::serialize( QDomElement& e, QDomDocument& doc ) const +void PMBlobSphere::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "centre", m_centre.serializeXML( ) ); e.setAttribute( "radius", m_radius ); @@ -107,7 +107,7 @@ void PMBlobSphere::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMBlobSphere::editWidget( QWidget* parent ) const +PMDialogEditBase* PMBlobSphere::editWidget( TQWidget* parent ) const { return new PMBlobSphereEdit( parent ); } diff --git a/kpovmodeler/pmblobsphere.h b/kpovmodeler/pmblobsphere.h index bb75b856..0abe983e 100644 --- a/kpovmodeler/pmblobsphere.h +++ b/kpovmodeler/pmblobsphere.h @@ -52,24 +52,24 @@ public: /** */ virtual PMObject* copy( ) const { return new PMBlobSphere( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMBlobSphereEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmblobsphere" ); } + virtual TQString pixmap( ) const { return TQString( "pmblobsphere" ); } /** * Returns the centre of the sphere diff --git a/kpovmodeler/pmblobsphereedit.cpp b/kpovmodeler/pmblobsphereedit.cpp index 26291248..ba4e226b 100644 --- a/kpovmodeler/pmblobsphereedit.cpp +++ b/kpovmodeler/pmblobsphereedit.cpp @@ -20,11 +20,11 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMBlobSphereEdit::PMBlobSphereEdit( QWidget* parent, const char* name ) +PMBlobSphereEdit::PMBlobSphereEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -34,27 +34,27 @@ void PMBlobSphereEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout; + TQHBoxLayout* layout; m_pCentre = new PMVectorEdit( "x", "y", "z", this ); m_pRadius = new PMFloatEdit( this ); m_pStrength = new PMFloatEdit( this ); - layout = new QHBoxLayout( topLayout( ) ); - layout->addWidget( new QLabel( i18n( "Center:" ), this ) ); + layout = new TQHBoxLayout( topLayout( ) ); + layout->addWidget( new TQLabel( i18n( "Center:" ), this ) ); layout->addWidget( m_pCentre ); - layout = new QHBoxLayout( topLayout( ) ); - QGridLayout* gl = new QGridLayout( layout, 2, 2 ); - gl->addWidget( new QLabel( i18n( "Radius:" ), this ), 0, 0 ); + layout = new TQHBoxLayout( topLayout( ) ); + TQGridLayout* gl = new TQGridLayout( layout, 2, 2 ); + gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 ); gl->addWidget( m_pRadius, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Strength:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Strength:" ), this ), 1, 0 ); gl->addWidget( m_pStrength, 1, 1 ); layout->addStretch( 1 ); - connect( m_pCentre, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pStrength, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pCentre, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pStrength, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMBlobSphereEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmblobsphereedit.h b/kpovmodeler/pmblobsphereedit.h index 08f0f1d4..53b65ab2 100644 --- a/kpovmodeler/pmblobsphereedit.h +++ b/kpovmodeler/pmblobsphereedit.h @@ -39,7 +39,7 @@ public: /** * Creates a PMBlobSphereEdit with parent and name */ - PMBlobSphereEdit( QWidget* parent, const char* name = 0 ); + PMBlobSphereEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmboundedby.cpp b/kpovmodeler/pmboundedby.cpp index 127a05f8..5cc66e55 100644 --- a/kpovmodeler/pmboundedby.cpp +++ b/kpovmodeler/pmboundedby.cpp @@ -62,7 +62,7 @@ void PMBoundedBy::cleanUp( ) const Base::cleanUp( ); } -QString PMBoundedBy::description( ) const +TQString PMBoundedBy::description( ) const { return i18n( "bounded by" ); } @@ -79,7 +79,7 @@ bool PMBoundedBy::clippedBy( ) const return cb; } -void PMBoundedBy::serialize( QDomElement& e, QDomDocument& doc ) const +void PMBoundedBy::serialize( TQDomElement& e, TQDomDocument& doc ) const { // no extra data at the moment Base::serialize( e, doc ); @@ -91,7 +91,7 @@ void PMBoundedBy::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMBoundedBy::editWidget( QWidget* parent ) const +PMDialogEditBase* PMBoundedBy::editWidget( TQWidget* parent ) const { return new PMBoundedByEdit( parent ); } diff --git a/kpovmodeler/pmboundedby.h b/kpovmodeler/pmboundedby.h index 22ac3fb4..7c88a6aa 100644 --- a/kpovmodeler/pmboundedby.h +++ b/kpovmodeler/pmboundedby.h @@ -46,7 +46,7 @@ public: virtual PMObject* copy( ) const { return new PMBoundedBy( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -57,19 +57,19 @@ public: virtual bool dataChangeOnInsertRemove( ) const { return true; } /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMBoundedByEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmboundedby" ); } + virtual TQString pixmap( ) const { return TQString( "pmboundedby" ); } /** */ virtual void childRemoved( PMObject* ); diff --git a/kpovmodeler/pmboundedbyedit.cpp b/kpovmodeler/pmboundedbyedit.cpp index 2bf1409e..8a41fa52 100644 --- a/kpovmodeler/pmboundedbyedit.cpp +++ b/kpovmodeler/pmboundedbyedit.cpp @@ -19,11 +19,11 @@ #include "pmboundedbyedit.h" #include "pmboundedby.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMBoundedByEdit::PMBoundedByEdit( QWidget* parent, const char* name ) +PMBoundedByEdit::PMBoundedByEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -33,9 +33,9 @@ void PMBoundedByEdit::createTopWidgets( ) { Base::createTopWidgets( ); - m_pChildLabel = new QLabel( i18n( "No child objects" ), this ); + m_pChildLabel = new TQLabel( i18n( "No child objects" ), this ); topLayout( )->addWidget( m_pChildLabel ); - m_pClippedByLabel = new QLabel( i18n( "(= clipped by)" ), this ); + m_pClippedByLabel = new TQLabel( i18n( "(= clipped by)" ), this ); topLayout( )->addWidget( m_pClippedByLabel ); } diff --git a/kpovmodeler/pmboundedbyedit.h b/kpovmodeler/pmboundedbyedit.h index f4d24a41..53da66f2 100644 --- a/kpovmodeler/pmboundedbyedit.h +++ b/kpovmodeler/pmboundedbyedit.h @@ -27,7 +27,7 @@ #include "pmdialogeditbase.h" class PMBoundedBy; -class QLabel; +class TQLabel; /** * Dialog edit class for @ref PMBoundedBy @@ -40,7 +40,7 @@ public: /** * Creates a PMBoundedByEdit with parent and name */ - PMBoundedByEdit( QWidget* parent, const char* name = 0 ); + PMBoundedByEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -51,8 +51,8 @@ protected: private: PMBoundedBy* m_pDisplayedObject; - QLabel* m_pChildLabel; - QLabel* m_pClippedByLabel; + TQLabel* m_pChildLabel; + TQLabel* m_pClippedByLabel; }; diff --git a/kpovmodeler/pmbox.cpp b/kpovmodeler/pmbox.cpp index 045389bb..155ebc68 100644 --- a/kpovmodeler/pmbox.cpp +++ b/kpovmodeler/pmbox.cpp @@ -57,12 +57,12 @@ PMBox::~PMBox( ) { } -QString PMBox::description( ) const +TQString PMBox::description( ) const { return i18n( "box" ); } -void PMBox::serialize( QDomElement& e, QDomDocument& doc ) const +void PMBox::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "corner_a", m_corner1.serializeXML( ) ); e.setAttribute( "corner_b", m_corner2.serializeXML( ) ); @@ -114,7 +114,7 @@ void PMBox::setCorner2( const PMVector& p ) } } -PMDialogEditBase* PMBox::editWidget( QWidget* parent ) const +PMDialogEditBase* PMBox::editWidget( TQWidget* parent ) const { return new PMBoxEdit( parent ); } diff --git a/kpovmodeler/pmbox.h b/kpovmodeler/pmbox.h index d6627ffe..e6abcf75 100644 --- a/kpovmodeler/pmbox.h +++ b/kpovmodeler/pmbox.h @@ -53,24 +53,24 @@ public: /** */ virtual PMObject* copy( ) const { return new PMBox( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMBoxEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmbox" ); } + virtual TQString pixmap( ) const { return TQString( "pmbox" ); } /** * Returns Corner_1 diff --git a/kpovmodeler/pmboxedit.cpp b/kpovmodeler/pmboxedit.cpp index 2db1eb79..6b6a2f2a 100644 --- a/kpovmodeler/pmboxedit.cpp +++ b/kpovmodeler/pmboxedit.cpp @@ -20,11 +20,11 @@ #include "pmbox.h" #include "pmvectoredit.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMBoxEdit::PMBoxEdit( QWidget* parent, const char* name ) +PMBoxEdit::PMBoxEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,14 +37,14 @@ void PMBoxEdit::createTopWidgets( ) m_pCorner1 = new PMVectorEdit( "x", "y", "z", this ); m_pCorner2 = new PMVectorEdit( "x", "y", "z", this ); - QGridLayout* gl = new QGridLayout( topLayout( ), 2, 2 ); - gl->addWidget( new QLabel( i18n( "Corner 1:" ), this ), 0, 0 ); + TQGridLayout* gl = new TQGridLayout( topLayout( ), 2, 2 ); + gl->addWidget( new TQLabel( i18n( "Corner 1:" ), this ), 0, 0 ); gl->addWidget( m_pCorner1, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Corner 2:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Corner 2:" ), this ), 1, 0 ); gl->addWidget( m_pCorner2, 1, 1 ); - connect( m_pCorner1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCorner2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pCorner1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCorner2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMBoxEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmboxedit.h b/kpovmodeler/pmboxedit.h index 4f87ceac..7fd6fadc 100644 --- a/kpovmodeler/pmboxedit.h +++ b/kpovmodeler/pmboxedit.h @@ -40,7 +40,7 @@ public: /** * Creates a PMBoxEdit with parent and name */ - PMBoxEdit( QWidget* parent, const char* name = 0 ); + PMBoxEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmbumpmap.cpp b/kpovmodeler/pmbumpmap.cpp index e9549bd9..21fb29a3 100644 --- a/kpovmodeler/pmbumpmap.cpp +++ b/kpovmodeler/pmbumpmap.cpp @@ -82,7 +82,7 @@ PMBumpMap::~PMBumpMap( ) { } -void PMBumpMap::serialize( QDomElement& e, QDomDocument& doc ) const +void PMBumpMap::serialize( TQDomElement& e, TQDomDocument& doc ) const { switch( m_bitmapType ) { @@ -151,7 +151,7 @@ void PMBumpMap::serialize( QDomElement& e, QDomDocument& doc ) const void PMBumpMap::readAttributes( const PMXMLHelper& h ) { - QString str; + TQString str; str = h.stringAttribute( "bitmap_type", "sys" ); if( str == "gif" ) @@ -261,7 +261,7 @@ void PMBumpMap::cleanUp( ) const } -QString PMBumpMap::description( ) const +TQString PMBumpMap::description( ) const { return i18n( "bump map" ); } @@ -276,7 +276,7 @@ void PMBumpMap::setBitmapType( PMBitmapType c ) } } -void PMBumpMap::setBitmapFileName( const QString& c ) +void PMBumpMap::setBitmapFileName( const TQString& c ) { if( c != m_bitmapFile ) { @@ -336,7 +336,7 @@ void PMBumpMap::setBumpSize( double c ) } } -PMDialogEditBase* PMBumpMap::editWidget( QWidget* parent ) const +PMDialogEditBase* PMBumpMap::editWidget( TQWidget* parent ) const { return new PMBumpMapEdit( parent ); } diff --git a/kpovmodeler/pmbumpmap.h b/kpovmodeler/pmbumpmap.h index 69bf53a3..ccdf5b98 100644 --- a/kpovmodeler/pmbumpmap.h +++ b/kpovmodeler/pmbumpmap.h @@ -69,7 +69,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMBumpMap( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -77,17 +77,17 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmbumpmap" ); } + virtual TQString pixmap( ) const { return TQString( "pmbumpmap" ); } /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMBumpMapEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Gets the bitmap type @@ -96,7 +96,7 @@ public: /** * Gets the bitmap file name */ - QString bitmapFile( ) const { return m_bitmapFile; } + TQString bitmapFile( ) const { return m_bitmapFile; } /** * Returns true if use_index is enabled */ @@ -125,7 +125,7 @@ public: void setBitmapType( PMBitmapType c ); /** * Sets the bitmap file name*/ - void setBitmapFileName( const QString& c ); + void setBitmapFileName( const TQString& c ); /** * Sets if use_index is enabled */ @@ -159,7 +159,7 @@ private: * BumpMap type */ PMBitmapType m_bitmapType; - QString m_bitmapFile; + TQString m_bitmapFile; bool m_once; PMMapType m_mapType; PMInterpolateType m_interpolateType; diff --git a/kpovmodeler/pmbumpmapedit.cpp b/kpovmodeler/pmbumpmapedit.cpp index d792cec2..f5de7a55 100644 --- a/kpovmodeler/pmbumpmapedit.cpp +++ b/kpovmodeler/pmbumpmapedit.cpp @@ -23,14 +23,14 @@ #include "pmpalettevalueedit.h" #include "pmvector.h" -#include <qwidget.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> #include <ktabctl.h> #include <klocale.h> #include <kmessagebox.h> @@ -38,7 +38,7 @@ #include <kfiledialog.h> #include <kiconloader.h> -PMBumpMapEdit::PMBumpMapEdit( QWidget* parent, const char* name ) +PMBumpMapEdit::PMBumpMapEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -46,14 +46,14 @@ PMBumpMapEdit::PMBumpMapEdit( QWidget* parent, const char* name ) void PMBumpMapEdit::createTopWidgets( ) { - QLabel* lbl; - QHBoxLayout* hl; + TQLabel* lbl; + TQHBoxLayout* hl; Base::createTopWidgets( ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "File type:" ), this ); - m_pImageFileTypeEdit = new QComboBox( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "File type:" ), this ); + m_pImageFileTypeEdit = new TQComboBox( this ); m_pImageFileTypeEdit->insertItem( "gif" ); m_pImageFileTypeEdit->insertItem( "tga" ); m_pImageFileTypeEdit->insertItem( "iff" ); @@ -66,22 +66,22 @@ void PMBumpMapEdit::createTopWidgets( ) hl->addWidget( lbl ); hl->addWidget( m_pImageFileTypeEdit ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "File name:" ), this ); - m_pImageFileNameEdit = new QLineEdit( this ); - m_pImageFileNameBrowse = new QPushButton( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "File name:" ), this ); + m_pImageFileNameEdit = new TQLineEdit( this ); + m_pImageFileNameBrowse = new TQPushButton( this ); m_pImageFileNameBrowse->setPixmap( SmallIcon( "fileopen" ) ); hl->addWidget( lbl ); hl->addWidget( m_pImageFileNameEdit ); hl->addWidget( m_pImageFileNameBrowse ); hl->addStretch( 1 ); - m_pOnceEdit = new QCheckBox( i18n( "Once" ), this ); + m_pOnceEdit = new TQCheckBox( i18n( "Once" ), this ); topLayout( )->addWidget( m_pOnceEdit ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Interpolate:" ), this ); - m_pInterpolateTypeEdit = new QComboBox( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Interpolate:" ), this ); + m_pInterpolateTypeEdit = new TQComboBox( this ); m_pInterpolateTypeEdit->insertItem( i18n( "None" ) ); m_pInterpolateTypeEdit->insertItem( i18n( "Bilinear" ) ); m_pInterpolateTypeEdit->insertItem( i18n( "Normalized" ) ); @@ -89,9 +89,9 @@ void PMBumpMapEdit::createTopWidgets( ) hl->addWidget( m_pInterpolateTypeEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Map type:" ), this ); - m_pMapTypeEdit = new QComboBox( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Map type:" ), this ); + m_pMapTypeEdit = new TQComboBox( this ); m_pMapTypeEdit->insertItem( i18n( "Planar" ) ); m_pMapTypeEdit->insertItem( i18n( "Spherical" ) ); m_pMapTypeEdit->insertItem( i18n( "Cylindrical" ) ); @@ -100,24 +100,24 @@ void PMBumpMapEdit::createTopWidgets( ) hl->addWidget( m_pMapTypeEdit ); hl->addStretch( 1 ); - m_pUseIndexEdit = new QCheckBox( i18n( "Use index" ), this ); + m_pUseIndexEdit = new TQCheckBox( i18n( "Use index" ), this ); topLayout( )->addWidget( m_pUseIndexEdit ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Bump size:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Bump size:" ), this ); m_pBumpSizeEdit = new PMFloatEdit( this ); hl->addWidget( lbl ); hl->addWidget( m_pBumpSizeEdit ); hl->addStretch( 1 ); - connect( m_pImageFileTypeEdit, SIGNAL( activated( int ) ), SLOT( slotImageFileTypeChanged( int ) ) ); - connect( m_pMapTypeEdit, SIGNAL( activated( int ) ), SLOT( slotMapTypeChanged( int ) ) ); - connect( m_pInterpolateTypeEdit, SIGNAL( activated( int ) ), SLOT( slotInterpolateTypeChanged( int ) ) ); - connect( m_pImageFileNameBrowse, SIGNAL( clicked( ) ), SLOT( slotImageFileBrowseClicked( ) ) ); - connect( m_pImageFileNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotImageFileNameChanged( const QString& ) ) ); - connect( m_pOnceEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pUseIndexEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pBumpSizeEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pImageFileTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotImageFileTypeChanged( int ) ) ); + connect( m_pMapTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotMapTypeChanged( int ) ) ); + connect( m_pInterpolateTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotInterpolateTypeChanged( int ) ) ); + connect( m_pImageFileNameBrowse, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotImageFileBrowseClicked( ) ) ); + connect( m_pImageFileNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotImageFileNameChanged( const TQString& ) ) ); + connect( m_pOnceEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pUseIndexEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pBumpSizeEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMBumpMapEdit::displayObject( PMObject* o ) @@ -300,14 +300,14 @@ void PMBumpMapEdit::slotMapTypeChanged( const int /*a*/ ) emit dataChanged( ); } -void PMBumpMapEdit::slotImageFileNameChanged( const QString& /*a*/ ) +void PMBumpMapEdit::slotImageFileNameChanged( const TQString& /*a*/ ) { emit dataChanged( ); } void PMBumpMapEdit::slotImageFileBrowseClicked( ) { - QString str = KFileDialog::getOpenFileName( QString::null, QString::null ); + TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmbumpmapedit.h b/kpovmodeler/pmbumpmapedit.h index cceb2b84..109128d6 100644 --- a/kpovmodeler/pmbumpmapedit.h +++ b/kpovmodeler/pmbumpmapedit.h @@ -30,14 +30,14 @@ class PMBumpMap; class PMPaletteValue; class PMVectorEdit; -class QComboBox; +class TQComboBox; class PMFloatEdit; class PMIntEdit; -class QLabel; -class QCheckBox; -class QWidget; -class QLineEdit; -class QPushButton; +class TQLabel; +class TQCheckBox; +class TQWidget; +class TQLineEdit; +class TQPushButton; /** * Dialog edit class for @ref PMBumpMap. @@ -50,7 +50,7 @@ public: /** * Creates a PMBumpMapEdit with parent and name */ - PMBumpMapEdit( QWidget* parent, const char* name = 0 ); + PMBumpMapEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); /** */ @@ -68,18 +68,18 @@ private slots: /** */ void slotInterpolateTypeChanged( int a ); /** */ - void slotImageFileNameChanged( const QString& a ); + void slotImageFileNameChanged( const TQString& a ); /** */ void slotImageFileBrowseClicked( ); private: PMBumpMap* m_pDisplayedObject; - QComboBox* m_pImageFileTypeEdit; - QLineEdit* m_pImageFileNameEdit; - QPushButton* m_pImageFileNameBrowse; - QCheckBox* m_pOnceEdit; - QComboBox* m_pMapTypeEdit; - QComboBox* m_pInterpolateTypeEdit; - QCheckBox* m_pUseIndexEdit; + TQComboBox* m_pImageFileTypeEdit; + TQLineEdit* m_pImageFileNameEdit; + TQPushButton* m_pImageFileNameBrowse; + TQCheckBox* m_pOnceEdit; + TQComboBox* m_pMapTypeEdit; + TQComboBox* m_pInterpolateTypeEdit; + TQCheckBox* m_pUseIndexEdit; PMFloatEdit* m_pBumpSizeEdit; }; diff --git a/kpovmodeler/pmcamera.cpp b/kpovmodeler/pmcamera.cpp index b224f340..ca37f751 100644 --- a/kpovmodeler/pmcamera.cpp +++ b/kpovmodeler/pmcamera.cpp @@ -114,12 +114,12 @@ PMCamera::~PMCamera( ) { } -QString PMCamera::description( ) const +TQString PMCamera::description( ) const { return i18n( "camera" ); } -void PMCamera::serialize( QDomElement& e, QDomDocument& doc ) const +void PMCamera::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "camera_type", cameraTypeToString( m_cameraType ) ); e.setAttribute( "cylinder_type", m_cylinderType ); @@ -443,7 +443,7 @@ void PMCamera::setExportPovray( bool ex ) } } -PMDialogEditBase* PMCamera::editWidget( QWidget* parent ) const +PMDialogEditBase* PMCamera::editWidget( TQWidget* parent ) const { return new PMCameraEdit( parent ); } @@ -699,9 +699,9 @@ void PMCamera::calculateLookAtAngle( PMVector& right, PMVector& up, PMVector& di up *= upLen; } -QString PMCamera::cameraTypeToString( PMCamera::CameraType t ) +TQString PMCamera::cameraTypeToString( PMCamera::CameraType t ) { - QString str( "perspective" ); + TQString str( "perspective" ); switch( t ) { case Perspective: @@ -728,7 +728,7 @@ QString PMCamera::cameraTypeToString( PMCamera::CameraType t ) return str; } -PMCamera::CameraType PMCamera::stringToCameraType( const QString& str ) +PMCamera::CameraType PMCamera::stringToCameraType( const TQString& str ) { CameraType t = Perspective; diff --git a/kpovmodeler/pmcamera.h b/kpovmodeler/pmcamera.h index 9f09ee58..7d385909 100644 --- a/kpovmodeler/pmcamera.h +++ b/kpovmodeler/pmcamera.h @@ -57,22 +57,22 @@ public: /** */ virtual PMObject* copy( ) const { return new PMCamera( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMCameraEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmcamera" ); } + virtual TQString pixmap( ) const { return TQString( "pmcamera" ); } /** * Returns the location @@ -243,11 +243,11 @@ public: /** * Converts the camera type to a string */ - static QString cameraTypeToString( CameraType t ); + static TQString cameraTypeToString( CameraType t ); /** * Converts a string to the camera type */ - static CameraType stringToCameraType( const QString& s ); + static CameraType stringToCameraType( const TQString& s ); /** */ virtual void cleanUp( ) const; diff --git a/kpovmodeler/pmcameraedit.cpp b/kpovmodeler/pmcameraedit.cpp index 676c9f8b..471fa19a 100644 --- a/kpovmodeler/pmcameraedit.cpp +++ b/kpovmodeler/pmcameraedit.cpp @@ -21,16 +21,16 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kmessagebox.h> -PMCameraEdit::PMCameraEdit( QWidget* parent, const char* name ) +PMCameraEdit::PMCameraEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -40,10 +40,10 @@ void PMCameraEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QGridLayout* layout; - QLabel* label; + TQGridLayout* layout; + TQLabel* label; - m_pCameraType = new QComboBox( false, this ); + m_pCameraType = new TQComboBox( false, this ); m_pCameraType->insertItem( i18n( "Perspective" ) ); m_pCameraType->insertItem( i18n( "Orthographic" ) ); m_pCameraType->insertItem( i18n( "Fish Eye" ) ); @@ -52,7 +52,7 @@ void PMCameraEdit::createTopWidgets( ) m_pCameraType->insertItem( i18n( "Panoramic" ) ); m_pCameraType->insertItem( i18n( "Cylinder" ) ); - m_pCylinderType = new QComboBox( false, this ); + m_pCylinderType = new TQComboBox( false, this ); m_pCylinderType->insertItem( i18n( "1: Vertical, Fixed Viewpoint" ) ); m_pCylinderType->insertItem( i18n( "2: Horizontal, Fixed Viewpoint" ) ); m_pCylinderType->insertItem( i18n( "3: Vertical, Variable Viewpoint" ) ); @@ -67,38 +67,38 @@ void PMCameraEdit::createTopWidgets( ) m_pAngle = new PMFloatEdit( this ); m_pAngle->setValidation( true, 0.0, true, 360.0 ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Camera type:" ), this ) ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Camera type:" ), this ) ); hl->addWidget( m_pCameraType ); - hl = new QHBoxLayout( topLayout( ) ); - m_pCylinderTypeLabel = new QLabel( i18n( "Cylinder type:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pCylinderTypeLabel = new TQLabel( i18n( "Cylinder type:" ), this ); hl->addWidget( m_pCylinderTypeLabel ); hl->addWidget( m_pCylinderType ); - layout = new QGridLayout( topLayout( ), 7, 2 ); - layout->addWidget( new QLabel( i18n( "Location:" ), this ), 0, 0 ); + layout = new TQGridLayout( topLayout( ), 7, 2 ); + layout->addWidget( new TQLabel( i18n( "Location:" ), this ), 0, 0 ); layout->addWidget( m_pLocation, 0, 1 ); - layout->addWidget( new QLabel( i18n( "Sky:" ), this ), 1, 0 ); + layout->addWidget( new TQLabel( i18n( "Sky:" ), this ), 1, 0 ); layout->addWidget( m_pSky, 1, 1 ); - layout->addWidget( new QLabel( i18n( "Direction:" ), this ), 2, 0 ); + layout->addWidget( new TQLabel( i18n( "Direction:" ), this ), 2, 0 ); layout->addWidget( m_pDirection, 2, 1 ); - layout->addWidget( new QLabel( i18n( "Right:" ), this ), 3, 0 ); + layout->addWidget( new TQLabel( i18n( "Right:" ), this ), 3, 0 ); layout->addWidget( m_pRight, 3, 1 ); - layout->addWidget( new QLabel( i18n( "Up:" ), this ), 4, 0 ); + layout->addWidget( new TQLabel( i18n( "Up:" ), this ), 4, 0 ); layout->addWidget( m_pUp, 4, 1 ); - layout->addWidget( new QLabel( i18n( "Look at:" ), this ), 5, 0 ); + layout->addWidget( new TQLabel( i18n( "Look at:" ), this ), 5, 0 ); layout->addWidget( m_pLookAt, 5, 1 ); - m_pEnableAngle = new QCheckBox( i18n( "Angle:" ), this ); + m_pEnableAngle = new TQCheckBox( i18n( "Angle:" ), this ); layout->addWidget( m_pEnableAngle, 6, 0 ); layout->addWidget( m_pAngle, 6, 1, AlignLeft ); - m_pFocalBlur = new QCheckBox( i18n( "Focal blur" ), this ); + m_pFocalBlur = new TQCheckBox( i18n( "Focal blur" ), this ); topLayout( )->addWidget( m_pFocalBlur ); m_pAperture = new PMFloatEdit( this ); @@ -116,54 +116,54 @@ void PMCameraEdit::createTopWidgets( ) m_pVariance->setValidation( true, 0, false, 0 ); m_focalWidgets.append( m_pVariance ); - layout = new QGridLayout( topLayout( ), 5, 2 ); - label = new QLabel( i18n( "Aperture:" ), this ); + layout = new TQGridLayout( topLayout( ), 5, 2 ); + label = new TQLabel( i18n( "Aperture:" ), this ); m_focalWidgets.append( label ); layout->addWidget( label, 0, 0 ); layout->addWidget( m_pAperture, 0, 1 ); - label = new QLabel( i18n( "Blur samples:" ), this ); + label = new TQLabel( i18n( "Blur samples:" ), this ); m_focalWidgets.append( label ); layout->addWidget( label, 1, 0 ); layout->addWidget( m_pBlurSamples, 1, 1 ); - label = new QLabel( i18n( "Focal point:" ), this ); + label = new TQLabel( i18n( "Focal point:" ), this ); m_focalWidgets.append( label ); layout->addWidget( label, 2, 0 ); layout->addWidget( m_pFocalPoint, 2, 1 ); - label = new QLabel( i18n( "Confidence:" ), this ); + label = new TQLabel( i18n( "Confidence:" ), this ); m_focalWidgets.append( label ); layout->addWidget( label, 3, 0 ); layout->addWidget( m_pConfidence, 3, 1 ); - label = new QLabel( i18n( "Variance:" ), this ); + label = new TQLabel( i18n( "Variance:" ), this ); m_focalWidgets.append( label ); layout->addWidget( label, 4, 0 ); layout->addWidget( m_pVariance, 4, 1 ); - m_pExport = new QCheckBox( i18n( "Export to renderer" ), this ); + m_pExport = new TQCheckBox( i18n( "Export to renderer" ), this ); topLayout( )->addWidget( m_pExport ); - connect( m_pLocation, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDirection, SIGNAL( dataChanged( ) ), SLOT( slotDirectionChanged( ) ) ); - connect( m_pRight, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRight, SIGNAL( dataChanged( ) ), SLOT( slotRightChanged( ) ) ); - connect( m_pUp, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSky, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pLookAt, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEnableAngle, SIGNAL( toggled( bool ) ), - SLOT( slotAngleToggled( bool ) ) ); - connect( m_pAngle, SIGNAL( dataChanged( ) ), SLOT( slotAngleChanged( ) ) ); - connect( m_pCameraType, SIGNAL( activated( int ) ), - SLOT( slotCameraTypeActivated( int ) ) ); - connect( m_pCylinderType, SIGNAL( activated( int ) ), - SLOT( slotCylinderTypeActivated( int ) ) ); - - connect( m_pFocalBlur, SIGNAL( toggled( bool ) ), - SLOT( slotFocalBlurToggled( bool ) ) ); - connect( m_pAperture, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pBlurSamples, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFocalPoint, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pVariance, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pConfidence, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pExport, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pLocation, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDirection, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotDirectionChanged( ) ) ); + connect( m_pRight, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRight, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotRightChanged( ) ) ); + connect( m_pUp, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSky, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pLookAt, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEnableAngle, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( slotAngleToggled( bool ) ) ); + connect( m_pAngle, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotAngleChanged( ) ) ); + connect( m_pCameraType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotCameraTypeActivated( int ) ) ); + connect( m_pCylinderType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotCylinderTypeActivated( int ) ) ); + + connect( m_pFocalBlur, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( slotFocalBlurToggled( bool ) ) ); + connect( m_pAperture, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pBlurSamples, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFocalPoint, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pVariance, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pConfidence, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pExport, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMCameraEdit::displayObject( PMObject* o ) @@ -385,9 +385,9 @@ void PMCameraEdit::slotAngleChanged( ) if( ( m_pCameraType->currentItem( ) == 0 ) && m_pEnableAngle->isChecked( ) ) { // Only change direction's value in perspective and with an enabled angle - disconnect( m_pDirection, SIGNAL( dataChanged( ) ), 0, 0 ); + disconnect( m_pDirection, TQT_SIGNAL( dataChanged( ) ), 0, 0 ); m_pDirection->setVector( 0.5 * m_pRight->vector( ) / tan( 2 * deg2Rad( m_pAngle->value( ) ) ) ); - connect( m_pDirection, SIGNAL( dataChanged( ) ), SLOT( slotDirectionChanged( ) ) ); + connect( m_pDirection, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotDirectionChanged( ) ) ); } */ emit dataChanged( ); @@ -424,7 +424,7 @@ void PMCameraEdit::calculateCameraAngle( ) void PMCameraEdit::enableFocalWidgets( bool on ) { - QPtrListIterator<QWidget> it( m_focalWidgets ); + TQPtrListIterator<TQWidget> it( m_focalWidgets ); for( ; it.current( ); ++it ) { diff --git a/kpovmodeler/pmcameraedit.h b/kpovmodeler/pmcameraedit.h index 7b787683..a9ed5ee9 100644 --- a/kpovmodeler/pmcameraedit.h +++ b/kpovmodeler/pmcameraedit.h @@ -25,15 +25,15 @@ #endif #include "pmnamedobjectedit.h" -#include <qptrlist.h> +#include <tqptrlist.h> class PMCamera; class PMVectorEdit; class PMFloatEdit; class PMIntEdit; -class QComboBox; -class QLabel; -class QCheckBox; +class TQComboBox; +class TQLabel; +class TQCheckBox; /** * Dialog edit class for @ref PMCamera @@ -46,7 +46,7 @@ public: /** * Creates a PMCameraEdit with parent and name */ - PMCameraEdit( QWidget* parent, const char* name = 0 ); + PMCameraEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -80,19 +80,19 @@ private: PMVectorEdit* m_pUp; PMVectorEdit* m_pSky; PMVectorEdit* m_pLookAt; - QCheckBox* m_pEnableAngle; + TQCheckBox* m_pEnableAngle; PMFloatEdit* m_pAngle; - QComboBox* m_pCameraType; - QComboBox* m_pCylinderType; - QLabel* m_pCylinderTypeLabel; - QCheckBox* m_pFocalBlur; + TQComboBox* m_pCameraType; + TQComboBox* m_pCylinderType; + TQLabel* m_pCylinderTypeLabel; + TQCheckBox* m_pFocalBlur; PMFloatEdit* m_pAperture; PMIntEdit* m_pBlurSamples; PMVectorEdit* m_pFocalPoint; PMFloatEdit* m_pConfidence; PMFloatEdit* m_pVariance; - QPtrList<QWidget> m_focalWidgets; - QCheckBox* m_pExport; + TQPtrList<TQWidget> m_focalWidgets; + TQCheckBox* m_pExport; }; diff --git a/kpovmodeler/pmclippedby.cpp b/kpovmodeler/pmclippedby.cpp index fc00bc51..24ea4e46 100644 --- a/kpovmodeler/pmclippedby.cpp +++ b/kpovmodeler/pmclippedby.cpp @@ -62,7 +62,7 @@ void PMClippedBy::cleanUp( ) const Base::cleanUp( ); } -QString PMClippedBy::description( ) const +TQString PMClippedBy::description( ) const { return i18n( "clipped by" ); } @@ -79,7 +79,7 @@ bool PMClippedBy::boundedBy( ) const return cb; } -void PMClippedBy::serialize( QDomElement& e, QDomDocument& doc ) const +void PMClippedBy::serialize( TQDomElement& e, TQDomDocument& doc ) const { // no extra data at the moment Base::serialize( e, doc ); @@ -91,7 +91,7 @@ void PMClippedBy::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMClippedBy::editWidget( QWidget* parent ) const +PMDialogEditBase* PMClippedBy::editWidget( TQWidget* parent ) const { return new PMClippedByEdit( parent ); } diff --git a/kpovmodeler/pmclippedby.h b/kpovmodeler/pmclippedby.h index 39c5081a..0e76e2cf 100644 --- a/kpovmodeler/pmclippedby.h +++ b/kpovmodeler/pmclippedby.h @@ -45,7 +45,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMClippedBy( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -56,19 +56,19 @@ public: virtual bool dataChangeOnInsertRemove( ) const { return true; } /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMClippedByEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmclippedby" ); } + virtual TQString pixmap( ) const { return TQString( "pmclippedby" ); } /** */ virtual void childRemoved( PMObject* ); diff --git a/kpovmodeler/pmclippedbyedit.cpp b/kpovmodeler/pmclippedbyedit.cpp index 18a9d4db..8afa0285 100644 --- a/kpovmodeler/pmclippedbyedit.cpp +++ b/kpovmodeler/pmclippedbyedit.cpp @@ -19,11 +19,11 @@ #include "pmclippedbyedit.h" #include "pmclippedby.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMClippedByEdit::PMClippedByEdit( QWidget* parent, const char* name ) +PMClippedByEdit::PMClippedByEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -33,9 +33,9 @@ void PMClippedByEdit::createTopWidgets( ) { Base::createTopWidgets( ); - m_pChildLabel = new QLabel( i18n( "No child objects" ), this ); + m_pChildLabel = new TQLabel( i18n( "No child objects" ), this ); topLayout( )->addWidget( m_pChildLabel ); - m_pBoundedByLabel = new QLabel( i18n( "(= bounded by)" ), this ); + m_pBoundedByLabel = new TQLabel( i18n( "(= bounded by)" ), this ); topLayout( )->addWidget( m_pBoundedByLabel ); } diff --git a/kpovmodeler/pmclippedbyedit.h b/kpovmodeler/pmclippedbyedit.h index 3dc0c38f..5b22f564 100644 --- a/kpovmodeler/pmclippedbyedit.h +++ b/kpovmodeler/pmclippedbyedit.h @@ -27,7 +27,7 @@ #include "pmdialogeditbase.h" class PMClippedBy; -class QLabel; +class TQLabel; /** * Dialog edit class for @ref PMClippedBy @@ -40,7 +40,7 @@ public: /** * Creates a PMClippedByEdit with parent and name */ - PMClippedByEdit( QWidget* parent, const char* name = 0 ); + PMClippedByEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -51,8 +51,8 @@ protected: private: PMClippedBy* m_pDisplayedObject; - QLabel* m_pChildLabel; - QLabel* m_pBoundedByLabel; + TQLabel* m_pChildLabel; + TQLabel* m_pBoundedByLabel; }; diff --git a/kpovmodeler/pmcolor.cpp b/kpovmodeler/pmcolor.cpp index 0eb38b79..cac668e7 100644 --- a/kpovmodeler/pmcolor.cpp +++ b/kpovmodeler/pmcolor.cpp @@ -22,8 +22,8 @@ #include "pmdebug.h" -#include <qtextstream.h> -#include <qstring.h> +#include <tqtextstream.h> +#include <tqstring.h> PMColor::PMColor( ) { @@ -67,7 +67,7 @@ PMColor::PMColor( const PMVector& v ) } } -PMColor::PMColor( const QColor& c ) +PMColor::PMColor( const TQColor& c ) { m_colorValue[0] = c.red( ) / 255.0; m_colorValue[1] = c.green( ) / 255.0; @@ -76,7 +76,7 @@ PMColor::PMColor( const QColor& c ) m_colorValue[4] = 0.0; } -QColor PMColor::toQColor( ) const +TQColor PMColor::toQColor( ) const { double r, g, b, max = 0; r = red( ); @@ -99,14 +99,14 @@ QColor PMColor::toQColor( ) const g /= max; b /= max; } - return QColor( ( int ) ( r * 255 + 0.5 ), ( int ) ( g * 255 + 0.5 ), + return TQColor( ( int ) ( r * 255 + 0.5 ), ( int ) ( g * 255 + 0.5 ), ( int ) ( b * 255 + 0.5 ) ); } -QString PMColor::serialize( bool addColorKeyword ) const +TQString PMColor::serialize( bool addColorKeyword ) const { - QString result; - QTextStream str( &result, IO_WriteOnly ); + TQString result; + TQTextStream str( &result, IO_WriteOnly ); if( addColorKeyword ) str << "color "; @@ -146,10 +146,10 @@ QString PMColor::serialize( bool addColorKeyword ) const return result; } -QString PMColor::serializeXML( ) const +TQString PMColor::serializeXML( ) const { - QString result; - QTextStream str( &result, IO_WriteOnly ); + TQString result; + TQTextStream str( &result, IO_WriteOnly ); int i; for( i = 0; i < 5; i++ ) @@ -177,11 +177,11 @@ bool PMColor::operator== ( const PMColor& c ) const return true; } -bool PMColor::loadXML( const QString& str ) +bool PMColor::loadXML( const TQString& str ) { - QString tmp( str ); - QTextStream s( &tmp, IO_ReadOnly ); - QString val; + TQString tmp( str ); + TQTextStream s( &tmp, IO_ReadOnly ); + TQString val; bool ok; int i; diff --git a/kpovmodeler/pmcolor.h b/kpovmodeler/pmcolor.h index 7ae0eeab..5c3c4ec8 100644 --- a/kpovmodeler/pmcolor.h +++ b/kpovmodeler/pmcolor.h @@ -19,8 +19,8 @@ #ifndef PMCOLOR_H #define PMCOLOR_H -#include <qstring.h> -#include <qcolor.h> +#include <tqstring.h> +#include <tqcolor.h> class PMVector; @@ -48,10 +48,10 @@ public: */ PMColor( const PMVector& v ); /** - * Creates a color from a @ref QColor object. + * Creates a color from a @ref TQColor object. * filter and transmit are set to 0 */ - PMColor( const QColor& c ); + PMColor( const TQColor& c ); /** * Sets the red value @@ -97,20 +97,20 @@ public: /** * Returns the rgb value as QColor */ - QColor toQColor( ) const; + TQColor toQColor( ) const; /** * Returns a string for serialization */ - QString serialize( bool addColorKeyword = false ) const; + TQString serialize( bool addColorKeyword = false ) const; /** * Returns a string for xml output */ - QString serializeXML( ) const; + TQString serializeXML( ) const; /** * loads the color data from the xml string */ - bool loadXML( const QString& str ); + bool loadXML( const TQString& str ); /** * Returns true if the colors are equal*/ diff --git a/kpovmodeler/pmcoloredit.cpp b/kpovmodeler/pmcoloredit.cpp index 06ac4d0f..9695f9eb 100644 --- a/kpovmodeler/pmcoloredit.cpp +++ b/kpovmodeler/pmcoloredit.cpp @@ -19,13 +19,13 @@ #include "pmlineedits.h" #include <kcolorbutton.h> #include <klocale.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qcolor.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqcolor.h> #include <kdialog.h> -PMColorEdit::PMColorEdit( bool filterAndTransmit, QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMColorEdit::PMColorEdit( bool filterAndTransmit, TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { m_bFilterAndTransmit = filterAndTransmit; @@ -44,35 +44,35 @@ PMColorEdit::PMColorEdit( bool filterAndTransmit, QWidget* parent, const char* n } m_pButton = new KColorButton( this ); - QVBoxLayout* topLayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) ); - QHBoxLayout* l = new QHBoxLayout( topLayout ); + TQVBoxLayout* topLayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + TQHBoxLayout* l = new TQHBoxLayout( topLayout ); l->addWidget( m_pButton ); - l = new QHBoxLayout( topLayout ); - l->addWidget( new QLabel( i18n( "red:" ), this ) ); + l = new TQHBoxLayout( topLayout ); + l->addWidget( new TQLabel( i18n( "red:" ), this ) ); l->addWidget( m_edits[0] ); - l->addWidget( new QLabel( i18n( "green:" ), this ) ); + l->addWidget( new TQLabel( i18n( "green:" ), this ) ); l->addWidget( m_edits[1] ); - l->addWidget( new QLabel( i18n( "blue:" ), this ) ); + l->addWidget( new TQLabel( i18n( "blue:" ), this ) ); l->addWidget( m_edits[2] ); if( filterAndTransmit ) { - l = new QHBoxLayout( topLayout ); - l->addWidget( new QLabel( i18n( "filter" ), this ) ); + l = new TQHBoxLayout( topLayout ); + l->addWidget( new TQLabel( i18n( "filter" ), this ) ); l->addWidget( m_edits[3] ); - l->addWidget( new QLabel( i18n( "transmit" ), this ) ); + l->addWidget( new TQLabel( i18n( "transmit" ), this ) ); l->addWidget( m_edits[4] ); } - connect( m_edits[0], SIGNAL( dataChanged( ) ), SLOT( slotEditChanged( ) ) ); - connect( m_edits[1], SIGNAL( dataChanged( ) ), SLOT( slotEditChanged( ) ) ); - connect( m_edits[2], SIGNAL( dataChanged( ) ), SLOT( slotEditChanged( ) ) ); + connect( m_edits[0], TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotEditChanged( ) ) ); + connect( m_edits[1], TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotEditChanged( ) ) ); + connect( m_edits[2], TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotEditChanged( ) ) ); if( filterAndTransmit ) { - connect( m_edits[3], SIGNAL( dataChanged( ) ), SLOT( slotEditChanged( ) ) ); - connect( m_edits[4], SIGNAL( dataChanged( ) ), SLOT( slotEditChanged( ) ) ); + connect( m_edits[3], TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotEditChanged( ) ) ); + connect( m_edits[4], TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotEditChanged( ) ) ); } - connect( m_pButton, SIGNAL( changed( const QColor& ) ), - SLOT( slotColorChanged( const QColor& ) ) ); + connect( m_pButton, TQT_SIGNAL( changed( const TQColor& ) ), + TQT_SLOT( slotColorChanged( const TQColor& ) ) ); } void PMColorEdit::setColor( const PMColor& c ) @@ -141,7 +141,7 @@ void PMColorEdit::setReadOnly( bool yes ) m_pButton->setEnabled( !yes ); } -void PMColorEdit::slotColorChanged( const QColor& c ) +void PMColorEdit::slotColorChanged( const TQColor& c ) { int i; bool blocked[3]; diff --git a/kpovmodeler/pmcoloredit.h b/kpovmodeler/pmcoloredit.h index 4b581a0f..a4be0083 100644 --- a/kpovmodeler/pmcoloredit.h +++ b/kpovmodeler/pmcoloredit.h @@ -24,12 +24,12 @@ #include <config.h> #endif -#include <qwidget.h> +#include <tqwidget.h> #include "pmcolor.h" class KColorButton; class PMFloatEdit; -class QColor; +class TQColor; /** * Edit widget for @ref PMColor @@ -41,7 +41,7 @@ public: /** * Creates an edit widget for rgbft colors. */ - PMColorEdit( bool filterAndTransmit, QWidget* parent, const char* name = 0 ); + PMColorEdit( bool filterAndTransmit, TQWidget* parent, const char* name = 0 ); /** * Sets the displayed color @@ -69,7 +69,7 @@ signals: void dataChanged( ); protected slots: - void slotColorChanged( const QColor& c ); + void slotColorChanged( const TQColor& c ); void slotEditChanged( ); private: void updateButton( ); diff --git a/kpovmodeler/pmcolorsettings.cpp b/kpovmodeler/pmcolorsettings.cpp index d5924d4b..c0dafa37 100644 --- a/kpovmodeler/pmcolorsettings.cpp +++ b/kpovmodeler/pmcolorsettings.cpp @@ -20,64 +20,64 @@ #include "pmrendermanager.h" #include "pmdefaults.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kcolorbutton.h> #include <klocale.h> -PMColorSettings::PMColorSettings( QWidget* parent, const char* name ) +PMColorSettings::PMColorSettings( TQWidget* parent, const char* name ) : PMSettingsDialogPage( parent, name ) { - QHBoxLayout* hlayout; - QVBoxLayout* vlayout; - QGridLayout* grid; + TQHBoxLayout* hlayout; + TQVBoxLayout* vlayout; + TQGridLayout* grid; - vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) ); - grid = new QGridLayout( vlayout, 6, 3 ); + vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + grid = new TQGridLayout( vlayout, 6, 3 ); - grid->addWidget( new QLabel( i18n( "Background:" ), this ), 0, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Background:" ), this ), 0, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 0, 2 ); m_pBackgroundColor = new KColorButton( this ); hlayout->addWidget( m_pBackgroundColor ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Wire frame:" ), this ), 1, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Wire frame:" ), this ), 1, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 1, 2 ); m_pGraphicalObjectsColor[0] = new KColorButton( this ); hlayout->addWidget( m_pGraphicalObjectsColor[0] ); - hlayout->addWidget( new QLabel( i18n( "Selected:" ), this ) ); + hlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) ); m_pGraphicalObjectsColor[1] = new KColorButton( this ); hlayout->addWidget( m_pGraphicalObjectsColor[1] ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Control points:" ), this ), 2, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Control points:" ), this ), 2, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 2, 2 ); m_pControlPointsColor[0] = new KColorButton( this ); hlayout->addWidget( m_pControlPointsColor[0] ); - hlayout->addWidget( new QLabel( i18n( "Selected:" ), this ) ); + hlayout->addWidget( new TQLabel( i18n( "Selected:" ), this ) ); m_pControlPointsColor[1] = new KColorButton( this ); hlayout->addWidget( m_pControlPointsColor[1] ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Axes:" ), this ), 3, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Axes:" ), this ), 3, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 3, 2 ); - grid->addWidget( new QLabel( "x", this ), 3, 1 ); + grid->addWidget( new TQLabel( "x", this ), 3, 1 ); m_pAxesColor[0] = new KColorButton( this ); hlayout->addWidget( m_pAxesColor[0] ); - hlayout->addWidget( new QLabel( "y", this ) ); + hlayout->addWidget( new TQLabel( "y", this ) ); m_pAxesColor[1] = new KColorButton( this ); hlayout->addWidget( m_pAxesColor[1] ); - hlayout->addWidget( new QLabel( "z", this ) ); + hlayout->addWidget( new TQLabel( "z", this ) ); m_pAxesColor[2] = new KColorButton( this ); hlayout->addWidget( m_pAxesColor[2] ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Field of view:" ), this ), 4, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Field of view:" ), this ), 4, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 4, 2 ); m_pFieldOfViewColor = new KColorButton( this ); hlayout->addWidget( m_pFieldOfViewColor ); diff --git a/kpovmodeler/pmcolorsettings.h b/kpovmodeler/pmcolorsettings.h index 9ad628e0..8b903d47 100644 --- a/kpovmodeler/pmcolorsettings.h +++ b/kpovmodeler/pmcolorsettings.h @@ -36,7 +36,7 @@ public: /** * Default constructor */ - PMColorSettings( QWidget* parent, const char* name = 0 ); + PMColorSettings( TQWidget* parent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmcommand.h b/kpovmodeler/pmcommand.h index 9bdca16f..5d32b9d4 100644 --- a/kpovmodeler/pmcommand.h +++ b/kpovmodeler/pmcommand.h @@ -24,8 +24,8 @@ #include <config.h> #endif -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> #include "pmmessage.h" #include "pmerrorflags.h" @@ -93,7 +93,7 @@ public: /** * Creates a command with command text text */ - PMCommand( const QString &text ) + PMCommand( const TQString &text ) { m_text = text; } /** * Deletes the command. @@ -103,11 +103,11 @@ public: /** * Command text shown in the undo/redo menues */ - QString text( ) const { return m_text; } + TQString text( ) const { return m_text; } /** * Sets the command text */ - void setText( const QString& s ) { m_text = s; } + void setText( const TQString& s ) { m_text = s; } /** * Checks if the command is valid and sets the error message @@ -138,9 +138,9 @@ private: /** * The command text. */ - QString m_text; + TQString m_text; }; -typedef QPtrList<PMCommand> PMCommandList; +typedef TQPtrList<PMCommand> PMCommandList; #endif diff --git a/kpovmodeler/pmcommandmanager.cpp b/kpovmodeler/pmcommandmanager.cpp index 333468e3..f122a7a4 100644 --- a/kpovmodeler/pmcommandmanager.cpp +++ b/kpovmodeler/pmcommandmanager.cpp @@ -45,7 +45,7 @@ void PMCommandManager::execute( PMCommand* cmd ) m_commands.removeFirst( ); m_redoCommands.clear( ); - emit updateUndoRedo( cmd->text( ), QString::null ); + emit updateUndoRedo( cmd->text( ), TQString::null ); } void PMCommandManager::undo( ) @@ -58,7 +58,7 @@ void PMCommandManager::undo( ) m_redoCommands.append( m_commands.take( ) ); if( m_commands.isEmpty( ) ) - emit updateUndoRedo( QString::null, last->text( ) ); + emit updateUndoRedo( TQString::null, last->text( ) ); else emit updateUndoRedo( m_commands.last( )->text( ), last->text( ) ); } @@ -74,7 +74,7 @@ void PMCommandManager::redo( ) m_commands.append( m_redoCommands.take( ) ); if( m_redoCommands.isEmpty( ) ) - emit updateUndoRedo( last->text( ), QString::null ); + emit updateUndoRedo( last->text( ), TQString::null ); else emit updateUndoRedo( last->text( ), m_redoCommands.last( )->text( ) ); } @@ -84,7 +84,7 @@ void PMCommandManager::clear( ) { m_redoCommands.clear( ); m_commands.clear( ); - emit updateUndoRedo( QString::null, QString::null ); + emit updateUndoRedo( TQString::null, TQString::null ); } void PMCommandManager::cmdObjectChanged( PMObject* obj, const int mode ) @@ -92,7 +92,7 @@ void PMCommandManager::cmdObjectChanged( PMObject* obj, const int mode ) emit objectChanged( obj, mode, this ); } -void PMCommandManager::cmdIDChanged( PMObject* obj, const QString& oldID ) +void PMCommandManager::cmdIDChanged( PMObject* obj, const TQString& oldID ) { emit idChanged( obj, oldID ); } diff --git a/kpovmodeler/pmcommandmanager.h b/kpovmodeler/pmcommandmanager.h index 2ef2fbbc..5fc960d1 100644 --- a/kpovmodeler/pmcommandmanager.h +++ b/kpovmodeler/pmcommandmanager.h @@ -25,8 +25,8 @@ #endif #include "pmcommand.h" -#include <qptrstack.h> -#include <qobject.h> +#include <tqptrstack.h> +#include <tqobject.h> class PMPart; @@ -80,7 +80,7 @@ public: /** * Called by an executed command. Will emit idChanged( ) */ - void cmdIDChanged( PMObject* obj, const QString& oldID ); + void cmdIDChanged( PMObject* obj, const TQString& oldID ); /** * Returns a pointer to the part. For commands that need to access the * part directly. @@ -90,16 +90,16 @@ signals: /** * emmited, when the undo and redo command texts change */ - void updateUndoRedo( const QString& undo, const QString& redo ); + void updateUndoRedo( const TQString& undo, const TQString& redo ); /** * Signal that is emitted when an object is changed. * Mode is a bit combination of @ref PMChange constants. */ - void objectChanged( PMObject* obj, const int mode, QObject* sender ); + void objectChanged( PMObject* obj, const int mode, TQObject* sender ); /** * Signal that is emitted when the id of the object is changed */ - void idChanged( PMObject* obj, const QString& oldID ); + void idChanged( PMObject* obj, const TQString& oldID ); private: /** * The executed commands. diff --git a/kpovmodeler/pmcomment.cpp b/kpovmodeler/pmcomment.cpp index e4783ae5..90c817fd 100644 --- a/kpovmodeler/pmcomment.cpp +++ b/kpovmodeler/pmcomment.cpp @@ -22,7 +22,7 @@ #include "pmcommentedit.h" #include "pmmemento.h" -#include <qtextstream.h> +#include <tqtextstream.h> #include <klocale.h> PMDefinePropertyClass( PMComment, PMCommentProperty ); @@ -40,7 +40,7 @@ PMComment::PMComment( PMPart* part ) { } -PMComment::PMComment( PMPart* part, const QString& t ) +PMComment::PMComment( PMPart* part, const TQString& t ) : Base( part ) { m_text = t; @@ -56,13 +56,13 @@ PMComment::~PMComment( ) { } -QString PMComment::description( ) const +TQString PMComment::description( ) const { if( !m_text.isEmpty( ) ) { - QString copy = m_text; - QTextStream str( ©, IO_ReadOnly ); - QString tmp, desc; + TQString copy = m_text; + TQTextStream str( ©, IO_ReadOnly ); + TQString tmp, desc; bool stop = false; bool truncated = false; @@ -95,7 +95,7 @@ QString PMComment::description( ) const return i18n( "comment" ); } -void PMComment::setText( const QString& text ) +void PMComment::setText( const TQString& text ) { if( text != m_text ) { @@ -130,20 +130,20 @@ void PMComment::cleanUp( ) const Base::cleanUp( ); } -void PMComment::serialize( QDomElement& e, QDomDocument& doc ) const +void PMComment::serialize( TQDomElement& e, TQDomDocument& doc ) const { - QDomText t = doc.createTextNode( m_text ); + TQDomText t = doc.createTextNode( m_text ); e.appendChild( t ); } void PMComment::readAttributes( const PMXMLHelper& h ) { - QDomNode e = h.element( ).firstChild( ); + TQDomNode e = h.element( ).firstChild( ); if( e.isText( ) ) m_text = e.toText( ).data( ); } -PMDialogEditBase* PMComment::editWidget( QWidget* parent ) const +PMDialogEditBase* PMComment::editWidget( TQWidget* parent ) const { return new PMCommentEdit( parent ); } diff --git a/kpovmodeler/pmcomment.h b/kpovmodeler/pmcomment.h index 82c62fa8..d435423d 100644 --- a/kpovmodeler/pmcomment.h +++ b/kpovmodeler/pmcomment.h @@ -21,7 +21,7 @@ #define PMCOMMENT_H #include "pmobject.h" -#include <qstring.h> +#include <tqstring.h> /** @@ -39,7 +39,7 @@ public: /** * Creates a comment with text t */ - PMComment( PMPart* part, const QString& t ); + PMComment( PMPart* part, const TQString& t ); /** * Copy constructor */ @@ -52,11 +52,11 @@ public: /** * Sets the comment text */ - void setText( const QString& text ); + void setText( const TQString& text ); /** * Returns the comment text */ - QString text( ) const { return m_text; } + TQString text( ) const { return m_text; } /** */ virtual PMObject* copy( ) const { return new PMComment( *this ); } @@ -67,17 +67,17 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmcomment" ); } + virtual TQString pixmap( ) const { return TQString( "pmcomment" ); } /** */ virtual void restoreMemento( PMMemento* s ); private: @@ -85,7 +85,7 @@ private: * IDs for @ref PMMementoData */ enum PMCommentMementoID { PMTextID }; - QString m_text; + TQString m_text; static PMMetaObject* s_pMetaObject; }; diff --git a/kpovmodeler/pmcommentedit.cpp b/kpovmodeler/pmcommentedit.cpp index 6fa5ba9e..28e98ed3 100644 --- a/kpovmodeler/pmcommentedit.cpp +++ b/kpovmodeler/pmcommentedit.cpp @@ -19,11 +19,11 @@ #include "pmcommentedit.h" #include "pmcomment.h" -#include <qlayout.h> -#include <qmultilineedit.h> +#include <tqlayout.h> +#include <tqmultilineedit.h> #include <kglobalsettings.h> -PMCommentEdit::PMCommentEdit( QWidget* parent, const char* name ) +PMCommentEdit::PMCommentEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -33,15 +33,15 @@ void PMCommentEdit::createTopWidgets( ) { Base::createTopWidgets( ); - m_pEdit = new QMultiLineEdit( this ); + m_pEdit = new TQMultiLineEdit( this ); #if ( QT_VERSION >= 300 ) m_pEdit->setTextFormat( Qt::PlainText ); - m_pEdit->setWordWrap( QTextEdit::NoWrap ); + m_pEdit->setWordWrap( TQTextEdit::NoWrap ); #endif m_pEdit->setFont( KGlobalSettings::fixedFont( ) ); topLayout( )->addWidget( m_pEdit, 2 ); - connect( m_pEdit, SIGNAL( textChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pEdit, TQT_SIGNAL( textChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMCommentEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmcommentedit.h b/kpovmodeler/pmcommentedit.h index b3dc1d25..3d3fb0c1 100644 --- a/kpovmodeler/pmcommentedit.h +++ b/kpovmodeler/pmcommentedit.h @@ -27,7 +27,7 @@ #include "pmdialogeditbase.h" class PMComment; -class QMultiLineEdit; +class TQMultiLineEdit; /** * Dialog edit class for @ref PMComment. @@ -40,7 +40,7 @@ public: /** * Creates a PMCommentEdit with parent and name */ - PMCommentEdit( QWidget* parent, const char* name = 0 ); + PMCommentEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -55,7 +55,7 @@ protected: private: PMComment* m_pDisplayedObject; - QMultiLineEdit* m_pEdit; + TQMultiLineEdit* m_pEdit; }; diff --git a/kpovmodeler/pmcompositeobject.cpp b/kpovmodeler/pmcompositeobject.cpp index c1ab704d..d8b61e8c 100644 --- a/kpovmodeler/pmcompositeobject.cpp +++ b/kpovmodeler/pmcompositeobject.cpp @@ -21,7 +21,7 @@ #include "pmmemento.h" #include "pmviewstructure.h" -#include <qdom.h> +#include <tqdom.h> PMMetaObject* PMCompositeObject::s_pMetaObject = 0; @@ -279,7 +279,7 @@ bool PMCompositeObject::takeChild( uint i ) return false; } -void PMCompositeObject::serialize( QDomElement& e, QDomDocument& doc ) const +void PMCompositeObject::serialize( TQDomElement& e, TQDomDocument& doc ) const { PMObject* tmp; diff --git a/kpovmodeler/pmcompositeobject.h b/kpovmodeler/pmcompositeobject.h index c2e2da58..350180db 100644 --- a/kpovmodeler/pmcompositeobject.h +++ b/kpovmodeler/pmcompositeobject.h @@ -109,7 +109,7 @@ public: virtual bool takeChild( uint i ); /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** * Returns the number of selected child items. All selected items in diff --git a/kpovmodeler/pmcone.cpp b/kpovmodeler/pmcone.cpp index 2772eda5..c6fd719e 100644 --- a/kpovmodeler/pmcone.cpp +++ b/kpovmodeler/pmcone.cpp @@ -75,12 +75,12 @@ PMCone::~PMCone( ) { } -QString PMCone::description( ) const +TQString PMCone::description( ) const { return i18n( "cone" ); } -void PMCone::serialize( QDomElement & e, QDomDocument & doc ) const +void PMCone::serialize( TQDomElement & e, TQDomDocument & doc ) const { e.setAttribute( "end_a", m_end1.serializeXML( ) ); e.setAttribute( "end_b", m_end2.serializeXML( ) ); @@ -176,7 +176,7 @@ void PMCone::setOpen( bool op ) } } -PMDialogEditBase* PMCone::editWidget( QWidget * parent ) const +PMDialogEditBase* PMCone::editWidget( TQWidget * parent ) const { return new PMConeEdit( parent ); } diff --git a/kpovmodeler/pmcone.h b/kpovmodeler/pmcone.h index 445846f3..c41f9325 100644 --- a/kpovmodeler/pmcone.h +++ b/kpovmodeler/pmcone.h @@ -59,23 +59,23 @@ public: virtual PMObject* copy( ) const { return new PMCone( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMConeEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ - virtual QString pixmap( ) const { return QString( "pmcone" ); } + virtual TQString pixmap( ) const { return TQString( "pmcone" ); } /** * Return the end_1 diff --git a/kpovmodeler/pmconeedit.cpp b/kpovmodeler/pmconeedit.cpp index 2dbcfc7c..9969e4d7 100644 --- a/kpovmodeler/pmconeedit.cpp +++ b/kpovmodeler/pmconeedit.cpp @@ -21,12 +21,12 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> -PMConeEdit::PMConeEdit( QWidget* parent, const char* name ) +PMConeEdit::PMConeEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -36,36 +36,36 @@ void PMConeEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout; - QGridLayout* gl; + TQHBoxLayout* layout; + TQGridLayout* gl; m_pEnd1 = new PMVectorEdit( "x", "y", "z", this ); m_pEnd2 = new PMVectorEdit( "x", "y", "z", this ); m_pRadius1 = new PMFloatEdit( this ); m_pRadius2 = new PMFloatEdit( this ); - m_pOpen = new QCheckBox( i18n( "type of the object", "Open" ), this ); + m_pOpen = new TQCheckBox( i18n( "type of the object", "Open" ), this ); - gl = new QGridLayout( topLayout( ), 2, 2 ); - gl->addWidget( new QLabel( i18n( "End 1:" ), this ), 0, 0 ); + gl = new TQGridLayout( topLayout( ), 2, 2 ); + gl->addWidget( new TQLabel( i18n( "End 1:" ), this ), 0, 0 ); gl->addWidget( m_pEnd1, 0, 1 ); - gl->addWidget( new QLabel( i18n( "End 2:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 ); gl->addWidget( m_pEnd2, 1, 1 ); - layout = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( layout, 2, 2 ); - gl->addWidget( new QLabel( i18n( "Radius 1:" ), this ), 0, 0 ); + layout = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( layout, 2, 2 ); + gl->addWidget( new TQLabel( i18n( "Radius 1:" ), this ), 0, 0 ); gl->addWidget( m_pRadius1, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Radius 2:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Radius 2:" ), this ), 1, 0 ); gl->addWidget( m_pRadius2, 1, 1 ); layout->addStretch( 1 ); topLayout( )->addWidget( m_pOpen ); - connect( m_pEnd1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEnd2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRadius1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRadius2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOpen, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pEnd1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEnd2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRadius1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRadius2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOpen, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMConeEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmconeedit.h b/kpovmodeler/pmconeedit.h index f39f95c6..f4e689fc 100644 --- a/kpovmodeler/pmconeedit.h +++ b/kpovmodeler/pmconeedit.h @@ -26,7 +26,7 @@ #include "pmsolidobjectedit.h" -class QCheckBox; +class TQCheckBox; class PMVectorEdit; class PMFloatEdit; @@ -40,7 +40,7 @@ public: /** * Creates a PMConeEdit with parent and name */ - PMConeEdit( QWidget* parent, const char* name = 0 ); + PMConeEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -59,6 +59,6 @@ private: PMVectorEdit* m_pEnd2; PMFloatEdit* m_pRadius1; PMFloatEdit* m_pRadius2; - QCheckBox* m_pOpen; + TQCheckBox* m_pOpen; }; #endif diff --git a/kpovmodeler/pmcontrolpoint.cpp b/kpovmodeler/pmcontrolpoint.cpp index 8617ae27..18e5953d 100644 --- a/kpovmodeler/pmcontrolpoint.cpp +++ b/kpovmodeler/pmcontrolpoint.cpp @@ -25,7 +25,7 @@ double PMControlPoint::s_moveGrid = c_defaultMoveGrid; double PMControlPoint::s_scaleGrid = c_defaultScaleGrid; double PMControlPoint::s_rotateGrid = c_defaultRotateGrid; -PMControlPoint::PMControlPoint( int id, const QString& description ) +PMControlPoint::PMControlPoint( int id, const TQString& description ) { m_id = id; m_bChanged = false; diff --git a/kpovmodeler/pmcontrolpoint.h b/kpovmodeler/pmcontrolpoint.h index 8d3e9e66..dbc52c6d 100644 --- a/kpovmodeler/pmcontrolpoint.h +++ b/kpovmodeler/pmcontrolpoint.h @@ -25,8 +25,8 @@ #endif #include "pmvector.h" -#include <qptrlist.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqstring.h> class KConfig; @@ -50,7 +50,7 @@ public: /** * Creates a PMControlPoint with an id and a description. */ - PMControlPoint( int id, const QString& description ); + PMControlPoint( int id, const TQString& description ); /** * Deletes the PMControlPoint */ @@ -98,7 +98,7 @@ public: /** * Returns the description */ - QString description( ) const { return m_description; } + TQString description( ) const { return m_description; } /** * Selects/deselects the control point */ @@ -177,14 +177,14 @@ private: PMVector m_normalVector; bool m_bChanged; bool m_bSelected; - QString m_description; + TQString m_description; static double s_moveGrid; static double s_rotateGrid; static double s_scaleGrid; }; -typedef QPtrList<PMControlPoint> PMControlPointList; -typedef QPtrListIterator<PMControlPoint> PMControlPointListIterator; +typedef TQPtrList<PMControlPoint> PMControlPointList; +typedef TQPtrListIterator<PMControlPoint> PMControlPointListIterator; #endif diff --git a/kpovmodeler/pmcsg.cpp b/kpovmodeler/pmcsg.cpp index 3af76740..0ac7e58a 100644 --- a/kpovmodeler/pmcsg.cpp +++ b/kpovmodeler/pmcsg.cpp @@ -54,7 +54,7 @@ PMCSG::~PMCSG( ) { } -QString PMCSG::description( ) const +TQString PMCSG::description( ) const { switch( m_type ) { @@ -71,30 +71,30 @@ QString PMCSG::description( ) const return i18n( "merge" ); break; } - return QString( "" ); + return TQString( "" ); } -QString PMCSG::pixmap( ) const +TQString PMCSG::pixmap( ) const { switch( m_type ) { case CSGUnion: - return QString( "pmunion" ); + return TQString( "pmunion" ); break; case CSGIntersection: - return QString( "pmintersection" ); + return TQString( "pmintersection" ); break; case CSGDifference: - return QString( "pmdifference" ); + return TQString( "pmdifference" ); break; case CSGMerge: - return QString( "pmmerge" ); + return TQString( "pmmerge" ); break; } - return QString( "" ); + return TQString( "" ); } -void PMCSG::serialize( QDomElement& e, QDomDocument& doc ) const +void PMCSG::serialize( TQDomElement& e, TQDomDocument& doc ) const { switch( m_type ) { @@ -117,7 +117,7 @@ void PMCSG::serialize( QDomElement& e, QDomDocument& doc ) const void PMCSG::readAttributes( const PMXMLHelper& h ) { - QString str = h.stringAttribute( "csgtype", "union" ); + TQString str = h.stringAttribute( "csgtype", "union" ); if( str == "union" ) m_type = CSGUnion; else if( str == "intersection" ) @@ -169,7 +169,7 @@ void PMCSG::setCSGType( const PMCSGType t ) } } -PMDialogEditBase* PMCSG::editWidget( QWidget* parent ) const +PMDialogEditBase* PMCSG::editWidget( TQWidget* parent ) const { return new PMCSGEdit( parent ); } diff --git a/kpovmodeler/pmcsg.h b/kpovmodeler/pmcsg.h index e8ce741e..380bf0ef 100644 --- a/kpovmodeler/pmcsg.h +++ b/kpovmodeler/pmcsg.h @@ -59,7 +59,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMCSG( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -67,19 +67,19 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMCSGEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const; + virtual TQString pixmap( ) const; /** * Returns the type of the csg diff --git a/kpovmodeler/pmcsgedit.cpp b/kpovmodeler/pmcsgedit.cpp index 9a6e0a39..114e22f6 100644 --- a/kpovmodeler/pmcsgedit.cpp +++ b/kpovmodeler/pmcsgedit.cpp @@ -19,12 +19,12 @@ #include "pmcsgedit.h" #include "pmcsg.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> #include <klocale.h> -PMCSGEdit::PMCSGEdit( QWidget* parent, const char* name ) +PMCSGEdit::PMCSGEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -34,19 +34,19 @@ void PMCSGEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout; - m_pTypeCombo = new QComboBox( false, this ); + TQHBoxLayout* layout; + m_pTypeCombo = new TQComboBox( false, this ); m_pTypeCombo->insertItem( i18n( "Union" ) ); m_pTypeCombo->insertItem( i18n( "Intersection" ) ); m_pTypeCombo->insertItem( i18n( "Difference" ) ); m_pTypeCombo->insertItem( i18n( "Merge" ) ); - layout = new QHBoxLayout( topLayout( ) ); - layout->addWidget( new QLabel( i18n( "Type:" ), this ) ); + layout = new TQHBoxLayout( topLayout( ) ); + layout->addWidget( new TQLabel( i18n( "Type:" ), this ) ); layout->addWidget( m_pTypeCombo ); layout->addStretch( 1 ); - connect( m_pTypeCombo, SIGNAL( activated( int ) ), SLOT( slotTypeSelected( int ) ) ); + connect( m_pTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotTypeSelected( int ) ) ); } void PMCSGEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmcsgedit.h b/kpovmodeler/pmcsgedit.h index 8aeaddc6..d7efc75d 100644 --- a/kpovmodeler/pmcsgedit.h +++ b/kpovmodeler/pmcsgedit.h @@ -27,7 +27,7 @@ #include "pmsolidobjectedit.h" class PMCSG; -class QComboBox; +class TQComboBox; /** * Dialog edit class for @ref PMCSG @@ -40,7 +40,7 @@ public: /** * Creates a PMCSGEdit with parent and name */ - PMCSGEdit( QWidget* parent, const char* name = 0 ); + PMCSGEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -56,7 +56,7 @@ protected slots: void slotTypeSelected( int index ); private: PMCSG* m_pDisplayedObject; - QComboBox* m_pTypeCombo; + TQComboBox* m_pTypeCombo; }; diff --git a/kpovmodeler/pmcylinder.cpp b/kpovmodeler/pmcylinder.cpp index 1a119004..358cb542 100644 --- a/kpovmodeler/pmcylinder.cpp +++ b/kpovmodeler/pmcylinder.cpp @@ -74,12 +74,12 @@ PMCylinder::~PMCylinder( ) { } -QString PMCylinder::description( ) const +TQString PMCylinder::description( ) const { return i18n( "cylinder" ); } -void PMCylinder::serialize( QDomElement& e, QDomDocument& doc ) const +void PMCylinder::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "end_a", m_end1.serializeXML( ) ); e.setAttribute( "end_b", m_end2.serializeXML( ) ); @@ -160,7 +160,7 @@ void PMCylinder::setOpen( bool op ) } } -PMDialogEditBase* PMCylinder::editWidget( QWidget* parent ) const +PMDialogEditBase* PMCylinder::editWidget( TQWidget* parent ) const { return new PMCylinderEdit( parent ); } diff --git a/kpovmodeler/pmcylinder.h b/kpovmodeler/pmcylinder.h index ba98ae40..1bd10901 100644 --- a/kpovmodeler/pmcylinder.h +++ b/kpovmodeler/pmcylinder.h @@ -56,22 +56,22 @@ public: virtual PMObject* copy( ) const { return new PMCylinder( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMCylinderEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ - virtual QString pixmap( ) const { return QString( "pmcylinder" ); } + virtual TQString pixmap( ) const { return TQString( "pmcylinder" ); } /** * Return the end_1 diff --git a/kpovmodeler/pmcylinderedit.cpp b/kpovmodeler/pmcylinderedit.cpp index 623b2b4f..b15a0d16 100644 --- a/kpovmodeler/pmcylinderedit.cpp +++ b/kpovmodeler/pmcylinderedit.cpp @@ -21,12 +21,12 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> -PMCylinderEdit::PMCylinderEdit( QWidget* parent, const char* name ) +PMCylinderEdit::PMCylinderEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -36,32 +36,32 @@ void PMCylinderEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout; - QGridLayout* gl; + TQHBoxLayout* layout; + TQGridLayout* gl; m_pEnd1 = new PMVectorEdit( "x", "y", "z", this ); m_pEnd2 = new PMVectorEdit( "x", "y", "z", this ); m_pRadius = new PMFloatEdit( this ); - m_pOpen = new QCheckBox( i18n( "type of the object", "Open" ), this ); + m_pOpen = new TQCheckBox( i18n( "type of the object", "Open" ), this ); - gl = new QGridLayout( topLayout( ), 2, 2 ); - gl->addWidget( new QLabel( i18n( "End 1:" ), this ), 0, 0 ); + gl = new TQGridLayout( topLayout( ), 2, 2 ); + gl->addWidget( new TQLabel( i18n( "End 1:" ), this ), 0, 0 ); gl->addWidget( m_pEnd1, 0, 1 ); - gl->addWidget( new QLabel( i18n( "End 2:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "End 2:" ), this ), 1, 0 ); gl->addWidget( m_pEnd2, 1, 1 ); - layout = new QHBoxLayout( topLayout( ) ); - layout->addWidget( new QLabel( i18n( "Radius:" ), this ) ); + layout = new TQHBoxLayout( topLayout( ) ); + layout->addWidget( new TQLabel( i18n( "Radius:" ), this ) ); layout->addWidget( m_pRadius ); layout->addStretch( 1 ); - layout = new QHBoxLayout( topLayout( ) ); + layout = new TQHBoxLayout( topLayout( ) ); layout->addWidget( m_pOpen ); - connect( m_pEnd1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEnd2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOpen, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pEnd1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEnd2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOpen, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMCylinderEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmcylinderedit.h b/kpovmodeler/pmcylinderedit.h index aec05df5..9f2c0993 100644 --- a/kpovmodeler/pmcylinderedit.h +++ b/kpovmodeler/pmcylinderedit.h @@ -29,7 +29,7 @@ class PMVectorEdit; class PMFloatEdit; class PMCylinder; -class QCheckBox; +class TQCheckBox; class PMCylinderEdit : public PMSolidObjectEdit { @@ -39,7 +39,7 @@ public: /** * Creates a PMCylinderEdit with parent and name */ - PMCylinderEdit( QWidget* parent, const char* name = 0 ); + PMCylinderEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -57,7 +57,7 @@ private: PMVectorEdit* m_pEnd1; PMVectorEdit* m_pEnd2; PMFloatEdit* m_pRadius; - QCheckBox* m_pOpen; + TQCheckBox* m_pOpen; }; #endif diff --git a/kpovmodeler/pmdatachangecommand.cpp b/kpovmodeler/pmdatachangecommand.cpp index 0793986e..99ac75d3 100644 --- a/kpovmodeler/pmdatachangecommand.cpp +++ b/kpovmodeler/pmdatachangecommand.cpp @@ -25,7 +25,7 @@ PMDataChangeCommand::PMDataChangeCommand( PMMemento* memento ) : PMCommand( ) { - QString text = memento->originator( )->name( ); + TQString text = memento->originator( )->name( ); if( text.isEmpty( ) ) text = memento->originator( )->description( ); setText( i18n( "Change %1" ).arg( text ) ); diff --git a/kpovmodeler/pmdeclare.cpp b/kpovmodeler/pmdeclare.cpp index 2b698f0e..3f290e2f 100644 --- a/kpovmodeler/pmdeclare.cpp +++ b/kpovmodeler/pmdeclare.cpp @@ -22,7 +22,7 @@ #include "pmprototypemanager.h" #include "pmpart.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> #include <klocale.h> PMDefinePropertyClass( PMDeclare, PMDeclareProperty ); @@ -73,16 +73,16 @@ PMDeclare::~PMDeclare( ) { } -QString PMDeclare::description( ) const +TQString PMDeclare::description( ) const { PMPart* pPart = part( ); - QString d = i18n( "declaration" ); + TQString d = i18n( "declaration" ); if( m_pDeclareType && pPart ) { - const QValueList<PMDeclareDescription>& descriptions + const TQValueList<PMDeclareDescription>& descriptions = pPart->prototypeManager( )->declarationTypes( ); - QValueList<PMDeclareDescription>::const_iterator it; + TQValueList<PMDeclareDescription>::const_iterator it; bool found = false; for( it = descriptions.begin( ); it != descriptions.end( ) && !found; ++it ) { @@ -96,16 +96,16 @@ QString PMDeclare::description( ) const return d; } -QString PMDeclare::pixmap( ) const +TQString PMDeclare::pixmap( ) const { PMPart* pPart = part( ); - QString d = "pmdeclare"; + TQString d = "pmdeclare"; if( m_pDeclareType && pPart ) { - const QValueList<PMDeclareDescription>& descriptions + const TQValueList<PMDeclareDescription>& descriptions = pPart->prototypeManager( )->declarationTypes( ); - QValueList<PMDeclareDescription>::const_iterator it; + TQValueList<PMDeclareDescription>::const_iterator it; bool found = false; for( it = descriptions.begin( ); it != descriptions.end( ) && !found; ++it ) { @@ -119,7 +119,7 @@ QString PMDeclare::pixmap( ) const return d; } -void PMDeclare::serialize( QDomElement& e, QDomDocument& doc ) const +void PMDeclare::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "id", m_id ); Base::serialize( e, doc ); @@ -131,12 +131,12 @@ void PMDeclare::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMDeclare::editWidget( QWidget* parent ) const +PMDialogEditBase* PMDeclare::editWidget( TQWidget* parent ) const { return new PMDeclareEdit( parent ); } -void PMDeclare::setID( const QString& newID ) +void PMDeclare::setID( const TQString& newID ) { if( newID != m_id ) { @@ -150,10 +150,10 @@ void PMDeclare::setID( const QString& newID ) } } -QString PMDeclare::declareType( ) const +TQString PMDeclare::declareType( ) const { if( !m_pDeclareType ) - return QString( "None" ); + return TQString( "None" ); return m_pDeclareType->className( ); } diff --git a/kpovmodeler/pmdeclare.h b/kpovmodeler/pmdeclare.h index d466e60e..89468bf4 100644 --- a/kpovmodeler/pmdeclare.h +++ b/kpovmodeler/pmdeclare.h @@ -50,9 +50,9 @@ public: virtual PMObject* copy( ) const { return new PMDeclare( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString pixmap( ) const; + virtual TQString pixmap( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -62,31 +62,31 @@ public: /** */ virtual bool dataChangeOnInsertRemove( ) const { return true; } /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMDeclareEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the id of the declare */ - virtual QString name( ) const { return m_id; } + virtual TQString name( ) const { return m_id; } /** * Returns the id of the declare */ - QString id( ) const { return m_id; } + TQString id( ) const { return m_id; } /** * Returns the declare type */ - QString declareType( ) const; + TQString declareType( ) const; /** * Sets the id of the object. */ - void setID( const QString& id ); + void setID( const TQString& id ); /** */ virtual bool canHaveName( ) const { return true; } @@ -131,7 +131,7 @@ private: /** * id of the declare */ - QString m_id; + TQString m_id; /** * The linked objects */ diff --git a/kpovmodeler/pmdeclareedit.cpp b/kpovmodeler/pmdeclareedit.cpp index 5f9e9c67..a461d710 100644 --- a/kpovmodeler/pmdeclareedit.cpp +++ b/kpovmodeler/pmdeclareedit.cpp @@ -23,17 +23,17 @@ #include "pmscanner.h" #include "pmobjectselect.h" -#include <qlayout.h> -#include <qlineedit.h> -#include <qlabel.h> -#include <qtextstream.h> -#include <qpushbutton.h> -#include <qlistbox.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqtextstream.h> +#include <tqpushbutton.h> +#include <tqlistbox.h> #include <klocale.h> #include <kmessagebox.h> -PMDeclareEdit::PMDeclareEdit( QWidget* parent, const char* name ) +PMDeclareEdit::PMDeclareEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -44,34 +44,34 @@ void PMDeclareEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout = new QHBoxLayout( topLayout( ) ); - m_pNameEdit = new QLineEdit( this ); + TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + m_pNameEdit = new TQLineEdit( this ); m_pNameEdit->setMaxLength( 40 ); - QLabel* label = new QLabel( i18n( "Identifier:" ), this ); + TQLabel* label = new TQLabel( i18n( "Identifier:" ), this ); layout->addWidget( label ); layout->addWidget( m_pNameEdit ); - connect( m_pNameEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( slotNameChanged( const QString& ) ) ); + connect( m_pNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotNameChanged( const TQString& ) ) ); } void PMDeclareEdit::createBottomWidgets( ) { - QLabel* l = new QLabel( i18n( "Linked objects:" ), this ); + TQLabel* l = new TQLabel( i18n( "Linked objects:" ), this ); topLayout( )->addWidget( l ); - m_pLinkedObjects = new QListBox( this ); + m_pLinkedObjects = new TQListBox( this ); m_pLinkedObjects->setMinimumHeight( 100 ); - connect( m_pLinkedObjects, SIGNAL( highlighted( QListBoxItem* ) ), - SLOT( slotItemSelected( QListBoxItem* ) ) ); + connect( m_pLinkedObjects, TQT_SIGNAL( highlighted( TQListBoxItem* ) ), + TQT_SLOT( slotItemSelected( TQListBoxItem* ) ) ); topLayout( )->addWidget( m_pLinkedObjects, 1 ); - QHBoxLayout* layout = new QHBoxLayout( topLayout( ) ); - m_pSelectButton = new QPushButton( i18n( "Select..." ), this ); + TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + m_pSelectButton = new TQPushButton( i18n( "Select..." ), this ); m_pSelectButton->setEnabled( false ); - connect( m_pSelectButton, SIGNAL( clicked( ) ), SLOT( slotSelect( ) ) ); + connect( m_pSelectButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSelect( ) ) ); layout->addStretch( ); layout->addWidget( m_pSelectButton ); @@ -83,7 +83,7 @@ void PMDeclareEdit::displayObject( PMObject* o ) if( o->isA( "Declare" ) ) { m_pDisplayedObject = ( PMDeclare* ) o; - m_pNameEdit->setText( QString( m_pDisplayedObject->id( ) ) ); + m_pNameEdit->setText( TQString( m_pDisplayedObject->id( ) ) ); m_pNameEdit->setReadOnly( m_pDisplayedObject->isReadOnly( ) ); @@ -117,7 +117,7 @@ bool PMDeclareEdit::isDataValid( ) if( !Base::isDataValid( ) ) return false; - QString text = m_pNameEdit->text( ); + TQString text = m_pNameEdit->text( ); if( text.length( ) == 0 ) { KMessageBox::error( this, i18n( "Please enter an identifier!" ), @@ -128,8 +128,8 @@ bool PMDeclareEdit::isDataValid( ) if( text == m_pDisplayedObject->id( ) ) return true; - QTextStream str( &text, IO_ReadOnly ); - QChar c; + TQTextStream str( &text, IO_ReadOnly ); + TQChar c; int ac; bool ok = true; int i = 0; @@ -137,7 +137,7 @@ bool PMDeclareEdit::isDataValid( ) { str >> c; ac = c.latin1( ); - // QChar::category can't be used because umlauts are not allowed + // TQChar::category can't be used because umlauts are not allowed if( i == 0 ) ok = ( ( ( ac >= 'a' ) && ( ac <= 'z' ) ) || ( ( ac >= 'A' ) && ( ac <= 'Z' ) ) || @@ -187,12 +187,12 @@ bool PMDeclareEdit::isDataValid( ) return true; } -void PMDeclareEdit::slotNameChanged( const QString& ) +void PMDeclareEdit::slotNameChanged( const TQString& ) { emit dataChanged( ); } -void PMDeclareEdit::slotItemSelected( QListBoxItem* item ) +void PMDeclareEdit::slotItemSelected( TQListBoxItem* item ) { m_pSelectedObject = ( ( PMListBoxObject* ) item )->object( ); m_pSelectButton->setEnabled( true ); diff --git a/kpovmodeler/pmdeclareedit.h b/kpovmodeler/pmdeclareedit.h index 9ee2fc83..2a40b869 100644 --- a/kpovmodeler/pmdeclareedit.h +++ b/kpovmodeler/pmdeclareedit.h @@ -27,10 +27,10 @@ #include "pmdialogeditbase.h" class PMDeclare; -class QLineEdit; -class QListBox; -class QPushButton; -class QListBoxItem; +class TQLineEdit; +class TQListBox; +class TQPushButton; +class TQListBoxItem; /** * Dialog edit class for @ref PMDeclare. @@ -43,7 +43,7 @@ public: /** * Creates a PMDeclareEdit with parent and name */ - PMDeclareEdit( QWidget* parent, const char* name = 0 ); + PMDeclareEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -59,14 +59,14 @@ protected: virtual void saveContents( ); private slots: - void slotNameChanged( const QString& ); - void slotItemSelected( QListBoxItem* ); + void slotNameChanged( const TQString& ); + void slotItemSelected( TQListBoxItem* ); void slotSelect( ); private: PMDeclare* m_pDisplayedObject; - QLineEdit* m_pNameEdit; - QListBox* m_pLinkedObjects; - QPushButton* m_pSelectButton; + TQLineEdit* m_pNameEdit; + TQListBox* m_pLinkedObjects; + TQPushButton* m_pSelectButton; PMObject* m_pSelectedObject; }; diff --git a/kpovmodeler/pmdefaults.h b/kpovmodeler/pmdefaults.h index 32c9675c..894433b3 100644 --- a/kpovmodeler/pmdefaults.h +++ b/kpovmodeler/pmdefaults.h @@ -22,29 +22,29 @@ #include <config.h> #endif -#include <qcolor.h> +#include <tqcolor.h> #include <math.h> // PMRenderManager -const QColor c_defaultGraphicalObjectColor0 = QColor( 148, 148, 148 ); -const QColor c_defaultGraphicalObjectColor1 = QColor( 255, 255, 128 ); -const QColor c_defaultTextureColor0 = QColor( 64, 192, 64 ); -const QColor c_defaultTextureColor1 = QColor( 192, 255, 128 ); -const QColor c_defaultAxesColorX = QColor( 255, 0, 0 ); -const QColor c_defaultAxesColorY = QColor( 0, 255, 0 ); -const QColor c_defaultAxesColorZ = QColor( 0, 0, 255 ); -const QColor c_defaultControlPointColor0 = QColor( 255, 255, 148 ); -const QColor c_defaultControlPointColor1 = QColor( 92, 255, 92 ); -const QColor c_defaultBackgroundColor = QColor( 0, 0, 0 ); -const QColor c_defaultFieldOfViewColor = QColor( 128, 128, 255 ); +const TQColor c_defaultGraphicalObjectColor0 = TQColor( 148, 148, 148 ); +const TQColor c_defaultGraphicalObjectColor1 = TQColor( 255, 255, 128 ); +const TQColor c_defaultTextureColor0 = TQColor( 64, 192, 64 ); +const TQColor c_defaultTextureColor1 = TQColor( 192, 255, 128 ); +const TQColor c_defaultAxesColorX = TQColor( 255, 0, 0 ); +const TQColor c_defaultAxesColorY = TQColor( 0, 255, 0 ); +const TQColor c_defaultAxesColorZ = TQColor( 0, 0, 255 ); +const TQColor c_defaultControlPointColor0 = TQColor( 255, 255, 148 ); +const TQColor c_defaultControlPointColor1 = TQColor( 92, 255, 92 ); +const TQColor c_defaultBackgroundColor = TQColor( 0, 0, 0 ); +const TQColor c_defaultFieldOfViewColor = TQColor( 128, 128, 255 ); const bool c_defaultHighDetailCameraView = true; // PMGLView const int c_defaultGridDistance = 50; -const QColor c_defaultGridColor = QColor( 40, 120, 40 ); +const TQColor c_defaultGridColor = TQColor( 40, 120, 40 ); // PovrayRenderWidget -const QString c_defaultPovrayCommand = QString( "povray" ); +const TQString c_defaultPovrayCommand = TQString( "povray" ); // PMDetailObject const int c_defaultDetailObjectGlobalDetailLevel = 1; @@ -112,10 +112,10 @@ const int c_defaultTPAADepth = 2; const double c_defaultTPAAThreshold = 0.3; const bool c_defaultTPShowFloor = true; const bool c_defaultTPShowWall = true; -const QColor c_defaultTPWallColor1 = QColor( 255, 255, 255 ); -const QColor c_defaultTPWallColor2 = QColor( 0, 0, 0 ); -const QColor c_defaultTPFloorColor1 = QColor( 192, 0, 0 ); -const QColor c_defaultTPFloorColor2 = QColor( 255, 255, 255 ); +const TQColor c_defaultTPWallColor1 = TQColor( 255, 255, 255 ); +const TQColor c_defaultTPWallColor2 = TQColor( 0, 0, 0 ); +const TQColor c_defaultTPFloorColor1 = TQColor( 192, 0, 0 ); +const TQColor c_defaultTPFloorColor2 = TQColor( 255, 255, 255 ); const double c_defaultTPGamma = 1.5; // PM3DControlPoint diff --git a/kpovmodeler/pmdeletecommand.cpp b/kpovmodeler/pmdeletecommand.cpp index fa5ff47b..a4629728 100644 --- a/kpovmodeler/pmdeletecommand.cpp +++ b/kpovmodeler/pmdeletecommand.cpp @@ -24,7 +24,7 @@ #include <klocale.h> #include <kmessagebox.h> -#include <qptrdict.h> +#include <tqptrdict.h> PMDeleteCommand::PMDeleteCommand( PMObject* obj ) : PMCommand( i18n( "Delete %1" ).arg( obj->name( ) ) ) @@ -140,7 +140,7 @@ void PMDeleteCommand::execute( PMCommandManager* theManager ) } } - QPtrListIterator<PMMemento> mit( m_dataChanges ); + TQPtrListIterator<PMMemento> mit( m_dataChanges ); for( ; mit.current( ); ++mit ) { PMObjectChangeListIterator change = mit.current( )->changedObjects( ); @@ -182,7 +182,7 @@ void PMDeleteCommand::undo( PMCommandManager* theManager ) for( ; dit.current( ); ++dit ) theManager->cmdObjectChanged( dit.current( ), PMCData ); - QPtrListIterator<PMMemento> mit( m_dataChanges ); + TQPtrListIterator<PMMemento> mit( m_dataChanges ); for( ; mit.current( ); ++mit ) { mit.current( )->originator( )->restoreMemento( mit.current( ) ); @@ -206,7 +206,7 @@ int PMDeleteCommand::errorFlags( PMPart* ) bool error = false; // dictionary of deleted objects - QPtrDict<bool> m_deletedObjects( 1009 ); + TQPtrDict<bool> m_deletedObjects( 1009 ); m_deletedObjects.setAutoDelete( true ); PMDeleteInfoListIterator it( m_infoList ); for( ; it.current( ); ++it ) diff --git a/kpovmodeler/pmdeletecommand.h b/kpovmodeler/pmdeletecommand.h index ff67c0bc..d11cf348 100644 --- a/kpovmodeler/pmdeletecommand.h +++ b/kpovmodeler/pmdeletecommand.h @@ -25,7 +25,7 @@ #endif #include "pmcommand.h" -#include <qstring.h> +#include <tqstring.h> #include "pmobject.h" @@ -79,8 +79,8 @@ private: bool m_insertError; }; -typedef QPtrList<PMDeleteInfo> PMDeleteInfoList; -typedef QPtrListIterator<PMDeleteInfo> PMDeleteInfoListIterator; +typedef TQPtrList<PMDeleteInfo> PMDeleteInfoList; +typedef TQPtrListIterator<PMDeleteInfo> PMDeleteInfoListIterator; /** * Command class for removing PMObjects @@ -120,7 +120,7 @@ private: PMObjectList m_links; PMObjectList m_linkedDeclares; bool m_linksCreated; - QPtrList<PMMemento> m_dataChanges; + TQPtrList<PMMemento> m_dataChanges; }; #endif diff --git a/kpovmodeler/pmdensity.cpp b/kpovmodeler/pmdensity.cpp index 1cc1d638..3935b6be 100644 --- a/kpovmodeler/pmdensity.cpp +++ b/kpovmodeler/pmdensity.cpp @@ -63,13 +63,13 @@ void PMDensity::cleanUp( ) const Base::cleanUp( ); } -QString PMDensity::description( ) const +TQString PMDensity::description( ) const { return i18n( "density" ); } -PMDialogEditBase* PMDensity::editWidget( QWidget* parent ) const +PMDialogEditBase* PMDensity::editWidget( TQWidget* parent ) const { return new PMDensityEdit( parent ); } diff --git a/kpovmodeler/pmdensity.h b/kpovmodeler/pmdensity.h index 72a76bb7..b1502fe2 100644 --- a/kpovmodeler/pmdensity.h +++ b/kpovmodeler/pmdensity.h @@ -49,7 +49,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMDensity( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -59,9 +59,9 @@ public: /** * Returns a new @ref PMDensityEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmdensity" ); } + virtual TQString pixmap( ) const { return TQString( "pmdensity" ); } private: /** diff --git a/kpovmodeler/pmdensityedit.cpp b/kpovmodeler/pmdensityedit.cpp index 9c7ff732..407a4f80 100644 --- a/kpovmodeler/pmdensityedit.cpp +++ b/kpovmodeler/pmdensityedit.cpp @@ -20,12 +20,12 @@ #include "pmdensity.h" #include "pmlinkedit.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMDensityEdit::PMDensityEdit( QWidget* parent, const char* name ) +PMDensityEdit::PMDensityEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; diff --git a/kpovmodeler/pmdensityedit.h b/kpovmodeler/pmdensityedit.h index 093a750c..a3963ca9 100644 --- a/kpovmodeler/pmdensityedit.h +++ b/kpovmodeler/pmdensityedit.h @@ -39,7 +39,7 @@ public: /** * Creates a PMDensityEdit with parent and name */ - PMDensityEdit( QWidget* parent, const char* name = 0 ); + PMDensityEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdetailobject.cpp b/kpovmodeler/pmdetailobject.cpp index eae526cb..5abc7e22 100644 --- a/kpovmodeler/pmdetailobject.cpp +++ b/kpovmodeler/pmdetailobject.cpp @@ -70,7 +70,7 @@ void PMDetailObject::cleanUp( ) const Base::cleanUp( ); } -void PMDetailObject::serialize( QDomElement& e, QDomDocument& doc ) const +void PMDetailObject::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "global_detail", m_globalDetail ); e.setAttribute( "local_detail_level", m_localDetailLevel ); diff --git a/kpovmodeler/pmdetailobject.h b/kpovmodeler/pmdetailobject.h index 7994cdff..846ef8c0 100644 --- a/kpovmodeler/pmdetailobject.h +++ b/kpovmodeler/pmdetailobject.h @@ -48,7 +48,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); diff --git a/kpovmodeler/pmdetailobjectedit.cpp b/kpovmodeler/pmdetailobjectedit.cpp index d42c668c..661cd892 100644 --- a/kpovmodeler/pmdetailobjectedit.cpp +++ b/kpovmodeler/pmdetailobjectedit.cpp @@ -17,13 +17,13 @@ #include "pmdetailobjectedit.h" #include "pmdetailobject.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qlabel.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqlabel.h> +#include <tqcombobox.h> #include <klocale.h> -PMDetailObjectEdit::PMDetailObjectEdit( QWidget* parent, const char* name ) +PMDetailObjectEdit::PMDetailObjectEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -33,10 +33,10 @@ void PMDetailObjectEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout = new QHBoxLayout( topLayout( ) ); - m_pGlobalDetail = new QCheckBox( i18n( "Global detail" ), this ); - m_pLocalDetailLevelLabel = new QLabel( i18n( "Detail level:" ), this ); - m_pLocalDetailLevel = new QComboBox( this ); + TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + m_pGlobalDetail = new TQCheckBox( i18n( "Global detail" ), this ); + m_pLocalDetailLevelLabel = new TQLabel( i18n( "Detail level:" ), this ); + m_pLocalDetailLevel = new TQComboBox( this ); m_pLocalDetailLevel->insertItem( i18n( "Very Low" ) ); m_pLocalDetailLevel->insertItem( i18n( "Low" ) ); m_pLocalDetailLevel->insertItem( i18n( "Medium" ) ); @@ -48,8 +48,8 @@ void PMDetailObjectEdit::createTopWidgets( ) layout->addWidget( m_pLocalDetailLevel ); layout->addStretch( ); - connect( m_pGlobalDetail, SIGNAL( clicked( ) ), SLOT( slotGlobalDetailClicked( ) ) ); - connect( m_pLocalDetailLevel, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pGlobalDetail, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotGlobalDetailClicked( ) ) ); + connect( m_pLocalDetailLevel, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMDetailObjectEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmdetailobjectedit.h b/kpovmodeler/pmdetailobjectedit.h index 7a585034..74aa3a29 100644 --- a/kpovmodeler/pmdetailobjectedit.h +++ b/kpovmodeler/pmdetailobjectedit.h @@ -25,9 +25,9 @@ #include "pmnamedobjectedit.h" class PMDetailObject; -class QCheckBox; -class QLabel; -class QComboBox; +class TQCheckBox; +class TQLabel; +class TQComboBox; /** * Dialog edit class for @ref PMNamedObject. @@ -40,7 +40,7 @@ public: /** * Creates a PMNamedObjectEdit with parent and name */ - PMDetailObjectEdit( QWidget* parent, const char* name = 0 ); + PMDetailObjectEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -59,9 +59,9 @@ private slots: private: PMDetailObject* m_pDisplayedObject; - QCheckBox* m_pGlobalDetail; - QLabel* m_pLocalDetailLevelLabel; - QComboBox* m_pLocalDetailLevel; + TQCheckBox* m_pGlobalDetail; + TQLabel* m_pLocalDetailLevelLabel; + TQComboBox* m_pLocalDetailLevel; }; diff --git a/kpovmodeler/pmdialogeditbase.cpp b/kpovmodeler/pmdialogeditbase.cpp index 9defd762..ea601be3 100644 --- a/kpovmodeler/pmdialogeditbase.cpp +++ b/kpovmodeler/pmdialogeditbase.cpp @@ -18,13 +18,13 @@ #include "pmdialogeditbase.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qvbox.h> -#include <qbuffer.h> -#include <qptrdict.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqvbox.h> +#include <tqbuffer.h> +#include <tqptrdict.h> #include <kdialog.h> #include <kconfig.h> #include <klocale.h> @@ -51,52 +51,52 @@ int PMDialogEditBase::s_previewAADepth = c_defaultTPAADepth; double PMDialogEditBase::s_previewAAThreshold = c_defaultTPAAThreshold; bool PMDialogEditBase::s_showFloor = c_defaultTPShowFloor; bool PMDialogEditBase::s_showWall = c_defaultTPShowWall; -QColor PMDialogEditBase::s_wallColor1 = c_defaultTPWallColor1; -QColor PMDialogEditBase::s_wallColor2 = c_defaultTPWallColor2; -QColor PMDialogEditBase::s_floorColor1 = c_defaultTPFloorColor1; -QColor PMDialogEditBase::s_floorColor2 = c_defaultTPFloorColor2; +TQColor PMDialogEditBase::s_wallColor1 = c_defaultTPWallColor1; +TQColor PMDialogEditBase::s_wallColor2 = c_defaultTPWallColor2; +TQColor PMDialogEditBase::s_floorColor1 = c_defaultTPFloorColor1; +TQColor PMDialogEditBase::s_floorColor2 = c_defaultTPFloorColor2; bool PMDialogEditBase::s_previewLocal = false; double PMDialogEditBase::s_previewGamma = c_defaultTPGamma; /** Constants for texture preview */ -const QString c_wallCode = QString( +const TQString c_wallCode = TQString( "plane { <0, 0, -1>, -2\n" " pigment { checker %1 %2\n" " scale <0.5, 0.5, 0.5>\n" " translate <0.5, 0, 0>\n" " }\n" "}\n" ); -const QString c_floorCode = QString( +const TQString c_floorCode = TQString( "plane { <0, 1, 0>, 0\n" " pigment { checker %1 %2\n" " scale <0.5, 0.5, 0.5>\n" " }\n" "}\n" ); -const QString c_lightCode = QString( +const TQString c_lightCode = TQString( "light_source { <-2.5, 3, -1.5>, rgb <1, 1, 1> }\n" "light_source { <3, 3, -3>, rgb <0.6, 0.6, 0.6> shadowless }\n" ); -const QString c_cameraCode[3] = { - QString( "camera { location <-1, 1.25, -2> right <1, 0, 0>\n" +const TQString c_cameraCode[3] = { + TQString( "camera { location <-1, 1.25, -2> right <1, 0, 0>\n" " look_at <0.0, 0.5, 0> angle 45 }\n" ), - QString( "camera { location <-1, 2, -3> right <1, 0, 0>\n" + TQString( "camera { location <-1, 2, -3> right <1, 0, 0>\n" " look_at <0.0, 1, 0> angle 45 }\n" ), - QString( "camera { location <-2, 2.5, -4> right <1, 0, 0>\n" + TQString( "camera { location <-2, 2.5, -4> right <1, 0, 0>\n" " look_at <0.0, 1.5, 0> angle 45 }\n" ) }; -const QString c_sphereCode = QString( +const TQString c_sphereCode = TQString( "sphere { <0, 0.5, 0>, 0.5 translate <0, %1, 0> }\n" ); -const QString c_cylinderCode = QString( +const TQString c_cylinderCode = TQString( "cylinder { <0, 0, 0>, <0, 1, 0>, 0.5 translate <0, %1, 0> }\n" ); -const QString c_boxCode = QString( +const TQString c_boxCode = TQString( "box { <-0.5, 0, -0.5>, <0.5, 1, 0.5> translate <0, %1, 0> }\n" ); -const QString c_globalSettingsCode = QString( +const TQString c_globalSettingsCode = TQString( "global_settings { assumed_gamma %1 }\n" ); -PMDialogEditBase::PMDialogEditBase( QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMDialogEditBase::PMDialogEditBase( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { m_pDisplayedObject = 0; m_pPart = 0; @@ -118,7 +118,7 @@ PMDialogEditBase::~PMDialogEditBase( ) void PMDialogEditBase::createWidgets( ) { - m_pTopLayout = new QBoxLayout( this, QBoxLayout::TopToBottom, + m_pTopLayout = new TQBoxLayout( this, TQBoxLayout::TopToBottom, KDialog::spacingHint( ) ); createTopWidgets( ); @@ -130,7 +130,7 @@ void PMDialogEditBase::createWidgets( ) void PMDialogEditBase::createBottomWidgets( ) { - m_pTexturePreviewWidget = new QWidget( this ); + m_pTexturePreviewWidget = new TQWidget( this ); m_pTexturePreviewWidget->hide( ); m_pTopLayout->addWidget( m_pTexturePreviewWidget ); } @@ -163,43 +163,43 @@ void PMDialogEditBase::displayObject( PMObject* o ) // is the preview widget created? if( !m_pRenderWidget ) { - QVBoxLayout* vl = new QVBoxLayout( m_pTexturePreviewWidget, 0, + TQVBoxLayout* vl = new TQVBoxLayout( m_pTexturePreviewWidget, 0, KDialog::spacingHint( ) ); vl->addSpacing( 10 ); - QFrame* hline = new QFrame( m_pTexturePreviewWidget ); - hline->setFrameStyle( QFrame::HLine | QFrame::Plain ); + TQFrame* hline = new TQFrame( m_pTexturePreviewWidget ); + hline->setFrameStyle( TQFrame::HLine | TQFrame::Plain ); hline->setLineWidth( 1 ); vl->addWidget( hline ); - vl->addWidget( new QLabel( i18n( "Texture preview:" ), m_pTexturePreviewWidget ) ); - m_pRenderFrame = new QVBox( m_pTexturePreviewWidget ); - m_pRenderFrame->setFrameStyle( QFrame::StyledPanel | QFrame::Sunken ); + vl->addWidget( new TQLabel( i18n( "Texture preview:" ), m_pTexturePreviewWidget ) ); + m_pRenderFrame = new TQVBox( m_pTexturePreviewWidget ); + m_pRenderFrame->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); m_pRenderFrame->setLineWidth( 2 ); m_pRenderFrame->hide( ); vl->addWidget( m_pRenderFrame ); m_pRenderWidget = new PMPovrayRenderWidget( m_pRenderFrame ); - connect( m_pRenderWidget, SIGNAL( finished( int ) ), - SLOT( slotPreviewFinished( int ) ) ); - m_pPreviewLocalBox = new QCheckBox( i18n( "local" ), m_pTexturePreviewWidget ); + connect( m_pRenderWidget, TQT_SIGNAL( finished( int ) ), + TQT_SLOT( slotPreviewFinished( int ) ) ); + m_pPreviewLocalBox = new TQCheckBox( i18n( "local" ), m_pTexturePreviewWidget ); m_pPreviewLocalBox->setChecked( s_previewLocal ); - connect( m_pPreviewLocalBox, SIGNAL( toggled( bool ) ), - SLOT( slotPreviewLocal( bool ) ) ); + connect( m_pPreviewLocalBox, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( slotPreviewLocal( bool ) ) ); vl->addWidget( m_pPreviewLocalBox ); - QHBoxLayout* hl = new QHBoxLayout( vl ); - m_pPreviewButton = new QPushButton( i18n( "&Preview" ), m_pTexturePreviewWidget ); + TQHBoxLayout* hl = new TQHBoxLayout( vl ); + m_pPreviewButton = new TQPushButton( i18n( "&Preview" ), m_pTexturePreviewWidget ); hl->addWidget( m_pPreviewButton ); - connect( m_pPreviewButton, SIGNAL( clicked( ) ), - SLOT( slotTexturePreview( ) ) ); - m_pOutputButton = new QPushButton( i18n( "Povray Output" ), m_pTexturePreviewWidget ); + connect( m_pPreviewButton, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotTexturePreview( ) ) ); + m_pOutputButton = new TQPushButton( i18n( "Povray Output" ), m_pTexturePreviewWidget ); hl->addWidget( m_pOutputButton ); - connect( m_pOutputButton, SIGNAL( clicked( ) ), - SLOT( slotPovrayOutput( ) ) ); + connect( m_pOutputButton, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotPovrayOutput( ) ) ); hl->addStretch( 1 ); m_pOutputWidget = new PMPovrayOutputWidget( ); - connect( m_pRenderWidget, SIGNAL( povrayMessage( const QString& ) ), - m_pOutputWidget, SLOT( slotText( const QString& ) ) ); + connect( m_pRenderWidget, TQT_SIGNAL( povrayMessage( const TQString& ) ), + m_pOutputWidget, TQT_SLOT( slotText( const TQString& ) ) ); } m_pTexturePreviewWidget->show( ); @@ -217,7 +217,7 @@ void PMDialogEditBase::displayObject( PMObject* o ) } } -void PMDialogEditBase::setHelp( const QString& anchor ) +void PMDialogEditBase::setHelp( const TQString& anchor ) { m_helpTopic = anchor; } @@ -228,7 +228,7 @@ void PMDialogEditBase::redisplay( ) displayObject( m_pDisplayedObject ); } -void PMDialogEditBase::setCheckBox( QCheckBox* box, PMThreeState state ) +void PMDialogEditBase::setCheckBox( TQCheckBox* box, PMThreeState state ) { switch( state ) { @@ -244,18 +244,18 @@ void PMDialogEditBase::setCheckBox( QCheckBox* box, PMThreeState state ) } } -PMThreeState PMDialogEditBase::checkBoxState( QCheckBox* box ) +PMThreeState PMDialogEditBase::checkBoxState( TQCheckBox* box ) { PMThreeState st = PMTrue; switch( box->state( ) ) { - case QCheckBox::On: + case TQCheckBox::On: st = PMTrue; break; - case QCheckBox::Off: + case TQCheckBox::Off: st = PMFalse; break; - case QCheckBox::NoChange: + case TQCheckBox::NoChange: st = PMUnspecified; break; } @@ -385,15 +385,15 @@ void PMDialogEditBase::slotTexturePreview( ) s_showSphere = true; int numObjects = 0; - QByteArray scene; - QBuffer buffer( scene ); + TQByteArray scene; + TQBuffer buffer( scene ); buffer.open( IO_WriteOnly ); - QTextStream str( &buffer ); + TQTextStream str( &buffer ); PMPovray31Format format; PMSerializer* dev = format.newSerializer( &buffer ); PMRenderMode mode; PMObjectList neededDeclares, objectsToCheck; - QPtrDict<PMObject> objectsToSerialize( 101 ); + TQPtrDict<PMObject> objectsToSerialize( 101 ); PMObject* link; // find needed declares diff --git a/kpovmodeler/pmdialogeditbase.h b/kpovmodeler/pmdialogeditbase.h index 547946f5..6057648e 100644 --- a/kpovmodeler/pmdialogeditbase.h +++ b/kpovmodeler/pmdialogeditbase.h @@ -24,16 +24,16 @@ #include <config.h> #endif -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> #include "pmobject.h" -class QBoxLayout; -class QCheckBox; -class QLayout; -class QPushButton; -class QVBox; +class TQBoxLayout; +class TQCheckBox; +class TQLayout; +class TQPushButton; +class TQVBox; class KConfig; class PMPart; class PMPovrayRenderWidget; @@ -62,7 +62,7 @@ public: * No widgets are created within the constructor! You have to call * @ref createWidgets after creating a new edit widget. */ - PMDialogEditBase( QWidget* parent, const char* name = 0 ); + PMDialogEditBase( TQWidget* parent, const char* name = 0 ); /** * Destructor */ @@ -108,7 +108,7 @@ public: /** * Returns the help topic */ - const QString& helpTopic( ) { return m_helpTopic; } + const TQString& helpTopic( ) { return m_helpTopic; } /** * Discards changes and redisplays the object @@ -123,11 +123,11 @@ public: /** * Sets the check box to state s */ - static void setCheckBox( QCheckBox* box, PMThreeState s ); + static void setCheckBox( TQCheckBox* box, PMThreeState s ); /** * Gets the state of the checkbox */ - static PMThreeState checkBoxState( QCheckBox* box ); + static PMThreeState checkBoxState( TQCheckBox* box ); /** * Sets the part @@ -215,35 +215,35 @@ public: /** * Returns the first wall color */ - static QColor previewWallColor1( ) { return s_wallColor1; } + static TQColor previewWallColor1( ) { return s_wallColor1; } /** * Sets the first wall color */ - static void setPreviewWallColor1( const QColor& c ) { s_wallColor1 = c; } + static void setPreviewWallColor1( const TQColor& c ) { s_wallColor1 = c; } /** * Returns the second wall color */ - static QColor previewWallColor2( ) { return s_wallColor2; } + static TQColor previewWallColor2( ) { return s_wallColor2; } /** * Sets the second wall color */ - static void setPreviewWallColor2( const QColor& c ) { s_wallColor2 = c; } + static void setPreviewWallColor2( const TQColor& c ) { s_wallColor2 = c; } /** * Returns the first floor color */ - static QColor previewFloorColor1( ) { return s_floorColor1; } + static TQColor previewFloorColor1( ) { return s_floorColor1; } /** * Sets the first floor color */ - static void setPreviewFloorColor1( const QColor& c ) { s_floorColor1 = c; } + static void setPreviewFloorColor1( const TQColor& c ) { s_floorColor1 = c; } /** * Returns the second floor color */ - static QColor previewFloorColor2( ) { return s_floorColor2; } + static TQColor previewFloorColor2( ) { return s_floorColor2; } /** * Sets the second floor color */ - static void setPreviewFloorColor2( const QColor& c ) { s_floorColor2 = c; } + static void setPreviewFloorColor2( const TQColor& c ) { s_floorColor2 = c; } /** * Returns the local flag for texture preview */ @@ -268,7 +268,7 @@ protected: * Sets the help topic * @param anchor Defined anchor in your docbook sources */ - void setHelp( const QString& anchor ); + void setHelp( const TQString& anchor ); /** * Create widgets here, that should be placed on top of the widgets @@ -297,7 +297,7 @@ protected: /** * Returns a pointer to the top layout */ - QBoxLayout* topLayout( ) const { return m_pTopLayout; } + TQBoxLayout* topLayout( ) const { return m_pTopLayout; } protected slots: void slotTexturePreview( ); @@ -326,16 +326,16 @@ private: void findTextures( PMObject*& global, PMObject*& local ) const; PMObject* m_pDisplayedObject; - QBoxLayout* m_pTopLayout; - QString m_helpTopic; + TQBoxLayout* m_pTopLayout; + TQString m_helpTopic; PMPart* m_pPart; - QWidget* m_pTexturePreviewWidget; + TQWidget* m_pTexturePreviewWidget; PMPovrayRenderWidget* m_pRenderWidget; PMPovrayOutputWidget* m_pOutputWidget; - QVBox* m_pRenderFrame; - QCheckBox* m_pPreviewLocalBox; - QPushButton* m_pPreviewButton; - QPushButton* m_pOutputButton; + TQVBox* m_pRenderFrame; + TQCheckBox* m_pPreviewLocalBox; + TQPushButton* m_pPreviewButton; + TQPushButton* m_pOutputButton; static int s_previewSize; static bool s_showSphere; @@ -346,8 +346,8 @@ private: static double s_previewAAThreshold; static bool s_showFloor; static bool s_showWall; - static QColor s_wallColor1, s_wallColor2; - static QColor s_floorColor1, s_floorColor2; + static TQColor s_wallColor1, s_wallColor2; + static TQColor s_floorColor1, s_floorColor2; static bool s_previewLocal; static double s_previewGamma; }; diff --git a/kpovmodeler/pmdialogview.cpp b/kpovmodeler/pmdialogview.cpp index f88a0272..243427b5 100644 --- a/kpovmodeler/pmdialogview.cpp +++ b/kpovmodeler/pmdialogview.cpp @@ -33,14 +33,14 @@ #include <krun.h> #include <kstdguiitem.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qgroupbox.h> -#include <qscrollview.h> -#include <qlabel.h> - -PMDialogEditContent::PMDialogEditContent( QWidget* parent, const char* name ) - : QScrollView( parent, name ) +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqgroupbox.h> +#include <tqscrollview.h> +#include <tqlabel.h> + +PMDialogEditContent::PMDialogEditContent( TQWidget* parent, const char* name ) + : TQScrollView( parent, name ) { m_pContents = 0; setVScrollBarMode( AlwaysOff ); @@ -50,7 +50,7 @@ PMDialogEditContent::PMDialogEditContent( QWidget* parent, const char* name ) setResizePolicy( Manual ); } -void PMDialogEditContent::setContents( QWidget* wid ) +void PMDialogEditContent::setContents( TQWidget* wid ) { if( m_pContents ) removeChild( m_pContents ); @@ -69,7 +69,7 @@ void PMDialogEditContent::calculateSize( ) int fw = lineWidth( ) * 2; if( m_pContents ) { - QSize newSize = m_pContents->minimumSizeHint( ); + TQSize newSize = m_pContents->minimumSizeHint( ); setVScrollBarMode( AlwaysOff ); setHScrollBarMode( AlwaysOff ); @@ -106,12 +106,12 @@ void PMDialogEditContent::calculateSize( ) } } -void PMDialogEditContent::resizeEvent( QResizeEvent* /* ev */ ) +void PMDialogEditContent::resizeEvent( TQResizeEvent* /* ev */ ) { calculateSize( ); } -PMDialogView::PMDialogView( PMPart* part, QWidget* parent, const char* name ) +PMDialogView::PMDialogView( PMPart* part, TQWidget* parent, const char* name ) : PMViewBase( parent, name ) { m_pDisplayedWidget = 0; @@ -120,12 +120,12 @@ PMDialogView::PMDialogView( PMPart* part, QWidget* parent, const char* name ) m_pHelper->show( ); m_pPart = part; - m_pLayout = new QVBoxLayout( this, KDialog::marginHint( ), + m_pLayout = new TQVBoxLayout( this, KDialog::marginHint( ), KDialog::spacingHint( ) ); - QHBoxLayout* labelLayout = new QHBoxLayout( m_pLayout ); - m_pPixmapLabel = new QLabel( this ); - m_pObjectTypeLabel = new QLabel( this ); + TQHBoxLayout* labelLayout = new TQHBoxLayout( m_pLayout ); + m_pPixmapLabel = new TQLabel( this ); + m_pObjectTypeLabel = new TQLabel( this ); labelLayout->addWidget( m_pPixmapLabel ); labelLayout->addWidget( m_pObjectTypeLabel ); labelLayout->addStretch( ); @@ -133,34 +133,34 @@ PMDialogView::PMDialogView( PMPart* part, QWidget* parent, const char* name ) m_pLayout->addWidget( m_pHelper, 2 ); m_pLayout->addStretch( ); - QHBoxLayout* buttonLayout = new QHBoxLayout( m_pLayout ); + TQHBoxLayout* buttonLayout = new TQHBoxLayout( m_pLayout ); m_pHelpButton = new KPushButton( KStdGuiItem::help(), this ); buttonLayout->addWidget( m_pHelpButton ); - connect( m_pHelpButton, SIGNAL( clicked( ) ), this, SLOT( slotHelp( ) ) ); + connect( m_pHelpButton, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotHelp( ) ) ); m_pHelpButton->setEnabled( false ); m_pApplyButton = new KPushButton( KStdGuiItem::apply(), this ); buttonLayout->addWidget( m_pApplyButton ); - connect( m_pApplyButton, SIGNAL( clicked( ) ), this, SLOT( slotApply( ) ) ); + connect( m_pApplyButton, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotApply( ) ) ); m_pApplyButton->setEnabled( false ); buttonLayout->addStretch( ); m_pCancelButton = new KPushButton( KStdGuiItem::cancel(), this ); buttonLayout->addWidget( m_pCancelButton ); - connect( m_pCancelButton, SIGNAL( clicked( ) ), this, SLOT( slotCancel( ) ) ); + connect( m_pCancelButton, TQT_SIGNAL( clicked( ) ), this, TQT_SLOT( slotCancel( ) ) ); m_pCancelButton->setEnabled( false ); m_pLayout->activate( ); - connect( part, SIGNAL( refresh( ) ), SLOT( slotRefresh( ) ) ); - connect( part, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ), - SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) ); - connect( part, SIGNAL( clear( ) ), SLOT( slotClear( ) ) ); - connect( part, SIGNAL( aboutToRender( ) ), SLOT( slotAboutToRender( ) ) ); - connect( part, SIGNAL( aboutToSave( ) ), SLOT( slotAboutToRender( ) ) ); - connect( this, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ), - part, SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) ); + connect( part, TQT_SIGNAL( refresh( ) ), TQT_SLOT( slotRefresh( ) ) ); + connect( part, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ), + TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) ); + connect( part, TQT_SIGNAL( clear( ) ), TQT_SLOT( slotClear( ) ) ); + connect( part, TQT_SIGNAL( aboutToRender( ) ), TQT_SLOT( slotAboutToRender( ) ) ); + connect( part, TQT_SIGNAL( aboutToSave( ) ), TQT_SLOT( slotAboutToRender( ) ) ); + connect( this, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ), + part, TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) ); displayObject( m_pPart->activeObject( ) ); } @@ -172,7 +172,7 @@ PMDialogView::~PMDialogView( ) emit destroyed( this ); } -void PMDialogView::slotObjectChanged( PMObject* obj, const int mode, QObject* sender ) +void PMDialogView::slotObjectChanged( PMObject* obj, const int mode, TQObject* sender ) { if( sender == this ) return; @@ -275,7 +275,7 @@ void PMDialogView::slotHelp( ) { if( m_pDisplayedWidget && m_pDisplayedWidget->displayedObject( ) ) { - QString url = PMDocumentationMap::theMap( )->documentation( + TQString url = PMDocumentationMap::theMap( )->documentation( m_pDisplayedWidget->displayedObject( )->className( ) ); if( !url.isEmpty( ) ) { @@ -371,15 +371,15 @@ void PMDialogView::displayObject( PMObject* obj, bool updateDescription ) if( m_pDisplayedWidget ) { - connect( m_pDisplayedWidget, SIGNAL( dataChanged( ) ), - this, SLOT( slotDataChanged( ) ) ); - connect( m_pDisplayedWidget, SIGNAL( sizeChanged( ) ), - this, SLOT( slotSizeChanged( ) ) ); - connect( m_pDisplayedWidget, SIGNAL( aboutToRender( ) ), - this, SLOT( slotAboutToRender( ) ) ); + connect( m_pDisplayedWidget, TQT_SIGNAL( dataChanged( ) ), + this, TQT_SLOT( slotDataChanged( ) ) ); + connect( m_pDisplayedWidget, TQT_SIGNAL( sizeChanged( ) ), + this, TQT_SLOT( slotSizeChanged( ) ) ); + connect( m_pDisplayedWidget, TQT_SIGNAL( aboutToRender( ) ), + this, TQT_SLOT( slotAboutToRender( ) ) ); connect( m_pDisplayedWidget, - SIGNAL( controlPointSelectionChanged( ) ), - SLOT( slotControlPointSelectionChanged( ) ) ); + TQT_SIGNAL( controlPointSelectionChanged( ) ), + TQT_SLOT( slotControlPointSelectionChanged( ) ) ); } } @@ -415,7 +415,7 @@ void PMDialogView::displayObject( PMObject* obj, bool updateDescription ) m_unsavedData = false; } -void PMDialogView::keyPressEvent( QKeyEvent* ev ) +void PMDialogView::keyPressEvent( TQKeyEvent* ev ) { if( ( ev->key( ) == Key_Return ) || ( ev->key( ) == Key_Enter ) ) slotApply( ); @@ -428,12 +428,12 @@ void PMDialogView::slotAboutToRender( ) slotApply( ); } -QString PMDialogView::description( ) const +TQString PMDialogView::description( ) const { return i18n( "Object Properties" ); } -QString PMDialogViewFactory::description( ) const +TQString PMDialogViewFactory::description( ) const { return i18n( "Object Properties" ); } diff --git a/kpovmodeler/pmdialogview.h b/kpovmodeler/pmdialogview.h index aef224eb..680cbbc9 100644 --- a/kpovmodeler/pmdialogview.h +++ b/kpovmodeler/pmdialogview.h @@ -23,8 +23,8 @@ #include <config.h> #endif -#include <qwidget.h> -#include <qscrollview.h> +#include <tqwidget.h> +#include <tqscrollview.h> #include <kpushbutton.h> #include "pmviewbase.h" @@ -33,9 +33,9 @@ class PMDialogEditBase; class PMObject; class PMPart; -class QGroupBox; -class QBoxLayout; -class QLabel; +class TQGroupBox; +class TQBoxLayout; +class TQLabel; /** * Helper class for @ref PMDialogView @@ -44,13 +44,13 @@ class PMDialogEditContent : public QScrollView { Q_OBJECT public: - PMDialogEditContent( QWidget* parent, const char* name = 0 ); - void setContents( QWidget* wid ); + PMDialogEditContent( TQWidget* parent, const char* name = 0 ); + void setContents( TQWidget* wid ); void calculateSize( ); protected: - void resizeEvent( QResizeEvent* ); + void resizeEvent( TQResizeEvent* ); private: - QWidget* m_pContents; + TQWidget* m_pContents; }; /** @@ -67,23 +67,23 @@ public: /** * Creates a new PMDialogView widget */ - PMDialogView( PMPart* part, QWidget* parent, const char* name = 0 ); + PMDialogView( PMPart* part, TQWidget* parent, const char* name = 0 ); /** * Deletes the widget */ ~PMDialogView( ); /** */ - virtual QString viewType( ) const { return QString( "dialogview" ); } + virtual TQString viewType( ) const { return TQString( "dialogview" ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; public slots: /** * Called when an object is changed. * Mode is a bit combination of @ref PMChange constants */ - void slotObjectChanged( PMObject* obj, const int mode, QObject* sender ); + void slotObjectChanged( PMObject* obj, const int mode, TQObject* sender ); /** * Called before the scene is rendered */ @@ -101,14 +101,14 @@ signals: * Signal that is emitted when an object is changed. * Mode is a bit combination of @ref PMChange constants. */ - void objectChanged( PMObject* obj, const int mode, QObject* sender ); + void objectChanged( PMObject* obj, const int mode, TQObject* sender ); /** * Emitted in the destructor */ void destroyed( PMDialogView* v ); protected: - virtual void keyPressEvent( QKeyEvent* ); + virtual void keyPressEvent( TQKeyEvent* ); private slots: void slotApply( ); @@ -129,14 +129,14 @@ private: void displayObject( PMObject* obj, bool updateDescription = true ); PMDialogEditBase* m_pDisplayedWidget; - QBoxLayout* m_pLayout; + TQBoxLayout* m_pLayout; KPushButton* m_pApplyButton; KPushButton* m_pCancelButton; KPushButton* m_pHelpButton; - QLabel* m_pPixmapLabel; - QLabel* m_pObjectTypeLabel; + TQLabel* m_pPixmapLabel; + TQLabel* m_pObjectTypeLabel; PMDialogEditContent* m_pHelper; @@ -151,10 +151,10 @@ class PMDialogViewFactory : public PMViewTypeFactory { public: PMDialogViewFactory( ) { } - virtual QString viewType( ) const { return QString( "dialogview" ); } - virtual QString description( ) const; - virtual QString iconName( ) const { return QString( "pmdialogview" ); } - virtual PMViewBase* newInstance( QWidget* parent, PMPart* part ) const + virtual TQString viewType( ) const { return TQString( "dialogview" ); } + virtual TQString description( ) const; + virtual TQString iconName( ) const { return TQString( "pmdialogview" ); } + virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const { return new PMDialogView( part, parent ); } diff --git a/kpovmodeler/pmdisc.cpp b/kpovmodeler/pmdisc.cpp index d276e541..bda89579 100644 --- a/kpovmodeler/pmdisc.cpp +++ b/kpovmodeler/pmdisc.cpp @@ -73,12 +73,12 @@ PMDisc::~PMDisc( ) { } -QString PMDisc::description( ) const +TQString PMDisc::description( ) const { return i18n( "disc" ); } -void PMDisc::serialize( QDomElement& e, QDomDocument& doc ) const +void PMDisc::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "center", m_center.serializeXML( ) ); e.setAttribute( "normal", m_normal.serializeXML( ) ); @@ -176,7 +176,7 @@ void PMDisc::setHoleRadius( double hradius ) } } -PMDialogEditBase* PMDisc::editWidget( QWidget* parent ) const +PMDialogEditBase* PMDisc::editWidget( TQWidget* parent ) const { return new PMDiscEdit( parent ); } diff --git a/kpovmodeler/pmdisc.h b/kpovmodeler/pmdisc.h index 35cb0081..62201bcf 100644 --- a/kpovmodeler/pmdisc.h +++ b/kpovmodeler/pmdisc.h @@ -56,22 +56,22 @@ public: virtual PMObject* copy( ) const { return new PMDisc( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMDiscEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ - virtual QString pixmap( ) const { return QString( "pmdisc" ); } + virtual TQString pixmap( ) const { return TQString( "pmdisc" ); } /** * Return the center diff --git a/kpovmodeler/pmdiscedit.cpp b/kpovmodeler/pmdiscedit.cpp index 109c3d66..0197a806 100644 --- a/kpovmodeler/pmdiscedit.cpp +++ b/kpovmodeler/pmdiscedit.cpp @@ -21,13 +21,13 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kmessagebox.h> -PMDiscEdit::PMDiscEdit( QWidget* parent, const char* name ) +PMDiscEdit::PMDiscEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,8 +37,8 @@ void PMDiscEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout; - QGridLayout* gl; + TQHBoxLayout* layout; + TQGridLayout* gl; m_pCenter = new PMVectorEdit( "x", "y", "z", this ); m_pNormal = new PMVectorEdit( "x", "y", "z", this ); @@ -47,30 +47,30 @@ void PMDiscEdit::createTopWidgets( ) m_pRadius = new PMFloatEdit( this ); m_pRadius->setValidation( true, 0.0, false, 0.0 ); - gl = new QGridLayout( topLayout( ), 2, 2 ); - gl->addWidget( new QLabel( i18n( "Center:" ), this ), 0, 0 ); + gl = new TQGridLayout( topLayout( ), 2, 2 ); + gl->addWidget( new TQLabel( i18n( "Center:" ), this ), 0, 0 ); gl->addWidget( m_pCenter, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Normal:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Normal:" ), this ), 1, 0 ); gl->addWidget( m_pNormal, 1, 1 ); - layout = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( layout, 2, 2 ); - gl->addWidget( new QLabel( i18n( "Radius:" ), this ), 0, 0 ); + layout = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( layout, 2, 2 ); + gl->addWidget( new TQLabel( i18n( "Radius:" ), this ), 0, 0 ); gl->addWidget( m_pRadius, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Hole radius:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Hole radius:" ), this ), 1, 0 ); gl->addWidget( m_pHRadius, 1, 1 ); layout->addStretch( 1 ); - QPushButton* nb = new QPushButton( i18n( "Normalize" ), this ); - layout = new QHBoxLayout( topLayout( ) ); + TQPushButton* nb = new TQPushButton( i18n( "Normalize" ), this ); + layout = new TQHBoxLayout( topLayout( ) ); layout->addWidget( nb ); layout->addStretch( 1 ); - connect( m_pCenter, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pNormal, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pHRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( nb, SIGNAL( clicked( ) ), SLOT( slotNormalize( ) ) ); + connect( m_pCenter, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pNormal, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pHRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( nb, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotNormalize( ) ) ); } void PMDiscEdit::slotNormalize( ) diff --git a/kpovmodeler/pmdiscedit.h b/kpovmodeler/pmdiscedit.h index bc603ddc..5ce4d111 100644 --- a/kpovmodeler/pmdiscedit.h +++ b/kpovmodeler/pmdiscedit.h @@ -38,7 +38,7 @@ public: /** * Creates a PMPlaneEdit with parent and name */ - PMDiscEdit( QWidget* parent, const char* name = 0 ); + PMDiscEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmdistancecontrolpoint.cpp b/kpovmodeler/pmdistancecontrolpoint.cpp index dbd8b881..8f49bb18 100644 --- a/kpovmodeler/pmdistancecontrolpoint.cpp +++ b/kpovmodeler/pmdistancecontrolpoint.cpp @@ -23,7 +23,7 @@ PMDistanceControlPoint::PMDistanceControlPoint( PMControlPoint* base, const PMVector& direction, double distance, - int id, const QString& description, + int id, const TQString& description, bool showExtraLine ) : PMControlPoint( id, description ) { @@ -36,7 +36,7 @@ PMDistanceControlPoint::PMDistanceControlPoint( PMControlPoint* base, PMDistanceControlPoint::PMDistanceControlPoint( const PMVector& base, const PMVector& direction, double distance, - int id, const QString& description, + int id, const TQString& description, bool showExtraLine ) : PMControlPoint( id, description ) { diff --git a/kpovmodeler/pmdistancecontrolpoint.h b/kpovmodeler/pmdistancecontrolpoint.h index f5e28fff..afc39fbd 100644 --- a/kpovmodeler/pmdistancecontrolpoint.h +++ b/kpovmodeler/pmdistancecontrolpoint.h @@ -38,7 +38,7 @@ public: * The base point of the vector is given by the control point location. */ PMDistanceControlPoint( PMControlPoint* location, const PMVector& direction, - double distance, int id, const QString& description, + double distance, int id, const TQString& description, bool extraLine = false ); /** * Creates a PMDistanceControlPoint with id. @@ -46,7 +46,7 @@ public: * The base point of the vector is given by the vector p. */ PMDistanceControlPoint( const PMVector& location, const PMVector& direction, - double distance, int id, const QString& description, + double distance, int id, const TQString& description, bool extraLine = false ); /** diff --git a/kpovmodeler/pmdockwidget.cpp b/kpovmodeler/pmdockwidget.cpp index 625ea6bc..499d1cef 100644 --- a/kpovmodeler/pmdockwidget.cpp +++ b/kpovmodeler/pmdockwidget.cpp @@ -19,15 +19,15 @@ #include "pmdockwidget.h" #include "pmdockwidget_private.h" -#include <qapplication.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qobjectlist.h> -#include <qstrlist.h> -#include <qcursor.h> -#include <qwidgetlist.h> -#include <qtabwidget.h> -#include <qstyle.h> +#include <tqapplication.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqobjectlist.h> +#include <tqstrlist.h> +#include <tqcursor.h> +#include <tqwidgetlist.h> +#include <tqtabwidget.h> +#include <tqstyle.h> #ifndef NO_KDE2 #include <kconfig.h> @@ -41,9 +41,9 @@ #include <X11/Xlib.h> #endif #else -#include <qapplication.h> -#include <qtoolbar.h> -#include <qpopupmenu.h> +#include <tqapplication.h> +#include <tqtoolbar.h> +#include <tqpopupmenu.h> #endif #include "pmdebug.h" @@ -56,7 +56,7 @@ #include <kinstance.h> #include <khelpmenu.h> #include <kstandarddirs.h> -#include <qapplication.h> +#include <tqapplication.h> #include <kdebug.h> #include <kxmlguifactory.h> @@ -119,7 +119,7 @@ public: { } - QGuardedPtr<Part> m_activePart; + TQGuardedPtr<Part> m_activePart; bool m_bShellGUIActivated; KHelpMenu *m_helpMenu; }; @@ -134,10 +134,10 @@ public: * * @author Max Judin. */ -PMDockMainWindow::PMDockMainWindow( QWidget* parent, const char *name, WFlags f) +PMDockMainWindow::PMDockMainWindow( TQWidget* parent, const char *name, WFlags f) :KMainWindow( parent, name, f ) { - QString new_name = QString(name) + QString("_DockManager"); + TQString new_name = TQString(name) + TQString("_DockManager"); dockManager = new PMDockManager( this, new_name.latin1() ); mainDockWidget = 0L; @@ -154,27 +154,27 @@ PMDockMainWindow::~PMDockMainWindow() // kparts/dockmainwindow stuff void PMDockMainWindow::createGUI( Part * part ) { - kdDebug(1000) << QString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L") << endl; + kdDebug(1000) << TQString("DockMainWindow::createGUI for %1").arg(part?part->name():"0L") << endl; KXMLGUIFactory *factory = guiFactory(); setUpdatesEnabled( false ); - QPtrList<Plugin> plugins; + TQPtrList<Plugin> plugins; if ( d->m_activePart ) { - kdDebug(1000) << QString("deactivating GUI for %1").arg(d->m_activePart->name()) << endl; + kdDebug(1000) << TQString("deactivating GUI for %1").arg(d->m_activePart->name()) << endl; GUIActivateEvent ev( false ); - QApplication::sendEvent( d->m_activePart, &ev ); + TQApplication::sendEvent( d->m_activePart, &ev ); factory->removeClient( d->m_activePart ); - disconnect( d->m_activePart, SIGNAL( setWindowCaption( const QString & ) ), - this, SLOT( setCaption( const QString & ) ) ); - disconnect( d->m_activePart, SIGNAL( setStatusBarText( const QString & ) ), - this, SLOT( slotSetStatusBarText( const QString & ) ) ); + disconnect( d->m_activePart, TQT_SIGNAL( setWindowCaption( const TQString & ) ), + this, TQT_SLOT( setCaption( const TQString & ) ) ); + disconnect( d->m_activePart, TQT_SIGNAL( setStatusBarText( const TQString & ) ), + this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) ); } if( !d->m_bShellGUIActivated ) @@ -187,15 +187,15 @@ void PMDockMainWindow::createGUI( Part * part ) if ( part ) { // do this before sending the activate event - connect( part, SIGNAL( setWindowCaption( const QString & ) ), - this, SLOT( setCaption( const QString & ) ) ); - connect( part, SIGNAL( setStatusBarText( const QString & ) ), - this, SLOT( slotSetStatusBarText( const QString & ) ) ); + connect( part, TQT_SIGNAL( setWindowCaption( const TQString & ) ), + this, TQT_SLOT( setCaption( const TQString & ) ) ); + connect( part, TQT_SIGNAL( setStatusBarText( const TQString & ) ), + this, TQT_SLOT( slotSetStatusBarText( const TQString & ) ) ); factory->addClient( part ); GUIActivateEvent ev( true ); - QApplication::sendEvent( part, &ev ); + TQApplication::sendEvent( part, &ev ); } @@ -204,7 +204,7 @@ void PMDockMainWindow::createGUI( Part * part ) d->m_activePart = part; } -void PMDockMainWindow::slotSetStatusBarText( const QString & text ) +void PMDockMainWindow::slotSetStatusBarText( const TQString & text ) { statusBar()->message( text ); } @@ -220,18 +220,18 @@ void PMDockMainWindow::createShellGUI( bool create ) if ( isHelpMenuEnabled() && !d->m_helpMenu ) d->m_helpMenu = new KHelpMenu( this, instance()->aboutData(), true, actionCollection() ); - QString f = xmlFile(); + TQString f = xmlFile(); setXMLFile( locate( "config", "ui/ui_standards.rc", instance() ) ); if ( !f.isEmpty() ) setXMLFile( f, true ); else { - QString auto_file( instance()->instanceName() + "ui.rc" ); + TQString auto_file( instance()->instanceName() + "ui.rc" ); setXMLFile( auto_file, true ); } GUIActivateEvent ev( true ); - QApplication::sendEvent( this, &ev ); + TQApplication::sendEvent( this, &ev ); guiFactory()->addClient( this ); @@ -239,7 +239,7 @@ void PMDockMainWindow::createShellGUI( bool create ) else { GUIActivateEvent ev( false ); - QApplication::sendEvent( this, &ev ); + TQApplication::sendEvent( this, &ev ); guiFactory()->removeClient( this ); } @@ -253,7 +253,7 @@ void PMDockMainWindow::setMainDockWidget( PMDockWidget* mdw ) mainDockWidget = mdw; } -void PMDockMainWindow::setView( QWidget *view ) +void PMDockMainWindow::setView( TQWidget *view ) { if ( view->isA("PMDockWidget") ){ if ( view->parent() != this ) ((PMDockWidget*)view)->applyToWidget( this ); @@ -262,11 +262,11 @@ void PMDockMainWindow::setView( QWidget *view ) #ifndef NO_KDE2 KMainWindow::setCentralWidget(view); #else - QMainWindow::setCentralWidget(view); + TQMainWindow::setCentralWidget(view); #endif } -PMDockWidget* PMDockMainWindow::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel) +PMDockWidget* PMDockMainWindow::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel) { return new PMDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel ); } @@ -283,28 +283,28 @@ void PMDockMainWindow::makeDockInvisible( PMDockWidget* dock ) dock->undock(); } -void PMDockMainWindow::makeWidgetDockVisible( QWidget* widget ) +void PMDockMainWindow::makeWidgetDockVisible( TQWidget* widget ) { makeDockVisible( dockManager->findWidgetParentDock(widget) ); } -void PMDockMainWindow::writeDockConfig(QDomElement &base) +void PMDockMainWindow::writeDockConfig(TQDomElement &base) { dockManager->writeConfig(base); } -void PMDockMainWindow::readDockConfig(QDomElement &base) +void PMDockMainWindow::readDockConfig(TQDomElement &base) { dockManager->readConfig(base); } #ifndef NO_KDE2 -void PMDockMainWindow::writeDockConfig( KConfig* c, QString group ) +void PMDockMainWindow::writeDockConfig( KConfig* c, TQString group ) { dockManager->writeConfig( c, group ); } -void PMDockMainWindow::readDockConfig( KConfig* c, QString group ) +void PMDockMainWindow::readDockConfig( KConfig* c, TQString group ) { dockManager->readConfig( c, group ); } @@ -312,7 +312,7 @@ void PMDockMainWindow::readDockConfig( KConfig* c, QString group ) void PMDockMainWindow::slotDockWidgetUndocked() { - QObject* pSender = (QObject*) sender(); + TQObject* pSender = (TQObject*) sender(); if (!pSender->inherits("PMDockWidget")) return; PMDockWidget* pDW = (PMDockWidget*) pSender; emit dockWidgetHasUndocked( pDW); @@ -320,7 +320,7 @@ void PMDockMainWindow::slotDockWidgetUndocked() /*************************************************************************/ PMDockWidgetAbstractHeaderDrag::PMDockWidgetAbstractHeaderDrag( PMDockWidgetAbstractHeader* parent, PMDockWidget* dock, const char* name ) -:QFrame( parent, name ) +:TQFrame( parent, name ) { dw = dock; installEventFilter( dock->dockManager() ); @@ -331,27 +331,27 @@ PMDockWidgetHeaderDrag::PMDockWidgetHeaderDrag( PMDockWidgetAbstractHeader* pare { } -void PMDockWidgetHeaderDrag::paintEvent( QPaintEvent* ) +void PMDockWidgetHeaderDrag::paintEvent( TQPaintEvent* ) { - QPainter paint; + TQPainter paint; paint.begin( this ); - style().drawPrimitive (QStyle::PE_DockWindowHandle, &paint, QRect(0,0,width(), height()), colorGroup()); + style().drawPrimitive (TQStyle::PE_DockWindowHandle, &paint, TQRect(0,0,width(), height()), colorGroup()); paint.end(); } /*************************************************************************/ PMDockWidgetAbstractHeader::PMDockWidgetAbstractHeader( PMDockWidget* parent, const char* name ) -:QFrame( parent, name ) +:TQFrame( parent, name ) { } /*************************************************************************/ PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* parent, const char* name ) :PMDockWidgetAbstractHeader( parent, name ) { - layout = new QHBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + layout = new TQHBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); drag = new PMDockWidgetHeaderDrag( this, parent ); @@ -359,24 +359,24 @@ PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* parent, const char* name ) closeButton->setPixmap( const_cast< const char** >(close_xpm) ); int buttonWidth = 9, buttonHeight = 9; closeButton->setFixedSize(buttonWidth,buttonHeight); - connect( closeButton, SIGNAL(clicked()), parent, SIGNAL(headerCloseButtonClicked())); + connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerCloseButtonClicked())); // MODIFICATION (zehender) // The shell will delete the widget // undock is unnecessary - // connect( closeButton, SIGNAL(clicked()), parent, SLOT(undock())); + // connect( closeButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(undock())); stayButton = new PMDockButton_Private( this, "DockStayButton" ); stayButton->setToggleButton( true ); stayButton->setPixmap( const_cast< const char** >(not_close_xpm) ); stayButton->setFixedSize(buttonWidth,buttonHeight); - connect( stayButton, SIGNAL(clicked()), this, SLOT(slotStayClicked())); + connect( stayButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotStayClicked())); stayButton->hide( ); dockbackButton = new PMDockButton_Private( this, "DockbackButton" ); dockbackButton->setPixmap( const_cast< const char** >(dockback_xpm)); dockbackButton->setFixedSize(buttonWidth,buttonHeight); - connect( dockbackButton, SIGNAL(clicked()), parent, SIGNAL(headerDockbackButtonClicked())); - connect( dockbackButton, SIGNAL(clicked()), parent, SLOT(dockBack())); + connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SIGNAL(headerDockbackButtonClicked())); + connect( dockbackButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(dockBack())); // MODIFICATION (zehender) // Add a button to undock the widget and dock it as top level @@ -384,7 +384,7 @@ PMDockWidgetHeader::PMDockWidgetHeader( PMDockWidget* parent, const char* name ) toDesktopButton = new PMDockButton_Private( this, "ToDesktopButton" ); toDesktopButton->setPixmap( const_cast< const char** >(todesktop_xpm)); toDesktopButton->setFixedSize(buttonWidth,buttonHeight); - connect( toDesktopButton, SIGNAL(clicked()), parent, SLOT(toDesktop())); + connect( toDesktopButton, TQT_SIGNAL(clicked()), parent, TQT_SLOT(toDesktop())); layout->addWidget( drag ); layout->addWidget( dockbackButton ); @@ -424,8 +424,8 @@ void PMDockWidgetHeader::setDragPanel( PMDockWidgetHeaderDrag* nd ) if ( !nd ) return; delete layout; - layout = new QHBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + layout = new TQHBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); delete drag; drag = nd; @@ -459,30 +459,30 @@ void PMDockWidgetHeader::setDragEnabled(bool b) #ifndef NO_KDE2 void PMDockWidgetHeader::saveConfig( KConfig* c ) { - c->writeEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() ); + c->writeEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), stayButton->isOn() ); } void PMDockWidgetHeader::loadConfig( KConfig* c ) { - setDragEnabled( !c->readBoolEntry( QString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) ); + setDragEnabled( !c->readBoolEntry( TQString("%1%2").arg(parent()->name()).arg(":stayButton"), false ) ); } #endif /*************************************************************************/ -PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel, WFlags f) -: QWidget( parent, name, f ) +PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel, WFlags f) +: TQWidget( parent, name, f ) ,formerBrotherDockWidget(0L) ,currentDockPos(DockNone) ,formerDockPos(DockNone) - ,pix(new QPixmap(pixmap)) + ,pix(new TQPixmap(pixmap)) ,prevSideDockPosBeforeDrag(DockNone) { d = new PMDockWidgetPrivate(); // create private data d->_parent = parent; - layout = new QVBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + layout = new TQVBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); manager = dockManager; manager->childDock->append( this ); @@ -509,11 +509,11 @@ PMDockWidget::PMDockWidget( PMDockManager* dockManager, const char* name, const setIcon( pixmap); widget = 0L; - QObject::connect(this, SIGNAL(hasUndocked()), manager->main, SLOT(slotDockWidgetUndocked()) ); - applyToWidget( parent, QPoint(0,0) ); + TQObject::connect(this, TQT_SIGNAL(hasUndocked()), manager->main, TQT_SLOT(slotDockWidgetUndocked()) ); + applyToWidget( parent, TQPoint(0,0) ); } -void PMDockWidget::slotSetCaption( const QString& str ) +void PMDockWidget::slotSetCaption( const TQString& str ) { setTabPageLabel( str ); setCaption( str ); @@ -540,8 +540,8 @@ void PMDockWidget::setHeader( PMDockWidgetAbstractHeader* h ) delete header; delete layout; header = h; - layout = new QVBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + layout = new TQVBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); layout->addWidget( header ); setWidget( widget ); } else { @@ -571,12 +571,12 @@ void PMDockWidget::updateHeader() } } -void PMDockWidget::applyToWidget( QWidget* s, const QPoint& p ) +void PMDockWidget::applyToWidget( TQWidget* s, const TQPoint& p ) { if ( parent() != s ) { hide(); - reparent(s, 0, QPoint(0,0), false); + reparent(s, 0, TQPoint(0,0), false); } if ( s && s->inherits("PMDockMainWindow") ){ @@ -584,7 +584,7 @@ void PMDockWidget::applyToWidget( QWidget* s, const QPoint& p ) } if ( s == manager->main ){ - setGeometry( QRect(QPoint(0,0), manager->main->geometry().size()) ); + setGeometry( TQRect(TQPoint(0,0), manager->main->geometry().size()) ); } if ( !s ) @@ -615,10 +615,10 @@ void PMDockWidget::show() if ( parent() ){ makeDockVisible(); } else { - QWidget::show(); + TQWidget::show(); } } else { - QWidget::show(); + TQWidget::show(); } } @@ -627,42 +627,42 @@ void PMDockWidget::show() void PMDockWidget::setDockWindowType (NET::WindowType windowType) { d->windowType = windowType; - applyToWidget( parentWidget(), QPoint(0,0) ); + applyToWidget( parentWidget(), TQPoint(0,0) ); } #endif -void PMDockWidget::setDockWindowTransient (QWidget *parent, bool transientEnabled) +void PMDockWidget::setDockWindowTransient (TQWidget *parent, bool transientEnabled) { d->_parent = parent; d->transient = transientEnabled; - applyToWidget( parentWidget(), QPoint(0,0) ); + applyToWidget( parentWidget(), TQPoint(0,0) ); } -bool PMDockWidget::event( QEvent* pevent ) +bool PMDockWidget::event( TQEvent* pevent ) { switch ( pevent->type() ) { #undef FocusIn - case QEvent::FocusIn: + case TQEvent::FocusIn: if (widget && !d->pendingFocusInEvent) { d->pendingFocusInEvent = true; widget->setFocus(); } d->pendingFocusInEvent = false; break; - case QEvent::ChildRemoved: - if ( widget == ((QChildEvent*)pevent)->child() ) widget = 0L; + case TQEvent::ChildRemoved: + if ( widget == ((TQChildEvent*)pevent)->child() ) widget = 0L; break; - case QEvent::Show: + case TQEvent::Show: if ( widget ) widget->show(); emit manager->change(); break; - case QEvent::Hide: + case TQEvent::Hide: if ( widget ) widget->hide(); emit manager->change(); break; - case QEvent::CaptionChange: + case TQEvent::CaptionChange: if ( parentWidget() ){ if ( parent()->inherits("PMDockSplitter") ){ ((PMDockSplitter*)(parent()))->updateName(); @@ -673,7 +673,7 @@ bool PMDockWidget::event( QEvent* pevent ) } } break; - case QEvent::Close: + case TQEvent::Close: // MODIFICATION (zehender) // Top level widget is closed // emit same signal as if the widget is docked and closed with @@ -685,8 +685,8 @@ bool PMDockWidget::event( QEvent* pevent ) break; } #undef KeyPress - bool processed = QWidget::event( pevent ); - if( pevent->type( ) == QEvent::AccelOverride && !processed && !parent( ) ){ + bool processed = TQWidget::event( pevent ); + if( pevent->type( ) == TQEvent::AccelOverride && !processed && !parent( ) ){ // MODIFICATION (zehender) // floating widget, post event to main window processed = qApp->sendEvent( manager->dockMainWidget( ), pevent ); @@ -694,7 +694,7 @@ bool PMDockWidget::event( QEvent* pevent ) return processed; } -PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockPos, int spliPos, QPoint pos, bool check, int tabIndex ) +PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockPos, int spliPos, TQPoint pos, bool check, int tabIndex ) { if (this == target) return 0L; // docking to itself not possible @@ -724,7 +724,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP if( target && ( dockPos != PMDockWidget::DockCenter ) && ( dockPos != PMDockWidget::DockNone ) ) { - QWidget* pdt = target->parentDockTabGroup( ); + TQWidget* pdt = target->parentDockTabGroup( ); if( pdt ) return manualDock( ( PMDockWidget* ) ( pdt->parent( ) ), dockPos, spliPos, pos, check, tabIndex ); @@ -763,7 +763,7 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP if ( parentTab ){ // add to existing TabGroup applyToWidget( parentTab ); - parentTab->insertTab( this, icon() ? *icon() : QPixmap(), + parentTab->insertTab( this, icon() ? *icon() : TQPixmap(), tabPageLabel(), tabIndex ); setDockTabName( parentTab ); if( !toolTipStr.isEmpty()) @@ -785,14 +785,14 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP { PMDockWidget* newTarget = target; bool found = false; - QWidget* wtarget = target; + TQWidget* wtarget = target; while( wtarget && !found ) { if( wtarget->inherits( "PMDockWidget" ) ) { PMDockWidget* dw = ( PMDockWidget* ) wtarget; newTarget = dw; - QWidget* pw = wtarget->parentWidget( ); + TQWidget* pw = wtarget->parentWidget( ); if( pw ) { if( pw->inherits( "PMDockSplitter" ) ) @@ -813,8 +813,8 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP // END MODIFICATION // create a new dockwidget that will contain the target and this - QWidget* parentDock = target->parentWidget(); - PMDockWidget* newDock = new PMDockWidget( manager, "tempName", QPixmap(""), parentDock ); + TQWidget* parentDock = target->parentWidget(); + PMDockWidget* newDock = new PMDockWidget( manager, "tempName", TQPixmap(""), parentDock ); newDock->currentDockPos = target->currentDockPos; if ( dockPos == PMDockWidget::DockCenter ){ @@ -837,8 +837,8 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP if( target->formerBrotherDockWidget != 0L) { newDock->formerBrotherDockWidget = target->formerBrotherDockWidget; if( formerBrotherDockWidget != 0L) - QObject::connect( newDock->formerBrotherDockWidget, SIGNAL(iMBeingClosed()), - newDock, SLOT(loseFormerBrotherDockWidget()) ); + TQObject::connect( newDock->formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), + newDock, TQT_SLOT(loseFormerBrotherDockWidget()) ); target->loseFormerBrotherDockWidget(); } newDock->formerDockPos = target->formerDockPos; @@ -846,19 +846,19 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP if ( dockPos == PMDockWidget::DockCenter ) { PMDockTabGroup* tab = new PMDockTabGroup( newDock, "_dock_tab"); - QObject::connect(tab, SIGNAL(currentChanged(QWidget*)), d, SLOT(slotFocusEmbeddedWidget(QWidget*))); + TQObject::connect(tab, TQT_SIGNAL(currentChanged(TQWidget*)), d, TQT_SLOT(slotFocusEmbeddedWidget(TQWidget*))); newDock->setWidget( tab ); target->applyToWidget( tab ); applyToWidget( tab ); - tab->insertTab( target, target->icon() ? *(target->icon()) : QPixmap(), + tab->insertTab( target, target->icon() ? *(target->icon()) : TQPixmap(), target->tabPageLabel() ); if( !target->toolTipString().isEmpty()) tab->setTabToolTip( target, target->toolTipString()); - tab->insertTab( this, icon() ? *icon() : QPixmap(), + tab->insertTab( this, icon() ? *icon() : TQPixmap(), tabPageLabel(), tabIndex ); if( !toolTipString().isEmpty()) tab->setTabToolTip( this, toolTipString()); @@ -931,14 +931,14 @@ PMDockWidget* PMDockWidget::manualDock( PMDockWidget* target, DockPosition dockP PMDockTabGroup* PMDockWidget::parentDockTabGroup() const { if ( !parent() ) return 0L; - QWidget* candidate = parentWidget()->parentWidget(); + TQWidget* candidate = parentWidget()->parentWidget(); if ( candidate && candidate->inherits("PMDockTabGroup") ) return (PMDockTabGroup*)candidate; return 0L; } void PMDockWidget::toDesktop() { - QPoint p = mapToGlobal( QPoint( -30, -30 ) ); + TQPoint p = mapToGlobal( TQPoint( -30, -30 ) ); if( p.x( ) < 0 ) p.setX( 0 ); if( p.y( ) < 0 ) @@ -948,7 +948,7 @@ void PMDockWidget::toDesktop() void PMDockWidget::undock() { - QWidget* parentW = parentWidget(); + TQWidget* parentW = parentWidget(); if ( !parentW ){ hide(); if (!d->blockHasUndockedSignal) @@ -969,8 +969,8 @@ void PMDockWidget::undock() d->index = parentTab->indexOf( this); // memorize the page position in the tab widget parentTab->removePage( this ); formerBrotherDockWidget = (PMDockWidget*)parentTab->page(0); - QObject::connect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()), - this, SLOT(loseFormerBrotherDockWidget()) ); + TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), + this, TQT_SLOT(loseFormerBrotherDockWidget()) ); applyToWidget( 0L ); if ( parentTab->count() == 1 ){ @@ -984,7 +984,7 @@ void PMDockWidget::undock() PMDockWidget* parentOfTab = (PMDockWidget*)parentTab->parent(); delete parentTab; // PMDockTabGroup - QWidget* parentOfDockWidget = parentOfTab->parentWidget(); + TQWidget* parentOfDockWidget = parentOfTab->parentWidget(); if ( parentOfDockWidget == 0L ){ if ( isV ) lastTab->show(); } else { @@ -1034,14 +1034,14 @@ void PMDockWidget::undock() group->hide(); if( formerBrotherDockWidget != 0L) - QObject::connect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()), - this, SLOT(loseFormerBrotherDockWidget()) ); + TQObject::connect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), + this, TQT_SLOT(loseFormerBrotherDockWidget()) ); if ( !group->parentWidget() ){ secondWidget->applyToWidget( 0L, group->frameGeometry().topLeft() ); secondWidget->resize( group->width(), group->height() ); } else { - QWidget* obj = group->parentWidget(); + TQWidget* obj = group->parentWidget(); secondWidget->applyToWidget( obj ); if ( obj->inherits("PMDockSplitter") ){ PMDockSplitter* parentOfGroup = (PMDockSplitter*)obj; @@ -1077,19 +1077,19 @@ void PMDockWidget::undock() emit hasUndocked(); } -void PMDockWidget::setWidget( QWidget* mw ) +void PMDockWidget::setWidget( TQWidget* mw ) { if ( !mw ) return; if ( mw->parent() != this ){ - mw->reparent(this, 0, QPoint(0,0), false); + mw->reparent(this, 0, TQPoint(0,0), false); } widget = mw; delete layout; - layout = new QVBoxLayout( this ); - layout->setResizeMode( QLayout::Minimum ); + layout = new TQVBoxLayout( this ); + layout->setResizeMode( TQLayout::Minimum ); layout->addWidget( header ); layout->addWidget( widget,1 ); @@ -1097,10 +1097,10 @@ void PMDockWidget::setWidget( QWidget* mw ) void PMDockWidget::setDockTabName( PMDockTabGroup* tab ) { - QString listOfName; - QString listOfCaption; + TQString listOfName; + TQString listOfCaption; for ( int i = 0; i < tab->count(); ++i ) { - QWidget *w = tab->page( i ); + TQWidget *w = tab->page( i ); listOfCaption.append( w->caption() ).append(","); listOfName.append( w->name() ).append(","); } @@ -1151,7 +1151,7 @@ void PMDockWidget::makeDockVisible() } if ( isVisible() ) return; - QWidget* p = parentWidget(); + TQWidget* p = parentWidget(); while ( p ){ if ( !p->isVisible() ) p->show(); @@ -1165,8 +1165,8 @@ void PMDockWidget::makeDockVisible() void PMDockWidget::loseFormerBrotherDockWidget() { if( formerBrotherDockWidget != 0L) - QObject::disconnect( formerBrotherDockWidget, SIGNAL(iMBeingClosed()), - this, SLOT(loseFormerBrotherDockWidget()) ); + TQObject::disconnect( formerBrotherDockWidget, TQT_SIGNAL(iMBeingClosed()), + this, TQT_SLOT(loseFormerBrotherDockWidget()) ); formerBrotherDockWidget = 0L; repaint(); } @@ -1176,12 +1176,12 @@ void PMDockWidget::dockBack() if( formerBrotherDockWidget) { // search all children if it tries to dock back to a child bool found = false; - QObjectList* cl = queryList("PMDockWidget"); - QObjectListIt it( *cl ); - QObject * obj; + TQObjectList* cl = queryList("PMDockWidget"); + TQObjectListIt it( *cl ); + TQObject * obj; while ( !found && (obj=it.current()) != 0 ) { ++it; - QWidget* widg = (QWidget*)obj; + TQWidget* widg = (TQWidget*)obj; if( widg == formerBrotherDockWidget) found = true; } @@ -1189,7 +1189,7 @@ void PMDockWidget::dockBack() if( !found) { // can dock back to the former brother dockwidget - manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index); + manualDock( formerBrotherDockWidget, formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index); formerBrotherDockWidget = 0L; makeDockVisible(); return; @@ -1197,7 +1197,7 @@ void PMDockWidget::dockBack() } // else dockback to the dockmainwindow (default behaviour) - manualDock( ((PMDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, QPoint(0,0), false, d->index); + manualDock( ((PMDockMainWindow*)manager->main)->getMainDockWidget(), formerDockPos, d->splitPosInPercent, TQPoint(0,0), false, d->index); formerBrotherDockWidget = 0L; if (parent()) makeDockVisible(); @@ -1219,12 +1219,12 @@ public: /** * This rectangle is used to highlight the current dockposition. It stores global screen coordinates. */ - QRect dragRect; + TQRect dragRect; /** * This rectangle is used to erase the previously highlighted dockposition. It stores global screen coordinates. */ - QRect oldDragRect; + TQRect oldDragRect; /** * This flag stores the information if dragging is ready to start. Used between mousePress and mouseMove event. @@ -1234,7 +1234,7 @@ public: /** * This variable stores the offset of the mouse cursor to the upper left edge of the current drag widget. */ - QPoint dragOffset; + TQPoint dragOffset; /** * These flags store information about the splitter behaviour @@ -1244,8 +1244,8 @@ public: bool splitterHighResolution; }; -PMDockManager::PMDockManager( QWidget* mainWindow , const char* name ) -:QObject( mainWindow, name ) +PMDockManager::PMDockManager( TQWidget* mainWindow , const char* name ) +:TQObject( mainWindow, name ) ,main(mainWindow) ,currentDragWidget(0L) ,currentMoveWidget(0L) @@ -1266,20 +1266,20 @@ PMDockManager::PMDockManager( QWidget* mainWindow , const char* name ) undockProcess = false; - menuData = new QPtrList<MenuDockData>; + menuData = new TQPtrList<MenuDockData>; menuData->setAutoDelete( true ); menuData->setAutoDelete( true ); #ifndef NO_KDE2 menu = new KPopupMenu(); #else - menu = new QPopupMenu(); + menu = new TQPopupMenu(); #endif - connect( menu, SIGNAL(aboutToShow()), SLOT(slotMenuPopup()) ); - connect( menu, SIGNAL(activated(int)), SLOT(slotMenuActivated(int)) ); + connect( menu, TQT_SIGNAL(aboutToShow()), TQT_SLOT(slotMenuPopup()) ); + connect( menu, TQT_SIGNAL(activated(int)), TQT_SLOT(slotMenuActivated(int)) ); - childDock = new QObjectList(); + childDock = new TQObjectList(); childDock->setAutoDelete( false ); } @@ -1288,7 +1288,7 @@ PMDockManager::~PMDockManager() delete menuData; delete menu; - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); PMDockWidget * obj; while ( (obj=(PMDockWidget*)it.current()) ) { @@ -1300,7 +1300,7 @@ PMDockManager::~PMDockManager() void PMDockManager::activate() { - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); PMDockWidget * obj; while ( (obj=(PMDockWidget*)it.current()) ) { @@ -1310,27 +1310,27 @@ void PMDockManager::activate() obj->show(); } } - if ( !main->inherits("QDialog") ) main->show(); + if ( !main->inherits("TQDialog") ) main->show(); } -bool PMDockManager::eventFilter( QObject *obj, QEvent *event ) +bool PMDockManager::eventFilter( TQObject *obj, TQEvent *event ) { /* This doesn't seem to fullfill any sense, other than breaking QMainWindow's layout all over the place The first child of the mainwindow is not necessarily a meaningful - content widget but in Qt3's QMainWindow it can easily be a QToolBar. - In short: QMainWindow knows how to layout its children, no need to + content widget but in Qt3's TQMainWindow it can easily be a TQToolBar. + In short: TQMainWindow knows how to layout its children, no need to mess that up. >>>>>I need this in the PMDockArea at the moment (JoWenn) - if ( obj == main && event->type() == QEvent::Resize && dynamic_cast<PMDockArea*>(main) && main->children() ){ + if ( obj == main && event->type() == TQEvent::Resize && dynamic_cast<PMDockArea*>(main) && main->children() ){ #ifndef NO_KDE2 kdDebug()<<"PMDockManager::eventFilter(): main is a PMDockArea and there are children"<<endl; #endif - QWidget* fc = (QWidget*)main->children()->getFirst(); + TQWidget* fc = (TQWidget*)main->children()->getFirst(); if ( fc ) - fc->setGeometry( QRect(QPoint(0,0), main->geometry().size()) ); + fc->setGeometry( TQRect(TQPoint(0,0), main->geometry().size()) ); } */ @@ -1338,12 +1338,12 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event ) PMDockWidget* pDockWdgAtCursor = 0L; PMDockWidget* curdw = ((PMDockWidgetAbstractHeaderDrag*)obj)->dockWidget(); switch ( event->type() ){ - case QEvent::MouseButtonDblClick: + case TQEvent::MouseButtonDblClick: if (curdw->currentDockPos == PMDockWidget::DockDesktop) curdw->dockBack(); else curdw->toDesktop( ); break; - case QEvent::MouseButtonPress: - if ( ((QMouseEvent*)event)->button() == LeftButton ){ + case TQEvent::MouseButtonPress: + if ( ((TQMouseEvent*)event)->button() == LeftButton ){ if ( curdw->eDocking != (int)PMDockWidget::DockNone ){ dropCancel = true; curdw->setFocus(); @@ -1351,23 +1351,23 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event ) currentDragWidget = curdw; currentMoveWidget = 0L; - childDockWidgetList = new QWidgetList(); + childDockWidgetList = new TQWidgetList(); childDockWidgetList->append( curdw ); findChildDockWidget( curdw, *childDockWidgetList ); - d->oldDragRect = QRect(); - d->dragRect = QRect(curdw->geometry()); - QPoint p = curdw->mapToGlobal(QPoint(0,0)); + d->oldDragRect = TQRect(); + d->dragRect = TQRect(curdw->geometry()); + TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); drawDragRectangle(); d->readyToDrag = true; - d->dragOffset = QCursor::pos()-currentDragWidget->mapToGlobal(QPoint(0,0)); + d->dragOffset = TQCursor::pos()-currentDragWidget->mapToGlobal(TQPoint(0,0)); } } break; - case QEvent::MouseButtonRelease: - if ( ((QMouseEvent*)event)->button() == LeftButton ){ + case TQEvent::MouseButtonRelease: + if ( ((TQMouseEvent*)event)->button() == LeftButton ){ if ( draging ){ if ( !dropCancel ) drop(); @@ -1376,9 +1376,9 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event ) } if (d->readyToDrag) { d->readyToDrag = false; - d->oldDragRect = QRect(); - d->dragRect = QRect(curdw->geometry()); - QPoint p = curdw->mapToGlobal(QPoint(0,0)); + d->oldDragRect = TQRect(); + d->dragRect = TQRect(curdw->geometry()); + TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); drawDragRectangle(); currentDragWidget = 0L; @@ -1389,20 +1389,20 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event ) dropCancel = true; } break; - case QEvent::MouseMove: + case TQEvent::MouseMove: if ( draging ) { - pDockWdgAtCursor = findDockWidgetAt( QCursor::pos() ); + pDockWdgAtCursor = findDockWidgetAt( TQCursor::pos() ); PMDockWidget* oldMoveWidget = currentMoveWidget; if ( currentMoveWidget && pDockWdgAtCursor == currentMoveWidget ) { //move - dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( QCursor::pos() ) ); + dragMove( currentMoveWidget, currentMoveWidget->mapFromGlobal( TQCursor::pos() ) ); break; } else { if (dropCancel && curdw) { - d->dragRect = QRect(curdw->geometry()); - QPoint p = curdw->mapToGlobal(QPoint(0,0)); + d->dragRect = TQRect(curdw->geometry()); + TQPoint p = curdw->mapToGlobal(TQPoint(0,0)); d->dragRect.moveTopLeft(p); }else - d->dragRect = QRect(); + d->dragRect = TQRect(); drawDragRectangle(); } @@ -1426,7 +1426,7 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event ) if (d->readyToDrag) { d->readyToDrag = false; } - if ( (((QMouseEvent*)event)->state() == LeftButton) && + if ( (((TQMouseEvent*)event)->state() == LeftButton) && (curdw->eDocking != (int)PMDockWidget::DockNone) ) { startDrag( curdw); } @@ -1436,10 +1436,10 @@ bool PMDockManager::eventFilter( QObject *obj, QEvent *event ) break; } } - return QObject::eventFilter( obj, event ); + return TQObject::eventFilter( obj, event ); } -PMDockWidget* PMDockManager::findDockWidgetAt( const QPoint& pos ) +PMDockWidget* PMDockManager::findDockWidgetAt( const TQPoint& pos ) { dropCancel = true; @@ -1448,7 +1448,7 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const QPoint& pos ) if (currentDragWidget->eDocking == (int)PMDockWidget::DockNone ) return 0L; - QWidget* p = QApplication::widgetAt( pos ); + TQWidget* p = TQApplication::widgetAt( pos ); if ( !p ) { dropCancel = false; return 0L; @@ -1456,7 +1456,7 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const QPoint& pos ) #if defined(_OS_WIN32_) || defined(Q_OS_WIN32) p = p->topLevelWidget(); #endif - QWidget* w = 0L; + TQWidget* w = 0L; findChildDockWidget( w, p, p->mapFromGlobal(pos) ); if ( !w ){ if ( !p->inherits("PMDockWidget") ) { @@ -1474,7 +1474,7 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const QPoint& pos ) if ( www->dockSite( ) == (int)PMDockWidget::DockNone ) return 0L; PMDockWidget::DockPosition curPos = PMDockWidget::DockDesktop; - QPoint cpos = www->mapFromGlobal( pos ); + TQPoint cpos = www->mapFromGlobal( pos ); int ww = www->widget->width() / 3; int hh = www->widget->height() / 3; @@ -1501,15 +1501,15 @@ PMDockWidget* PMDockManager::findDockWidgetAt( const QPoint& pos ) return www; } -void PMDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const QPoint& pos ) +void PMDockManager::findChildDockWidget( TQWidget*& ww, const TQWidget* p, const TQPoint& pos ) { if ( p->children() ) { - QWidget *w; - QObjectListIt it( *p->children() ); + TQWidget *w; + TQObjectListIt it( *p->children() ); it.toLast(); while ( it.current() ) { if ( it.current()->isWidgetType() ) { - w = (QWidget*)it.current(); + w = (TQWidget*)it.current(); if ( w->isVisible() && w->geometry().contains(pos) ) { if ( w->inherits("PMDockWidget") ) ww = w; findChildDockWidget( ww, w, w->mapFromParent(pos) ); @@ -1522,15 +1522,15 @@ void PMDockManager::findChildDockWidget( QWidget*& ww, const QWidget* p, const Q return; } -void PMDockManager::findChildDockWidget( const QWidget* p, QWidgetList& list ) +void PMDockManager::findChildDockWidget( const TQWidget* p, TQWidgetList& list ) { if ( p->children() ) { - QWidget *w; - QObjectListIt it( *p->children() ); + TQWidget *w; + TQObjectListIt it( *p->children() ); it.toLast(); while ( it.current() ) { if ( it.current()->isWidgetType() ) { - w = (QWidget*)it.current(); + w = (TQWidget*)it.current(); if ( w->isVisible() ) { if ( w->inherits("PMDockWidget") ) list.append( w ); findChildDockWidget( w, list ); @@ -1542,9 +1542,9 @@ void PMDockManager::findChildDockWidget( const QWidget* p, QWidgetList& list ) return; } -void PMDockManager::findFloatingWidgets( QPtrList<PMDockWidget>& l ) +void PMDockManager::findFloatingWidgets( TQPtrList<PMDockWidget>& l ) { - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); for( ; it.current( ); ++it ) if( it.current( )->inherits( "PMDockWidget" ) && !it.current( )->parent( ) ) @@ -1566,15 +1566,15 @@ void PMDockManager::startDrag( PMDockWidget* w ) curPos = PMDockWidget::DockDesktop; draging = true; - QApplication::setOverrideCursor(QCursor(sizeAllCursor)); + TQApplication::setOverrideCursor(TQCursor(sizeAllCursor)); } -void PMDockManager::dragMove( PMDockWidget* dw, QPoint pos ) +void PMDockManager::dragMove( PMDockWidget* dw, TQPoint pos ) { - QPoint p = dw->mapToGlobal( dw->widget->pos() ); + TQPoint p = dw->mapToGlobal( dw->widget->pos() ); PMDockWidget::DockPosition oldPos = curPos; - QSize r = dw->widget->size(); + TQSize r = dw->widget->size(); if ( dw->parentDockTabGroup() ){ curPos = PMDockWidget::DockCenter; if ( oldPos != curPos ) { @@ -1587,8 +1587,8 @@ void PMDockManager::dragMove( PMDockWidget* dw, QPoint pos ) int h = r.height() / 3; PMDockMainWindow* mw = ( PMDockMainWindow* ) parent( ); - QWidget* cw = mw->centralWidget( ); - QPoint cwp = cw->mapToGlobal( QPoint( 0, 0 ) ); + TQWidget* cw = mw->centralWidget( ); + TQPoint cwp = cw->mapToGlobal( TQPoint( 0, 0 ) ); int cwh = cw->height( ); if ( pos.y() <= h ) @@ -1632,34 +1632,34 @@ void PMDockManager::dragMove( PMDockWidget* dw, QPoint pos ) void PMDockManager::cancelDrop() { - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete childDockWidgetList; childDockWidgetList = 0L; - d->dragRect = QRect(); // cancel drawing + d->dragRect = TQRect(); // cancel drawing drawDragRectangle(); // only the old rect will be deleted } void PMDockManager::drop() { - d->dragRect = QRect(); // cancel drawing + d->dragRect = TQRect(); // cancel drawing drawDragRectangle(); // only the old rect will be deleted - QApplication::restoreOverrideCursor(); + TQApplication::restoreOverrideCursor(); delete childDockWidgetList; childDockWidgetList = 0L; if ( dropCancel ) return; if ( !currentMoveWidget && ((currentDragWidget->eDocking & (int)PMDockWidget::DockDesktop) == 0) ) { - d->dragRect = QRect(); // cancel drawing + d->dragRect = TQRect(); // cancel drawing drawDragRectangle(); // only the old rect will be deleted return; } if ( !currentMoveWidget && !currentDragWidget->parent() ) { - currentDragWidget->move( QCursor::pos() - d->dragOffset ); + currentDragWidget->move( TQCursor::pos() - d->dragOffset ); } else { int splitPos = currentDragWidget->d->splitPosInPercent; @@ -1673,63 +1673,63 @@ void PMDockManager::drop() default: break; } } - currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, QCursor::pos() - d->dragOffset ); + currentDragWidget->manualDock( currentMoveWidget, curPos , splitPos, TQCursor::pos() - d->dragOffset ); currentDragWidget->makeDockVisible(); } } -static QDomElement createStringEntry(QDomDocument &doc, const QString &tagName, const QString &str) +static TQDomElement createStringEntry(TQDomDocument &doc, const TQString &tagName, const TQString &str) { - QDomElement el = doc.createElement(tagName); + TQDomElement el = doc.createElement(tagName); el.appendChild(doc.createTextNode(str)); return el; } -static QDomElement createBoolEntry(QDomDocument &doc, const QString &tagName, bool b) +static TQDomElement createBoolEntry(TQDomDocument &doc, const TQString &tagName, bool b) { - return createStringEntry(doc, tagName, QString::fromLatin1(b? "true" : "false")); + return createStringEntry(doc, tagName, TQString::fromLatin1(b? "true" : "false")); } -static QDomElement createNumberEntry(QDomDocument &doc, const QString &tagName, int n) +static TQDomElement createNumberEntry(TQDomDocument &doc, const TQString &tagName, int n) { - return createStringEntry(doc, tagName, QString::number(n)); + return createStringEntry(doc, tagName, TQString::number(n)); } -static QDomElement createRectEntry(QDomDocument &doc, const QString &tagName, const QRect &rect) +static TQDomElement createRectEntry(TQDomDocument &doc, const TQString &tagName, const TQRect &rect) { - QDomElement el = doc.createElement(tagName); + TQDomElement el = doc.createElement(tagName); - QDomElement xel = doc.createElement("x"); - xel.appendChild(doc.createTextNode(QString::number(rect.x()))); + TQDomElement xel = doc.createElement("x"); + xel.appendChild(doc.createTextNode(TQString::number(rect.x()))); el.appendChild(xel); - QDomElement yel = doc.createElement("y"); - yel.appendChild(doc.createTextNode(QString::number(rect.y()))); + TQDomElement yel = doc.createElement("y"); + yel.appendChild(doc.createTextNode(TQString::number(rect.y()))); el.appendChild(yel); - QDomElement wel = doc.createElement("width"); - wel.appendChild(doc.createTextNode(QString::number(rect.width()))); + TQDomElement wel = doc.createElement("width"); + wel.appendChild(doc.createTextNode(TQString::number(rect.width()))); el.appendChild(wel); - QDomElement hel = doc.createElement("height"); - hel.appendChild(doc.createTextNode(QString::number(rect.height()))); + TQDomElement hel = doc.createElement("height"); + hel.appendChild(doc.createTextNode(TQString::number(rect.height()))); el.appendChild(hel); return el; } -static QDomElement createListEntry(QDomDocument &doc, const QString &tagName, - const QString &subTagName, const QStrList &list) +static TQDomElement createListEntry(TQDomDocument &doc, const TQString &tagName, + const TQString &subTagName, const TQStrList &list) { - QDomElement el = doc.createElement(tagName); + TQDomElement el = doc.createElement(tagName); - QStrListIterator it(list); + TQStrListIterator it(list); for (; it.current(); ++it) { - QDomElement subel = doc.createElement(subTagName); - subel.appendChild(doc.createTextNode(QString::fromLatin1(it.current()))); + TQDomElement subel = doc.createElement(subTagName); + subel.appendChild(doc.createTextNode(TQString::fromLatin1(it.current()))); el.appendChild(subel); } @@ -1737,42 +1737,42 @@ static QDomElement createListEntry(QDomDocument &doc, const QString &tagName, } -static QString stringEntry(QDomElement &base, const QString &tagName) +static TQString stringEntry(TQDomElement &base, const TQString &tagName) { return base.namedItem(tagName).firstChild().toText().data(); } -static bool boolEntry(QDomElement &base, const QString &tagName) +static bool boolEntry(TQDomElement &base, const TQString &tagName) { return base.namedItem(tagName).firstChild().toText().data() == "true"; } -static int numberEntry(QDomElement &base, const QString &tagName) +static int numberEntry(TQDomElement &base, const TQString &tagName) { return stringEntry(base, tagName).toInt(); } -static QRect rectEntry(QDomElement &base, const QString &tagName) +static TQRect rectEntry(TQDomElement &base, const TQString &tagName) { - QDomElement el = base.namedItem(tagName).toElement(); + TQDomElement el = base.namedItem(tagName).toElement(); int x = numberEntry(el, "x"); int y = numberEntry(el, "y"); int width = numberEntry(el, "width"); int height = numberEntry(el, "height"); - return QRect(x, y, width, height); + return TQRect(x, y, width, height); } -static QStrList listEntry(QDomElement &base, const QString &tagName, const QString &subTagName) +static TQStrList listEntry(TQDomElement &base, const TQString &tagName, const TQString &subTagName) { - QStrList list; + TQStrList list; - QDomElement subel = base.namedItem(tagName).firstChild().toElement(); + TQDomElement subel = base.namedItem(tagName).firstChild().toElement(); while (!subel.isNull()) { if (subel.tagName() == subTagName) list.append(subel.firstChild().toText().data().latin1()); @@ -1783,23 +1783,23 @@ static QStrList listEntry(QDomElement &base, const QString &tagName, const QStri } -void PMDockManager::writeConfig(QDomElement &base) +void PMDockManager::writeConfig(TQDomElement &base) { // First of all, clear the tree under base while (!base.firstChild().isNull()) base.removeChild(base.firstChild()); - QDomDocument doc = base.ownerDocument(); + TQDomDocument doc = base.ownerDocument(); - QStrList nameList; - QString mainWidgetStr; + TQStrList nameList; + TQString mainWidgetStr; // collect widget names - QStrList nList; - QObjectListIt it(*childDock); + TQStrList nList; + TQObjectListIt it(*childDock); PMDockWidget *obj1; while ( (obj1=(PMDockWidget*)it.current()) ) { if ( obj1->parent() == main ) - mainWidgetStr = QString::fromLatin1(obj1->name()); + mainWidgetStr = TQString::fromLatin1(obj1->name()); nList.append(obj1->name()); ++it; } @@ -1815,7 +1815,7 @@ void PMDockManager::writeConfig(QDomElement &base) continue; } - QDomElement groupEl; + TQDomElement groupEl; if (obj->isGroup) { //// Save a group @@ -1829,7 +1829,7 @@ void PMDockManager::writeConfig(QDomElement &base) //// Save a tab group groupEl = doc.createElement("tabGroup"); - QStrList list; + TQStrList list; for ( int i = 0; i < ((PMDockTabGroup*)obj->widget)->count(); ++i ) list.append( ((PMDockTabGroup*)obj->widget)->page( i )->name() ); groupEl.appendChild(createListEntry(doc, "tabs", "tab", list)); @@ -1839,10 +1839,10 @@ void PMDockManager::writeConfig(QDomElement &base) groupEl = doc.createElement("dock"); } - groupEl.appendChild(createStringEntry(doc, "name", QString::fromLatin1(obj->name()))); + groupEl.appendChild(createStringEntry(doc, "name", TQString::fromLatin1(obj->name()))); groupEl.appendChild(createBoolEntry(doc, "hasParent", obj->parent())); if ( !obj->parent() ) { - groupEl.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size()))); + groupEl.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size()))); groupEl.appendChild(createBoolEntry(doc, "visible", obj->isVisible())); } if (obj->header && obj->header->inherits("PMDockWidgetHeader")) { @@ -1858,19 +1858,19 @@ void PMDockManager::writeConfig(QDomElement &base) if (main->inherits("PMDockMainWindow")) { PMDockMainWindow *dmain = (PMDockMainWindow*)main; - QString centralWidgetStr = QString(dmain->centralWidget()? dmain->centralWidget()->name() : ""); + TQString centralWidgetStr = TQString(dmain->centralWidget()? dmain->centralWidget()->name() : ""); base.appendChild(createStringEntry(doc, "centralWidget", centralWidgetStr)); - QString mainDockWidgetStr = QString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : ""); + TQString mainDockWidgetStr = TQString(dmain->getMainDockWidget()? dmain->getMainDockWidget()->name() : ""); base.appendChild(createStringEntry(doc, "mainDockWidget", mainDockWidgetStr)); } else { base.appendChild(createStringEntry(doc, "mainWidget", mainWidgetStr)); } - base.appendChild(createRectEntry(doc, "geometry", QRect(main->frameGeometry().topLeft(), main->size()))); + base.appendChild(createRectEntry(doc, "geometry", TQRect(main->frameGeometry().topLeft(), main->size()))); } -void PMDockManager::readConfig(QDomElement &base) +void PMDockManager::readConfig(TQDomElement &base) { if (base.namedItem("group").isNull() && base.namedItem("tabgroup").isNull() @@ -1879,13 +1879,13 @@ void PMDockManager::readConfig(QDomElement &base) return; } - autoCreateDock = new QObjectList(); + autoCreateDock = new TQObjectList(); autoCreateDock->setAutoDelete( true ); bool isMainVisible = main->isVisible(); main->hide(); - QObjectListIt it(*childDock); + TQObjectListIt it(*childDock); PMDockWidget *obj1; while ( (obj1=(PMDockWidget*)it.current()) ) { if ( !obj1->isGroup && !obj1->isTabGroup ) { @@ -1897,15 +1897,15 @@ void PMDockManager::readConfig(QDomElement &base) ++it; } - QDomElement childEl = base.firstChild().toElement(); + TQDomElement childEl = base.firstChild().toElement(); while (!childEl.isNull() ) { PMDockWidget *obj = 0; if (childEl.tagName() == "splitGroup") { // Read a group - QString name = stringEntry(childEl, "name"); - QString firstName = stringEntry(childEl, "firstName"); - QString secondName = stringEntry(childEl, "secondName"); + TQString name = stringEntry(childEl, "name"); + TQString firstName = stringEntry(childEl, "firstName"); + TQString secondName = stringEntry(childEl, "secondName"); int orientation = numberEntry(childEl, "orientation"); int separatorPos = numberEntry(childEl, "separatorPos"); @@ -1920,8 +1920,8 @@ void PMDockManager::readConfig(QDomElement &base) } } else if (childEl.tagName() == "tabGroup") { // Read a tab group - QString name = stringEntry(childEl, "name"); - QStrList list = listEntry(childEl, "tabs", "tab"); + TQString name = stringEntry(childEl, "name"); + TQStrList list = listEntry(childEl, "tabs", "tab"); PMDockWidget *d1 = getDockWidgetFromName( list.first() ); list.next(); @@ -1947,12 +1947,12 @@ void PMDockManager::readConfig(QDomElement &base) } if (!boolEntry(childEl, "hasParent")) { - QRect r = rectEntry(childEl, "geometry"); + TQRect r = rectEntry(childEl, "geometry"); obj = getDockWidgetFromName(stringEntry(childEl, "name")); obj->applyToWidget(0); obj->setGeometry(r); if (boolEntry(childEl, "visible")) - obj->QWidget::show(); + obj->TQWidget::show(); } if (obj && obj->header && obj->header->inherits("PMDockWidgetHeader")) { @@ -1966,20 +1966,20 @@ void PMDockManager::readConfig(QDomElement &base) if (main->inherits("PMDockMainWindow")) { PMDockMainWindow *dmain = (PMDockMainWindow*)main; - QString mv = stringEntry(base, "centralWidget"); + TQString mv = stringEntry(base, "centralWidget"); if (!mv.isEmpty() && getDockWidgetFromName(mv) ) { PMDockWidget *mvd = getDockWidgetFromName(mv); mvd->applyToWidget(dmain); mvd->show(); dmain->setCentralWidget(mvd); } - QString md = stringEntry(base, "mainDockWidget"); + TQString md = stringEntry(base, "mainDockWidget"); if (!md.isEmpty() && getDockWidgetFromName(md)) { PMDockWidget *mvd = getDockWidgetFromName(md); dmain->setMainDockWidget(mvd); } } else { - QString mv = stringEntry(base, "mainWidget"); + TQString mv = stringEntry(base, "mainWidget"); if (!mv.isEmpty() && getDockWidgetFromName(mv)) { PMDockWidget *mvd = getDockWidgetFromName(mv); mvd->applyToWidget(main); @@ -1987,7 +1987,7 @@ void PMDockManager::readConfig(QDomElement &base) } } - QRect mr = rectEntry(base, "geometry"); + TQRect mr = rectEntry(base, "geometry"); main->setGeometry(mr); if (isMainVisible) main->show(); @@ -1998,7 +1998,7 @@ void PMDockManager::readConfig(QDomElement &base) #ifndef NO_KDE2 -void PMDockManager::writeConfig( KConfig* c, QString group ) +void PMDockManager::writeConfig( KConfig* c, TQString group ) { //debug("BEGIN Write Config"); if ( !c ) c = KGlobal::config(); @@ -2007,13 +2007,13 @@ void PMDockManager::writeConfig( KConfig* c, QString group ) c->setGroup( group ); c->writeEntry( "Version", DOCK_CONFIG_VERSION ); - QStrList nameList; - QStrList findList; - QObjectListIt it( *childDock ); + TQStrList nameList; + TQStrList findList; + TQObjectListIt it( *childDock ); PMDockWidget * obj; // collect PMDockWidget's name - QStrList nList; + TQStrList nList; while ( (obj=(PMDockWidget*)it.current()) ) { ++it; //debug(" +Add subdock %s", obj->name()); @@ -2026,7 +2026,7 @@ void PMDockManager::writeConfig( KConfig* c, QString group ) while ( nList.current() ){ //debug(" -Try to save %s", nList.current()); obj = getDockWidgetFromName( nList.current() ); - QString cname = obj->name(); + TQString cname = obj->name(); if ( obj->header ){ obj->header->saveConfig( c ); } @@ -2037,7 +2037,7 @@ void PMDockManager::writeConfig( KConfig* c, QString group ) c->writeEntry( cname+":type", "GROUP"); if ( !obj->parent() ){ c->writeEntry( cname+":parent", "___null___"); - c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) ); + c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":visible", obj->isVisible()); } else { c->writeEntry( cname+":parent", "yes"); @@ -2068,12 +2068,12 @@ void PMDockManager::writeConfig( KConfig* c, QString group ) c->writeEntry( cname+":type", "TAB_GROUP"); if ( !obj->parent() ){ c->writeEntry( cname+":parent", "___null___"); - c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) ); + c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":visible", obj->isVisible()); } else { c->writeEntry( cname+":parent", "yes"); } - QStrList list; + TQStrList list; for ( int i = 0; i < ((PMDockTabGroup*)obj->widget)->count(); ++i ) list.append( ((PMDockTabGroup*)obj->widget)->page( i )->name() ); c->writeEntry( cname+":tabNames", list ); @@ -2088,7 +2088,7 @@ void PMDockManager::writeConfig( KConfig* c, QString group ) /*************************************************************************************************/ if ( !obj->parent() ){ c->writeEntry( cname+":type", "NULL_DOCK"); - c->writeEntry( cname+":geometry", QRect(obj->frameGeometry().topLeft(), obj->size()) ); + c->writeEntry( cname+":geometry", TQRect(obj->frameGeometry().topLeft(), obj->size()) ); c->writeEntry( cname+":visible", obj->isVisible()); } else { c->writeEntry( cname+":type", "DOCK"); @@ -2103,7 +2103,7 @@ void PMDockManager::writeConfig( KConfig* c, QString group ) } c->writeEntry( "NameList", nameList ); - c->writeEntry( "Main:Geometry", QRect(main->frameGeometry().topLeft(), main->size()) ); + c->writeEntry( "Main:Geometry", TQRect(main->frameGeometry().topLeft(), main->size()) ); c->writeEntry( "Main:visible", main->isVisible()); // curently nou use if ( main->inherits("PMDockMainWindow") ){ @@ -2116,31 +2116,31 @@ void PMDockManager::writeConfig( KConfig* c, QString group ) c->sync(); //debug("END Write Config"); } -#include <qmessagebox.h> -void PMDockManager::readConfig( KConfig* c, QString group ) +#include <tqmessagebox.h> +void PMDockManager::readConfig( KConfig* c, TQString group ) { if ( !c ) c = KGlobal::config(); if ( group.isEmpty() ) group = "dock_setting_default"; c->setGroup( group ); - QStrList nameList; + TQStrList nameList; c->readListEntry( "NameList", nameList ); - QString ver = c->readEntry( "Version", "0.0.1" ); + TQString ver = c->readEntry( "Version", "0.0.1" ); nameList.first(); if ( !nameList.current() || ver != DOCK_CONFIG_VERSION ){ activate(); return; } - autoCreateDock = new QObjectList(); + autoCreateDock = new TQObjectList(); autoCreateDock->setAutoDelete( true ); bool isMainVisible = main->isVisible(); // if (isMainVisible) // CCC - //QMessageBox::information(0,"","hallo"); + //TQMessageBox::information(0,"","hallo"); //COMMENTED4TESTING main->hide(); - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); PMDockWidget * obj; while ( (obj=(PMDockWidget*)it.current()) ){ @@ -2153,9 +2153,9 @@ void PMDockManager::readConfig( KConfig* c, QString group ) nameList.first(); while ( nameList.current() ){ - QString oname = nameList.current(); + TQString oname = nameList.current(); c->setGroup( group ); - QString type = c->readEntry( oname + ":type" ); + TQString type = c->readEntry( oname + ":type" ); obj = 0L; if ( type == "GROUP" ){ @@ -2173,7 +2173,7 @@ void PMDockManager::readConfig( KConfig* c, QString group ) } if ( type == "TAB_GROUP" ){ - QStrList list; + TQStrList list; PMDockWidget* tabDockGroup = 0L; c->readListEntry( oname+":tabNames", list ); PMDockWidget* d1 = getDockWidgetFromName( list.first() ); @@ -2198,14 +2198,14 @@ void PMDockManager::readConfig( KConfig* c, QString group ) } if ( type == "NULL_DOCK" || c->readEntry( oname + ":parent") == "___null___" ){ - QRect r = c->readRectEntry( oname + ":geometry" ); + TQRect r = c->readRectEntry( oname + ":geometry" ); obj = getDockWidgetFromName( oname ); obj->applyToWidget( 0L ); obj->setGeometry(r); c->setGroup( group ); if ( c->readBoolEntry( oname + ":visible" ) ){ - obj->QWidget::show(); + obj->TQWidget::show(); } } @@ -2223,7 +2223,7 @@ void PMDockManager::readConfig( KConfig* c, QString group ) PMDockMainWindow* dmain = (PMDockMainWindow*)main; c->setGroup( group ); - QString mv = c->readEntry( "Main:view" ); + TQString mv = c->readEntry( "Main:view" ); if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){ PMDockWidget* mvd = getDockWidgetFromName( mv ); mvd->applyToWidget( dmain ); @@ -2231,14 +2231,14 @@ void PMDockManager::readConfig( KConfig* c, QString group ) dmain->setView( mvd ); } c->setGroup( group ); - QString md = c->readEntry( "Main:dock" ); + TQString md = c->readEntry( "Main:dock" ); if ( !md.isEmpty() && getDockWidgetFromName( md ) ){ PMDockWidget* mvd = getDockWidgetFromName( md ); dmain->setMainDockWidget( mvd ); } } else { c->setGroup( group ); - QString mv = c->readEntry( "Main:view" ); + TQString mv = c->readEntry( "Main:view" ); if ( !mv.isEmpty() && getDockWidgetFromName( mv ) ){ PMDockWidget* mvd = getDockWidgetFromName( mv ); mvd->applyToWidget( main ); @@ -2251,24 +2251,24 @@ void PMDockManager::readConfig( KConfig* c, QString group ) autoCreateDock = 0L; c->setGroup( group ); - QRect mr = c->readRectEntry("Main:Geometry"); + TQRect mr = c->readRectEntry("Main:Geometry"); main->setGeometry(mr); if ( isMainVisible ) main->show(); } #endif -PMDockWidget* PMDockManager::getDockWidgetFromName( const QString& dockName ) +PMDockWidget* PMDockManager::getDockWidgetFromName( const TQString& dockName ) { - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); PMDockWidget * obj; while ( (obj=(PMDockWidget*)it.current()) ) { ++it; - if ( QString(obj->name()) == dockName ) return obj; + if ( TQString(obj->name()) == dockName ) return obj; } PMDockWidget* autoCreate = 0L; if ( autoCreateDock ){ - autoCreate = new PMDockWidget( this, dockName.latin1(), QPixmap("") ); + autoCreate = new PMDockWidget( this, dockName.latin1(), TQPixmap("") ); autoCreateDock->append( autoCreate ); } return autoCreate; @@ -2308,20 +2308,20 @@ void PMDockManager::slotMenuPopup() menu->clear(); menuData->clear(); - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); PMDockWidget * obj; int numerator = 0; while ( (obj=(PMDockWidget*)it.current()) ) { ++it; if ( obj->mayBeHide() ) { - menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), QString("Hide ") + obj->caption(), numerator++ ); + menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), TQString("Hide ") + obj->caption(), numerator++ ); menuData->append( new MenuDockData( obj, true ) ); } if ( obj->mayBeShow() ) { - menu->insertItem( obj->icon() ? *(obj->icon()) : QPixmap(), QString("Show ") + obj->caption(), numerator++ ); + menu->insertItem( obj->icon() ? *(obj->icon()) : TQPixmap(), TQString("Show ") + obj->caption(), numerator++ ); menuData->append( new MenuDockData( obj, false ) ); } } @@ -2333,9 +2333,9 @@ void PMDockManager::slotMenuActivated( int id ) data->dock->changeHideShowState(); } -PMDockWidget* PMDockManager::findWidgetParentDock( QWidget* w ) const +PMDockWidget* PMDockManager::findWidgetParentDock( TQWidget* w ) const { - QObjectListIt it( *childDock ); + TQObjectListIt it( *childDock ); PMDockWidget * dock; PMDockWidget * found = 0L; @@ -2352,7 +2352,7 @@ void PMDockManager::drawDragRectangle() return; int i; - QRect oldAndNewDragRect[2]; + TQRect oldAndNewDragRect[2]; oldAndNewDragRect[0] = d->oldDragRect; oldAndNewDragRect[1] = d->dragRect; @@ -2361,7 +2361,7 @@ void PMDockManager::drawDragRectangle() if (oldAndNewDragRect[i].isEmpty()) continue; - PMDockWidget* pDockWdgAtRect = (PMDockWidget*) QApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true ); + PMDockWidget* pDockWdgAtRect = (PMDockWidget*) TQApplication::widgetAt( oldAndNewDragRect[i].topLeft(), true ); if (!pDockWdgAtRect) continue; @@ -2369,7 +2369,7 @@ void PMDockManager::drawDragRectangle() bool unclipped; PMDockMainWindow* pMain = 0L; PMDockWidget* pTLDockWdg = 0L; - QWidget* topWdg; + TQWidget* topWdg; if (pDockWdgAtRect->topLevelWidget() == main) { isOverMainWdg = true; topWdg = pMain = (PMDockMainWindow*) main; @@ -2383,7 +2383,7 @@ void PMDockManager::drawDragRectangle() } // draw the rectangle unclipped over the main dock window - QPainter p; + TQPainter p; p.begin( topWdg ); if ( !unclipped ) { if (isOverMainWdg) @@ -2393,8 +2393,8 @@ void PMDockManager::drawDragRectangle() } // draw the rectangle p.setRasterOp(Qt::NotXorROP); - QRect r = oldAndNewDragRect[i]; - r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(QPoint(0,0)) ); + TQRect r = oldAndNewDragRect[i]; + r.moveTopLeft( r.topLeft() - topWdg->mapToGlobal(TQPoint(0,0)) ); p.drawRect(r.x(), r.y(), r.width(), r.height()); p.end(); } @@ -2406,10 +2406,10 @@ void PMDockManager::drawDragRectangle() #ifdef _JOWENN_EXPERIMENTAL_ -PMDockArea::PMDockArea( QWidget* parent, const char *name) -:QWidget( parent, name) +PMDockArea::PMDockArea( TQWidget* parent, const char *name) +:TQWidget( parent, name) { - QString new_name = QString(name) + QString("_DockManager"); + TQString new_name = TQString(name) + TQString("_DockManager"); dockManager = new PMDockManager( this, new_name.latin1() ); mainDockWidget = 0L; } @@ -2419,7 +2419,7 @@ PMDockArea::~PMDockArea() delete dockManager; } -PMDockWidget* PMDockArea::createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent, const QString& strCaption, const QString& strTabPageLabel) +PMDockWidget* PMDockArea::createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent, const TQString& strCaption, const TQString& strTabPageLabel) { return new PMDockWidget( dockManager, name.latin1(), pixmap, parent, strCaption, strTabPageLabel ); } @@ -2436,44 +2436,44 @@ void PMDockArea::makeDockInvisible( PMDockWidget* dock ) dock->undock(); } -void PMDockArea::makeWidgetDockVisible( QWidget* widget ) +void PMDockArea::makeWidgetDockVisible( TQWidget* widget ) { makeDockVisible( dockManager->findWidgetParentDock(widget) ); } -void PMDockArea::writeDockConfig(QDomElement &base) +void PMDockArea::writeDockConfig(TQDomElement &base) { dockManager->writeConfig(base); } -void PMDockArea::readDockConfig(QDomElement &base) +void PMDockArea::readDockConfig(TQDomElement &base) { dockManager->readConfig(base); } void PMDockArea::slotDockWidgetUndocked() { - QObject* pSender = (QObject*) sender(); + TQObject* pSender = (TQObject*) sender(); if (!pSender->inherits("PMDockWidget")) return; PMDockWidget* pDW = (PMDockWidget*) pSender; emit dockWidgetHasUndocked( pDW); } -void PMDockArea::resizeEvent(QResizeEvent *rsize) +void PMDockArea::resizeEvent(TQResizeEvent *rsize) { - QWidget::resizeEvent(rsize); + TQWidget::resizeEvent(rsize); if (children()){ #ifndef NO_KDE2 kdDebug()<<"PMDockArea::resize"<<endl; #endif - QObjectList *list=queryList("QWidget",0,false); + TQObjectList *list=queryList("TQWidget",0,false); - QObjectListIt it( *list ); // iterate over the buttons - QObject *obj; + TQObjectListIt it( *list ); // iterate over the buttons + TQObject *obj; while ( (obj = it.current()) != 0 ) { // for each found object... - ((QWidget*)obj)->setGeometry(QRect(QPoint(0,0),size())); + ((TQWidget*)obj)->setGeometry(TQRect(TQPoint(0,0),size())); break; } delete list; @@ -2481,12 +2481,12 @@ void PMDockArea::resizeEvent(QResizeEvent *rsize) PMDockSplitter *split; // for (unsigned int i=0;i<children()->count();i++) { -// QPtrList<QObject> list(children()); -// QObject *obj=((QPtrList<QObject*>)children())->at(i); - QObject *obj=children()->getFirst(); +// TQPtrList<TQObject> list(children()); +// TQObject *obj=((TQPtrList<TQObject*>)children())->at(i); + TQObject *obj=children()->getFirst(); if (split=dynamic_cast<PMDockSplitter*>(obj)) { - split->setGeometry( QRect(QPoint(0,0), size() )); + split->setGeometry( TQRect(TQPoint(0,0), size() )); // break; } } @@ -2495,12 +2495,12 @@ void PMDockArea::resizeEvent(QResizeEvent *rsize) } #ifndef NO_KDE2 -void PMDockArea::writeDockConfig( KConfig* c, QString group ) +void PMDockArea::writeDockConfig( KConfig* c, TQString group ) { dockManager->writeConfig( c, group ); } -void PMDockArea::readDockConfig( KConfig* c, QString group ) +void PMDockArea::readDockConfig( KConfig* c, TQString group ) { dockManager->readConfig( c, group ); } diff --git a/kpovmodeler/pmdockwidget.h b/kpovmodeler/pmdockwidget.h index 29f6c34f..d6c083f2 100644 --- a/kpovmodeler/pmdockwidget.h +++ b/kpovmodeler/pmdockwidget.h @@ -57,11 +57,11 @@ #define _KDOCKWIDGET_2_2_ -#include <qpoint.h> -#include <qptrlist.h> -#include <qframe.h> -#include <qdom.h> -#include <qtabwidget.h> +#include <tqpoint.h> +#include <tqptrlist.h> +#include <tqframe.h> +#include <tqdom.h> +#include <tqtabwidget.h> #ifndef NO_KDE2 #include <kmainwindow.h> @@ -69,7 +69,7 @@ #undef EXPORT_DOCKCLASS #define EXPORT_DOCKCLASS #else -#include <qmainwindow.h> +#include <tqmainwindow.h> #include "exportdockclass.h" #include "dummykmainwindow.h" #endif @@ -86,17 +86,17 @@ class PMDockWidgetPrivate; class PMDockArea; class PMDockMainWindowPrivate; -class QObjectList; -class QPopupMenu; -class QVBoxLayout; -class QHBoxLayout; -class QPixmap; +class TQObjectList; +class TQPopupMenu; +class TQVBoxLayout; +class TQHBoxLayout; +class TQPixmap; #ifndef NO_KDE2 class KToolBar; class KConfig; #else -class QToolBar; +class TQToolBar; #endif /** @@ -225,7 +225,7 @@ protected: /** * Draws the drag panel (a double line) */ - virtual void paintEvent( QPaintEvent* ); + virtual void paintEvent( TQPaintEvent* ); protected: virtual void virtual_hook( int id, void* data ); @@ -303,7 +303,7 @@ protected: /** * A layout manager for placing the embedded buttons (close and stay) */ - QHBoxLayout* layout; + TQHBoxLayout* layout; /** * a little button for closing (undocking and hiding) the dockwidget @@ -341,7 +341,7 @@ private: /** * It just hides the special implementation of a dockwidget tab groups (and is member of the dockwidget class set). * An abstraction what it is currently. - * In general it is like @ref QTabWidget but is more useful for the dockwidget class set. + * In general it is like @ref TQTabWidget but is more useful for the dockwidget class set. * More or less a minor helper class for the dockwidget class set. * * @author Max Judin (documentation: Falk Brettschneider). @@ -353,8 +353,8 @@ public: /** * Constructs this. It just calls the method of the base class. */ - PMDockTabGroup( QWidget *parent = 0, const char *name = 0 ) - :QTabWidget( parent, name ){}; + PMDockTabGroup( TQWidget *parent = 0, const char *name = 0 ) + :TQTabWidget( parent, name ){}; /** * Destructs a PMDockTabGroup. @@ -393,7 +393,7 @@ private: * ... * PMDockWidget* dock = 0L; * dock = mainWidget->createDockWidget( "Any window caption", nicePixmap, 0L, i18n("window caption")); // 0L==no parent - * QWidget* actualWidget = new QWidget( dock); + * TQWidget* actualWidget = new TQWidget( dock); * dock->setWidget( actualWidget); // embed it * dock->setToolTipString(i18n("That's me")); // available when appearing as tab page * ... @@ -428,8 +428,8 @@ public: * @param strTabPageLabel The title of the tab page (shown when in tab page mode), if it is "", only the icon will be shown, if it is 0L, the label is set to strCaption */ PMDockWidget( PMDockManager* dockManager, const char* name, - const QPixmap &pixmap, QWidget* parent = 0L, const QString& strCaption = 0L, - const QString& strTabPageLabel = " ", WFlags f = 0); + const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L, + const TQString& strTabPageLabel = " ", WFlags f = 0); /** * Destructs a dockwidget. @@ -473,7 +473,7 @@ public: * @param tabIndex The position index of the tab widget (when in tab page mode), -1 (default) means append * @return result The group dockwidget that replaces the target dockwidget and will be grandparent of target and @p this. */ - PMDockWidget* manualDock( PMDockWidget* target, DockPosition dockPos, int spliPos = 50, QPoint pos = QPoint(0,0), bool check = false, int tabIndex = -1); + PMDockWidget* manualDock( PMDockWidget* target, DockPosition dockPos, int spliPos = 50, TQPoint pos = TQPoint(0,0), bool check = false, int tabIndex = -1); /** * Specify where it is either possible or impossible for this to dock to another dockwidget. @@ -508,23 +508,23 @@ public: /** * Sets the embedded widget. * - * A QLayout takes care about proper resizing, automatically. + * A TQLayout takes care about proper resizing, automatically. * * @param w The pointer to the dockwidget's child widget. */ - void setWidget( QWidget* w); + void setWidget( TQWidget* w); /** * Get the embedded widget. * * @return The pointer to the dockwidget's child widget, 0L if there's no such child. */ - QWidget* getWidget() const { return widget; }; + TQWidget* getWidget() const { return widget; }; /** * Sets the header of this dockwidget. * - * A @ref QLayout takes care about proper resizing, automatically. + * A @ref TQLayout takes care about proper resizing, automatically. * The header contains the drag panel, the close button and the stay button. * * @param ah A base class pointer to the dockwidget header @@ -573,12 +573,12 @@ public: * * @param ttStr A string for the tooltip on the tab. */ - void setToolTipString(const QString& ttStr) { toolTipStr = ttStr; }; + void setToolTipString(const TQString& ttStr) { toolTipStr = ttStr; }; /** * @return The tooltip string being shown on the appropriate tab page header when in dock-centered mode. */ - const QString& toolTipString() const { return toolTipStr; }; + const TQString& toolTipString() const { return toolTipStr; }; /** * @return result @p true, if a dockback is possible, otherwise @p false. @@ -589,20 +589,20 @@ public: * Sets a string that is used for the label of the tab page when in tab page mode * @param label The new tab page label. */ - void setTabPageLabel( const QString& label) { tabPageTitle = label; }; + void setTabPageLabel( const TQString& label) { tabPageTitle = label; }; /** * @return A string that is used for the label of the tab page when in tab page mode. */ - const QString& tabPageLabel() const { return tabPageTitle; }; + const TQString& tabPageLabel() const { return tabPageTitle; }; /** - * Catches and processes some @ref QWidget events that are interesting for dockwidgets. + * Catches and processes some @ref TQWidget events that are interesting for dockwidgets. */ - virtual bool event( QEvent * ); + virtual bool event( TQEvent * ); /** - * Add dockwidget management actions to @ref QWidget::show. + * Add dockwidget management actions to @ref TQWidget::show. */ virtual void show(); /** @@ -626,7 +626,7 @@ public: * * @param windowType is type of dock window */ - void setDockWindowTransient (QWidget *parent, bool transientEnabled); + void setDockWindowTransient (TQWidget *parent, bool transientEnabled); // MODIFICATION (lpassos) /** @@ -662,7 +662,7 @@ public slots: /** * Sets the caption and tab label */ - void slotSetCaption( const QString& ); + void slotSetCaption( const TQString& ); protected: @@ -733,11 +733,11 @@ protected: /** * a string used as tooltip for the tab page header when in dock-centered mode. */ - QString toolTipStr; + TQString toolTipStr; /** * a string used as title of the tab page when in tab page mode */ - QString tabPageTitle; + TQString tabPageTitle; private: /** @@ -754,7 +754,7 @@ private: * @param s the target widget to reparent to * @param p the point to move to (if it doesn't reparent) */ - void applyToWidget( QWidget* s, const QPoint& p = QPoint(0,0) ); + void applyToWidget( TQWidget* s, const TQPoint& p = TQPoint(0,0) ); /** * A base class pointer to the header of this dockwidget @@ -764,12 +764,12 @@ private: /** * the embedded widget */ - QWidget* widget; + TQWidget* widget; /** * the layout manager that takes care about proper resizing and moving the embedded widget and the header */ - QVBoxLayout* layout; + TQVBoxLayout* layout; /** * the responsible dockmanager @@ -779,7 +779,7 @@ private: /** * an icon for the tab widget header */ - QPixmap* pix; + TQPixmap* pix; /** * Information about the ability for docking to another dockwidget. @@ -797,8 +797,8 @@ private: PMDockWidget::DockPosition prevSideDockPosBeforeDrag; // GROUP data - QString firstName; - QString lastName; + TQString firstName; + TQString lastName; Orientation splitterOrientation; bool isGroup; bool isTabGroup; @@ -838,7 +838,7 @@ public: * @param mainWindow the main window controlled by this * @param name the internal QOject name */ - PMDockManager( QWidget* mainWindow, const char* name = 0L ); + PMDockManager( TQWidget* mainWindow, const char* name = 0L ); /** * Destructs a dockmanager. @@ -855,14 +855,14 @@ public: * @param c the KDE configuration saver * @param group the name of the section in KConfig */ - void writeConfig( KConfig* c = 0L, QString group = QString::null ); + void writeConfig( KConfig* c = 0L, TQString group = TQString::null ); /** * Like writeConfig but reads the whole stuff in. * * In order to restore a window configuration * from a config file, it looks up widgets by name - * (QObject::name) in the childDock variable of + * (TQObject::name) in the childDock variable of * PMDockManager. This list in turn contains all * PMDockWidgets (according to the PMDockWidget constructor). * So in principle, in order to restore a window layout, @@ -873,17 +873,17 @@ public: * @param c the KDE configuration saver * @param group the name of the section in KConfig */ - void readConfig ( KConfig* c = 0L, QString group = QString::null ); + void readConfig ( KConfig* c = 0L, TQString group = TQString::null ); #endif /** * Saves the current dock window layout into a DOM tree below the given element. */ - void writeConfig(QDomElement &base); + void writeConfig(TQDomElement &base); /** * Reads the current dock window layout from a DOM tree below the given element. */ - void readConfig(QDomElement &base); + void readConfig(TQDomElement &base); /** * Shows all encapsulated widgets of all controlled dockwidgets and shows all dockwidgets which are @@ -899,7 +899,7 @@ public: * @param _ the event * @return the return value of the method call of the base class method */ - virtual bool eventFilter( QObject *, QEvent * ); + virtual bool eventFilter( TQObject *, TQEvent * ); /** * This method finds out what a widgets' dockwidget is. That means the dockmanager has a look at all @@ -908,25 +908,25 @@ public: * @param w any widget that is supposed to be encapsulated by one of the controlled dockwidgets * @return the dockwidget that encapsulates that widget, otherwise 0 */ - PMDockWidget* findWidgetParentDock( QWidget* w) const; + PMDockWidget* findWidgetParentDock( TQWidget* w) const; /** * Works like makeDockVisible() but can be called for widgets that covered by a dockwidget. * * @param w the widget that is encapsulated by a dockwidget that turns to visible. */ - void makeWidgetDockVisible( QWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); } + void makeWidgetDockVisible( TQWidget* w ){ findWidgetParentDock(w)->makeDockVisible(); } /** * @return the popupmenu for showing/hiding dockwidgets */ - QPopupMenu* dockHideShowMenu() const { return menu; } + TQPopupMenu* dockHideShowMenu() const { return menu; } /** - * @param dockName an internal QObject name - * @return the dockwidget that has got that internal QObject name + * @param dockName an internal TQObject name + * @return the dockwidget that has got that internal TQObject name */ - PMDockWidget* getDockWidgetFromName( const QString& dockName ); + PMDockWidget* getDockWidgetFromName( const TQString& dockName ); /** * Enables opaque resizing. Opaque resizing is initially turned off. @@ -941,7 +941,7 @@ public: /** * Try to preserve the widget's size. Works like KeepSize resize mode - * of QSplitter. Off by default. + * of TQSplitter. Off by default. * Call this method before you create any dock widgets! */ void setSplitterKeepSize(bool b=true); @@ -967,7 +967,7 @@ public: /** * Returns the main dock widget */ - QWidget* dockMainWidget( ) const { return main; } + TQWidget* dockMainWidget( ) const { return main; } signals: @@ -1030,16 +1030,16 @@ private: * @param pos global (desktop) position of the wanted dockwidget * @return the dockwidget at that position */ - PMDockWidget* findDockWidgetAt( const QPoint& pos ); + PMDockWidget* findDockWidgetAt( const TQPoint& pos ); /** - * Finds the QWidget recursively at the position given as parameter + * Finds the TQWidget recursively at the position given as parameter * - * @param w a variable where the method puts the QWidget at that position (instead of a return value) + * @param w a variable where the method puts the TQWidget at that position (instead of a return value) * @param p the parent widget where the recursive search should start from * @param pos global (desktop) position of the wanted dockwidget */ - void findChildDockWidget( QWidget*& w, const QWidget* p, const QPoint& pos ); + void findChildDockWidget( TQWidget*& w, const TQWidget* p, const TQPoint& pos ); // MODIFICATION (lpassos) // Made findChildDockWidget public public: @@ -1049,11 +1049,11 @@ public: * @param p the parent widget where the recursive search starts from * @param l the widget list that contains the search result after the return of this method */ - void findChildDockWidget( const QWidget* p, QWidgetList& l); + void findChildDockWidget( const TQWidget* p, TQWidgetList& l); /** * Returns all floating dock widgets */ - void findFloatingWidgets( QPtrList<PMDockWidget>& l ); + void findFloatingWidgets( TQPtrList<PMDockWidget>& l ); private: /** @@ -1067,7 +1067,7 @@ private: * @param d the dockwidget which is dragged * @param pos the new position of the dragged dockwidget */ - void dragMove( PMDockWidget* d, QPoint pos ); + void dragMove( PMDockWidget* d, TQPoint pos ); /** * Aborts the drag mode. Restores the cursor and hides the drag indicator. @@ -1085,7 +1085,7 @@ private: /** * Usually the PMDockMainWindow but not necessarily. */ - QWidget* main; + TQWidget* main; /** * The dockwidget that is being dragged at the moment @@ -1100,7 +1100,7 @@ private: /** * It is of interest during the dock process. Then it contains all child dockwidgets. */ - QWidgetList* childDockWidgetList; + TQWidgetList* childDockWidgetList; /** * The dockposition where the dockwidget would be docked to, if we dropped it here. @@ -1111,12 +1111,12 @@ private: * A QList of all objects that are important for docking. * Some serve as group widgets of dockwidgets, others encapsulate normal widgets. */ - QObjectList* childDock; + TQObjectList* childDock; /** * Contains dockwidgets that are created automatically by the dockmanager. For internal use. */ - QObjectList* autoCreateDock; + TQObjectList* autoCreateDock; /** * For storing the width during the dragging of a dockwidget. @@ -1148,12 +1148,12 @@ private: * A popup menu that contains one menuitem for each dockwidget that shows the current visibility state and * to show or hide the appropriate dockwidget. */ - QPopupMenu* menu; + TQPopupMenu* menu; /** * An internal list containing data for the menuitems for the visibility popup menu. */ - QPtrList<MenuDockData> *menuData; + TQPtrList<MenuDockData> *menuData; protected: virtual void virtual_hook( int id, void* data ); @@ -1223,7 +1223,7 @@ public: * * @param name object name */ - PMDockMainWindow( QWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose ); + PMDockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = WType_TopLevel | WDestructiveClose ); /** * Destructs a dockmainwindow. @@ -1256,23 +1256,23 @@ public: * The PMDockMainWindow creates a new dockwidget object here that usually should encapsulate the user's widget. * The new dockwidget is automatically taken under control by the dockmanager of the dockmainwindow. * - * @param name QObject name (default dockwidget caption) + * @param name TQObject name (default dockwidget caption) * @param pixmap window icon (for instance shown when docked as tabwidget entry) * @param parent parent widget for the new dockwidget * @param strCaption window title (shown when toplevel) * @param strTabPageLabel title of the tab page (visible when in tab page mode), if it is "", only the icon will be shown; if it is 0L, the label is set to strCaption * @return a pointer to the new created dockwidget */ - PMDockWidget* createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent = 0L, const QString& strCaption = 0L, const QString& strTabPageLabel = " "); + PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " "); /** * Saves the current dock window layout into a DOM tree below the given element. */ - void writeDockConfig(QDomElement &base); + void writeDockConfig(TQDomElement &base); /** * Reads the current dock window layout from a DOM tree below the given element. */ - void readDockConfig(QDomElement &base); + void readDockConfig(TQDomElement &base); #ifndef NO_KDE2 /** @@ -1281,7 +1281,7 @@ public: * @param c KDE class for saving configurations * @param group name of section to write to */ - void writeDockConfig( KConfig* c = 0L, QString group = QString::null ); + void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); /** * It reads the current dock state from the given section of KConfig. @@ -1289,13 +1289,13 @@ public: * @param c KDE class for saving configurations * @param group name of section to read from */ - void readDockConfig ( KConfig* c = 0L, QString group = QString::null ); + void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); #endif /** * It runs through all dockwidgets which are under control of the dockmanager and calls show() for every * encapsulated widget and show() for the dockwidget itself if it is not in tab mode. - * Additionally, if the main dockwidget is not a QDialog, it will be shown. + * Additionally, if the main dockwidget is not a TQDialog, it will be shown. */ void activateDock(){ dockManager->activate(); } @@ -1305,7 +1305,7 @@ public: * * @return the wanted popup menu */ - QPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); } + TQPopupMenu* dockHideShowMenu() const { return dockManager->dockHideShowMenu(); } /** * This method shows the given dockwidget. @@ -1327,7 +1327,7 @@ public: * This is an overloaded member function, provided for convenience. * It differs from the above function only in what argument(s) it accepts. */ - void makeWidgetDockVisible( QWidget* widget ); + void makeWidgetDockVisible( TQWidget* widget ); /** * This method calls the base class method. @@ -1335,7 +1335,7 @@ public: * * @param _ any widget that should become the main view */ - void setView( QWidget* ); + void setView( TQWidget* ); signals: /** @@ -1379,7 +1379,7 @@ protected slots: * Reimplement if your dock-mainwindow has a complex statusbar * (with several items) */ - virtual void slotSetStatusBarText( const QString & ); + virtual void slotSetStatusBarText( const TQString & ); protected: virtual void createShellGUI( bool create = true ); @@ -1406,7 +1406,7 @@ private: #ifdef _JOWENN_EXPERIMENTAL_ -/* Joseph Wenninger [email protected] Experimental (Just all KMainWindow references changed to QWidget, otherwise nearly exactly the +/* Joseph Wenninger [email protected] Experimental (Just all KMainWindow references changed to TQWidget, otherwise nearly exactly the same as PMDockMainWindow*/ class EXPORT_DOCKCLASS PMDockArea : public QWidget @@ -1418,7 +1418,7 @@ friend class PMDockManager; public: - PMDockArea( QWidget* parent = 0L, const char *name = 0L); + PMDockArea( TQWidget* parent = 0L, const char *name = 0L); virtual ~PMDockArea(); @@ -1428,24 +1428,24 @@ public: void setMainDockWidget( PMDockWidget* ); PMDockWidget* getMainDockWidget(){ return mainDockWidget; } - PMDockWidget* createDockWidget( const QString& name, const QPixmap &pixmap, QWidget* parent = 0L, const QString& strCaption = 0L, const QString& strTabPageLabel = " "); + PMDockWidget* createDockWidget( const TQString& name, const TQPixmap &pixmap, TQWidget* parent = 0L, const TQString& strCaption = 0L, const TQString& strTabPageLabel = " "); - void writeDockConfig(QDomElement &base); - void readDockConfig(QDomElement &base); + void writeDockConfig(TQDomElement &base); + void readDockConfig(TQDomElement &base); #ifndef NO_KDE2 - void writeDockConfig( KConfig* c = 0L, QString group = QString::null ); - void readDockConfig ( KConfig* c = 0L, QString group = QString::null ); + void writeDockConfig( KConfig* c = 0L, TQString group = TQString::null ); + void readDockConfig ( KConfig* c = 0L, TQString group = TQString::null ); #endif void activateDock(){ dockManager->activate(); } - QPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); } + TQPopupMenu* dockHideShowMenu(){ return dockManager->dockHideShowMenu(); } void makeDockVisible( PMDockWidget* dock ); void makeDockInvisible( PMDockWidget* dock ); - void makeWidgetDockVisible( QWidget* widget ); - //void setView( QWidget* ); + void makeWidgetDockVisible( TQWidget* widget ); + //void setView( TQWidget* ); signals: /** @@ -1462,7 +1462,7 @@ protected slots: void slotDockWidgetUndocked(); public: - virtual void resizeEvent(QResizeEvent *); + virtual void resizeEvent(TQResizeEvent *); protected: virtual void virtual_hook( int id, void* data ); diff --git a/kpovmodeler/pmdockwidget_private.cpp b/kpovmodeler/pmdockwidget_private.cpp index cdf21930..7fd72420 100644 --- a/kpovmodeler/pmdockwidget_private.cpp +++ b/kpovmodeler/pmdockwidget_private.cpp @@ -19,11 +19,11 @@ #include "pmdockwidget.h" #include "pmdockwidget_private.h" -#include <qpainter.h> -#include <qcursor.h> +#include <tqpainter.h> +#include <tqcursor.h> -PMDockSplitter::PMDockSplitter(QWidget *parent, const char *name, Orientation orient, int pos, bool highResolution) -: QWidget(parent, name) +PMDockSplitter::PMDockSplitter(TQWidget *parent, const char *name, Orientation orient, int pos, bool highResolution) +: TQWidget(parent, name) { divider = 0L; child0 = 0L; @@ -36,7 +36,7 @@ PMDockSplitter::PMDockSplitter(QWidget *parent, const char *name, Orientation or initialised = false; } -void PMDockSplitter::activate(QWidget *c0, QWidget *c1) +void PMDockSplitter::activate(TQWidget *c0, TQWidget *c1) { if ( c0 ) child0 = c0; if ( c1 ) child1 = c1; @@ -44,15 +44,15 @@ void PMDockSplitter::activate(QWidget *c0, QWidget *c1) setupMinMaxSize(); if (divider) delete divider; - divider = new QFrame(this, "pannerdivider"); - divider->setFrameStyle(QFrame::Panel | QFrame::Raised); + divider = new TQFrame(this, "pannerdivider"); + divider->setFrameStyle(TQFrame::Panel | TQFrame::Raised); divider->setLineWidth(1); divider->raise(); if (orientation == Horizontal) - divider->setCursor(QCursor(sizeVerCursor)); + divider->setCursor(TQCursor(sizeVerCursor)); else - divider->setCursor(QCursor(sizeHorCursor)); + divider->setCursor(TQCursor(sizeHorCursor)); divider->installEventFilter(this); @@ -112,7 +112,7 @@ int PMDockSplitter::separatorPos() const return xpos; } -void PMDockSplitter::resizeEvent(QResizeEvent *ev) +void PMDockSplitter::resizeEvent(TQResizeEvent *ev) { if (initialised){ int factor = (mHighResolution)? 10000:100; @@ -165,15 +165,15 @@ int PMDockSplitter::checkValue( int position ) const return position; } -bool PMDockSplitter::eventFilter(QObject *o, QEvent *e) +bool PMDockSplitter::eventFilter(TQObject *o, TQEvent *e) { - QMouseEvent *mev; + TQMouseEvent *mev; bool handled = false; int factor = (mHighResolution)? 10000:100; switch (e->type()) { - case QEvent::MouseMove: - mev= (QMouseEvent*)e; + case TQEvent::MouseMove: + mev= (TQMouseEvent*)e; child0->setUpdatesEnabled(mOpaqueResize); child1->setUpdatesEnabled(mOpaqueResize); if (orientation == Horizontal) { @@ -187,7 +187,7 @@ bool PMDockSplitter::eventFilter(QObject *o, QEvent *e) } } else { if (!mOpaqueResize) { - int position = checkValue( mapFromGlobal(QCursor::pos()).x() ); + int position = checkValue( mapFromGlobal(TQCursor::pos()).x() ); divider->move( position, 0 ); } else { xpos = factor * checkValue( mapFromGlobal( mev->globalPos()).x() ) / width(); @@ -197,10 +197,10 @@ bool PMDockSplitter::eventFilter(QObject *o, QEvent *e) } handled= true; break; - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: child0->setUpdatesEnabled(true); child1->setUpdatesEnabled(true); - mev= (QMouseEvent*)e; + mev= (TQMouseEvent*)e; if (orientation == Horizontal){ xpos = factor* checkValue( mapFromGlobal(mev->globalPos()).y() ) / height(); resizeEvent(0); @@ -215,20 +215,20 @@ bool PMDockSplitter::eventFilter(QObject *o, QEvent *e) default: break; } - return (handled) ? true : QWidget::eventFilter( o, e ); + return (handled) ? true : TQWidget::eventFilter( o, e ); } -bool PMDockSplitter::event( QEvent* e ) +bool PMDockSplitter::event( TQEvent* e ) { - if ( e->type() == QEvent::LayoutHint ){ + if ( e->type() == TQEvent::LayoutHint ){ // change children min/max size setupMinMaxSize(); setSeparatorPos(xpos); } - return QWidget::event(e); + return TQWidget::event(e); } -QWidget* PMDockSplitter::getAnother( QWidget* w ) const +TQWidget* PMDockSplitter::getAnother( TQWidget* w ) const { return ( w == child0 ) ? child1 : child0; } @@ -237,7 +237,7 @@ void PMDockSplitter::updateName() { if ( !initialised ) return; - QString new_name = QString( child0->name() ) + "," + child1->name(); + TQString new_name = TQString( child0->name() ) + "," + child1->name(); parentWidget()->setName( new_name.latin1() ); parentWidget()->setCaption( child0->caption() + "," + child1->caption() ); parentWidget()->repaint( false ); @@ -246,7 +246,7 @@ void PMDockSplitter::updateName() ((PMDockWidget*)parentWidget())->lastName = child1->name(); ((PMDockWidget*)parentWidget())->splitterOrientation = orientation; - QWidget* p = parentWidget()->parentWidget(); + TQWidget* p = parentWidget()->parentWidget(); if ( p != 0L && p->inherits("PMDockSplitter" ) ) ((PMDockSplitter*)p)->updateName(); } @@ -288,8 +288,8 @@ bool PMDockSplitter::highResolution() const /*************************************************************************/ -PMDockButton_Private::PMDockButton_Private( QWidget *parent, const char * name ) -:QPushButton( parent, name ) +PMDockButton_Private::PMDockButton_Private( TQWidget *parent, const char * name ) +:TQPushButton( parent, name ) { moveMouse = false; setFocusPolicy( NoFocus ); @@ -299,9 +299,9 @@ PMDockButton_Private::~PMDockButton_Private() { } -void PMDockButton_Private::drawButton( QPainter* p ) +void PMDockButton_Private::drawButton( TQPainter* p ) { - p->fillRect( 0,0, width(), height(), QBrush(colorGroup().brush(QColorGroup::Background)) ); + p->fillRect( 0,0, width(), height(), TQBrush(colorGroup().brush(TQColorGroup::Background)) ); p->drawPixmap( (width() - pixmap()->width()) / 2, (height() - pixmap()->height()) / 2, *pixmap() ); if ( moveMouse && !isDown() ){ p->setPen( white ); @@ -325,13 +325,13 @@ void PMDockButton_Private::drawButton( QPainter* p ) } } -void PMDockButton_Private::enterEvent( QEvent * ) +void PMDockButton_Private::enterEvent( TQEvent * ) { moveMouse = true; repaint(); } -void PMDockButton_Private::leaveEvent( QEvent * ) +void PMDockButton_Private::leaveEvent( TQEvent * ) { moveMouse = false; repaint(); @@ -339,7 +339,7 @@ void PMDockButton_Private::leaveEvent( QEvent * ) /*************************************************************************/ PMDockWidgetPrivate::PMDockWidgetPrivate() - : QObject() + : TQObject() ,index(-1) ,splitPosInPercent(50) ,pendingFocusInEvent(false) @@ -357,11 +357,11 @@ PMDockWidgetPrivate::~PMDockWidgetPrivate() { } -void PMDockWidgetPrivate::slotFocusEmbeddedWidget(QWidget* w) +void PMDockWidgetPrivate::slotFocusEmbeddedWidget(TQWidget* w) { if (w) { - QWidget* embeddedWdg = ((PMDockWidget*)w)->getWidget(); - if (embeddedWdg && ((embeddedWdg->focusPolicy() == QWidget::ClickFocus) || (embeddedWdg->focusPolicy() == QWidget::StrongFocus))) { + TQWidget* embeddedWdg = ((PMDockWidget*)w)->getWidget(); + if (embeddedWdg && ((embeddedWdg->focusPolicy() == TQWidget::ClickFocus) || (embeddedWdg->focusPolicy() == TQWidget::StrongFocus))) { embeddedWdg->setFocus(); } } diff --git a/kpovmodeler/pmdockwidget_private.h b/kpovmodeler/pmdockwidget_private.h index 353eb390..efd8cd14 100644 --- a/kpovmodeler/pmdockwidget_private.h +++ b/kpovmodeler/pmdockwidget_private.h @@ -24,17 +24,17 @@ #ifndef KDOCKWIDGET_PRIVATE_H #define KDOCKWIDGET_PRIVATE_H -#include <qwidget.h> -#include <qpushbutton.h> +#include <tqwidget.h> +#include <tqpushbutton.h> #ifndef NO_KDE2 #include <netwm_def.h> #endif -class QFrame; +class TQFrame; /** - * Like QSplitter but specially designed for dockwidgets stuff. + * Like TQSplitter but specially designed for dockwidgets stuff. * @internal * * @author Max Judin. @@ -43,21 +43,21 @@ class PMDockSplitter : public QWidget { Q_OBJECT public: - PMDockSplitter(QWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50, bool highResolution=false); + PMDockSplitter(TQWidget *parent= 0, const char *name= 0, Orientation orient= Vertical, int pos= 50, bool highResolution=false); virtual ~PMDockSplitter(){}; - void activate(QWidget *c0, QWidget *c1 = 0L); + void activate(TQWidget *c0, TQWidget *c1 = 0L); void deactivate(); int separatorPos() const; void setSeparatorPos(int pos, bool do_resize = true); - virtual bool eventFilter(QObject *, QEvent *); - virtual bool event( QEvent * ); + virtual bool eventFilter(TQObject *, TQEvent *); + virtual bool event( TQEvent * ); - QWidget* getFirst() const { return child0; } - QWidget* getLast() const { return child1; } - QWidget* getAnother( QWidget* ) const; + TQWidget* getFirst() const { return child0; } + TQWidget* getLast() const { return child1; } + TQWidget* getAnother( TQWidget* ) const; void updateName(); void setOpaqueResize(bool b=true); @@ -74,15 +74,15 @@ public: protected: int checkValue( int ) const; - virtual void resizeEvent(QResizeEvent *); + virtual void resizeEvent(TQResizeEvent *); private: void setupMinMaxSize(); - QWidget *child0, *child1; + TQWidget *child0, *child1; Orientation orientation; bool initialised; - QFrame* divider; + TQFrame* divider; int xpos; bool mOpaqueResize, mKeepSize, mHighResolution; }; @@ -97,13 +97,13 @@ class PMDockButton_Private : public QPushButton { Q_OBJECT public: - PMDockButton_Private( QWidget *parent=0, const char *name=0 ); + PMDockButton_Private( TQWidget *parent=0, const char *name=0 ); ~PMDockButton_Private(); protected: - virtual void drawButton( QPainter * ); - virtual void enterEvent( QEvent * ); - virtual void leaveEvent( QEvent * ); + virtual void drawButton( TQPainter * ); + virtual void enterEvent( TQEvent * ); + virtual void leaveEvent( TQEvent * ); private: bool moveMouse; @@ -123,7 +123,7 @@ public slots: /** * Especially used for Tab page docking. Switching the pages requires additional setFocus() for the embedded widget. */ - void slotFocusEmbeddedWidget(QWidget* w = 0L); + void slotFocusEmbeddedWidget(TQWidget* w = 0L); public: int index; @@ -135,7 +135,7 @@ public: NET::WindowType windowType; #endif - QWidget *_parent; + TQWidget *_parent; bool transient; }; diff --git a/kpovmodeler/pmdocumentationmap.cpp b/kpovmodeler/pmdocumentationmap.cpp index 9c898c4c..df2bf620 100644 --- a/kpovmodeler/pmdocumentationmap.cpp +++ b/kpovmodeler/pmdocumentationmap.cpp @@ -20,35 +20,35 @@ #include <kconfig.h> #include <kstandarddirs.h> -#include <qfile.h> -#include <qdom.h> +#include <tqfile.h> +#include <tqdom.h> #include "pmdebug.h" PMDocumentationMap* PMDocumentationMap::s_pInstance = 0; KStaticDeleter<PMDocumentationMap> PMDocumentationMap::s_staticDeleter; -QString PMDocumentationVersion::documentation( const QString& className ) const +TQString PMDocumentationVersion::documentation( const TQString& className ) const { if( m_map.contains( className ) ) return m_map[className]; return m_index; } -void PMDocumentationVersion::loadData( QDomElement& e ) +void PMDocumentationVersion::loadData( TQDomElement& e ) { - QString className; - QString target; + TQString className; + TQString target; m_version = e.attribute( "number", "3.1" ); m_index = e.attribute( "index", "index.htm" ); - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); className = me.attribute( "className", "" ); target = me.attribute( "target", "" ); if( !className.isEmpty( ) && !target.isEmpty( ) ) @@ -84,20 +84,20 @@ void PMDocumentationMap::restoreConfig( KConfig* cfg ) m_currentVersion = cfg->readEntry( "DocumentationVersion", "3.1" ); } -void PMDocumentationMap::setDocumentationVersion( const QString& v ) +void PMDocumentationMap::setDocumentationVersion( const TQString& v ) { m_currentVersion = v; if( m_mapLoaded ) findVersion( ); } -QValueList<QString> PMDocumentationMap::availableVersions( ) +TQValueList<TQString> PMDocumentationMap::availableVersions( ) { if( !m_mapLoaded ) loadMap( ); - QValueList<QString> result; - QPtrListIterator<PMDocumentationVersion> it( m_maps ); + TQValueList<TQString> result; + TQPtrListIterator<PMDocumentationVersion> it( m_maps ); for( ; it.current( ); ++it ) result.push_back( it.current( )->version( ) ); @@ -105,15 +105,15 @@ QValueList<QString> PMDocumentationMap::availableVersions( ) return result; } -QString PMDocumentationMap::documentation( const QString& objectName ) +TQString PMDocumentationMap::documentation( const TQString& objectName ) { if( !m_mapLoaded ) loadMap( ); - QString url; + TQString url; if( !m_documentationPath.isEmpty( ) ) - if( !m_documentationPath.endsWith( QString( "/" ) ) ) + if( !m_documentationPath.endsWith( TQString( "/" ) ) ) m_documentationPath += "/"; if( !m_documentationPath.isEmpty( ) && m_pCurrentVersion ) @@ -129,14 +129,14 @@ void PMDocumentationMap::loadMap( ) { m_mapLoaded = true; - QString fileName = locate( "data", "kpovmodeler/povraydocmap.xml" ); + TQString fileName = locate( "data", "kpovmodeler/povraydocmap.xml" ); if( fileName.isEmpty( ) ) { kdError( PMArea ) << "Povray documentation map not found" << endl; return; } - QFile file( fileName ); + TQFile file( fileName ); if( !file.open( IO_ReadOnly ) ) { kdError( PMArea ) << "Could not open the povray documentation map file" @@ -144,19 +144,19 @@ void PMDocumentationMap::loadMap( ) return; } - QDomDocument doc( "DOCMAP" ); + TQDomDocument doc( "DOCMAP" ); doc.setContent( &file ); - QDomElement e = doc.documentElement( ); - QDomNode c = e.firstChild( ); + TQDomElement e = doc.documentElement( ); + TQDomNode c = e.firstChild( ); - QString str; + TQString str; while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); PMDocumentationVersion* v = new PMDocumentationVersion( ); m_maps.append( v ); v->loadData( ce ); @@ -170,7 +170,7 @@ void PMDocumentationMap::loadMap( ) void PMDocumentationMap::findVersion( ) { - QPtrListIterator< PMDocumentationVersion > it( m_maps ); + TQPtrListIterator< PMDocumentationVersion > it( m_maps ); bool found = false; m_pCurrentVersion = 0; diff --git a/kpovmodeler/pmdocumentationmap.h b/kpovmodeler/pmdocumentationmap.h index 3027095c..19654089 100644 --- a/kpovmodeler/pmdocumentationmap.h +++ b/kpovmodeler/pmdocumentationmap.h @@ -23,14 +23,14 @@ #include <config.h> #endif -#include <qstring.h> -#include <qmap.h> -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> #include <kstaticdeleter.h> class KConfig; -class QDomElement; +class TQDomElement; /** * Class used internally by @ref PMDocumentationMap @@ -47,19 +47,19 @@ public: */ ~PMDocumentationVersion( ) { } - QString version( ) const { return m_version; } - void setVersion( const QString& str ) { m_version = str; } - QString index( ) const { return m_index; } - void setIndex( const QString& str ) { m_index = str; } + TQString version( ) const { return m_version; } + void setVersion( const TQString& str ) { m_version = str; } + TQString index( ) const { return m_index; } + void setIndex( const TQString& str ) { m_index = str; } - QString documentation( const QString& className ) const; + TQString documentation( const TQString& className ) const; - void loadData( QDomElement& e ); + void loadData( TQDomElement& e ); private: - QString m_version; - QString m_index; - QMap< QString, QString > m_map; + TQString m_version; + TQString m_index; + TQMap< TQString, TQString > m_map; }; /** @@ -81,14 +81,14 @@ public: /** * Sets the path to the povray user documentation */ - void setPovrayDocumentationPath( const QString& s ) + void setPovrayDocumentationPath( const TQString& s ) { m_documentationPath = s; } /** * Returns the path to the povray user documentation */ - QString povrayDocumentationPath( ) + TQString povrayDocumentationPath( ) { return m_documentationPath; } @@ -96,22 +96,22 @@ public: /** * Sets the povray documentation version */ - void setDocumentationVersion( const QString& str ); + void setDocumentationVersion( const TQString& str ); /** * Returns the povray documentation version */ - QString documentationVersion( ) const { return m_currentVersion; } + TQString documentationVersion( ) const { return m_currentVersion; } /** * Returns the list of available documentation versions */ - QValueList<QString> availableVersions( ); + TQValueList<TQString> availableVersions( ); /** * Returns the povray documentation file for the * given object type */ - QString documentation( const QString& objectName ); + TQString documentation( const TQString& objectName ); void saveConfig( KConfig* cfg ); void restoreConfig( KConfig* cfg ); @@ -125,11 +125,11 @@ private: void loadMap( ); void findVersion( ); - QString m_documentationPath; + TQString m_documentationPath; bool m_mapLoaded; - QPtrList< PMDocumentationVersion > m_maps; + TQPtrList< PMDocumentationVersion > m_maps; PMDocumentationVersion* m_pCurrentVersion; - QString m_currentVersion; + TQString m_currentVersion; static PMDocumentationMap* s_pInstance; static KStaticDeleter<PMDocumentationMap> s_staticDeleter; diff --git a/kpovmodeler/pmdragwidget.cpp b/kpovmodeler/pmdragwidget.cpp index 7b63baf5..bc097c46 100644 --- a/kpovmodeler/pmdragwidget.cpp +++ b/kpovmodeler/pmdragwidget.cpp @@ -17,23 +17,23 @@ #include "pmdragwidget.h" -PMDragWidget::PMDragWidget( QWidget* parent, const char* name, WFlags f ) - : QWidget( parent, name, f ) +PMDragWidget::PMDragWidget( TQWidget* parent, const char* name, WFlags f ) + : TQWidget( parent, name, f ) { dragging = false; } -void PMDragWidget::mousePressEvent( QMouseEvent* ) +void PMDragWidget::mousePressEvent( TQMouseEvent* ) { dragging = true; } -void PMDragWidget::mouseReleaseEvent( QMouseEvent* ) +void PMDragWidget::mouseReleaseEvent( TQMouseEvent* ) { dragging = false; } -void PMDragWidget::mouseMoveEvent( QMouseEvent* ) +void PMDragWidget::mouseMoveEvent( TQMouseEvent* ) { if( dragging ) { diff --git a/kpovmodeler/pmdragwidget.h b/kpovmodeler/pmdragwidget.h index 30b15045..10c30e16 100644 --- a/kpovmodeler/pmdragwidget.h +++ b/kpovmodeler/pmdragwidget.h @@ -22,8 +22,8 @@ #include <config.h> #endif -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> /** * This class implements a widget that exposes a signal for drag @@ -35,14 +35,14 @@ class PMDragWidget : public QWidget { Q_OBJECT public: - PMDragWidget( QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); + PMDragWidget( TQWidget* parent = 0, const char* name = 0, WFlags f = 0 ); virtual void startDrag( ); protected: - void mousePressEvent( QMouseEvent* ); - void mouseReleaseEvent( QMouseEvent* ); - void mouseMoveEvent( QMouseEvent* ); + void mousePressEvent( TQMouseEvent* ); + void mouseReleaseEvent( TQMouseEvent* ); + void mouseMoveEvent( TQMouseEvent* ); private: bool dragging; diff --git a/kpovmodeler/pmenumproperty.cpp b/kpovmodeler/pmenumproperty.cpp index 72a03788..f82579ad 100644 --- a/kpovmodeler/pmenumproperty.cpp +++ b/kpovmodeler/pmenumproperty.cpp @@ -23,15 +23,15 @@ PMEnumProperty::PMEnumProperty( const char* name, bool readOnly, { } -void PMEnumProperty::addEnumValue( const QString& str, int value ) +void PMEnumProperty::addEnumValue( const TQString& str, int value ) { m_valueMap[value] = str; m_stringMap[str] = value; } -QStringList PMEnumProperty::enumValues( ) const +TQStringList PMEnumProperty::enumValues( ) const { - QStringList l; + TQStringList l; PMEnumStringValueMap::const_iterator it; for( it = m_stringMap.begin( ); it != m_stringMap.end( ); ++it ) l.append( it.key( ) ); @@ -52,6 +52,6 @@ PMVariant PMEnumProperty::getProtected( const PMObject* obj ) int v = getEnum( obj ); PMEnumValueStringMap::const_iterator it = m_valueMap.find( v ); if( it == m_valueMap.end( ) ) - return PMVariant( QString::null ); + return PMVariant( TQString::null ); return it.data( ); } diff --git a/kpovmodeler/pmenumproperty.h b/kpovmodeler/pmenumproperty.h index a8d6085e..0de2efb3 100644 --- a/kpovmodeler/pmenumproperty.h +++ b/kpovmodeler/pmenumproperty.h @@ -20,10 +20,10 @@ #define PMENUMPROPERTY_H #include "pmmetaobject.h" -#include <qmap.h> +#include <tqmap.h> -typedef QMap<int, QString> PMEnumValueStringMap; -typedef QMap<QString, int> PMEnumStringValueMap; +typedef TQMap<int, TQString> PMEnumValueStringMap; +typedef TQMap<TQString, int> PMEnumStringValueMap; /** * Base class for enum properties @@ -41,7 +41,7 @@ public: * Adds the string to the list of enum values and sets the enum flag * to true */ - void addEnumValue( const QString& str, int value ); + void addEnumValue( const TQString& str, int value ); /** * Returns true if the property is an enum @@ -50,7 +50,7 @@ public: /** * Returns the list of enum values */ - virtual QStringList enumValues( ) const; + virtual TQStringList enumValues( ) const; protected: /** diff --git a/kpovmodeler/pmerrordialog.cpp b/kpovmodeler/pmerrordialog.cpp index 721cd302..eb920fb0 100644 --- a/kpovmodeler/pmerrordialog.cpp +++ b/kpovmodeler/pmerrordialog.cpp @@ -20,24 +20,24 @@ #include "pmerrorflags.h" #include <klocale.h> -#include <qlabel.h> -#include <qtextedit.h> +#include <tqlabel.h> +#include <tqtextedit.h> #include <kconfig.h> -QSize PMErrorDialog::s_size = QSize( 150, 200 ); +TQSize PMErrorDialog::s_size = TQSize( 150, 200 ); PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags, - QWidget* parent, const char* name ) + TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Messages" ), Ok | Cancel, Cancel ) { - QVBox* page = makeVBoxMainWidget( ); - QLabel* text = new QLabel( QString( "" ), ( QWidget* )page ); + TQVBox* page = makeVBoxMainWidget( ); + TQLabel* text = new TQLabel( TQString( "" ), ( TQWidget* )page ); - m_pTextView = new QTextEdit( ( QWidget* )page ); + m_pTextView = new TQTextEdit( ( TQWidget* )page ); m_pTextView->setReadOnly( true ); m_messageDict.setAutoDelete( true ); @@ -47,16 +47,16 @@ PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags, for( it = messages.begin( ); it != messages.end( ); ++it ) m_messages.append( new PMMessage( *it ) ); - QPtrListIterator<PMMessage> pit( m_messages ); + TQPtrListIterator<PMMessage> pit( m_messages ); for( ; pit.current( ); ++pit ) { PMObject* obj = pit.current( )->linkedObject( ); for( ; obj; obj = obj->parent( ) ) { - QPtrList<PMMessage>* pList = m_messageDict.find( obj ); + TQPtrList<PMMessage>* pList = m_messageDict.find( obj ); if( !pList ) { - pList = new QPtrList<PMMessage>; + pList = new TQPtrList<PMMessage>; m_messageDict.insert( obj, pList ); } pList->append( pit.current( ) ); @@ -95,15 +95,15 @@ PMErrorDialog::PMErrorDialog( const PMMessageList& messages, int errorFlags, if( errorFlags & PMEFatal ) showButtonOK( false ); else - new QLabel( i18n( "Still try to proceed?" ), ( QWidget* )page ); + new TQLabel( i18n( "Still try to proceed?" ), ( TQWidget* )page ); resize( s_size ); } void PMErrorDialog::displayMessages( ) { - QPtrListIterator<PMMessage> pit( m_messages ); - QString text; + TQPtrListIterator<PMMessage> pit( m_messages ); + TQString text; text = "<qt>\n"; @@ -125,11 +125,11 @@ void PMErrorDialog::restoreConfig( KConfig* cfg ) { cfg->setGroup( "Appearance" ); - QSize defaultSize( 150, 200 ); + TQSize defaultSize( 150, 200 ); s_size = cfg->readSizeEntry( "ErrorDialogSize", &defaultSize ); } -void PMErrorDialog::resizeEvent( QResizeEvent* ev ) +void PMErrorDialog::resizeEvent( TQResizeEvent* ev ) { s_size = ev->size( ); } diff --git a/kpovmodeler/pmerrordialog.h b/kpovmodeler/pmerrordialog.h index 972d55ab..93981eab 100644 --- a/kpovmodeler/pmerrordialog.h +++ b/kpovmodeler/pmerrordialog.h @@ -25,12 +25,12 @@ #endif #include <kdialogbase.h> -#include <qvaluelist.h> -#include <qptrdict.h> -#include <qptrlist.h> +#include <tqvaluelist.h> +#include <tqptrdict.h> +#include <tqptrlist.h> class KConfig; -class QTextEdit; +class TQTextEdit; class PMObject; #include "pmmessage.h" @@ -49,25 +49,25 @@ public: * messages is the message list. If the list contains a message of type * FatalError, the 'Proceed" button will not be shown. * - * PMErrorDialog::exec( ) returns QDialog::Accepted if the command + * PMErrorDialog::exec( ) returns TQDialog::Accepted if the command * should be continued. */ PMErrorDialog( const PMMessageList& messages, int errorFlags, - QWidget* parent = 0, const char* name = 0 ); + TQWidget* parent = 0, const char* name = 0 ); static void saveConfig( KConfig* cfg ); static void restoreConfig( KConfig* cfg ); protected: - virtual void resizeEvent( QResizeEvent* ev ); + virtual void resizeEvent( TQResizeEvent* ev ); private: void displayMessages( ); - static QSize s_size; - QTextEdit* m_pTextView; - QPtrDict< QPtrList<PMMessage> > m_messageDict; - QPtrList<PMMessage> m_messages; + static TQSize s_size; + TQTextEdit* m_pTextView; + TQPtrDict< TQPtrList<PMMessage> > m_messageDict; + TQPtrList<PMMessage> m_messages; }; #endif diff --git a/kpovmodeler/pmface.h b/kpovmodeler/pmface.h index 46da64bb..a93a4636 100644 --- a/kpovmodeler/pmface.h +++ b/kpovmodeler/pmface.h @@ -18,8 +18,8 @@ #ifndef PMFACE_H #define PMFACE_H -#include <qptrlist.h> -#include <qvaluevector.h> +#include <tqptrlist.h> +#include <tqvaluevector.h> #include <GL/gl.h> #include "pmdebug.h" #include "pmvector.h" @@ -117,7 +117,7 @@ private: static GLuint s_dummy; }; -typedef QPtrListIterator<PMFace> PMFaceListIterator; +typedef TQPtrListIterator<PMFace> PMFaceListIterator; /** * A list of @ref PMFace objects. @@ -125,6 +125,6 @@ typedef QPtrListIterator<PMFace> PMFaceListIterator; * This class stores all faces of a @ref PMViewStructure. Only the indices * in a @ref PMPointArray are stored. */ -typedef QValueVector<PMFace> PMFaceArray; +typedef TQValueVector<PMFace> PMFaceArray; #endif diff --git a/kpovmodeler/pmfactory.cpp b/kpovmodeler/pmfactory.cpp index 4a3631ae..488db1ce 100644 --- a/kpovmodeler/pmfactory.cpp +++ b/kpovmodeler/pmfactory.cpp @@ -54,11 +54,11 @@ PMFactory::~PMFactory( ) s_aboutData = 0L; } -KParts::Part* PMFactory::createPartObject( QWidget* parentWidget, +KParts::Part* PMFactory::createPartObject( TQWidget* parentWidget, const char* widgetName, - QObject* parent, const char* name, + TQObject* parent, const char* name, const char* classname, - const QStringList& /*args*/ ) + const TQStringList& /*args*/ ) { kdDebug( ) << "PMFactory: Created new part\n"; diff --git a/kpovmodeler/pmfactory.h b/kpovmodeler/pmfactory.h index b44c6bd3..56797935 100644 --- a/kpovmodeler/pmfactory.h +++ b/kpovmodeler/pmfactory.h @@ -32,11 +32,11 @@ public: PMFactory( ); virtual ~PMFactory( ); - virtual KParts::Part* createPartObject( QWidget* parentWidget, + virtual KParts::Part* createPartObject( TQWidget* parentWidget, const char* widgetName, - QObject* parent, const char* name, + TQObject* parent, const char* name, const char* classname, - const QStringList& args ); + const TQStringList& args ); static KInstance* instance( ); static const KAboutData* aboutData( ); diff --git a/kpovmodeler/pmfiledialog.cpp b/kpovmodeler/pmfiledialog.cpp index 68030f8c..d8da0f4d 100644 --- a/kpovmodeler/pmfiledialog.cpp +++ b/kpovmodeler/pmfiledialog.cpp @@ -22,26 +22,26 @@ #include <kfilefiltercombo.h> -PMFileDialog::PMFileDialog( const QString& startDir, const QString& filter, QWidget* parent, const char* name, bool modal ) +PMFileDialog::PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* parent, const char* name, bool modal ) : KFileDialog( startDir, filter, parent, name, modal ) { } -QString PMFileDialog::getImportFileName( QWidget* parent, PMPart* part, +TQString PMFileDialog::getImportFileName( TQWidget* parent, PMPart* part, PMIOFormat*& format ) { PMIOManager* manager = part->ioManager( ); - QString filter; - QPtrListIterator<PMIOFormat> it( manager->formats( ) ); - QPtrList<PMIOFormat> formats; + TQString filter; + TQPtrListIterator<PMIOFormat> it( manager->formats( ) ); + TQPtrList<PMIOFormat> formats; for( ; it.current( ); ++it ) { if( it.current( )->services( ) & PMIOFormat::Import ) { - QStringList patterns = it.current( )->importPatterns( ); - QStringList::Iterator pit; + TQStringList patterns = it.current( )->importPatterns( ); + TQStringList::Iterator pit; for( pit = patterns.begin( ); pit != patterns.end( ); ++pit ) { if( !filter.isEmpty( ) ) @@ -52,7 +52,7 @@ QString PMFileDialog::getImportFileName( QWidget* parent, PMPart* part, } } - PMFileDialog dlg( QString::null, filter, parent, "import file dialog", true ); + PMFileDialog dlg( TQString::null, filter, parent, "import file dialog", true ); dlg.setOperationMode( Opening ); dlg.setMode( KFile::File | KFile::LocalOnly ); dlg.setCaption( i18n( "Import" ) ); @@ -64,20 +64,20 @@ QString PMFileDialog::getImportFileName( QWidget* parent, PMPart* part, return dlg.selectedFile( ); } -QString PMFileDialog::getExportFileName( QWidget* parent, PMPart* part, - PMIOFormat*& format, QString& selectedFilter ) +TQString PMFileDialog::getExportFileName( TQWidget* parent, PMPart* part, + PMIOFormat*& format, TQString& selectedFilter ) { PMIOManager* manager = part->ioManager( ); - QString filter; - QPtrListIterator<PMIOFormat> it( manager->formats( ) ); - QPtrList<PMIOFormat> formats; + TQString filter; + TQPtrListIterator<PMIOFormat> it( manager->formats( ) ); + TQPtrList<PMIOFormat> formats; for( ; it.current( ); ++it ) { if( it.current( )->services( ) & PMIOFormat::Export ) { - QStringList patterns = it.current( )->exportPatterns( ); - QStringList::Iterator pit; + TQStringList patterns = it.current( )->exportPatterns( ); + TQStringList::Iterator pit; for( pit = patterns.begin( ); pit != patterns.end( ); ++pit ) { if( !filter.isEmpty( ) ) @@ -88,7 +88,7 @@ QString PMFileDialog::getExportFileName( QWidget* parent, PMPart* part, } } - PMFileDialog dlg( QString::null, filter, parent, "export file dialog", true ); + PMFileDialog dlg( TQString::null, filter, parent, "export file dialog", true ); dlg.setOperationMode( Saving ); dlg.setMode( KFile::File | KFile::LocalOnly ); dlg.setCaption( i18n( "Export" ) ); diff --git a/kpovmodeler/pmfiledialog.h b/kpovmodeler/pmfiledialog.h index e98a84ab..7843b73d 100644 --- a/kpovmodeler/pmfiledialog.h +++ b/kpovmodeler/pmfiledialog.h @@ -43,18 +43,18 @@ public: * Default constructor, use the static methods * @ref getImportFileName or @ref getExportFileName instead */ - PMFileDialog( const QString& startDir, const QString& filter, QWidget* parent, const char* name, bool modal ); + PMFileDialog( const TQString& startDir, const TQString& filter, TQWidget* parent, const char* name, bool modal ); /** * Opens a modal file dialog and returns a selected file and the chosen * file format. */ - static QString getImportFileName( QWidget* parent, PMPart* part, PMIOFormat*& format ); + static TQString getImportFileName( TQWidget* parent, PMPart* part, PMIOFormat*& format ); /** * Opens a modal file dialog and returns a selected file and the chosen * file format and filter. */ - static QString getExportFileName( QWidget* parent, PMPart* part, - PMIOFormat*& format, QString& filter ); + static TQString getExportFileName( TQWidget* parent, PMPart* part, + PMIOFormat*& format, TQString& filter ); }; #endif diff --git a/kpovmodeler/pmfinish.cpp b/kpovmodeler/pmfinish.cpp index a98b9a2c..52bd92c8 100644 --- a/kpovmodeler/pmfinish.cpp +++ b/kpovmodeler/pmfinish.cpp @@ -214,12 +214,12 @@ void PMFinish::cleanUp( ) const Base::cleanUp( ); } -QString PMFinish::description( ) const +TQString PMFinish::description( ) const { return i18n( "finish" ); } -void PMFinish::serialize( QDomElement& e, QDomDocument& doc ) const +void PMFinish::serialize( TQDomElement& e, TQDomDocument& doc ) const { Base::serialize( e, doc ); e.setAttribute( "enable_ambient", m_enableAmbient ); @@ -637,7 +637,7 @@ void PMFinish::setIridTurbulence( double c ) } } -PMDialogEditBase* PMFinish::editWidget( QWidget* parent ) const +PMDialogEditBase* PMFinish::editWidget( TQWidget* parent ) const { return new PMFinishEdit( parent ); } diff --git a/kpovmodeler/pmfinish.h b/kpovmodeler/pmfinish.h index 072a0f7c..c12f31b1 100644 --- a/kpovmodeler/pmfinish.h +++ b/kpovmodeler/pmfinish.h @@ -50,7 +50,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMFinish( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -58,16 +58,16 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMFinishEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmfinish" ); } + virtual TQString pixmap( ) const { return TQString( "pmfinish" ); } /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmfinishedit.cpp b/kpovmodeler/pmfinishedit.cpp index 809cbd66..38766f94 100644 --- a/kpovmodeler/pmfinishedit.cpp +++ b/kpovmodeler/pmfinishedit.cpp @@ -21,15 +21,15 @@ #include "pmlineedits.h" #include "pmcoloredit.h" -#include <qwidget.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kdialog.h> -PMFinishEdit::PMFinishEdit( QWidget* parent, const char* name ) +PMFinishEdit::PMFinishEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,44 +37,44 @@ PMFinishEdit::PMFinishEdit( QWidget* parent, const char* name ) void PMFinishEdit::createTopWidgets( ) { - QHBoxLayout* hl; + TQHBoxLayout* hl; Base::createTopWidgets( ); - hl = new QHBoxLayout( topLayout( ) ); - QGridLayout* layout = new QGridLayout( hl, 2, 2 ); - m_pEnableAmbientEdit = new QCheckBox( i18n( "Ambient color" ), this ); - m_pAmbientColorLabel = new QLabel( i18n( "Color:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + TQGridLayout* layout = new TQGridLayout( hl, 2, 2 ); + m_pEnableAmbientEdit = new TQCheckBox( i18n( "Ambient color" ), this ); + m_pAmbientColorLabel = new TQLabel( i18n( "Color:" ), this ); m_pAmbientColorEdit = new PMColorEdit( true, this ); layout->addMultiCellWidget( m_pEnableAmbientEdit, 0, 0, 0, 1 ); layout->addWidget( m_pAmbientColorLabel, 1, 0, AlignTop ); layout->addWidget( m_pAmbientColorEdit, 1, 1 ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - layout = new QGridLayout( hl, 4, 2 ); - m_pEnableDiffuseEdit = new QCheckBox( i18n( "Diffuse:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + layout = new TQGridLayout( hl, 4, 2 ); + m_pEnableDiffuseEdit = new TQCheckBox( i18n( "Diffuse:" ), this ); m_pDiffuseEdit = new PMFloatEdit( this ); layout->addWidget( m_pEnableDiffuseEdit, 0, 0 ); layout->addWidget( m_pDiffuseEdit, 0, 1 ); - m_pEnableBrillianceEdit = new QCheckBox( i18n( "Brilliance:" ), this ); + m_pEnableBrillianceEdit = new TQCheckBox( i18n( "Brilliance:" ), this ); m_pBrillianceEdit = new PMFloatEdit( this ); layout->addWidget( m_pEnableBrillianceEdit, 1, 0 ); layout->addWidget( m_pBrillianceEdit, 1, 1 ); - m_pEnableCrandEdit = new QCheckBox( i18n( "Crand:" ), this ); + m_pEnableCrandEdit = new TQCheckBox( i18n( "Crand:" ), this ); m_pCrandEdit = new PMFloatEdit( this ); layout->addWidget( m_pEnableCrandEdit, 2, 0 ); layout->addWidget( m_pCrandEdit, 2, 1 ); - m_pConserveEnergyEdit = new QCheckBox( + m_pConserveEnergyEdit = new TQCheckBox( i18n( "Conserve energy for reflection" ), this ); layout->addMultiCellWidget( m_pConserveEnergyEdit, 3, 3, 0, 1 ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - layout = new QGridLayout( hl, 2, 2 ); - m_pEnablePhongEdit = new QCheckBox( i18n( "Phong:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + layout = new TQGridLayout( hl, 2, 2 ); + m_pEnablePhongEdit = new TQCheckBox( i18n( "Phong:" ), this ); m_pPhongEdit = new PMFloatEdit( this ); - m_pEnablePhongSizeEdit = new QCheckBox( i18n( "Phong size:" ), this ); + m_pEnablePhongSizeEdit = new TQCheckBox( i18n( "Phong size:" ), this ); m_pPhongSizeEdit = new PMFloatEdit( this ); layout->addWidget( m_pEnablePhongEdit, 0, 0 ); layout->addWidget( m_pPhongEdit, 0, 1 ); @@ -82,70 +82,70 @@ void PMFinishEdit::createTopWidgets( ) layout->addWidget( m_pPhongSizeEdit, 1, 1 ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - layout = new QGridLayout( hl, 3, 2 ); - m_pEnableSpecularEdit = new QCheckBox( i18n( "Specular:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + layout = new TQGridLayout( hl, 3, 2 ); + m_pEnableSpecularEdit = new TQCheckBox( i18n( "Specular:" ), this ); m_pSpecularEdit = new PMFloatEdit( this ); layout->addWidget( m_pEnableSpecularEdit, 0, 0 ); layout->addWidget( m_pSpecularEdit, 0, 1 ); - m_pEnableRoughnessEdit = new QCheckBox( i18n( "Roughness:" ), this ); + m_pEnableRoughnessEdit = new TQCheckBox( i18n( "Roughness:" ), this ); m_pRoughnessEdit = new PMFloatEdit( this ); layout->addWidget( m_pEnableRoughnessEdit, 1, 0 ); layout->addWidget( m_pRoughnessEdit, 1, 1 ); - m_pEnableMetallicEdit = new QCheckBox( i18n( "Metallic:" ), this ); + m_pEnableMetallicEdit = new TQCheckBox( i18n( "Metallic:" ), this ); m_pMetallicEdit = new PMFloatEdit( this ); layout->addWidget( m_pEnableMetallicEdit, 2, 0 ); layout->addWidget( m_pMetallicEdit, 2, 1 ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - layout = new QGridLayout( hl, 6, 2 ); - m_pIridEdit = new QCheckBox( i18n( "Iridiscence" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + layout = new TQGridLayout( hl, 6, 2 ); + m_pIridEdit = new TQCheckBox( i18n( "Iridiscence" ), this ); layout->addMultiCellWidget( m_pIridEdit, 0, 0, 0, 1 ); - m_pIridAmountLabel = new QLabel( i18n( "Amount:" ), this ); + m_pIridAmountLabel = new TQLabel( i18n( "Amount:" ), this ); m_pIridAmountEdit = new PMFloatEdit( this ); layout->addWidget( m_pIridAmountLabel, 1, 0 ); layout->addWidget( m_pIridAmountEdit, 1, 1 ); - m_pIridThicknessLabel = new QLabel( i18n( "Thickness:" ), this ); + m_pIridThicknessLabel = new TQLabel( i18n( "Thickness:" ), this ); m_pIridThicknessEdit = new PMFloatEdit( this ); layout->addWidget( m_pIridThicknessLabel, 2, 0 ); layout->addWidget( m_pIridThicknessEdit, 2, 1 ); m_pIridTurbulenceEdit = new PMFloatEdit( this ); - m_pIridTurbulenceLabel = new QLabel( i18n( "Turbulence:" ), this ); + m_pIridTurbulenceLabel = new TQLabel( i18n( "Turbulence:" ), this ); layout->addWidget( m_pIridTurbulenceLabel, 3, 0 ); layout->addWidget( m_pIridTurbulenceEdit, 3, 1 ); - m_pEnableReflectionEdit = new QCheckBox( i18n( "Reflection" ), this ); + m_pEnableReflectionEdit = new TQCheckBox( i18n( "Reflection" ), this ); layout->addMultiCellWidget( m_pEnableReflectionEdit, 4, 4, 0, 1 ); hl->addStretch( 1 ); - m_pReflectionWidget = new QWidget( this ); - QVBoxLayout* vl = new QVBoxLayout( m_pReflectionWidget, 0, KDialog::spacingHint( ) ); - QGridLayout* gl = new QGridLayout( vl, 2, 2 ); - m_pEnableReflectionMinEdit = new QCheckBox( i18n( "Minimum:" ), + m_pReflectionWidget = new TQWidget( this ); + TQVBoxLayout* vl = new TQVBoxLayout( m_pReflectionWidget, 0, KDialog::spacingHint( ) ); + TQGridLayout* gl = new TQGridLayout( vl, 2, 2 ); + m_pEnableReflectionMinEdit = new TQCheckBox( i18n( "Minimum:" ), m_pReflectionWidget ); m_pReflectionMinColorEdit = new PMColorEdit( false, m_pReflectionWidget ); gl->addWidget( m_pEnableReflectionMinEdit, 0, 0, AlignTop ); gl->addWidget( m_pReflectionMinColorEdit, 0, 1 ); - QLabel* label = new QLabel( i18n( "Maximum:" ), m_pReflectionWidget ); + TQLabel* label = new TQLabel( i18n( "Maximum:" ), m_pReflectionWidget ); m_pReflectionColorEdit = new PMColorEdit( false, m_pReflectionWidget ); gl->addWidget( label, 1, 0, AlignTop ); gl->addWidget( m_pReflectionColorEdit, 1, 1 ); - gl = new QGridLayout( vl, 4, 2 ); - m_pReflectionFresnelEdit = new QCheckBox( i18n( "Fresnel reflectivity" ), + gl = new TQGridLayout( vl, 4, 2 ); + m_pReflectionFresnelEdit = new TQCheckBox( i18n( "Fresnel reflectivity" ), m_pReflectionWidget ); gl->addMultiCellWidget( m_pReflectionFresnelEdit, 0, 0, 0, 1 ); - m_pEnableRefFalloffEdit = new QCheckBox( i18n( "Falloff:" ), + m_pEnableRefFalloffEdit = new TQCheckBox( i18n( "Falloff:" ), m_pReflectionWidget ); m_pReflectionFalloffEdit = new PMFloatEdit( m_pReflectionWidget ); gl->addWidget( m_pEnableRefFalloffEdit, 1, 0 ); gl->addWidget( m_pReflectionFalloffEdit, 1, 1 ); - m_pEnableRefExponentEdit = new QCheckBox( i18n( "Exponent:" ), + m_pEnableRefExponentEdit = new TQCheckBox( i18n( "Exponent:" ), m_pReflectionWidget ); m_pReflectionExponentEdit = new PMFloatEdit( m_pReflectionWidget ); gl->addWidget( m_pEnableRefExponentEdit, 2, 0 ); gl->addWidget( m_pReflectionExponentEdit, 2, 1 ); - m_pEnableRefMetallicEdit = new QCheckBox( i18n( "Metallic:" ), + m_pEnableRefMetallicEdit = new TQCheckBox( i18n( "Metallic:" ), m_pReflectionWidget ); m_pReflectionMetallicEdit = new PMFloatEdit( m_pReflectionWidget ); gl->addWidget( m_pEnableRefMetallicEdit, 3, 0 ); @@ -154,41 +154,41 @@ void PMFinishEdit::createTopWidgets( ) layout->addMultiCellWidget( m_pReflectionWidget, 5, 5, 0, 1 ); - connect( m_pAmbientColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDiffuseEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pBrillianceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCrandEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pConserveEnergyEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPhongEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPhongSizeEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMetallicEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSpecularEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRoughnessEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pIridAmountEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pIridThicknessEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pIridTurbulenceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pIridEdit, SIGNAL( clicked( ) ), SLOT( slotIridClicked( ) ) ); - connect( m_pReflectionColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pReflectionMinColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pReflectionFresnelEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pReflectionFalloffEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pReflectionExponentEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pReflectionMetallicEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pAmbientColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDiffuseEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pBrillianceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCrandEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pConserveEnergyEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPhongEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPhongSizeEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMetallicEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSpecularEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRoughnessEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pIridAmountEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pIridThicknessEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pIridTurbulenceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pIridEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotIridClicked( ) ) ); + connect( m_pReflectionColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pReflectionMinColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pReflectionFresnelEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pReflectionFalloffEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pReflectionExponentEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pReflectionMetallicEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); - connect( m_pEnableAmbientEdit, SIGNAL( clicked( ) ), SLOT( slotAmbientClicked( ) ) ); - connect( m_pEnablePhongEdit, SIGNAL( clicked( ) ), SLOT( slotPhongClicked( ) ) ); - connect( m_pEnablePhongSizeEdit, SIGNAL( clicked( ) ), SLOT( slotPhongSizeClicked( ) ) ); - connect( m_pEnableDiffuseEdit, SIGNAL( clicked( ) ), SLOT( slotDiffuseClicked( ) ) ); - connect( m_pEnableBrillianceEdit, SIGNAL( clicked( ) ), SLOT( slotBrillianceClicked( ) ) ); - connect( m_pEnableCrandEdit, SIGNAL( clicked( ) ), SLOT( slotCrandClicked( ) ) ); - connect( m_pEnableSpecularEdit, SIGNAL( clicked( ) ), SLOT( slotSpecularClicked( ) ) ); - connect( m_pEnableRoughnessEdit, SIGNAL( clicked( ) ), SLOT( slotRoughnessClicked( ) ) ); - connect( m_pEnableMetallicEdit, SIGNAL( clicked( ) ), SLOT( slotMetallicClicked( ) ) ); - connect( m_pEnableReflectionEdit, SIGNAL( clicked( ) ), SLOT( slotReflectionClicked( ) ) ); - connect( m_pEnableReflectionMinEdit, SIGNAL( clicked( ) ), SLOT( slotReflectionMinClicked( ) ) ); - connect( m_pEnableRefFalloffEdit, SIGNAL( clicked( ) ), SLOT( slotRefFalloffClicked( ) ) ); - connect( m_pEnableRefExponentEdit, SIGNAL( clicked( ) ), SLOT( slotRefExponentClicked( ) ) ); - connect( m_pEnableRefMetallicEdit, SIGNAL( clicked( ) ), SLOT( slotRefMetallicClicked( ) ) ); + connect( m_pEnableAmbientEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAmbientClicked( ) ) ); + connect( m_pEnablePhongEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotPhongClicked( ) ) ); + connect( m_pEnablePhongSizeEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotPhongSizeClicked( ) ) ); + connect( m_pEnableDiffuseEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDiffuseClicked( ) ) ); + connect( m_pEnableBrillianceEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotBrillianceClicked( ) ) ); + connect( m_pEnableCrandEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotCrandClicked( ) ) ); + connect( m_pEnableSpecularEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSpecularClicked( ) ) ); + connect( m_pEnableRoughnessEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRoughnessClicked( ) ) ); + connect( m_pEnableMetallicEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotMetallicClicked( ) ) ); + connect( m_pEnableReflectionEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotReflectionClicked( ) ) ); + connect( m_pEnableReflectionMinEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotReflectionMinClicked( ) ) ); + connect( m_pEnableRefFalloffEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRefFalloffClicked( ) ) ); + connect( m_pEnableRefExponentEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRefExponentClicked( ) ) ); + connect( m_pEnableRefMetallicEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRefMetallicClicked( ) ) ); } void PMFinishEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmfinishedit.h b/kpovmodeler/pmfinishedit.h index 313b35dc..e72aef73 100644 --- a/kpovmodeler/pmfinishedit.h +++ b/kpovmodeler/pmfinishedit.h @@ -29,9 +29,9 @@ class PMFinish; class PMFloatEdit; class PMColorEdit; -class QCheckBox; -class QLabel; -class QWidget; +class TQCheckBox; +class TQLabel; +class TQWidget; /** * Dialog edit class for @ref PMFinish @@ -44,7 +44,7 @@ public: /** * Creates a PMFinishEdit with parent and name */ - PMFinishEdit( QWidget* parent, const char* name = 0 ); + PMFinishEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -77,45 +77,45 @@ protected slots: private: PMFinish* m_pDisplayedObject; PMColorEdit* m_pAmbientColorEdit; - QLabel* m_pAmbientColorLabel; + TQLabel* m_pAmbientColorLabel; PMFloatEdit* m_pDiffuseEdit; PMFloatEdit* m_pBrillianceEdit; PMFloatEdit* m_pCrandEdit; - QCheckBox* m_pConserveEnergyEdit; + TQCheckBox* m_pConserveEnergyEdit; PMFloatEdit* m_pPhongEdit; PMFloatEdit* m_pPhongSizeEdit; PMFloatEdit* m_pMetallicEdit; PMFloatEdit* m_pSpecularEdit; PMFloatEdit* m_pRoughnessEdit; - QCheckBox* m_pIridEdit; + TQCheckBox* m_pIridEdit; PMFloatEdit* m_pIridAmountEdit; PMFloatEdit* m_pIridThicknessEdit; PMFloatEdit* m_pIridTurbulenceEdit; - QLabel* m_pIridAmountLabel; - QLabel* m_pIridThicknessLabel; - QLabel* m_pIridTurbulenceLabel; - QCheckBox* m_pEnableAmbientEdit; - QCheckBox* m_pEnablePhongEdit; - QCheckBox* m_pEnablePhongSizeEdit; - QCheckBox* m_pEnableDiffuseEdit; - QCheckBox* m_pEnableBrillianceEdit; - QCheckBox* m_pEnableCrandEdit; - QCheckBox* m_pEnableSpecularEdit; - QCheckBox* m_pEnableRoughnessEdit; - QCheckBox* m_pEnableMetallicEdit; + TQLabel* m_pIridAmountLabel; + TQLabel* m_pIridThicknessLabel; + TQLabel* m_pIridTurbulenceLabel; + TQCheckBox* m_pEnableAmbientEdit; + TQCheckBox* m_pEnablePhongEdit; + TQCheckBox* m_pEnablePhongSizeEdit; + TQCheckBox* m_pEnableDiffuseEdit; + TQCheckBox* m_pEnableBrillianceEdit; + TQCheckBox* m_pEnableCrandEdit; + TQCheckBox* m_pEnableSpecularEdit; + TQCheckBox* m_pEnableRoughnessEdit; + TQCheckBox* m_pEnableMetallicEdit; - QWidget* m_pReflectionWidget; + TQWidget* m_pReflectionWidget; PMColorEdit* m_pReflectionColorEdit; PMColorEdit* m_pReflectionMinColorEdit; - QCheckBox* m_pReflectionFresnelEdit; + TQCheckBox* m_pReflectionFresnelEdit; PMFloatEdit* m_pReflectionFalloffEdit; PMFloatEdit* m_pReflectionExponentEdit; PMFloatEdit* m_pReflectionMetallicEdit; - QCheckBox* m_pEnableReflectionEdit; - QCheckBox* m_pEnableReflectionMinEdit; - QCheckBox* m_pEnableRefFalloffEdit; - QCheckBox* m_pEnableRefExponentEdit; - QCheckBox* m_pEnableRefMetallicEdit; + TQCheckBox* m_pEnableReflectionEdit; + TQCheckBox* m_pEnableReflectionMinEdit; + TQCheckBox* m_pEnableRefFalloffEdit; + TQCheckBox* m_pEnableRefExponentEdit; + TQCheckBox* m_pEnableRefMetallicEdit; }; diff --git a/kpovmodeler/pmfog.cpp b/kpovmodeler/pmfog.cpp index 5f2f1581..6af4a2cb 100644 --- a/kpovmodeler/pmfog.cpp +++ b/kpovmodeler/pmfog.cpp @@ -125,12 +125,12 @@ void PMFog::cleanUp( ) const Base::cleanUp( ); } -QString PMFog::description( ) const +TQString PMFog::description( ) const { return i18n( "fog" ); } -void PMFog::serialize( QDomElement& e, QDomDocument& doc ) const +void PMFog::serialize( TQDomElement& e, TQDomDocument& doc ) const { Base::serialize( e, doc ); e.setAttribute( "fog_type", m_fogType ); @@ -284,7 +284,7 @@ void PMFog::setUp( const PMVector& c ) } } -PMDialogEditBase* PMFog::editWidget( QWidget* parent ) const +PMDialogEditBase* PMFog::editWidget( TQWidget* parent ) const { return new PMFogEdit( parent ); } diff --git a/kpovmodeler/pmfog.h b/kpovmodeler/pmfog.h index 444fa54a..fc6d7095 100644 --- a/kpovmodeler/pmfog.h +++ b/kpovmodeler/pmfog.h @@ -51,7 +51,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMFog( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -59,16 +59,16 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMFogEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmfog" ); } + virtual TQString pixmap( ) const { return TQString( "pmfog" ); } /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmfogedit.cpp b/kpovmodeler/pmfogedit.cpp index 64cb915e..ec9880c1 100644 --- a/kpovmodeler/pmfogedit.cpp +++ b/kpovmodeler/pmfogedit.cpp @@ -22,15 +22,15 @@ #include "pmvectoredit.h" #include "pmcoloredit.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> #include <klocale.h> #include <kmessagebox.h> #include <kdialog.h> -PMFogEdit::PMFogEdit( QWidget* parent, const char* name ) +PMFogEdit::PMFogEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -38,73 +38,73 @@ PMFogEdit::PMFogEdit( QWidget* parent, const char* name ) void PMFogEdit::createTopWidgets( ) { - QHBoxLayout* hl; - QVBoxLayout* vl; - QGridLayout* gl; - QLabel* lbl; + TQHBoxLayout* hl; + TQVBoxLayout* vl; + TQGridLayout* gl; + TQLabel* lbl; Base::createTopWidgets( ); - lbl = new QLabel( i18n( "Fog type:" ), this ); - m_pFogTypeEdit = new QComboBox( this ); + lbl = new TQLabel( i18n( "Fog type:" ), this ); + m_pFogTypeEdit = new TQComboBox( this ); m_pFogTypeEdit->insertItem( i18n( "Constant" ) ); m_pFogTypeEdit->insertItem( i18n( "Ground" ) ); - hl = new QHBoxLayout( topLayout( ) ); + hl = new TQHBoxLayout( topLayout( ) ); hl->addWidget( lbl ); hl->addWidget( m_pFogTypeEdit ); hl->addStretch( 1 ); - lbl = new QLabel( i18n( "Distance:" ), this ); + lbl = new TQLabel( i18n( "Distance:" ), this ); m_pDistance = new PMFloatEdit( this ); - hl = new QHBoxLayout( topLayout( ) ); + hl = new TQHBoxLayout( topLayout( ) ); hl->addWidget( lbl ); hl->addWidget( m_pDistance ); hl->addStretch( 1 ); - lbl = new QLabel( i18n( "Color:" ), this ); + lbl = new TQLabel( i18n( "Color:" ), this ); m_pColor = new PMColorEdit( false, this ); - hl = new QHBoxLayout( topLayout( ) ); + hl = new TQHBoxLayout( topLayout( ) ); hl->addWidget( lbl ); hl->addWidget( m_pColor ); hl->addStretch( 1 ); - m_pTurbulenceCheck = new QCheckBox( i18n( "Turbulence" ), this ); + m_pTurbulenceCheck = new TQCheckBox( i18n( "Turbulence" ), this ); topLayout( )->addWidget( m_pTurbulenceCheck ); - m_pTurbulenceWidget = new QWidget( this ); - vl = new QVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) ); - hl = new QHBoxLayout( vl ); - lbl = new QLabel( i18n( "Value: " ), m_pTurbulenceWidget ); + m_pTurbulenceWidget = new TQWidget( this ); + vl = new TQVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) ); + hl = new TQHBoxLayout( vl ); + lbl = new TQLabel( i18n( "Value: " ), m_pTurbulenceWidget ); m_pTurbulenceVector = new PMVectorEdit( "x", "y", "z", m_pTurbulenceWidget); hl->addWidget( lbl ); hl->addWidget( m_pTurbulenceVector ); hl->addStretch( 1 ); - hl = new QHBoxLayout( vl ); - gl = new QGridLayout( hl, 4, 2 ); - lbl = new QLabel( i18n( "Octaves:" ), m_pTurbulenceWidget ); + hl = new TQHBoxLayout( vl ); + gl = new TQGridLayout( hl, 4, 2 ); + lbl = new TQLabel( i18n( "Octaves:" ), m_pTurbulenceWidget ); m_pOctaves = new PMIntEdit( m_pTurbulenceWidget ); gl->addWidget( lbl, 0, 0 ); gl->addWidget( m_pOctaves, 0, 1 ); - lbl = new QLabel( i18n( "Omega:" ), m_pTurbulenceWidget ); + lbl = new TQLabel( i18n( "Omega:" ), m_pTurbulenceWidget ); m_pOmega = new PMFloatEdit( m_pTurbulenceWidget ); gl->addWidget( lbl, 1, 0 ); gl->addWidget( m_pOmega, 1, 1 ); - lbl = new QLabel( i18n( "Lambda:" ), m_pTurbulenceWidget ); + lbl = new TQLabel( i18n( "Lambda:" ), m_pTurbulenceWidget ); m_pLambda = new PMFloatEdit( m_pTurbulenceWidget ); gl->addWidget( lbl, 2, 0 ); gl->addWidget( m_pLambda, 2, 1 ); - lbl = new QLabel( i18n( "Depth:" ), m_pTurbulenceWidget ); + lbl = new TQLabel( i18n( "Depth:" ), m_pTurbulenceWidget ); m_pDepth = new PMFloatEdit( m_pTurbulenceWidget ); gl->addWidget( lbl, 3, 0 ); gl->addWidget( m_pDepth, 3, 1 ); hl->addStretch( 1 ); topLayout( )->addWidget( m_pTurbulenceWidget ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 2, 2 ); - m_pFogOffsetLabel = new QLabel( i18n( "Offset: " ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 2, 2 ); + m_pFogOffsetLabel = new TQLabel( i18n( "Offset: " ), this ); m_pFogOffset = new PMFloatEdit( this ); - m_pFogAltLabel = new QLabel( i18n( "Altitude: " ), this ); + m_pFogAltLabel = new TQLabel( i18n( "Altitude: " ), this ); m_pFogAlt = new PMFloatEdit( this ); gl->addWidget( m_pFogOffsetLabel, 0, 0 ); gl->addWidget( m_pFogOffset, 0, 1 ); @@ -112,24 +112,24 @@ void PMFogEdit::createTopWidgets( ) gl->addWidget( m_pFogAlt, 1, 1 ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - m_pUpLabel = new QLabel( i18n( "Up: " ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pUpLabel = new TQLabel( i18n( "Up: " ), this ); m_pUp = new PMVectorEdit( "x", "y", "z", this ); hl->addWidget( m_pUpLabel ); hl->addWidget( m_pUp ); - connect( m_pFogTypeEdit, SIGNAL( activated( int ) ), SLOT( slotFogTypeChanged( int ) ) ); - connect( m_pDistance, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pColor, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pTurbulenceCheck, SIGNAL( clicked( ) ), SLOT( slotTurbulenceClicked( ) ) ); - connect( m_pTurbulenceVector, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOctaves, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOmega, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pLambda, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDepth, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFogOffset, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFogAlt, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pUp, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pFogTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotFogTypeChanged( int ) ) ); + connect( m_pDistance, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pColor, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pTurbulenceCheck, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotTurbulenceClicked( ) ) ); + connect( m_pTurbulenceVector, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOctaves, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOmega, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pLambda, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDepth, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFogOffset, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFogAlt, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pUp, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMFogEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmfogedit.h b/kpovmodeler/pmfogedit.h index 880b578c..5a33cf95 100644 --- a/kpovmodeler/pmfogedit.h +++ b/kpovmodeler/pmfogedit.h @@ -31,10 +31,10 @@ class PMVectorEdit; class PMFloatEdit; class PMIntEdit; class PMColorEdit; -class QCheckBox; -class QComboBox; -class QWidget; -class QLabel; +class TQCheckBox; +class TQComboBox; +class TQWidget; +class TQLabel; /** * Dialog edit class for @ref PMFog @@ -47,7 +47,7 @@ public: /** * Creates a PMFogEdit with parent and name */ - PMFogEdit( QWidget* parent, const char* name = 0 ); + PMFogEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -73,21 +73,21 @@ protected slots: private: PMFog* m_pDisplayedObject; - QComboBox* m_pFogTypeEdit; + TQComboBox* m_pFogTypeEdit; PMFloatEdit* m_pDistance; PMColorEdit* m_pColor; - QCheckBox* m_pTurbulenceCheck; - QWidget* m_pTurbulenceWidget; + TQCheckBox* m_pTurbulenceCheck; + TQWidget* m_pTurbulenceWidget; PMVectorEdit* m_pTurbulenceVector; PMIntEdit* m_pOctaves; PMFloatEdit* m_pOmega; PMFloatEdit* m_pLambda; PMFloatEdit* m_pDepth; - QLabel* m_pFogOffsetLabel; + TQLabel* m_pFogOffsetLabel; PMFloatEdit* m_pFogOffset; - QLabel* m_pFogAltLabel; + TQLabel* m_pFogAltLabel; PMFloatEdit* m_pFogAlt; - QLabel* m_pUpLabel; + TQLabel* m_pUpLabel; PMVectorEdit* m_pUp; }; diff --git a/kpovmodeler/pmformulalabel.cpp b/kpovmodeler/pmformulalabel.cpp index ac2e98d3..71ba62b6 100644 --- a/kpovmodeler/pmformulalabel.cpp +++ b/kpovmodeler/pmformulalabel.cpp @@ -18,36 +18,36 @@ #include "pmformulalabel.h" #include "pmpolynomexponents.h" -#include <qapplication.h> -#include <qsimplerichtext.h> -#include <qpainter.h> +#include <tqapplication.h> +#include <tqsimplerichtext.h> +#include <tqpainter.h> const int c_indent = 3; const int c_dotSize = 3; -QString PMFormulaLabel::s_xyz[3] = +TQString PMFormulaLabel::s_xyz[3] = { - QString( "x" ), QString( "y" ), QString( "z" ) + TQString( "x" ), TQString( "y" ), TQString( "z" ) }; -QString PMFormulaLabel::s_digit[10] = +TQString PMFormulaLabel::s_digit[10] = { - QString( "0" ), - QString( "1" ), - QString( "2" ), - QString( "3" ), - QString( "4" ), - QString( "5" ), - QString( "6" ), - QString( "7" ), - QString( "8" ), - QString( "9" ) + TQString( "0" ), + TQString( "1" ), + TQString( "2" ), + TQString( "3" ), + TQString( "4" ), + TQString( "5" ), + TQString( "6" ), + TQString( "7" ), + TQString( "8" ), + TQString( "9" ) }; -QString PMFormulaLabel::s_nullString = QString( "= 0" ); +TQString PMFormulaLabel::s_nullString = TQString( "= 0" ); -PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { m_exponents[0] = exp.exponent( 0 ); m_exponents[1] = exp.exponent( 1 ); @@ -56,8 +56,8 @@ PMFormulaLabel::PMFormulaLabel( const PMPolynomExponents& exp, QWidget* parent, calculateSizeHint( ); } -PMFormulaLabel::PMFormulaLabel( int x, int y, int z, QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMFormulaLabel::PMFormulaLabel( int x, int y, int z, TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { m_exponents[0] = x; m_exponents[1] = y; @@ -70,9 +70,9 @@ PMFormulaLabel::~PMFormulaLabel( ) { } -void PMFormulaLabel::drawContents( QPainter* p ) +void PMFormulaLabel::drawContents( TQPainter* p ) { - QRect cr = rect( ); + TQRect cr = rect( ); int i; cr.setLeft( cr.left( ) + c_indent ); @@ -84,13 +84,13 @@ void PMFormulaLabel::drawContents( QPainter* p ) // draw dot int center = ( cr.top( ) + cr.bottom( ) ) / 2; int rad = c_dotSize / 2; - p->setBrush( QBrush( colorGroup( ).text( ) ) ); + p->setBrush( TQBrush( colorGroup( ).text( ) ) ); p->drawEllipse( cr.left( ), center - rad, c_dotSize, c_dotSize ); cr.setLeft( cr.left( ) + c_dotSize + c_indent ); - QFontMetrics m1( font( ) ); - QFont f2 = exponentFont( ); - QFontMetrics m2( f2 ); + TQFontMetrics m1( font( ) ); + TQFont f2 = exponentFont( ); + TQFontMetrics m2( f2 ); int up = m1.height( ) / 2; for( i = 0; i < 3; i++ ) @@ -115,9 +115,9 @@ void PMFormulaLabel::drawContents( QPainter* p ) } } -void PMFormulaLabel::paintEvent( QPaintEvent* ev ) +void PMFormulaLabel::paintEvent( TQPaintEvent* ev ) { - QPainter paint( this ); + TQPainter paint( this ); if( ev->rect( ).intersects( rect( ) ) ) { paint.setClipRegion( ev->region( ).intersect( rect( ) ) ); @@ -129,12 +129,12 @@ void PMFormulaLabel::calculateSizeHint( ) { int sum = m_exponents[0] + m_exponents[1] + m_exponents[2]; - QFontMetrics m1( font( ) ); + TQFontMetrics m1( font( ) ); if( sum == 0 ) m_sizeHint.setWidth( m1.width( s_nullString ) ); else { - QFontMetrics m2( exponentFont( ) ); + TQFontMetrics m2( exponentFont( ) ); int width = c_indent * 3 + c_dotSize; int i; for( i = 0; i < 3; i++ ) @@ -151,25 +151,25 @@ void PMFormulaLabel::calculateSizeHint( ) m_sizeHint.setHeight( m1.height( ) + 7 ); } -QSize PMFormulaLabel::sizeHint( ) const +TQSize PMFormulaLabel::sizeHint( ) const { return minimumSizeHint( ); } -QSize PMFormulaLabel::minimumSizeHint( ) const +TQSize PMFormulaLabel::minimumSizeHint( ) const { return m_sizeHint; } -void PMFormulaLabel::fontChange( const QFont& ) +void PMFormulaLabel::fontChange( const TQFont& ) { calculateSizeHint( ); } -QFont PMFormulaLabel::exponentFont( ) const +TQFont PMFormulaLabel::exponentFont( ) const { - QFont small = font( ); + TQFont small = font( ); int fs = small.pointSize( ); if( fs > 0 ) { diff --git a/kpovmodeler/pmformulalabel.h b/kpovmodeler/pmformulalabel.h index 329ba639..ee2cace5 100644 --- a/kpovmodeler/pmformulalabel.h +++ b/kpovmodeler/pmformulalabel.h @@ -23,12 +23,12 @@ #include <config.h> #endif -#include <qwidget.h> +#include <tqwidget.h> class PMPolynomExponents; /** - * QLabel with a rich text to display a polynom for the quadric, + * TQLabel with a rich text to display a polynom for the quadric, * cubic, quartic and polynom objects. */ class PMFormulaLabel : public QWidget @@ -37,33 +37,33 @@ public: /** * Displays the exponents of the @ref PMPolynomExponents */ - PMFormulaLabel( const PMPolynomExponents& exp, QWidget* parent, const char* name = 0 ); + PMFormulaLabel( const PMPolynomExponents& exp, TQWidget* parent, const char* name = 0 ); /** * Displays the given exponents */ - PMFormulaLabel( int x, int y, int z, QWidget* parent, const char* name = 0 ); + PMFormulaLabel( int x, int y, int z, TQWidget* parent, const char* name = 0 ); /** * Destructor */ ~PMFormulaLabel( ); - virtual QSize sizeHint( ) const; - virtual QSize minimumSizeHint( ) const; + virtual TQSize sizeHint( ) const; + virtual TQSize minimumSizeHint( ) const; protected: - virtual void drawContents( QPainter* p ); - virtual void paintEvent( QPaintEvent* e ); - virtual void fontChange( const QFont& oldFont ); + virtual void drawContents( TQPainter* p ); + virtual void paintEvent( TQPaintEvent* e ); + virtual void fontChange( const TQFont& oldFont ); private: - QFont exponentFont( ) const; + TQFont exponentFont( ) const; void calculateSizeHint( ); - QSize m_sizeHint; + TQSize m_sizeHint; int m_exponents[3]; - static QString s_xyz[3]; - static QString s_digit[10]; - static QString s_nullString; + static TQString s_xyz[3]; + static TQString s_digit[10]; + static TQString s_nullString; }; #endif diff --git a/kpovmodeler/pmglobalphotons.cpp b/kpovmodeler/pmglobalphotons.cpp index 4a24855f..ddf32258 100644 --- a/kpovmodeler/pmglobalphotons.cpp +++ b/kpovmodeler/pmglobalphotons.cpp @@ -164,12 +164,12 @@ void PMGlobalPhotons::cleanUp( ) const Base::cleanUp( ); } -QString PMGlobalPhotons::description( ) const +TQString PMGlobalPhotons::description( ) const { return i18n( "global photons" ); } -void PMGlobalPhotons::serialize( QDomElement& e, QDomDocument& ) const +void PMGlobalPhotons::serialize( TQDomElement& e, TQDomDocument& ) const { if( m_numberType == Spacing ) { @@ -202,7 +202,7 @@ void PMGlobalPhotons::serialize( QDomElement& e, QDomDocument& ) const void PMGlobalPhotons::readAttributes( const PMXMLHelper& h ) { - QString str; + TQString str; str = h.stringAttribute( "number_type", "spacing" ); if( str == "count" ) @@ -437,7 +437,7 @@ void PMGlobalPhotons::setRadiusMediaMulti( double rmm ) } } -PMDialogEditBase* PMGlobalPhotons::editWidget( QWidget* parent ) const +PMDialogEditBase* PMGlobalPhotons::editWidget( TQWidget* parent ) const { return new PMGlobalPhotonsEdit( parent ); } diff --git a/kpovmodeler/pmglobalphotons.h b/kpovmodeler/pmglobalphotons.h index b56cc6b1..549e6efc 100644 --- a/kpovmodeler/pmglobalphotons.h +++ b/kpovmodeler/pmglobalphotons.h @@ -52,7 +52,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMGlobalPhotons( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -60,19 +60,19 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMGlobalPhotonsEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmglobalphotons" ); } + virtual TQString pixmap( ) const { return TQString( "pmglobalphotons" ); } /** * Returns the number type diff --git a/kpovmodeler/pmglobalphotonsedit.cpp b/kpovmodeler/pmglobalphotonsedit.cpp index e241f597..5a4a5572 100644 --- a/kpovmodeler/pmglobalphotonsedit.cpp +++ b/kpovmodeler/pmglobalphotonsedit.cpp @@ -20,16 +20,16 @@ #include "pmglobalphotons.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> #include <klocale.h> #include <kdialog.h> #include <kmessagebox.h> -PMGlobalPhotonsEdit::PMGlobalPhotonsEdit( QWidget* parent, const char* name ) +PMGlobalPhotonsEdit::PMGlobalPhotonsEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,15 +37,15 @@ PMGlobalPhotonsEdit::PMGlobalPhotonsEdit( QWidget* parent, const char* name ) void PMGlobalPhotonsEdit::createTopWidgets( ) { - QHBoxLayout* hl; - QGridLayout* gl; - QLabel* lbl; + TQHBoxLayout* hl; + TQGridLayout* gl; + TQLabel* lbl; Base::createTopWidgets( ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Photon numbers" ), this ); - m_pNumberType = new QComboBox( false, this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Photon numbers" ), this ); + m_pNumberType = new TQComboBox( false, this ); m_pNumberType->insertItem( i18n( "Spacing" ) ); m_pNumberType->insertItem( i18n( "Count" ) ); m_pSpacing = new PMFloatEdit( this ); @@ -58,128 +58,128 @@ void PMGlobalPhotonsEdit::createTopWidgets( ) hl->addWidget( m_pCount ); hl->addStretch( 1 ); - gl = new QGridLayout( topLayout( ), 2, 5 ); - lbl = new QLabel( i18n( "Gather" ), this ); + gl = new TQGridLayout( topLayout( ), 2, 5 ); + lbl = new TQLabel( i18n( "Gather" ), this ); gl->addWidget( lbl, 0, 0 ); - lbl = new QLabel( i18n( "Min:" ), this ); + lbl = new TQLabel( i18n( "Min:" ), this ); gl->addWidget( lbl, 0, 1 ); m_pGatherMin = new PMIntEdit( this ); m_pGatherMin->setValidation( true, 0, false, 0 ); gl->addWidget( m_pGatherMin, 0, 2 ); - lbl = new QLabel( i18n( "Max:" ), this ); + lbl = new TQLabel( i18n( "Max:" ), this ); gl->addWidget( lbl, 0, 3 ); m_pGatherMax = new PMIntEdit( this ); m_pGatherMax->setValidation( true, 0, false, 0 ); gl->addWidget( m_pGatherMax, 0, 4 ); - lbl = new QLabel( i18n( "Media" ), this ); + lbl = new TQLabel( i18n( "Media" ), this ); gl->addWidget( lbl, 1, 0 ); - lbl = new QLabel( i18n( "Max stop:" ), this ); + lbl = new TQLabel( i18n( "Max stop:" ), this ); gl->addWidget( lbl, 1, 1 ); m_pMediaMaxSteps = new PMIntEdit( this ); m_pMediaMaxSteps->setValidation( true, 0, false, 0 ); gl->addWidget( m_pMediaMaxSteps, 1, 2 ); - lbl = new QLabel( i18n( "Factor:" ), this ); + lbl = new TQLabel( i18n( "Factor:" ), this ); gl->addWidget( lbl,1, 3 ); m_pMediaFactor = new PMFloatEdit( this ); m_pMediaFactor->setValidation( true, 0, false, 0 ); gl->addWidget( m_pMediaFactor, 1, 4 ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Jitter:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Jitter:" ), this ); m_pJitter = new PMFloatEdit( this ); m_pJitter->setValidation ( true, 0, false, 0 ); hl->addWidget( lbl ); hl->addWidget( m_pJitter ); hl->addStretch( 1 ); - gl = new QGridLayout( topLayout( ), 2, 3 ); - lbl = new QLabel( i18n( "Max trace level:" ), this ); + gl = new TQGridLayout( topLayout( ), 2, 3 ); + lbl = new TQLabel( i18n( "Max trace level:" ), this ); m_pMaxTraceLevel = new PMIntEdit ( this ); m_pMaxTraceLevel->setValidation( true, 0, false, 0 ); - m_pMaxTraceLevelGlobal = new QCheckBox( i18n( "Use global" ), this ); + m_pMaxTraceLevelGlobal = new TQCheckBox( i18n( "Use global" ), this ); gl->addWidget( lbl, 0, 0 ); gl->addWidget( m_pMaxTraceLevel, 0, 1 ); gl->addWidget( m_pMaxTraceLevelGlobal, 0, 2 ); - lbl = new QLabel( i18n( "Adc bailout:" ), this ); + lbl = new TQLabel( i18n( "Adc bailout:" ), this ); m_pAdcBailout = new PMFloatEdit ( this ); m_pAdcBailout->setValidation( true, 0, true, 1 ); - m_pAdcBailoutGlobal = new QCheckBox( i18n( "Use global" ), this ); + m_pAdcBailoutGlobal = new TQCheckBox( i18n( "Use global" ), this ); gl->addWidget( lbl, 1, 0 ); gl->addWidget( m_pAdcBailout, 1, 1 ); gl->addWidget( m_pAdcBailoutGlobal, 1, 2 ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Autostop:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Autostop:" ), this ); m_pAutostop = new PMFloatEdit ( this ); m_pAutostop->setValidation( true, 0, true, 1 ); hl->addWidget( lbl ); hl->addWidget( m_pAutostop ); hl->addStretch( 1 ); - gl = new QGridLayout( topLayout( ), 3, 5 ); - lbl = new QLabel( i18n( "Expand" ), this ); + gl = new TQGridLayout( topLayout( ), 3, 5 ); + lbl = new TQLabel( i18n( "Expand" ), this ); gl->addWidget( lbl, 0, 0 ); - lbl = new QLabel( i18n( "Increase:" ), this ); + lbl = new TQLabel( i18n( "Increase:" ), this ); gl->addWidget( lbl, 0, 1 ); m_pExpandIncrease = new PMFloatEdit( this ); m_pExpandIncrease->setValidation( true, 0, true, 1 ); gl->addWidget( m_pExpandIncrease, 0, 2 ); - lbl = new QLabel( i18n( "Minimum:" ), this ); + lbl = new TQLabel( i18n( "Minimum:" ), this ); gl->addWidget( lbl, 0, 3 ); m_pExpandMin = new PMIntEdit( this ); m_pExpandMin->setValidation( true, 0, false, 0 ); gl->addWidget( m_pExpandMin, 0, 4 ); - lbl = new QLabel( i18n( "Gather" ), this ); + lbl = new TQLabel( i18n( "Gather" ), this ); gl->addWidget( lbl, 1, 0 ); - lbl = new QLabel( i18n( "Radius:" ), this ); + lbl = new TQLabel( i18n( "Radius:" ), this ); gl->addWidget( lbl, 1, 1 ); m_pRadiusGather = new PMFloatEdit( this ); m_pRadiusGather->setValidation( true, 0, false, 0 ); gl->addWidget( m_pRadiusGather, 1, 2 ); - lbl = new QLabel( i18n( "Multiplier:" ), this ); + lbl = new TQLabel( i18n( "Multiplier:" ), this ); gl->addWidget( lbl, 1, 3 ); m_pRadiusGatherMulti = new PMFloatEdit( this ); m_pRadiusGatherMulti->setValidation( true, 0, false, 0 ); gl->addWidget( m_pRadiusGatherMulti, 1, 4 ); - lbl = new QLabel( i18n( "Media" ), this ); + lbl = new TQLabel( i18n( "Media" ), this ); gl->addWidget( lbl, 2, 0 ); - lbl = new QLabel( i18n( "Radius:" ), this ); + lbl = new TQLabel( i18n( "Radius:" ), this ); gl->addWidget( lbl, 2, 1 ); m_pRadiusMedia = new PMFloatEdit( this ); m_pRadiusMedia->setValidation( true, 0, false, 0 ); gl->addWidget( m_pRadiusMedia, 2, 2 ); - lbl = new QLabel( i18n( "Multiplier:" ), this ); + lbl = new TQLabel( i18n( "Multiplier:" ), this ); gl->addWidget( lbl, 2, 3 ); m_pRadiusMediaMulti = new PMFloatEdit( this ); m_pRadiusMediaMulti->setValidation( true, 0, false, 0 ); gl->addWidget( m_pRadiusMediaMulti, 2, 4 ); - connect( m_pNumberType, SIGNAL( activated( int ) ), - SLOT( slotNumberTypeActivated( int ) ) ); - connect( m_pSpacing, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCount, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pGatherMin, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pGatherMax, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMediaMaxSteps, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMediaFactor, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pJitter, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMaxTraceLevelGlobal, SIGNAL( clicked( ) ), - SLOT( slotMaxTraceLevelGlobalClicked( ) ) ); - connect( m_pMaxTraceLevel, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAdcBailoutGlobal, SIGNAL( clicked( ) ), - SLOT( slotAdcBailoutGlobalClicked( ) ) ); - connect( m_pAdcBailout, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAutostop, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pExpandIncrease, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) ); - connect( m_pExpandMin, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) ); - connect( m_pRadiusGather, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) ); - connect( m_pRadiusGatherMulti, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) ); - connect( m_pRadiusMedia, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) ); - connect( m_pRadiusMediaMulti, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) ); + connect( m_pNumberType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotNumberTypeActivated( int ) ) ); + connect( m_pSpacing, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCount, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pGatherMin, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pGatherMax, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMediaMaxSteps, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMediaFactor, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pJitter, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMaxTraceLevelGlobal, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotMaxTraceLevelGlobalClicked( ) ) ); + connect( m_pMaxTraceLevel, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAdcBailoutGlobal, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotAdcBailoutGlobalClicked( ) ) ); + connect( m_pAdcBailout, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAutostop, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pExpandIncrease, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) ); + connect( m_pExpandMin, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) ); + connect( m_pRadiusGather, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) ); + connect( m_pRadiusGatherMulti, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) ); + connect( m_pRadiusMedia, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) ); + connect( m_pRadiusMediaMulti, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) ); } void PMGlobalPhotonsEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmglobalphotonsedit.h b/kpovmodeler/pmglobalphotonsedit.h index ec06f749..e2ae8f7b 100644 --- a/kpovmodeler/pmglobalphotonsedit.h +++ b/kpovmodeler/pmglobalphotonsedit.h @@ -29,8 +29,8 @@ class PMGlobalPhotons; class PMFloatEdit; class PMIntEdit; -class QComboBox; -class QCheckBox; +class TQComboBox; +class TQCheckBox; /** * Dialog edit class for @ref PMGlobalPhotons. @@ -43,7 +43,7 @@ public: /** * Creates a PMGlobalPhotonsEdit with parent and name */ - PMGlobalPhotonsEdit( QWidget* parent, const char* name = 0 ); + PMGlobalPhotonsEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -73,7 +73,7 @@ protected slots: private: PMGlobalPhotons* m_pDisplayedObject; - QComboBox* m_pNumberType; + TQComboBox* m_pNumberType; PMFloatEdit* m_pSpacing; PMIntEdit* m_pCount; PMIntEdit* m_pGatherMin; @@ -81,9 +81,9 @@ private: PMIntEdit* m_pMediaMaxSteps; PMFloatEdit* m_pMediaFactor; PMFloatEdit* m_pJitter; - QCheckBox* m_pMaxTraceLevelGlobal; + TQCheckBox* m_pMaxTraceLevelGlobal; PMIntEdit* m_pMaxTraceLevel; - QCheckBox* m_pAdcBailoutGlobal; + TQCheckBox* m_pAdcBailoutGlobal; PMFloatEdit* m_pAdcBailout; PMFloatEdit* m_pAutostop; PMFloatEdit* m_pExpandIncrease; diff --git a/kpovmodeler/pmglobals.h b/kpovmodeler/pmglobals.h index 0a50b2b6..4e59547c 100644 --- a/kpovmodeler/pmglobals.h +++ b/kpovmodeler/pmglobals.h @@ -19,8 +19,8 @@ #define PMGLOBALS_H #ifdef PMEnableSimpleProfiling -#include <qdatetime.h> -extern QTime PMDebugTime; +#include <tqdatetime.h> +extern TQTime PMDebugTime; #endif #define PMArea 0 // no area for debug messages yet diff --git a/kpovmodeler/pmglobalsettings.cpp b/kpovmodeler/pmglobalsettings.cpp index a4740378..efa7db36 100644 --- a/kpovmodeler/pmglobalsettings.cpp +++ b/kpovmodeler/pmglobalsettings.cpp @@ -168,12 +168,12 @@ void PMGlobalSettings::cleanUp( ) const Base::cleanUp( ); } -QString PMGlobalSettings::description( ) const +TQString PMGlobalSettings::description( ) const { return i18n( "global settings" ); } -void PMGlobalSettings::serialize( QDomElement& e, QDomDocument& doc ) const +void PMGlobalSettings::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "adc_bailout", m_adcBailout ); e.setAttribute( "ambient_light", m_ambientLight.serializeXML( ) ); @@ -211,7 +211,7 @@ void PMGlobalSettings::serialize( QDomElement& e, QDomDocument& doc ) const void PMGlobalSettings::readAttributes( const PMXMLHelper& h ) { - QString str; + TQString str; m_adcBailout = h.doubleAttribute( "adc_bailout", adcBailoutDefault ); m_ambientLight = h.colorAttribute( "ambient_light", ambientLightDefault ); @@ -432,7 +432,7 @@ void PMGlobalSettings::setRecursionLimit( int c ) } } -PMDialogEditBase* PMGlobalSettings::editWidget( QWidget* parent ) const +PMDialogEditBase* PMGlobalSettings::editWidget( TQWidget* parent ) const { return new PMGlobalSettingsEdit( parent ); } diff --git a/kpovmodeler/pmglobalsettings.h b/kpovmodeler/pmglobalsettings.h index e552293e..a95f86d7 100644 --- a/kpovmodeler/pmglobalsettings.h +++ b/kpovmodeler/pmglobalsettings.h @@ -53,7 +53,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMGlobalSettings( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -61,19 +61,19 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMGlobalSettingsEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmglobalsettings" ); } + virtual TQString pixmap( ) const { return TQString( "pmglobalsettings" ); } /** * Returns the adc bailout diff --git a/kpovmodeler/pmglobalsettingsedit.cpp b/kpovmodeler/pmglobalsettingsedit.cpp index 8a297738..7c8eddad 100644 --- a/kpovmodeler/pmglobalsettingsedit.cpp +++ b/kpovmodeler/pmglobalsettingsedit.cpp @@ -21,15 +21,15 @@ #include "pmlineedits.h" #include "pmcoloredit.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> #include <klocale.h> #include <kdialog.h> #include <kmessagebox.h> -PMGlobalSettingsEdit::PMGlobalSettingsEdit( QWidget* parent, const char* name ) +PMGlobalSettingsEdit::PMGlobalSettingsEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,58 +37,58 @@ PMGlobalSettingsEdit::PMGlobalSettingsEdit( QWidget* parent, const char* name ) void PMGlobalSettingsEdit::createTopWidgets( ) { - QHBoxLayout* hl; - QLabel* lbl; + TQHBoxLayout* hl; + TQLabel* lbl; Base::createTopWidgets( ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Adc bailout:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Adc bailout:" ), this ); m_pAdcBailoutEdit = new PMFloatEdit( this ); hl->addWidget( lbl ); hl->addWidget( m_pAdcBailoutEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Ambient light:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Ambient light:" ), this ); m_pAmbientLightEdit = new PMColorEdit( false, this ); topLayout( )->addWidget( lbl ); topLayout( )->addWidget( m_pAmbientLightEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Assumed gamma:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Assumed gamma:" ), this ); m_pAssumedGammaEdit = new PMFloatEdit( this ); hl->addWidget( lbl ); hl->addWidget( m_pAssumedGammaEdit ); hl->addStretch( 1 ); - m_pHfGray16Edit = new QCheckBox( i18n( "Hf gray 16" ), this ); + m_pHfGray16Edit = new TQCheckBox( i18n( "Hf gray 16" ), this ); topLayout( )->addWidget( m_pHfGray16Edit ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Iridiscence wave length:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Iridiscence wave length:" ), this ); m_pIridWaveLengthEdit = new PMColorEdit( false, this ); topLayout( )->addWidget( lbl ); topLayout( )->addWidget( m_pIridWaveLengthEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - QGridLayout* layout = new QGridLayout( hl, 4, 2 ); - lbl = new QLabel( i18n( "Maximum intersections:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + TQGridLayout* layout = new TQGridLayout( hl, 4, 2 ); + lbl = new TQLabel( i18n( "Maximum intersections:" ), this ); m_pMaxIntersectionsEdit = new PMIntEdit( this ); layout->addWidget( lbl, 0, 0 ); layout->addWidget( m_pMaxIntersectionsEdit, 0, 1 ); - lbl = new QLabel( i18n( "Maximum trace level:" ), this ); + lbl = new TQLabel( i18n( "Maximum trace level:" ), this ); m_pMaxTraceLevelEdit = new PMIntEdit( this ); layout->addWidget( lbl, 1, 0 ); layout->addWidget( m_pMaxTraceLevelEdit, 1, 1 ); - lbl = new QLabel( i18n( "Number of waves:" ), this ); + lbl = new TQLabel( i18n( "Number of waves:" ), this ); m_pNumberWavesEdit = new PMIntEdit( this ); layout->addWidget( lbl, 2, 0 ); layout->addWidget( m_pNumberWavesEdit, 2, 1 ); - lbl = new QLabel( i18n( "Noise generator:" ), this ); - m_pNoiseGeneratorEdit = new QComboBox( false, this ); + lbl = new TQLabel( i18n( "Noise generator:" ), this ); + m_pNoiseGeneratorEdit = new TQComboBox( false, this ); m_pNoiseGeneratorEdit->insertItem( i18n( "Original" ) ); m_pNoiseGeneratorEdit->insertItem( i18n( "Range Corrected" ) ); m_pNoiseGeneratorEdit->insertItem( i18n( "Perlin" ) ); @@ -96,45 +96,45 @@ void PMGlobalSettingsEdit::createTopWidgets( ) layout->addWidget( m_pNoiseGeneratorEdit, 3, 1 ); hl->addStretch( 1 ); - m_pRadiosityEdit = new QCheckBox( i18n( "Radiosity (Povray 3.1)" ), this ); + m_pRadiosityEdit = new TQCheckBox( i18n( "Radiosity (Povray 3.1)" ), this ); topLayout( )->addWidget( m_pRadiosityEdit ); - m_pRadiosityWidget = new QWidget( this ); - hl = new QHBoxLayout( m_pRadiosityWidget, 0, KDialog::spacingHint( ) ); - layout = new QGridLayout( hl, 7, 2 ); - lbl = new QLabel( i18n( "Brightness:" ), m_pRadiosityWidget ); + m_pRadiosityWidget = new TQWidget( this ); + hl = new TQHBoxLayout( m_pRadiosityWidget, 0, KDialog::spacingHint( ) ); + layout = new TQGridLayout( hl, 7, 2 ); + lbl = new TQLabel( i18n( "Brightness:" ), m_pRadiosityWidget ); m_pBrightnessEdit = new PMFloatEdit( m_pRadiosityWidget ); layout->addWidget( lbl, 0, 0 ); layout->addWidget( m_pBrightnessEdit, 0, 1 ); - lbl = new QLabel( i18n( "Count:" ), m_pRadiosityWidget ); + lbl = new TQLabel( i18n( "Count:" ), m_pRadiosityWidget ); m_pCountEdit = new PMIntEdit( m_pRadiosityWidget ); layout->addWidget( lbl, 1, 0 ); layout->addWidget( m_pCountEdit, 1, 1 ); - lbl = new QLabel( i18n( "Maximum distance:" ), m_pRadiosityWidget ); + lbl = new TQLabel( i18n( "Maximum distance:" ), m_pRadiosityWidget ); m_pDistanceMaximumEdit = new PMFloatEdit( m_pRadiosityWidget ); layout->addWidget( lbl, 2, 0 ); layout->addWidget( m_pDistanceMaximumEdit, 2, 1 ); - lbl = new QLabel( i18n( "Error boundary:" ), m_pRadiosityWidget ); + lbl = new TQLabel( i18n( "Error boundary:" ), m_pRadiosityWidget ); m_pErrorBoundEdit = new PMFloatEdit( m_pRadiosityWidget ); layout->addWidget( lbl, 3, 0 ); layout->addWidget( m_pErrorBoundEdit, 3, 1 ); - lbl = new QLabel( i18n( "Gray threshold:" ), m_pRadiosityWidget ); + lbl = new TQLabel( i18n( "Gray threshold:" ), m_pRadiosityWidget ); m_pGrayThresholdEdit = new PMFloatEdit( m_pRadiosityWidget ); layout->addWidget( lbl, 4, 0 ); layout->addWidget( m_pGrayThresholdEdit, 4, 1 ); - lbl = new QLabel( i18n( "Low error factor:" ), m_pRadiosityWidget ); + lbl = new TQLabel( i18n( "Low error factor:" ), m_pRadiosityWidget ); m_pLowErrorFactorEdit = new PMFloatEdit( m_pRadiosityWidget ); layout->addWidget( lbl, 5, 0 ); layout->addWidget( m_pLowErrorFactorEdit, 5, 1 ); - lbl = new QLabel( i18n( "Minimum reuse:" ), m_pRadiosityWidget ); + lbl = new TQLabel( i18n( "Minimum reuse:" ), m_pRadiosityWidget ); m_pMinimumReuseEdit = new PMFloatEdit( m_pRadiosityWidget ); layout->addWidget( lbl, 6, 0 ); layout->addWidget( m_pMinimumReuseEdit, 6, 1 ); - lbl = new QLabel( i18n( "Nearest count:" ), m_pRadiosityWidget ); + lbl = new TQLabel( i18n( "Nearest count:" ), m_pRadiosityWidget ); m_pNearestCountEdit = new PMIntEdit( m_pRadiosityWidget ); layout->addWidget( lbl, 7, 0 ); layout->addWidget( m_pNearestCountEdit, 7, 1 ); - lbl = new QLabel( i18n( "Recursion limit:" ), m_pRadiosityWidget ); + lbl = new TQLabel( i18n( "Recursion limit:" ), m_pRadiosityWidget ); m_pRecursionLimitEdit = new PMIntEdit( m_pRadiosityWidget ); layout->addWidget( lbl, 8, 0 ); layout->addWidget( m_pRecursionLimitEdit, 8, 1 ); @@ -142,25 +142,25 @@ void PMGlobalSettingsEdit::createTopWidgets( ) topLayout( )->addWidget( m_pRadiosityWidget ); - connect( m_pAdcBailoutEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAmbientLightEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAssumedGammaEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pHfGray16Edit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pIridWaveLengthEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMaxIntersectionsEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMaxTraceLevelEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pNumberWavesEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pNoiseGeneratorEdit, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRadiosityEdit, SIGNAL( clicked( ) ), SLOT( slotRadiosityClicked( ) ) ); - connect( m_pBrightnessEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCountEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDistanceMaximumEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pErrorBoundEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pGrayThresholdEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pLowErrorFactorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMinimumReuseEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pNearestCountEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRecursionLimitEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pAdcBailoutEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAmbientLightEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAssumedGammaEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pHfGray16Edit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pIridWaveLengthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMaxIntersectionsEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMaxTraceLevelEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pNumberWavesEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pNoiseGeneratorEdit, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRadiosityEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRadiosityClicked( ) ) ); + connect( m_pBrightnessEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCountEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDistanceMaximumEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pErrorBoundEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pGrayThresholdEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pLowErrorFactorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMinimumReuseEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pNearestCountEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRecursionLimitEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMGlobalSettingsEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmglobalsettingsedit.h b/kpovmodeler/pmglobalsettingsedit.h index 2a439617..df0f99b0 100644 --- a/kpovmodeler/pmglobalsettingsedit.h +++ b/kpovmodeler/pmglobalsettingsedit.h @@ -30,8 +30,8 @@ class PMGlobalSettings; class PMColorEdit; class PMFloatEdit; class PMIntEdit; -class QCheckBox; -class QComboBox; +class TQCheckBox; +class TQComboBox; /** * Dialog edit class for @ref PMGlobalSettings. @@ -44,7 +44,7 @@ public: /** * Creates a PMGlobalSettingsEdit with parent and name */ - PMGlobalSettingsEdit( QWidget* parent, const char* name = 0 ); + PMGlobalSettingsEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -70,14 +70,14 @@ private: PMFloatEdit* m_pAdcBailoutEdit; PMColorEdit* m_pAmbientLightEdit; PMFloatEdit* m_pAssumedGammaEdit; - QCheckBox* m_pHfGray16Edit; + TQCheckBox* m_pHfGray16Edit; PMColorEdit* m_pIridWaveLengthEdit; PMIntEdit* m_pMaxIntersectionsEdit; PMIntEdit* m_pMaxTraceLevelEdit; PMIntEdit* m_pNumberWavesEdit; - QComboBox* m_pNoiseGeneratorEdit; - QCheckBox* m_pRadiosityEdit; - QWidget* m_pRadiosityWidget; + TQComboBox* m_pNoiseGeneratorEdit; + TQCheckBox* m_pRadiosityEdit; + TQWidget* m_pRadiosityWidget; PMFloatEdit* m_pBrightnessEdit; PMIntEdit* m_pCountEdit; PMFloatEdit* m_pDistanceMaximumEdit; diff --git a/kpovmodeler/pmglview.cpp b/kpovmodeler/pmglview.cpp index 43102de9..e4a53088 100644 --- a/kpovmodeler/pmglview.cpp +++ b/kpovmodeler/pmglview.cpp @@ -25,16 +25,16 @@ #include "pmdefaults.h" #include <math.h> -#include <qpopupmenu.h> -#include <qpainter.h> -#include <qapplication.h> -#include <qcursor.h> -#include <qcolor.h> -#include <qglobal.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qdom.h> +#include <tqpopupmenu.h> +#include <tqpainter.h> +#include <tqapplication.h> +#include <tqcursor.h> +#include <tqcolor.h> +#include <tqglobal.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqdom.h> #include <kxmlguifactory.h> #include <kaction.h> @@ -106,7 +106,7 @@ bool PMGLView::s_bDirect = true; PMGLView::PMGLView( PMPart* part, PMViewType t, - QWidget* parent, const char* name, WFlags f ) + TQWidget* parent, const char* name, WFlags f ) : PMViewBase( parent, name, f | Qt::WWinOwnDC | Qt::WRepaintNoErase ) { m_pPart = part; @@ -150,33 +150,33 @@ PMGLView::PMGLView( PMPart* part, PMViewType t, setMinimumSize( 50, 50 ); - connect( part, SIGNAL( refresh( ) ), SLOT( slotRefresh( ) ) ); - connect( part, SIGNAL( clear( ) ), SLOT( slotClear( ) ) ); + connect( part, TQT_SIGNAL( refresh( ) ), TQT_SLOT( slotRefresh( ) ) ); + connect( part, TQT_SIGNAL( clear( ) ), TQT_SLOT( slotClear( ) ) ); - connect( this, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ), - part, SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) ); - connect( part, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ), - SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) ); + connect( this, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ), + part, TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) ); + connect( part, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ), + TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) ); - connect( part, SIGNAL( activeRenderModeChanged( ) ), - SLOT( slotActiveRenderModeChanged( ) ) ); + connect( part, TQT_SIGNAL( activeRenderModeChanged( ) ), + TQT_SLOT( slotActiveRenderModeChanged( ) ) ); - connect( &m_startTimer, SIGNAL( timeout( ) ), - SLOT( slotMouseChangeTimer( ) ) ); - connect( &m_autoScrollTimer, SIGNAL( timeout( ) ), - SLOT( slotAutoScroll( ) ) ); + connect( &m_startTimer, TQT_SIGNAL( timeout( ) ), + TQT_SLOT( slotMouseChangeTimer( ) ) ); + connect( &m_autoScrollTimer, TQT_SIGNAL( timeout( ) ), + TQT_SLOT( slotAutoScroll( ) ) ); - connect( rm, SIGNAL( renderingStarted( PMGLView* ) ), - SLOT( slotRenderingStarted( PMGLView* ) ) ); - connect( rm, SIGNAL( aboutToUpdate( PMGLView* ) ), - SLOT( slotAboutToUpdate( PMGLView* ) ) ); - connect( rm, SIGNAL( renderingFinished( PMGLView* ) ), - SLOT( slotRenderingFinished( PMGLView* ) ) ); - connect( rm, SIGNAL( renderingSettingsChanged( ) ), - SLOT( slotRefresh( ) ) ); + connect( rm, TQT_SIGNAL( renderingStarted( PMGLView* ) ), + TQT_SLOT( slotRenderingStarted( PMGLView* ) ) ); + connect( rm, TQT_SIGNAL( aboutToUpdate( PMGLView* ) ), + TQT_SLOT( slotAboutToUpdate( PMGLView* ) ) ); + connect( rm, TQT_SIGNAL( renderingFinished( PMGLView* ) ), + TQT_SLOT( slotRenderingFinished( PMGLView* ) ) ); + connect( rm, TQT_SIGNAL( renderingSettingsChanged( ) ), + TQT_SLOT( slotRefresh( ) ) ); - connect( this, SIGNAL( controlPointMessage( const QString& ) ), - m_pPart, SIGNAL( controlPointMessage( const QString& ) ) ); + connect( this, TQT_SIGNAL( controlPointMessage( const TQString& ) ), + m_pPart, TQT_SIGNAL( controlPointMessage( const TQString& ) ) ); updateControlPoints( ); } @@ -206,10 +206,10 @@ void PMGLView::initializeGL( ) // check if we can use the global colormap // should be the default ? if( vi->visualid == - XVisualIDFromVisual( ( Visual* ) QPaintDevice::x11AppVisual( ) ) ) + XVisualIDFromVisual( ( Visual* ) TQPaintDevice::x11AppVisual( ) ) ) { kdDebug( PMArea ) << "PMGLView: Default colormap used\n"; - s_pSharedData->m_colormap = QPaintDevice::x11AppColormap(); + s_pSharedData->m_colormap = TQPaintDevice::x11AppColormap(); s_pSharedData->m_colormapAllocated = false; } @@ -312,7 +312,7 @@ void PMGLView::initializeGL( ) Window p; p = RootWindow( display, vi->screen ); - QWidget* pw = parentWidget( ); + TQWidget* pw = parentWidget( ); if( pw ) p = pw->winId( ); @@ -365,8 +365,8 @@ void PMGLView::initializeGL( ) } else { - QVBoxLayout* topLayout = new QVBoxLayout( this ); - QLabel* label = new QLabel( i18n( "No OpenGL support" ), this ); + TQVBoxLayout* topLayout = new TQVBoxLayout( this ); + TQLabel* label = new TQLabel( i18n( "No OpenGL support" ), this ); label->setAlignment( Qt::AlignCenter ); topLayout->addWidget( label ); } @@ -424,12 +424,12 @@ void PMGLView::setTranslationY( double d ) invalidateProjection( ); } -void PMGLView::resizeEvent( QResizeEvent* ) +void PMGLView::resizeEvent( TQResizeEvent* ) { invalidateProjection( ); } -void PMGLView::paintEvent( QPaintEvent* ) +void PMGLView::paintEvent( TQPaintEvent* ) { repaint( ); } @@ -503,7 +503,7 @@ void PMGLView::enableScaleMode( bool yes ) } } -void PMGLView::mousePressEvent( QMouseEvent* e ) +void PMGLView::mousePressEvent( TQMouseEvent* e ) { if( m_bScaleMode || m_bTranslateMode ) { @@ -550,7 +550,7 @@ void PMGLView::mousePressEvent( QMouseEvent* e ) m_bGraphicalChangeMode = true; m_bMementoCreated = false; m_changeStartPos = e->pos( ); - m_changeStartTime = QTime::currentTime( ); + m_changeStartTime = TQTime::currentTime( ); m_currentMousePos = m_changeStartPos; m_startTimer.start( c_mouseChangeDelayMs, true ); } @@ -606,7 +606,7 @@ void PMGLView::mousePressEvent( QMouseEvent* e ) } } -void PMGLView::mouseReleaseEvent( QMouseEvent* e ) +void PMGLView::mouseReleaseEvent( TQMouseEvent* e ) { m_bMousePressed = false; if( m_bGraphicalChangeMode ) @@ -640,7 +640,7 @@ void PMGLView::mouseReleaseEvent( QMouseEvent* e ) { int sx, sy, ex, ey, w, h; double isx, isy, iex, iey; - QPtrListIterator<PMVector> pit( m_controlPointsPosition ); + TQPtrListIterator<PMVector> pit( m_controlPointsPosition ); PMControlPointListIterator cit( m_controlPoints ); PMVector p; @@ -677,14 +677,14 @@ void PMGLView::mouseReleaseEvent( QMouseEvent* e ) m_autoScrollTimer.stop( ); } - if( e->button( ) & QEvent::MidButton ) + if( e->button( ) & TQEvent::MidButton ) m_bMidMousePressed = false; m_bSelectUnderMouse = false; m_bDeselectUnderMouse = false; } -void PMGLView::mouseMoveEvent( QMouseEvent* e ) +void PMGLView::mouseMoveEvent( TQMouseEvent* e ) { if( m_bMousePressed ) { @@ -722,8 +722,8 @@ void PMGLView::mouseMoveEvent( QMouseEvent* e ) m_currentMousePos = e->pos( ); if( !m_bMementoCreated ) { - QPoint movement = e->pos( ) - m_changeStartPos; - if( ( m_changeStartTime.msecsTo( QTime::currentTime( ) ) > c_mouseChangeDelayMs ) + TQPoint movement = e->pos( ) - m_changeStartPos; + if( ( m_changeStartTime.msecsTo( TQTime::currentTime( ) ) > c_mouseChangeDelayMs ) || ( movement.manhattanLength( ) > c_mouseChangeDelayPixel ) ) { m_startTimer.stop( ); @@ -780,7 +780,7 @@ void PMGLView::mouseMoveEvent( QMouseEvent* e ) if( m_bAutoScroll && !as ) { - m_lastAutoScrollUpdate = QTime::currentTime( ); + m_lastAutoScrollUpdate = TQTime::currentTime( ); m_autoScrollTimer.start( c_minAutoScrollUpdateTime, true ); } if( !m_bAutoScroll && as ) @@ -788,7 +788,7 @@ void PMGLView::mouseMoveEvent( QMouseEvent* e ) } } -void PMGLView::wheelEvent( QWheelEvent* e ) +void PMGLView::wheelEvent( TQWheelEvent* e ) { if( m_type != PMViewCamera ) { @@ -803,7 +803,7 @@ void PMGLView::wheelEvent( QWheelEvent* e ) } } -void PMGLView::keyPressEvent( QKeyEvent* e ) +void PMGLView::keyPressEvent( TQKeyEvent* e ) { bool accept = true; @@ -867,7 +867,7 @@ void PMGLView::slotAutoScroll( ) { if( m_bAutoScroll ) { - QTime now = QTime::currentTime( ); + TQTime now = TQTime::currentTime( ); int msecs = m_lastAutoScrollUpdate.msecsTo( now ); int pixels = ( int ) ( m_autoScrollSpeed * msecs / 1000.0 ); @@ -890,7 +890,7 @@ void PMGLView::slotAutoScroll( ) if( m_bGraphicalChangeMode ) if( m_bMultipleSelectionMode ) { - m_selectionStart += QPoint( pixels * m_autoScrollDirectionX, + m_selectionStart += TQPoint( pixels * m_autoScrollDirectionX, pixels * m_autoScrollDirectionY ); saveSelectionBox( ); @@ -898,7 +898,7 @@ void PMGLView::slotAutoScroll( ) } if( m_bGraphicalChangeMode ) - graphicalChange( mapFromGlobal( QCursor::pos( ) ) ); + graphicalChange( mapFromGlobal( TQCursor::pos( ) ) ); else repaint( ); @@ -918,7 +918,7 @@ void PMGLView::slotMouseChangeTimer( ) } } -void PMGLView::startChange( const QPoint& mousePos ) +void PMGLView::startChange( const TQPoint& mousePos ) { m_pActiveObject->createMemento( ); m_bMementoCreated = true; @@ -937,7 +937,7 @@ void PMGLView::startChange( const QPoint& mousePos ) m_pUnderMouse->startChange( p, m_normal ); } -void PMGLView::graphicalChange( const QPoint& mousePos ) +void PMGLView::graphicalChange( const TQPoint& mousePos ) { PMVector p = mousePosition( m_pUnderMouse, mousePos.x( ), mousePos.y( ) ); p.transform( m_inversePointsTransformation ); @@ -1145,7 +1145,7 @@ void PMGLView::slotStopRendering( ) } void PMGLView::slotObjectChanged( PMObject* obj, const int mode, - QObject* sender ) + TQObject* sender ) { bool redraw = false; @@ -1414,7 +1414,7 @@ void PMGLView::paintSelectionBox( ) { int sx, sy, ex, ey, w, h; calculateSelectionBox( sx, sy, ex, ey, w, h ); - QPainter p; + TQPainter p; p.begin( this ); p.setPen( PMRenderManager::theManager( )->controlPointColor( 1 ) ); p.drawRect( sx, sy, w, h ); @@ -1484,7 +1484,7 @@ void PMGLView::slotRenderingFinished( PMGLView* view ) if( m_bAutoScroll ) { - QTime now = QTime::currentTime( ); + TQTime now = TQTime::currentTime( ); int msecs = m_lastAutoScrollUpdate.msecsTo( now ); if( msecs < c_minAutoScrollUpdateTime ) @@ -1495,9 +1495,9 @@ void PMGLView::slotRenderingFinished( PMGLView* view ) } } -QString PMGLView::viewTypeAsString( PMViewType t ) +TQString PMGLView::viewTypeAsString( PMViewType t ) { - QString str; + TQString str; switch( t ) { @@ -1536,17 +1536,17 @@ void PMGLView::restoreConfig( KConfig* /*cfg*/ ) void PMGLView::contextMenu( ) { - QPopupMenu* m = new QPopupMenu( ); - m->insertItem( i18n( "Left View" ), this, SLOT( slotSetTypePosX( ) ) ); - m->insertItem( i18n( "Right View" ), this, SLOT( slotSetTypeNegX( ) ) ); - m->insertItem( i18n( "Top View" ), this, SLOT( slotSetTypeNegY( ) ) ); - m->insertItem( i18n( "Bottom View" ), this, SLOT( slotSetTypePosY( ) ) ); - m->insertItem( i18n( "Front View" ), this, SLOT( slotSetTypePosZ( ) ) ); - m->insertItem( i18n( "Back View" ), this, SLOT( slotSetTypeNegZ( ) ) ); - - QPopupMenu* cm = new QPopupMenu( m ); - QPtrListIterator<PMCamera> it = m_pPart->cameras( ); - QString name; + TQPopupMenu* m = new TQPopupMenu( ); + m->insertItem( i18n( "Left View" ), this, TQT_SLOT( slotSetTypePosX( ) ) ); + m->insertItem( i18n( "Right View" ), this, TQT_SLOT( slotSetTypeNegX( ) ) ); + m->insertItem( i18n( "Top View" ), this, TQT_SLOT( slotSetTypeNegY( ) ) ); + m->insertItem( i18n( "Bottom View" ), this, TQT_SLOT( slotSetTypePosY( ) ) ); + m->insertItem( i18n( "Front View" ), this, TQT_SLOT( slotSetTypePosZ( ) ) ); + m->insertItem( i18n( "Back View" ), this, TQT_SLOT( slotSetTypeNegZ( ) ) ); + + TQPopupMenu* cm = new TQPopupMenu( m ); + TQPtrListIterator<PMCamera> it = m_pPart->cameras( ); + TQString name; if( !it.current( ) ) cm->insertItem( i18n( "No Cameras" ) ); else @@ -1560,13 +1560,13 @@ void PMGLView::contextMenu( ) cm->insertItem( name, cnr ); } } - connect( cm, SIGNAL( activated( int ) ), SLOT( slotCameraView( int ) ) ); + connect( cm, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotCameraView( int ) ) ); m->insertItem( SmallIconSet( "pmcamera" ), i18n( "Camera" ), cm ); m->insertSeparator( ); - m->insertItem( i18n( "Snap to Grid" ), this, SLOT( slotSnapToGrid( ) ) ); + m->insertItem( i18n( "Snap to Grid" ), this, TQT_SLOT( slotSnapToGrid( ) ) ); m_objectActions.clear( ); if( m_pActiveObject ) { @@ -1574,7 +1574,7 @@ void PMGLView::contextMenu( ) if( !m_objectActions.isEmpty( ) ) { PMObjectAction* oa = 0; - QPtrListIterator<PMObjectAction> ait( m_objectActions ); + TQPtrListIterator<PMObjectAction> ait( m_objectActions ); for( ; ait.current( ); ++ait ) { @@ -1583,11 +1583,11 @@ void PMGLView::contextMenu( ) } } } - connect( m, SIGNAL( activated( int ) ), SLOT( slotObjectAction( int ) ) ); + connect( m, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotObjectAction( int ) ) ); m->insertSeparator( ); - QPopupMenu* menu = new QPopupMenu( m ); + TQPopupMenu* menu = new TQPopupMenu( m ); PMControlPointListIterator pit( m_controlPoints ); if( !pit.current( ) ) @@ -1598,18 +1598,18 @@ void PMGLView::contextMenu( ) for( ; pit.current( ); ++pit, ++cnr ) menu->insertItem( pit.current( )->description( ), cnr ); } - connect( menu, SIGNAL( activated( int ) ), SLOT( slotControlPoint( int ) ) ); + connect( menu, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotControlPoint( int ) ) ); m->insertItem( i18n( "Control Points" ), menu ); - m->exec( QCursor::pos( ) ); + m->exec( TQCursor::pos( ) ); delete m; } void PMGLView::slotCameraView( int id ) { int i; - QPtrListIterator<PMCamera> it = m_pPart->cameras( ); + TQPtrListIterator<PMCamera> it = m_pPart->cameras( ); for( i = 0; i < id; i++ ) ++it; @@ -1622,7 +1622,7 @@ void PMGLView::slotCameraView( int id ) void PMGLView::slotObjectAction( int id ) { - QPtrListIterator<PMObjectAction> it( m_objectActions ); + TQPtrListIterator<PMObjectAction> it( m_objectActions ); PMObjectAction* oa = 0; for( ; it.current( ) && !oa; ++it ) @@ -1677,7 +1677,7 @@ void PMGLView::slotSnapToGrid( ) } } -QString PMGLView::description( ) const +TQString PMGLView::description( ) const { return viewTypeAsString( m_type ); } @@ -1700,9 +1700,9 @@ void PMGLView::saveViewConfig( PMViewOptions* vo ) const } } -void PMGLViewOptions::loadData( QDomElement& e ) +void PMGLViewOptions::loadData( TQDomElement& e ) { - QString s = e.attribute( "type", "Camera" ); + TQString s = e.attribute( "type", "Camera" ); if( s == "Camera" ) m_glViewType = PMGLView::PMViewCamera; else if( s == "X" ) m_glViewType = PMGLView::PMViewPosX; else if( s == "Y" ) m_glViewType = PMGLView::PMViewPosY; @@ -1712,7 +1712,7 @@ void PMGLViewOptions::loadData( QDomElement& e ) else if( s == "NegZ" ) m_glViewType = PMGLView::PMViewNegZ; } -void PMGLViewOptions::saveData( QDomElement& e ) +void PMGLViewOptions::saveData( TQDomElement& e ) { switch( m_glViewType ) { @@ -1744,12 +1744,12 @@ void PMGLViewOptions::saveData( QDomElement& e ) } } -QString PMGLViewFactory::description( ) const +TQString PMGLViewFactory::description( ) const { return i18n( "3D View" ); } -QString PMGLViewFactory::description( PMViewOptions* vo ) const +TQString PMGLViewFactory::description( PMViewOptions* vo ) const { if( vo && vo->viewType( ) == "glview" ) { @@ -1760,7 +1760,7 @@ QString PMGLViewFactory::description( PMViewOptions* vo ) const return description( ); } -PMViewOptionsWidget* PMGLViewFactory::newOptionsWidget( QWidget* parent, +PMViewOptionsWidget* PMGLViewFactory::newOptionsWidget( TQWidget* parent, PMViewOptions* o ) { return new PMGLViewOptionsWidget( parent, o ); @@ -1772,17 +1772,17 @@ PMViewOptions* PMGLViewFactory::newOptionsInstance( ) const return o; } -PMGLViewOptionsWidget::PMGLViewOptionsWidget( QWidget* parent, +PMGLViewOptionsWidget::PMGLViewOptionsWidget( TQWidget* parent, PMViewOptions* o ) : PMViewOptionsWidget( parent ) { m_pOptions = ( PMGLViewOptions* ) o; - QHBoxLayout* hl = new QHBoxLayout( this, 0, KDialog::spacingHint( ) ); - QLabel* l = new QLabel( i18n( "3D view type:" ), this ); + TQHBoxLayout* hl = new TQHBoxLayout( this, 0, KDialog::spacingHint( ) ); + TQLabel* l = new TQLabel( i18n( "3D view type:" ), this ); hl->addWidget( l ); - m_pGLViewType = new QComboBox( false, this ); + m_pGLViewType = new TQComboBox( false, this ); m_pGLViewType->insertItem( i18n( "Top" ) ); m_pGLViewType->insertItem( i18n( "Bottom" ) ); m_pGLViewType->insertItem( i18n( "Left" ) ); @@ -1816,8 +1816,8 @@ PMGLViewOptionsWidget::PMGLViewOptionsWidget( QWidget* parent, break; } - connect( m_pGLViewType, SIGNAL( activated( int ) ), - SLOT( slotGLViewTypeChanged( int ) ) ); + connect( m_pGLViewType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotGLViewTypeChanged( int ) ) ); hl->addWidget( m_pGLViewType ); } diff --git a/kpovmodeler/pmglview.h b/kpovmodeler/pmglview.h index b33eeb2b..521d6911 100644 --- a/kpovmodeler/pmglview.h +++ b/kpovmodeler/pmglview.h @@ -24,11 +24,11 @@ #include <config.h> #endif -#include <qwidget.h> -#include <qpoint.h> -#include <qdatetime.h> -#include <qtimer.h> -#include <qpixmap.h> +#include <tqwidget.h> +#include <tqpoint.h> +#include <tqdatetime.h> +#include <tqtimer.h> +#include <tqpixmap.h> #include "pmviewbase.h" #include "pmviewfactory.h" @@ -43,7 +43,7 @@ class PMObject; class PMPart; class PMCamera; class KConfig; -class QComboBox; +class TQComboBox; /** * Widget for rendering the scene with OpenGL @@ -61,16 +61,16 @@ public: * Constructor */ PMGLView( PMPart* part, PMViewType t, - QWidget* parent = 0, const char* name = 0, WFlags f = 0 ); + TQWidget* parent = 0, const char* name = 0, WFlags f = 0 ); /** * Destructor */ ~PMGLView( ); /** */ - virtual QString viewType( ) const { return QString( "glview" ); } + virtual TQString viewType( ) const { return TQString( "glview" ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual void restoreViewConfig( PMViewOptions* ); /** */ @@ -122,7 +122,7 @@ public: /** * Returns the 2D control points position in the view */ - const QPtrList<PMVector>& controlPointsPosition( ) const + const TQPtrList<PMVector>& controlPointsPosition( ) const { return m_controlPointsPosition; } @@ -173,7 +173,7 @@ public: /** * Returns the view type as string */ - static QString viewTypeAsString( PMViewType t ); + static TQString viewTypeAsString( PMViewType t ); /** * Sets the direct rendering flag */ @@ -212,7 +212,7 @@ public slots: * Called when an object is changed. * @see PMPart::objectChanged( ) */ - void slotObjectChanged( PMObject* obj, const int mode, QObject* sender ); + void slotObjectChanged( PMObject* obj, const int mode, TQObject* sender ); /** * Restarts rendering */ @@ -272,11 +272,11 @@ signals: /** * Emitted when an object is changed */ - void objectChanged( PMObject* obj, const int mode, QObject* sender ); + void objectChanged( PMObject* obj, const int mode, TQObject* sender ); /** * Emitted when the mouse is over a control point */ - void controlPointMessage( const QString& msg ); + void controlPointMessage( const TQString& msg ); /** * Emitted in the destructor */ @@ -284,7 +284,7 @@ signals: /** * Emitted when the view type changes */ - void viewTypeChanged( const QString& str ); + void viewTypeChanged( const TQString& str ); protected: /** @@ -292,21 +292,21 @@ protected: */ virtual void initializeGL( ); /** */ - virtual void resizeEvent( QResizeEvent* e ); + virtual void resizeEvent( TQResizeEvent* e ); /** */ - virtual void paintEvent( QPaintEvent* e ); + virtual void paintEvent( TQPaintEvent* e ); /** */ - virtual void mousePressEvent( QMouseEvent* e ); + virtual void mousePressEvent( TQMouseEvent* e ); /** */ - virtual void mouseReleaseEvent( QMouseEvent* e ); + virtual void mouseReleaseEvent( TQMouseEvent* e ); /** */ - virtual void mouseMoveEvent( QMouseEvent* e ); + virtual void mouseMoveEvent( TQMouseEvent* e ); /** */ - virtual void keyPressEvent( QKeyEvent* e ); + virtual void keyPressEvent( TQKeyEvent* e ); /** * Event to zoom in / zoom out the viewport by mouse wheel */ - virtual void wheelEvent( QWheelEvent* e ); + virtual void wheelEvent( TQWheelEvent* e ); private: /** @@ -339,11 +339,11 @@ private: /** * Starts a graphical change */ - void startChange( const QPoint& mousePos ); + void startChange( const TQPoint& mousePos ); /** * Graphical Change */ - void graphicalChange( const QPoint& mousePos ); + void graphicalChange( const TQPoint& mousePos ); /** * Selects/deselecs the control point. If cp is 0, all control points are * selected/deselected. @@ -421,19 +421,19 @@ private: /** * The old mouse position */ - QPoint m_mousePos; - QPoint m_changeStartPos; - QPoint m_currentMousePos; - QTimer m_startTimer; - QTime m_changeStartTime; + TQPoint m_mousePos; + TQPoint m_changeStartPos; + TQPoint m_currentMousePos; + TQTimer m_startTimer; + TQTime m_changeStartTime; bool m_bDeselectUnderMouse; bool m_bSelectUnderMouse; /** * Member variables for multiple selection mode */ - QPixmap m_selectionPixmap[4]; - QPoint m_selectionStart, m_selectionEnd; + TQPixmap m_selectionPixmap[4]; + TQPoint m_selectionStart, m_selectionEnd; bool m_bMultipleSelectionMode; bool m_bSelectionStarted; @@ -442,8 +442,8 @@ private: */ bool m_bAutoScroll; double m_autoScrollSpeed; - QTimer m_autoScrollTimer; - QTime m_lastAutoScrollUpdate; + TQTimer m_autoScrollTimer; + TQTime m_lastAutoScrollUpdate; int m_autoScrollDirectionX, m_autoScrollDirectionY; /** * Rendering @@ -474,7 +474,7 @@ private: /** * Position of the control points on the screen */ - QPtrList<PMVector> m_controlPointsPosition; + TQPtrList<PMVector> m_controlPointsPosition; /** * Position of the last right mouse click */ @@ -518,7 +518,7 @@ private: /** * The current object actions */ - QPtrList<PMObjectAction> m_objectActions; + TQPtrList<PMObjectAction> m_objectActions; static bool s_bDirect; }; @@ -537,11 +537,11 @@ public: m_glViewType = t; } virtual PMViewOptions* copy( ) const { return new PMGLViewOptions( *this ); } - virtual QString viewType( ) const { return QString( "glview" ); } + virtual TQString viewType( ) const { return TQString( "glview" ); } PMGLView::PMViewType glViewType( ) const { return m_glViewType; } void setGLViewType( PMGLView::PMViewType t ) { m_glViewType = t; } - virtual void loadData( QDomElement& e ); - virtual void saveData( QDomElement& e ); + virtual void loadData( TQDomElement& e ); + virtual void saveData( TQDomElement& e ); private: PMGLView::PMViewType m_glViewType; @@ -554,16 +554,16 @@ class PMGLViewFactory : public PMViewTypeFactory { public: PMGLViewFactory( ) { } - virtual QString viewType( ) const { return QString( "glview" ); } - virtual QString description( ) const; - virtual QString description( PMViewOptions* ) const; - virtual QString iconName( ) const { return QString( "pmglview" ); } - virtual PMViewBase* newInstance( QWidget* parent, PMPart* part ) const + virtual TQString viewType( ) const { return TQString( "glview" ); } + virtual TQString description( ) const; + virtual TQString description( PMViewOptions* ) const; + virtual TQString iconName( ) const { return TQString( "pmglview" ); } + virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const { return new PMGLView( part, PMGLView::PMViewPosX, parent ); } virtual PMViewOptions* newOptionsInstance( ) const; - virtual PMViewOptionsWidget* newOptionsWidget( QWidget*, PMViewOptions* ); + virtual PMViewOptionsWidget* newOptionsWidget( TQWidget*, PMViewOptions* ); }; /** @@ -576,14 +576,14 @@ public: /** * Default constructor */ - PMGLViewOptionsWidget( QWidget* parent, PMViewOptions* o ); + PMGLViewOptionsWidget( TQWidget* parent, PMViewOptions* o ); protected slots: void slotGLViewTypeChanged( int ); private: PMGLViewOptions* m_pOptions; - QComboBox* m_pGLViewType; + TQComboBox* m_pGLViewType; }; #endif diff --git a/kpovmodeler/pmgraphicalobject.cpp b/kpovmodeler/pmgraphicalobject.cpp index 85f4ad22..c60c40cb 100644 --- a/kpovmodeler/pmgraphicalobject.cpp +++ b/kpovmodeler/pmgraphicalobject.cpp @@ -100,7 +100,7 @@ void PMGraphicalObject::cleanUp( ) const Base::cleanUp( ); } -void PMGraphicalObject::serialize( QDomElement& e, QDomDocument& doc ) const +void PMGraphicalObject::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "no_shadow", m_noShadow ); e.setAttribute( "no_image", m_noImage ); diff --git a/kpovmodeler/pmgraphicalobject.h b/kpovmodeler/pmgraphicalobject.h index f07ac46f..399e351d 100644 --- a/kpovmodeler/pmgraphicalobject.h +++ b/kpovmodeler/pmgraphicalobject.h @@ -56,7 +56,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); diff --git a/kpovmodeler/pmgraphicalobjectedit.cpp b/kpovmodeler/pmgraphicalobjectedit.cpp index 2a06485c..c623c51f 100644 --- a/kpovmodeler/pmgraphicalobjectedit.cpp +++ b/kpovmodeler/pmgraphicalobjectedit.cpp @@ -19,16 +19,16 @@ #include "pmgraphicalobjectedit.h" #include "pmgraphicalobject.h" -#include <qcheckbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qspinbox.h> +#include <tqcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqspinbox.h> #include <klocale.h> const int c_minValue = -1000; const int c_maxValue = 1000; -PMGraphicalObjectEdit::PMGraphicalObjectEdit( QWidget* parent, const char* name ) +PMGraphicalObjectEdit::PMGraphicalObjectEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -36,38 +36,38 @@ PMGraphicalObjectEdit::PMGraphicalObjectEdit( QWidget* parent, const char* name void PMGraphicalObjectEdit::createBottomWidgets( ) { - QGridLayout* gl = new QGridLayout( topLayout( ), 2, 2 ); - m_pNoShadowButton = new QCheckBox( i18n( "No shadow" ), this ); + TQGridLayout* gl = new TQGridLayout( topLayout( ), 2, 2 ); + m_pNoShadowButton = new TQCheckBox( i18n( "No shadow" ), this ); gl->addWidget( m_pNoShadowButton, 0, 0 ); - m_pNoImageButton = new QCheckBox( i18n( "No image" ), this ); + m_pNoImageButton = new TQCheckBox( i18n( "No image" ), this ); gl->addWidget( m_pNoImageButton, 0, 1 ); - m_pNoReflectionButton = new QCheckBox( i18n( "No reflection" ), this ); + m_pNoReflectionButton = new TQCheckBox( i18n( "No reflection" ), this ); gl->addWidget( m_pNoReflectionButton, 1, 0 ); - m_pDoubleIlluminateButton = new QCheckBox( i18n( "Double illuminate" ), this ); + m_pDoubleIlluminateButton = new TQCheckBox( i18n( "Double illuminate" ), this ); gl->addWidget( m_pDoubleIlluminateButton, 1, 1 ); - m_pExport = new QCheckBox( i18n( "Export to renderer" ), this ); + m_pExport = new TQCheckBox( i18n( "Export to renderer" ), this ); topLayout( )->addWidget( m_pExport ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Visibility level: " ), this ) ); - m_pVisibilityLevel = new QSpinBox( c_minValue, c_maxValue, 1, this ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Visibility level: " ), this ) ); + m_pVisibilityLevel = new TQSpinBox( c_minValue, c_maxValue, 1, this ); hl->addWidget( m_pVisibilityLevel ); - m_pResultingVisibility = new QLabel( QString( "( )" ), this ); + m_pResultingVisibility = new TQLabel( TQString( "( )" ), this ); hl->addWidget( m_pResultingVisibility ); hl->addSpacing( 10 ); - m_pRelativeVisibility = new QCheckBox( i18n( "Relative" ), this ); + m_pRelativeVisibility = new TQCheckBox( i18n( "Relative" ), this ); hl->addWidget( m_pRelativeVisibility ); hl->addStretch( 1 ); - connect( m_pNoShadowButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pNoImageButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pNoReflectionButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDoubleIlluminateButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRelativeVisibility, SIGNAL( clicked( ) ), - SLOT( slotRelativeChanged( ) ) ); - connect( m_pVisibilityLevel, SIGNAL( valueChanged( int ) ), - SLOT( slotLevelChanged( int ) ) ); - connect( m_pExport, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pNoShadowButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pNoImageButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pNoReflectionButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDoubleIlluminateButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRelativeVisibility, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotRelativeChanged( ) ) ); + connect( m_pVisibilityLevel, TQT_SIGNAL( valueChanged( int ) ), + TQT_SLOT( slotLevelChanged( int ) ) ); + connect( m_pExport, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); Base::createBottomWidgets( ); @@ -162,7 +162,7 @@ void PMGraphicalObjectEdit::recalculateResultingVisibility( ) absoluteFound = true; } } - m_pResultingVisibility->setText( QString( "(%1)" ).arg( level ) ); + m_pResultingVisibility->setText( TQString( "(%1)" ).arg( level ) ); } #include "pmgraphicalobjectedit.moc" diff --git a/kpovmodeler/pmgraphicalobjectedit.h b/kpovmodeler/pmgraphicalobjectedit.h index 3b31a794..29f53a0f 100644 --- a/kpovmodeler/pmgraphicalobjectedit.h +++ b/kpovmodeler/pmgraphicalobjectedit.h @@ -27,9 +27,9 @@ #include "pmdetailobjectedit.h" class PMGraphicalObject; -class QCheckBox; -class QSpinBox; -class QLabel; +class TQCheckBox; +class TQSpinBox; +class TQLabel; /** * Dialog edit class for @ref PMGraphicalObject. @@ -42,7 +42,7 @@ public: /** * Creates a PMGraphicalObjectEdit with parent and name */ - PMGraphicalObjectEdit( QWidget* parent, const char* name = 0 ); + PMGraphicalObjectEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -64,14 +64,14 @@ private: private: PMGraphicalObject* m_pDisplayedObject; - QCheckBox* m_pNoShadowButton; - QCheckBox* m_pNoImageButton; - QCheckBox* m_pNoReflectionButton; - QCheckBox* m_pDoubleIlluminateButton; - QSpinBox* m_pVisibilityLevel; - QCheckBox* m_pRelativeVisibility; - QLabel* m_pResultingVisibility; - QCheckBox* m_pExport; + TQCheckBox* m_pNoShadowButton; + TQCheckBox* m_pNoImageButton; + TQCheckBox* m_pNoReflectionButton; + TQCheckBox* m_pDoubleIlluminateButton; + TQSpinBox* m_pVisibilityLevel; + TQCheckBox* m_pRelativeVisibility; + TQLabel* m_pResultingVisibility; + TQCheckBox* m_pExport; }; diff --git a/kpovmodeler/pmgridsettings.cpp b/kpovmodeler/pmgridsettings.cpp index 20973935..04bdbdd3 100644 --- a/kpovmodeler/pmgridsettings.cpp +++ b/kpovmodeler/pmgridsettings.cpp @@ -22,58 +22,58 @@ #include "pmcontrolpoint.h" #include "pmdefaults.h" -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> #include <kcolorbutton.h> #include <klocale.h> -PMGridSettings::PMGridSettings( QWidget* parent, const char* name ) +PMGridSettings::PMGridSettings( TQWidget* parent, const char* name ) : PMSettingsDialogPage( parent, name ) { - QHBoxLayout* hlayout; - QVBoxLayout* vlayout; - QVBoxLayout* gvl; - QGridLayout* grid; - QGroupBox* gb; - - vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) ); - gb = new QGroupBox( i18n( "Displayed Grid" ), this ); + TQHBoxLayout* hlayout; + TQVBoxLayout* vlayout; + TQVBoxLayout* gvl; + TQGridLayout* grid; + TQGroupBox* gb; + + vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + gb = new TQGroupBox( i18n( "Displayed Grid" ), this ); vlayout->addWidget( gb ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new QHBoxLayout( gvl ); - hlayout->addWidget( new QLabel( i18n( "Color:" ), gb ) ); + hlayout = new TQHBoxLayout( gvl ); + hlayout->addWidget( new TQLabel( i18n( "Color:" ), gb ) ); m_pGridColor = new KColorButton( gb ); hlayout->addWidget( m_pGridColor ); hlayout->addStretch( 1 ); - hlayout = new QHBoxLayout( gvl ); - hlayout->addWidget( new QLabel( i18n( "Distance:" ), gb ) ); + hlayout = new TQHBoxLayout( gvl ); + hlayout->addWidget( new TQLabel( i18n( "Distance:" ), gb ) ); m_pGridDistance = new PMIntEdit( gb ); m_pGridDistance->setValidation( true, 20, false, 0 ); hlayout->addWidget( m_pGridDistance ); hlayout->addStretch( 1 ); - gb = new QGroupBox( i18n( "Control Point Grid" ), this ); + gb = new TQGroupBox( i18n( "Control Point Grid" ), this ); vlayout->addWidget( gb ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new QHBoxLayout( gvl ); - grid = new QGridLayout( hlayout, 3, 2 ); - grid->addWidget( new QLabel( i18n( "2D/3D movement:" ), gb ), 0, 0 ); + hlayout = new TQHBoxLayout( gvl ); + grid = new TQGridLayout( hlayout, 3, 2 ); + grid->addWidget( new TQLabel( i18n( "2D/3D movement:" ), gb ), 0, 0 ); m_pMoveGrid = new PMFloatEdit( gb ); m_pMoveGrid->setValidation( true, 0.001, true, 100 ); grid->addWidget( m_pMoveGrid, 0, 1 ); - grid->addWidget( new QLabel( i18n( "Scale:" ), gb ), 1, 0 ); + grid->addWidget( new TQLabel( i18n( "Scale:" ), gb ), 1, 0 ); m_pScaleGrid = new PMFloatEdit( gb ); m_pScaleGrid->setValidation( true, 0.001, true, 100 ); grid->addWidget( m_pScaleGrid, 1, 1 ); - grid->addWidget( new QLabel( i18n( "Rotation:" ), gb ), 2, 0 ); + grid->addWidget( new TQLabel( i18n( "Rotation:" ), gb ), 2, 0 ); m_pRotateGrid = new PMFloatEdit( gb ); m_pRotateGrid->setValidation( true, 0.001, true, 180 ); grid->addWidget( m_pRotateGrid, 2, 1 ); diff --git a/kpovmodeler/pmgridsettings.h b/kpovmodeler/pmgridsettings.h index 724ade35..214f3af3 100644 --- a/kpovmodeler/pmgridsettings.h +++ b/kpovmodeler/pmgridsettings.h @@ -38,7 +38,7 @@ public: /** * Default constructor */ - PMGridSettings( QWidget* parent, const char* name = 0 ); + PMGridSettings( TQWidget* parent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ diff --git a/kpovmodeler/pmheightfield.cpp b/kpovmodeler/pmheightfield.cpp index e729282a..6806437a 100644 --- a/kpovmodeler/pmheightfield.cpp +++ b/kpovmodeler/pmheightfield.cpp @@ -29,8 +29,8 @@ #include <klocale.h> const PMHeightField::HeightFieldType c_defaultType = PMHeightField::HFgif; -const QString c_defaultTypeText = QString( "gif" ); -const QString c_defaultFileName = QString( "" ); +const TQString c_defaultTypeText = TQString( "gif" ); +const TQString c_defaultFileName = TQString( "" ); const bool c_defaultHierarchy = true; const bool c_defaultSmooth = false; const double c_defaultWaterLevel = 0.0; @@ -82,12 +82,12 @@ PMHeightField::~PMHeightField( ) delete m_pROAM; } -QString PMHeightField::description( ) const +TQString PMHeightField::description( ) const { return i18n( "height field" ); } -void PMHeightField::serialize( QDomElement& e, QDomDocument& doc ) const +void PMHeightField::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "hf_type", typeToString( m_hfType ) ); e.setAttribute( "file_name", m_fileName ); @@ -146,7 +146,7 @@ void PMHeightField::setHeightFieldType( PMHeightField::HeightFieldType t ) } } -void PMHeightField::setFileName( const QString& f ) +void PMHeightField::setFileName( const TQString& f ) { if( f != m_fileName ) { @@ -200,7 +200,7 @@ void PMHeightField::setWaterLevel( double wl ) } } -PMDialogEditBase* PMHeightField::editWidget( QWidget* parent ) const +PMDialogEditBase* PMHeightField::editWidget( TQWidget* parent ) const { return new PMHeightFieldEdit( parent ); } @@ -396,37 +396,37 @@ PMViewStructure* PMHeightField::defaultViewStructure( ) const return s_pDefaultViewStructure; } -QString PMHeightField::typeToString( PMHeightField::HeightFieldType t ) +TQString PMHeightField::typeToString( PMHeightField::HeightFieldType t ) { - QString s; + TQString s; switch( t ) { case HFgif: - s = QString( "gif" ); + s = TQString( "gif" ); break; case HFtga: - s = QString( "tga" ); + s = TQString( "tga" ); break; case HFpot: - s = QString( "pot" ); + s = TQString( "pot" ); break; case HFpng: - s = QString( "png" ); + s = TQString( "png" ); break; case HFpgm: - s = QString( "pgm" ); + s = TQString( "pgm" ); break; case HFppm: - s = QString( "ppm" ); + s = TQString( "ppm" ); break; case HFsys: - s = QString( "sys" ); + s = TQString( "sys" ); break; } return s; } -PMHeightField::HeightFieldType PMHeightField::stringToType( const QString &str ) +PMHeightField::HeightFieldType PMHeightField::stringToType( const TQString &str ) { HeightFieldType t = HFgif; if( str == "gif" ) diff --git a/kpovmodeler/pmheightfield.h b/kpovmodeler/pmheightfield.h index 4ab961c8..443226ba 100644 --- a/kpovmodeler/pmheightfield.h +++ b/kpovmodeler/pmheightfield.h @@ -57,24 +57,24 @@ public: /** */ virtual PMObject* copy( ) const { return new PMHeightField( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMHeightFieldEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmheightfield" ); } + virtual TQString pixmap( ) const { return TQString( "pmheightfield" ); } /** * Returns the height field type @@ -87,11 +87,11 @@ public: /** * Returns the file name */ - QString fileName( ) const { return m_fileName; } + TQString fileName( ) const { return m_fileName; } /** * Sets the file name */ - void setFileName( const QString& name ); + void setFileName( const TQString& name ); /** * Returns the hierarchy flag */ @@ -133,8 +133,8 @@ public: /** */ virtual void cleanUp( ) const; - static QString typeToString( HeightFieldType t ); - static HeightFieldType stringToType( const QString &str ); + static TQString typeToString( HeightFieldType t ); + static HeightFieldType stringToType( const TQString &str ); protected: /** */ @@ -159,7 +159,7 @@ private: PMHierarchyID, PMSmoothID, PMWaterLevelID }; HeightFieldType m_hfType; - QString m_fileName; + TQString m_fileName; bool m_hierarchy; bool m_smooth; double m_waterLevel; diff --git a/kpovmodeler/pmheightfieldedit.cpp b/kpovmodeler/pmheightfieldedit.cpp index c5a65998..5f9346f0 100644 --- a/kpovmodeler/pmheightfieldedit.cpp +++ b/kpovmodeler/pmheightfieldedit.cpp @@ -20,18 +20,18 @@ #include "pmheightfield.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qcombobox.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qslider.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqslider.h> #include <klocale.h> #include <kiconloader.h> #include <kfiledialog.h> -PMHeightFieldEdit::PMHeightFieldEdit( QWidget* parent, const char* name ) +PMHeightFieldEdit::PMHeightFieldEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -41,9 +41,9 @@ void PMHeightFieldEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Type:" ), this ) ); - m_pHeightFieldType = new QComboBox( false, this ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Type:" ), this ) ); + m_pHeightFieldType = new TQComboBox( false, this ); hl->addWidget( m_pHeightFieldType ); hl->addStretch( 0 ); m_pHeightFieldType->insertItem( "gif" ); @@ -54,36 +54,36 @@ void PMHeightFieldEdit::createTopWidgets( ) m_pHeightFieldType->insertItem( "ppm" ); m_pHeightFieldType->insertItem( "sys" ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "File name:" ), this ) ); - m_pFileName = new QLineEdit( this ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "File name:" ), this ) ); + m_pFileName = new TQLineEdit( this ); hl->addWidget( m_pFileName ); - m_pChooseFileName = new QPushButton( this ); + m_pChooseFileName = new TQPushButton( this ); m_pChooseFileName->setPixmap( SmallIcon( "fileopen" ) ); hl->addWidget( m_pChooseFileName ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Water level:" ), this ) ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Water level:" ), this ) ); m_pWaterLevel = new PMFloatEdit( this ); m_pWaterLevel->setValidation( true, 0.0, true, 1.0 ); hl->addWidget( m_pWaterLevel ); hl->addStretch( 1 ); - m_pHierarchy = new QCheckBox( i18n( "Hierarchy" ), this ); + m_pHierarchy = new TQCheckBox( i18n( "Hierarchy" ), this ); topLayout( )->addWidget( m_pHierarchy ); - m_pSmooth = new QCheckBox( i18n( "Smooth" ), this ); + m_pSmooth = new TQCheckBox( i18n( "Smooth" ), this ); topLayout( )->addWidget( m_pSmooth ); - connect( m_pHeightFieldType, SIGNAL( activated( int ) ), - SLOT( slotTypeChanged( int ) ) ); - connect( m_pFileName, SIGNAL( textChanged( const QString& ) ), - SLOT( slotFileNameChanged( const QString& ) ) ); - connect( m_pChooseFileName, SIGNAL( clicked( ) ), - SLOT( slotFileNameClicked( ) ) ); - connect( m_pWaterLevel, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pHierarchy, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSmooth, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pHeightFieldType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotTypeChanged( int ) ) ); + connect( m_pFileName, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotFileNameChanged( const TQString& ) ) ); + connect( m_pChooseFileName, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotFileNameClicked( ) ) ); + connect( m_pWaterLevel, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pHierarchy, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSmooth, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMHeightFieldEdit::displayObject( PMObject* o ) @@ -182,14 +182,14 @@ void PMHeightFieldEdit::slotTypeChanged( int ) emit dataChanged( ); } -void PMHeightFieldEdit::slotFileNameChanged( const QString& ) +void PMHeightFieldEdit::slotFileNameChanged( const TQString& ) { emit dataChanged( ); } void PMHeightFieldEdit::slotFileNameClicked( ) { - QString str = KFileDialog::getOpenFileName( QString::null, QString::null ); + TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmheightfieldedit.h b/kpovmodeler/pmheightfieldedit.h index 24ea2e6e..8a32aa00 100644 --- a/kpovmodeler/pmheightfieldedit.h +++ b/kpovmodeler/pmheightfieldedit.h @@ -28,10 +28,10 @@ class PMHeightField; class PMFloatEdit; -class QCheckBox; -class QComboBox; -class QLineEdit; -class QPushButton; +class TQCheckBox; +class TQComboBox; +class TQLineEdit; +class TQPushButton; /** * Dialog edit class for @ref PMHeightField @@ -44,7 +44,7 @@ public: /** * Creates a PMHeightFieldEdit with parent and name */ - PMHeightFieldEdit( QWidget* parent, const char* name = 0 ); + PMHeightFieldEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -60,7 +60,7 @@ protected slots: /** * Slot called when the file name is changed */ - void slotFileNameChanged( const QString& s ); + void slotFileNameChanged( const TQString& s ); /** * Slot called when the choose file button is pressed */ @@ -74,11 +74,11 @@ protected: private: PMHeightField* m_pDisplayedObject; - QComboBox* m_pHeightFieldType; - QLineEdit* m_pFileName; - QPushButton* m_pChooseFileName; - QCheckBox* m_pSmooth; - QCheckBox* m_pHierarchy; + TQComboBox* m_pHeightFieldType; + TQLineEdit* m_pFileName; + TQPushButton* m_pChooseFileName; + TQCheckBox* m_pSmooth; + TQCheckBox* m_pHierarchy; PMFloatEdit* m_pWaterLevel; }; diff --git a/kpovmodeler/pmheightfieldroam.cpp b/kpovmodeler/pmheightfieldroam.cpp index eb2790a5..d4809aac 100644 --- a/kpovmodeler/pmheightfieldroam.cpp +++ b/kpovmodeler/pmheightfieldroam.cpp @@ -19,13 +19,13 @@ #include <cstdlib> #include <new> -#include <qstring.h> -#include <qimage.h> -#include <qcolor.h> +#include <tqstring.h> +#include <tqimage.h> +#include <tqcolor.h> #include <kdebug.h> -PMHeightFieldROAM::PMHeightFieldROAM( const QString &fileName ) +PMHeightFieldROAM::PMHeightFieldROAM( const TQString &fileName ) { m_size = 0; m_numLines = m_usedPoints = 0; @@ -142,10 +142,10 @@ bool PMHeightFieldROAM::lineExist( int x, int y, int line ) const else return false; } -bool PMHeightFieldROAM::imageToData(const QString &fileName) +bool PMHeightFieldROAM::imageToData(const TQString &fileName) { - QImage scaledMap; - QImage mapFile( fileName ); + TQImage scaledMap; + TQImage mapFile( fileName ); if ( mapFile.isNull( ) ) return false; diff --git a/kpovmodeler/pmheightfieldroam.h b/kpovmodeler/pmheightfieldroam.h index e2802c6b..3f21c630 100644 --- a/kpovmodeler/pmheightfieldroam.h +++ b/kpovmodeler/pmheightfieldroam.h @@ -18,7 +18,7 @@ #ifndef PMHEIGHTFIELDROAM_H #define PMHEIGHTFIELDROAM_H -class QString; +class TQString; /** * ROAM display class for @ref PMHeightField @@ -81,7 +81,7 @@ class PMHeightFieldROAM * @param filename The name of the file to load * @return true if succesful false it it fails */ - bool imageToData( const QString &fileName ); + bool imageToData( const TQString &fileName ); /** * Sets the Maximum Level of the tree. @@ -174,7 +174,7 @@ public: * Constructor for class * @param fileName Source file for the map */ - PMHeightFieldROAM( const QString &fileName ); + PMHeightFieldROAM( const TQString &fileName ); /** * Class Destructor relases all the memory */ diff --git a/kpovmodeler/pmimagemap.cpp b/kpovmodeler/pmimagemap.cpp index 7fcaeb64..5f28c49a 100644 --- a/kpovmodeler/pmimagemap.cpp +++ b/kpovmodeler/pmimagemap.cpp @@ -86,7 +86,7 @@ PMImageMap::~PMImageMap( ) { } -void PMImageMap::serialize( QDomElement& e, QDomDocument& doc ) const +void PMImageMap::serialize( TQDomElement& e, TQDomDocument& doc ) const { switch( m_bitmapType ) { @@ -125,12 +125,12 @@ void PMImageMap::serialize( QDomElement& e, QDomDocument& doc ) const e.setAttribute( "transmit_all", m_transmitAll ); e.setAttribute( "once", m_once ); - QDomElement extra_data = doc.createElement( "extra_data" ); + TQDomElement extra_data = doc.createElement( "extra_data" ); - QDomElement data = doc.createElement( "indexed_filters" ); - QDomElement p; + TQDomElement data = doc.createElement( "indexed_filters" ); + TQDomElement p; - QValueList<PMPaletteValue>::ConstIterator it; + TQValueList<PMPaletteValue>::ConstIterator it; for( it = m_filters.begin( ); it != m_filters.end( ); ++it ) { p = doc.createElement( "index_filter" ); @@ -182,7 +182,7 @@ void PMImageMap::serialize( QDomElement& e, QDomDocument& doc ) const void PMImageMap::readAttributes( const PMXMLHelper& h ) { - QString str; + TQString str; str = h.stringAttribute( "bitmap_type", "sys" ); if( str == "gif" ) @@ -211,19 +211,19 @@ void PMImageMap::readAttributes( const PMXMLHelper& h ) m_transmitAll = h.doubleAttribute( "transmit_all", transmitAllDefault ); m_once = h.boolAttribute( "once", onceDefault ); - QDomElement e = h.extraData( ); + TQDomElement e = h.extraData( ); if( !e.isNull( ) ) { - QDomNode c = e.firstChild( ); + TQDomNode c = e.firstChild( ); while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); if( ce.tagName( ) == "indexed_filters" ) { m_filters.clear( ); - QDomNode cd = ce.firstChild( ); + TQDomNode cd = ce.firstChild( ); while( !cd.isNull( ) ) { if( cd.isElement( ) ) @@ -238,7 +238,7 @@ void PMImageMap::readAttributes( const PMXMLHelper& h ) if( ce.tagName( ) == "indexed_transmits" ) { m_transmits.clear( ); - QDomNode cd = ce.firstChild( ); + TQDomNode cd = ce.firstChild( ); while( !cd.isNull( ) ) { if( cd.isElement( ) ) @@ -344,7 +344,7 @@ void PMImageMap::cleanUp( ) const Base::cleanUp( ); } -QString PMImageMap::description( ) const +TQString PMImageMap::description( ) const { return i18n( "imagemap" ); } @@ -359,7 +359,7 @@ void PMImageMap::setBitmapType( PMBitmapType c ) } } -void PMImageMap::setBitmapFileName( const QString& c ) +void PMImageMap::setBitmapFileName( const TQString& c ) { if( c != m_bitmapFile ) { @@ -439,7 +439,7 @@ void PMImageMap::setInterpolateType( PMInterpolateType c ) } } -void PMImageMap::setFilters( const QValueList<PMPaletteValue>& c ) +void PMImageMap::setFilters( const TQValueList<PMPaletteValue>& c ) { if( m_filters != c ) { @@ -449,7 +449,7 @@ void PMImageMap::setFilters( const QValueList<PMPaletteValue>& c ) } } -void PMImageMap::setTransmits( const QValueList<PMPaletteValue>& c ) +void PMImageMap::setTransmits( const TQValueList<PMPaletteValue>& c ) { if( m_transmits != c ) { @@ -459,7 +459,7 @@ void PMImageMap::setTransmits( const QValueList<PMPaletteValue>& c ) } } -PMDialogEditBase* PMImageMap::editWidget( QWidget* parent ) const +PMDialogEditBase* PMImageMap::editWidget( TQWidget* parent ) const { return new PMImageMapEdit( parent ); } diff --git a/kpovmodeler/pmimagemap.h b/kpovmodeler/pmimagemap.h index 3291994d..3a43d949 100644 --- a/kpovmodeler/pmimagemap.h +++ b/kpovmodeler/pmimagemap.h @@ -68,7 +68,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMImageMap( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -76,17 +76,17 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmimagemap" ); } + virtual TQString pixmap( ) const { return TQString( "pmimagemap" ); } /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMImageMapEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Gets the bitmap type @@ -95,7 +95,7 @@ public: /** * Gets the bitmap file name */ - QString bitmapFile( ) const { return m_bitmapFile; } + TQString bitmapFile( ) const { return m_bitmapFile; } /** * Returns true if filter all is enabled */ @@ -127,11 +127,11 @@ public: /** * Gets the list of indexed filters */ - QValueList<PMPaletteValue> filters( ) const { return m_filters; } + TQValueList<PMPaletteValue> filters( ) const { return m_filters; } /** * Gets the list of indexed transmits */ - QValueList<PMPaletteValue> transmits( ) const { return m_transmits; } + TQValueList<PMPaletteValue> transmits( ) const { return m_transmits; } /** * Sets the imagemap type @@ -139,7 +139,7 @@ public: void setBitmapType( PMBitmapType c ); /** * Sets the bitmap file name*/ - void setBitmapFileName( const QString& c ); + void setBitmapFileName( const TQString& c ); /** * Enables/Disables Filter All */ @@ -171,11 +171,11 @@ public: /** * Set the list of indexed filters */ - void setFilters( const QValueList<PMPaletteValue>& filters ); + void setFilters( const TQValueList<PMPaletteValue>& filters ); /** * Set the list of indexed transmits */ - void setTransmits( const QValueList<PMPaletteValue>& transmits ); + void setTransmits( const TQValueList<PMPaletteValue>& transmits ); /** */ virtual void restoreMemento( PMMemento* s ); private: @@ -192,7 +192,7 @@ private: * ImageMap type */ PMBitmapType m_bitmapType; - QString m_bitmapFile; + TQString m_bitmapFile; bool m_enableFilterAll; float m_filterAll; bool m_enableTransmitAll; @@ -200,8 +200,8 @@ private: bool m_once; PMMapType m_mapType; PMInterpolateType m_interpolateType; - QValueList<PMPaletteValue> m_filters; - QValueList<PMPaletteValue> m_transmits; + TQValueList<PMPaletteValue> m_filters; + TQValueList<PMPaletteValue> m_transmits; static PMMetaObject* s_pMetaObject; }; diff --git a/kpovmodeler/pmimagemapedit.cpp b/kpovmodeler/pmimagemapedit.cpp index c43443df..09d5eb0a 100644 --- a/kpovmodeler/pmimagemapedit.cpp +++ b/kpovmodeler/pmimagemapedit.cpp @@ -23,14 +23,14 @@ #include "pmpalettevalueedit.h" #include "pmvector.h" -#include <qwidget.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> #include <ktabctl.h> #include <klocale.h> #include <kmessagebox.h> @@ -38,7 +38,7 @@ #include <kfiledialog.h> #include <kiconloader.h> -PMImageMapEdit::PMImageMapEdit( QWidget* parent, const char* name ) +PMImageMapEdit::PMImageMapEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -46,14 +46,14 @@ PMImageMapEdit::PMImageMapEdit( QWidget* parent, const char* name ) void PMImageMapEdit::createTopWidgets( ) { - QLabel* lbl; - QHBoxLayout* hl; + TQLabel* lbl; + TQHBoxLayout* hl; Base::createTopWidgets( ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "File type:" ), this ); - m_pImageFileTypeEdit = new QComboBox( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "File type:" ), this ); + m_pImageFileTypeEdit = new TQComboBox( this ); m_pImageFileTypeEdit->insertItem( "gif" ); m_pImageFileTypeEdit->insertItem( "tga" ); m_pImageFileTypeEdit->insertItem( "iff" ); @@ -66,44 +66,44 @@ void PMImageMapEdit::createTopWidgets( ) hl->addWidget( lbl ); hl->addWidget( m_pImageFileTypeEdit ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "File name:" ), this ); - m_pImageFileNameEdit = new QLineEdit( this ); - m_pImageFileNameBrowse = new QPushButton( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "File name:" ), this ); + m_pImageFileNameEdit = new TQLineEdit( this ); + m_pImageFileNameBrowse = new TQPushButton( this ); m_pImageFileNameBrowse->setPixmap( SmallIcon( "fileopen" ) ); hl->addWidget( lbl ); hl->addWidget( m_pImageFileNameEdit ); hl->addWidget( m_pImageFileNameBrowse ); - hl = new QHBoxLayout( topLayout( ) ); - m_pEnableFilterAllEdit = new QCheckBox( i18n( "Filter all" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pEnableFilterAllEdit = new TQCheckBox( i18n( "Filter all" ), this ); m_pFilterAllEdit = new PMFloatEdit( this ); hl->addWidget( m_pEnableFilterAllEdit ); hl->addWidget( m_pFilterAllEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - m_pEnableTransmitAllEdit = new QCheckBox( i18n( "Transmit all" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pEnableTransmitAllEdit = new TQCheckBox( i18n( "Transmit all" ), this ); m_pTransmitAllEdit = new PMFloatEdit( this ); hl->addWidget( m_pEnableTransmitAllEdit ); hl->addWidget( m_pTransmitAllEdit ); hl->addStretch( 1 ); - m_pOnceEdit = new QCheckBox( i18n( "Once" ), this ); + m_pOnceEdit = new TQCheckBox( i18n( "Once" ), this ); topLayout( )->addWidget( m_pOnceEdit ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Interpolate:" ), this ); - m_pInterpolateTypeEdit = new QComboBox( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Interpolate:" ), this ); + m_pInterpolateTypeEdit = new TQComboBox( this ); m_pInterpolateTypeEdit->insertItem( i18n( "None" ) ); m_pInterpolateTypeEdit->insertItem( i18n( "Bilinear" ) ); m_pInterpolateTypeEdit->insertItem( i18n( "Normalized" ) ); hl->addWidget( lbl ); hl->addWidget( m_pInterpolateTypeEdit ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Map type:" ), this ); - m_pMapTypeEdit = new QComboBox( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Map type:" ), this ); + m_pMapTypeEdit = new TQComboBox( this ); m_pMapTypeEdit->insertItem( i18n( "Planar" ) ); m_pMapTypeEdit->insertItem( i18n( "Spherical" ) ); m_pMapTypeEdit->insertItem( i18n( "Cylindrical" ) ); @@ -111,25 +111,25 @@ void PMImageMapEdit::createTopWidgets( ) hl->addWidget( lbl ); hl->addWidget( m_pMapTypeEdit ); - connect( m_pImageFileTypeEdit, SIGNAL( activated( int ) ), SLOT( slotImageFileTypeChanged( int ) ) ); - connect( m_pMapTypeEdit, SIGNAL( activated( int ) ), SLOT( slotMapTypeChanged( int ) ) ); - connect( m_pInterpolateTypeEdit, SIGNAL( activated( int ) ), SLOT( slotInterpolateTypeChanged( int ) ) ); - connect( m_pImageFileNameBrowse, SIGNAL( clicked( ) ), SLOT( slotImageFileBrowseClicked( ) ) ); - connect( m_pImageFileNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotImageFileNameChanged( const QString& ) ) ); - connect( m_pEnableFilterAllEdit, SIGNAL( clicked( ) ), SLOT( slotFilterAllClicked( ) ) ); - connect( m_pEnableTransmitAllEdit, SIGNAL( clicked( ) ), SLOT( slotTransmitAllClicked( ) ) ); - connect( m_pFilterAllEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pTransmitAllEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOnceEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pImageFileTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotImageFileTypeChanged( int ) ) ); + connect( m_pMapTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotMapTypeChanged( int ) ) ); + connect( m_pInterpolateTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotInterpolateTypeChanged( int ) ) ); + connect( m_pImageFileNameBrowse, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotImageFileBrowseClicked( ) ) ); + connect( m_pImageFileNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotImageFileNameChanged( const TQString& ) ) ); + connect( m_pEnableFilterAllEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFilterAllClicked( ) ) ); + connect( m_pEnableTransmitAllEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotTransmitAllClicked( ) ) ); + connect( m_pFilterAllEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pTransmitAllEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOnceEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMImageMapEdit::createBottomWidgets( ) { - topLayout( )->addWidget( new QLabel( i18n( "Indexed filters" ), this ) ); - m_pFiltersWidget = new QWidget( this ); + topLayout( )->addWidget( new TQLabel( i18n( "Indexed filters" ), this ) ); + m_pFiltersWidget = new TQWidget( this ); topLayout( )->addWidget( m_pFiltersWidget ); - topLayout( )->addWidget( new QLabel( i18n( "Indexed transmits" ), this ) ); - m_pTransmitsWidget = new QWidget( this ); + topLayout( )->addWidget( new TQLabel( i18n( "Indexed transmits" ), this ) ); + m_pTransmitsWidget = new TQWidget( this ); topLayout( )->addWidget( m_pTransmitsWidget ); @@ -231,8 +231,8 @@ void PMImageMapEdit::displayObject( PMObject* o ) } -void PMImageMapEdit::displayPaletteEntries( const QValueList<PMPaletteValue>& filters, - const QValueList<PMPaletteValue>& transmits ) +void PMImageMapEdit::displayPaletteEntries( const TQValueList<PMPaletteValue>& filters, + const TQValueList<PMPaletteValue>& transmits ) { bool readOnly = m_pDisplayedObject->isReadOnly( ); @@ -241,10 +241,10 @@ void PMImageMapEdit::displayPaletteEntries( const QValueList<PMPaletteValue>& fi int i; PMPaletteValueEdit* edit; - QPushButton* button; - QGridLayout* gl; - QPixmap addButtonPixmap = SmallIcon( "pmaddpoint" ); - QPixmap removeButtonPixmap = SmallIcon( "pmremovepoint" ); + TQPushButton* button; + TQGridLayout* gl; + TQPixmap addButtonPixmap = SmallIcon( "pmaddpoint" ); + TQPixmap removeButtonPixmap = SmallIcon( "pmremovepoint" ); // First let's deal with the filter entries... if( m_pFiltersWidget->layout( ) ) @@ -260,45 +260,45 @@ void PMImageMapEdit::displayPaletteEntries( const QValueList<PMPaletteValue>& fi m_filterAddButtons.setAutoDelete( false ); m_filterRemoveButtons.setAutoDelete( false ); - gl = new QGridLayout( m_pFiltersWidget, nfilters + 1, 3, 0, KDialog::spacingHint( ) ); + gl = new TQGridLayout( m_pFiltersWidget, nfilters + 1, 3, 0, KDialog::spacingHint( ) ); - button = new QPushButton( m_pFiltersWidget ); + button = new TQPushButton( m_pFiltersWidget ); button->setPixmap( addButtonPixmap ); m_filterAddButtons.append( button ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotAddFilterEntry( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddFilterEntry( ) ) ); gl->addWidget( button, 0, 1 ); button->show( ); button->setEnabled( !readOnly ); - QToolTip::add( button, i18n( "Add new filter" ) ); + TQToolTip::add( button, i18n( "Add new filter" ) ); for( i = 0; i < nfilters; i ++ ) { edit = new PMPaletteValueEdit( m_pFiltersWidget ); m_filterEntries.append( edit ); - connect( edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); gl->addWidget( edit, i+1, 0 ); edit->setIndex( filters[ i ].index( ) ); edit->setValue( filters[ i ].value( ) ); edit->show( ); edit->setReadOnly( readOnly ); - button = new QPushButton( m_pFiltersWidget ); + button = new TQPushButton( m_pFiltersWidget ); button->setPixmap( addButtonPixmap ); m_filterAddButtons.append( button ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotAddFilterEntry( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddFilterEntry( ) ) ); gl->addWidget( button, i+1, 1 ); button->show( ); button->setEnabled( !readOnly ); - QToolTip::add( button, i18n( "Add new filter" ) ); + TQToolTip::add( button, i18n( "Add new filter" ) ); - button = new QPushButton( m_pFiltersWidget ); + button = new TQPushButton( m_pFiltersWidget ); button->setPixmap( removeButtonPixmap ); m_filterRemoveButtons.append( button ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotRemoveFilterEntry( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveFilterEntry( ) ) ); gl->addWidget( button, i+1, 2 ); button->show( ); button->setEnabled( !readOnly ); - QToolTip::add( button, i18n( "Remove filter" ) ); + TQToolTip::add( button, i18n( "Remove filter" ) ); } // ...next the transmit entries @@ -316,45 +316,45 @@ void PMImageMapEdit::displayPaletteEntries( const QValueList<PMPaletteValue>& fi if( m_pTransmitsWidget->layout( ) ) delete m_pTransmitsWidget->layout( ); - gl = new QGridLayout( m_pTransmitsWidget, ntransmits + 1, 3, 0, KDialog::spacingHint( ) ); + gl = new TQGridLayout( m_pTransmitsWidget, ntransmits + 1, 3, 0, KDialog::spacingHint( ) ); - button = new QPushButton( m_pTransmitsWidget ); + button = new TQPushButton( m_pTransmitsWidget ); button->setPixmap( addButtonPixmap ); m_transmitAddButtons.append( button ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotAddTransmitEntry( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddTransmitEntry( ) ) ); gl->addWidget( button, 0, 1 ); button->show( ); button->setEnabled( !readOnly ); - QToolTip::add( button, i18n( "Add new transmit" ) ); + TQToolTip::add( button, i18n( "Add new transmit" ) ); for( i = 0; i < ntransmits; i ++ ) { edit = new PMPaletteValueEdit( m_pTransmitsWidget ); m_transmitEntries.append( edit ); - connect( edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); gl->addWidget( edit, i+1, 0 ); edit->setIndex( transmits[ i ].index( ) ); edit->setValue( transmits[ i ].value( ) ); edit->show( ); edit->setReadOnly( readOnly ); - button = new QPushButton( m_pTransmitsWidget ); + button = new TQPushButton( m_pTransmitsWidget ); button->setPixmap( addButtonPixmap ); m_transmitAddButtons.append( button ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotAddTransmitEntry( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddTransmitEntry( ) ) ); gl->addWidget( button, i+1, 1 ); button->show( ); button->setEnabled( !readOnly ); - QToolTip::add( button, i18n( "Add new transmit" ) ); + TQToolTip::add( button, i18n( "Add new transmit" ) ); - button = new QPushButton( m_pTransmitsWidget ); + button = new TQPushButton( m_pTransmitsWidget ); button->setPixmap( removeButtonPixmap ); m_transmitRemoveButtons.append( button ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotRemoveTransmitEntry( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveTransmitEntry( ) ) ); gl->addWidget( button, i+1, 2 ); button->show( ); button->setEnabled( !readOnly ); - QToolTip::add( button, i18n( "Remove transmit" ) ); + TQToolTip::add( button, i18n( "Remove transmit" ) ); } } @@ -440,12 +440,12 @@ bool PMImageMapEdit::isDataValid( ) if( !m_pFilterAllEdit->isDataValid( ) ) return false; if( !m_pTransmitAllEdit->isDataValid( ) ) return false; - QPtrListIterator<PMPaletteValueEdit> it_filters( m_filterEntries ); + TQPtrListIterator<PMPaletteValueEdit> it_filters( m_filterEntries ); for( ; it_filters.current( ); ++it_filters ) if( !( it_filters.current( )->isDataValid( ) ) ) return false; - QPtrListIterator<PMPaletteValueEdit> it_transmits( m_transmitEntries ); + TQPtrListIterator<PMPaletteValueEdit> it_transmits( m_transmitEntries ); for( ; it_transmits.current( ); ++it_transmits ) if( !( it_transmits.current( )->isDataValid( ) ) ) return false; @@ -468,14 +468,14 @@ void PMImageMapEdit::slotMapTypeChanged( const int /*a*/ ) emit dataChanged( ); } -void PMImageMapEdit::slotImageFileNameChanged( const QString& /*a*/ ) +void PMImageMapEdit::slotImageFileNameChanged( const TQString& /*a*/ ) { emit dataChanged( ); } void PMImageMapEdit::slotImageFileBrowseClicked( ) { - QString str = KFileDialog::getOpenFileName( QString::null, QString::null ); + TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); if( !str.isEmpty() ) { @@ -504,10 +504,10 @@ void PMImageMapEdit::slotTransmitAllClicked( ) emit dataChanged( ); } -QValueList<PMPaletteValue> PMImageMapEdit::filters( ) +TQValueList<PMPaletteValue> PMImageMapEdit::filters( ) { - QValueList<PMPaletteValue> entries; - QPtrListIterator<PMPaletteValueEdit> it( m_filterEntries ); + TQValueList<PMPaletteValue> entries; + TQPtrListIterator<PMPaletteValueEdit> it( m_filterEntries ); for( ; it.current( ); ++it ) entries.append( PMPaletteValue( it.current( )->index( ), it.current( )->value( ) ) ); @@ -515,10 +515,10 @@ QValueList<PMPaletteValue> PMImageMapEdit::filters( ) return entries; } -QValueList<PMPaletteValue> PMImageMapEdit::transmits( ) +TQValueList<PMPaletteValue> PMImageMapEdit::transmits( ) { - QValueList<PMPaletteValue> entries; - QPtrListIterator<PMPaletteValueEdit> it( m_transmitEntries ); + TQValueList<PMPaletteValue> entries; + TQPtrListIterator<PMPaletteValueEdit> it( m_transmitEntries ); for( ; it.current( ); ++it ) entries.append( PMPaletteValue( it.current( )->index( ), it.current( )->value( ) ) ); @@ -528,10 +528,10 @@ QValueList<PMPaletteValue> PMImageMapEdit::transmits( ) void PMImageMapEdit::slotAddFilterEntry( ) { - QValueList<PMPaletteValue> entriesFilters; - QValueListIterator<PMPaletteValue> it; + TQValueList<PMPaletteValue> entriesFilters; + TQValueListIterator<PMPaletteValue> it; PMPaletteValue newEntry; - QPushButton* button = ( QPushButton* ) sender( ); + TQPushButton* button = ( TQPushButton* ) sender( ); if( button ) { @@ -555,9 +555,9 @@ void PMImageMapEdit::slotAddFilterEntry( ) void PMImageMapEdit::slotRemoveFilterEntry( ) { - QValueList<PMPaletteValue> entriesFilters; - QValueListIterator<PMPaletteValue> it; - QPushButton* button = ( QPushButton* ) sender( ); + TQValueList<PMPaletteValue> entriesFilters; + TQValueListIterator<PMPaletteValue> it; + TQPushButton* button = ( TQPushButton* ) sender( ); if( button ) { @@ -576,10 +576,10 @@ void PMImageMapEdit::slotRemoveFilterEntry( ) void PMImageMapEdit::slotAddTransmitEntry( ) { - QValueList<PMPaletteValue> entriesTransmits; - QValueListIterator<PMPaletteValue> it; + TQValueList<PMPaletteValue> entriesTransmits; + TQValueListIterator<PMPaletteValue> it; PMPaletteValue newEntry; - QPushButton* button = ( QPushButton* ) sender( ); + TQPushButton* button = ( TQPushButton* ) sender( ); if( button ) { @@ -603,9 +603,9 @@ void PMImageMapEdit::slotAddTransmitEntry( ) void PMImageMapEdit::slotRemoveTransmitEntry( ) { - QValueList<PMPaletteValue> entriesTransmits; - QValueListIterator<PMPaletteValue> it; - QPushButton* button = ( QPushButton* ) sender( ); + TQValueList<PMPaletteValue> entriesTransmits; + TQValueListIterator<PMPaletteValue> it; + TQPushButton* button = ( TQPushButton* ) sender( ); if( button ) { diff --git a/kpovmodeler/pmimagemapedit.h b/kpovmodeler/pmimagemapedit.h index 86055ea2..49ce3d8c 100644 --- a/kpovmodeler/pmimagemapedit.h +++ b/kpovmodeler/pmimagemapedit.h @@ -30,14 +30,14 @@ class PMImageMap; class PMPaletteValue; class PMVectorEdit; -class QComboBox; +class TQComboBox; class PMFloatEdit; class PMIntEdit; -class QLabel; -class QCheckBox; -class QWidget; -class QLineEdit; -class QPushButton; +class TQLabel; +class TQCheckBox; +class TQWidget; +class TQLineEdit; +class TQPushButton; /** * Dialog edit class for @ref PMImageMap. @@ -50,7 +50,7 @@ public: /** * Creates a PMImageMapEdit with parent and name */ - PMImageMapEdit( QWidget* parent, const char* name = 0 ); + PMImageMapEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -65,12 +65,12 @@ protected: /** */ virtual void saveContents( ); /** */ - QValueList<PMPaletteValue> filters( ); + TQValueList<PMPaletteValue> filters( ); /** */ - QValueList<PMPaletteValue> transmits( ); + TQValueList<PMPaletteValue> transmits( ); /** */ - void displayPaletteEntries( const QValueList<PMPaletteValue>& filters, - const QValueList<PMPaletteValue>& transmits ); + void displayPaletteEntries( const TQValueList<PMPaletteValue>& filters, + const TQValueList<PMPaletteValue>& transmits ); private slots: /** */ @@ -80,7 +80,7 @@ private slots: /** */ void slotInterpolateTypeChanged( int a ); /** */ - void slotImageFileNameChanged( const QString& a ); + void slotImageFileNameChanged( const TQString& a ); /** */ void slotImageFileBrowseClicked( ); /** */ @@ -97,25 +97,25 @@ private slots: void slotRemoveTransmitEntry( ); private: PMImageMap* m_pDisplayedObject; - QComboBox* m_pImageFileTypeEdit; - QLineEdit* m_pImageFileNameEdit; - QPushButton* m_pImageFileNameBrowse; - QCheckBox* m_pOnceEdit; - QComboBox* m_pMapTypeEdit; - QComboBox* m_pInterpolateTypeEdit; - QCheckBox* m_pEnableFilterAllEdit; - QCheckBox* m_pEnableTransmitAllEdit; + TQComboBox* m_pImageFileTypeEdit; + TQLineEdit* m_pImageFileNameEdit; + TQPushButton* m_pImageFileNameBrowse; + TQCheckBox* m_pOnceEdit; + TQComboBox* m_pMapTypeEdit; + TQComboBox* m_pInterpolateTypeEdit; + TQCheckBox* m_pEnableFilterAllEdit; + TQCheckBox* m_pEnableTransmitAllEdit; PMFloatEdit* m_pFilterAllEdit; PMFloatEdit* m_pTransmitAllEdit; - QWidget* m_pFiltersWidget; - QWidget* m_pTransmitsWidget; + TQWidget* m_pFiltersWidget; + TQWidget* m_pTransmitsWidget; - QPtrList<PMPaletteValueEdit> m_filterEntries; - QPtrList<QPushButton> m_filterAddButtons; - QPtrList<QPushButton> m_filterRemoveButtons; - QPtrList<PMPaletteValueEdit> m_transmitEntries; - QPtrList<QPushButton> m_transmitAddButtons; - QPtrList<QPushButton> m_transmitRemoveButtons; + TQPtrList<PMPaletteValueEdit> m_filterEntries; + TQPtrList<TQPushButton> m_filterAddButtons; + TQPtrList<TQPushButton> m_filterRemoveButtons; + TQPtrList<PMPaletteValueEdit> m_transmitEntries; + TQPtrList<TQPushButton> m_transmitAddButtons; + TQPtrList<TQPushButton> m_transmitRemoveButtons; }; #endif diff --git a/kpovmodeler/pminserterrordialog.cpp b/kpovmodeler/pminserterrordialog.cpp index 766db20a..9dd7867a 100644 --- a/kpovmodeler/pminserterrordialog.cpp +++ b/kpovmodeler/pminserterrordialog.cpp @@ -18,25 +18,25 @@ #include "pminserterrordialog.h" #include <klocale.h> -#include <qlabel.h> -#include <qlistbox.h> -#include <qvbox.h> +#include <tqlabel.h> +#include <tqlistbox.h> +#include <tqvbox.h> PMInsertErrorDialog::PMInsertErrorDialog( int numObj, int numErrors, - const QStringList& details, - QWidget* parent /*= 0*/, const char* name /*= 0*/ ) + const TQStringList& details, + TQWidget* parent /*= 0*/, const char* name /*= 0*/ ) : KDialogBase( parent, name, true, i18n( "Insert Errors" ), Help | Ok | User1, Ok, false, i18n( "Details" ) ) { - QVBox* page = makeVBoxMainWidget( ); - new QLabel( i18n( "%1 of %2 objects couldn't be inserted." ) + TQVBox* page = makeVBoxMainWidget( ); + new TQLabel( i18n( "%1 of %2 objects couldn't be inserted." ) .arg( numErrors ).arg( numObj ), page ); - m_pDetailsLabel = new QLabel( i18n( "Objects not inserted:" ), page ); + m_pDetailsLabel = new TQLabel( i18n( "Objects not inserted:" ), page ); m_pDetailsLabel->hide( ); - m_pDetails = new QListBox( page ); + m_pDetails = new TQListBox( page ); m_pDetails->insertStringList( details, 0 ); m_pDetails->setMinimumHeight( 150 ); m_pDetails->hide( ); diff --git a/kpovmodeler/pminserterrordialog.h b/kpovmodeler/pminserterrordialog.h index d94be0f6..9a2c1d2e 100644 --- a/kpovmodeler/pminserterrordialog.h +++ b/kpovmodeler/pminserterrordialog.h @@ -25,10 +25,10 @@ #endif #include <kdialogbase.h> -#include <qstringlist.h> +#include <tqstringlist.h> -class QListBox; -class QLabel; +class TQListBox; +class TQLabel; /** * Dialog that is shown if not all objects could be inserted @@ -41,14 +41,14 @@ public: * Creates a modal PMInsertErrorDialog with parent and name. */ PMInsertErrorDialog( int NumberOfObjects, int NumberOfInsertErrors, - const QStringList& details, - QWidget* parent = 0, const char* name = 0 ); + const TQStringList& details, + TQWidget* parent = 0, const char* name = 0 ); protected slots: void slotUser1( ); private: - QListBox* m_pDetails; - QLabel* m_pDetailsLabel; + TQListBox* m_pDetails; + TQLabel* m_pDetailsLabel; }; #endif diff --git a/kpovmodeler/pminsertpopup.cpp b/kpovmodeler/pminsertpopup.cpp index be6a527d..0f8ffb23 100644 --- a/kpovmodeler/pminsertpopup.cpp +++ b/kpovmodeler/pminsertpopup.cpp @@ -19,15 +19,15 @@ #include "pminsertpopup.h" #include <klocale.h> #include <kiconloader.h> -#include <qcursor.h> +#include <tqcursor.h> -PMInsertPopup::PMInsertPopup( QWidget* parent, bool multipleObjects, +PMInsertPopup::PMInsertPopup( TQWidget* parent, bool multipleObjects, int items, bool canInsertAllAsFirstChildren, bool canInsertAllAsLastChildren, bool canInsertAllAsSiblings, const char* name ) : KPopupMenu( parent, name ) { - QString itemText; + TQString itemText; if( multipleObjects ) { insertTitle( i18n( "Insert Objects As" ) ); @@ -71,7 +71,7 @@ PMInsertPopup::PMInsertPopup( QWidget* parent, bool multipleObjects, } } -int PMInsertPopup::choosePlace( QWidget* parent, bool multipleObjects, +int PMInsertPopup::choosePlace( TQWidget* parent, bool multipleObjects, int items, bool canInsertAllAsFirstChildren, bool canInsertAllAsLastChildren, bool canInsertAllAsSiblings ) @@ -81,7 +81,7 @@ int PMInsertPopup::choosePlace( QWidget* parent, bool multipleObjects, canInsertAllAsFirstChildren, canInsertAllAsLastChildren, canInsertAllAsSiblings ); - result = popup->exec( QCursor::pos( ) ); + result = popup->exec( TQCursor::pos( ) ); if( result < 0 ) result = 0; delete popup; diff --git a/kpovmodeler/pminsertpopup.h b/kpovmodeler/pminsertpopup.h index c5e99dac..09aa796a 100644 --- a/kpovmodeler/pminsertpopup.h +++ b/kpovmodeler/pminsertpopup.h @@ -45,7 +45,7 @@ public: * of PMIFirstChild, PMILastChild, PMISibling. * @param name Internal name of the popup menu */ - PMInsertPopup( QWidget* parent, bool multipleObjects, + PMInsertPopup( TQWidget* parent, bool multipleObjects, int items = PMIFirstChild | PMILastChild | PMISibling, bool canInsertAllAsFirstChildren = true, bool canInsertAllAsLastChildren = true, @@ -70,7 +70,7 @@ public: * * Returns the selected item or 0 if no item was selected. */ - static int choosePlace( QWidget* parent, bool multipleObjects, + static int choosePlace( TQWidget* parent, bool multipleObjects, int items = PMIFirstChild | PMILastChild | PMISibling, bool canInsertAllAsFirstChildren = true, diff --git a/kpovmodeler/pminsertrulesystem.cpp b/kpovmodeler/pminsertrulesystem.cpp index 0e7b7be2..3c601df7 100644 --- a/kpovmodeler/pminsertrulesystem.cpp +++ b/kpovmodeler/pminsertrulesystem.cpp @@ -21,17 +21,17 @@ #include "pmvariant.h" #include "pmdebug.h" -#include <qfile.h> +#include <tqfile.h> #include <kstandarddirs.h> -bool isCategory( QDomElement& e ) +bool isCategory( TQDomElement& e ) { return( e.tagName( ) == "class" || e.tagName( ) == "group" ); } -PMRuleCategory* newCategory( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleCategory* newCategory( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) { if( e.tagName( ) == "class" ) return new PMRuleClass( e ); @@ -42,7 +42,7 @@ PMRuleCategory* newCategory( QDomElement& e, PMPrototypeManager* PMRuleClass::s_pPrototypeManager = 0; -PMRuleClass::PMRuleClass( QDomElement& e ) +PMRuleClass::PMRuleClass( TQDomElement& e ) : PMRuleCategory( ) { m_pPrototypeManager = s_pPrototypeManager; @@ -54,26 +54,26 @@ PMRuleClass::PMRuleClass( QDomElement& e ) << m_className << endl; } -bool PMRuleClass::matches( const QString& className ) +bool PMRuleClass::matches( const TQString& className ) { return m_pPrototypeManager->isA( className, m_className ); } -PMRuleGroup::PMRuleGroup( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleGroup::PMRuleGroup( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCategory( ) { m_pGroup = 0; - QString groupName = e.attribute( "name" ); + TQString groupName = e.attribute( "name" ); if( groupName.isEmpty( ) ) kdError( PMArea ) << "RuleSystem: Invalid group name" << endl; // find group - QPtrListIterator<PMRuleDefineGroup> lit( localGroups ); + TQPtrListIterator<PMRuleDefineGroup> lit( localGroups ); for( ; lit.current( ) && !m_pGroup; ++lit ) if( lit.current( )->name( ) == groupName ) m_pGroup = lit.current( ); - QPtrListIterator<PMRuleDefineGroup> git( globalGroups ); + TQPtrListIterator<PMRuleDefineGroup> git( globalGroups ); for( ; git.current( ) && !m_pGroup; ++git ) if( git.current( )->name( ) == groupName ) m_pGroup = git.current( ); @@ -82,27 +82,27 @@ PMRuleGroup::PMRuleGroup( QDomElement& e, << groupName << endl; } -bool PMRuleGroup::matches( const QString& className ) +bool PMRuleGroup::matches( const TQString& className ) { if( m_pGroup ) return m_pGroup->matches( className ); return false; } -PMRuleDefineGroup::PMRuleDefineGroup( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleDefineGroup::PMRuleDefineGroup( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) { m_name = e.attribute( "name" ); if( m_name.isEmpty( ) ) kdError( PMArea ) << "RuleSystem: Invalid group name" << endl; - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); if( isCategory( me ) ) m_categories.append( newCategory( me, globalGroups, localGroups ) ); } @@ -116,23 +116,23 @@ PMRuleDefineGroup::~PMRuleDefineGroup( ) m_categories.clear( ); } -bool PMRuleDefineGroup::matches( const QString& className ) +bool PMRuleDefineGroup::matches( const TQString& className ) { bool m = false; - QPtrListIterator<PMRuleCategory> it( m_categories ); + TQPtrListIterator<PMRuleCategory> it( m_categories ); for( ; it.current( ) && !m; ++it ) m = it.current( )->matches( className ); return m; } -bool isValue( QDomElement& e ) +bool isValue( TQDomElement& e ) { return( e.tagName( ) == "property" || e.tagName( ) == "const" || e.tagName( ) == "count" ); } -bool isCondition( QDomElement& e ) +bool isCondition( TQDomElement& e ) { return( e.tagName( ) == "not" || e.tagName( ) == "and" || e.tagName( ) == "or" || e.tagName( ) == "before" || @@ -141,9 +141,9 @@ bool isCondition( QDomElement& e ) e.tagName( ) == "equal" ); } -PMRuleValue* newValue( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleValue* newValue( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) { if( e.tagName( ) == "property" ) return new PMRuleProperty( e ); @@ -154,9 +154,9 @@ PMRuleValue* newValue( QDomElement& e, return 0; } -PMRuleCondition* newCondition( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleCondition* newCondition( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) { if( e.tagName( ) == "not" ) return new PMRuleNot( e, globalGroups, localGroups ); @@ -185,11 +185,11 @@ PMRuleBase::~PMRuleBase( ) m_children.clear( ); } -void PMRuleBase::countChild( const QString& className, bool afterInsertPoint ) +void PMRuleBase::countChild( const TQString& className, bool afterInsertPoint ) { countChildProtected( className, afterInsertPoint ); - QPtrListIterator<PMRuleBase> it( m_children ); + TQPtrListIterator<PMRuleBase> it( m_children ); for( ; it.current( ); ++it ) it.current( )->countChild( className, afterInsertPoint ); } @@ -198,12 +198,12 @@ void PMRuleBase::reset( ) { resetProtected( ); - QPtrListIterator<PMRuleBase> it( m_children ); + TQPtrListIterator<PMRuleBase> it( m_children ); for( ; it.current( ); ++it ) it.current( )->reset( ); } -PMRuleProperty::PMRuleProperty( QDomElement& e ) +PMRuleProperty::PMRuleProperty( TQDomElement& e ) : PMRuleValue( ) { m_property = e.attribute( "name" ); @@ -221,10 +221,10 @@ PMVariant PMRuleProperty::evaluate( const PMObject* o ) } -PMRuleConstant::PMRuleConstant( QDomElement& e ) +PMRuleConstant::PMRuleConstant( TQDomElement& e ) : PMRuleValue( ) { - QString v = e.attribute( "value" ); + TQString v = e.attribute( "value" ); if( v.isNull( ) ) kdError( PMArea ) << "RuleSystem: Invalid value" << endl; @@ -242,18 +242,18 @@ bool PMRuleConstant::convertTo( PMVariant::PMVariantDataType type ) } -PMRuleCount::PMRuleCount( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleCount::PMRuleCount( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleValue( ) { m_number = 0; - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); if( isCategory( me ) ) m_categories.append( newCategory( me, globalGroups, localGroups ) ); } @@ -272,10 +272,10 @@ PMVariant PMRuleCount::evaluate( const PMObject* ) return PMVariant( m_number ); } -void PMRuleCount::countChildProtected( const QString& className, bool ) +void PMRuleCount::countChildProtected( const TQString& className, bool ) { bool m = false; - QPtrListIterator<PMRuleCategory> it( m_categories ); + TQPtrListIterator<PMRuleCategory> it( m_categories ); for( ; it.current( ) && !m; ++it ) m = it.current( )->matches( className ); if( m ) @@ -287,18 +287,18 @@ void PMRuleCount::resetProtected( ) m_number = 0; } -PMRuleNot::PMRuleNot( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleNot::PMRuleNot( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCondition( ) { m_pChild = 0; - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) && !m_pChild ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); if( isCondition( me ) ) { m_pChild = newCondition( me, globalGroups, localGroups ); @@ -316,17 +316,17 @@ bool PMRuleNot::evaluate( const PMObject* object ) return true; } -PMRuleAnd::PMRuleAnd( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleAnd::PMRuleAnd( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCondition( ) { - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); if( isCondition( me ) ) { PMRuleCondition* c = newCondition( me, globalGroups, localGroups ); @@ -341,23 +341,23 @@ PMRuleAnd::PMRuleAnd( QDomElement& e, bool PMRuleAnd::evaluate( const PMObject* object ) { bool b = true; - QPtrListIterator<PMRuleCondition> it( m_conditions ); + TQPtrListIterator<PMRuleCondition> it( m_conditions ); for( ; it.current( ) && b; ++it ) b = it.current( )->evaluate( object ); return b; } -PMRuleOr::PMRuleOr( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleOr::PMRuleOr( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCondition( ) { - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); if( isCondition( me ) ) { PMRuleCondition* c = newCondition( me, globalGroups, localGroups ); @@ -372,24 +372,24 @@ PMRuleOr::PMRuleOr( QDomElement& e, bool PMRuleOr::evaluate( const PMObject* object ) { bool b = false; - QPtrListIterator<PMRuleCondition> it( m_conditions ); + TQPtrListIterator<PMRuleCondition> it( m_conditions ); for( ; it.current( ) && !b; ++it ) b = it.current( )->evaluate( object ); return b; } -PMRuleBefore::PMRuleBefore( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleBefore::PMRuleBefore( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCondition( ) { m_contains = false; - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); if( isCategory( me ) ) m_categories.append( newCategory( me, globalGroups, localGroups ) ); } @@ -408,12 +408,12 @@ bool PMRuleBefore::evaluate( const PMObject* ) return m_contains; } -void PMRuleBefore::countChildProtected( const QString& className, +void PMRuleBefore::countChildProtected( const TQString& className, bool afterInsertPoint ) { if( afterInsertPoint && !m_contains ) { - QPtrListIterator<PMRuleCategory> it( m_categories ); + TQPtrListIterator<PMRuleCategory> it( m_categories ); for( ; it.current( ) && !m_contains; ++it ) m_contains = it.current( )->matches( className ); } @@ -424,18 +424,18 @@ void PMRuleBefore::resetProtected( ) m_contains = false; } -PMRuleAfter::PMRuleAfter( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleAfter::PMRuleAfter( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCondition( ) { m_contains = false; - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); if( isCategory( me ) ) m_categories.append( newCategory( me, globalGroups, localGroups ) ); } @@ -454,12 +454,12 @@ bool PMRuleAfter::evaluate( const PMObject* ) return m_contains; } -void PMRuleAfter::countChildProtected( const QString& className, +void PMRuleAfter::countChildProtected( const TQString& className, bool afterInsertPoint ) { if( !afterInsertPoint && !m_contains ) { - QPtrListIterator<PMRuleCategory> it( m_categories ); + TQPtrListIterator<PMRuleCategory> it( m_categories ); for( ; it.current( ) && !m_contains; ++it ) m_contains = it.current( )->matches( className ); } @@ -470,18 +470,18 @@ void PMRuleAfter::resetProtected( ) m_contains = false; } -PMRuleContains::PMRuleContains( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleContains::PMRuleContains( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCondition( ) { m_contains = false; - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); if( isCategory( me ) ) m_categories.append( newCategory( me, globalGroups, localGroups ) ); } @@ -500,11 +500,11 @@ bool PMRuleContains::evaluate( const PMObject* ) return m_contains; } -void PMRuleContains::countChildProtected( const QString& className, bool ) +void PMRuleContains::countChildProtected( const TQString& className, bool ) { if( !m_contains ) { - QPtrListIterator<PMRuleCategory> it( m_categories ); + TQPtrListIterator<PMRuleCategory> it( m_categories ); for( ; it.current( ) && !m_contains; ++it ) m_contains = it.current( )->matches( className ); } @@ -515,21 +515,21 @@ void PMRuleContains::resetProtected( ) m_contains = false; } -PMRuleCompare::PMRuleCompare( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleCompare::PMRuleCompare( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCondition( ) { m_pValue[0] = 0; m_pValue[1] = 0; int i = 0; - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) && !m_pValue[1] ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); if( isValue( me ) ) { m_pValue[i] = newValue( me, globalGroups, localGroups ); @@ -585,9 +585,9 @@ bool PMRuleCompare::evaluate( const PMObject* object ) return compare( v[0], v[1] ); } -PMRuleLess::PMRuleLess( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleLess::PMRuleLess( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCompare( e, globalGroups, localGroups ) { } @@ -632,9 +632,9 @@ bool PMRuleLess::compare( const PMVariant& v1, const PMVariant& v2 ) return c; } -PMRuleGreater::PMRuleGreater( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleGreater::PMRuleGreater( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCompare( e, globalGroups, localGroups ) { } @@ -679,9 +679,9 @@ bool PMRuleGreater::compare( const PMVariant& v1, const PMVariant& v2 ) return c; } -PMRuleEqual::PMRuleEqual( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRuleEqual::PMRuleEqual( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleCompare( e, globalGroups, localGroups ) { } @@ -727,19 +727,19 @@ bool PMRuleEqual::compare( const PMVariant& v1, const PMVariant& v2 ) } -PMRule::PMRule( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ) +PMRule::PMRule( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ) : PMRuleBase( ) { m_pCondition = 0; - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) && !m_pCondition ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); if( isCategory( me ) ) m_categories.append( newCategory( me, globalGroups, localGroups ) ); else if( isCondition( me ) ) @@ -758,10 +758,10 @@ PMRule::~PMRule( ) m_categories.clear( ); } -bool PMRule::matches( const QString& className ) +bool PMRule::matches( const TQString& className ) { bool m = false; - QPtrListIterator<PMRuleCategory> it( m_categories ); + TQPtrListIterator<PMRuleCategory> it( m_categories ); for( ; it.current( ) && !m; ++it ) m = it.current( )->matches( className ); return m; @@ -775,8 +775,8 @@ bool PMRule::evaluate( const PMObject* parent ) return m_pCondition->evaluate( parent ); } -PMRuleTargetClass::PMRuleTargetClass( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups ) +PMRuleTargetClass::PMRuleTargetClass( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups ) { m_class = e.attribute( "name" ); if( m_class.isEmpty( ) ) @@ -785,15 +785,15 @@ PMRuleTargetClass::PMRuleTargetClass( QDomElement& e, appendRules( e, globalGroups ); } -void PMRuleTargetClass::appendRules( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups ) +void PMRuleTargetClass::appendRules( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups ) { - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); if( me.tagName( ) == "definegroup" ) m_groups.append( new PMRuleDefineGroup( me, globalGroups, m_groups ) ); if( me.tagName( ) == "rule" ) @@ -826,7 +826,7 @@ PMInsertRuleSystem::~PMInsertRuleSystem( ) m_classRules.clear( ); } -void PMInsertRuleSystem::loadRules( const QString& fileName ) +void PMInsertRuleSystem::loadRules( const TQString& fileName ) { PMRuleClass::s_pPrototypeManager = m_pPart->prototypeManager( ); if( m_loadedFiles.find( fileName ) != m_loadedFiles.end( ) ) @@ -834,7 +834,7 @@ void PMInsertRuleSystem::loadRules( const QString& fileName ) m_loadedFiles.push_back( fileName ); - QString ruleFile = locate( "data", QString( "kpovmodeler/" + fileName ) ); + TQString ruleFile = locate( "data", TQString( "kpovmodeler/" + fileName ) ); if( ruleFile.isEmpty( ) ) { kdError( PMArea ) << "Rule file 'kpovmodeler/" << fileName @@ -842,7 +842,7 @@ void PMInsertRuleSystem::loadRules( const QString& fileName ) return; } - QFile file( ruleFile ); + TQFile file( ruleFile ); if( !file.open( IO_ReadOnly ) ) { kdError( PMArea ) << "Could not open rule file 'kpovmodeler/" << fileName @@ -850,29 +850,29 @@ void PMInsertRuleSystem::loadRules( const QString& fileName ) return; } - QDomDocument doc( "insertrules" ); + TQDomDocument doc( "insertrules" ); doc.setContent( &file ); - QDomElement e = doc.documentElement( ); + TQDomElement e = doc.documentElement( ); if( e.attribute( "format" ) != "1.0" ) kdError( PMArea ) << "Rule format " << e.attribute( "format" ) << " not supported." << endl; else { - QDomNode c = e.firstChild( ); - QPtrList<PMRuleDefineGroup> dummyLocalGroups; + TQDomNode c = e.firstChild( ); + TQPtrList<PMRuleDefineGroup> dummyLocalGroups; while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); if( ce.tagName( ) == "definegroup" ) m_groups.append( new PMRuleDefineGroup( ce, m_groups, dummyLocalGroups ) ); else if( ce.tagName( ) == "targetclass" ) { - QString className = ce.attribute( "name" ); + TQString className = ce.attribute( "name" ); // find a target class with the same name PMRuleTargetClass* target = 0; @@ -898,7 +898,7 @@ void PMInsertRuleSystem::loadRules( const QString& fileName ) } bool PMInsertRuleSystem::canInsert( const PMObject* parentObject, - const QString& className, + const TQString& className, const PMObject* after, const PMObjectList* objectsBetween ) { @@ -912,9 +912,9 @@ bool PMInsertRuleSystem::canInsert( const PMObject* parentObject, if( tc ) { // check the exception list - QStringList exceptions = tc->exceptions( ); + TQStringList exceptions = tc->exceptions( ); bool exceptionFound = false; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = exceptions.begin( ); it != exceptions.end( ) && !exceptionFound; ++it ) if( parentObject->isA( *it ) ) @@ -922,7 +922,7 @@ bool PMInsertRuleSystem::canInsert( const PMObject* parentObject, if( !exceptionFound ) { - QPtrListIterator<PMRule> rit = tc->rules( ); + TQPtrListIterator<PMRule> rit = tc->rules( ); // find matching rules for class name for( ; rit.current( ) && !possible; ++rit ) { @@ -975,14 +975,14 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject, const PMObject* after ) { PMObjectListIterator it( list ); - QStringList classes; + TQStringList classes; for( ; it.current( ); ++it ) classes.append( it.current( )->type( ) ); return canInsert( parentObject, classes, after ); } int PMInsertRuleSystem::canInsert( const PMObject* parentObject, - const QStringList& list, + const TQStringList& list, const PMObject* after ) { if( list.size( ) == 1 ) @@ -995,7 +995,7 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject, } // find rules for target class - QPtrList<PMRuleTargetClass> targetClassList; + TQPtrList<PMRuleTargetClass> targetClassList; PMMetaObject* meta = parentObject->metaObject( ); for( ; meta; meta = meta->superClass( ) ) { @@ -1007,10 +1007,10 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject, return 0; // not rules found // count already inserted children - QPtrListIterator<PMRuleTargetClass> tit( targetClassList ); + TQPtrListIterator<PMRuleTargetClass> tit( targetClassList ); for( ; tit.current( ); ++tit ) // ... for all target classes { - QPtrListIterator<PMRule> rit = tit.current( )->rules( ); + TQPtrListIterator<PMRule> rit = tit.current( )->rules( ); for( ; rit.current( ); ++rit ) // ... and all rules { rit.current( )->reset( ); @@ -1028,14 +1028,14 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject, } int number = 0; - QStringList::const_iterator oit; + TQStringList::const_iterator oit; for( oit = list.begin( ); oit != list.end( ); ++oit ) { bool possible = false; for( tit.toFirst( ); tit.current( ) && !possible; ++tit ) { - QPtrListIterator<PMRule> rit = tit.current( )->rules( ); + TQPtrListIterator<PMRule> rit = tit.current( )->rules( ); for( ; rit.current( ) && !possible; ++rit ) { @@ -1049,7 +1049,7 @@ int PMInsertRuleSystem::canInsert( const PMObject* parentObject, // object can be inserted, count it for( ; tit.current( ); ++tit ) { - QPtrListIterator<PMRule> rit = tit.current( )->rules( ); + TQPtrListIterator<PMRule> rit = tit.current( )->rules( ); for( ; rit.current( ); ++rit ) rit.current( )->countChild( *oit, false ); } diff --git a/kpovmodeler/pminsertrulesystem.h b/kpovmodeler/pminsertrulesystem.h index 499cbc8e..69f78deb 100644 --- a/kpovmodeler/pminsertrulesystem.h +++ b/kpovmodeler/pminsertrulesystem.h @@ -25,10 +25,10 @@ #include "pmobject.h" -#include <qstringlist.h> -#include <qptrlist.h> -#include <qdict.h> -#include <qdom.h> +#include <tqstringlist.h> +#include <tqptrlist.h> +#include <tqdict.h> +#include <tqdom.h> class PMInsertRuleSystem; class PMPrototypeManager; @@ -51,7 +51,7 @@ public: /** * Returns true if the given class types matches the category. */ - virtual bool matches( const QString& className ) = 0; + virtual bool matches( const TQString& className ) = 0; }; /** @@ -66,13 +66,13 @@ public: */ static PMPrototypeManager* s_pPrototypeManager; /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleClass( QDomElement& e ); + PMRuleClass( TQDomElement& e ); /** */ - virtual bool matches( const QString& className ); + virtual bool matches( const TQString& className ); private: - QString m_className; + TQString m_className; PMPrototypeManager* m_pPrototypeManager; }; @@ -84,10 +84,10 @@ class PMRuleDefineGroup { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleDefineGroup( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleDefineGroup( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** * Destructor */ @@ -95,14 +95,14 @@ public: /** * Returns true if the given class types matches the category. */ - virtual bool matches( const QString& className ); + virtual bool matches( const TQString& className ); /** * Returns the group's name */ - QString name( ) const { return m_name; } + TQString name( ) const { return m_name; } private: - QPtrList<PMRuleCategory> m_categories; - QString m_name; + TQPtrList<PMRuleCategory> m_categories; + TQString m_name; }; /** @@ -112,12 +112,12 @@ class PMRuleGroup : public PMRuleCategory { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleGroup( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleGroup( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** */ - bool matches( const QString& className ); + bool matches( const TQString& className ); private: PMRuleDefineGroup* m_pGroup; }; @@ -140,11 +140,11 @@ public: /** * Returns the node type. */ - virtual QString type( ) const = 0; + virtual TQString type( ) const = 0; /** * Calls countChildProtected for this node and all child nodes */ - void countChild( const QString& className, bool afterInsertPoint ); + void countChild( const TQString& className, bool afterInsertPoint ); /** * Calls resetProtected for this node and all child nodes */ @@ -152,16 +152,16 @@ public: /** * Returns an iterator to all child nodes */ - QPtrListIterator<PMRuleBase> childIterator( ) const + TQPtrListIterator<PMRuleBase> childIterator( ) const { - return QPtrListIterator<PMRuleBase>( m_children ); + return TQPtrListIterator<PMRuleBase>( m_children ); } protected: /** * Reimplement this method if the nodes value depends * on already inserted child objects. */ - virtual void countChildProtected( const QString&, bool ) { } + virtual void countChildProtected( const TQString&, bool ) { } /** * Reset all cached data (like counted child objects) here. */ @@ -170,7 +170,7 @@ protected: /** * Add all child nodes to this list. */ - QPtrList<PMRuleBase> m_children; + TQPtrList<PMRuleBase> m_children; }; /** @@ -199,15 +199,15 @@ class PMRuleProperty : public PMRuleValue { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleProperty( QDomElement& e ); + PMRuleProperty( TQDomElement& e ); /** */ - virtual QString type( ) const { return QString( "Property" ); } + virtual TQString type( ) const { return TQString( "Property" ); } /** */ virtual PMVariant evaluate( const PMObject* o ); private: - QString m_property; + TQString m_property; }; @@ -218,11 +218,11 @@ class PMRuleConstant : public PMRuleValue { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleConstant( QDomElement& e ); + PMRuleConstant( TQDomElement& e ); /** */ - virtual QString type( ) const { return QString( "Constant" ); } + virtual TQString type( ) const { return TQString( "Constant" ); } /** */ virtual PMVariant evaluate( const PMObject* ); /** @@ -241,28 +241,28 @@ class PMRuleCount : public PMRuleValue { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleCount( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleCount( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** * Destructor */ virtual ~PMRuleCount( ); /** */ - virtual QString type( ) const { return QString( "Count" ); } + virtual TQString type( ) const { return TQString( "Count" ); } /** */ virtual PMVariant evaluate( const PMObject* ); protected: /** */ - virtual void countChildProtected( const QString& className, + virtual void countChildProtected( const TQString& className, bool afterInsertPoint ); /** * Reset all cached data (like counted child objects) here. */ virtual void resetProtected( ); private: - QPtrList<PMRuleCategory> m_categories; + TQPtrList<PMRuleCategory> m_categories; int m_number; }; @@ -292,12 +292,12 @@ class PMRuleNot : public PMRuleCondition { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleNot( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleNot( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** */ - virtual QString type( ) const { return QString( "Not" ); } + virtual TQString type( ) const { return TQString( "Not" ); } /** */ virtual bool evaluate( const PMObject* object ); private: @@ -312,16 +312,16 @@ class PMRuleAnd : public PMRuleCondition { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleAnd( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleAnd( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** */ - virtual QString type( ) const { return QString( "And" ); } + virtual TQString type( ) const { return TQString( "And" ); } /** */ virtual bool evaluate( const PMObject* object ); private: - QPtrList<PMRuleCondition> m_conditions; + TQPtrList<PMRuleCondition> m_conditions; }; /** @@ -331,16 +331,16 @@ class PMRuleOr : public PMRuleCondition { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleOr( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleOr( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** */ - virtual QString type( ) const { return QString( "Or" ); } + virtual TQString type( ) const { return TQString( "Or" ); } /** */ virtual bool evaluate( const PMObject* object ); private: - QPtrList<PMRuleCondition> m_conditions; + TQPtrList<PMRuleCondition> m_conditions; }; /** @@ -351,26 +351,26 @@ class PMRuleBefore : public PMRuleCondition { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleBefore( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleBefore( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** * Destructor */ virtual ~PMRuleBefore( ); /** */ - virtual QString type( ) const { return QString( "Before" ); } + virtual TQString type( ) const { return TQString( "Before" ); } /** */ virtual bool evaluate( const PMObject* object ); protected: /** */ - virtual void countChildProtected( const QString& className, + virtual void countChildProtected( const TQString& className, bool afterInsertPoint ); /** */ virtual void resetProtected( ); private: - QPtrList<PMRuleCategory> m_categories; + TQPtrList<PMRuleCategory> m_categories; bool m_contains; }; @@ -382,26 +382,26 @@ class PMRuleAfter : public PMRuleCondition { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleAfter( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleAfter( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** * Destructor */ virtual ~PMRuleAfter( ); /** */ - virtual QString type( ) const { return QString( "After" ); } + virtual TQString type( ) const { return TQString( "After" ); } /** */ virtual bool evaluate( const PMObject* object ); protected: /** */ - virtual void countChildProtected( const QString& className, + virtual void countChildProtected( const TQString& className, bool afterInsertPoint ); /** */ virtual void resetProtected( ); private: - QPtrList<PMRuleCategory> m_categories; + TQPtrList<PMRuleCategory> m_categories; bool m_contains; }; @@ -413,26 +413,26 @@ class PMRuleContains : public PMRuleCondition { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleContains( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleContains( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** * Destructor */ virtual ~PMRuleContains( ); /** */ - virtual QString type( ) const { return QString( "Contains" ); } + virtual TQString type( ) const { return TQString( "Contains" ); } /** */ virtual bool evaluate( const PMObject* object ); protected: /** */ - virtual void countChildProtected( const QString& className, + virtual void countChildProtected( const TQString& className, bool afterInsertPoint ); /** */ virtual void resetProtected( ); private: - QPtrList<PMRuleCategory> m_categories; + TQPtrList<PMRuleCategory> m_categories; bool m_contains; }; @@ -443,10 +443,10 @@ class PMRuleCompare : public PMRuleCondition { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleCompare( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleCompare( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** */ virtual bool evaluate( const PMObject* object ); protected: @@ -467,12 +467,12 @@ class PMRuleLess : public PMRuleCompare { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleLess( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleLess( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** */ - virtual QString type( ) const { return QString( "Less" ); } + virtual TQString type( ) const { return TQString( "Less" ); } protected: /** */ virtual bool compare( const PMVariant& v1, const PMVariant& v2 ); @@ -485,12 +485,12 @@ class PMRuleGreater : public PMRuleCompare { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleGreater( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleGreater( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** */ - virtual QString type( ) const { return QString( "Greater" ); } + virtual TQString type( ) const { return TQString( "Greater" ); } protected: /** */ virtual bool compare( const PMVariant& v1, const PMVariant& v2 ); @@ -503,12 +503,12 @@ class PMRuleEqual : public PMRuleCompare { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleEqual( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRuleEqual( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** */ - virtual QString type( ) const { return QString( "Equal" ); } + virtual TQString type( ) const { return TQString( "Equal" ); } protected: /** */ virtual bool compare( const PMVariant& v1, const PMVariant& v2 ); @@ -518,27 +518,27 @@ class PMRule : public PMRuleBase { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRule( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups, - QPtrList<PMRuleDefineGroup>& localGroups ); + PMRule( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups, + TQPtrList<PMRuleDefineGroup>& localGroups ); /** * Destructor */ virtual ~PMRule( ); /** */ - virtual QString type( ) const { return QString( "Rule" ); } + virtual TQString type( ) const { return TQString( "Rule" ); } /** * Returns true if this rule matches for the given class. */ - bool matches( const QString& className ); + bool matches( const TQString& className ); /** * Returns the conditions value. */ bool evaluate( const PMObject* parent ); private: - QPtrList<PMRuleCategory> m_categories; + TQPtrList<PMRuleCategory> m_categories; PMRuleCondition* m_pCondition; }; @@ -551,10 +551,10 @@ class PMRuleTargetClass { public: /** - * Reads the data from the QDomElement. + * Reads the data from the TQDomElement. */ - PMRuleTargetClass( QDomElement& e, - QPtrList<PMRuleDefineGroup>& globalGroups ); + PMRuleTargetClass( TQDomElement& e, + TQPtrList<PMRuleDefineGroup>& globalGroups ); /** * Destructor */ @@ -564,27 +564,27 @@ public: * Reads rules and groups from the QDomELement and appends * them to the local ones. */ - void appendRules( QDomElement& e, QPtrList<PMRuleDefineGroup>& globalGroups ); + void appendRules( TQDomElement& e, TQPtrList<PMRuleDefineGroup>& globalGroups ); /** * Returns an iterator to the rules */ - QPtrListIterator<PMRule> rules( ) const + TQPtrListIterator<PMRule> rules( ) const { - return QPtrListIterator<PMRule>( m_rules ); + return TQPtrListIterator<PMRule>( m_rules ); } /** * Returns the class name */ - QString name( ) const { return m_class; } + TQString name( ) const { return m_class; } /** * Returns a list of exceptions for this rule. */ - QStringList exceptions( ) const { return m_exceptions; } + TQStringList exceptions( ) const { return m_exceptions; } private: - QPtrList<PMRuleDefineGroup> m_groups; - QPtrList<PMRule> m_rules; - QString m_class; - QStringList m_exceptions; + TQPtrList<PMRuleDefineGroup> m_groups; + TQPtrList<PMRule> m_rules; + TQString m_class; + TQStringList m_exceptions; }; /** @@ -615,7 +615,7 @@ public: * Rules are never loaded twice for the same file. It is save * to call this method twice for the same file. */ - void loadRules( const QString& fileName ); + void loadRules( const TQString& fileName ); /** * Returns true if an object of the given class can be inserted as child @@ -624,7 +624,7 @@ public: * The parser uses the third parameter for top level objects. These objects * have to be treated as if they are inserted after the object after. */ - bool canInsert( const PMObject* parentObject, const QString& className, + bool canInsert( const PMObject* parentObject, const TQString& className, const PMObject* after, const PMObjectList* objectsBetween = 0 ); /** @@ -647,7 +647,7 @@ public: /** * Returns the number of objects that can be inserted at that position */ - int canInsert( const PMObject* parentObject, const QStringList& listOfClasses, + int canInsert( const PMObject* parentObject, const TQStringList& listOfClasses, const PMObject* after ); /** * Returns a pointer to the part @@ -658,20 +658,20 @@ private: /** * List of all rules. */ - QPtrList<PMRuleTargetClass> m_classRules; + TQPtrList<PMRuleTargetClass> m_classRules; /** * List of global groups */ - QPtrList<PMRuleDefineGroup> m_groups; + TQPtrList<PMRuleDefineGroup> m_groups; /** * Dictionary that maps from the class name * to a list of rules that match. */ - QDict<PMRuleTargetClass> m_rulesDict; + TQDict<PMRuleTargetClass> m_rulesDict; /** * List of already loaded files */ - QStringList m_loadedFiles; + TQStringList m_loadedFiles; PMPart* m_pPart; }; diff --git a/kpovmodeler/pminterior.cpp b/kpovmodeler/pminterior.cpp index 31d7bf5d..53a69f79 100644 --- a/kpovmodeler/pminterior.cpp +++ b/kpovmodeler/pminterior.cpp @@ -120,12 +120,12 @@ void PMInterior::cleanUp( ) const Base::cleanUp( ); } -QString PMInterior::description( ) const +TQString PMInterior::description( ) const { return i18n( "interior" ); } -void PMInterior::serialize( QDomElement& e, QDomDocument& doc ) const +void PMInterior::serialize( TQDomElement& e, TQDomDocument& doc ) const { Base::serialize( e, doc ); e.setAttribute( "enable_ior", m_enableIor ); @@ -281,7 +281,7 @@ void PMInterior::enableFadePower( bool c ) } } -PMDialogEditBase* PMInterior::editWidget( QWidget* parent ) const +PMDialogEditBase* PMInterior::editWidget( TQWidget* parent ) const { return new PMInteriorEdit( parent ); } diff --git a/kpovmodeler/pminterior.h b/kpovmodeler/pminterior.h index 159b6b64..8e3c9172 100644 --- a/kpovmodeler/pminterior.h +++ b/kpovmodeler/pminterior.h @@ -50,7 +50,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMInterior( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -58,16 +58,16 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMInteriorEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pminterior" ); } + virtual TQString pixmap( ) const { return TQString( "pminterior" ); } /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pminterioredit.cpp b/kpovmodeler/pminterioredit.cpp index b5df1825..4b8b2381 100644 --- a/kpovmodeler/pminterioredit.cpp +++ b/kpovmodeler/pminterioredit.cpp @@ -21,13 +21,13 @@ #include "pmlineedits.h" #include "pmcoloredit.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> #include <klocale.h> -PMInteriorEdit::PMInteriorEdit( QWidget* parent, const char* name ) +PMInteriorEdit::PMInteriorEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,48 +37,48 @@ void PMInteriorEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - QGridLayout* layout = new QGridLayout( hl ,17 ,6); - m_pEnableIorEdit = new QCheckBox( i18n( "Refraction:" ), this ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + TQGridLayout* layout = new TQGridLayout( hl ,17 ,6); + m_pEnableIorEdit = new TQCheckBox( i18n( "Refraction:" ), this ); m_pIorEdit = new PMFloatEdit( this ); layout->addWidget( m_pEnableIorEdit, 0, 0 ); layout->addWidget( m_pIorEdit, 0, 1 ); - m_pEnableCausticsEdit = new QCheckBox( i18n( "Caustics:" ), this ); + m_pEnableCausticsEdit = new TQCheckBox( i18n( "Caustics:" ), this ); m_pCausticsEdit = new PMFloatEdit( this ); layout->addWidget( m_pEnableCausticsEdit, 1, 0 ); layout->addWidget( m_pCausticsEdit, 1, 1 ); - m_pEnableDispersionEdit = new QCheckBox( i18n( "Dispersion:" ), this ); + m_pEnableDispersionEdit = new TQCheckBox( i18n( "Dispersion:" ), this ); m_pDispersionEdit = new PMFloatEdit( this ); m_pDispersionEdit->setValidation( true, 0, false, 0 ); layout->addWidget( m_pEnableDispersionEdit, 2, 0 ); layout->addWidget( m_pDispersionEdit, 2, 1 ); - m_pEnableDispSamplesEdit = new QCheckBox( i18n( "Dispersion samples:" ), this ); + m_pEnableDispSamplesEdit = new TQCheckBox( i18n( "Dispersion samples:" ), this ); m_pDispSamplesEdit = new PMIntEdit( this ); m_pDispSamplesEdit->setValidation( true, 2, false, 0 ); layout->addWidget( m_pEnableDispSamplesEdit, 3, 0 ); layout->addWidget( m_pDispSamplesEdit, 3, 1 ); - m_pEnableFadeDistanceEdit = new QCheckBox( i18n( "Fade distance:" ), this ); + m_pEnableFadeDistanceEdit = new TQCheckBox( i18n( "Fade distance:" ), this ); m_pFadeDistanceEdit = new PMFloatEdit( this ); layout->addWidget( m_pEnableFadeDistanceEdit, 4, 0 ); layout->addWidget( m_pFadeDistanceEdit, 4, 1 ); - m_pEnableFadePowerEdit = new QCheckBox( i18n( "Fade power:" ), this ); + m_pEnableFadePowerEdit = new TQCheckBox( i18n( "Fade power:" ), this ); m_pFadePowerEdit = new PMFloatEdit( this ); layout->addWidget( m_pEnableFadePowerEdit, 5, 0 ); layout->addWidget( m_pFadePowerEdit, 5, 1 ); hl->addStretch( 1 ); - connect( m_pIorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCausticsEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDispersionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDispSamplesEdit, SIGNAL( dataChanged( ) ), SIGNAL ( dataChanged( ) ) ); - connect( m_pFadeDistanceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFadePowerEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEnableIorEdit, SIGNAL( clicked( ) ), SLOT( slotIorClicked( ) ) ); - connect( m_pEnableCausticsEdit, SIGNAL( clicked( ) ), SLOT( slotCausticsClicked( ) ) ); - connect( m_pEnableDispersionEdit, SIGNAL( clicked( ) ), SLOT( slotDispersionClicked( ) ) ); - connect( m_pEnableDispSamplesEdit, SIGNAL( clicked( ) ), SLOT( slotDispSamplesClicked( ) ) ); - connect( m_pEnableFadeDistanceEdit, SIGNAL( clicked( ) ), SLOT( slotFadeDistanceClicked( ) ) ); - connect( m_pEnableFadePowerEdit, SIGNAL( clicked( ) ), SLOT( slotFadePowerClicked( ) ) ); + connect( m_pIorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCausticsEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDispersionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDispSamplesEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL ( dataChanged( ) ) ); + connect( m_pFadeDistanceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFadePowerEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEnableIorEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotIorClicked( ) ) ); + connect( m_pEnableCausticsEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotCausticsClicked( ) ) ); + connect( m_pEnableDispersionEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDispersionClicked( ) ) ); + connect( m_pEnableDispSamplesEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDispSamplesClicked( ) ) ); + connect( m_pEnableFadeDistanceEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFadeDistanceClicked( ) ) ); + connect( m_pEnableFadePowerEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFadePowerClicked( ) ) ); } void PMInteriorEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pminterioredit.h b/kpovmodeler/pminterioredit.h index 93564bcb..d8512d5e 100644 --- a/kpovmodeler/pminterioredit.h +++ b/kpovmodeler/pminterioredit.h @@ -30,8 +30,8 @@ class PMInterior; class PMIntEdit; class PMFloatEdit; class PMColorEdit; -class QCheckBox; -class QLabel; +class TQCheckBox; +class TQLabel; /** * Dialog edit class for @ref PMInterior @@ -44,7 +44,7 @@ public: /** * Creates a PMInteriorEdit with parent and name */ - PMInteriorEdit( QWidget* parent, const char* name = 0 ); + PMInteriorEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -73,12 +73,12 @@ private: PMIntEdit* m_pDispSamplesEdit; PMFloatEdit* m_pFadeDistanceEdit; PMFloatEdit* m_pFadePowerEdit; - QCheckBox* m_pEnableIorEdit; - QCheckBox* m_pEnableCausticsEdit; - QCheckBox* m_pEnableDispersionEdit; - QCheckBox* m_pEnableDispSamplesEdit; - QCheckBox* m_pEnableFadeDistanceEdit; - QCheckBox* m_pEnableFadePowerEdit; + TQCheckBox* m_pEnableIorEdit; + TQCheckBox* m_pEnableCausticsEdit; + TQCheckBox* m_pEnableDispersionEdit; + TQCheckBox* m_pEnableDispSamplesEdit; + TQCheckBox* m_pEnableFadeDistanceEdit; + TQCheckBox* m_pEnableFadePowerEdit; }; diff --git a/kpovmodeler/pminteriortexture.cpp b/kpovmodeler/pminteriortexture.cpp index f379e4b6..92950050 100644 --- a/kpovmodeler/pminteriortexture.cpp +++ b/kpovmodeler/pminteriortexture.cpp @@ -63,12 +63,12 @@ void PMInteriorTexture::cleanUp( ) const Base::cleanUp( ); } -QString PMInteriorTexture::description( ) const +TQString PMInteriorTexture::description( ) const { return i18n( "interior texture" ); } -PMDialogEditBase* PMInteriorTexture::editWidget( QWidget* parent ) const +PMDialogEditBase* PMInteriorTexture::editWidget( TQWidget* parent ) const { return new PMInteriorTextureEdit( parent ); } diff --git a/kpovmodeler/pminteriortexture.h b/kpovmodeler/pminteriortexture.h index 8682e69d..0711b5c9 100644 --- a/kpovmodeler/pminteriortexture.h +++ b/kpovmodeler/pminteriortexture.h @@ -49,7 +49,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMInteriorTexture( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -59,9 +59,9 @@ public: /** * Returns a new @ref PMTextureEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pminteriortexture" ); } + virtual TQString pixmap( ) const { return TQString( "pminteriortexture" ); } private: static PMMetaObject* s_pMetaObject; diff --git a/kpovmodeler/pminteriortextureedit.cpp b/kpovmodeler/pminteriortextureedit.cpp index 47fe6f38..73f1e7e9 100644 --- a/kpovmodeler/pminteriortextureedit.cpp +++ b/kpovmodeler/pminteriortextureedit.cpp @@ -20,12 +20,12 @@ #include "pminteriortexture.h" #include "pmlinkedit.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMInteriorTextureEdit::PMInteriorTextureEdit( QWidget* parent, const char* name ) +PMInteriorTextureEdit::PMInteriorTextureEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; diff --git a/kpovmodeler/pminteriortextureedit.h b/kpovmodeler/pminteriortextureedit.h index 1594ef6e..ab46142d 100644 --- a/kpovmodeler/pminteriortextureedit.h +++ b/kpovmodeler/pminteriortextureedit.h @@ -39,7 +39,7 @@ public: /** * Creates a PMTextureEdit with parent and name */ - PMInteriorTextureEdit( QWidget* parent, const char* name = 0 ); + PMInteriorTextureEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmiomanager.cpp b/kpovmodeler/pmiomanager.cpp index 72a081d2..946f2bc5 100644 --- a/kpovmodeler/pmiomanager.cpp +++ b/kpovmodeler/pmiomanager.cpp @@ -61,7 +61,7 @@ void PMIOManager::addFormat( PMIOFormat* format ) kdError( PMArea ) << "Format " << format->name( ) << "already registered" << endl; } -void PMIOManager::removeFormat( const QString& name ) +void PMIOManager::removeFormat( const TQString& name ) { PMIOFormat* pFormat = format( name ); if( pFormat ) @@ -71,14 +71,14 @@ void PMIOManager::removeFormat( const QString& name ) } } -PMIOFormat* PMIOManager::format( const QString& name ) const +PMIOFormat* PMIOManager::format( const TQString& name ) const { return m_dict.find( name ); } -PMIOFormat* PMIOManager::formatForMimeType( const QString& mime ) const +PMIOFormat* PMIOManager::formatForMimeType( const TQString& mime ) const { - QPtrListIterator<PMIOFormat> it( m_formats ); + TQPtrListIterator<PMIOFormat> it( m_formats ); bool found = false; PMIOFormat* pFormat = 0; diff --git a/kpovmodeler/pmiomanager.h b/kpovmodeler/pmiomanager.h index ac3b78eb..f167068f 100644 --- a/kpovmodeler/pmiomanager.h +++ b/kpovmodeler/pmiomanager.h @@ -22,17 +22,17 @@ #include <config.h> #endif -#include <qstring.h> -#include <qstringlist.h> -#include <qptrlist.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqptrlist.h> +#include <tqdict.h> class PMParser; class PMSerializer; class PMRenderer; class PMPart; -class QIODevice; +class TQIODevice; /** * Description class for input and output formats. @@ -68,11 +68,11 @@ public: /** * Returns an unique name of this format. */ - virtual QString name( ) const = 0; + virtual TQString name( ) const = 0; /** * Returns a translated description of this format */ - virtual QString description( ) const = 0; + virtual TQString description( ) const = 0; /** * Returns the supported services * (a bitwise combination of the Services enum values) @@ -83,7 +83,7 @@ public: * * The caller is responsible to delete the returned parser. */ - virtual PMParser* newParser( PMPart*, QIODevice* ) const + virtual PMParser* newParser( PMPart*, TQIODevice* ) const { return 0; }; @@ -92,7 +92,7 @@ public: * * The caller is responsible to delete the returned parser. */ - virtual PMParser* newParser( PMPart*, const QByteArray& ) const + virtual PMParser* newParser( PMPart*, const TQByteArray& ) const { return 0; }; @@ -102,7 +102,7 @@ public: * * The caller is responsible to delete the returned device */ - virtual PMSerializer* newSerializer( QIODevice* ) + virtual PMSerializer* newSerializer( TQIODevice* ) { return 0; } @@ -116,23 +116,23 @@ public: /** * Returns the mime type for this format */ - virtual QString mimeType( ) const + virtual TQString mimeType( ) const { - return QString::null; + return TQString::null; } /** * Returns a list of patterns for the import file dialog */ - virtual QStringList importPatterns( ) const + virtual TQStringList importPatterns( ) const { - return QStringList( ); + return TQStringList( ); } /** * Returns a list of patterns for the export file dialog */ - virtual QStringList exportPatterns( ) const + virtual TQStringList exportPatterns( ) const { - return QStringList( ); + return TQStringList( ); } }; @@ -159,25 +159,25 @@ public: /** * Removes a format by name */ - void removeFormat( const QString& name ); + void removeFormat( const TQString& name ); /** * Returns the list of registered io formats */ - const QPtrList<PMIOFormat>& formats( ) const { return m_formats; } + const TQPtrList<PMIOFormat>& formats( ) const { return m_formats; } /** * Returns a view type by name */ - PMIOFormat* format( const QString& name ) const; + PMIOFormat* format( const TQString& name ) const; /** * Returns the first io format that can handle the mime type * or 0 if there is none */ - PMIOFormat* formatForMimeType( const QString& mime ) const; + PMIOFormat* formatForMimeType( const TQString& mime ) const; private: - QPtrList<PMIOFormat> m_formats; - QDict<PMIOFormat> m_dict; + TQPtrList<PMIOFormat> m_formats; + TQDict<PMIOFormat> m_dict; PMPart* m_pPart; }; diff --git a/kpovmodeler/pmisosurface.cpp b/kpovmodeler/pmisosurface.cpp index 16e5e247..c32c0683 100644 --- a/kpovmodeler/pmisosurface.cpp +++ b/kpovmodeler/pmisosurface.cpp @@ -96,14 +96,14 @@ PMIsoSurface::~PMIsoSurface( ) { } -QString PMIsoSurface::description( ) const +TQString PMIsoSurface::description( ) const { return i18n( "isosurface" ); } -void PMIsoSurface::serialize( QDomElement& e, QDomDocument& doc ) const +void PMIsoSurface::serialize( TQDomElement& e, TQDomDocument& doc ) const { - QDomText t = doc.createTextNode( m_function ); + TQDomText t = doc.createTextNode( m_function ); e.appendChild( t ); if( m_containedBy == Box ) @@ -129,11 +129,11 @@ void PMIsoSurface::serialize( QDomElement& e, QDomDocument& doc ) const void PMIsoSurface::readAttributes( const PMXMLHelper& h ) { - QDomNode e = h.element( ).firstChild( ); + TQDomNode e = h.element( ).firstChild( ); if( e.isText( ) ) m_function = e.toText( ).data( ); - QString str = h.stringAttribute( "contained_by", "" ); + TQString str = h.stringAttribute( "contained_by", "" ); if( str == "sphere" ) m_containedBy = Sphere; else @@ -174,7 +174,7 @@ PMMetaObject* PMIsoSurface::metaObject( ) const return s_pMetaObject; } -void PMIsoSurface::setFunction( const QString& f ) +void PMIsoSurface::setFunction( const TQString& f ) { if( f != m_function ) { @@ -333,7 +333,7 @@ void PMIsoSurface::setAllIntersections( bool yes ) } } -PMDialogEditBase* PMIsoSurface::editWidget( QWidget* parent ) const +PMDialogEditBase* PMIsoSurface::editWidget( TQWidget* parent ) const { return new PMIsoSurfaceEdit( parent ); } diff --git a/kpovmodeler/pmisosurface.h b/kpovmodeler/pmisosurface.h index 0646aff3..2a2fb358 100644 --- a/kpovmodeler/pmisosurface.h +++ b/kpovmodeler/pmisosurface.h @@ -57,34 +57,34 @@ public: /** */ virtual PMObject* copy( ) const { return new PMIsoSurface( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMIsoSurfaceEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmisosurface" ); } + virtual TQString pixmap( ) const { return TQString( "pmisosurface" ); } /** * Sets the isosurface function */ - void setFunction( const QString& f ); + void setFunction( const TQString& f ); /** * Returns the isosurface function */ - QString function( ) const { return m_function; } + TQString function( ) const { return m_function; } /** * Sets the type of the contained_by object */ @@ -214,7 +214,7 @@ private: Evaluate0ID, Evaluate1ID, Evaluate2ID, OpenID, MaxTraceID, AllIntersectionsID }; - QString m_function; + TQString m_function; ContainedByType m_containedBy; PMVector m_corner1, m_corner2, m_center; double m_radius, m_threshold, m_accuracy, m_maxGradient; diff --git a/kpovmodeler/pmisosurfaceedit.cpp b/kpovmodeler/pmisosurfaceedit.cpp index b4eb0216..752331b6 100644 --- a/kpovmodeler/pmisosurfaceedit.cpp +++ b/kpovmodeler/pmisosurfaceedit.cpp @@ -21,14 +21,14 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <klocale.h> -PMIsoSurfaceEdit::PMIsoSurfaceEdit( QWidget* parent, const char* name ) +PMIsoSurfaceEdit::PMIsoSurfaceEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,13 +37,13 @@ PMIsoSurfaceEdit::PMIsoSurfaceEdit( QWidget* parent, const char* name ) void PMIsoSurfaceEdit::createTopWidgets( ) { int i; - QGridLayout* gl; - QHBoxLayout* hl; + TQGridLayout* gl; + TQHBoxLayout* hl; Base::createTopWidgets( ); - m_pFunction = new QLineEdit( this ); - m_pContainedBy = new QComboBox( false, this ); + m_pFunction = new TQLineEdit( this ); + m_pContainedBy = new TQComboBox( false, this ); m_pContainedBy->insertItem( i18n( "Box" ) ); m_pContainedBy->insertItem( i18n( "Sphere" ) ); @@ -51,28 +51,28 @@ void PMIsoSurfaceEdit::createTopWidgets( ) m_pCorner2 = new PMVectorEdit( "x", "y", "z", this ); m_pCenter = new PMVectorEdit( "x", "y", "z", this ); m_pRadius = new PMFloatEdit( this ); - m_pCorner1Label = new QLabel( i18n( "Corner1:" ), this ); - m_pCorner2Label = new QLabel( i18n( "Corner2:" ), this ); - m_pCenterLabel = new QLabel( i18n( "Center:" ), this ); - m_pRadiusLabel = new QLabel( i18n( "Radius:" ), this ); + m_pCorner1Label = new TQLabel( i18n( "Corner1:" ), this ); + m_pCorner2Label = new TQLabel( i18n( "Corner2:" ), this ); + m_pCenterLabel = new TQLabel( i18n( "Center:" ), this ); + m_pRadiusLabel = new TQLabel( i18n( "Radius:" ), this ); m_pThreshold = new PMFloatEdit( this ); m_pAccuracy = new PMFloatEdit( this ); m_pAccuracy->setValidation( true, 1e-8, false, 0 ); m_pMaxGradient = new PMFloatEdit( this ); m_pMaxGradient->setValidation( true, 1e-8, false, 0 ); - m_pEvaluate = new QCheckBox( i18n( "Adapt maximum gradient" ), this ); + m_pEvaluate = new TQCheckBox( i18n( "Adapt maximum gradient" ), this ); for( i = 0; i < 3; i++ ) m_pEvaluateValue[i] = new PMFloatEdit( this ); m_pMaxTrace = new PMIntEdit( this ); m_pMaxTrace->setValidation( true, 1, false, 0 ); - m_pAllIntersections = new QCheckBox( i18n( "All intersections" ), this ); - m_pOpen = new QCheckBox( i18n( "type of the object", "Open" ), this ); + m_pAllIntersections = new TQCheckBox( i18n( "All intersections" ), this ); + m_pOpen = new TQCheckBox( i18n( "type of the object", "Open" ), this ); - gl = new QGridLayout( topLayout( ), 8, 2 ); - gl->addWidget( new QLabel( i18n( "Function:" ), this ), 0, 0 ); + gl = new TQGridLayout( topLayout( ), 8, 2 ); + gl->addWidget( new TQLabel( i18n( "Function:" ), this ), 0, 0 ); gl->addWidget( m_pFunction, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Container:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Container:" ), this ), 1, 0 ); gl->addWidget( m_pContainedBy, 1, 1 ); gl->addWidget( m_pCorner1Label, 2, 0 ); gl->addWidget( m_pCorner1, 2, 1 ); @@ -82,49 +82,49 @@ void PMIsoSurfaceEdit::createTopWidgets( ) gl->addWidget( m_pCenter, 4, 1 ); gl->addWidget( m_pRadiusLabel, 5, 0 ); gl->addWidget( m_pRadius, 5, 1 ); - gl->addWidget( new QLabel( i18n( "Threshold:" ), this ), 6, 0 ); + gl->addWidget( new TQLabel( i18n( "Threshold:" ), this ), 6, 0 ); gl->addWidget( m_pThreshold, 6, 1 ); - gl->addWidget( new QLabel( i18n( "Accuracy:" ), this ), 7, 0 ); + gl->addWidget( new TQLabel( i18n( "Accuracy:" ), this ), 7, 0 ); gl->addWidget( m_pAccuracy, 7, 1 ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Maximum gradient:" ), this ) ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Maximum gradient:" ), this ) ); hl->addWidget( m_pMaxGradient ); topLayout( )->addWidget( m_pEvaluate ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Values:" ), this ) ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Values:" ), this ) ); for( i = 0; i < 3; i++ ) { - hl->addWidget( new QLabel( QString( "P%1" ).arg( i ), this ) ); + hl->addWidget( new TQLabel( TQString( "P%1" ).arg( i ), this ) ); hl->addWidget( m_pEvaluateValue[i] ); } - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Maximum traces:" ), this ) ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Maximum traces:" ), this ) ); hl->addWidget( m_pMaxTrace ); topLayout( )->addWidget( m_pAllIntersections ); topLayout( )->addWidget( m_pOpen ); - connect( m_pFunction, SIGNAL( textChanged( const QString& ) ), - SLOT( textChanged( const QString& ) ) ); - connect( m_pContainedBy, SIGNAL( activated( int ) ), - SLOT( currentChanged( int ) ) ); - connect( m_pCorner1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCorner2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCenter, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pThreshold, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAccuracy, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMaxGradient, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEvaluate, SIGNAL( toggled( bool ) ), - SLOT( evaluateToggled( bool ) ) ); - connect( m_pMaxTrace, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pFunction, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( textChanged( const TQString& ) ) ); + connect( m_pContainedBy, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( currentChanged( int ) ) ); + connect( m_pCorner1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCorner2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCenter, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pThreshold, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAccuracy, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMaxGradient, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEvaluate, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( evaluateToggled( bool ) ) ); + connect( m_pMaxTrace, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); for( i = 0; i < 3; i++ ) - connect( m_pEvaluateValue[i], SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOpen, SIGNAL( toggled( bool ) ), SLOT( toggled( bool ) ) ); - connect( m_pAllIntersections, SIGNAL( toggled( bool ) ), - SLOT( allToggled( bool ) ) ); + connect( m_pEvaluateValue[i], TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOpen, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( toggled( bool ) ) ); + connect( m_pAllIntersections, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( allToggled( bool ) ) ); } void PMIsoSurfaceEdit::displayObject( PMObject* o ) @@ -272,7 +272,7 @@ bool PMIsoSurfaceEdit::isDataValid( ) return Base::isDataValid( ); } -void PMIsoSurfaceEdit::textChanged( const QString& ) +void PMIsoSurfaceEdit::textChanged( const TQString& ) { emit dataChanged( ); } diff --git a/kpovmodeler/pmisosurfaceedit.h b/kpovmodeler/pmisosurfaceedit.h index 9ee6e872..09798c0d 100644 --- a/kpovmodeler/pmisosurfaceedit.h +++ b/kpovmodeler/pmisosurfaceedit.h @@ -30,10 +30,10 @@ class PMIsoSurface; class PMVectorEdit; class PMFloatEdit; class PMIntEdit; -class QCheckBox; -class QComboBox; -class QLabel; -class QLineEdit; +class TQCheckBox; +class TQComboBox; +class TQLabel; +class TQLineEdit; /** * Dialog edit class for @ref PMIsoSurface @@ -46,7 +46,7 @@ public: /** * Creates a PMIsoSurfaceEdit with parent and name */ - PMIsoSurfaceEdit( QWidget* parent, const char* name = 0 ); + PMIsoSurfaceEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -60,7 +60,7 @@ protected: virtual void saveContents( ); private slots: - void textChanged( const QString& ); + void textChanged( const TQString& ); void currentChanged( int i ); void evaluateToggled( bool ); void allToggled( bool ); @@ -68,24 +68,24 @@ private slots: private: PMIsoSurface* m_pDisplayedObject; - QLineEdit* m_pFunction; - QComboBox* m_pContainedBy; + TQLineEdit* m_pFunction; + TQComboBox* m_pContainedBy; PMVectorEdit* m_pCorner1; PMVectorEdit* m_pCorner2; PMVectorEdit* m_pCenter; PMFloatEdit* m_pRadius; - QLabel* m_pCorner1Label; - QLabel* m_pCorner2Label; - QLabel* m_pCenterLabel; - QLabel* m_pRadiusLabel; + TQLabel* m_pCorner1Label; + TQLabel* m_pCorner2Label; + TQLabel* m_pCenterLabel; + TQLabel* m_pRadiusLabel; PMFloatEdit* m_pThreshold; PMFloatEdit* m_pAccuracy; PMFloatEdit* m_pMaxGradient; - QCheckBox* m_pEvaluate; + TQCheckBox* m_pEvaluate; PMFloatEdit* m_pEvaluateValue[3]; - QCheckBox* m_pOpen; + TQCheckBox* m_pOpen; PMIntEdit* m_pMaxTrace; - QCheckBox* m_pAllIntersections; + TQCheckBox* m_pAllIntersections; }; diff --git a/kpovmodeler/pmjuliafractal.cpp b/kpovmodeler/pmjuliafractal.cpp index 49ca9de5..5929a058 100644 --- a/kpovmodeler/pmjuliafractal.cpp +++ b/kpovmodeler/pmjuliafractal.cpp @@ -32,9 +32,9 @@ const PMVector c_defaultSliceNormal = PMVector( 0.0, 0.0, 0.0, 1.0 ); const double c_defaultSliceDistance = 0.0; const int c_defaultMaxIterations = 20; const PMJuliaFractal::AlgebraType c_defaultAlgebraType = PMJuliaFractal::Quaternion; -const QString c_defaultAlgebraString = "quaternion"; +const TQString c_defaultAlgebraString = "quaternion"; const PMJuliaFractal::FunctionType c_defaultFunctionType = PMJuliaFractal::FTsqr; -const QString c_defaultFunctionString = "sqr"; +const TQString c_defaultFunctionString = "sqr"; const PMVector c_defaultExponent = PMVector( 0.0, 0.0 ); const double c_defaultPrecision = 20.0; @@ -81,12 +81,12 @@ PMJuliaFractal::~PMJuliaFractal( ) { } -QString PMJuliaFractal::description( ) const +TQString PMJuliaFractal::description( ) const { return i18n( "julia fractal" ); } -void PMJuliaFractal::serialize( QDomElement& e, QDomDocument& doc ) const +void PMJuliaFractal::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "julia_parameter", m_juliaParameter.serializeXML( ) ); e.setAttribute( "algebra_type", algebraTypeToString( m_algebraType ) ); @@ -272,7 +272,7 @@ void PMJuliaFractal::setExponent( const PMVector& e ) } } -PMDialogEditBase* PMJuliaFractal::editWidget( QWidget* parent ) const +PMDialogEditBase* PMJuliaFractal::editWidget( TQWidget* parent ) const { return new PMJuliaFractalEdit( parent ); } @@ -322,9 +322,9 @@ void PMJuliaFractal::restoreMemento( PMMemento* s ) Base::restoreMemento( s ); } -QString PMJuliaFractal::functionTypeToString( PMJuliaFractal::FunctionType t ) +TQString PMJuliaFractal::functionTypeToString( PMJuliaFractal::FunctionType t ) { - QString result = "sqr"; + TQString result = "sqr"; switch( t ) { case FTsqr: @@ -385,7 +385,7 @@ QString PMJuliaFractal::functionTypeToString( PMJuliaFractal::FunctionType t ) return result; } -PMJuliaFractal::FunctionType PMJuliaFractal::stringToFunctionType( const QString& str ) +PMJuliaFractal::FunctionType PMJuliaFractal::stringToFunctionType( const TQString& str ) { FunctionType t = c_defaultFunctionType; @@ -428,9 +428,9 @@ PMJuliaFractal::FunctionType PMJuliaFractal::stringToFunctionType( const QString return t; } -QString PMJuliaFractal::algebraTypeToString( PMJuliaFractal::AlgebraType t ) +TQString PMJuliaFractal::algebraTypeToString( PMJuliaFractal::AlgebraType t ) { - QString result; + TQString result; if( t == Quaternion ) result = "quaternion"; else @@ -438,7 +438,7 @@ QString PMJuliaFractal::algebraTypeToString( PMJuliaFractal::AlgebraType t ) return result; } -PMJuliaFractal::AlgebraType PMJuliaFractal::stringToAlgebraType( const QString& str ) +PMJuliaFractal::AlgebraType PMJuliaFractal::stringToAlgebraType( const TQString& str ) { AlgebraType t = c_defaultAlgebraType; if( str == "quaternion" ) diff --git a/kpovmodeler/pmjuliafractal.h b/kpovmodeler/pmjuliafractal.h index 1e93a46c..1a113aa4 100644 --- a/kpovmodeler/pmjuliafractal.h +++ b/kpovmodeler/pmjuliafractal.h @@ -58,7 +58,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMJuliaFractal( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -66,18 +66,18 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMJuliaFractalEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmjuliafractal" ); } + virtual TQString pixmap( ) const { return TQString( "pmjuliafractal" ); } /** */ virtual void restoreMemento( PMMemento* s ); @@ -146,10 +146,10 @@ public: */ void setExponent( const PMVector& p ); - static QString functionTypeToString( FunctionType t ); - static FunctionType stringToFunctionType( const QString& str ); - static QString algebraTypeToString( AlgebraType t ); - static AlgebraType stringToAlgebraType( const QString& str ); + static TQString functionTypeToString( FunctionType t ); + static FunctionType stringToFunctionType( const TQString& str ); + static TQString algebraTypeToString( AlgebraType t ); + static AlgebraType stringToAlgebraType( const TQString& str ); private: /** diff --git a/kpovmodeler/pmjuliafractaledit.cpp b/kpovmodeler/pmjuliafractaledit.cpp index 43f351c5..4f595b0e 100644 --- a/kpovmodeler/pmjuliafractaledit.cpp +++ b/kpovmodeler/pmjuliafractaledit.cpp @@ -21,13 +21,13 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> #include <klocale.h> #include <kmessagebox.h> -PMJuliaFractalEdit::PMJuliaFractalEdit( QWidget* parent, const char* name ) +PMJuliaFractalEdit::PMJuliaFractalEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,24 +37,24 @@ void PMJuliaFractalEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* hl; - QGridLayout* gl; + TQHBoxLayout* hl; + TQGridLayout* gl; - topLayout( )->addWidget( new QLabel( i18n( "Julia parameter:" ), this ) ); + topLayout( )->addWidget( new TQLabel( i18n( "Julia parameter:" ), this ) ); m_pJuliaParameter = new PMVectorEdit( "", "i", "j", "k", this ); topLayout( )->addWidget( m_pJuliaParameter ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Algebra type:" ), this ) ); - m_pAlgebraType = new QComboBox( false, this ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Algebra type:" ), this ) ); + m_pAlgebraType = new TQComboBox( false, this ); m_pAlgebraType->insertItem( i18n( "Quaternion" ) ); m_pAlgebraType->insertItem( i18n( "Hypercomplex" ) ); hl->addWidget( m_pAlgebraType ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Function type:" ), this ) ); - m_pFunctionType = new QComboBox( false, this ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Function type:" ), this ) ); + m_pFunctionType = new TQComboBox( false, this ); m_pFunctionType->insertItem( "sqr" ); m_pFunctionType->insertItem( "cube" ); m_pFunctionType->insertItem( "exp" ); @@ -76,45 +76,45 @@ void PMJuliaFractalEdit::createTopWidgets( ) hl->addWidget( m_pFunctionType ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - m_pExponentsLabel = new QLabel( i18n( "Exponent:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pExponentsLabel = new TQLabel( i18n( "Exponent:" ), this ); hl->addWidget( m_pExponentsLabel ); m_pExponents = new PMVectorEdit( "", "i", this ); hl->addWidget( m_pExponents ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 2, 2 ); - gl->addWidget( new QLabel( i18n( "Maximum iterations:" ), this ), 0, 0 ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 2, 2 ); + gl->addWidget( new TQLabel( i18n( "Maximum iterations:" ), this ), 0, 0 ); m_pMaxIterations = new PMIntEdit( this ); m_pMaxIterations->setValidation( true, 1, false, 0 ); gl->addWidget( m_pMaxIterations, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Precision:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Precision:" ), this ), 1, 0 ); m_pPrecision = new PMFloatEdit( this ); m_pPrecision->setValidation( true, 1.0, false, 0.0 ); gl->addWidget( m_pPrecision, 1, 1 ); hl->addStretch( 1 ); - topLayout( )->addWidget( new QLabel( i18n( "Slice normal:" ), this ) ); + topLayout( )->addWidget( new TQLabel( i18n( "Slice normal:" ), this ) ); m_pSliceNormal = new PMVectorEdit( "", "i", "j", "k", this ); topLayout( )->addWidget( m_pSliceNormal ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Slice distance:" ), this ) ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Slice distance:" ), this ) ); m_pSliceDistance = new PMFloatEdit( this ); hl->addWidget( m_pSliceDistance ); hl->addStretch( 1 ); - connect( m_pJuliaParameter, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAlgebraType, SIGNAL( activated( int ) ), - SLOT( slotAlgebraTypeSelected( int ) ) ); - connect( m_pFunctionType, SIGNAL( activated( int ) ), - SLOT( slotFunctionTypeSelected( int ) ) ); - connect( m_pExponents, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMaxIterations, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPrecision, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSliceNormal, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSliceDistance, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pJuliaParameter, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAlgebraType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotAlgebraTypeSelected( int ) ) ); + connect( m_pFunctionType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotFunctionTypeSelected( int ) ) ); + connect( m_pExponents, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMaxIterations, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPrecision, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSliceNormal, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSliceDistance, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMJuliaFractalEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmjuliafractaledit.h b/kpovmodeler/pmjuliafractaledit.h index 598ea144..f2acb8f3 100644 --- a/kpovmodeler/pmjuliafractaledit.h +++ b/kpovmodeler/pmjuliafractaledit.h @@ -30,8 +30,8 @@ class PMJuliaFractal; class PMVectorEdit; class PMIntEdit; class PMFloatEdit; -class QComboBox; -class QLabel; +class TQComboBox; +class TQLabel; /** * Dialog edit class for @ref PMJuliaFractal @@ -44,7 +44,7 @@ public: /** * Creates a PMJuliaFractalEdit with parent and name */ - PMJuliaFractalEdit( QWidget* parent, const char* name = 0 ); + PMJuliaFractalEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -65,10 +65,10 @@ protected slots: private: PMJuliaFractal* m_pDisplayedObject; PMVectorEdit* m_pJuliaParameter; - QComboBox* m_pAlgebraType; - QComboBox* m_pFunctionType; + TQComboBox* m_pAlgebraType; + TQComboBox* m_pFunctionType; PMVectorEdit* m_pExponents; - QLabel* m_pExponentsLabel; + TQLabel* m_pExponentsLabel; PMIntEdit* m_pMaxIterations; PMFloatEdit* m_pPrecision; PMVectorEdit* m_pSliceNormal; diff --git a/kpovmodeler/pmlathe.cpp b/kpovmodeler/pmlathe.cpp index f6c3c3c3..9f6a00ff 100644 --- a/kpovmodeler/pmlathe.cpp +++ b/kpovmodeler/pmlathe.cpp @@ -73,8 +73,8 @@ protected: virtual bool setProtected( PMObject* obj, const PMVariant& var ) { PMLathe* p = ( PMLathe* ) obj; - QValueList<PMVector> list = p->points( ); - QValueList<PMVector>::Iterator it = list.begin( ); + TQValueList<PMVector> list = p->points( ); + TQValueList<PMVector>::Iterator it = list.begin( ); int i; PMVector v = var.vectorData( ); v.resize( 2 ); @@ -95,8 +95,8 @@ protected: virtual PMVariant getProtected( const PMObject* obj ) { PMLathe* p = ( PMLathe* ) obj; - QValueList<PMVector> list = p->points( ); - QValueList<PMVector>::ConstIterator it = list.at( m_index ); + TQValueList<PMVector> list = p->points( ); + TQValueList<PMVector>::ConstIterator it = list.at( m_index ); if( it == list.end( ) ) { @@ -139,20 +139,20 @@ PMLathe::~PMLathe( ) { } -QString PMLathe::description( ) const +TQString PMLathe::description( ) const { return i18n( "lathe" ); } -void PMLathe::serialize( QDomElement& e, QDomDocument& doc ) const +void PMLathe::serialize( TQDomElement& e, TQDomDocument& doc ) const { - QDomElement data = doc.createElement( "extra_data" ); - QDomElement p; + TQDomElement data = doc.createElement( "extra_data" ); + TQDomElement p; e.setAttribute( "spline_type", m_splineType ); e.setAttribute( "sturm", m_sturm ); - QValueList<PMVector>::ConstIterator it; + TQValueList<PMVector>::ConstIterator it; for( it = m_points.begin( ); it != m_points.end( ); ++it ) { p = doc.createElement( "point" ); @@ -172,18 +172,18 @@ void PMLathe::readAttributes( const PMXMLHelper& h ) m_points.clear( ); PMVector v( 2 ); - QDomElement e = h.extraData( ); + TQDomElement e = h.extraData( ); if( !e.isNull( ) ) { - QDomNode c = e.firstChild( ); + TQDomNode c = e.firstChild( ); while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); if( ce.tagName( ) == "point" ) { - QString str = ce.attribute( "vector" ); + TQString str = ce.attribute( "vector" ); if( !str.isNull( ) ) { v.loadXML( str ); @@ -249,7 +249,7 @@ void PMLathe::setSturm( bool s ) } } -void PMLathe::setPoints( const QValueList<PMVector>& points ) +void PMLathe::setPoints( const TQValueList<PMVector>& points ) { if( m_points != points ) { @@ -261,7 +261,7 @@ void PMLathe::setPoints( const QValueList<PMVector>& points ) } } -PMDialogEditBase* PMLathe::editWidget( QWidget* parent ) const +PMDialogEditBase* PMLathe::editWidget( TQWidget* parent ) const { return new PMLatheEdit( parent ); } @@ -363,8 +363,8 @@ void PMLathe::createViewStructure( ) // calculate the spline segments - QValueList<PMSplineSegment> segments; - QValueList<PMVector>::Iterator it1, it2, it3, it4; + TQValueList<PMSplineSegment> segments; + TQValueList<PMVector>::Iterator it1, it2, it3, it4; it1 = m_points.begin( ); it2 = it1; ++it2; it3 = it2; ++it3; @@ -463,7 +463,7 @@ void PMLathe::createViewStructure( ) } // calculate the points PMVector point2, point3; - QValueList<PMSplineSegment>::Iterator sit = segments.begin( ); + TQValueList<PMSplineSegment>::Iterator sit = segments.begin( ); int pi = 0; double poffset = 1.0 / sSteps; @@ -531,11 +531,11 @@ void PMLathe::createViewStructure( ) void PMLathe::controlPoints( PMControlPointList& list ) { - QValueList<PMVector>::Iterator it; + TQValueList<PMVector>::Iterator it; int i, d; PM2DControlPoint* cp = 0; - QPtrList<PM2DControlPoint> tmp[2]; + TQPtrList<PM2DControlPoint> tmp[2]; for( d = 0; d < 2; ++d ) { @@ -600,7 +600,7 @@ void PMLathe::controlPoints( PMControlPointList& list ) } } - QPtrListIterator<PM2DControlPoint> cit1( tmp[0] ), cit2( tmp[1] ); + TQPtrListIterator<PM2DControlPoint> cit1( tmp[0] ), cit2( tmp[1] ); for( ; cit1.current( ) && cit2.current( ); ++cit1, ++cit2 ) { @@ -616,7 +616,7 @@ void PMLathe::controlPoints( PMControlPointList& list ) void PMLathe::controlPointsChanged( PMControlPointList& list ) { PMControlPointListIterator it1( list ), it2( list ); - QValueList<PMVector>::Iterator pit = m_points.begin( ); + TQValueList<PMVector>::Iterator pit = m_points.begin( ); PM2DControlPoint* p1; PM2DControlPoint* p2; bool firstChange = true; @@ -662,7 +662,7 @@ void PMLathe::controlPointsChanged( PMControlPointList& list ) } void PMLathe::addObjectActions( const PMControlPointList& /*cp*/, - QPtrList<PMObjectAction>& actions ) + TQPtrList<PMObjectAction>& actions ) { PMObjectAction* a; @@ -697,7 +697,7 @@ void PMLathe::addObjectActions( const PMControlPointList& /*cp*/, void PMLathe::objectActionCalled( const PMObjectAction* action, const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { if( action->objectType( ) == s_pMetaObject ) @@ -720,7 +720,7 @@ void PMLathe::objectActionCalled( const PMObjectAction* action, } void PMLathe::splitSegment( const PMControlPointList& /*cp*/, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { // find nearest segment @@ -730,8 +730,8 @@ void PMLathe::splitSegment( const PMControlPointList& /*cp*/, int i, j; PMVector mid( 3 ), dist( 2 ); - QPtrListIterator<PMVector> it1( cpViewPosition ); - QPtrListIterator<PMVector> it2( cpViewPosition ); + TQPtrListIterator<PMVector> it1( cpViewPosition ); + TQPtrListIterator<PMVector> it2( cpViewPosition ); ++it2; for( j = 0; j < 2; ++j ) @@ -776,16 +776,16 @@ void PMLathe::splitSegment( const PMControlPointList& /*cp*/, } // add a new segment - QValueList<PMVector> newPoints = m_points; + TQValueList<PMVector> newPoints = m_points; if( m_splineType == BezierSpline ) { ns /= 4; ns *= 4; } - QValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns ); + TQValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns ); PMVector p[4]; - QValueList<PMVector>::Iterator hit = it; + TQValueList<PMVector>::Iterator hit = it; // calculate the spline segment PMSplineSegment segment; @@ -844,7 +844,7 @@ void PMLathe::splitSegment( const PMControlPointList& /*cp*/, } void PMLathe::joinSegments( const PMControlPointList& /*cp*/, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { // find nearest point @@ -879,7 +879,7 @@ void PMLathe::joinSegments( const PMControlPointList& /*cp*/, PMVector* p; PMVector dist( 2 ); - QPtrListIterator<PMVector> it1( cpViewPosition ); + TQPtrListIterator<PMVector> it1( cpViewPosition ); for( j = 0; j < 2; ++j ) { @@ -901,8 +901,8 @@ void PMLathe::joinSegments( const PMControlPointList& /*cp*/, } // join two segments - QValueList<PMVector> newPoints = m_points; - QValueList<PMVector>::Iterator it; + TQValueList<PMVector> newPoints = m_points; + TQValueList<PMVector>::Iterator it; if( m_splineType != BezierSpline ) { diff --git a/kpovmodeler/pmlathe.h b/kpovmodeler/pmlathe.h index 99986a6f..20fa55b3 100644 --- a/kpovmodeler/pmlathe.h +++ b/kpovmodeler/pmlathe.h @@ -26,8 +26,8 @@ #include "pmsolidobject.h" #include "pmvector.h" -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> #include <math.h> class PMViewStructure; @@ -60,7 +60,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMLathe( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -68,18 +68,18 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMLatheEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmlathe" ); } + virtual TQString pixmap( ) const { return TQString( "pmlathe" ); } /** */ virtual void createMemento( ); @@ -95,21 +95,21 @@ public: virtual bool multipleSelectControlPoints( ) const { return true; } /** */ virtual void addObjectActions( const PMControlPointList&, - QPtrList<PMObjectAction>& ); + TQPtrList<PMObjectAction>& ); /** */ virtual void objectActionCalled( const PMObjectAction*, const PMControlPointList&, - const QPtrList<PMVector>&, + const TQPtrList<PMVector>&, const PMVector& ); /** * Returns the spline points */ - QValueList<PMVector> points( ) const { return m_points; } + TQValueList<PMVector> points( ) const { return m_points; } /** * Sets the spline points */ - void setPoints( const QValueList<PMVector>& points ); + void setPoints( const TQValueList<PMVector>& points ); /** * Returns the number of spline points */ @@ -159,17 +159,17 @@ private: * Object action. Adds a spline point */ void splitSegment( const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ); /** * Object action. Removes a spline point */ void joinSegments( const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ); - void stringToValues( const QString& str ); - QString valuesToString( ) const; + void stringToValues( const TQString& str ); + TQString valuesToString( ) const; /** * IDs for @ref PMMementoData @@ -180,7 +180,7 @@ private: */ enum PMLatheActionID { PMSplitSegmentID, PMJoinSegmentsID }; SplineType m_splineType; - QValueList<PMVector> m_points; + TQValueList<PMVector> m_points; bool m_sturm; static int s_rSteps; diff --git a/kpovmodeler/pmlatheedit.cpp b/kpovmodeler/pmlatheedit.cpp index 970cc2f5..e90a4397 100644 --- a/kpovmodeler/pmlatheedit.cpp +++ b/kpovmodeler/pmlatheedit.cpp @@ -22,18 +22,18 @@ #include "pmvectorlistedit.h" #include "pmpart.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kdialog.h> #include <kiconloader.h> #include <kmessagebox.h> -PMLatheEdit::PMLatheEdit( QWidget* parent, const char* name ) +PMLatheEdit::PMLatheEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -43,9 +43,9 @@ void PMLatheEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Spline type:" ), this ) ); - m_pSplineType = new QComboBox( false, this ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Spline type:" ), this ) ); + m_pSplineType = new TQComboBox( false, this ); m_pSplineType->insertItem( i18n( "Linear Spline" ) ); m_pSplineType->insertItem( i18n( "Quadratic Spline" ) ); m_pSplineType->insertItem( i18n( "Cubic Spline" ) ); @@ -53,40 +53,40 @@ void PMLatheEdit::createTopWidgets( ) hl->addWidget( m_pSplineType ); hl->addStretch( 1 ); - connect( m_pSplineType, SIGNAL( activated( int ) ), - SLOT( slotTypeChanged( int ) ) ); + connect( m_pSplineType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotTypeChanged( int ) ) ); } void PMLatheEdit::createBottomWidgets( ) { - topLayout( )->addWidget( new QLabel( i18n( "Spline points:" ), this ) ); + topLayout( )->addWidget( new TQLabel( i18n( "Spline points:" ), this ) ); m_pPoints = new PMVectorListEdit( "u", "v", this ); - connect( m_pPoints, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPoints, SIGNAL( selectionChanged( ) ), - SLOT( slotSelectionChanged( ) ) ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); + connect( m_pPoints, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPoints, TQT_SIGNAL( selectionChanged( ) ), + TQT_SLOT( slotSelectionChanged( ) ) ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); hl->addWidget( m_pPoints, 2 ); - m_pAddAbove = new QPushButton( this ); + m_pAddAbove = new TQPushButton( this ); m_pAddAbove->setPixmap( SmallIcon( "pmaddpointabove" ) ); - m_pAddBelow = new QPushButton( this ); + m_pAddBelow = new TQPushButton( this ); m_pAddBelow->setPixmap( SmallIcon( "pmaddpoint" ) ); - m_pRemove = new QPushButton( this ); + m_pRemove = new TQPushButton( this ); m_pRemove->setPixmap( SmallIcon( "pmremovepoint" ) ); - connect( m_pAddAbove, SIGNAL( clicked( ) ), SLOT( slotAddPointAbove( ) ) ); - connect( m_pAddBelow, SIGNAL( clicked( ) ), SLOT( slotAddPointBelow( ) ) ); - connect( m_pRemove, SIGNAL( clicked( ) ), SLOT( slotRemovePoint( ) ) ); + connect( m_pAddAbove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointAbove( ) ) ); + connect( m_pAddBelow, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointBelow( ) ) ); + connect( m_pRemove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemovePoint( ) ) ); - QVBoxLayout* bl = new QVBoxLayout( hl ); + TQVBoxLayout* bl = new TQVBoxLayout( hl ); bl->addWidget( m_pAddAbove ); bl->addWidget( m_pAddBelow ); bl->addWidget( m_pRemove ); bl->addStretch( 1 ); - m_pSturm = new QCheckBox( i18n( "Sturm" ), this ); + m_pSturm = new TQCheckBox( i18n( "Sturm" ), this ); topLayout( )->addWidget( m_pSturm ); - connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); Base::createBottomWidgets( ); } @@ -234,12 +234,12 @@ void PMLatheEdit::slotAddPointAbove( ) int index = m_pPoints->currentRow( ); if( index >= 0 ) { - QValueList<PMVector> points = m_pPoints->vectors( ); - QValueListIterator<PMVector> it = points.at( index ); + TQValueList<PMVector> points = m_pPoints->vectors( ); + TQValueListIterator<PMVector> it = points.at( index ); if( it != points.end( ) ) { - QValueListIterator<PMVector> it2 = it; + TQValueListIterator<PMVector> it2 = it; it2--; PMVector v; if( it2 == points.end( ) ) @@ -261,12 +261,12 @@ void PMLatheEdit::slotAddPointBelow( ) int index = m_pPoints->currentRow( ); if( index >= 0 ) { - QValueList<PMVector> points = m_pPoints->vectors( ); - QValueListIterator<PMVector> it = points.at( index ); + TQValueList<PMVector> points = m_pPoints->vectors( ); + TQValueListIterator<PMVector> it = points.at( index ); if( it != points.end( ) ) { - QValueListIterator<PMVector> it2 = it; + TQValueListIterator<PMVector> it2 = it; it2++; PMVector v; if( it2 == points.end( ) ) @@ -290,8 +290,8 @@ void PMLatheEdit::slotRemovePoint( ) if( row >= 0 ) { - QValueList<PMVector> points = m_pPoints->vectors( ); - QValueListIterator<PMVector> it = points.at( row ); + TQValueList<PMVector> points = m_pPoints->vectors( ); + TQValueListIterator<PMVector> it = points.at( row ); if( it != points.end( ) && points.size( ) > 1 ) { diff --git a/kpovmodeler/pmlatheedit.h b/kpovmodeler/pmlatheedit.h index ad8cf835..92e92950 100644 --- a/kpovmodeler/pmlatheedit.h +++ b/kpovmodeler/pmlatheedit.h @@ -26,16 +26,16 @@ #include "pmsolidobjectedit.h" #include "pmvectoredit.h" -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> class PMLathe; class PMVectorListEdit; -class QVBoxLayout; -class QComboBox; -class QCheckBox; -class QPushButton; -class QLabel; +class TQVBoxLayout; +class TQComboBox; +class TQCheckBox; +class TQPushButton; +class TQLabel; /** * Dialog edit class for @ref PMLathe @@ -48,7 +48,7 @@ public: /** * Creates a PMLatheEdit with parent and name */ - PMLatheEdit( QWidget* parent, const char* name = 0 ); + PMLatheEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -77,12 +77,12 @@ private: void updatePointButtons( ); PMLathe* m_pDisplayedObject; - QComboBox* m_pSplineType; - QCheckBox* m_pSturm; + TQComboBox* m_pSplineType; + TQCheckBox* m_pSturm; PMVectorListEdit* m_pPoints; - QPushButton* m_pAddAbove; - QPushButton* m_pAddBelow; - QPushButton* m_pRemove; + TQPushButton* m_pAddAbove; + TQPushButton* m_pAddBelow; + TQPushButton* m_pRemove; }; diff --git a/kpovmodeler/pmlayoutsettings.cpp b/kpovmodeler/pmlayoutsettings.cpp index 398e5354..1e20e326 100644 --- a/kpovmodeler/pmlayoutsettings.cpp +++ b/kpovmodeler/pmlayoutsettings.cpp @@ -21,150 +21,150 @@ #include "pmviewfactory.h" #include "pmdebug.h" -#include <qlayout.h> -#include <qcombobox.h> -#include <qlistbox.h> -#include <qlistview.h> -#include <qpushbutton.h> -#include <qlabel.h> -#include <qgroupbox.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqlistbox.h> +#include <tqlistview.h> +#include <tqpushbutton.h> +#include <tqlabel.h> +#include <tqgroupbox.h> #include <klocale.h> #include <kmessagebox.h> -PMLayoutSettings::PMLayoutSettings( QWidget* parent, const char* name ) +PMLayoutSettings::PMLayoutSettings( TQWidget* parent, const char* name ) : PMSettingsDialogPage( parent, name ) { - QHBoxLayout* hlayout; - QVBoxLayout* vlayout; - QVBoxLayout* gvl; - QGridLayout* grid; - QGroupBox* gb; - QGroupBox* gbe; - QHBoxLayout* ghe; - QVBoxLayout* gvle; - - vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) ); - - hlayout = new QHBoxLayout( vlayout ); - hlayout->addWidget( new QLabel( i18n( "Default view layout:" ), this ) ); - m_pDefaultLayout = new QComboBox( this ); + TQHBoxLayout* hlayout; + TQVBoxLayout* vlayout; + TQVBoxLayout* gvl; + TQGridLayout* grid; + TQGroupBox* gb; + TQGroupBox* gbe; + TQHBoxLayout* ghe; + TQVBoxLayout* gvle; + + vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); + + hlayout = new TQHBoxLayout( vlayout ); + hlayout->addWidget( new TQLabel( i18n( "Default view layout:" ), this ) ); + m_pDefaultLayout = new TQComboBox( this ); hlayout->addWidget( m_pDefaultLayout, 1 ); hlayout->addStretch( 1 ); - gb = new QGroupBox( i18n( "Available View Layouts" ), this ); + gb = new TQGroupBox( i18n( "Available View Layouts" ), this ); vlayout->addWidget( gb ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - grid = new QGridLayout( gvl, 3, 2 ); - m_pViewLayouts = new QListBox( gb ); - connect( m_pViewLayouts, SIGNAL( highlighted( int ) ), - SLOT( slotLayoutSelected( int ) ) ); + grid = new TQGridLayout( gvl, 3, 2 ); + m_pViewLayouts = new TQListBox( gb ); + connect( m_pViewLayouts, TQT_SIGNAL( highlighted( int ) ), + TQT_SLOT( slotLayoutSelected( int ) ) ); grid->addMultiCellWidget( m_pViewLayouts, 0, 2, 0, 0 ); - m_pAddLayout = new QPushButton( i18n( "Add" ), gb ); - connect( m_pAddLayout, SIGNAL( clicked( ) ), SLOT( slotAddLayout( ) ) ); + m_pAddLayout = new TQPushButton( i18n( "Add" ), gb ); + connect( m_pAddLayout, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddLayout( ) ) ); grid->addWidget( m_pAddLayout, 0, 1 ); - m_pRemoveLayout = new QPushButton( i18n( "Remove" ), gb ); - connect( m_pRemoveLayout, SIGNAL( clicked( ) ), SLOT( slotRemoveLayout( ) ) ); + m_pRemoveLayout = new TQPushButton( i18n( "Remove" ), gb ); + connect( m_pRemoveLayout, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveLayout( ) ) ); grid->addWidget( m_pRemoveLayout, 1, 1 ); grid->setRowStretch( 2, 1 ); - gbe = new QGroupBox( i18n( "View Layout" ), gb ); + gbe = new TQGroupBox( i18n( "View Layout" ), gb ); gvl->addWidget( gbe ); - gvle = new QVBoxLayout( gbe, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gvle = new TQVBoxLayout( gbe, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvle->addSpacing( 10 ); - ghe = new QHBoxLayout( gvle ); - ghe->addWidget( new QLabel( i18n( "Name:" ), gbe ) ); - m_pViewLayoutName = new QLineEdit( gbe ); - connect( m_pViewLayoutName, SIGNAL( textChanged( const QString& ) ), - SLOT( slotLayoutNameChanged( const QString& ) ) ); + ghe = new TQHBoxLayout( gvle ); + ghe->addWidget( new TQLabel( i18n( "Name:" ), gbe ) ); + m_pViewLayoutName = new TQLineEdit( gbe ); + connect( m_pViewLayoutName, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotLayoutNameChanged( const TQString& ) ) ); ghe->addWidget( m_pViewLayoutName ); - grid = new QGridLayout( gvle, 4, 2 ); - m_pViewEntries = new QListView( gbe ); + grid = new TQGridLayout( gvle, 4, 2 ); + m_pViewEntries = new TQListView( gbe ); m_pViewEntries->setAllColumnsShowFocus( true ); m_pViewEntries->addColumn( " " ); // This column is for the view entry number m_pViewEntries->addColumn( i18n( "Type" ) ); m_pViewEntries->addColumn( i18n( "Position" ) ); m_pViewEntries->setSorting( -1 ); m_pViewEntries->setMaximumHeight( 150 ); - connect( m_pViewEntries, SIGNAL( selectionChanged( QListViewItem* ) ), - SLOT( slotViewEntrySelected( QListViewItem* ) ) ); + connect( m_pViewEntries, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ), + TQT_SLOT( slotViewEntrySelected( TQListViewItem* ) ) ); grid->addMultiCellWidget( m_pViewEntries, 0, 3, 0, 0 ); - m_pAddEntry = new QPushButton( i18n( "Add" ), gbe ); - connect( m_pAddEntry, SIGNAL( clicked( ) ), SLOT( slotAddViewEntryClicked( ) ) ); + m_pAddEntry = new TQPushButton( i18n( "Add" ), gbe ); + connect( m_pAddEntry, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddViewEntryClicked( ) ) ); grid->addWidget( m_pAddEntry, 0, 1 ); - m_pRemoveEntry = new QPushButton( i18n( "Remove" ), gbe ); - connect( m_pRemoveEntry, SIGNAL( clicked( ) ), SLOT( slotRemoveViewEntryClicked( ) ) ); + m_pRemoveEntry = new TQPushButton( i18n( "Remove" ), gbe ); + connect( m_pRemoveEntry, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveViewEntryClicked( ) ) ); grid->addWidget( m_pRemoveEntry, 1, 1 ); /* //TODO - m_pMoveUpEntry = new QPushButton( i18n( "Move Up" ), gbe ); - connect( m_pMoveUpEntry, SIGNAL( clicked( ) ), SLOT( slotMoveUpViewEntryClicked( ) ) ); + m_pMoveUpEntry = new TQPushButton( i18n( "Move Up" ), gbe ); + connect( m_pMoveUpEntry, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotMoveUpViewEntryClicked( ) ) ); grid->addWidget( m_pMoveUpEntry, 2, 1 ); - m_pMoveDownEntry = new QPushButton( i18n( "Move Down" ), gbe ); - connect( m_pMoveDownEntry, SIGNAL( clicked( ) ), SLOT( slotMoveDownViewEntryClicked( ) ) ); + m_pMoveDownEntry = new TQPushButton( i18n( "Move Down" ), gbe ); + connect( m_pMoveDownEntry, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotMoveDownViewEntryClicked( ) ) ); grid->addWidget( m_pMoveDownEntry, 3, 1 ); */ - QHBoxLayout* ghl = new QHBoxLayout( gvle ); - grid = new QGridLayout( ghl, 7, 4 ); - grid->addWidget( new QLabel( i18n( "Type:" ), gbe ), 0, 0 ); - grid->addWidget( new QLabel( i18n( "Dock position:" ), gbe ), 2, 0 ); - m_pColumnWidthLabel = new QLabel( i18n( "Column width:" ), gbe ); + TQHBoxLayout* ghl = new TQHBoxLayout( gvle ); + grid = new TQGridLayout( ghl, 7, 4 ); + grid->addWidget( new TQLabel( i18n( "Type:" ), gbe ), 0, 0 ); + grid->addWidget( new TQLabel( i18n( "Dock position:" ), gbe ), 2, 0 ); + m_pColumnWidthLabel = new TQLabel( i18n( "Column width:" ), gbe ); grid->addWidget( m_pColumnWidthLabel, 3, 0 ); - m_pViewHeightLabel = new QLabel( i18n( "View height:" ), gbe ); + m_pViewHeightLabel = new TQLabel( i18n( "View height:" ), gbe ); grid->addWidget( m_pViewHeightLabel, 4, 0 ); - m_pViewTypeEdit = new QComboBox( gbe ); + m_pViewTypeEdit = new TQComboBox( gbe ); // insert all view types - const QPtrList<PMViewTypeFactory>& types = + const TQPtrList<PMViewTypeFactory>& types = PMViewFactory::theFactory( )->viewTypes( ); - QPtrListIterator<PMViewTypeFactory> it( types ); + TQPtrListIterator<PMViewTypeFactory> it( types ); for( ; *it; ++it ) m_pViewTypeEdit->insertItem( ( *it )->description( ) ); - connect( m_pViewTypeEdit, SIGNAL( activated( int ) ), - SLOT( slotViewTypeChanged( int ) ) ); + connect( m_pViewTypeEdit, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotViewTypeChanged( int ) ) ); grid->addWidget( m_pViewTypeEdit, 0, 1 ); - m_pDockPositionEdit = new QComboBox( gbe ); + m_pDockPositionEdit = new TQComboBox( gbe ); m_pDockPositionEdit->insertItem( i18n( "New Column" ) ); m_pDockPositionEdit->insertItem( i18n( "Below" ) ); m_pDockPositionEdit->insertItem( i18n( "Tabbed" ) ); m_pDockPositionEdit->insertItem( i18n( "Floating" ) ); - connect( m_pDockPositionEdit, SIGNAL( activated( int ) ), - SLOT( slotDockPositionChanged( int ) ) ); + connect( m_pDockPositionEdit, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotDockPositionChanged( int ) ) ); grid->addWidget( m_pDockPositionEdit, 2, 1 ); m_pColumnWidthEdit = new PMIntEdit( gbe ); - connect( m_pColumnWidthEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( slotColumnWidthChanged( const QString& ) ) ); + connect( m_pColumnWidthEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotColumnWidthChanged( const TQString& ) ) ); grid->addWidget( m_pColumnWidthEdit, 3, 1 ); m_pViewHeightEdit = new PMIntEdit( gbe ); - connect( m_pViewHeightEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( slotViewHeightChanged( const QString& ) ) ); + connect( m_pViewHeightEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotViewHeightChanged( const TQString& ) ) ); grid->addWidget( m_pViewHeightEdit, 4, 1 ); - m_pFloatingWidthLabel = new QLabel( i18n( "Width:" ), gbe ); - m_pFloatingHeightLabel = new QLabel( i18n( "Height:" ), gbe ); - m_pFloatingPosXLabel = new QLabel( i18n( "Position x:" ), gbe ); - m_pFloatingPosYLabel = new QLabel( QString( "y:" ), gbe ); + m_pFloatingWidthLabel = new TQLabel( i18n( "Width:" ), gbe ); + m_pFloatingHeightLabel = new TQLabel( i18n( "Height:" ), gbe ); + m_pFloatingPosXLabel = new TQLabel( i18n( "Position x:" ), gbe ); + m_pFloatingPosYLabel = new TQLabel( TQString( "y:" ), gbe ); grid->addWidget( m_pFloatingWidthLabel, 5, 0 ); grid->addWidget( m_pFloatingHeightLabel, 5, 2 ); grid->addWidget( m_pFloatingPosXLabel, 6, 0 ); grid->addWidget( m_pFloatingPosYLabel, 6, 2 ); m_pFloatingWidth = new PMIntEdit( gbe ); - connect( m_pFloatingWidth, SIGNAL( textChanged( const QString& ) ), - SLOT( slotFloatingWidthChanged( const QString& ) ) ); + connect( m_pFloatingWidth, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotFloatingWidthChanged( const TQString& ) ) ); m_pFloatingHeight = new PMIntEdit( gbe ); - connect( m_pFloatingHeight, SIGNAL( textChanged( const QString& ) ), - SLOT( slotFloatingHeightChanged( const QString& ) ) ); + connect( m_pFloatingHeight, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotFloatingHeightChanged( const TQString& ) ) ); m_pFloatingPosX = new PMIntEdit( gbe ); - connect( m_pFloatingPosX, SIGNAL( textChanged( const QString& ) ), - SLOT( slotFloatingPosXChanged( const QString& ) ) ); + connect( m_pFloatingPosX, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotFloatingPosXChanged( const TQString& ) ) ); m_pFloatingPosY = new PMIntEdit( gbe ); - connect( m_pFloatingPosY, SIGNAL( textChanged( const QString& ) ), - SLOT( slotFloatingPosYChanged( const QString& ) ) ); + connect( m_pFloatingPosY, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotFloatingPosYChanged( const TQString& ) ) ); grid->addWidget( m_pFloatingWidth, 5, 1 ); grid->addWidget( m_pFloatingHeight, 5, 3 ); grid->addWidget( m_pFloatingPosX, 6, 1 ); @@ -172,9 +172,9 @@ PMLayoutSettings::PMLayoutSettings( QWidget* parent, const char* name ) // create a holder widget for custom options widgets m_pCustomOptionsWidget = 0; - m_pCustomOptionsHolder = new QWidget( gbe ); + m_pCustomOptionsHolder = new TQWidget( gbe ); - QVBoxLayout* covl = new QVBoxLayout( ghl ); + TQVBoxLayout* covl = new TQVBoxLayout( ghl ); covl->addWidget( m_pCustomOptionsHolder ); covl->addStretch( 1 ); @@ -204,7 +204,7 @@ void PMLayoutSettings::displayDefaults( ) bool PMLayoutSettings::validateData( ) { - QValueListIterator<PMViewLayout> lit; + TQValueListIterator<PMViewLayout> lit; for( lit = m_viewLayouts.begin( ); lit != m_viewLayouts.end( ); ++lit ) { if( ( *lit ).name( ).isEmpty( ) ) @@ -214,7 +214,7 @@ bool PMLayoutSettings::validateData( ) i18n( "Error" ) ); return false; } - QValueListIterator<PMViewLayoutEntry> eit = ( *lit ).begin( ); + TQValueListIterator<PMViewLayoutEntry> eit = ( *lit ).begin( ); if( eit != ( *lit ).end( ) ) { if( ( *eit ).dockPosition( ) != PMDockWidget::DockRight ) @@ -231,7 +231,7 @@ bool PMLayoutSettings::validateData( ) void PMLayoutSettings::applySettings( ) { - QValueListIterator<PMViewLayout> lit; + TQValueListIterator<PMViewLayout> lit; for( lit = m_viewLayouts.begin( ); lit != m_viewLayouts.end( ); ++lit ) ( *lit ).normalize( ); PMViewLayoutManager::theManager( )->setDefaultLayout( m_pDefaultLayout->currentText( ) ); @@ -241,7 +241,7 @@ void PMLayoutSettings::applySettings( ) void PMLayoutSettings::displayLayoutList( ) { - QValueListIterator<PMViewLayout> it; + TQValueListIterator<PMViewLayout> it; m_pViewLayouts->clear( ); m_pDefaultLayout->clear( ); @@ -256,9 +256,9 @@ void PMLayoutSettings::displayLayoutList( ) void PMLayoutSettings::slotAddLayout( ) { - QString new_name; + TQString new_name; int i = 1; - QString str; + TQString str; new_name = i18n( "Unnamed" ); str.setNum( i ); @@ -301,7 +301,7 @@ void PMLayoutSettings::slotRemoveLayout( ) void PMLayoutSettings::slotLayoutSelected( int index ) { int i; - QString str; + TQString str; bool sb; m_currentViewLayout = m_viewLayouts.at( index ); @@ -313,14 +313,14 @@ void PMLayoutSettings::slotLayoutSelected( int index ) m_pViewLayoutName->blockSignals( sb ); PMViewLayout::iterator it; - QListViewItem* previous = NULL; + TQListViewItem* previous = NULL; m_pViewEntries->clear( ); i = 0; for( it = ( *m_currentViewLayout ).begin( ); it != ( *m_currentViewLayout ).end( ); ++it ) { i++; str.setNum( i ); - previous = new QListViewItem( m_pViewEntries, previous, str, + previous = new TQListViewItem( m_pViewEntries, previous, str, ( *it ).viewTypeAsString( ), ( *it ).dockPositionAsString( ) ); if( i == 1 ) @@ -330,7 +330,7 @@ void PMLayoutSettings::slotLayoutSelected( int index ) slotViewEntrySelected( 0 ); } -void PMLayoutSettings::slotLayoutNameChanged( const QString& text ) +void PMLayoutSettings::slotLayoutNameChanged( const TQString& text ) { int n_item = m_pViewLayouts->currentItem( ); bool sb = m_pViewLayouts->signalsBlocked( ); @@ -342,7 +342,7 @@ void PMLayoutSettings::slotLayoutNameChanged( const QString& text ) ( *m_currentViewLayout ).setName( text ); - QValueListIterator<PMViewLayout> it; + TQValueListIterator<PMViewLayout> it; m_pDefaultLayout->clear( ); for( it = m_viewLayouts.begin( ); it != m_viewLayouts.end( ); ++it ) { @@ -352,7 +352,7 @@ void PMLayoutSettings::slotLayoutNameChanged( const QString& text ) } } -void PMLayoutSettings::slotViewEntrySelected( QListViewItem *item ) +void PMLayoutSettings::slotViewEntrySelected( TQListViewItem *item ) { if( item ) { @@ -362,14 +362,14 @@ void PMLayoutSettings::slotViewEntrySelected( QListViewItem *item ) int n_item = item->text( 0 ).toInt( ) - 1; m_currentViewEntry = ( *m_currentViewLayout ).at( n_item ); - QString vt = ( *m_currentViewEntry ).viewType( ); + TQString vt = ( *m_currentViewEntry ).viewType( ); // find the view type int index = 0; bool found = false; - const QPtrList<PMViewTypeFactory>& types = + const TQPtrList<PMViewTypeFactory>& types = PMViewFactory::theFactory( )->viewTypes( ); - QPtrListIterator<PMViewTypeFactory> it( types ); + TQPtrListIterator<PMViewTypeFactory> it( types ); for( ; *it && !found; ++it ) { @@ -506,9 +506,9 @@ void PMLayoutSettings::slotViewEntrySelected( QListViewItem *item ) void PMLayoutSettings::slotViewTypeChanged( int index ) { - const QPtrList<PMViewTypeFactory>& types = + const TQPtrList<PMViewTypeFactory>& types = PMViewFactory::theFactory( )->viewTypes( ); - QPtrListIterator<PMViewTypeFactory> it( types ); + TQPtrListIterator<PMViewTypeFactory> it( types ); it += index; const PMViewTypeFactory* factory = *it; PMViewLayoutEntry& ve = ( *m_currentViewEntry ); @@ -518,7 +518,7 @@ void PMLayoutSettings::slotViewTypeChanged( int index ) ve.setViewType( factory->viewType( ) ); ve.setCustomOptions( factory->newOptionsInstance( ) ); - QListViewItem* item = m_pViewEntries->currentItem( ); + TQListViewItem* item = m_pViewEntries->currentItem( ); if( item ) { if( ve.customOptions( ) ) @@ -595,37 +595,37 @@ void PMLayoutSettings::slotDockPositionChanged( int index ) m_pFloatingPosYLabel->show( ); break; } - QListViewItem* item = m_pViewEntries->currentItem( ); + TQListViewItem* item = m_pViewEntries->currentItem( ); if( item ) item->setText( 2, ( *m_currentViewEntry ).dockPositionAsString( ) ); } -void PMLayoutSettings::slotViewHeightChanged( const QString& text ) +void PMLayoutSettings::slotViewHeightChanged( const TQString& text ) { ( *m_currentViewEntry ).setHeight( text.toInt( ) ); } -void PMLayoutSettings::slotColumnWidthChanged( const QString& text ) +void PMLayoutSettings::slotColumnWidthChanged( const TQString& text ) { ( *m_currentViewEntry ).setColumnWidth( text.toInt( ) ); } -void PMLayoutSettings::slotFloatingWidthChanged( const QString& text ) +void PMLayoutSettings::slotFloatingWidthChanged( const TQString& text ) { ( *m_currentViewEntry ).setFloatingWidth( text.toInt( ) ); } -void PMLayoutSettings::slotFloatingHeightChanged( const QString& text ) +void PMLayoutSettings::slotFloatingHeightChanged( const TQString& text ) { ( *m_currentViewEntry ).setFloatingHeight( text.toInt( ) ); } -void PMLayoutSettings::slotFloatingPosXChanged( const QString& text ) +void PMLayoutSettings::slotFloatingPosXChanged( const TQString& text ) { ( *m_currentViewEntry ).setFloatingPositionX( text.toInt( ) ); } -void PMLayoutSettings::slotFloatingPosYChanged( const QString& text ) +void PMLayoutSettings::slotFloatingPosYChanged( const TQString& text ) { ( *m_currentViewEntry ).setFloatingPositionY( text.toInt( ) ); } @@ -633,8 +633,8 @@ void PMLayoutSettings::slotFloatingPosYChanged( const QString& text ) void PMLayoutSettings::slotAddViewEntryClicked( ) { PMViewLayoutEntry p; - QString str; - QListViewItem* temp; + TQString str; + TQListViewItem* temp; temp = m_pViewEntries->currentItem( ); if( temp ) @@ -643,7 +643,7 @@ void PMLayoutSettings::slotAddViewEntryClicked( ) ( *m_currentViewLayout ).addEntry( p, n_item ); n_item++; str.setNum( n_item ); - QListViewItem* a = new QListViewItem( m_pViewEntries, temp, + TQListViewItem* a = new TQListViewItem( m_pViewEntries, temp, str, p.viewTypeAsString( ), p.dockPositionAsString( ) ); m_pViewEntries->setSelected( a, true ); @@ -661,7 +661,7 @@ void PMLayoutSettings::slotAddViewEntryClicked( ) // If there is no selected the list must be empty ( *m_currentViewLayout ).addEntry( p ); str.setNum( 1 ); - QListViewItem* a = new QListViewItem( m_pViewEntries, NULL, + TQListViewItem* a = new TQListViewItem( m_pViewEntries, NULL, str, p.viewTypeAsString( ), p.dockPositionAsString( ) ); m_pViewEntries->setSelected( a, true ); @@ -670,10 +670,10 @@ void PMLayoutSettings::slotAddViewEntryClicked( ) void PMLayoutSettings::slotRemoveViewEntryClicked( ) { - QListViewItem* temp; - QString str; + TQListViewItem* temp; + TQString str; - QListViewItem* current = m_pViewEntries->currentItem( ); + TQListViewItem* current = m_pViewEntries->currentItem( ); if( current ) { int n_item = current->text( 0 ).toInt( ) - 1; @@ -741,9 +741,9 @@ void PMLayoutSettings::displayCustomOptions( ) ( *m_currentViewEntry ).customOptions( ) ); if( m_pCustomOptionsWidget ) { - connect( m_pCustomOptionsWidget, SIGNAL( viewTypeDescriptionChanged( ) ), - SLOT( slotViewTypeDescriptionChanged( ) ) ); - QHBoxLayout* hl = new QHBoxLayout( m_pCustomOptionsHolder, + connect( m_pCustomOptionsWidget, TQT_SIGNAL( viewTypeDescriptionChanged( ) ), + TQT_SLOT( slotViewTypeDescriptionChanged( ) ) ); + TQHBoxLayout* hl = new TQHBoxLayout( m_pCustomOptionsHolder, 0, KDialog::spacingHint( ) ); hl->addWidget( m_pCustomOptionsWidget ); m_pCustomOptionsWidget->show( ); @@ -760,7 +760,7 @@ void PMLayoutSettings::slotViewTypeDescriptionChanged( ) if( factory ) { - QListViewItem* item = m_pViewEntries->currentItem( ); + TQListViewItem* item = m_pViewEntries->currentItem( ); if( item ) { if( ve.customOptions( ) ) diff --git a/kpovmodeler/pmlayoutsettings.h b/kpovmodeler/pmlayoutsettings.h index 4bca52e3..9671d38a 100644 --- a/kpovmodeler/pmlayoutsettings.h +++ b/kpovmodeler/pmlayoutsettings.h @@ -25,14 +25,14 @@ #include "pmsettingsdialog.h" #include "pmviewlayoutmanager.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> class PMIntEdit; class PMViewOptionsWidget; -class QComboBox; -class QListBox; -class QPushButton; -class QLabel; +class TQComboBox; +class TQListBox; +class TQPushButton; +class TQLabel; /** * View layout configuration dialog page @@ -44,7 +44,7 @@ public: /** * Default constructor */ - PMLayoutSettings( QWidget* parent, const char* name = 0 ); + PMLayoutSettings( TQWidget* parent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ @@ -70,11 +70,11 @@ protected slots: /** * Called when the layout name changes */ - void slotLayoutNameChanged( const QString& text ); + void slotLayoutNameChanged( const TQString& text ); /** * Called when the selected view entry changes */ - void slotViewEntrySelected( QListViewItem* text ); + void slotViewEntrySelected( TQListViewItem* text ); /** * Called when the view type field changes value */ @@ -90,27 +90,27 @@ protected slots: /** * Called when the view height field changes value */ - void slotViewHeightChanged( const QString& text ); + void slotViewHeightChanged( const TQString& text ); /** * Called when the column width field changes value */ - void slotColumnWidthChanged( const QString& text ); + void slotColumnWidthChanged( const TQString& text ); /** * Called when the floating height changes value */ - void slotFloatingHeightChanged( const QString& text ); + void slotFloatingHeightChanged( const TQString& text ); /** * Called when the floating width changes value */ - void slotFloatingWidthChanged( const QString& text ); + void slotFloatingWidthChanged( const TQString& text ); /** * Called when the floating position x changes value */ - void slotFloatingPosXChanged( const QString& text ); + void slotFloatingPosXChanged( const TQString& text ); /** * Called when the floating position y changes value */ - void slotFloatingPosYChanged( const QString& text ); + void slotFloatingPosYChanged( const TQString& text ); /** * Called when the add view entry button is clicked */ @@ -136,39 +136,39 @@ private: void displayLayoutList( ); void displayCustomOptions( ); - QComboBox* m_pDefaultLayout; - QListBox* m_pViewLayouts; - QPushButton* m_pAddLayout; - QPushButton* m_pRemoveLayout; - QLineEdit* m_pViewLayoutName; - QListView* m_pViewEntries; - QPushButton* m_pAddEntry; - QPushButton* m_pRemoveEntry; - QPushButton* m_pMoveUpEntry; - QPushButton* m_pMoveDownEntry; - QComboBox* m_pViewTypeEdit; - QComboBox* m_pDockPositionEdit; + TQComboBox* m_pDefaultLayout; + TQListBox* m_pViewLayouts; + TQPushButton* m_pAddLayout; + TQPushButton* m_pRemoveLayout; + TQLineEdit* m_pViewLayoutName; + TQListView* m_pViewEntries; + TQPushButton* m_pAddEntry; + TQPushButton* m_pRemoveEntry; + TQPushButton* m_pMoveUpEntry; + TQPushButton* m_pMoveDownEntry; + TQComboBox* m_pViewTypeEdit; + TQComboBox* m_pDockPositionEdit; PMIntEdit* m_pColumnWidthEdit; - QLabel* m_pColumnWidthLabel; + TQLabel* m_pColumnWidthLabel; PMIntEdit* m_pViewHeightEdit; - QLabel* m_pViewHeightLabel; + TQLabel* m_pViewHeightLabel; PMIntEdit* m_pFloatingHeight; PMIntEdit* m_pFloatingWidth; - QLabel* m_pFloatingHeightLabel; - QLabel* m_pFloatingWidthLabel; + TQLabel* m_pFloatingHeightLabel; + TQLabel* m_pFloatingWidthLabel; PMIntEdit* m_pFloatingPosX; PMIntEdit* m_pFloatingPosY; - QLabel* m_pFloatingPosXLabel; - QLabel* m_pFloatingPosYLabel; + TQLabel* m_pFloatingPosXLabel; + TQLabel* m_pFloatingPosYLabel; PMViewOptionsWidget* m_pCustomOptionsWidget; - QWidget* m_pCustomOptionsHolder; + TQWidget* m_pCustomOptionsHolder; - QValueList<PMViewLayout> m_viewLayouts; - QValueListIterator<PMViewLayout> m_currentViewLayout; - QValueListIterator<PMViewLayout> m_defaultViewLayout; - QValueListIterator<PMViewLayoutEntry> m_currentViewEntry; + TQValueList<PMViewLayout> m_viewLayouts; + TQValueListIterator<PMViewLayout> m_currentViewLayout; + TQValueListIterator<PMViewLayout> m_defaultViewLayout; + TQValueListIterator<PMViewLayoutEntry> m_currentViewEntry; }; #endif diff --git a/kpovmodeler/pmlibrarybrowser.cpp b/kpovmodeler/pmlibrarybrowser.cpp index e133f08c..bc7e1af7 100644 --- a/kpovmodeler/pmlibrarybrowser.cpp +++ b/kpovmodeler/pmlibrarybrowser.cpp @@ -18,12 +18,12 @@ #include "pmlibrarybrowser.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qsplitter.h> -#include <qtimer.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqsplitter.h> +#include <tqtimer.h> +#include <tqpushbutton.h> #include <kio/job.h> #include <kurl.h> @@ -47,39 +47,39 @@ // ************** PMLibraryBrowser ************************** -PMLibraryBrowserView::PMLibraryBrowserView( PMPart* /*part*/, QWidget* parent /*= 0*/, +PMLibraryBrowserView::PMLibraryBrowserView( PMPart* /*part*/, TQWidget* parent /*= 0*/, const char* name /*=0*/ ) : PMViewBase( parent, name ) { - QHBoxLayout* hl = new QHBoxLayout( this ); + TQHBoxLayout* hl = new TQHBoxLayout( this ); PMLibraryBrowserViewWidget* tv = new PMLibraryBrowserViewWidget( this ); hl->addWidget( tv ); } -QString PMLibraryBrowserView::description( ) const +TQString PMLibraryBrowserView::description( ) const { return i18n( "Library View" ); } -PMLibraryBrowserViewWidget::PMLibraryBrowserViewWidget( QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMLibraryBrowserViewWidget::PMLibraryBrowserViewWidget( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { setCaption( i18n( "Library Objects" ) ); - QVBoxLayout* vl = new QVBoxLayout( this, KDialog::spacingHint( ) ); + TQVBoxLayout* vl = new TQVBoxLayout( this, KDialog::spacingHint( ) ); - QHBoxLayout* hl = new QHBoxLayout( vl ); + TQHBoxLayout* hl = new TQHBoxLayout( vl ); - m_pUpButton = new QPushButton( this ); + m_pUpButton = new TQPushButton( this ); m_pUpButton->setPixmap( SmallIcon( "up" ) ); - m_pNewSubLibraryButton = new QPushButton( this ); + m_pNewSubLibraryButton = new TQPushButton( this ); m_pNewSubLibraryButton->setPixmap( SmallIcon( "folder_new" ) ); - m_pNewObjectButton = new QPushButton( this ); + m_pNewObjectButton = new TQPushButton( this ); m_pNewObjectButton->setPixmap( SmallIcon( "filenew" ) ); - m_pDeleteObjectButton = new QPushButton( this ); + m_pDeleteObjectButton = new TQPushButton( this ); m_pDeleteObjectButton->setPixmap( SmallIcon( "editdelete" ) ); - QLabel* lbl = new QLabel( i18n( "Library: " ), this ); - m_pLibraryComboBox = new QComboBox( this ); + TQLabel* lbl = new TQLabel( i18n( "Library: " ), this ); + m_pLibraryComboBox = new TQComboBox( this ); m_pLibraryComboBox->insertStringList( PMLibraryManager::theManager( )->availableLibraries( ) ); m_pLibraryComboBox->setDuplicatesEnabled( false ); m_pLibraryComboBox->setCurrentItem( 0 ); @@ -91,34 +91,34 @@ PMLibraryBrowserViewWidget::PMLibraryBrowserViewWidget( QWidget* parent, const c hl->addWidget( m_pLibraryComboBox ); hl->addStretch( 1 ); - QSplitter *splitv = new QSplitter( this ); + TQSplitter *splitv = new TQSplitter( this ); m_pLibraryIconView = new PMLibraryIconView( splitv ); m_pLibraryIconView->setMinimumSize( PMDialogEditBase::previewSize( )+20, PMDialogEditBase::previewSize( ) ); m_pLibraryEntryPreview = new PMLibraryEntryPreview( splitv ); vl->addWidget( splitv, 99 ); // Connect all the objects - connect( m_pUpButton, SIGNAL( clicked( ) ), SLOT( slotUpButtonClicked( ) ) ); - connect( m_pNewSubLibraryButton, SIGNAL( clicked( ) ), SLOT( slotNewSubLibraryClicked( ) ) ); - connect( m_pNewObjectButton, SIGNAL( clicked( ) ), SLOT( slotNewObjectClicked( ) ) ); - connect( m_pDeleteObjectButton, SIGNAL( clicked( ) ), SLOT( slotDeleteClicked( ) ) ); - connect( m_pLibraryComboBox, SIGNAL( highlighted( const QString& ) ), - SLOT( slotPathSelected( const QString& ) ) ); - connect( m_pLibraryIconView, SIGNAL( selectionChanged( QIconViewItem* ) ), - SLOT( slotSelectionChanged( QIconViewItem* ) ) ); - connect( m_pLibraryIconView, SIGNAL( executed( QIconViewItem* ) ), - SLOT( slotSelectionExecuted( QIconViewItem* ) ) ); - connect( m_pLibraryEntryPreview, SIGNAL( objectChanged( ) ), SLOT( slotIconViewRefresh( ) ) ); + connect( m_pUpButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotUpButtonClicked( ) ) ); + connect( m_pNewSubLibraryButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotNewSubLibraryClicked( ) ) ); + connect( m_pNewObjectButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotNewObjectClicked( ) ) ); + connect( m_pDeleteObjectButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDeleteClicked( ) ) ); + connect( m_pLibraryComboBox, TQT_SIGNAL( highlighted( const TQString& ) ), + TQT_SLOT( slotPathSelected( const TQString& ) ) ); + connect( m_pLibraryIconView, TQT_SIGNAL( selectionChanged( TQIconViewItem* ) ), + TQT_SLOT( slotSelectionChanged( TQIconViewItem* ) ) ); + connect( m_pLibraryIconView, TQT_SIGNAL( executed( TQIconViewItem* ) ), + TQT_SLOT( slotSelectionExecuted( TQIconViewItem* ) ) ); + connect( m_pLibraryEntryPreview, TQT_SIGNAL( objectChanged( ) ), TQT_SLOT( slotIconViewRefresh( ) ) ); // Set the selected library slotPathSelected( m_pLibraryComboBox->currentText( ) ); } -void PMLibraryBrowserViewWidget::resizeEvent( QResizeEvent* /*ev*/ ) +void PMLibraryBrowserViewWidget::resizeEvent( TQResizeEvent* /*ev*/ ) { } -void PMLibraryBrowserViewWidget::slotPathSelected( const QString& str ) +void PMLibraryBrowserViewWidget::slotPathSelected( const TQString& str ) { PMLibraryHandle* h = PMLibraryManager::theManager( )->getLibraryHandle( str ); if( h ) @@ -154,28 +154,28 @@ void PMLibraryBrowserViewWidget::slotIconViewSetLibrary( ) m_pFutureLibrary = NULL; } -void PMLibraryBrowserViewWidget::slotSelectionChanged( QIconViewItem* item ) +void PMLibraryBrowserViewWidget::slotSelectionChanged( TQIconViewItem* item ) { PMLibraryIconViewItem* sel = static_cast<PMLibraryIconViewItem*>( item ); m_pLibraryIconView->setCurrentItem( sel ); if( sel->isSubLibrary( ) ) { if( m_pLibraryEntryPreview->saveIfNeeded( ) ) - QTimer::singleShot( 100, this, SLOT( slotIconViewRefresh( ) ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewRefresh( ) ) ); else m_pLibraryEntryPreview->showPreview( sel->path( ), m_topLibraryReadOnly, true ); } else { if( m_pLibraryEntryPreview->saveIfNeeded( ) ) - QTimer::singleShot( 100, this, SLOT( slotIconViewRefresh( ) ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewRefresh( ) ) ); else m_pLibraryEntryPreview->showPreview( sel->path( ), m_topLibraryReadOnly, false ); } m_pLibraryIconView->setFocus(); } -void PMLibraryBrowserViewWidget::slotSelectionExecuted( QIconViewItem* item ) +void PMLibraryBrowserViewWidget::slotSelectionExecuted( TQIconViewItem* item ) { PMLibraryIconViewItem* sel = static_cast<PMLibraryIconViewItem*>( item ); m_pLibraryIconView->setCurrentItem( sel ); @@ -184,14 +184,14 @@ void PMLibraryBrowserViewWidget::slotSelectionExecuted( QIconViewItem* item ) // It's a sub library m_pFutureLibrary = new PMLibraryHandle( sel->path( ) ); m_pLibraryEntryPreview->clearPreview( ); - QTimer::singleShot( 100, this, SLOT( slotIconViewSetLibrary( ) ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewSetLibrary( ) ) ); m_pUpButton->setEnabled( true ); } else { // It's an object if( m_pLibraryEntryPreview->saveIfNeeded( ) ) - QTimer::singleShot( 100, this, SLOT( slotIconViewRefresh( ) ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewRefresh( ) ) ); else m_pLibraryEntryPreview->showPreview( sel->path( ), m_topLibraryReadOnly, false ); } @@ -200,13 +200,13 @@ void PMLibraryBrowserViewWidget::slotSelectionExecuted( QIconViewItem* item ) void PMLibraryBrowserViewWidget::slotUpButtonClicked( ) { - QDir pathManipulator( m_pCurrentLibrary->path( ) ); + TQDir pathManipulator( m_pCurrentLibrary->path( ) ); pathManipulator.cdUp( ); m_pFutureLibrary = new PMLibraryHandle( pathManipulator.path( ) ); if( !m_pFutureLibrary->isSubLibrary( ) ) m_pUpButton->setEnabled( false ); - QTimer::singleShot( 100, this, SLOT( slotIconViewSetLibrary( ) ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewSetLibrary( ) ) ); // Release the current Library delete m_pCurrentLibrary; @@ -228,7 +228,7 @@ void PMLibraryBrowserViewWidget::slotDeleteClicked( ) case PMLibraryHandle::Ok: { KIO::Job *job = KIO::del( sel->path() ); - connect( job, SIGNAL( result( KIO::Job * ) ), SLOT( slotJobResult( KIO::Job * ) ) ); + connect( job, TQT_SIGNAL( result( KIO::Job * ) ), TQT_SLOT( slotJobResult( KIO::Job * ) ) ); } break; case PMLibraryHandle::ReadOnlyLib: @@ -250,7 +250,7 @@ void PMLibraryBrowserViewWidget::slotNewObjectClicked( ) switch( m_pCurrentLibrary->createNewObject( ) ) { case PMLibraryHandle::Ok: - QTimer::singleShot( 100, this, SLOT( slotIconViewRefresh( ) ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewRefresh( ) ) ); break; case PMLibraryHandle::ReadOnlyLib: KMessageBox::error( this, i18n( "This library is read only." ), i18n( "Error" ) ); @@ -265,7 +265,7 @@ void PMLibraryBrowserViewWidget::slotNewSubLibraryClicked( ) bool result = false; m_pLibraryEntryPreview->saveIfNeeded( ); - QString subLibraryName = KInputDialog::getText( i18n( "Create Sub-Library" ), + TQString subLibraryName = KInputDialog::getText( i18n( "Create Sub-Library" ), i18n( "Enter the sub-library name: " ), i18n( "Unknown" ), &result ); @@ -293,10 +293,10 @@ void PMLibraryBrowserViewWidget::slotJobResult( KIO::Job * job ) { if( job->error( ) ) job->showErrorDialog( this ); - QTimer::singleShot( 100, this, SLOT( slotIconViewRefresh( ) ) ); + TQTimer::singleShot( 100, this, TQT_SLOT( slotIconViewRefresh( ) ) ); } -QString PMLibraryBrowserViewFactory::description( ) const +TQString PMLibraryBrowserViewFactory::description( ) const { return i18n( "Library View" ); } diff --git a/kpovmodeler/pmlibrarybrowser.h b/kpovmodeler/pmlibrarybrowser.h index 3d5af6ff..b7a2d881 100644 --- a/kpovmodeler/pmlibrarybrowser.h +++ b/kpovmodeler/pmlibrarybrowser.h @@ -23,15 +23,15 @@ #include <config.h> #endif -#include <qwidget.h> -#include <qdict.h> +#include <tqwidget.h> +#include <tqdict.h> #include "pmviewbase.h" #include "pmviewfactory.h" -class QComboBox; -class QIconViewItem; -class QPushButton; +class TQComboBox; +class TQIconViewItem; +class TQPushButton; class KConfig; class KDirOperator; class PMLibraryIconView; @@ -40,7 +40,7 @@ class PMLibraryHandle; class PMPart; namespace KIO{ class Job; } -typedef QDict<QString> QStringDict; +typedef TQDict<TQString> QStringDict; /** * Wrapper class for the treeview/dock widget @@ -52,12 +52,12 @@ public: /** * Default constructor */ - PMLibraryBrowserView( PMPart* part, QWidget* parent, const char* name = 0 ); + PMLibraryBrowserView( PMPart* part, TQWidget* parent, const char* name = 0 ); /** */ - virtual QString viewType( ) const { return QString( "librarybrowserview" ); } + virtual TQString viewType( ) const { return TQString( "librarybrowserview" ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; }; /** @@ -67,13 +67,13 @@ class PMLibraryBrowserViewWidget: public QWidget { Q_OBJECT public: - PMLibraryBrowserViewWidget( QWidget *parent, const char* name = NULL ); + PMLibraryBrowserViewWidget( TQWidget *parent, const char* name = NULL ); private slots: - void resizeEvent( QResizeEvent* ev ); - void slotPathSelected( const QString& str ); - void slotSelectionChanged( QIconViewItem* item ); - void slotSelectionExecuted( QIconViewItem* item ); + void resizeEvent( TQResizeEvent* ev ); + void slotPathSelected( const TQString& str ); + void slotSelectionChanged( TQIconViewItem* item ); + void slotSelectionExecuted( TQIconViewItem* item ); void slotUpButtonClicked( ); void slotDeleteClicked( ); void slotNewObjectClicked( ); @@ -88,11 +88,11 @@ private slots: private: - QPushButton* m_pUpButton; - QPushButton* m_pNewSubLibraryButton; - QPushButton* m_pNewObjectButton; - QPushButton* m_pDeleteObjectButton; - QComboBox* m_pLibraryComboBox; + TQPushButton* m_pUpButton; + TQPushButton* m_pNewSubLibraryButton; + TQPushButton* m_pNewObjectButton; + TQPushButton* m_pDeleteObjectButton; + TQComboBox* m_pLibraryComboBox; PMLibraryIconView* m_pLibraryIconView; PMLibraryEntryPreview* m_pLibraryEntryPreview; PMLibraryHandle* m_pCurrentLibrary; @@ -107,10 +107,10 @@ class PMLibraryBrowserViewFactory : public PMViewTypeFactory { public: PMLibraryBrowserViewFactory( ) { } - virtual QString viewType( ) const { return QString( "librarybrowserview" ); } - virtual QString description( ) const; - virtual QString iconName( ) const { return QString( "pmlibrarybrowserview" ); } - virtual PMViewBase* newInstance( QWidget* parent, PMPart* part ) const + virtual TQString viewType( ) const { return TQString( "librarybrowserview" ); } + virtual TQString description( ) const; + virtual TQString iconName( ) const { return TQString( "pmlibrarybrowserview" ); } + virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const { return new PMLibraryBrowserView( part, parent ); } diff --git a/kpovmodeler/pmlibraryentrypreview.cpp b/kpovmodeler/pmlibraryentrypreview.cpp index b7232cdd..4fbde752 100644 --- a/kpovmodeler/pmlibraryentrypreview.cpp +++ b/kpovmodeler/pmlibraryentrypreview.cpp @@ -26,12 +26,12 @@ #include "pmscene.h" #include "pmobjectdrag.h" -#include <qlabel.h> -#include <qlineedit.h> -#include <qmultilineedit.h> -#include <qlayout.h> -#include <qpushbutton.h> -#include <qdragobject.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqmultilineedit.h> +#include <tqlayout.h> +#include <tqpushbutton.h> +#include <tqdragobject.h> #include <kurl.h> #include <klocale.h> @@ -39,8 +39,8 @@ #include <kmessagebox.h> #include <kfiledialog.h> -PMLibraryEntryPreview::PMLibraryEntryPreview( QWidget* parent ) : - QWidget( parent ) +PMLibraryEntryPreview::PMLibraryEntryPreview( TQWidget* parent ) : + TQWidget( parent ) { setAcceptDrops( true ); m_pPart = new PMPart( this, "treeview", NULL, "part", false, true ); @@ -50,71 +50,71 @@ PMLibraryEntryPreview::PMLibraryEntryPreview( QWidget* parent ) : m_subLib = false; setMaximumSize( 1000, 1000 ); - QVBoxLayout* vl = new QVBoxLayout( this, KDialog::spacingHint( ) ); + TQVBoxLayout* vl = new TQVBoxLayout( this, KDialog::spacingHint( ) ); - QHBoxLayout* hl = new QHBoxLayout( vl ); + TQHBoxLayout* hl = new TQHBoxLayout( vl ); hl->addStretch( 1 ); - QGridLayout* gl = new QGridLayout( vl, 4, 2 ); + TQGridLayout* gl = new TQGridLayout( vl, 4, 2 ); gl->setColStretch( 1, 1 ); - QLabel* lbl = new QLabel( i18n( "Name: " ), this ); - m_pName = new QLineEdit( this ); + TQLabel* lbl = new TQLabel( i18n( "Name: " ), this ); + m_pName = new TQLineEdit( this ); m_pName->setAlignment( Qt::AlignLeft ); m_pName->setReadOnly( true ); gl->addWidget( lbl, 0, 0 ); gl->addWidget( m_pName, 0, 1 ); - lbl = new QLabel( i18n( "Description:" ), this ); + lbl = new TQLabel( i18n( "Description:" ), this ); lbl->setAlignment( Qt::AlignTop ); - m_pDescription = new QMultiLineEdit( this ); + m_pDescription = new TQMultiLineEdit( this ); m_pDescription->setAlignment( Qt::AlignTop | Qt::AlignLeft | Qt::WordBreak | Qt::DontClip ); m_pDescription->setReadOnly( true ); gl->addWidget( lbl, 1, 0 ); gl->addWidget( m_pDescription, 1, 1 ); - m_pKeywordsLabel = new QLabel( i18n( "Keywords:" ), this ); + m_pKeywordsLabel = new TQLabel( i18n( "Keywords:" ), this ); m_pKeywordsLabel->setAlignment( Qt::AlignTop ); - m_pKeywords = new QMultiLineEdit( this ); + m_pKeywords = new TQMultiLineEdit( this ); m_pKeywords->setAlignment( Qt::AlignTop | Qt::AlignLeft | Qt::WordBreak | Qt::DontClip ); m_pKeywords->setReadOnly( true ); gl->addWidget( m_pKeywordsLabel, 2, 0 ); gl->addWidget( m_pKeywords, 2, 1 ); - m_pContentsLabel = new QLabel( i18n( "Contents:" ), this ); + m_pContentsLabel = new TQLabel( i18n( "Contents:" ), this ); m_pContentsPreview = new PMTreeView( m_pPart, this ); gl->addMultiCellWidget( m_pContentsLabel, 3, 3, 0, 1 ); gl->addMultiCellWidget( m_pContentsPreview, 4, 4, 0, 1 ); gl->setRowStretch(4, 1); - hl = new QHBoxLayout( vl ); + hl = new TQHBoxLayout( vl ); hl->addStretch( 1 ); - m_pSetPreviewImageButton = new QPushButton( i18n( "Change Preview Image" ), this ); + m_pSetPreviewImageButton = new TQPushButton( i18n( "Change Preview Image" ), this ); m_pSetPreviewImageButton->setEnabled( false ); hl->addWidget( m_pSetPreviewImageButton ); - hl = new QHBoxLayout( vl ); + hl = new TQHBoxLayout( vl ); hl->addStretch( 1 ); - m_pApplyChanges = new QPushButton( i18n( "&Apply" ), this ); + m_pApplyChanges = new TQPushButton( i18n( "&Apply" ), this ); m_pApplyChanges->setEnabled( false ); hl->addWidget( m_pApplyChanges ); - m_pCancelChanges = new QPushButton( i18n( "&Cancel" ), this ); + m_pCancelChanges = new TQPushButton( i18n( "&Cancel" ), this ); m_pCancelChanges->setEnabled( false ); hl->addWidget( m_pCancelChanges ); - connect( m_pName, SIGNAL( textChanged( const QString& ) ), - SLOT( slotTextChanged( const QString& ) ) ); - connect( m_pDescription, SIGNAL( textChanged( ) ), - SLOT( slotTextChanged( ) ) ); - connect( m_pKeywords, SIGNAL( textChanged( ) ), - SLOT( slotTextChanged( ) ) ); - connect( m_pSetPreviewImageButton, SIGNAL( clicked( ) ), - SLOT( slotPreviewClicked( ) ) ); - connect( m_pPart, SIGNAL( modified( ) ), - SLOT( slotTextChanged( ) ) ); - connect( m_pApplyChanges, SIGNAL( clicked( ) ), SLOT( slotApplyClicked( ) ) ); - connect( m_pCancelChanges, SIGNAL( clicked( ) ), SLOT( slotCancelClicked( ) ) ); + connect( m_pName, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotTextChanged( const TQString& ) ) ); + connect( m_pDescription, TQT_SIGNAL( textChanged( ) ), + TQT_SLOT( slotTextChanged( ) ) ); + connect( m_pKeywords, TQT_SIGNAL( textChanged( ) ), + TQT_SLOT( slotTextChanged( ) ) ); + connect( m_pSetPreviewImageButton, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotPreviewClicked( ) ) ); + connect( m_pPart, TQT_SIGNAL( modified( ) ), + TQT_SLOT( slotTextChanged( ) ) ); + connect( m_pApplyChanges, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotApplyClicked( ) ) ); + connect( m_pCancelChanges, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotCancelClicked( ) ) ); vl->addStretch( 1 ); } @@ -172,7 +172,7 @@ bool PMLibraryEntryPreview::showPreview( KURL u, bool readOnly, bool subLib ) return result; } -void PMLibraryEntryPreview::loadObjects( QByteArray* obj ) +void PMLibraryEntryPreview::loadObjects( TQByteArray* obj ) { m_pPart->setReadWrite( true ); @@ -236,17 +236,17 @@ void PMLibraryEntryPreview::slotTextChanged( ) setModified( true ); } -void PMLibraryEntryPreview::slotTextChanged( const QString& /* s */) +void PMLibraryEntryPreview::slotTextChanged( const TQString& /* s */) { setModified( true ); } void PMLibraryEntryPreview::slotPreviewClicked( ) { - KFileDialog dlg( QString::null, "", NULL, "", false ); + KFileDialog dlg( TQString::null, "", NULL, "", false ); dlg.setFilter( "image/jpeg image/gif image/tiff image/png image/x-bmp" ); - if( dlg.exec( ) == QDialog::Accepted ) + if( dlg.exec( ) == TQDialog::Accepted ) { m_image.load( dlg.selectedFile( ) ); setModified( true ); @@ -319,15 +319,15 @@ bool PMLibraryEntryPreview::saveIfNeeded( bool forceSave ) return false; } -void PMLibraryEntryPreview::dragEnterEvent( QDragEnterEvent* event ) +void PMLibraryEntryPreview::dragEnterEvent( TQDragEnterEvent* event ) { - event->accept( !m_readOnly && QImageDrag::canDecode( event ) ); + event->accept( !m_readOnly && TQImageDrag::canDecode( event ) ); } -void PMLibraryEntryPreview::dropEvent( QDropEvent* event ) +void PMLibraryEntryPreview::dropEvent( TQDropEvent* event ) { - QImage img; - if( QImageDrag::decode( event, img ) ) + TQImage img; + if( TQImageDrag::decode( event, img ) ) { m_image = img; setModified( true ); diff --git a/kpovmodeler/pmlibraryentrypreview.h b/kpovmodeler/pmlibraryentrypreview.h index 95077299..18736458 100644 --- a/kpovmodeler/pmlibraryentrypreview.h +++ b/kpovmodeler/pmlibraryentrypreview.h @@ -23,16 +23,16 @@ #include <config.h> #endif -#include <qwidget.h> -#include <qimage.h> +#include <tqwidget.h> +#include <tqimage.h> #include <kurl.h> -class QLabel; -class QLineEdit; -class QMultiLineEdit; -class QPushButton; -class QFrame; +class TQLabel; +class TQLineEdit; +class TQMultiLineEdit; +class TQPushButton; +class TQFrame; class PMPart; class PMTreeView; @@ -44,7 +44,7 @@ class PMLibraryEntryPreview: public QWidget Q_OBJECT public: /** Constructor */ - PMLibraryEntryPreview( QWidget *parent ); + PMLibraryEntryPreview( TQWidget *parent ); /** Destructor */ ~PMLibraryEntryPreview( ); @@ -73,15 +73,15 @@ signals: void objectChanged( ); protected: - virtual void dragEnterEvent( QDragEnterEvent* event ); + virtual void dragEnterEvent( TQDragEnterEvent* event ); - virtual void dropEvent( QDropEvent* event ); + virtual void dropEvent( TQDropEvent* event ); private slots: /** Called when description or keywords are changed */ void slotTextChanged( ); /** Called when the name is changed */ - void slotTextChanged( const QString& s ); + void slotTextChanged( const TQString& s ); /** Called when the set preview button is clicked */ void slotPreviewClicked( ); /** Called when the apply button is clicked */ @@ -91,24 +91,24 @@ private slots: private: /** Called to load the object tree. */ - void loadObjects( QByteArray* obj ); + void loadObjects( TQByteArray* obj ); /** Sets whether the object is read only or not */ void setReadOnly( bool b ); /** Sets whether the object is modified or not */ void setModified( bool modified ); PMPart* m_pPart; - QLineEdit* m_pName; - QMultiLineEdit* m_pDescription; - QLabel* m_pKeywordsLabel; - QMultiLineEdit* m_pKeywords; - QLabel* m_pContentsLabel; + TQLineEdit* m_pName; + TQMultiLineEdit* m_pDescription; + TQLabel* m_pKeywordsLabel; + TQMultiLineEdit* m_pKeywords; + TQLabel* m_pContentsLabel; PMTreeView* m_pContentsPreview; - QPushButton* m_pSetPreviewImageButton; - QPushButton* m_pApplyChanges; - QPushButton* m_pCancelChanges; + TQPushButton* m_pSetPreviewImageButton; + TQPushButton* m_pApplyChanges; + TQPushButton* m_pCancelChanges; - QImage m_image; + TQImage m_image; KURL m_currentURL; bool m_modified; diff --git a/kpovmodeler/pmlibraryhandle.cpp b/kpovmodeler/pmlibraryhandle.cpp index 7902f789..8ba0f387 100644 --- a/kpovmodeler/pmlibraryhandle.cpp +++ b/kpovmodeler/pmlibraryhandle.cpp @@ -21,11 +21,11 @@ #include <stdlib.h> #include <unistd.h> -#include <qdir.h> -#include <qfile.h> -#include <qdom.h> -#include <qtextstream.h> -#include <qimage.h> +#include <tqdir.h> +#include <tqfile.h> +#include <tqdom.h> +#include <tqtextstream.h> +#include <tqimage.h> #include <klocale.h> #include <kmessagebox.h> @@ -43,7 +43,7 @@ PMLibraryHandle::PMLibraryHandle( ) m_libraries.setAutoDelete( true ); } -PMLibraryHandle::PMLibraryHandle( const QString& path ) +PMLibraryHandle::PMLibraryHandle( const TQString& path ) { setPath( path ); setAuthor( i18n( "Unknown" ) ); @@ -57,23 +57,23 @@ PMLibraryHandle::~PMLibraryHandle( ) { } -void PMLibraryHandle::setName( const QString& name ) +void PMLibraryHandle::setName( const TQString& name ) { m_name = name; } -void PMLibraryHandle::setPath( const QString& path ) +void PMLibraryHandle::setPath( const TQString& path ) { m_objects.clear( ); m_path = path; } -void PMLibraryHandle::setAuthor( const QString& author ) +void PMLibraryHandle::setAuthor( const TQString& author ) { m_author = author; } -void PMLibraryHandle::setDescription( const QString& description ) +void PMLibraryHandle::setDescription( const TQString& description ) { m_description = description; } @@ -86,7 +86,7 @@ void PMLibraryHandle::setReadOnly( const bool rdOnly ) void PMLibraryHandle::loadLibraryInfo( ) { // 1. Open the information file (library_index.xml) - QFile file( m_path + "/library_index.xml" ); + TQFile file( m_path + "/library_index.xml" ); if( !file.open( IO_ReadOnly ) ) { @@ -95,10 +95,10 @@ void PMLibraryHandle::loadLibraryInfo( ) } // 2. Read the information - QDomDocument doc( "KPOVLIBINDEX" ); + TQDomDocument doc( "KPOVLIBINDEX" ); doc.setContent( &file ); - QDomElement e = doc.documentElement( ); + TQDomElement e = doc.documentElement( ); if( e.tagName( ) != "library" ) { @@ -121,12 +121,12 @@ void PMLibraryHandle::loadLibraryInfo( ) m_subLibrary = true; // 4. The object entries - QDomNode n = e.firstChild( ); + TQDomNode n = e.firstChild( ); if( !n.isNull( ) ) { if( n.isElement( ) ) { - QDomElement c = n.toElement( ); + TQDomElement c = n.toElement( ); if( c.tagName( ) == "object_list" ) { n = n.firstChild( ); @@ -136,12 +136,12 @@ void PMLibraryHandle::loadLibraryInfo( ) if( c.tagName( ) == "object_entry" ) { m_objects.insert( c.attribute( "name", i18n( "Unknown" ) ), - new QString( c.attribute( "file", "" ) ) ); + new TQString( c.attribute( "file", "" ) ) ); } else if( c.tagName( ) == "library_entry" ) { m_libraries.insert( c.attribute( "name", i18n( "Unknown" ) ), - new QString( c.attribute( "file", "" ) ) ); + new TQString( c.attribute( "file", "" ) ) ); } n = n.nextSibling( ); } @@ -153,7 +153,7 @@ void PMLibraryHandle::loadLibraryInfo( ) PMLibraryHandle::PMResult PMLibraryHandle::createLibrary( ) { // Test if the library exists. - QDir d( m_path ); + TQDir d( m_path ); if( !d.exists( ) ) { @@ -174,15 +174,15 @@ PMLibraryHandle::PMResult PMLibraryHandle::createLibrary( ) PMLibraryHandle::PMResult PMLibraryHandle::saveLibraryInfo( ) { // Save the information to the index - QFile file( m_path + "/library_index.xml" ); + TQFile file( m_path + "/library_index.xml" ); if( !file.open( IO_WriteOnly ) ) { return PMLibraryHandle::CouldNotCreateInfo; } // Create the XML DOM tree - QDomDocument doc( "KPOVLIBINDEX" ); - QDomElement e = doc.createElement( "library" ); + TQDomDocument doc( "KPOVLIBINDEX" ); + TQDomElement e = doc.createElement( "library" ); e.setAttribute( "name", name( ) ); e.setAttribute( "author", author( ) ); e.setAttribute( "description", description( ) ); @@ -197,17 +197,17 @@ PMLibraryHandle::PMResult PMLibraryHandle::saveLibraryInfo( ) e.setAttribute( "sublibrary", "false" ); // Add the object list to the tree - QDomElement l = doc.createElement( "object_list" ); - for(QDictIterator<QString> it( m_objects ); it.current( ); ++it ) + TQDomElement l = doc.createElement( "object_list" ); + for(TQDictIterator<TQString> it( m_objects ); it.current( ); ++it ) { - QDomElement n = doc.createElement( "object_entry" ); + TQDomElement n = doc.createElement( "object_entry" ); n.setAttribute( "name", it.currentKey( ) ); n.setAttribute( "file", *( it.current( ) ) ); l.appendChild( n ); } - for(QDictIterator<QString> it( m_libraries ); it.current( ); ++it ) + for(TQDictIterator<TQString> it( m_libraries ); it.current( ); ++it ) { - QDomElement n = doc.createElement( "library_entry" ); + TQDomElement n = doc.createElement( "library_entry" ); n.setAttribute( "name", it.currentKey( ) ); n.setAttribute( "file", *( it.current( ) ) ); l.appendChild( n ); @@ -216,8 +216,8 @@ PMLibraryHandle::PMResult PMLibraryHandle::saveLibraryInfo( ) doc.appendChild( e ); // Save to the file - QTextStream str( &file ); - str.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream str( &file ); + str.setEncoding( TQTextStream::UnicodeUTF8 ); str << doc.toString( ); file.close( ); @@ -230,16 +230,16 @@ PMLibraryHandle::PMResult PMLibraryHandle::createNewObject( ) return PMLibraryHandle::CouldNotCreateFile; /* PMLibraryObject aux; - QCString s = m_path.latin1( ); - QString unknownIcon = locate( "data" , "kpovmodeler/questionmark.png" ); - QImage img; + TQCString s = m_path.latin1( ); + TQString unknownIcon = locate( "data" , "kpovmodeler/questionmark.png" ); + TQImage img; int fh; if( m_readOnly ) return PMLibraryHandle::ReadOnlyLib; aux.setName( i18n( "Empty" ) ); - aux.setObjects( QByteArray( ) ); + aux.setObjects( TQByteArray( ) ); img.load( unknownIcon, "PNG" ); aux.setPreview( img ); @@ -252,24 +252,24 @@ PMLibraryHandle::PMResult PMLibraryHandle::createNewObject( ) // Success creating the file close( fh ); - m_objects.insert( i18n( "Empty" ), new QString( s ) ); + m_objects.insert( i18n( "Empty" ), new TQString( s ) ); aux.save( s ); saveLibraryInfo( ); return PMLibraryHandle::Ok; */ } -PMLibraryHandle::PMResult PMLibraryHandle::addObject( const QString& path, const QString& name ) +PMLibraryHandle::PMResult PMLibraryHandle::addObject( const TQString& path, const TQString& name ) { if( m_readOnly ) return PMLibraryHandle::ReadOnlyLib; - m_objects.insert( name, new QString( path ) ); + m_objects.insert( name, new TQString( path ) ); saveLibraryInfo( ); return PMLibraryHandle::Ok; } -PMLibraryHandle::PMResult PMLibraryHandle::deleteObject( const QString& objectName ) +PMLibraryHandle::PMResult PMLibraryHandle::deleteObject( const TQString& objectName ) { if( m_readOnly ) return PMLibraryHandle::ReadOnlyLib; @@ -290,13 +290,13 @@ PMLibraryHandle::PMResult PMLibraryHandle::deleteObject( const QString& objectNa return PMLibraryHandle::NotInLib; } -PMLibraryHandle::PMResult PMLibraryHandle::createNewSubLibrary( const QString /*subLibName*/ ) +PMLibraryHandle::PMResult PMLibraryHandle::createNewSubLibrary( const TQString /*subLibName*/ ) { /// @todo Need to replace mkdtemp and mkstemps before enabling libs return PMLibraryHandle::CouldNotCreateFile; /* char* dirname; - QCString s = m_path.latin1( ); + TQCString s = m_path.latin1( ); PMLibraryHandle aux; if( m_readOnly ) @@ -316,23 +316,23 @@ PMLibraryHandle::PMResult PMLibraryHandle::createNewSubLibrary( const QString /* aux.setAuthor( author( ) ); aux.setPath( dirname ); aux.saveLibraryInfo( ); - m_libraries.insert( subLibName, new QString( dirname ) ); + m_libraries.insert( subLibName, new TQString( dirname ) ); saveLibraryInfo( ); return PMLibraryHandle::Ok; */ } -PMLibraryHandle::PMResult PMLibraryHandle::addSubLibrary( const QString& path, const QString& subLibName ) +PMLibraryHandle::PMResult PMLibraryHandle::addSubLibrary( const TQString& path, const TQString& subLibName ) { if( m_readOnly ) return PMLibraryHandle::ReadOnlyLib; - m_libraries.insert( subLibName, new QString( path ) ); + m_libraries.insert( subLibName, new TQString( path ) ); saveLibraryInfo( ); return PMLibraryHandle::Ok; } -PMLibraryHandle::PMResult PMLibraryHandle::deleteSubLibrary( const QString& subLibName ) +PMLibraryHandle::PMResult PMLibraryHandle::deleteSubLibrary( const TQString& subLibName ) { if( m_readOnly ) return PMLibraryHandle::ReadOnlyLib; @@ -353,25 +353,25 @@ PMLibraryHandle::PMResult PMLibraryHandle::deleteSubLibrary( const QString& subL return PMLibraryHandle::NotInLib; } -PMLibraryHandle::PMResult PMLibraryHandle::changeParentLibrary( const QString& parentPath ) +PMLibraryHandle::PMResult PMLibraryHandle::changeParentLibrary( const TQString& parentPath ) { if( m_readOnly ) return PMLibraryHandle::ReadOnlyLib; - QString newPath = parentPath + "/" + m_path.section( '/', -1 ); + TQString newPath = parentPath + "/" + m_path.section( '/', -1 ); PMLibraryHandle::EntryIterator itr( m_libraries ); for( ; itr.current( ); ++itr ) { PMLibraryHandle lib = PMLibraryHandle( *itr.current( ) ); lib.changeParentLibrary( newPath ); - m_libraries.replace( itr.currentKey( ), new QString( newPath + "/" + lib.path( ) ) ); + m_libraries.replace( itr.currentKey( ), new TQString( newPath + "/" + lib.path( ) ) ); } PMLibraryHandle::EntryIterator objItr( m_objects ); for( ; objItr.current( ); ++objItr ) { - QString test = newPath + "/" + objItr.current( )->section( '/', -1 ); - m_objects.replace( objItr.currentKey( ), new QString( newPath + "/" + objItr.current( )->section( '/', -1 ) ) ); + TQString test = newPath + "/" + objItr.current( )->section( '/', -1 ); + m_objects.replace( objItr.currentKey( ), new TQString( newPath + "/" + objItr.current( )->section( '/', -1 ) ) ); } saveLibraryInfo( ); diff --git a/kpovmodeler/pmlibraryhandle.h b/kpovmodeler/pmlibraryhandle.h index e906fd11..353b7b53 100644 --- a/kpovmodeler/pmlibraryhandle.h +++ b/kpovmodeler/pmlibraryhandle.h @@ -23,10 +23,10 @@ #include <config.h> #endif -#include <qstring.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqdict.h> -class QDomElement; +class TQDomElement; /** * Class that holds all the information about a specific library. @@ -49,7 +49,7 @@ public: /** * Iterator for the objects in the library */ - typedef QDictIterator<QString> EntryIterator; + typedef TQDictIterator<TQString> EntryIterator; /** * Constructor for an empty library @@ -59,7 +59,7 @@ public: /** * Constructor for a given directory. */ - PMLibraryHandle( const QString& path ); + PMLibraryHandle( const TQString& path ); /** * Destructor @@ -68,42 +68,42 @@ public: /** * Returns the library's name */ - QString name( ) const { return m_name; } + TQString name( ) const { return m_name; } /** * Returns the library's path */ - QString path( ) const { return m_path; } + TQString path( ) const { return m_path; } /** * Returns the library's author */ - QString author( ) const { return m_author; } + TQString author( ) const { return m_author; } /** * Returns the library's description */ - QString description( ) const { return m_description; } + TQString description( ) const { return m_description; } /** * Sets the library's name */ - void setName( const QString& name ); + void setName( const TQString& name ); /** * Sets the library's path */ - void setPath( const QString& path ); + void setPath( const TQString& path ); /** * Sets the library's author */ - void setAuthor( const QString& author ); + void setAuthor( const TQString& author ); /** * Sets the library's description */ - void setDescription( const QString& description ); + void setDescription( const TQString& description ); /** * Sets the library's erad only status @@ -131,33 +131,33 @@ public: * @param name The name of the object * @return PMLibraryHandle::Ok if successful or the reason of failure */ - PMLibraryHandle::PMResult addObject( const QString& path, const QString& name ); + PMLibraryHandle::PMResult addObject( const TQString& path, const TQString& name ); /** * Deletes an object out of the library. Only removes the entry from the library * doesn't delete the objects file * @param objectName The name of the object ( or objects path ) to delete * @return PMLibraryHandle::Ok if successul or the reason of failure */ - PMLibraryHandle::PMResult deleteObject( const QString& objectName ); + PMLibraryHandle::PMResult deleteObject( const TQString& objectName ); /** * Create a new sub library. */ - PMLibraryHandle::PMResult createNewSubLibrary( const QString subLibName ); + PMLibraryHandle::PMResult createNewSubLibrary( const TQString subLibName ); /** * Adds an already existing sub-library to the library * @param path The path for the sub library * @param subLibName The name of the sub library * @return PMLibraryHandle::Ok if successful or the reason of failure */ - PMLibraryHandle::PMResult addSubLibrary( const QString& path, const QString& name ); + PMLibraryHandle::PMResult addSubLibrary( const TQString& path, const TQString& name ); /** * Deletes a sub library. Only removes the entry from the library * doesn't delete the objects file * @param subLibName The name of the sub library ( or sub libraries path ) to delete * @return PMLibraryHandle::Ok if successul or the reason of failure */ - PMLibraryHandle::PMResult deleteSubLibrary( const QString& subLibName ); + PMLibraryHandle::PMResult deleteSubLibrary( const TQString& subLibName ); /** * Returns true if the library is set read-only @@ -184,7 +184,7 @@ public: * @param parentPath The new parent path for this library * @return PMLibraryHandle::Ok if successful or the reason for failure */ - PMLibraryHandle::PMResult changeParentLibrary( const QString& parentPath ); + PMLibraryHandle::PMResult changeParentLibrary( const TQString& parentPath ); private: @@ -196,15 +196,15 @@ private: void loadLibraryInfo( ); - QString m_name; - QString m_path; - QString m_author; - QString m_description; + TQString m_name; + TQString m_path; + TQString m_author; + TQString m_description; bool m_readOnly; bool m_subLibrary; - QDict<QString> m_objects; - QDict<QString> m_libraries; + TQDict<TQString> m_objects; + TQDict<TQString> m_libraries; }; #endif diff --git a/kpovmodeler/pmlibraryhandleedit.cpp b/kpovmodeler/pmlibraryhandleedit.cpp index 8c26682d..e991af6e 100644 --- a/kpovmodeler/pmlibraryhandleedit.cpp +++ b/kpovmodeler/pmlibraryhandleedit.cpp @@ -17,13 +17,13 @@ #include "pmlibraryhandleedit.h" -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qtextedit.h> -#include <qvbox.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqtextedit.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> #include <kconfig.h> @@ -34,38 +34,38 @@ #include "pmdialogeditbase.h" #include "pmlibraryhandle.h" -QSize PMLibraryHandleEdit::s_size = QSize( 600, 400 ); +TQSize PMLibraryHandleEdit::s_size = TQSize( 600, 400 ); -PMLibraryHandleEdit::PMLibraryHandleEdit( PMLibraryHandle* lib, QWidget* parent, const char* name ) +PMLibraryHandleEdit::PMLibraryHandleEdit( PMLibraryHandle* lib, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Create Library" ), Ok | Cancel, Ok ) { m_pLibrary = lib; resize( s_size ); - QWidget* page = new QWidget( this ); + TQWidget* page = new TQWidget( this ); setMainWidget( page ); - QVBoxLayout* vl = new QVBoxLayout( page, KDialog::spacingHint( ) ); + TQVBoxLayout* vl = new TQVBoxLayout( page, KDialog::spacingHint( ) ); - QGridLayout* grid = new QGridLayout( vl, 5, 2 ); - QLabel* lbl = new QLabel( i18n( "Name: " ), page ); - m_pNameEdit = new QLineEdit( page ); + TQGridLayout* grid = new TQGridLayout( vl, 5, 2 ); + TQLabel* lbl = new TQLabel( i18n( "Name: " ), page ); + m_pNameEdit = new TQLineEdit( page ); grid->addWidget( lbl, 0, 0 ); grid->addWidget( m_pNameEdit, 0, 1 ); - lbl = new QLabel( i18n( "Author: " ), page ); - m_pAuthorEdit = new QLineEdit( page ); + lbl = new TQLabel( i18n( "Author: " ), page ); + m_pAuthorEdit = new TQLineEdit( page ); grid->addWidget( lbl, 1, 0 ); grid->addWidget( m_pAuthorEdit, 1, 1 ); - lbl = new QLabel( i18n( "Description: " ), page ); - m_pDescriptionEdit = new QTextEdit( page ); + lbl = new TQLabel( i18n( "Description: " ), page ); + m_pDescriptionEdit = new TQTextEdit( page ); m_pDescriptionEdit->setMaximumHeight( 120 ); grid->addWidget( lbl, 2, 0 ); grid->addMultiCellWidget( m_pDescriptionEdit, 2, 3, 1, 1 ); grid->setRowStretch( 3, 1 ); - m_pReadOnlyEdit = new QCheckBox( i18n( "Allow changes to the library?" ), page ); + m_pReadOnlyEdit = new TQCheckBox( i18n( "Allow changes to the library?" ), page ); grid->addMultiCellWidget( m_pReadOnlyEdit, 4, 4, 0, 1 ); // Load the fields with values @@ -75,10 +75,10 @@ PMLibraryHandleEdit::PMLibraryHandleEdit( PMLibraryHandle* lib, QWidget* parent, m_pReadOnlyEdit->setChecked( !lib->isReadOnly( ) ); // Setup the signals - connect( m_pNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotEditsChanged( const QString& ) ) ); - connect( m_pAuthorEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotEditsChanged( const QString& ) ) ); - connect( m_pDescriptionEdit, SIGNAL( textChanged( ) ), SLOT( slotDescriptionChanged( ) ) ); - connect( m_pReadOnlyEdit, SIGNAL( clicked( ) ), SLOT( slotReadOnlyChanged( ) ) ); + connect( m_pNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotEditsChanged( const TQString& ) ) ); + connect( m_pAuthorEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotEditsChanged( const TQString& ) ) ); + connect( m_pDescriptionEdit, TQT_SIGNAL( textChanged( ) ), TQT_SLOT( slotDescriptionChanged( ) ) ); + connect( m_pReadOnlyEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotReadOnlyChanged( ) ) ); // On startup you can only cancel enableButtonOK( false ); @@ -89,7 +89,7 @@ void PMLibraryHandleEdit::slotReadOnlyChanged( ) enableButtonOK( true ); } -void PMLibraryHandleEdit::slotEditsChanged( const QString& /*str*/ ) +void PMLibraryHandleEdit::slotEditsChanged( const TQString& /*str*/ ) { enableButtonOK( true ); } @@ -109,11 +109,11 @@ void PMLibraryHandleEdit::restoreConfig( KConfig* cfg ) { cfg->setGroup( "Appearance" ); - QSize defaultSize( 300, 200 ); + TQSize defaultSize( 300, 200 ); s_size = cfg->readSizeEntry( "LibraryHandleEditSize", &defaultSize ); } -void PMLibraryHandleEdit::resizeEvent( QResizeEvent* ev ) +void PMLibraryHandleEdit::resizeEvent( TQResizeEvent* ev ) { s_size = ev->size( ); } diff --git a/kpovmodeler/pmlibraryhandleedit.h b/kpovmodeler/pmlibraryhandleedit.h index d0f53bb2..d57b8e5e 100644 --- a/kpovmodeler/pmlibraryhandleedit.h +++ b/kpovmodeler/pmlibraryhandleedit.h @@ -25,10 +25,10 @@ #include <kdialogbase.h> -class QLineEdit; -class QTextEdit; -class QListBox; -class QCheckBox; +class TQLineEdit; +class TQTextEdit; +class TQListBox; +class TQCheckBox; class PMLibraryHandle; /** @@ -42,25 +42,25 @@ public: * Construct a dialog to edit the properties of lib. The library will be * modified only if Ok is pressed. */ - PMLibraryHandleEdit( PMLibraryHandle* lib, QWidget *parent = NULL, const char* name = NULL ); + PMLibraryHandleEdit( PMLibraryHandle* lib, TQWidget *parent = NULL, const char* name = NULL ); static void saveConfig( KConfig* cfg ); static void restoreConfig( KConfig* cfg ); - static QSize s_size; + static TQSize s_size; private slots: void slotOk( ); - void slotEditsChanged( const QString& ); + void slotEditsChanged( const TQString& ); void slotDescriptionChanged( ); void slotReadOnlyChanged( ); - void resizeEvent( QResizeEvent *ev ); + void resizeEvent( TQResizeEvent *ev ); private: PMLibraryHandle* m_pLibrary; - QLineEdit* m_pNameEdit; - QLineEdit* m_pAuthorEdit; - QTextEdit* m_pDescriptionEdit; - QCheckBox* m_pReadOnlyEdit; + TQLineEdit* m_pNameEdit; + TQLineEdit* m_pAuthorEdit; + TQTextEdit* m_pDescriptionEdit; + TQCheckBox* m_pReadOnlyEdit; }; #endif diff --git a/kpovmodeler/pmlibraryiconview.cpp b/kpovmodeler/pmlibraryiconview.cpp index 9a59fcda..d2588dca 100644 --- a/kpovmodeler/pmlibraryiconview.cpp +++ b/kpovmodeler/pmlibraryiconview.cpp @@ -20,8 +20,8 @@ #include <unistd.h> -#include <qstring.h> -#include <qdir.h> +#include <tqstring.h> +#include <tqdir.h> #include <kurl.h> #include <kio/job.h> @@ -50,14 +50,14 @@ const char* PMLibraryIconDrag::format( int i ) const } } -QByteArray PMLibraryIconDrag::encodedData( const char* mime ) const +TQByteArray PMLibraryIconDrag::encodedData( const char* mime ) const { - QByteArray a; - if ( QString( mime ) == "application/x-qiconlist" ) - a = QIconDrag::encodedData( mime ); - else if ( QString( mime ) == "text/sublib-list" ) + TQByteArray a; + if ( TQString( mime ) == "application/x-qiconlist" ) + a = TQIconDrag::encodedData( mime ); + else if ( TQString( mime ) == "text/sublib-list" ) { - QString s , l; + TQString s , l; for( unsigned i = 0; i < m_paths.count( ); ++i ) { if( m_subLibs[i] ) @@ -72,19 +72,19 @@ QByteArray PMLibraryIconDrag::encodedData( const char* mime ) const return a; } -bool PMLibraryIconDrag::canDecode( QMimeSource* e ) +bool PMLibraryIconDrag::canDecode( TQMimeSource* e ) { return e->provides( "application/x-qiconlist" ) || e->provides( "text/sublib-list" ); } -bool PMLibraryIconDrag::decode( QMimeSource* e, QStringList& strList, QValueList<bool>& subLibList ) +bool PMLibraryIconDrag::decode( TQMimeSource* e, TQStringList& strList, TQValueList<bool>& subLibList ) { - QByteArray a = e->encodedData( "text/sublib-list" ); + TQByteArray a = e->encodedData( "text/sublib-list" ); if( a.isEmpty( ) ) return false; - QStringList list = QStringList::split( "\n", QString( a ) ); + TQStringList list = TQStringList::split( "\n", TQString( a ) ); for( unsigned i = 0; i < list.count( ); ++i ) { strList.append( list[i].section( "\r", 0, 0 ) ); @@ -96,15 +96,15 @@ bool PMLibraryIconDrag::decode( QMimeSource* e, QStringList& strList, QValueList return true; } -void PMLibraryIconDrag::append( const QIconDragItem &item, const QRect &pr, - const QRect &tr, const QString &path, bool isSubLibrary ) +void PMLibraryIconDrag::append( const TQIconDragItem &item, const TQRect &pr, + const TQRect &tr, const TQString &path, bool isSubLibrary ) { - QIconDrag::append( item, pr, tr ); + TQIconDrag::append( item, pr, tr ); m_paths << path; m_subLibs.append( isSubLibrary ); } -PMLibraryIconView::PMLibraryIconView( QWidget* parent, const char* name ) +PMLibraryIconView::PMLibraryIconView( TQWidget* parent, const char* name ) : KIconView( parent, name ) { m_pLibrary = NULL; @@ -131,7 +131,7 @@ void PMLibraryIconView::refresh( ) it = m_pLibrary->createSubLibraryIterator( ); for( ; it->current( ); ++(*it) ) { - QString f_name = *( it->current( ) ); + TQString f_name = *( it->current( ) ); PMLibraryHandle h( f_name ); new PMLibraryIconViewItem( this, h.name( ), f_name, true ); @@ -142,7 +142,7 @@ void PMLibraryIconView::refresh( ) it = m_pLibrary->createObjectIterator( ); for( ; it->current( ); ++(*it) ) { - QString f_name = *( it->current( ) ); + TQString f_name = *( it->current( ) ); PMLibraryObject obj( f_name ); if( obj.preview( ) ) @@ -153,20 +153,20 @@ void PMLibraryIconView::refresh( ) delete it; } -void PMLibraryIconView::slotDropped( QDropEvent *e, const QValueList<QIconDragItem> & ) +void PMLibraryIconView::slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ) { e->ignore( ); } -QDragObject* PMLibraryIconView::dragObject( ) +TQDragObject* PMLibraryIconView::dragObject( ) { if ( !currentItem( ) ) return 0; - QPoint orig = viewportToContents( viewport( )->mapFromGlobal( QCursor::pos( ) ) ); + TQPoint orig = viewportToContents( viewport( )->mapFromGlobal( TQCursor::pos( ) ) ); PMLibraryIconDrag *drag = new PMLibraryIconDrag( viewport( ) ); drag->setPixmap( *currentItem( )->pixmap( ), - QPoint( currentItem( )->pixmapRect( ).width( ) / 2, + TQPoint( currentItem( )->pixmapRect( ).width( ) / 2, currentItem( )->pixmapRect( ).height( ) / 2 ) ); for ( PMLibraryIconViewItem *item = (PMLibraryIconViewItem*)firstItem( ); @@ -174,14 +174,14 @@ QDragObject* PMLibraryIconView::dragObject( ) { if ( item->isSelected( ) ) { - QIconDragItem id; - id.setData( QCString( item->path( ).latin1( ) ) ); + TQIconDragItem id; + id.setData( TQCString( item->path( ).latin1( ) ) ); drag->append( id, - QRect( item->pixmapRect( FALSE ).x( ) - orig.x( ), + TQRect( item->pixmapRect( FALSE ).x( ) - orig.x( ), item->pixmapRect( FALSE ).y( ) - orig.y( ), item->pixmapRect( ).width( ), item->pixmapRect( ).height( ) ), - QRect( item->textRect( FALSE ).x( ) - orig.x( ), + TQRect( item->textRect( FALSE ).x( ) - orig.x( ), item->textRect( FALSE ).y( ) - orig.y( ), item->textRect().width( ), item->textRect( ).height( ) ), @@ -192,21 +192,21 @@ QDragObject* PMLibraryIconView::dragObject( ) return drag; } -PMLibraryIconViewItem::PMLibraryIconViewItem( QIconView *parent, const QString &text, const QString& path, bool isSubLibrary ) +PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *parent, const TQString &text, const TQString& path, bool isSubLibrary ) : KIconViewItem( parent, text ) { m_path = path; m_isSubLibrary = isSubLibrary; } -PMLibraryIconViewItem::PMLibraryIconViewItem( QIconView *parent, const QString &text, const QImage& image, const QString& path, bool isSubLibrary ) +PMLibraryIconViewItem::PMLibraryIconViewItem( TQIconView *parent, const TQString &text, const TQImage& image, const TQString& path, bool isSubLibrary ) : KIconViewItem( parent, text, image ) { m_path = path; m_isSubLibrary = isSubLibrary; } -bool PMLibraryIconViewItem::acceptDrop( const QMimeSource *e ) const +bool PMLibraryIconViewItem::acceptDrop( const TQMimeSource *e ) const { if ( m_isSubLibrary && e->provides( "text/sublib-list" ) ) return true; @@ -214,10 +214,10 @@ bool PMLibraryIconViewItem::acceptDrop( const QMimeSource *e ) const return false; } -void PMLibraryIconViewItem::dropped( QDropEvent *e, const QValueList<QIconDragItem> & ) +void PMLibraryIconViewItem::dropped( TQDropEvent *e, const TQValueList<TQIconDragItem> & ) { - QStringList pathList; - QValueList<bool> subLibList; + TQStringList pathList; + TQValueList<bool> subLibList; if( m_isSubLibrary && PMLibraryIconDrag::decode( e, pathList, subLibList ) ) { PMLibraryIconView* source = static_cast<PMLibraryIconView*>( e->source( )->parentWidget( ) ); @@ -232,12 +232,12 @@ void PMLibraryIconViewItem::dropped( QDropEvent *e, const QValueList<QIconDragIt for( unsigned i = 0; i < pathList.count( ); ++i ) { bool success = true; - QString path = pathList[i]; + TQString path = pathList[i]; if( path != ( m_path +"/" + path.section( '/', -1 ) ) ) { if( subLibList[i] ) { - QString newpath = newPath( path, true ); + TQString newpath = newPath( path, true ); if( parentLib->deleteSubLibrary( path ) == PMLibraryHandle::Ok ) { PMLibraryHandle lib = PMLibraryHandle( path ); @@ -257,7 +257,7 @@ void PMLibraryIconViewItem::dropped( QDropEvent *e, const QValueList<QIconDragIt } else { - QString newpath = newPath( path, false ); + TQString newpath = newPath( path, false ); if( parentLib->deleteObject( path ) == PMLibraryHandle::Ok ) { PMLibraryObject obj = PMLibraryObject( path ); @@ -292,28 +292,28 @@ void PMLibraryIconViewItem::dropped( QDropEvent *e, const QValueList<QIconDragIt } } -QString PMLibraryIconViewItem::newPath( const QString oldPath, bool /*subLib*/ ) +TQString PMLibraryIconViewItem::newPath( const TQString oldPath, bool /*subLib*/ ) { /// @todo Need to replace mkdtemp and mkstemps before enabling libs return oldPath; /* - QString path = m_path + "/" + oldPath.section( '/', -1 ); + TQString path = m_path + "/" + oldPath.section( '/', -1 ); if( subLib ) { - QString test = path + "/library_index.xml"; - if( QFile::exists( test ) ) + TQString test = path + "/library_index.xml"; + if( TQFile::exists( test ) ) { - QCString s = m_path.latin1(); + TQCString s = m_path.latin1(); s+= "/libXXXXXX"; char* dirname = mkdtemp( s.data() ); rmdir( dirname ); path = dirname; } } - else if( QFile::exists( path ) ) + else if( TQFile::exists( path ) ) { // we need to rename it. - QCString s = m_path.latin1(); + TQCString s = m_path.latin1(); s += "/objXXXXXX.kpml"; int fh = mkstemps( s.data( ), 5 ); close( fh ); diff --git a/kpovmodeler/pmlibraryiconview.h b/kpovmodeler/pmlibraryiconview.h index a30ef529..87b90ffb 100644 --- a/kpovmodeler/pmlibraryiconview.h +++ b/kpovmodeler/pmlibraryiconview.h @@ -35,25 +35,25 @@ class PMLibraryIconDrag : public QIconDrag Q_OBJECT public: /** Constructor */ - PMLibraryIconDrag( QWidget * dragSource, const char* name = 0 ) : QIconDrag( dragSource, name ) {} + PMLibraryIconDrag( TQWidget * dragSource, const char* name = 0 ) : TQIconDrag( dragSource, name ) {} /** @return The ith format, or NULL. */ const char* format( int i ) const; /** @return The encoded payload of this object, in the specified MIME format. */ - QByteArray encodedData( const char* mime ) const; + TQByteArray encodedData( const char* mime ) const; /** @return True if the information in e can be decoded */ - static bool canDecode( QMimeSource* e ); + static bool canDecode( TQMimeSource* e ); /** * Attempts to decode the data in e * @return True if successful otherwise returns false */ - static bool decode( QMimeSource* e, QStringList& StrList, QValueList<bool>& subLibList ); + static bool decode( TQMimeSource* e, TQStringList& StrList, TQValueList<bool>& subLibList ); /** Adds a item to the object */ - void append( const QIconDragItem &item, const QRect &pr, const QRect &tr, const QString &path, bool subLib ); + void append( const TQIconDragItem &item, const TQRect &pr, const TQRect &tr, const TQString &path, bool subLib ); private: - QStringList m_paths; - QValueList<bool> m_subLibs; + TQStringList m_paths; + TQValueList<bool> m_subLibs; }; /** @@ -63,7 +63,7 @@ class PMLibraryIconView: public KIconView { Q_OBJECT public: - PMLibraryIconView( QWidget *parent, const char* name = NULL ); + PMLibraryIconView( TQWidget *parent, const char* name = NULL ); /** * Set the library base path @@ -81,11 +81,11 @@ public slots: void refresh( ); /** called when an Item is dropped onto the view */ - void slotDropped( QDropEvent *e, const QValueList<QIconDragItem>& ); + void slotDropped( TQDropEvent *e, const TQValueList<TQIconDragItem>& ); protected: - /** @return a QDragObject for drag and drop */ - virtual QDragObject* dragObject( ); + /** @return a TQDragObject for drag and drop */ + virtual TQDragObject* dragObject( ); private: PMLibraryHandle *m_pLibrary; @@ -99,24 +99,24 @@ private: class PMLibraryIconViewItem: public KIconViewItem { public: - PMLibraryIconViewItem( QIconView *parent, const QString& text, const QString& path, bool isSubLibrary ); - PMLibraryIconViewItem( QIconView *parent, const QString& text, const QImage& image, const QString& path, bool isSubLibrary ); + PMLibraryIconViewItem( TQIconView *parent, const TQString& text, const TQString& path, bool isSubLibrary ); + PMLibraryIconViewItem( TQIconView *parent, const TQString& text, const TQImage& image, const TQString& path, bool isSubLibrary ); /** Get the path of the entry */ - QString path( ) const { return m_path; } + TQString path( ) const { return m_path; } /** Is the entry a sublib library? */ bool isSubLibrary( ) const { return m_isSubLibrary; } /** Reimplement accept drop to take items */ - virtual bool acceptDrop( const QMimeSource *mime ) const; + virtual bool acceptDrop( const TQMimeSource *mime ) const; protected: /** Tokes a dropped item */ - void dropped( QDropEvent *evt, const QValueList<QIconDragItem>& ); + void dropped( TQDropEvent *evt, const TQValueList<TQIconDragItem>& ); /** Checks for the existance of oldpath and generates a new path as required */ - QString newPath( const QString oldPath, bool subLib ); + TQString newPath( const TQString oldPath, bool subLib ); private: - QString m_path; + TQString m_path; bool m_isSubLibrary; }; diff --git a/kpovmodeler/pmlibrarymanager.cpp b/kpovmodeler/pmlibrarymanager.cpp index 2caeb6e3..9683064a 100644 --- a/kpovmodeler/pmlibrarymanager.cpp +++ b/kpovmodeler/pmlibrarymanager.cpp @@ -21,17 +21,17 @@ #include <kstandarddirs.h> #include <kglobal.h> -#include <qfile.h> -#include <qdir.h> +#include <tqfile.h> +#include <tqdir.h> #include "pmdebug.h" PMLibraryManager* PMLibraryManager::s_pInstance = 0; KStaticDeleter<PMLibraryManager> PMLibraryManager::s_staticDeleter; -PMLibraryHandle* PMLibraryManager::getLibraryHandle( const QString& libraryName ) +PMLibraryHandle* PMLibraryManager::getLibraryHandle( const TQString& libraryName ) { - QPtrListIterator<PMLibraryHandle> it( m_libraries ); + TQPtrListIterator<PMLibraryHandle> it( m_libraries ); for( ; it.current( ); ++it ) if( it.current( )->name( ) == libraryName ) @@ -59,10 +59,10 @@ void PMLibraryManager::restoreConfig( KConfig* /*cfg*/ ) { } -QValueList<QString> PMLibraryManager::availableLibraries( ) +TQValueList<TQString> PMLibraryManager::availableLibraries( ) { - QValueList<QString> result; - QPtrListIterator<PMLibraryHandle> it( m_libraries ); + TQValueList<TQString> result; + TQPtrListIterator<PMLibraryHandle> it( m_libraries ); for( ; it.current( ); ++it ) result.push_back( it.current( )->name( ) ); @@ -79,24 +79,24 @@ PMLibraryManager* PMLibraryManager::theManager( ) void PMLibraryManager::scanLibraries( ) { - QStringList libraryDirectories; + TQStringList libraryDirectories; // Search for sub directories in /usr/share/kpovmodeler/library libraryDirectories = KGlobal::dirs( )->findDirs( "data", "kpovmodeler/library" ); - for( QStringList::Iterator i = libraryDirectories.begin( ); i != libraryDirectories.end( ); ++i ) + for( TQStringList::Iterator i = libraryDirectories.begin( ); i != libraryDirectories.end( ); ++i ) { - QDir curDir( *i ); - curDir.setFilter( QDir::Dirs ); + TQDir curDir( *i ); + curDir.setFilter( TQDir::Dirs ); QFileInfoListIterator it( *( curDir.entryInfoList( ) ) ); // For each sub directory - QFileInfo* fi; + TQFileInfo* fi; for( ; ( fi = it.current( ) ) != NULL; ++it ) { // check for the existance of library_index.xml // If it's there it's a library - if( QFile::exists( fi->absFilePath( ) + "/library_index.xml" ) ) + if( TQFile::exists( fi->absFilePath( ) + "/library_index.xml" ) ) { // Create the corresponding PMLibraryHandle PMLibraryHandle* h; diff --git a/kpovmodeler/pmlibrarymanager.h b/kpovmodeler/pmlibrarymanager.h index 8221ba19..1ced4d0b 100644 --- a/kpovmodeler/pmlibrarymanager.h +++ b/kpovmodeler/pmlibrarymanager.h @@ -23,16 +23,16 @@ #include <config.h> #endif -#include <qstring.h> -#include <qmap.h> -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> #include <kstaticdeleter.h> #include "pmlibraryhandle.h" class KConfig; -class QDomElement; +class TQDomElement; /** * Class that maintains the list of available libraries for kpovmodeler @@ -63,12 +63,12 @@ public: /** * Returns the list of available libraries */ - QValueList<QString> availableLibraries( ); + TQValueList<TQString> availableLibraries( ); /** * Returns the handle for the indicated library */ - PMLibraryHandle* getLibraryHandle( const QString& libraryName ); + PMLibraryHandle* getLibraryHandle( const TQString& libraryName ); /** * Refreshes the list of libraries. @@ -88,7 +88,7 @@ private: void scanLibraries( ); - QPtrList< PMLibraryHandle > m_libraries; + TQPtrList< PMLibraryHandle > m_libraries; static PMLibraryManager* s_pInstance; static KStaticDeleter<PMLibraryManager> s_staticDeleter; diff --git a/kpovmodeler/pmlibraryobject.cpp b/kpovmodeler/pmlibraryobject.cpp index e84ba9e1..d89edbec 100644 --- a/kpovmodeler/pmlibraryobject.cpp +++ b/kpovmodeler/pmlibraryobject.cpp @@ -18,11 +18,11 @@ #include "pmlibraryobject.h" -#include <qstring.h> -#include <qvaluelist.h> -#include <qdom.h> -#include <qbuffer.h> -#include <qimage.h> +#include <tqstring.h> +#include <tqvaluelist.h> +#include <tqdom.h> +#include <tqbuffer.h> +#include <tqimage.h> #include <karchive.h> #include <kurl.h> @@ -40,9 +40,9 @@ PMLibraryObject::PMLibraryObject( ) m_preview = NULL; m_objects = NULL; m_data = NULL; - m_name = QString::null; - m_description = QString::null; - m_keywords = QString::null; + m_name = TQString::null; + m_description = TQString::null; + m_keywords = TQString::null; } PMLibraryObject::PMLibraryObject( KURL u ) @@ -78,40 +78,40 @@ void PMLibraryObject::loadLibraryInfo( ) const KArchiveEntry* entry = root->entry( "objectinfo.xml" ); if( entry && entry->isFile( ) ) { - QBuffer buffer( ( ( KArchiveFile* )entry )->data( ) ); + TQBuffer buffer( ( ( KArchiveFile* )entry )->data( ) ); buffer.open( IO_ReadOnly ); - QDomDocument doc( "OBJECTINFO" ); + TQDomDocument doc( "OBJECTINFO" ); doc.setContent( &buffer ); - QDomElement e = doc.documentElement( ); + TQDomElement e = doc.documentElement( ); m_name = e.attribute( "name", "empty" ); - QDomNode c = e.firstChild( ); + TQDomNode c = e.firstChild( ); while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); // Description information if( ce.tagName( ) == "description" ) { - QDomText te = ce.firstChild( ).toText( ); + TQDomText te = ce.firstChild( ).toText( ); m_description = te.nodeValue( ); } // Keywords information else if( ce.tagName( ) == "keywords" ) { - QDomText te = ce.firstChild( ).toText( ); + TQDomText te = ce.firstChild( ).toText( ); m_keywords = te.nodeValue( ); } // Extra files list else if( ce.tagName( ) == "file_entries" ) { - QDomNode entry = ce.firstChild( ); + TQDomNode entry = ce.firstChild( ); while( !entry.isNull( ) ) { - QDomElement entryElement = entry.toElement( ); + TQDomElement entryElement = entry.toElement( ); if( entryElement.tagName( ) == "file" ) m_extraFiles.append( entryElement.attribute( "name", "" ) ); entry = entry.nextSibling( ); @@ -125,7 +125,7 @@ void PMLibraryObject::loadLibraryInfo( ) } } -QImage* PMLibraryObject::preview( ) +TQImage* PMLibraryObject::preview( ) { if( !m_previewLoaded ) { @@ -141,9 +141,9 @@ QImage* PMLibraryObject::preview( ) const KArchiveEntry* entry = root->entry( "preview.png" ); if( entry && entry->isFile( ) ) { - QBuffer buffer( ( ( KArchiveFile* )entry )->data( ) ); + TQBuffer buffer( ( ( KArchiveFile* )entry )->data( ) ); buffer.open( IO_ReadOnly ); - m_preview = new QImage( buffer.readAll( ) ); + m_preview = new TQImage( buffer.readAll( ) ); m_previewLoaded = true; } @@ -153,7 +153,7 @@ QImage* PMLibraryObject::preview( ) return m_preview; } -QByteArray* PMLibraryObject::objects( ) +TQByteArray* PMLibraryObject::objects( ) { if( !m_objectsLoaded ) { @@ -169,14 +169,14 @@ QByteArray* PMLibraryObject::objects( ) const KArchiveEntry* entry = root->entry( "objectdata.kpm" ); if( entry && entry->isFile( ) ) { - // Transfer the file contents to a QByteArray. + // Transfer the file contents to a TQByteArray. // TODO Maybe there is a smarter way of doing this. char buf[256]; int nbytes; - QIODevice* aux_in = ( ( KArchiveFile* )entry )->device( ); + TQIODevice* aux_in = ( ( KArchiveFile* )entry )->device( ); - m_objects = new QByteArray( ); - QBuffer aux_out( *m_objects ); + m_objects = new TQByteArray( ); + TQBuffer aux_out( *m_objects ); aux_in->open( IO_ReadOnly ); aux_out.open( IO_WriteOnly ); @@ -199,41 +199,41 @@ QByteArray* PMLibraryObject::objects( ) return m_objects; } -void PMLibraryObject::setName( const QString& str ) +void PMLibraryObject::setName( const TQString& str ) { m_name = str; } -void PMLibraryObject::setDescription( const QString& str ) +void PMLibraryObject::setDescription( const TQString& str ) { m_description = str; } -void PMLibraryObject::setKeywords( const QString& str ) +void PMLibraryObject::setKeywords( const TQString& str ) { m_keywords = str; } -void PMLibraryObject::setPreview( const QImage& img ) +void PMLibraryObject::setPreview( const TQImage& img ) { if( m_previewLoaded ) delete m_preview; - m_preview = new QImage( img ); + m_preview = new TQImage( img ); m_previewLoaded = true; } -void PMLibraryObject::setObjects( const QByteArray& obj ) +void PMLibraryObject::setObjects( const TQByteArray& obj ) { if( m_objectsLoaded ) delete m_objects; - m_objects = new QByteArray( obj ); + m_objects = new TQByteArray( obj ); m_objects->detach( ); m_objectsLoaded = true; } -void PMLibraryObject::save( const QString& fileName ) +void PMLibraryObject::save( const TQString& fileName ) { // create the library file m_data = new KTar( fileName, "application/x-gzip" ); @@ -256,41 +256,41 @@ void PMLibraryObject::saveLibraryInfo( ) exit( 1 ); } - QBuffer buf; + TQBuffer buf; // Document type - QDomDocument doc( "OBJECTINFO" ); + TQDomDocument doc( "OBJECTINFO" ); // The root element for the document has one attribute: name - QDomElement root = doc.createElement( "object" ); + TQDomElement root = doc.createElement( "object" ); doc.appendChild( root ); root.setAttribute( "name", m_name ); // Inside the root element we add the description node ... - QDomElement description = doc.createElement( "description" ); + TQDomElement description = doc.createElement( "description" ); root.appendChild( description ); description.appendChild( doc.createTextNode( m_description ) ); // ... and the keywords node ... - QDomElement keywords = doc.createElement( "keywords" ); + TQDomElement keywords = doc.createElement( "keywords" ); root.appendChild( keywords ); keywords.appendChild( doc.createTextNode( m_keywords ) ); // ... and finally the extra files information - QDomElement file_list = doc.createElement( "file_list" ); + TQDomElement file_list = doc.createElement( "file_list" ); root.appendChild( file_list ); - QStringList::Iterator it = m_extraFiles.begin( ); + TQStringList::Iterator it = m_extraFiles.begin( ); for( ; it != m_extraFiles.end( ); ++it ) { - QDomElement entry = doc.createElement( "file" ); + TQDomElement entry = doc.createElement( "file" ); entry.setAttribute( "name", *it ); file_list.appendChild( entry ); } // Write the document to the buffer - QByteArray array; - QTextStream str( array, IO_WriteOnly ); - str.setEncoding( QTextStream::UnicodeUTF8 ); + TQByteArray array; + TQTextStream str( array, IO_WriteOnly ); + str.setEncoding( TQTextStream::UnicodeUTF8 ); str << doc.toString( ); m_data->writeFile( "objectinfo.xml", "user", "group", array.size( ), array.data( ) ); } @@ -304,9 +304,9 @@ void PMLibraryObject::savePreview( ) exit( 1 ); } - QByteArray array; - QBuffer iods( array ); - QImageIO img_io( &iods, "PNG" ); + TQByteArray array; + TQBuffer iods( array ); + TQImageIO img_io( &iods, "PNG" ); if( m_previewLoaded ) { diff --git a/kpovmodeler/pmlibraryobject.h b/kpovmodeler/pmlibraryobject.h index e3699c8f..070b5c99 100644 --- a/kpovmodeler/pmlibraryobject.h +++ b/kpovmodeler/pmlibraryobject.h @@ -23,16 +23,16 @@ #include <config.h> #endif -#include <qstring.h> -#include <qmap.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqvaluelist.h> #include <kstaticdeleter.h> -#include <qstringlist.h> +#include <tqstringlist.h> class KURL; class KArchive; class KTar; -class QImage; +class TQImage; /** * This class implements a library object. @@ -67,19 +67,19 @@ public: /** * Name of the library object. */ - QString name( ) const { return m_name; } + TQString name( ) const { return m_name; } /** * Textual description of the library object. */ - QString description( ) const { return m_description; } + TQString description( ) const { return m_description; } /** * List of keywords for search of the library object. */ - QString keywords( ) const { return m_keywords; } + TQString keywords( ) const { return m_keywords; } /** * Graphical Preview. */ - QImage* preview( ); + TQImage* preview( ); /** * True is the preview has been loaded. */ @@ -87,34 +87,34 @@ public: /** * Objects for the scene */ - QByteArray* objects( ); + TQByteArray* objects( ); bool areObjectsLoaded( ) const { return m_objectsLoaded; } /** * Set the library object name */ - void setName( const QString& str ); + void setName( const TQString& str ); /** * Set the library object description */ - void setDescription( const QString& str ); + void setDescription( const TQString& str ); /** * Set the library object keywords */ - void setKeywords( const QString& str ); + void setKeywords( const TQString& str ); /** * Set the preview image */ - void setPreview( const QImage& img ); + void setPreview( const TQImage& img ); /** * Set the object data */ - void setObjects( const QByteArray& obj ); + void setObjects( const TQByteArray& obj ); /** * Save the library object to a file */ - void save( const QString& fileName ); + void save( const TQString& fileName ); private: void loadLibraryInfo( ); @@ -124,13 +124,13 @@ private: bool m_previewLoaded; bool m_objectsLoaded; - QString m_name; - QString m_description; - QString m_keywords; + TQString m_name; + TQString m_description; + TQString m_keywords; KTar* m_data; - QImage* m_preview; - QByteArray* m_objects; - QStringList m_extraFiles; + TQImage* m_preview; + TQByteArray* m_objects; + TQStringList m_extraFiles; }; #endif diff --git a/kpovmodeler/pmlibraryobjectsearch.cpp b/kpovmodeler/pmlibraryobjectsearch.cpp index 428da887..30e5be5c 100644 --- a/kpovmodeler/pmlibraryobjectsearch.cpp +++ b/kpovmodeler/pmlibraryobjectsearch.cpp @@ -21,45 +21,45 @@ #include "pmlibraryobjectsearch.h" #include "pmdialogeditbase.h" -#include <qlabel.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qlayout.h> -#include <qpixmap.h> -#include <qimage.h> -#include <qframe.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqlayout.h> +#include <tqpixmap.h> +#include <tqimage.h> +#include <tqframe.h> #include <kurl.h> #include <klocale.h> #include <kdialog.h> #include <klistview.h> -PMLibraryObjectSearch::PMLibraryObjectSearch( QWidget* parent ) : - QWidget( parent, "" ) +PMLibraryObjectSearch::PMLibraryObjectSearch( TQWidget* parent ) : + TQWidget( parent, "" ) { setMinimumSize( 780, 300 ); setMaximumSize( 800, 400 ); - QVBoxLayout* vl = new QVBoxLayout( this, KDialog::spacingHint( ) ); + TQVBoxLayout* vl = new TQVBoxLayout( this, KDialog::spacingHint( ) ); // Search parameters - QFrame* frame = new QFrame( this ); - QHBoxLayout* fhl = new QHBoxLayout( frame, KDialog::spacingHint( ) ); - QGridLayout* grid = new QGridLayout( fhl, 3, 2 ); - QLabel *lbl = new QLabel( i18n( "Search for:" ), frame ); - m_pSearch = new QLineEdit( frame ); + TQFrame* frame = new TQFrame( this ); + TQHBoxLayout* fhl = new TQHBoxLayout( frame, KDialog::spacingHint( ) ); + TQGridLayout* grid = new TQGridLayout( fhl, 3, 2 ); + TQLabel *lbl = new TQLabel( i18n( "Search for:" ), frame ); + m_pSearch = new TQLineEdit( frame ); grid->addWidget( lbl, 0, 0 ); grid->addWidget( m_pSearch, 0, 1 ); - QVBoxLayout* fvl = new QVBoxLayout( fhl ); - m_pSearchButton = new QPushButton( i18n( "&Search" ), frame ); + TQVBoxLayout* fvl = new TQVBoxLayout( fhl ); + m_pSearchButton = new TQPushButton( i18n( "&Search" ), frame ); fvl->addWidget( m_pSearchButton ); fvl->addStretch( 1 ); vl->addWidget( frame ); // Search results - frame = new QFrame( this ); - QHBoxLayout* hl = new QHBoxLayout( frame, KDialog::spacingHint( ) ); + frame = new TQFrame( this ); + TQHBoxLayout* hl = new TQHBoxLayout( frame, KDialog::spacingHint( ) ); m_pFileList = new KListView( frame ); m_pFileList->addColumn( i18n( "File" ) ); m_pFileList->addColumn( i18n( "Path" ) ); @@ -70,12 +70,12 @@ PMLibraryObjectSearch::PMLibraryObjectSearch( QWidget* parent ) : vl->addWidget( frame ); // Connect signals and slots - connect( m_pSearchButton, SIGNAL( clicked( ) ), SLOT( slotSearchButtonPressed( ) ) ); + connect( m_pSearchButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSearchButtonPressed( ) ) ); } void PMLibraryObjectSearch::slotSearchButtonPressed( ) { -// QStringList::Iterator it( s_libraryPath ); +// TQStringList::Iterator it( s_libraryPath ); // For each of the defined libraries // // Open recursively each library file diff --git a/kpovmodeler/pmlibraryobjectsearch.h b/kpovmodeler/pmlibraryobjectsearch.h index 2ef5b07a..55d44233 100644 --- a/kpovmodeler/pmlibraryobjectsearch.h +++ b/kpovmodeler/pmlibraryobjectsearch.h @@ -23,11 +23,11 @@ #include <config.h> #endif -#include <qwidget.h> +#include <tqwidget.h> -class QLineEdit; -class QListBox; -class QPushButton; +class TQLineEdit; +class TQListBox; +class TQPushButton; class PMLibraryEntryPreview; class KListView; @@ -40,14 +40,14 @@ class PMLibraryObjectSearch: public QWidget { Q_OBJECT public: - PMLibraryObjectSearch( QWidget *parent ); + PMLibraryObjectSearch( TQWidget *parent ); private slots: void slotSearchButtonPressed( ); private: - QLineEdit* m_pSearch; - QPushButton* m_pSearchButton; + TQLineEdit* m_pSearch; + TQPushButton* m_pSearchButton; KListView* m_pFileList; PMLibraryEntryPreview* m_pPreview; }; diff --git a/kpovmodeler/pmlight.cpp b/kpovmodeler/pmlight.cpp index b715c7ee..554a09c2 100644 --- a/kpovmodeler/pmlight.cpp +++ b/kpovmodeler/pmlight.cpp @@ -122,12 +122,12 @@ PMLight::~PMLight( ) { } -QString PMLight::description( ) const +TQString PMLight::description( ) const { return i18n( "light" ); } -void PMLight::serialize( QDomElement& e, QDomDocument& doc ) const +void PMLight::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "location", m_location.serializeXML( ) ); e.setAttribute( "color", m_color.serializeXML( ) ); @@ -212,7 +212,7 @@ void PMLight::serialize( QDomElement& e, QDomDocument& doc ) const void PMLight::readAttributes( const PMXMLHelper& h ) { - QString str; + TQString str; m_location = h.vectorAttribute( "location", locationDefault ); m_color = h.colorAttribute( "color", colorDefault ); @@ -564,7 +564,7 @@ void PMLight::setMediaAttenuation( bool y ) } } -PMDialogEditBase* PMLight::editWidget( QWidget* parent ) const +PMDialogEditBase* PMLight::editWidget( TQWidget* parent ) const { return new PMLightEdit( parent ); } diff --git a/kpovmodeler/pmlight.h b/kpovmodeler/pmlight.h index df40ec0a..4fafb2b0 100644 --- a/kpovmodeler/pmlight.h +++ b/kpovmodeler/pmlight.h @@ -56,25 +56,25 @@ public: /** */ virtual PMObject* copy( ) const { return new PMLight( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMLightEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmlight" ); } + virtual TQString pixmap( ) const { return TQString( "pmlight" ); } /** * Returns the type diff --git a/kpovmodeler/pmlightedit.cpp b/kpovmodeler/pmlightedit.cpp index 23f5aa9d..e652d0a2 100644 --- a/kpovmodeler/pmlightedit.cpp +++ b/kpovmodeler/pmlightedit.cpp @@ -22,14 +22,14 @@ #include "pmlineedits.h" #include "pmcoloredit.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <klocale.h> -PMLightEdit::PMLightEdit( QWidget* parent, const char* name ) +PMLightEdit::PMLightEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -41,7 +41,7 @@ void PMLightEdit::createTopWidgets( ) m_pLocation = new PMVectorEdit( "x", "y", "z", this ); m_pColor = new PMColorEdit( false, this ); - m_pType = new QComboBox( false, this ); + m_pType = new TQComboBox( false, this ); m_pType->insertItem( i18n( "Point Light" ) ); m_pType->insertItem( i18n( "Spot Light" ) ); m_pType->insertItem( i18n( "Cylindrical Light" ) ); @@ -49,74 +49,74 @@ void PMLightEdit::createTopWidgets( ) m_pRadius = new PMFloatEdit( this ); m_pRadius->setValidation( false, 0, true, 90 ); - m_pRadiusLabel = new QLabel( i18n( "Radius:" ), this ); + m_pRadiusLabel = new TQLabel( i18n( "Radius:" ), this ); m_pFalloff = new PMFloatEdit( this ); m_pFalloff->setValidation( false, 0, true, 90 ); - m_pFalloffLabel = new QLabel( i18n( "Falloff:" ), this ); + m_pFalloffLabel = new TQLabel( i18n( "Falloff:" ), this ); m_pTightness = new PMFloatEdit( this ); m_pTightness->setValidation( false, 0, true, 90 ); - m_pTightnessLabel = new QLabel( i18n( "Tightness:" ), this ); + m_pTightnessLabel = new TQLabel( i18n( "Tightness:" ), this ); m_pPointAt = new PMVectorEdit( "x", "y", "z", this ); - m_pPointAtLabel = new QLabel( i18n( "Point at:" ), this ); + m_pPointAtLabel = new TQLabel( i18n( "Point at:" ), this ); - m_pParallel = new QCheckBox( i18n( "Parallel" ), this ); + m_pParallel = new TQCheckBox( i18n( "Parallel" ), this ); - m_pAreaLight = new QCheckBox( i18n( "Area light" ), this ); + m_pAreaLight = new TQCheckBox( i18n( "Area light" ), this ); - m_pAreaTypeLabel = new QLabel( i18n ( "Area type:" ), this ); - m_pAreaType = new QComboBox( false, this ); + m_pAreaTypeLabel = new TQLabel( i18n ( "Area type:" ), this ); + m_pAreaType = new TQComboBox( false, this ); m_pAreaType->insertItem( i18n( "Rectangular" ) ); m_pAreaType->insertItem( i18n( "Circular" ) ); m_pAxis1 = new PMVectorEdit( "x", "y", "z", this ); - m_pAxis1Label = new QLabel( i18n( "Axis 1:" ), this ); + m_pAxis1Label = new TQLabel( i18n( "Axis 1:" ), this ); m_pAxis2 = new PMVectorEdit( "x", "y", "z", this ); - m_pAxis2Label = new QLabel( i18n( "Axis 2:" ), this ); + m_pAxis2Label = new TQLabel( i18n( "Axis 2:" ), this ); m_pSize1 = new PMIntEdit( this ); m_pSize1->setValidation( true, 1, true, 50 ); - m_pSize1Label = new QLabel( i18n( "Size 1:" ), this ); + m_pSize1Label = new TQLabel( i18n( "Size 1:" ), this ); m_pSize2 = new PMIntEdit( this ); m_pSize2->setValidation( true, 1, true, 50 ); - m_pSize2Label = new QLabel( i18n( "Size 2:" ), this ); + m_pSize2Label = new TQLabel( i18n( "Size 2:" ), this ); m_pAdaptive = new PMIntEdit( this ); m_pAdaptive->setValidation( true, 0, false, 0 ); - m_pAdaptiveLabel = new QLabel( i18n( "Adaptive:" ), this ); - m_pOrient = new QCheckBox( i18n( "Orient" ), this ); - m_pJitter = new QCheckBox( i18n( "Jitter" ), this ); + m_pAdaptiveLabel = new TQLabel( i18n( "Adaptive:" ), this ); + m_pOrient = new TQCheckBox( i18n( "Orient" ), this ); + m_pJitter = new TQCheckBox( i18n( "Jitter" ), this ); - m_pFading = new QCheckBox( i18n( "Fading" ), this ); + m_pFading = new TQCheckBox( i18n( "Fading" ), this ); m_pFadeDistance = new PMFloatEdit( this ); m_pFadeDistance->setValidation( true, 0, false, 0 ); - m_pFadeDistanceLabel = new QLabel( i18n( "Fade distance:" ), this ); + m_pFadeDistanceLabel = new TQLabel( i18n( "Fade distance:" ), this ); m_pFadePower = new PMIntEdit( this ); m_pFadePower->setValidation( true, 0, false, 0 ); - m_pFadePowerLabel = new QLabel( i18n( "Fade power:" ), this ); + m_pFadePowerLabel = new TQLabel( i18n( "Fade power:" ), this ); - m_pMediaInteraction = new QCheckBox( i18n( "Media interaction" ), this ); - m_pMediaAttenuation = new QCheckBox( i18n( "Media attenuation" ), this ); + m_pMediaInteraction = new TQCheckBox( i18n( "Media interaction" ), this ); + m_pMediaAttenuation = new TQCheckBox( i18n( "Media attenuation" ), this ); - QHBoxLayout* hl; - QGridLayout* gl; + TQHBoxLayout* hl; + TQGridLayout* gl; - gl = new QGridLayout( topLayout( ), 3, 2 ); - gl->addWidget( new QLabel( i18n( "Location:" ), this ), 0, 0 ); + gl = new TQGridLayout( topLayout( ), 3, 2 ); + gl->addWidget( new TQLabel( i18n( "Location:" ), this ), 0, 0 ); gl->addWidget( m_pLocation, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Color:" ), this ), 1, 0, AlignTop ); + gl->addWidget( new TQLabel( i18n( "Color:" ), this ), 1, 0, AlignTop ); gl->addWidget( m_pColor, 1, 1 ); - gl->addWidget( new QLabel( i18n( "Type:" ), this ), 2, 0 ); - hl = new QHBoxLayout( ); + gl->addWidget( new TQLabel( i18n( "Type:" ), this ), 2, 0 ); + hl = new TQHBoxLayout( ); gl->addLayout( hl, 2, 1 ); hl->addWidget( m_pType ); hl->addStretch( 1 ); - gl = new QGridLayout( topLayout( ), 4, 2 ); + gl = new TQGridLayout( topLayout( ), 4, 2 ); gl->addWidget( m_pRadiusLabel, 0, 0 ); gl->addWidget( m_pRadius, 0, 1, AlignLeft ); gl->addWidget( m_pFalloffLabel, 1, 0 ); @@ -128,8 +128,8 @@ void PMLightEdit::createTopWidgets( ) topLayout( )->addWidget( m_pParallel ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 7, 2 ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 7, 2 ); gl->addMultiCellWidget( m_pAreaLight, 0, 0, 0, 1 ); gl->addWidget( m_pAreaTypeLabel, 1, 0 ); gl->addWidget( m_pAreaType, 1, 1 ); @@ -148,8 +148,8 @@ void PMLightEdit::createTopWidgets( ) topLayout( )->addWidget( m_pOrient ); topLayout( )->addWidget( m_pJitter ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 3, 2 ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 3, 2 ); gl->addMultiCellWidget( m_pFading, 0, 0, 0, 1 ); gl->addWidget( m_pFadeDistanceLabel, 1, 0 ); gl->addWidget( m_pFadeDistance, 1, 1 ); @@ -160,33 +160,33 @@ void PMLightEdit::createTopWidgets( ) topLayout( )->addWidget( m_pMediaInteraction ); topLayout( )->addWidget( m_pMediaAttenuation ); - connect( m_pLocation, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pColor, SIGNAL( dataChanged( ) ), - SIGNAL( dataChanged( ) ) ); - connect( m_pType, SIGNAL( activated( int ) ), - SLOT( slotTypeActivated( int ) ) ); - connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFalloff, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pTightness, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPointAt, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pParallel, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAreaLight, SIGNAL( clicked( ) ), SLOT( slotAreaClicked( ) ) ); - connect( m_pAreaType, SIGNAL( activated ( int ) ), SLOT( slotOrientCheck( ) ) ); - connect( m_pAxis1, SIGNAL( dataChanged( ) ), SLOT( slotOrientCheck( ) ) ); - connect( m_pAxis2, SIGNAL( dataChanged( ) ), SLOT( slotOrientCheck( ) ) ); - connect( m_pSize1, SIGNAL( dataChanged( ) ), SLOT( slotOrientCheck( ) ) ); - connect( m_pSize2, SIGNAL( dataChanged( ) ), SLOT( slotOrientCheck( ) ) ); - connect( m_pAdaptive, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOrient, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pJitter, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFading, SIGNAL( clicked( ) ), SLOT( slotFadingClicked( ) ) ); - connect( m_pFadeDistance, SIGNAL( dataChanged( ) ), - SIGNAL( dataChanged( ) ) ); - connect( m_pFadePower, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMediaInteraction, SIGNAL( clicked( ) ), - SIGNAL( dataChanged( ) ) ); - connect( m_pMediaAttenuation, SIGNAL( clicked( ) ), - SIGNAL( dataChanged( ) ) ); + connect( m_pLocation, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pColor, TQT_SIGNAL( dataChanged( ) ), + TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotTypeActivated( int ) ) ); + connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFalloff, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pTightness, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPointAt, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pParallel, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAreaLight, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAreaClicked( ) ) ); + connect( m_pAreaType, TQT_SIGNAL( activated ( int ) ), TQT_SLOT( slotOrientCheck( ) ) ); + connect( m_pAxis1, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotOrientCheck( ) ) ); + connect( m_pAxis2, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotOrientCheck( ) ) ); + connect( m_pSize1, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotOrientCheck( ) ) ); + connect( m_pSize2, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotOrientCheck( ) ) ); + connect( m_pAdaptive, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOrient, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pJitter, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFading, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFadingClicked( ) ) ); + connect( m_pFadeDistance, TQT_SIGNAL( dataChanged( ) ), + TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFadePower, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMediaInteraction, TQT_SIGNAL( clicked( ) ), + TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMediaAttenuation, TQT_SIGNAL( clicked( ) ), + TQT_SIGNAL( dataChanged( ) ) ); } void PMLightEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmlightedit.h b/kpovmodeler/pmlightedit.h index 0b9b5ffb..62451ed3 100644 --- a/kpovmodeler/pmlightedit.h +++ b/kpovmodeler/pmlightedit.h @@ -29,11 +29,11 @@ class PMLight; class PMVectorEdit; class PMColorEdit; -class QComboBox; +class TQComboBox; class PMFloatEdit; class PMIntEdit; -class QLabel; -class QCheckBox; +class TQLabel; +class TQCheckBox; /** * Dialog edit class for @ref PMLight @@ -46,7 +46,7 @@ public: /** * Creates a PMLightEdit with parent and name */ - PMLightEdit( QWidget* parent, const char* name = 0 ); + PMLightEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -73,42 +73,42 @@ private: PMLight* m_pDisplayedObject; PMVectorEdit* m_pLocation; PMColorEdit* m_pColor; - QComboBox* m_pType; + TQComboBox* m_pType; PMFloatEdit* m_pRadius; - QLabel* m_pRadiusLabel; + TQLabel* m_pRadiusLabel; PMFloatEdit* m_pFalloff; - QLabel* m_pFalloffLabel; + TQLabel* m_pFalloffLabel; PMFloatEdit* m_pTightness; - QLabel* m_pTightnessLabel; + TQLabel* m_pTightnessLabel; PMVectorEdit* m_pPointAt; - QLabel* m_pPointAtLabel; - QCheckBox* m_pParallel; + TQLabel* m_pPointAtLabel; + TQCheckBox* m_pParallel; - QCheckBox* m_pAreaLight; - QLabel* m_pAreaTypeLabel; - QComboBox* m_pAreaType; + TQCheckBox* m_pAreaLight; + TQLabel* m_pAreaTypeLabel; + TQComboBox* m_pAreaType; PMVectorEdit* m_pAxis1; PMIntEdit* m_pSize1; PMVectorEdit* m_pAxis2; PMIntEdit* m_pSize2; - QLabel* m_pAxis1Label; - QLabel* m_pAxis2Label; - QLabel* m_pSize1Label; - QLabel* m_pSize2Label; + TQLabel* m_pAxis1Label; + TQLabel* m_pAxis2Label; + TQLabel* m_pSize1Label; + TQLabel* m_pSize2Label; PMIntEdit* m_pAdaptive; - QLabel* m_pAdaptiveLabel; - QCheckBox* m_pOrient; - QCheckBox* m_pJitter; + TQLabel* m_pAdaptiveLabel; + TQCheckBox* m_pOrient; + TQCheckBox* m_pJitter; - QCheckBox* m_pFading; + TQCheckBox* m_pFading; PMFloatEdit* m_pFadeDistance; - QLabel* m_pFadeDistanceLabel; + TQLabel* m_pFadeDistanceLabel; PMIntEdit* m_pFadePower; - QLabel* m_pFadePowerLabel; - QCheckBox* m_pMediaInteraction; - QCheckBox* m_pMediaAttenuation; + TQLabel* m_pFadePowerLabel; + TQCheckBox* m_pMediaInteraction; + TQCheckBox* m_pMediaAttenuation; }; diff --git a/kpovmodeler/pmlightgroup.cpp b/kpovmodeler/pmlightgroup.cpp index e53e0e3b..acf655e4 100644 --- a/kpovmodeler/pmlightgroup.cpp +++ b/kpovmodeler/pmlightgroup.cpp @@ -47,12 +47,12 @@ PMLightGroup::~PMLightGroup( ) { } -QString PMLightGroup::description( ) const +TQString PMLightGroup::description( ) const { - return QString( i18n( "light group" ) ); + return TQString( i18n( "light group" ) ); } -void PMLightGroup::serialize( QDomElement& e, QDomDocument& doc ) const +void PMLightGroup::serialize( TQDomElement& e, TQDomDocument& doc ) const { if( m_globalLights ) e.setAttribute( "global_lights", "1" ); @@ -103,7 +103,7 @@ void PMLightGroup::setGlobalLights( bool gl ) } } -PMDialogEditBase* PMLightGroup::editWidget( QWidget* parent ) const +PMDialogEditBase* PMLightGroup::editWidget( TQWidget* parent ) const { return new PMLightGroupEdit( parent ); } diff --git a/kpovmodeler/pmlightgroup.h b/kpovmodeler/pmlightgroup.h index f488eaf2..9fdf8d6b 100644 --- a/kpovmodeler/pmlightgroup.h +++ b/kpovmodeler/pmlightgroup.h @@ -51,7 +51,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMLightGroup( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -59,19 +59,19 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMLightGroupEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmlightgroup" ); } + virtual TQString pixmap( ) const { return TQString( "pmlightgroup" ); } /** * Returns the global lights flag diff --git a/kpovmodeler/pmlightgroupedit.cpp b/kpovmodeler/pmlightgroupedit.cpp index 18feffbe..c1e21024 100644 --- a/kpovmodeler/pmlightgroupedit.cpp +++ b/kpovmodeler/pmlightgroupedit.cpp @@ -19,12 +19,12 @@ #include "pmlightgroupedit.h" #include "pmlightgroup.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> #include <klocale.h> -PMLightGroupEdit::PMLightGroupEdit( QWidget* parent, const char* name ) +PMLightGroupEdit::PMLightGroupEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -34,14 +34,14 @@ void PMLightGroupEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout; - m_pGlobalLights = new QCheckBox( i18n( "Global lights" ), this ); + TQHBoxLayout* layout; + m_pGlobalLights = new TQCheckBox( i18n( "Global lights" ), this ); - layout = new QHBoxLayout( topLayout( ) ); + layout = new TQHBoxLayout( topLayout( ) ); layout->addWidget( m_pGlobalLights ); layout->addStretch( 1 ); - connect( m_pGlobalLights, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pGlobalLights, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMLightGroupEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmlightgroupedit.h b/kpovmodeler/pmlightgroupedit.h index 2701d681..fa090f97 100644 --- a/kpovmodeler/pmlightgroupedit.h +++ b/kpovmodeler/pmlightgroupedit.h @@ -27,7 +27,7 @@ #include "pmsolidobjectedit.h" class PMLightGroup; -class QCheckBox; +class TQCheckBox; /** * Dialog edit class for @ref PMLightGroup @@ -40,7 +40,7 @@ public: /** * Creates a PMLightGroupEdit with parent and name */ - PMLightGroupEdit( QWidget* parent, const char* name = 0 ); + PMLightGroupEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -57,7 +57,7 @@ protected slots: private: PMLightGroup* m_pDisplayedObject; - QCheckBox* m_pGlobalLights; + TQCheckBox* m_pGlobalLights; }; diff --git a/kpovmodeler/pmline.h b/kpovmodeler/pmline.h index 399555ea..c20b9355 100644 --- a/kpovmodeler/pmline.h +++ b/kpovmodeler/pmline.h @@ -20,7 +20,7 @@ #ifndef PMLINES_H #define PMLINES_H -#include <qptrlist.h> +#include <tqptrlist.h> #include <GL/gl.h> #include "pmdebug.h" @@ -88,7 +88,7 @@ private: GLuint m_start, m_end; }; -typedef QPtrListIterator<PMLine> PMLineListIterator; +typedef TQPtrListIterator<PMLine> PMLineListIterator; /** * A list of @ref PMLine objects. @@ -97,6 +97,6 @@ typedef QPtrListIterator<PMLine> PMLineListIterator; * described by a start and end point. Only the indices in a @ref PMPointArray * are stored. */ -typedef QMemArray<PMLine> PMLineArray; +typedef TQMemArray<PMLine> PMLineArray; #endif diff --git a/kpovmodeler/pmlineedits.cpp b/kpovmodeler/pmlineedits.cpp index 05124d75..19391338 100644 --- a/kpovmodeler/pmlineedits.cpp +++ b/kpovmodeler/pmlineedits.cpp @@ -19,8 +19,8 @@ #include <kmessagebox.h> #include <klocale.h> -PMFloatEdit::PMFloatEdit( QWidget* parent, const char* name /*= 0*/ ) - : QLineEdit( parent, name ) +PMFloatEdit::PMFloatEdit( TQWidget* parent, const char* name /*= 0*/ ) + : TQLineEdit( parent, name ) { m_bCheckLower = false; m_bCheckUpper = false; @@ -29,8 +29,8 @@ PMFloatEdit::PMFloatEdit( QWidget* parent, const char* name /*= 0*/ ) m_lowerOp = OpGreaterEqual; m_upperOp = OpLessEqual; - connect( this, SIGNAL( textChanged( const QString& ) ), - SLOT( slotEditTextChanged( const QString& ) ) ); + connect( this, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotEditTextChanged( const TQString& ) ) ); } void PMFloatEdit::setValidation( bool checkLower, double lowerValue, @@ -114,13 +114,13 @@ double PMFloatEdit::value( ) const void PMFloatEdit::setValue( double d, int precision ) { - QString str; + TQString str; str.setNum( d, 'g', precision ); setText( str ); } -void PMFloatEdit::slotEditTextChanged( const QString& /*t*/ ) +void PMFloatEdit::slotEditTextChanged( const TQString& /*t*/ ) { emit dataChanged( ); } @@ -129,16 +129,16 @@ void PMFloatEdit::slotEditTextChanged( const QString& /*t*/ ) -PMIntEdit::PMIntEdit( QWidget* parent, const char* name /*= 0*/ ) - : QLineEdit( parent, name ) +PMIntEdit::PMIntEdit( TQWidget* parent, const char* name /*= 0*/ ) + : TQLineEdit( parent, name ) { m_bCheckLower = false; m_bCheckUpper = false; m_lowerValue = 0; m_upperValue = 0; - connect( this, SIGNAL( textChanged( const QString& ) ), - SLOT( slotEditTextChanged( const QString& ) ) ); + connect( this, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotEditTextChanged( const TQString& ) ) ); } void PMIntEdit::setValidation( bool checkLower, int lowerValue, @@ -163,7 +163,7 @@ bool PMIntEdit::isDataValid( ) if( ok ) { i = ( int ) d; - QString str; + TQString str; bool b = signalsBlocked( ); blockSignals( true ); str.setNum( i ); @@ -216,13 +216,13 @@ int PMIntEdit::value( ) const void PMIntEdit::setValue( int i ) { - QString str; + TQString str; str.setNum( i ); setText( str ); } -void PMIntEdit::slotEditTextChanged( const QString& /*t*/ ) +void PMIntEdit::slotEditTextChanged( const TQString& /*t*/ ) { emit dataChanged( ); } diff --git a/kpovmodeler/pmlineedits.h b/kpovmodeler/pmlineedits.h index 9a12c384..43256818 100644 --- a/kpovmodeler/pmlineedits.h +++ b/kpovmodeler/pmlineedits.h @@ -23,7 +23,7 @@ #include <config.h> #endif -#include <qlineedit.h> +#include <tqlineedit.h> /** * Lineedit for float input @@ -38,7 +38,7 @@ public: /** * Simple constructor */ - PMFloatEdit( QWidget* parent, const char* name = 0 ); + PMFloatEdit( TQWidget* parent, const char* name = 0 ); /** * Sets the validation for the lineedit. * @@ -75,7 +75,7 @@ signals: */ void dataChanged( ); public slots: - void slotEditTextChanged( const QString& t ); + void slotEditTextChanged( const TQString& t ); private: bool m_bCheckLower, m_bCheckUpper; double m_lowerValue, m_upperValue; @@ -94,7 +94,7 @@ public: /** * Simple constructor */ - PMIntEdit( QWidget* parent, const char* name = 0 ); + PMIntEdit( TQWidget* parent, const char* name = 0 ); /** * Sets the validation for the lineedit. * @@ -124,7 +124,7 @@ signals: */ void dataChanged( ); public slots: - void slotEditTextChanged( const QString& t ); + void slotEditTextChanged( const TQString& t ); private: bool m_bCheckLower, m_bCheckUpper; int m_lowerValue, m_upperValue; diff --git a/kpovmodeler/pmlinkedit.cpp b/kpovmodeler/pmlinkedit.cpp index a878e02e..8ebca5c6 100644 --- a/kpovmodeler/pmlinkedit.cpp +++ b/kpovmodeler/pmlinkedit.cpp @@ -16,9 +16,9 @@ **************************************************************************/ #include "pmlinkedit.h" -#include <qlineedit.h> -#include <qlabel.h> -#include <qlayout.h> +#include <tqlineedit.h> +#include <tqlabel.h> +#include <tqlayout.h> #include <klocale.h> #include <kdialog.h> #include <kpushbutton.h> @@ -27,24 +27,24 @@ #include "pmdeclare.h" #include "pmobjectselect.h" -PMLinkEdit::PMLinkEdit( const QString& declareType, - QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMLinkEdit::PMLinkEdit( const TQString& declareType, + TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { m_declareTypes.append( declareType ); init( ); } -PMLinkEdit::PMLinkEdit( const QStringList& declareTypes, - QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMLinkEdit::PMLinkEdit( const TQStringList& declareTypes, + TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { m_declareTypes = declareTypes; init( ); } -PMLinkEdit::PMLinkEdit( QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMLinkEdit::PMLinkEdit( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { init( ); } @@ -55,24 +55,24 @@ void PMLinkEdit::init( ) m_pDisplayedObject = 0; m_bReadOnly = false; - QGridLayout* grid = new QGridLayout( this, 2, 2, 0, KDialog::spacingHint( ) ); + TQGridLayout* grid = new TQGridLayout( this, 2, 2, 0, KDialog::spacingHint( ) ); - grid->addWidget( new QLabel( i18n( "Prototype:" ), this ), 0, 0 ); + grid->addWidget( new TQLabel( i18n( "Prototype:" ), this ), 0, 0 ); grid->setColStretch( 0, 0 ); grid->setColStretch( 1, 1 ); - m_pIDEdit = new QLineEdit( this ); + m_pIDEdit = new TQLineEdit( this ); m_pIDEdit->setReadOnly( true ); grid->addWidget( m_pIDEdit, 0, 1 ); - QHBoxLayout* layout = new QHBoxLayout( ); + TQHBoxLayout* layout = new TQHBoxLayout( ); grid->addLayout( layout, 1, 1 ); - m_pSelectButton = new QPushButton( i18n( "Select..." ), this ); + m_pSelectButton = new TQPushButton( i18n( "Select..." ), this ); layout->addWidget( m_pSelectButton ); m_pClearButton = new KPushButton( KStdGuiItem::clear(), this ); layout->addWidget( m_pClearButton ); - connect( m_pSelectButton, SIGNAL( clicked( ) ), SLOT( slotSelectClicked( ) ) ); - connect( m_pClearButton, SIGNAL( clicked( ) ), SLOT( slotClearClicked( ) ) ); + connect( m_pSelectButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSelectClicked( ) ) ); + connect( m_pClearButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotClearClicked( ) ) ); } void PMLinkEdit::setDisplayedObject( PMObject* obj ) @@ -93,14 +93,14 @@ void PMLinkEdit::setDisplayedObject( PMObject* obj ) } } -void PMLinkEdit::setLinkPossibility( const QString& t ) +void PMLinkEdit::setLinkPossibility( const TQString& t ) { m_declareTypes.clear( ); m_declareTypes.append( t ); } -void PMLinkEdit::setLinkPossibilities( const QStringList& t ) +void PMLinkEdit::setLinkPossibilities( const TQStringList& t ) { m_declareTypes = t; } @@ -126,7 +126,7 @@ void PMLinkEdit::slotSelectClicked( ) result = PMObjectSelect::selectDeclare( m_pDisplayedObject, m_declareTypes, obj, this ); - if( ( result == QDialog::Accepted ) && obj ) + if( ( result == TQDialog::Accepted ) && obj ) { m_pDeclare = ( PMDeclare* ) obj; m_pIDEdit->setText( m_pDeclare->id( ) ); diff --git a/kpovmodeler/pmlinkedit.h b/kpovmodeler/pmlinkedit.h index f5abe182..4462393c 100644 --- a/kpovmodeler/pmlinkedit.h +++ b/kpovmodeler/pmlinkedit.h @@ -18,18 +18,18 @@ #ifndef PMLINKEDIT_H #define PMLINKEDIT_H -#include <qwidget.h> +#include <tqwidget.h> #include "pmobject.h" #include "pmdeclare.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> -class QString; -class QLineEdit; -class QPushButton; +class TQString; +class TQLineEdit; +class TQPushButton; /** - * Edit widget for links with a QLineEdit, a select and a clear button. + * Edit widget for links with a TQLineEdit, a select and a clear button. */ class PMLinkEdit : public QWidget { @@ -40,17 +40,17 @@ public: * * Allows the selection of declares of type declareType. */ - PMLinkEdit( const QString& declareType, QWidget* parent, const char* name = 0 ); + PMLinkEdit( const TQString& declareType, TQWidget* parent, const char* name = 0 ); /** * Creates a link edit widget with parent and name. * * Allows the selection of declares of type declares. */ - PMLinkEdit( const QStringList& declares, QWidget* parent, const char* name = 0 ); + PMLinkEdit( const TQStringList& declares, TQWidget* parent, const char* name = 0 ); /** * Creates a link edit widget with parent and name. */ - PMLinkEdit( QWidget* parent, const char* name = 0 ); + PMLinkEdit( TQWidget* parent, const char* name = 0 ); /** * Sets the displayed object and displays the link @@ -64,11 +64,11 @@ public: /** * Sets the selection possibilities */ - void setLinkPossibility( const QString& t ); + void setLinkPossibility( const TQString& t ); /** * Sets the selection possibilities */ - void setLinkPossibilities( const QStringList& t ); + void setLinkPossibilities( const TQStringList& t ); /** * Enables or disables read only mode @@ -94,11 +94,11 @@ private: void init( ); PMDeclare* m_pDeclare; PMObject* m_pDisplayedObject; - QStringList m_declareTypes; + TQStringList m_declareTypes; - QLineEdit* m_pIDEdit; - QPushButton* m_pSelectButton; - QPushButton* m_pClearButton; + TQLineEdit* m_pIDEdit; + TQPushButton* m_pSelectButton; + TQPushButton* m_pClearButton; bool m_bReadOnly; }; diff --git a/kpovmodeler/pmlistpattern.cpp b/kpovmodeler/pmlistpattern.cpp index 299ab4fb..721369d2 100644 --- a/kpovmodeler/pmlistpattern.cpp +++ b/kpovmodeler/pmlistpattern.cpp @@ -81,7 +81,7 @@ PMListPattern::~PMListPattern( ) { } -void PMListPattern::serialize( QDomElement& e, QDomDocument& doc ) const +void PMListPattern::serialize( TQDomElement& e, TQDomDocument& doc ) const { switch( m_listType ) { @@ -102,7 +102,7 @@ void PMListPattern::serialize( QDomElement& e, QDomDocument& doc ) const void PMListPattern::readAttributes( const PMXMLHelper& h ) { - QString str = h.stringAttribute( "listtype", "checker" ); + TQString str = h.stringAttribute( "listtype", "checker" ); if( str == "checker" ) m_listType = ListPatternChecker; else if( str == "brick" ) @@ -123,9 +123,9 @@ PMMetaObject* PMListPattern::metaObject( ) const PMListTypeProperty* p = new PMListTypeProperty( "listType", &PMListPattern::setListType, &PMListPattern::listType ); - p->addEnumValue( QString( "Checker" ), ListPatternChecker ); - p->addEnumValue( QString( "Brick" ), ListPatternBrick ); - p->addEnumValue( QString( "Hexagon" ), ListPatternHexagon ); + p->addEnumValue( TQString( "Checker" ), ListPatternChecker ); + p->addEnumValue( TQString( "Brick" ), ListPatternBrick ); + p->addEnumValue( TQString( "Hexagon" ), ListPatternHexagon ); s_pMetaObject->addProperty( p ); s_pMetaObject->addProperty( @@ -178,7 +178,7 @@ void PMListPattern::setMortar( double n ) } } -PMDialogEditBase* PMListPattern::editWidget( QWidget* parent ) const +PMDialogEditBase* PMListPattern::editWidget( TQWidget* parent ) const { return new PMListPatternEdit( parent ); } @@ -248,7 +248,7 @@ void PMTextureList::cleanUp( ) const Base::cleanUp( ); } -QString PMTextureList::description( ) const +TQString PMTextureList::description( ) const { return i18n( "texture list" ); } @@ -287,7 +287,7 @@ void PMPigmentList::cleanUp( ) const Base::cleanUp( ); } -QString PMPigmentList::description( ) const +TQString PMPigmentList::description( ) const { return i18n( "pigment list" ); } @@ -326,7 +326,7 @@ void PMColorList::cleanUp( ) const Base::cleanUp( ); } -QString PMColorList::description( ) const +TQString PMColorList::description( ) const { return i18n( "color list" ); } @@ -365,7 +365,7 @@ void PMDensityList::cleanUp( ) const Base::cleanUp( ); } -QString PMDensityList::description( ) const +TQString PMDensityList::description( ) const { return i18n( "density list" ); } @@ -411,7 +411,7 @@ void PMNormalList::cleanUp( ) const Base::cleanUp( ); } -QString PMNormalList::description( ) const +TQString PMNormalList::description( ) const { return i18n( "normal list" ); } @@ -450,7 +450,7 @@ void PMNormalList::restoreMemento( PMMemento* s ) Base::restoreMemento( s ); } -void PMNormalList::serialize( QDomElement& e, QDomDocument& doc ) const +void PMNormalList::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "depth", m_depth ); Base::serialize( e, doc ); @@ -462,7 +462,7 @@ void PMNormalList::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMNormalList::editWidget( QWidget* parent ) const +PMDialogEditBase* PMNormalList::editWidget( TQWidget* parent ) const { return new PMListPatternEdit( parent ); } diff --git a/kpovmodeler/pmlistpattern.h b/kpovmodeler/pmlistpattern.h index f646d8ab..6716dadb 100644 --- a/kpovmodeler/pmlistpattern.h +++ b/kpovmodeler/pmlistpattern.h @@ -55,21 +55,21 @@ public: /** * Returns the list pattern object type */ - virtual QString listObjectType( ) const = 0; + virtual TQString listObjectType( ) const = 0; /** */ virtual PMMetaObject* metaObject( ) const; /** */ virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMListPatternEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the color list type @@ -145,9 +145,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMTextureList( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString listObjectType( ) const { return QString( "Texture" ); } + virtual TQString listObjectType( ) const { return TQString( "Texture" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -155,7 +155,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmtexturelist" ); } + virtual TQString pixmap( ) const { return TQString( "pmtexturelist" ); } static PMMetaObject* s_pMetaObject; }; @@ -184,9 +184,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMPigmentList( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString listObjectType( ) const { return QString( "Pigment" ); } + virtual TQString listObjectType( ) const { return TQString( "Pigment" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -194,7 +194,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmpigmentlist" ); } + virtual TQString pixmap( ) const { return TQString( "pmpigmentlist" ); } static PMMetaObject* s_pMetaObject; }; @@ -223,9 +223,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMColorList( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString listObjectType( ) const { return QString( "SolidColor" ); } + virtual TQString listObjectType( ) const { return TQString( "SolidColor" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -233,7 +233,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmcolorlist" ); } + virtual TQString pixmap( ) const { return TQString( "pmcolorlist" ); } static PMMetaObject* s_pMetaObject; }; @@ -262,9 +262,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMDensityList( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString listObjectType( ) const { return QString( "Density" ); } + virtual TQString listObjectType( ) const { return TQString( "Density" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -272,7 +272,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmdensitylist" ); } + virtual TQString pixmap( ) const { return TQString( "pmdensitylist" ); } static PMMetaObject* s_pMetaObject; }; @@ -301,9 +301,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMNormalList( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString listObjectType( ) const { return QString( "Normal" ); } + virtual TQString listObjectType( ) const { return TQString( "Normal" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -313,13 +313,13 @@ public: /** * Returns a new @ref PMListPatternEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmnormallist" ); } + virtual TQString pixmap( ) const { return TQString( "pmnormallist" ); } /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); diff --git a/kpovmodeler/pmlistpatternedit.cpp b/kpovmodeler/pmlistpatternedit.cpp index f9eb3cf7..dec87cb7 100644 --- a/kpovmodeler/pmlistpatternedit.cpp +++ b/kpovmodeler/pmlistpatternedit.cpp @@ -21,17 +21,17 @@ #include "pmvectoredit.h" #include "pmvector.h" -#include <qwidget.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qlabel.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqlabel.h> #include "pmlineedits.h" #include <ktabctl.h> #include <klocale.h> #include <kmessagebox.h> -PMListPatternEdit::PMListPatternEdit( QWidget* parent, const char* name ) +PMListPatternEdit::PMListPatternEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -41,12 +41,12 @@ void PMListPatternEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QVBoxLayout* vlayout = new QVBoxLayout( topLayout( ) ); + TQVBoxLayout* vlayout = new TQVBoxLayout( topLayout( ) ); /* Field for Pattern List type */ - QHBoxLayout* layout = new QHBoxLayout( vlayout ); - QLabel* label = new QLabel( i18n( "Type:" ), this ); - m_pTypeCombo = new QComboBox( false, this ); + TQHBoxLayout* layout = new TQHBoxLayout( vlayout ); + TQLabel* label = new TQLabel( i18n( "Type:" ), this ); + m_pTypeCombo = new TQComboBox( false, this ); m_pTypeCombo->insertItem( i18n( "Checkers" ) ); m_pTypeCombo->insertItem( i18n( "Brick" ) ); m_pTypeCombo->insertItem( i18n( "Hexagon" ) ); @@ -55,36 +55,36 @@ void PMListPatternEdit::createTopWidgets( ) layout->addStretch( 1 ); /* The depth field */ - layout = new QHBoxLayout( vlayout ); - m_pDepthLabel = new QLabel( i18n( "Depth:" ), this ); + layout = new TQHBoxLayout( vlayout ); + m_pDepthLabel = new TQLabel( i18n( "Depth:" ), this ); m_pDepth = new PMFloatEdit( this ); layout->addWidget( m_pDepthLabel ); layout->addWidget( m_pDepth ); layout->addStretch( 1 ); /* The brick information */ - QHBoxLayout* bricklayout = new QHBoxLayout( vlayout ); - m_pBrickSizeLabel = new QLabel( i18n( "Brick size:" ), this ); + TQHBoxLayout* bricklayout = new TQHBoxLayout( vlayout ); + m_pBrickSizeLabel = new TQLabel( i18n( "Brick size:" ), this ); m_pBrickSize = new PMVectorEdit( "x", "y", "z", this ); bricklayout->addWidget( m_pBrickSizeLabel ); bricklayout->addWidget( m_pBrickSize ); - layout = new QHBoxLayout( vlayout ); - m_pMortarLabel = new QLabel( i18n( "Mortar:" ), this ); + layout = new TQHBoxLayout( vlayout ); + m_pMortarLabel = new TQLabel( i18n( "Mortar:" ), this ); m_pMortar = new PMFloatEdit( this ); layout->addWidget( m_pMortarLabel ); layout->addWidget( m_pMortar ); layout->addStretch( 1 ); /* connect all signals to slots/signals */ - connect( m_pBrickSize, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pTypeCombo, SIGNAL( activated( int ) ), SLOT( slotComboChanged( int ) ) ); - connect( m_pMortar, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDepth, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pBrickSize, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotComboChanged( int ) ) ); + connect( m_pMortar, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDepth, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMListPatternEdit::displayObject( PMObject* o ) { - QString str; + TQString str; if( o->isA( "ListPattern" ) ) { diff --git a/kpovmodeler/pmlistpatternedit.h b/kpovmodeler/pmlistpatternedit.h index 8ebd5e5b..703a5944 100644 --- a/kpovmodeler/pmlistpatternedit.h +++ b/kpovmodeler/pmlistpatternedit.h @@ -28,9 +28,9 @@ class PMListPattern; class PMVectorEdit; -class QComboBox; +class TQComboBox; class PMFloatEdit; -class QLabel; +class TQLabel; /** * Dialog edit class for @ref PMListPattern. @@ -43,7 +43,7 @@ public: /** * Creates a PMListPatternEdit with parent and name */ - PMListPatternEdit( QWidget* parent, const char* name = 0 ); + PMListPatternEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -64,13 +64,13 @@ protected slots: private: PMListPattern* m_pDisplayedObject; - QComboBox* m_pTypeCombo; + TQComboBox* m_pTypeCombo; PMFloatEdit* m_pMortar; PMVectorEdit* m_pBrickSize; - QLabel* m_pBrickSizeLabel; - QLabel* m_pMortarLabel; + TQLabel* m_pBrickSizeLabel; + TQLabel* m_pMortarLabel; - QLabel* m_pDepthLabel; + TQLabel* m_pDepthLabel; PMFloatEdit* m_pDepth; }; diff --git a/kpovmodeler/pmlookslike.cpp b/kpovmodeler/pmlookslike.cpp index 7e810605..270292e2 100644 --- a/kpovmodeler/pmlookslike.cpp +++ b/kpovmodeler/pmlookslike.cpp @@ -44,7 +44,7 @@ PMLooksLike::~PMLooksLike( ) } -QString PMLooksLike::description( ) const +TQString PMLooksLike::description( ) const { return i18n( "looks like" ); } @@ -70,7 +70,7 @@ void PMLooksLike::cleanUp( ) const Base::cleanUp( ); } -void PMLooksLike::serialize( QDomElement& e, QDomDocument& doc ) const +void PMLooksLike::serialize( TQDomElement& e, TQDomDocument& doc ) const { Base::serialize( e, doc ); } @@ -80,7 +80,7 @@ void PMLooksLike::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMLooksLike::editWidget( QWidget* parent ) const +PMDialogEditBase* PMLooksLike::editWidget( TQWidget* parent ) const { return new PMNamedObjectEdit( parent ); } diff --git a/kpovmodeler/pmlookslike.h b/kpovmodeler/pmlookslike.h index 971519e0..4a191422 100644 --- a/kpovmodeler/pmlookslike.h +++ b/kpovmodeler/pmlookslike.h @@ -50,7 +50,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMLooksLike( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -58,18 +58,18 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMLooksLikeEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmlookslike" ); } + virtual TQString pixmap( ) const { return TQString( "pmlookslike" ); } /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmmapmemento.cpp b/kpovmodeler/pmmapmemento.cpp index 5b4e9aaa..92f3a2e0 100644 --- a/kpovmodeler/pmmapmemento.cpp +++ b/kpovmodeler/pmmapmemento.cpp @@ -28,7 +28,7 @@ PMMapMemento::~PMMapMemento( ) { } -void PMMapMemento::setMapValues( const QValueList<double>& v ) +void PMMapMemento::setMapValues( const TQValueList<double>& v ) { if( !m_bMapValuesSaved ) { @@ -38,7 +38,7 @@ void PMMapMemento::setMapValues( const QValueList<double>& v ) } } -void PMMapMemento::setRemovedValues( const QValueList<double>& v ) +void PMMapMemento::setRemovedValues( const TQValueList<double>& v ) { if( !m_bRemovedValuesSaved ) { diff --git a/kpovmodeler/pmmapmemento.h b/kpovmodeler/pmmapmemento.h index e2f1fa0a..73dc8ce7 100644 --- a/kpovmodeler/pmmapmemento.h +++ b/kpovmodeler/pmmapmemento.h @@ -25,7 +25,7 @@ #endif #include "pmmemento.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> /** @@ -46,11 +46,11 @@ public: /** * Saves the map values */ - void setMapValues( const QValueList<double>& v ); + void setMapValues( const TQValueList<double>& v ); /** * Returns the map values */ - QValueList<double> mapValues( ) const { return m_mapValues; } + TQValueList<double> mapValues( ) const { return m_mapValues; } /** * Returns true if the map values were saved */ @@ -59,11 +59,11 @@ public: /** * Saves the removed values */ - void setRemovedValues( const QValueList<double>& v ); + void setRemovedValues( const TQValueList<double>& v ); /** * Returns the removed values */ - QValueList<double> removedValues( ) const { return m_removedValues; } + TQValueList<double> removedValues( ) const { return m_removedValues; } /** * Returns true if the removed values were saved */ @@ -73,8 +73,8 @@ private: /** * The stored values */ - QValueList<double> m_mapValues; - QValueList<double> m_removedValues; + TQValueList<double> m_mapValues; + TQValueList<double> m_removedValues; bool m_bMapValuesSaved, m_bRemovedValuesSaved; }; diff --git a/kpovmodeler/pmmaterial.cpp b/kpovmodeler/pmmaterial.cpp index d50f0ed1..66f11f94 100644 --- a/kpovmodeler/pmmaterial.cpp +++ b/kpovmodeler/pmmaterial.cpp @@ -63,12 +63,12 @@ void PMMaterial::cleanUp( ) const Base::cleanUp( ); } -QString PMMaterial::description( ) const +TQString PMMaterial::description( ) const { return i18n( "material" ); } -PMDialogEditBase* PMMaterial::editWidget( QWidget* parent ) const +PMDialogEditBase* PMMaterial::editWidget( TQWidget* parent ) const { return new PMMaterialEdit( parent ); } diff --git a/kpovmodeler/pmmaterial.h b/kpovmodeler/pmmaterial.h index 40891f1e..7e790be4 100644 --- a/kpovmodeler/pmmaterial.h +++ b/kpovmodeler/pmmaterial.h @@ -49,7 +49,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMMaterial( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -59,9 +59,9 @@ public: /** * Returns a new @ref PMMaterialEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmmaterial" ); } + virtual TQString pixmap( ) const { return TQString( "pmmaterial" ); } private: /** diff --git a/kpovmodeler/pmmaterialedit.cpp b/kpovmodeler/pmmaterialedit.cpp index ba63f579..f03fcd43 100644 --- a/kpovmodeler/pmmaterialedit.cpp +++ b/kpovmodeler/pmmaterialedit.cpp @@ -20,12 +20,12 @@ #include "pmmaterial.h" #include "pmlinkedit.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMMaterialEdit::PMMaterialEdit( QWidget* parent, const char* name ) +PMMaterialEdit::PMMaterialEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; diff --git a/kpovmodeler/pmmaterialedit.h b/kpovmodeler/pmmaterialedit.h index d273a72e..d9d6cf8f 100644 --- a/kpovmodeler/pmmaterialedit.h +++ b/kpovmodeler/pmmaterialedit.h @@ -39,7 +39,7 @@ public: /** * Creates a PMMaterialEdit with parent and name */ - PMMaterialEdit( QWidget* parent, const char* name = 0 ); + PMMaterialEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmmaterialmap.cpp b/kpovmodeler/pmmaterialmap.cpp index c70d85c9..28b2c849 100644 --- a/kpovmodeler/pmmaterialmap.cpp +++ b/kpovmodeler/pmmaterialmap.cpp @@ -74,7 +74,7 @@ PMMaterialMap::~PMMaterialMap( ) { } -void PMMaterialMap::serialize( QDomElement& e, QDomDocument& doc ) const +void PMMaterialMap::serialize( TQDomElement& e, TQDomDocument& doc ) const { switch( m_bitmapType ) { @@ -140,7 +140,7 @@ void PMMaterialMap::serialize( QDomElement& e, QDomDocument& doc ) const void PMMaterialMap::readAttributes( const PMXMLHelper& h ) { - QString str; + TQString str; str = h.stringAttribute( "bitmap_type", "sys" ); if( str == "gif" ) @@ -241,7 +241,7 @@ void PMMaterialMap::cleanUp( ) const Base::cleanUp( ); } -QString PMMaterialMap::description( ) const +TQString PMMaterialMap::description( ) const { return i18n( "material map" ); } @@ -256,7 +256,7 @@ void PMMaterialMap::setBitmapType( PMBitmapType c ) } } -void PMMaterialMap::setBitmapFileName( const QString& c ) +void PMMaterialMap::setBitmapFileName( const TQString& c ) { if( c != m_bitmapFile ) { @@ -296,7 +296,7 @@ void PMMaterialMap::enableOnce( bool c ) } } -PMDialogEditBase* PMMaterialMap::editWidget( QWidget* parent ) const +PMDialogEditBase* PMMaterialMap::editWidget( TQWidget* parent ) const { return new PMMaterialMapEdit( parent ); } diff --git a/kpovmodeler/pmmaterialmap.h b/kpovmodeler/pmmaterialmap.h index c6713e9f..6377c7bd 100644 --- a/kpovmodeler/pmmaterialmap.h +++ b/kpovmodeler/pmmaterialmap.h @@ -69,7 +69,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMMaterialMap( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -77,17 +77,17 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmmaterialmap" ); } + virtual TQString pixmap( ) const { return TQString( "pmmaterialmap" ); } /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMMaterialMapEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Gets the bitmap type @@ -96,7 +96,7 @@ public: /** * Gets the bitmap file name */ - QString bitmapFile( ) const { return m_bitmapFile; } + TQString bitmapFile( ) const { return m_bitmapFile; } /** * Returns true if once is enabled */ @@ -117,7 +117,7 @@ public: void setBitmapType( PMBitmapType c ); /** * Sets the bitmap file name*/ - void setBitmapFileName( const QString& c ); + void setBitmapFileName( const TQString& c ); /** * Sets if the bitmap should be mapped once */ @@ -142,7 +142,7 @@ private: * MaterialMap type */ PMBitmapType m_bitmapType; - QString m_bitmapFile; + TQString m_bitmapFile; bool m_once; PMMapType m_mapType; PMInterpolateType m_interpolateType; diff --git a/kpovmodeler/pmmaterialmapedit.cpp b/kpovmodeler/pmmaterialmapedit.cpp index d50e3d7b..03d28146 100644 --- a/kpovmodeler/pmmaterialmapedit.cpp +++ b/kpovmodeler/pmmaterialmapedit.cpp @@ -23,14 +23,14 @@ #include "pmpalettevalueedit.h" #include "pmvector.h" -#include <qwidget.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> #include <ktabctl.h> #include <klocale.h> #include <kmessagebox.h> @@ -38,7 +38,7 @@ #include <kfiledialog.h> #include <kiconloader.h> -PMMaterialMapEdit::PMMaterialMapEdit( QWidget* parent, const char* name ) +PMMaterialMapEdit::PMMaterialMapEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -46,14 +46,14 @@ PMMaterialMapEdit::PMMaterialMapEdit( QWidget* parent, const char* name ) void PMMaterialMapEdit::createTopWidgets( ) { - QLabel* lbl; - QHBoxLayout* hl; + TQLabel* lbl; + TQHBoxLayout* hl; Base::createTopWidgets( ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "File type:" ), this ); - m_pImageFileTypeEdit = new QComboBox( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "File type:" ), this ); + m_pImageFileTypeEdit = new TQComboBox( this ); m_pImageFileTypeEdit->insertItem( "gif" ); m_pImageFileTypeEdit->insertItem( "tga" ); m_pImageFileTypeEdit->insertItem( "iff" ); @@ -66,22 +66,22 @@ void PMMaterialMapEdit::createTopWidgets( ) hl->addWidget( lbl ); hl->addWidget( m_pImageFileTypeEdit ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "File name:" ), this ); - m_pImageFileNameEdit = new QLineEdit( this ); - m_pImageFileNameBrowse = new QPushButton( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "File name:" ), this ); + m_pImageFileNameEdit = new TQLineEdit( this ); + m_pImageFileNameBrowse = new TQPushButton( this ); m_pImageFileNameBrowse->setPixmap( SmallIcon( "fileopen" ) ); hl->addWidget( lbl ); hl->addWidget( m_pImageFileNameEdit ); hl->addWidget( m_pImageFileNameBrowse ); hl->addStretch( 1 ); - m_pOnceEdit = new QCheckBox( i18n( "Once" ), this ); + m_pOnceEdit = new TQCheckBox( i18n( "Once" ), this ); topLayout( )->addWidget( m_pOnceEdit ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Interpolate:" ), this ); - m_pInterpolateTypeEdit = new QComboBox( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Interpolate:" ), this ); + m_pInterpolateTypeEdit = new TQComboBox( this ); m_pInterpolateTypeEdit->insertItem( i18n( "None" ) ); m_pInterpolateTypeEdit->insertItem( i18n( "Bilinear" ) ); m_pInterpolateTypeEdit->insertItem( i18n( "Normalized" ) ); @@ -89,9 +89,9 @@ void PMMaterialMapEdit::createTopWidgets( ) hl->addWidget( m_pInterpolateTypeEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - lbl = new QLabel( i18n( "Map type:" ), this ); - m_pMapTypeEdit = new QComboBox( this ); + hl = new TQHBoxLayout( topLayout( ) ); + lbl = new TQLabel( i18n( "Map type:" ), this ); + m_pMapTypeEdit = new TQComboBox( this ); m_pMapTypeEdit->insertItem( i18n( "Planar" ) ); m_pMapTypeEdit->insertItem( i18n( "Spherical" ) ); m_pMapTypeEdit->insertItem( i18n( "Cylindrical" ) ); @@ -100,12 +100,12 @@ void PMMaterialMapEdit::createTopWidgets( ) hl->addWidget( m_pMapTypeEdit ); hl->addStretch( 1 ); - connect( m_pImageFileTypeEdit, SIGNAL( activated( int ) ), SLOT( slotImageFileTypeChanged( int ) ) ); - connect( m_pMapTypeEdit, SIGNAL( activated( int ) ), SLOT( slotMapTypeChanged( int ) ) ); - connect( m_pInterpolateTypeEdit, SIGNAL( activated( int ) ), SLOT( slotInterpolateTypeChanged( int ) ) ); - connect( m_pImageFileNameBrowse, SIGNAL( clicked( ) ), SLOT( slotImageFileBrowseClicked( ) ) ); - connect( m_pImageFileNameEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotImageFileNameChanged( const QString& ) ) ); - connect( m_pOnceEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pImageFileTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotImageFileTypeChanged( int ) ) ); + connect( m_pMapTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotMapTypeChanged( int ) ) ); + connect( m_pInterpolateTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotInterpolateTypeChanged( int ) ) ); + connect( m_pImageFileNameBrowse, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotImageFileBrowseClicked( ) ) ); + connect( m_pImageFileNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotImageFileNameChanged( const TQString& ) ) ); + connect( m_pOnceEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMMaterialMapEdit::displayObject( PMObject* o ) @@ -280,14 +280,14 @@ void PMMaterialMapEdit::slotMapTypeChanged( const int /*a*/ ) emit dataChanged( ); } -void PMMaterialMapEdit::slotImageFileNameChanged( const QString& /*a*/ ) +void PMMaterialMapEdit::slotImageFileNameChanged( const TQString& /*a*/ ) { emit dataChanged( ); } void PMMaterialMapEdit::slotImageFileBrowseClicked( ) { - QString str = KFileDialog::getOpenFileName( QString::null, QString::null ); + TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmmaterialmapedit.h b/kpovmodeler/pmmaterialmapedit.h index f6ffa7f0..e10f3dfb 100644 --- a/kpovmodeler/pmmaterialmapedit.h +++ b/kpovmodeler/pmmaterialmapedit.h @@ -27,14 +27,14 @@ #include "pmdialogeditbase.h" class PMMaterialMap; -class QComboBox; +class TQComboBox; class PMFloatEdit; class PMIntEdit; -class QLabel; -class QCheckBox; -class QWidget; -class QLineEdit; -class QPushButton; +class TQLabel; +class TQCheckBox; +class TQWidget; +class TQLineEdit; +class TQPushButton; /** * Dialog edit class for @ref PMMaterialMap. @@ -47,7 +47,7 @@ public: /** * Creates a PMMaterialMapEdit with parent and name */ - PMMaterialMapEdit( QWidget* parent, const char* name = 0 ); + PMMaterialMapEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); /** */ @@ -65,17 +65,17 @@ private slots: /** */ void slotInterpolateTypeChanged( int a ); /** */ - void slotImageFileNameChanged( const QString& a ); + void slotImageFileNameChanged( const TQString& a ); /** */ void slotImageFileBrowseClicked( ); private: PMMaterialMap* m_pDisplayedObject; - QComboBox* m_pImageFileTypeEdit; - QLineEdit* m_pImageFileNameEdit; - QPushButton* m_pImageFileNameBrowse; - QCheckBox* m_pOnceEdit; - QComboBox* m_pMapTypeEdit; - QComboBox* m_pInterpolateTypeEdit; + TQComboBox* m_pImageFileTypeEdit; + TQLineEdit* m_pImageFileNameEdit; + TQPushButton* m_pImageFileNameBrowse; + TQCheckBox* m_pOnceEdit; + TQComboBox* m_pMapTypeEdit; + TQComboBox* m_pInterpolateTypeEdit; }; #endif diff --git a/kpovmodeler/pmmatrix.cpp b/kpovmodeler/pmmatrix.cpp index 217672e5..bda58a28 100644 --- a/kpovmodeler/pmmatrix.cpp +++ b/kpovmodeler/pmmatrix.cpp @@ -22,7 +22,7 @@ #include "pmvector.h" #include "pmdebug.h" -#include <qtextstream.h> +#include <tqtextstream.h> PMMatrix::PMMatrix( ) { @@ -407,10 +407,10 @@ void PMMatrix::testOutput( ) } } -QString PMMatrix::serializeXML( ) const +TQString PMMatrix::serializeXML( ) const { - QString result; - QTextStream str( &result, IO_WriteOnly ); + TQString result; + TQTextStream str( &result, IO_WriteOnly ); int i; for( i = 0; i < 16; i++ ) @@ -423,12 +423,12 @@ QString PMMatrix::serializeXML( ) const return result; } -bool PMMatrix::loadXML( const QString& str ) +bool PMMatrix::loadXML( const TQString& str ) { int i; - QString tmp( str ); - QTextStream s( &tmp, IO_ReadOnly ); - QString val; + TQString tmp( str ); + TQTextStream s( &tmp, IO_ReadOnly ); + TQString val; bool ok; for( i = 0; i < 16; i++ ) diff --git a/kpovmodeler/pmmatrix.h b/kpovmodeler/pmmatrix.h index 62747aea..a3691602 100644 --- a/kpovmodeler/pmmatrix.h +++ b/kpovmodeler/pmmatrix.h @@ -27,7 +27,7 @@ #include "pmmath.h" #include "math.h" -#include <qstring.h> +#include <tqstring.h> #include <GL/gl.h> @@ -164,11 +164,11 @@ public: /** * Returns a string for xml output */ - QString serializeXML( ) const; + TQString serializeXML( ) const; /** * loads the vector data from the xml string */ - bool loadXML( const QString& str ); + bool loadXML( const TQString& str ); private: /** * Exchanges two rows diff --git a/kpovmodeler/pmmedia.cpp b/kpovmodeler/pmmedia.cpp index e5229d47..c5e32d6e 100644 --- a/kpovmodeler/pmmedia.cpp +++ b/kpovmodeler/pmmedia.cpp @@ -154,12 +154,12 @@ void PMMedia::cleanUp( ) const Base::cleanUp( ); } -QString PMMedia::description( ) const +TQString PMMedia::description( ) const { return i18n( "media" ); } -void PMMedia::serialize( QDomElement& e, QDomDocument& doc ) const +void PMMedia::serialize( TQDomElement& e, TQDomDocument& doc ) const { Base::serialize( e, doc ); e.setAttribute( "enable_absorption", m_enableAbsorption ); @@ -399,7 +399,7 @@ void PMMedia::enableScattering( bool c ) } } -PMDialogEditBase* PMMedia::editWidget( QWidget* parent ) const +PMDialogEditBase* PMMedia::editWidget( TQWidget* parent ) const { return new PMMediaEdit( parent ); } diff --git a/kpovmodeler/pmmedia.h b/kpovmodeler/pmmedia.h index 3bf6705b..4836bf37 100644 --- a/kpovmodeler/pmmedia.h +++ b/kpovmodeler/pmmedia.h @@ -50,7 +50,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMMedia( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -58,16 +58,16 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMMediaEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmmedia" ); } + virtual TQString pixmap( ) const { return TQString( "pmmedia" ); } /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmmediaedit.cpp b/kpovmodeler/pmmediaedit.cpp index 2806eff8..f89f7d10 100644 --- a/kpovmodeler/pmmediaedit.cpp +++ b/kpovmodeler/pmmediaedit.cpp @@ -21,15 +21,15 @@ #include "pmlineedits.h" #include "pmcoloredit.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qcombobox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqcombobox.h> #include <klocale.h> #include <kmessagebox.h> #include <kdialog.h> -PMMediaEdit::PMMediaEdit( QWidget* parent, const char* name ) +PMMediaEdit::PMMediaEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,94 +37,94 @@ PMMediaEdit::PMMediaEdit( QWidget* parent, const char* name ) void PMMediaEdit::createTopWidgets( ) { - QHBoxLayout* hl; - QGridLayout* gl; + TQHBoxLayout* hl; + TQGridLayout* gl; Base::createTopWidgets( ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Method:" ), this ) ); - m_pMethodEdit = new QComboBox( this ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Method:" ), this ) ); + m_pMethodEdit = new TQComboBox( this ); m_pMethodEdit->insertItem( i18n( "1 (Monte Carlo)" ) ); m_pMethodEdit->insertItem( i18n( "2 (Smooth)" ) ); m_pMethodEdit->insertItem( i18n( "3 (Adaptive sampling)" ) ); hl->addWidget( m_pMethodEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Intervals:" ), this ) ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Intervals:" ), this ) ); m_pIntervalsEdit = new PMIntEdit( this ); m_pIntervalsEdit->setValidation( true, 1, false, 0 ); hl->addWidget( m_pIntervalsEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Samples" ), this ) ); - hl->addWidget( new QLabel( i18n( "Min:" ), this ) ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Samples" ), this ) ); + hl->addWidget( new TQLabel( i18n( "Min:" ), this ) ); m_pSamplesMinEdit = new PMIntEdit( this ); m_pSamplesMinEdit->setValidation( true, 1, false, 0 ); hl->addWidget( m_pSamplesMinEdit ); - m_pSamplesMaxLabel = new QLabel( i18n( "Max:" ), this ); + m_pSamplesMaxLabel = new TQLabel( i18n( "Max:" ), this ); hl->addWidget( m_pSamplesMaxLabel ); m_pSamplesMaxEdit = new PMIntEdit( this ); hl->addWidget( m_pSamplesMaxEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 3, 2 ); - gl->addWidget( new QLabel( i18n( "Confidence:" ), this ), 0, 0 ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 3, 2 ); + gl->addWidget( new TQLabel( i18n( "Confidence:" ), this ), 0, 0 ); m_pConfidenceEdit = new PMFloatEdit( this ); m_pConfidenceEdit->setValidation( true, 0, true, 1 ); gl->addWidget( m_pConfidenceEdit, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Variance:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Variance:" ), this ), 1, 0 ); m_pVarianceEdit = new PMFloatEdit( this ); gl->addWidget( m_pVarianceEdit, 1, 1 ); - gl->addWidget( new QLabel( i18n( "Ratio:" ), this ), 2, 0 ); + gl->addWidget( new TQLabel( i18n( "Ratio:" ), this ), 2, 0 ); m_pRatioEdit = new PMFloatEdit( this ); gl->addWidget( m_pRatioEdit, 2, 1 ); hl->addStretch( 1 ); - m_pAAWidget = new QWidget( this ); - hl = new QHBoxLayout( m_pAAWidget, KDialog::spacingHint( ) ); - hl->addWidget( new QLabel( i18n( "Anti-aliasing" ), m_pAAWidget ) ); - hl->addWidget( new QLabel( i18n( "Level:" ), m_pAAWidget ) ); + m_pAAWidget = new TQWidget( this ); + hl = new TQHBoxLayout( m_pAAWidget, KDialog::spacingHint( ) ); + hl->addWidget( new TQLabel( i18n( "Anti-aliasing" ), m_pAAWidget ) ); + hl->addWidget( new TQLabel( i18n( "Level:" ), m_pAAWidget ) ); m_pAALevelEdit = new PMIntEdit( m_pAAWidget ); m_pAALevelEdit->setValidation( true, 1, false, 0 ); hl->addWidget( m_pAALevelEdit ); - hl->addWidget( new QLabel( i18n( "Threshold:" ), m_pAAWidget ) ); + hl->addWidget( new TQLabel( i18n( "Threshold:" ), m_pAAWidget ) ); m_pAAThresholdEdit = new PMFloatEdit( m_pAAWidget ); m_pAAThresholdEdit->setValidation( true, 0.0, false, 0.0 ); hl->addWidget( m_pAAThresholdEdit ); hl->addStretch( 1 ); topLayout( )->addWidget( m_pAAWidget ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 2, 2 ); - m_pEnableAbsorptionEdit = new QCheckBox( i18n( "Absorption" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 2, 2 ); + m_pEnableAbsorptionEdit = new TQCheckBox( i18n( "Absorption" ), this ); gl->addMultiCellWidget( m_pEnableAbsorptionEdit, 0, 0, 0, 1 ); m_pAbsorptionEdit = new PMColorEdit( false, this ); - m_pAbsorptionLabel = new QLabel( i18n( "Color:" ), this ); + m_pAbsorptionLabel = new TQLabel( i18n( "Color:" ), this ); gl->addWidget( m_pAbsorptionLabel, 1, 0, AlignTop ); gl->addWidget( m_pAbsorptionEdit, 1, 1 ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 2, 2 ); - m_pEnableEmissionEdit = new QCheckBox( i18n( "Emission" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 2, 2 ); + m_pEnableEmissionEdit = new TQCheckBox( i18n( "Emission" ), this ); gl->addMultiCellWidget( m_pEnableEmissionEdit, 0, 0, 0, 1 ); m_pEmissionEdit = new PMColorEdit( false, this ); - m_pEmissionLabel = new QLabel( i18n( "Color:" ), this ); + m_pEmissionLabel = new TQLabel( i18n( "Color:" ), this ); gl->addWidget( m_pEmissionLabel, 1, 0, AlignTop ); gl->addWidget( m_pEmissionEdit, 1, 1 ); hl->addStretch( 1 ); - m_pEnableScatteringEdit = new QCheckBox( i18n( "Scattering" ), this ); + m_pEnableScatteringEdit = new TQCheckBox( i18n( "Scattering" ), this ); topLayout( )->addWidget( m_pEnableScatteringEdit ); - m_pScatteringWidget = new QWidget( this ); - QVBoxLayout* vl = new QVBoxLayout( m_pScatteringWidget, KDialog::spacingHint( ) ); - hl = new QHBoxLayout( vl ); - hl->addWidget( new QLabel( i18n( "Type:" ), m_pScatteringWidget ) ); - m_pScatteringTypeEdit = new QComboBox( m_pScatteringWidget ); + m_pScatteringWidget = new TQWidget( this ); + TQVBoxLayout* vl = new TQVBoxLayout( m_pScatteringWidget, KDialog::spacingHint( ) ); + hl = new TQHBoxLayout( vl ); + hl->addWidget( new TQLabel( i18n( "Type:" ), m_pScatteringWidget ) ); + m_pScatteringTypeEdit = new TQComboBox( m_pScatteringWidget ); m_pScatteringTypeEdit->insertItem( i18n( "Isotropic" ) ); m_pScatteringTypeEdit->insertItem( i18n( "Mie Haze" ) ); m_pScatteringTypeEdit->insertItem( i18n( "Mie Murky" ) ); @@ -132,40 +132,40 @@ void PMMediaEdit::createTopWidgets( ) m_pScatteringTypeEdit->insertItem( i18n( "Henyey-Greenstein" ) ); hl->addWidget( m_pScatteringTypeEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( vl ); - hl->addWidget( new QLabel( i18n( "Color:" ), m_pScatteringWidget ), 0, AlignTop ); + hl = new TQHBoxLayout( vl ); + hl->addWidget( new TQLabel( i18n( "Color:" ), m_pScatteringWidget ), 0, AlignTop ); m_pScatteringColorEdit = new PMColorEdit( false, m_pScatteringWidget ); hl->addWidget( m_pScatteringColorEdit ); - hl = new QHBoxLayout( vl ); - gl = new QGridLayout( hl, 2, 2 ); - m_pScatteringEccentricityLabel = new QLabel( i18n( "Eccentricity:" ), m_pScatteringWidget ); + hl = new TQHBoxLayout( vl ); + gl = new TQGridLayout( hl, 2, 2 ); + m_pScatteringEccentricityLabel = new TQLabel( i18n( "Eccentricity:" ), m_pScatteringWidget ); gl->addWidget( m_pScatteringEccentricityLabel, 0, 0 ); m_pScatteringEccentricityEdit = new PMFloatEdit( m_pScatteringWidget ); gl->addWidget( m_pScatteringEccentricityEdit, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Extinction:" ), m_pScatteringWidget ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Extinction:" ), m_pScatteringWidget ), 1, 0 ); m_pScatteringExtinctionEdit = new PMFloatEdit( m_pScatteringWidget ); gl->addWidget( m_pScatteringExtinctionEdit, 1, 1 ); hl->addStretch( 1 ); topLayout( )->addWidget( m_pScatteringWidget ); - connect( m_pMethodEdit, SIGNAL( activated( int ) ), SLOT( slotMethodChanged( int ) ) ); - connect( m_pIntervalsEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSamplesMinEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSamplesMaxEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pConfidenceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pVarianceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRatioEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAALevelEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAAThresholdEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAbsorptionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEmissionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEnableAbsorptionEdit, SIGNAL( clicked( ) ), SLOT( slotAbsorptionClicked( ) ) ); - connect( m_pEnableEmissionEdit, SIGNAL( clicked( ) ), SLOT( slotEmissionClicked( ) ) ); - connect( m_pEnableScatteringEdit, SIGNAL( clicked( ) ), SLOT( slotScatteringClicked( ) ) ); - connect( m_pScatteringTypeEdit, SIGNAL( activated( int ) ), SLOT( slotScatteringTypeChanged( int ) ) ); - connect( m_pScatteringColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pScatteringEccentricityEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pScatteringExtinctionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pMethodEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotMethodChanged( int ) ) ); + connect( m_pIntervalsEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSamplesMinEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSamplesMaxEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pConfidenceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pVarianceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRatioEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAALevelEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAAThresholdEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAbsorptionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEmissionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEnableAbsorptionEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAbsorptionClicked( ) ) ); + connect( m_pEnableEmissionEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotEmissionClicked( ) ) ); + connect( m_pEnableScatteringEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotScatteringClicked( ) ) ); + connect( m_pScatteringTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotScatteringTypeChanged( int ) ) ); + connect( m_pScatteringColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pScatteringEccentricityEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pScatteringExtinctionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMMediaEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmmediaedit.h b/kpovmodeler/pmmediaedit.h index 866e706d..6e481a87 100644 --- a/kpovmodeler/pmmediaedit.h +++ b/kpovmodeler/pmmediaedit.h @@ -30,9 +30,9 @@ class PMMedia; class PMIntEdit; class PMFloatEdit; class PMColorEdit; -class QCheckBox; -class QLabel; -class QComboBox; +class TQCheckBox; +class TQLabel; +class TQComboBox; /** * Dialog edit class for @ref PMMedia @@ -45,7 +45,7 @@ public: /** * Creates a PMMediaEdit with parent and name */ - PMMediaEdit( QWidget* parent, const char* name = 0 ); + PMMediaEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -68,32 +68,32 @@ protected slots: private: PMMedia* m_pDisplayedObject; - QComboBox* m_pMethodEdit; + TQComboBox* m_pMethodEdit; PMIntEdit* m_pIntervalsEdit; PMIntEdit* m_pSamplesMinEdit; - QLabel* m_pSamplesMaxLabel; + TQLabel* m_pSamplesMaxLabel; PMIntEdit* m_pSamplesMaxEdit; PMFloatEdit* m_pConfidenceEdit; PMFloatEdit* m_pVarianceEdit; PMFloatEdit* m_pRatioEdit; - QWidget* m_pAAWidget; + TQWidget* m_pAAWidget; PMIntEdit* m_pAALevelEdit; PMFloatEdit* m_pAAThresholdEdit; - QCheckBox* m_pEnableAbsorptionEdit; + TQCheckBox* m_pEnableAbsorptionEdit; PMColorEdit* m_pAbsorptionEdit; - QLabel* m_pAbsorptionLabel; + TQLabel* m_pAbsorptionLabel; - QCheckBox* m_pEnableEmissionEdit; + TQCheckBox* m_pEnableEmissionEdit; PMColorEdit* m_pEmissionEdit; - QLabel* m_pEmissionLabel; + TQLabel* m_pEmissionLabel; - QCheckBox* m_pEnableScatteringEdit; - QWidget* m_pScatteringWidget; - QComboBox* m_pScatteringTypeEdit; + TQCheckBox* m_pEnableScatteringEdit; + TQWidget* m_pScatteringWidget; + TQComboBox* m_pScatteringTypeEdit; PMColorEdit* m_pScatteringColorEdit; - QLabel* m_pScatteringEccentricityLabel; + TQLabel* m_pScatteringEccentricityLabel; PMFloatEdit* m_pScatteringEccentricityEdit; PMFloatEdit* m_pScatteringExtinctionEdit; }; diff --git a/kpovmodeler/pmmemento.cpp b/kpovmodeler/pmmemento.cpp index 84f52a6e..f417e575 100644 --- a/kpovmodeler/pmmemento.cpp +++ b/kpovmodeler/pmmemento.cpp @@ -56,7 +56,7 @@ PMMementoData::PMMementoData( PMMetaObject* classType, int vID, PMThreeState dat } -PMMementoData::PMMementoData( PMMetaObject* classType, int vID, const QString& data ) +PMMementoData::PMMementoData( PMMetaObject* classType, int vID, const TQString& data ) : PMVariant( data ) { m_objectType = classType; @@ -149,13 +149,13 @@ void PMMemento::addData( PMMetaObject* classType, int vID, const PMThreeState da addData( new PMMementoData( classType, vID, data ) ); } -void PMMemento::addData( PMMetaObject* classType, int vID, const QString& data ) +void PMMemento::addData( PMMetaObject* classType, int vID, const TQString& data ) { if( !findData( classType, vID ) ) addData( new PMMementoData( classType, vID, data ) ); } -void PMMemento::addIDChange( PMMetaObject* classType, int vID, const QString& data ) +void PMMemento::addIDChange( PMMetaObject* classType, int vID, const TQString& data ) { if( !findData( classType, vID ) ) { @@ -183,11 +183,11 @@ void PMMemento::addData( PMMetaObject* classType, int vID, PMObject* obj ) addData( new PMMementoData( classType, vID, obj ) ); } -QString PMMemento::oldID( ) const +TQString PMMemento::oldID( ) const { if( m_pIDData ) return m_pIDData->stringData( ); - return QString::null; + return TQString::null; } void PMMemento::addChangedObject( PMObject* obj, int mode ) diff --git a/kpovmodeler/pmmemento.h b/kpovmodeler/pmmemento.h index a3ea9c98..cdbab2d2 100644 --- a/kpovmodeler/pmmemento.h +++ b/kpovmodeler/pmmemento.h @@ -27,8 +27,8 @@ #include "pmvariant.h" #include "pmcommand.h" #include "pmmetaobject.h" -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> /** * Class used by @ref PMObjectMemento to store one value. @@ -65,7 +65,7 @@ public: /** * Stores a string */ - PMMementoData( PMMetaObject* classType, int vID, const QString& data ); + PMMementoData( PMMetaObject* classType, int vID, const TQString& data ); /** * Stores a @ref PMVector */ @@ -99,7 +99,7 @@ private: int m_valueID; }; -typedef QPtrList<PMMementoData> PMMementoDataList; +typedef TQPtrList<PMMementoData> PMMementoDataList; /** @@ -126,8 +126,8 @@ private: int m_mode; }; -typedef QPtrList<PMObjectChange> PMObjectChangeList; -typedef QPtrListIterator<PMObjectChange> PMObjectChangeListIterator; +typedef TQPtrList<PMObjectChange> PMObjectChangeList; +typedef TQPtrListIterator<PMObjectChange> PMObjectChangeListIterator; /** * Class that stores the data of povray objects for undo/redo information @@ -202,10 +202,10 @@ public: void addData( PMMetaObject* classType, int vID, const PMThreeState data ); /** - * Adds an @ref QString data object. Will be ignored if the memento + * Adds an @ref TQString data object. Will be ignored if the memento * already contains this data */ - void addData( PMMetaObject* classType, int vID, const QString& data ); + void addData( PMMetaObject* classType, int vID, const TQString& data ); /** * Adds an @ref PMVector data object. Will be ignored if the memento @@ -228,7 +228,7 @@ public: /** * Call this to store an id change */ - void addIDChange( PMMetaObject* classType, int vID, const QString& data ); + void addIDChange( PMMetaObject* classType, int vID, const TQString& data ); /** * Returns true if the memento contains changed data @@ -253,7 +253,7 @@ public: /** * Returns the old id */ - QString oldID( ) const; + TQString oldID( ) const; /** * If one object is changed, other objects can be changed as well. * @@ -289,7 +289,7 @@ private: /** * List of changes */ - QPtrList<PMObjectChange> m_changedObjects; + TQPtrList<PMObjectChange> m_changedObjects; PMObjectChange* m_pOriginatorChange; PMObject* m_pOriginator; }; @@ -298,19 +298,19 @@ private: /** * Iterator for memento data */ -class PMMementoDataIterator : public QPtrListIterator<PMMementoData> +class PMMementoDataIterator : public TQPtrListIterator<PMMementoData> { public: PMMementoDataIterator( const PMMemento& m ) - : QPtrListIterator<PMMementoData>( m.m_data ) + : TQPtrListIterator<PMMementoData>( m.m_data ) { } PMMementoDataIterator( const PMMemento* m ) - : QPtrListIterator<PMMementoData>( m->m_data ) + : TQPtrListIterator<PMMementoData>( m->m_data ) { } PMMementoDataIterator( const PMMementoDataList& l ) - : QPtrListIterator<PMMementoData>( l ) + : TQPtrListIterator<PMMementoData>( l ) { } }; diff --git a/kpovmodeler/pmmesh.cpp b/kpovmodeler/pmmesh.cpp index 571170a9..d143edf4 100644 --- a/kpovmodeler/pmmesh.cpp +++ b/kpovmodeler/pmmesh.cpp @@ -52,11 +52,11 @@ public: /** * Saves the triangles memento data */ - void setTriangleMementos( const QPtrList<PMMemento>& list ) + void setTriangleMementos( const TQPtrList<PMMemento>& list ) { if ( !m_bTriangleMementosSaved ) { - QPtrListIterator<PMMemento> Itr( list ); + TQPtrListIterator<PMMemento> Itr( list ); PMMemento* m; while( ( m = Itr.current( ) ) != 0 ) { @@ -71,7 +71,7 @@ public: /** * Returns the triangles memento data */ - QPtrList<PMMemento> triangleMementos( ) const + TQPtrList<PMMemento> triangleMementos( ) const { if ( !m_bTriangleMementosSaved ) kdError( PMArea ) << "Triangles mementos not saved in PMMeshMemento::triangleMementos\n"; @@ -82,7 +82,7 @@ public: */ bool triangleMementosSaved( ) const { return m_bTriangleMementosSaved; } private: - QPtrList<PMMemento> m_triangleMementos; + TQPtrList<PMMemento> m_triangleMementos; bool m_bTriangleMementosSaved; }; @@ -112,12 +112,12 @@ PMMesh::~PMMesh( ) { } -QString PMMesh::description( ) const +TQString PMMesh::description( ) const { return i18n( "mesh" ); } -void PMMesh::serialize( QDomElement& e, QDomDocument& doc ) const +void PMMesh::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "hierarchy", m_hierarchy ); e.setAttribute( "enable_inside_vector", m_enableInsideVector ); @@ -189,7 +189,7 @@ void PMMesh::setInsideVector( const PMVector& iv ) } } -PMDialogEditBase* PMMesh::editWidget( QWidget* parent ) const +PMDialogEditBase* PMMesh::editWidget( TQWidget* parent ) const { return new PMMeshEdit( parent ); } @@ -233,8 +233,8 @@ void PMMesh::restoreMemento( PMMemento* s ) { int numChildren = countChildren( ); PMMemento* tm; - QPtrList<PMMemento> list = m->triangleMementos( ); - QPtrListIterator<PMMemento> Itr( list ); + TQPtrList<PMMemento> list = m->triangleMementos( ); + TQPtrListIterator<PMMemento> Itr( list ); for ( int i = 0; i < numChildren && ( tm = Itr.current( ) ) != 0; ++i, ++Itr ) childAt( i )->restoreMemento( tm ); } @@ -331,8 +331,8 @@ void PMMesh::controlPointsChangedList( PMControlPointList& list, PMObjectList& o { int numChildren = countChildren( ); PMControlPoint* p; - QValueList<pointToPoint>::ConstIterator ptpItr = m_pointToPointList.begin( ); - QPtrList<PMMemento> mementoList; + TQValueList<pointToPoint>::ConstIterator ptpItr = m_pointToPointList.begin( ); + TQPtrList<PMMemento> mementoList; PMTriangle *obj; PMVector p0, p1, p2; PM3DControlPoint* cp0, * cp1, * cp2; @@ -346,7 +346,7 @@ void PMMesh::controlPointsChangedList( PMControlPointList& list, PMObjectList& o int listID, pointID, numCP; // have to cache changed values because checking once changes them to false - QMemArray<bool> changed( list.count( ) ); + TQMemArray<bool> changed( list.count( ) ); p = list.first( ); for ( int i = 0; p; ++i, p = list.next( ) ) changed[i] = p->changed( ); diff --git a/kpovmodeler/pmmesh.h b/kpovmodeler/pmmesh.h index 4045d3ab..a6fe0089 100644 --- a/kpovmodeler/pmmesh.h +++ b/kpovmodeler/pmmesh.h @@ -53,7 +53,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMMesh( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -61,19 +61,19 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMMeshEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmmesh" ); } + virtual TQString pixmap( ) const { return TQString( "pmmesh" ); } /** * Returns the hierarchy flag @@ -136,7 +136,7 @@ private: /** * List of point to point structures */ - QValueList<pointToPoint> m_pointToPointList; + TQValueList<pointToPoint> m_pointToPointList; }; #endif diff --git a/kpovmodeler/pmmeshedit.cpp b/kpovmodeler/pmmeshedit.cpp index 0b0e2269..6ddf9679 100644 --- a/kpovmodeler/pmmeshedit.cpp +++ b/kpovmodeler/pmmeshedit.cpp @@ -20,12 +20,12 @@ #include "pmmesh.h" #include "pmvectoredit.h" -#include <qlayout.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> #include <klocale.h> -PMMeshEdit::PMMeshEdit( QWidget* parent, const char* name ) +PMMeshEdit::PMMeshEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -35,21 +35,21 @@ void PMMeshEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout; - m_pHierarchy = new QCheckBox( i18n( "Hierarchy" ), this ); - m_pEnableInsideVector = new QCheckBox( i18n( "Inside vector:" ), this ); + TQHBoxLayout* layout; + m_pHierarchy = new TQCheckBox( i18n( "Hierarchy" ), this ); + m_pEnableInsideVector = new TQCheckBox( i18n( "Inside vector:" ), this ); m_pInsideVector = new PMVectorEdit( "x", "y", "z", this ); - layout = new QHBoxLayout( topLayout( ) ); + layout = new TQHBoxLayout( topLayout( ) ); layout->addWidget( m_pHierarchy ); layout->addStretch( 1 ); - layout = new QHBoxLayout( topLayout( ) ); + layout = new TQHBoxLayout( topLayout( ) ); layout->addWidget( m_pEnableInsideVector ); layout->addWidget( m_pInsideVector ); layout->addStretch( 1 ); - connect( m_pHierarchy, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEnableInsideVector, SIGNAL( clicked( ) ), SLOT( slotInsideVectorClicked( ) ) ); - connect( m_pInsideVector, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pHierarchy, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEnableInsideVector, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotInsideVectorClicked( ) ) ); + connect( m_pInsideVector, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMMeshEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmmeshedit.h b/kpovmodeler/pmmeshedit.h index 1a778ac8..dc4dc4ae 100644 --- a/kpovmodeler/pmmeshedit.h +++ b/kpovmodeler/pmmeshedit.h @@ -27,7 +27,7 @@ #include "pmsolidobjectedit.h" class PMMesh; -class QCheckBox; +class TQCheckBox; class PMVectorEdit; /** @@ -41,7 +41,7 @@ public: /** * Creates a PMMeshEdit with parent and name */ - PMMeshEdit( QWidget* parent, const char* name = 0 ); + PMMeshEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -58,8 +58,8 @@ protected slots: private: PMMesh* m_pDisplayedObject; - QCheckBox* m_pHierarchy; - QCheckBox* m_pEnableInsideVector; + TQCheckBox* m_pHierarchy; + TQCheckBox* m_pEnableInsideVector; PMVectorEdit* m_pInsideVector; }; diff --git a/kpovmodeler/pmmessage.cpp b/kpovmodeler/pmmessage.cpp index 5587181f..8e024a18 100644 --- a/kpovmodeler/pmmessage.cpp +++ b/kpovmodeler/pmmessage.cpp @@ -22,7 +22,7 @@ PMMessage::PMMessage( ) m_pObject = 0; } -PMMessage::PMMessage( const QString& text, PMObject* object ) +PMMessage::PMMessage( const TQString& text, PMObject* object ) { m_sText = text; m_pObject = object; diff --git a/kpovmodeler/pmmessage.h b/kpovmodeler/pmmessage.h index 1247ccb0..86404104 100644 --- a/kpovmodeler/pmmessage.h +++ b/kpovmodeler/pmmessage.h @@ -25,8 +25,8 @@ #include "pmobject.h" -#include <qvaluelist.h> -#include <qstring.h> +#include <tqvaluelist.h> +#include <tqstring.h> /** * Class for messages in the @ref PMErrorDialog @@ -42,7 +42,7 @@ public: * Creates a message with a text and optionally with * a link to an object */ - PMMessage( const QString& text, PMObject* object = 0 ); + PMMessage( const TQString& text, PMObject* object = 0 ); /** * Copy constructor */ @@ -55,11 +55,11 @@ public: /** * Returns the message text */ - QString text( ) const { return m_sText; } + TQString text( ) const { return m_sText; } /** * Sets the message text */ - void setText( const QString& text ) { m_sText = text; } + void setText( const TQString& text ) { m_sText = text; } /** * Returns the linked object or 0 */ @@ -70,10 +70,10 @@ public: void setLinkedObject( PMObject* o ) { m_pObject = o; } private: - QString m_sText; + TQString m_sText; PMObject* m_pObject; }; -typedef QValueList<PMMessage> PMMessageList; +typedef TQValueList<PMMessage> PMMessageList; #endif diff --git a/kpovmodeler/pmmetaobject.cpp b/kpovmodeler/pmmetaobject.cpp index a7e98b9b..0163e1fc 100644 --- a/kpovmodeler/pmmetaobject.cpp +++ b/kpovmodeler/pmmetaobject.cpp @@ -17,7 +17,7 @@ #include "pmmetaobject.h" -PMPropertyBase::PMPropertyBase( const QString& name, +PMPropertyBase::PMPropertyBase( const TQString& name, PMVariant::PMVariantDataType t, bool readOnly, bool writeOnly ) { @@ -36,7 +36,7 @@ PMPropertyBase::PMPropertyBase( const PMPropertyBase& p ) m_writeOnly = p.m_writeOnly; if( p.m_pEnumList ) - m_pEnumList = new QStringList( *( p.m_pEnumList ) ); + m_pEnumList = new TQStringList( *( p.m_pEnumList ) ); else m_pEnumList = 0; } @@ -63,7 +63,7 @@ PMVariant PMPropertyBase::getProperty( const PMObject* obj ) return getProtected( obj ); } -PMMetaObject::PMMetaObject( const QString& className, PMMetaObject* superClass, +PMMetaObject::PMMetaObject( const TQString& className, PMMetaObject* superClass, PMObjectFactoryMethod factory ) { m_className = className; diff --git a/kpovmodeler/pmmetaobject.h b/kpovmodeler/pmmetaobject.h index f8daf2eb..95822fc9 100644 --- a/kpovmodeler/pmmetaobject.h +++ b/kpovmodeler/pmmetaobject.h @@ -19,10 +19,10 @@ #ifndef PMMETAOBJECT_H #define PMMETAOBJECT_H -#include <qstring.h> -#include <qstringlist.h> -#include <qptrlist.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqptrlist.h> +#include <tqdict.h> #include "pmvariant.h" class PMPart; @@ -36,7 +36,7 @@ public: /** * Default constructor */ - PMPropertyBase( const QString& name, PMVariant::PMVariantDataType t, + PMPropertyBase( const TQString& name, PMVariant::PMVariantDataType t, bool readOnly = false, bool writeOnly = false ); /** * Copy constructor @@ -50,7 +50,7 @@ public: /** * Returns the properties name */ - QString name( ) const { return m_name; } + TQString name( ) const { return m_name; } /** * Returns the data type */ @@ -95,7 +95,7 @@ public: /** * Returns the list of enum values */ - virtual QStringList enumValues( ) const { return QStringList( ); } + virtual TQStringList enumValues( ) const { return TQStringList( ); } /** * Returns true if the property is read-only. False by default @@ -121,15 +121,15 @@ protected: private: PMVariant::PMVariantDataType m_type; - QString m_name; - QStringList* m_pEnumList; + TQString m_name; + TQStringList* m_pEnumList; bool m_readOnly; bool m_writeOnly; }; -typedef QPtrList<PMPropertyBase> PMPropertyList; -typedef QDict<PMPropertyBase> PMPropertyDict; -typedef QDictIterator<PMPropertyBase> PMPropertyIterator; +typedef TQPtrList<PMPropertyBase> PMPropertyList; +typedef TQDict<PMPropertyBase> PMPropertyDict; +typedef TQDictIterator<PMPropertyBase> PMPropertyIterator; /** * Macro that defines a property class for a PMObject class @@ -150,7 +150,7 @@ public: \ typedef void ( ObjectClass::*SetDoublePtr ) ( double ); \ typedef void ( ObjectClass::*SetBoolPtr ) ( bool ); \ typedef void ( ObjectClass::*SetThreeStatePtr )( PMThreeState ); \ - typedef void ( ObjectClass::*SetStringPtr ) ( const QString& ); \ + typedef void ( ObjectClass::*SetStringPtr ) ( const TQString& ); \ typedef void ( ObjectClass::*SetVectorPtr ) ( const PMVector& ); \ typedef void ( ObjectClass::*SetColorPtr ) ( const PMColor& ); \ typedef void ( ObjectClass::*SetObjectPtr ) ( PMObject* ); \ @@ -160,68 +160,68 @@ public: \ typedef double ( ObjectClass::*GetDoublePtr ) ( void ) const; \ typedef bool ( ObjectClass::*GetBoolPtr ) ( void ) const; \ typedef PMThreeState ( ObjectClass::*GetThreeStatePtr ) ( void ) const; \ - typedef QString ( ObjectClass::*GetStringPtr ) ( void ) const; \ + typedef TQString ( ObjectClass::*GetStringPtr ) ( void ) const; \ typedef PMVector ( ObjectClass::*GetVectorPtr ) ( void ) const; \ typedef PMColor ( ObjectClass::*GetColorPtr ) ( void ) const; \ typedef PMObject* ( ObjectClass::*GetObjectPtr ) ( void ) const; \ \ - PropertyClass( const QString& name, SetIntPtr setFktn, GetIntPtr getFktn ) \ + PropertyClass( const TQString& name, SetIntPtr setFktn, GetIntPtr getFktn ) \ : PMPropertyBase( name, PMVariant::Integer, \ setFktn == 0, getFktn == 0 ) \ { \ m_setFunction.setInt = setFktn; \ m_getFunction.getInt = getFktn; \ } \ - PropertyClass( const QString& name, SetUnsignedPtr setFktn, GetUnsignedPtr getFktn ) \ + PropertyClass( const TQString& name, SetUnsignedPtr setFktn, GetUnsignedPtr getFktn ) \ : PMPropertyBase( name, PMVariant::Unsigned, \ setFktn == 0, getFktn == 0 ) \ { \ m_setFunction.setUnsigned = setFktn; \ m_getFunction.getUnsigned = getFktn; \ } \ - PropertyClass( const QString& name, SetDoublePtr setFktn, GetDoublePtr getFktn ) \ + PropertyClass( const TQString& name, SetDoublePtr setFktn, GetDoublePtr getFktn ) \ : PMPropertyBase( name, PMVariant::Double, \ setFktn == 0, getFktn == 0 ) \ { \ m_setFunction.setDouble = setFktn; \ m_getFunction.getDouble = getFktn; \ } \ - PropertyClass( const QString& name, SetBoolPtr setFktn, GetBoolPtr getFktn ) \ + PropertyClass( const TQString& name, SetBoolPtr setFktn, GetBoolPtr getFktn ) \ : PMPropertyBase( name, PMVariant::Bool, \ setFktn == 0, getFktn == 0 ) \ { \ m_setFunction.setBool = setFktn; \ m_getFunction.getBool = getFktn; \ } \ - PropertyClass( const QString& name, SetThreeStatePtr setFktn, GetThreeStatePtr getFktn ) \ + PropertyClass( const TQString& name, SetThreeStatePtr setFktn, GetThreeStatePtr getFktn ) \ : PMPropertyBase( name, PMVariant::ThreeState, \ setFktn == 0, getFktn == 0 ) \ { \ m_setFunction.setThreeState = setFktn; \ m_getFunction.getThreeState = getFktn; \ } \ - PropertyClass( const QString& name, SetStringPtr setFktn, GetStringPtr getFktn ) \ + PropertyClass( const TQString& name, SetStringPtr setFktn, GetStringPtr getFktn ) \ : PMPropertyBase( name, PMVariant::String, \ setFktn == 0, getFktn == 0 ) \ { \ m_setFunction.setString = setFktn; \ m_getFunction.getString = getFktn; \ } \ - PropertyClass( const QString& name, SetVectorPtr setFktn, GetVectorPtr getFktn ) \ + PropertyClass( const TQString& name, SetVectorPtr setFktn, GetVectorPtr getFktn ) \ : PMPropertyBase( name, PMVariant::Vector, \ setFktn == 0, getFktn == 0 ) \ { \ m_setFunction.setVector = setFktn; \ m_getFunction.getVector = getFktn; \ } \ - PropertyClass( const QString& name, SetColorPtr setFktn, GetColorPtr getFktn ) \ + PropertyClass( const TQString& name, SetColorPtr setFktn, GetColorPtr getFktn ) \ : PMPropertyBase( name, PMVariant::Color, \ setFktn == 0, getFktn == 0 ) \ { \ m_setFunction.setColor = setFktn; \ m_getFunction.getColor = getFktn; \ } \ - PropertyClass( const QString& name, SetObjectPtr setFktn, GetObjectPtr getFktn ) \ + PropertyClass( const TQString& name, SetObjectPtr setFktn, GetObjectPtr getFktn ) \ : PMPropertyBase( name, PMVariant::ObjectPointer, \ setFktn == 0, getFktn == 0 ) \ { \ @@ -358,7 +358,7 @@ public: * a new object of that type. factoryMethod may be 0 for * abstract classes. */ - PMMetaObject( const QString& className, PMMetaObject* superClass = 0, + PMMetaObject( const TQString& className, PMMetaObject* superClass = 0, PMObjectFactoryMethod factoryMethod = 0 ); /** * Destructor @@ -368,7 +368,7 @@ public: /** * Returns the class name */ - QString className( ) const { return m_className; } + TQString className( ) const { return m_className; } /** * Returns the meta object of the super class */ @@ -400,13 +400,13 @@ public: * Returns a property by name or 0 if a property with the name * doesn't exist. */ - PMPropertyBase* property( const QString& name ) const + PMPropertyBase* property( const TQString& name ) const { return m_propertiesDict.find( name ); } private: - QString m_className; + TQString m_className; PMMetaObject* m_pSuperClass; PMPropertyList m_properties; PMPropertyDict m_propertiesDict; diff --git a/kpovmodeler/pmmovecommand.cpp b/kpovmodeler/pmmovecommand.cpp index 1d70f3e0..bb75b0e4 100644 --- a/kpovmodeler/pmmovecommand.cpp +++ b/kpovmodeler/pmmovecommand.cpp @@ -27,7 +27,7 @@ #include "pmdebug.h" #include <klocale.h> -#include <qptrdict.h> +#include <tqptrdict.h> PMMoveCommand::PMMoveCommand( PMObject* obj, PMObject* parent, PMObject* after ) : PMCommand( i18n( "Move %1" ).arg( obj->description( ) ) ) @@ -172,7 +172,7 @@ void PMMoveCommand::execute( PMCommandManager* theManager ) } } - QPtrListIterator<PMMemento> mit( m_dataChanges ); + TQPtrListIterator<PMMemento> mit( m_dataChanges ); for( ; mit.current( ); ++mit ) { PMObjectChangeListIterator change = mit.current( )->changedObjects( ); @@ -212,7 +212,7 @@ void PMMoveCommand::undo( PMCommandManager* theManager ) theManager->cmdObjectChanged( obj, PMCAdd ); } - QPtrListIterator<PMMemento> mit( m_dataChanges ); + TQPtrListIterator<PMMemento> mit( m_dataChanges ); for( ; mit.current( ); ++mit ) { mit.current( )->originator( )->restoreMemento( mit.current( ) ); @@ -238,11 +238,11 @@ int PMMoveCommand::errorFlags( PMPart* ) bool stop; // dictionary of deleted objects - QPtrDict<bool> deletedObjects( 1009 ); + TQPtrDict<bool> deletedObjects( 1009 ); deletedObjects.setAutoDelete( true ); - QPtrDict<bool> objectsAfterInsertPosition( 1009 ); + TQPtrDict<bool> objectsAfterInsertPosition( 1009 ); objectsAfterInsertPosition.setAutoDelete( true ); - QPtrDict<bool> declaresBeforeInsertPosition( 199 ); + TQPtrDict<bool> declaresBeforeInsertPosition( 199 ); declaresBeforeInsertPosition.setAutoDelete( true ); @@ -441,7 +441,7 @@ int PMMoveCommand::errorFlags( PMPart* ) if( linked ) { obj = info->deletedObject( ); - QString name = obj->name( ); + TQString name = obj->name( ); decl = ( PMDeclare* ) linked; if( name.isEmpty( ) ) diff --git a/kpovmodeler/pmmovecommand.h b/kpovmodeler/pmmovecommand.h index 75250fd2..5aac246d 100644 --- a/kpovmodeler/pmmovecommand.h +++ b/kpovmodeler/pmmovecommand.h @@ -82,7 +82,7 @@ private: PMObjectList m_insertErrors; bool m_executed; bool m_firstExecution; - QPtrList<PMMemento> m_dataChanges; + TQPtrList<PMMemento> m_dataChanges; }; #endif diff --git a/kpovmodeler/pmnamedobject.cpp b/kpovmodeler/pmnamedobject.cpp index d6d6ab09..72553cd4 100644 --- a/kpovmodeler/pmnamedobject.cpp +++ b/kpovmodeler/pmnamedobject.cpp @@ -60,7 +60,7 @@ void PMNamedObject::cleanUp( ) const Base::cleanUp( ); } -void PMNamedObject::serialize( QDomElement& e, QDomDocument& doc ) const +void PMNamedObject::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "name", m_name ); Base::serialize( e, doc ); @@ -72,7 +72,7 @@ void PMNamedObject::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -void PMNamedObject::setName( const QString& newName ) +void PMNamedObject::setName( const TQString& newName ) { if( newName != m_name ) { diff --git a/kpovmodeler/pmnamedobject.h b/kpovmodeler/pmnamedobject.h index d4cdee2c..8b7b0b62 100644 --- a/kpovmodeler/pmnamedobject.h +++ b/kpovmodeler/pmnamedobject.h @@ -53,18 +53,18 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns the name of the object. This is the name that helps * the user to identify a object (like "south_wall", "floor" ...) */ - virtual QString name( ) const { return m_name; } + virtual TQString name( ) const { return m_name; } /** * Sets the name of the object. */ - virtual void setName( const QString& newName ); + virtual void setName( const TQString& newName ); /** * Returns true if the object can have a name */ @@ -81,7 +81,7 @@ private: /** * Name of the object */ - QString m_name; + TQString m_name; static PMMetaObject* s_pMetaObject; }; diff --git a/kpovmodeler/pmnamedobjectedit.cpp b/kpovmodeler/pmnamedobjectedit.cpp index 35a6c96c..8f590982 100644 --- a/kpovmodeler/pmnamedobjectedit.cpp +++ b/kpovmodeler/pmnamedobjectedit.cpp @@ -19,12 +19,12 @@ #include "pmnamedobjectedit.h" #include "pmnamedobject.h" -#include <qlayout.h> -#include <qlineedit.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqlabel.h> #include <klocale.h> -PMNamedObjectEdit::PMNamedObjectEdit( QWidget* parent, const char* name ) +PMNamedObjectEdit::PMNamedObjectEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -34,15 +34,15 @@ void PMNamedObjectEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout = new QHBoxLayout( topLayout( ) ); - m_pNameEdit = new QLineEdit( this ); - QLabel* label = new QLabel( i18n( "Name:" ), this ); + TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); + m_pNameEdit = new TQLineEdit( this ); + TQLabel* label = new TQLabel( i18n( "Name:" ), this ); layout->addWidget( label ); layout->addWidget( m_pNameEdit ); - connect( m_pNameEdit, SIGNAL( textChanged( const QString& ) ), - SLOT( slotNameChanged( const QString& ) ) ); + connect( m_pNameEdit, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotNameChanged( const TQString& ) ) ); } void PMNamedObjectEdit::displayObject( PMObject* o ) @@ -74,7 +74,7 @@ bool PMNamedObjectEdit::isDataValid( ) return Base::isDataValid( ); } -void PMNamedObjectEdit::slotNameChanged( const QString& ) +void PMNamedObjectEdit::slotNameChanged( const TQString& ) { emit dataChanged( ); } diff --git a/kpovmodeler/pmnamedobjectedit.h b/kpovmodeler/pmnamedobjectedit.h index 8d9dff40..dcf8cb07 100644 --- a/kpovmodeler/pmnamedobjectedit.h +++ b/kpovmodeler/pmnamedobjectedit.h @@ -27,7 +27,7 @@ #include "pmdialogeditbase.h" class PMNamedObject; -class QLineEdit; +class TQLineEdit; /** * Dialog edit class for @ref PMNamedObject. @@ -40,7 +40,7 @@ public: /** * Creates a PMNamedObjectEdit with parent and name */ - PMNamedObjectEdit( QWidget* parent, const char* name = 0 ); + PMNamedObjectEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -54,10 +54,10 @@ protected: virtual void saveContents( ); private slots: - void slotNameChanged( const QString& ); + void slotNameChanged( const TQString& ); private: PMNamedObject* m_pDisplayedObject; - QLineEdit* m_pNameEdit; + TQLineEdit* m_pNameEdit; }; diff --git a/kpovmodeler/pmnormal.cpp b/kpovmodeler/pmnormal.cpp index 77fdddd1..722a8fc4 100644 --- a/kpovmodeler/pmnormal.cpp +++ b/kpovmodeler/pmnormal.cpp @@ -86,12 +86,12 @@ void PMNormal::cleanUp( ) const Base::cleanUp( ); } -QString PMNormal::description( ) const +TQString PMNormal::description( ) const { return i18n( "normal" ); } -void PMNormal::serialize( QDomElement& e, QDomDocument& doc ) const +void PMNormal::serialize( TQDomElement& e, TQDomDocument& doc ) const { Base::serialize( e, doc ); e.setAttribute( "enable_bump_size", m_enableBumpSize ); @@ -109,7 +109,7 @@ void PMNormal::readAttributes( const PMXMLHelper& h ) m_uvMapping = h.boolAttribute( "uv_mapping", false ); } -PMDialogEditBase* PMNormal::editWidget( QWidget* parent ) const +PMDialogEditBase* PMNormal::editWidget( TQWidget* parent ) const { return new PMNormalEdit( parent ); } diff --git a/kpovmodeler/pmnormal.h b/kpovmodeler/pmnormal.h index 81ec0547..c798d039 100644 --- a/kpovmodeler/pmnormal.h +++ b/kpovmodeler/pmnormal.h @@ -49,7 +49,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMNormal( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -57,16 +57,16 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMNormalEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmnormal" ); } + virtual TQString pixmap( ) const { return TQString( "pmnormal" ); } /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmnormaledit.cpp b/kpovmodeler/pmnormaledit.cpp index 161f2b0b..68d6f1f3 100644 --- a/kpovmodeler/pmnormaledit.cpp +++ b/kpovmodeler/pmnormaledit.cpp @@ -21,13 +21,13 @@ #include "pmlinkedit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> #include <klocale.h> -PMNormalEdit::PMNormalEdit( QWidget* parent, const char* name ) +PMNormalEdit::PMNormalEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -35,31 +35,31 @@ PMNormalEdit::PMNormalEdit( QWidget* parent, const char* name ) void PMNormalEdit::createTopWidgets( ) { - QHBoxLayout* hl; + TQHBoxLayout* hl; Base::createTopWidgets( ); - hl = new QHBoxLayout( topLayout( ) ); - m_pBumpSizeCheck = new QCheckBox( i18n( "Bump size" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pBumpSizeCheck = new TQCheckBox( i18n( "Bump size" ), this ); m_pBumpSizeEdit = new PMFloatEdit( this ); hl->addWidget( m_pBumpSizeCheck ); hl->addWidget( m_pBumpSizeEdit ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - QLabel* lbl = new QLabel( i18n( "Accuracy" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + TQLabel* lbl = new TQLabel( i18n( "Accuracy" ), this ); m_pAccuracy = new PMFloatEdit( this ); hl->addWidget( lbl ); hl->addWidget( m_pAccuracy ); hl->addStretch( 1 ); - m_pUVMapping = new QCheckBox( i18n( "UV mapping" ), this ); + m_pUVMapping = new TQCheckBox( i18n( "UV mapping" ), this ); topLayout( )->addWidget( m_pUVMapping ); - connect( m_pBumpSizeCheck, SIGNAL( clicked( ) ), SLOT( slotBumpSizeClicked( )) ); - connect( m_pBumpSizeEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( )) ); - connect( m_pAccuracy, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pUVMapping, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pBumpSizeCheck, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotBumpSizeClicked( )) ); + connect( m_pBumpSizeEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( )) ); + connect( m_pAccuracy, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pUVMapping, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMNormalEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmnormaledit.h b/kpovmodeler/pmnormaledit.h index 631db778..72ca9d12 100644 --- a/kpovmodeler/pmnormaledit.h +++ b/kpovmodeler/pmnormaledit.h @@ -27,7 +27,7 @@ #include "pmtexturebaseedit.h" class PMNormal; -class QCheckBox; +class TQCheckBox; class PMFloatEdit; /** @@ -41,7 +41,7 @@ public: /** * Creates a PMNormalEdit with parent and name */ - PMNormalEdit( QWidget* parent, const char* name = 0 ); + PMNormalEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -60,10 +60,10 @@ protected slots: private: PMNormal* m_pDisplayedObject; - QCheckBox* m_pBumpSizeCheck; + TQCheckBox* m_pBumpSizeCheck; PMFloatEdit* m_pBumpSizeEdit; PMFloatEdit* m_pAccuracy; - QCheckBox* m_pUVMapping; + TQCheckBox* m_pUVMapping; }; diff --git a/kpovmodeler/pmobject.cpp b/kpovmodeler/pmobject.cpp index d6bb94b3..94907482 100644 --- a/kpovmodeler/pmobject.cpp +++ b/kpovmodeler/pmobject.cpp @@ -142,7 +142,7 @@ bool PMObject::takeChild( uint ) return false; } -PMDialogEditBase* PMObject::editWidget( QWidget* parent ) const +PMDialogEditBase* PMObject::editWidget( TQWidget* parent ) const { return new PMDialogEditBase( parent ); // return 0; @@ -193,9 +193,9 @@ PMMatrix PMObject::transformedWith( ) const return result; } -QDomElement PMObject::serialize( QDomDocument& doc ) const +TQDomElement PMObject::serialize( TQDomDocument& doc ) const { - QDomElement e = doc.createElement( className( ).lower( ) ); + TQDomElement e = doc.createElement( className( ).lower( ) ); serialize( e, doc ); return e; } @@ -213,7 +213,7 @@ void PMObject::cleanUp( ) const } } -bool PMObject::setProperty( const QString& name, const PMVariant& v ) +bool PMObject::setProperty( const TQString& name, const PMVariant& v ) { PMPropertyBase* p = metaObject( )->property( name ); if( !p ) @@ -221,9 +221,9 @@ bool PMObject::setProperty( const QString& name, const PMVariant& v ) return p->setProperty( this, v ); } -QStringList PMObject::properties( ) const +TQStringList PMObject::properties( ) const { - QStringList lst; + TQStringList lst; PMPropertyIterator it = metaObject( )->properties( ); for( ; it.current( ); ++it ) @@ -232,7 +232,7 @@ QStringList PMObject::properties( ) const return lst; } -PMVariant PMObject::property( const QString& name ) const +PMVariant PMObject::property( const TQString& name ) const { PMPropertyBase* p = metaObject( )->property( name ); if( !p ) @@ -240,19 +240,19 @@ PMVariant PMObject::property( const QString& name ) const return p->getProperty( this ); } -bool PMObject::isA( const QString& className ) const +bool PMObject::isA( const TQString& className ) const { if( !m_pPart ) return false; return m_pPart->prototypeManager( )->isA( metaObject( ), className ); } -QString PMObject::type( ) const +TQString PMObject::type( ) const { return metaObject( )->className( ); } -bool PMObject::canInsert( const QString& className, const PMObject* after, +bool PMObject::canInsert( const TQString& className, const PMObject* after, const PMObjectList* objectsBetween ) const { if( !m_pPart ) @@ -275,7 +275,7 @@ int PMObject::canInsert( const PMObjectList& list, const PMObject* after ) const return m_pPart->insertRuleSystem( )->canInsert( this, list, after ); } -int PMObject::canInsert( const QStringList& classes, const PMObject* after ) const +int PMObject::canInsert( const TQStringList& classes, const PMObject* after ) const { if( !m_pPart ) return false; diff --git a/kpovmodeler/pmobject.h b/kpovmodeler/pmobject.h index 0c11008b..fcf67466 100644 --- a/kpovmodeler/pmobject.h +++ b/kpovmodeler/pmobject.h @@ -24,12 +24,12 @@ #include <config.h> #endif -#include <qvaluelist.h> -#include <qptrlist.h> -#include <qstring.h> -#include <qstringlist.h> +#include <tqvaluelist.h> +#include <tqptrlist.h> +#include <tqstring.h> +#include <tqstringlist.h> #include <kdebug.h> -#include <qdom.h> +#include <tqdom.h> #include "pmmatrix.h" #include "pmcontrolpoint.h" @@ -45,8 +45,8 @@ class PMObjectAction; class PMPart; class PMObject; -typedef QPtrList<PMObject> PMObjectList; -typedef QPtrListIterator<PMObject> PMObjectListIterator; +typedef TQPtrList<PMObject> PMObjectList; +typedef TQPtrListIterator<PMObject> PMObjectListIterator; /** * Base class for all povray objects @@ -91,26 +91,26 @@ public: * Returns true if the object is of type t or inherits the object * class with type t */ - bool isA( const QString& className ) const; + bool isA( const TQString& className ) const; /** * Returns the class name (not i18n'ed, without the PM prefix) */ - QString type( ) const; + TQString type( ) const; /** * same as @ref type( ) */ - QString className( ) const { return type( ); } + TQString className( ) const { return type( ); } /** * Returns the class name of the object (povray name). * This is the name that is showed in dialogs and menus. */ - virtual QString description( ) const = 0; + virtual TQString description( ) const = 0; /** * Returns the name of the object. This is the name that helps * the user to identify a object (like "south wall", "floor" ...) */ - virtual QString name( ) const { return QString::null; } + virtual TQString name( ) const { return TQString::null; } /** * Returns true if the object can have a name */ @@ -136,7 +136,7 @@ public: * The parser uses the third parameter for top level objects. These objects * have to be treated as if they are inserted after the object after. */ - bool canInsert( const QString& className, const PMObject* after, + bool canInsert( const TQString& className, const PMObject* after, const PMObjectList* objectsBetween = 0 ) const; /** * Returns true if the object o can be inserted as child after the object @@ -154,7 +154,7 @@ public: /** * Returns the number of objects that can be inserted at that position */ - int canInsert( const QStringList& classes, const PMObject* after ) const; + int canInsert( const TQStringList& classes, const PMObject* after ) const; /** * Returns true if an insert or remove operation of children will @@ -251,7 +251,7 @@ public: /** * Returns a list of auxiliary files */ - virtual QStringList auxiliaryFiles( ) const { return QStringList( ); } + virtual TQStringList auxiliaryFiles( ) const { return TQStringList( ); } /** * Returns true if the object has a (povray) transformation matrix. @@ -332,7 +332,7 @@ public: * @see PMObjectAction */ virtual void addObjectActions( const PMControlPointList&, - QPtrList<PMObjectAction>& ) { } + TQPtrList<PMObjectAction>& ) { } /** * This member is called when the user selects an object action @@ -344,17 +344,17 @@ public: */ virtual void objectActionCalled( const PMObjectAction*, const PMControlPointList&, - const QPtrList<PMVector>&, + const TQPtrList<PMVector>&, const PMVector& ) { }; /** * Saves the object as kpovmodeler xml code. */ - QDomElement serialize( QDomDocument& doc ) const; + TQDomElement serialize( TQDomDocument& doc ) const; /** * Adds the objects attributes and child objects to the element */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const = 0; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const = 0; /** * Reads the attributes from the QDomElement */ @@ -363,16 +363,16 @@ public: /** * Returns the list of known properties */ - QStringList properties( ) const; + TQStringList properties( ) const; /** * Sets a property and returns true if successful */ - bool setProperty( const QString&, const PMVariant& v ); + bool setProperty( const TQString&, const PMVariant& v ); /** * Returns a property */ - PMVariant property( const QString& ) const; + PMVariant property( const TQString& ) const; /** * Returns true if the object is selected @@ -413,12 +413,12 @@ public: * * The widget will be created as a child of parent. */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const = 0; + virtual TQString pixmap( ) const = 0; /** * Returns a pointer to the @ref PMDeclare object, that is linked to * that object, or 0, if this object contains no link diff --git a/kpovmodeler/pmobjectaction.h b/kpovmodeler/pmobjectaction.h index e9a843ce..5397759c 100644 --- a/kpovmodeler/pmobjectaction.h +++ b/kpovmodeler/pmobjectaction.h @@ -27,8 +27,8 @@ #include "pmvector.h" #include "pmcontrolpoint.h" #include "pmmetaobject.h" -#include <qptrlist.h> -#include <qstring.h> +#include <tqptrlist.h> +#include <tqstring.h> class KAction; @@ -49,7 +49,7 @@ public: * Constructor */ PMObjectAction( PMMetaObject* objectType, int actionID, - const QString& description, bool enabled = true ) + const TQString& description, bool enabled = true ) { m_class = objectType; m_actionID = actionID; @@ -69,7 +69,7 @@ public: /** * Returns the description */ - QString description( ) const { return m_description; } + TQString description( ) const { return m_description; } /** * Returns the enabled flag @@ -92,7 +92,7 @@ public: private: PMMetaObject* m_class; int m_actionID; - QString m_description; + TQString m_description; bool m_enabled; int m_menuID; }; diff --git a/kpovmodeler/pmobjectdrag.cpp b/kpovmodeler/pmobjectdrag.cpp index 6bebfc8e..cd1ee6da 100644 --- a/kpovmodeler/pmobjectdrag.cpp +++ b/kpovmodeler/pmobjectdrag.cpp @@ -26,20 +26,20 @@ #include "pmiomanager.h" #include "pmserializer.h" -#include <qbuffer.h> +#include <tqbuffer.h> #include <string.h> const char* const c_kpmDocumentMimeFormat = "application/x-kpovmodeler"; -PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, QWidget* dragSource, +PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, TQWidget* dragSource, const char* name ) - : QDragObject( dragSource, name ) + : TQDragObject( dragSource, name ) { - QByteArray modelerData; + TQByteArray modelerData; - QTextStream s2( modelerData, IO_WriteOnly ); - QDomDocument doc( "KPOVMODELER" ); - QDomElement top = doc.createElement( "objects" ); + TQTextStream s2( modelerData, IO_WriteOnly ); + TQDomDocument doc( "KPOVMODELER" ); + TQDomElement top = doc.createElement( "objects" ); doc.appendChild( top ); top.setAttribute( "majorFormat", c_majorDocumentFormat ); top.setAttribute( "minorFormat", c_minorDocumentFormat ); @@ -49,13 +49,13 @@ PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, QWidget* dragSource, PMObject* o = object->firstChild( ); for( ; o; o = o->nextSibling( ) ) { - QDomElement e = o->serialize( doc ); + TQDomElement e = o->serialize( doc ); top.appendChild( e ); } } else { - QDomElement e = object->serialize( doc ); + TQDomElement e = object->serialize( doc ); top.appendChild( e ); } s2 << doc; @@ -63,14 +63,14 @@ PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, QWidget* dragSource, m_data.push_back( modelerData ); m_mimeTypes.push_back( c_kpmDocumentMimeFormat ); - const QPtrList<PMIOFormat>& formats = part->ioManager( )->formats( ); - QPtrListIterator<PMIOFormat> it( formats ); + const TQPtrList<PMIOFormat>& formats = part->ioManager( )->formats( ); + TQPtrListIterator<PMIOFormat> it( formats ); for( ; it.current( ); ++it ) { if( it.current( )->services( ) & PMIOFormat::Export ) { - QByteArray data; - QBuffer buffer( data ); + TQByteArray data; + TQBuffer buffer( data ); buffer.open( IO_WriteOnly ); PMSerializer* ser = it.current( )->newSerializer( &buffer ); @@ -96,15 +96,15 @@ PMObjectDrag::PMObjectDrag( PMPart* part, PMObject* object, QWidget* dragSource, } } -PMObjectDrag::PMObjectDrag( PMPart* part, const PMObjectList& objList, QWidget* dragSource, +PMObjectDrag::PMObjectDrag( PMPart* part, const PMObjectList& objList, TQWidget* dragSource, const char* name ) - : QDragObject( dragSource, name ) + : TQDragObject( dragSource, name ) { - QByteArray modelerData; + TQByteArray modelerData; - QTextStream s2( modelerData, IO_WriteOnly ); - QDomDocument doc( "KPOVMODELER" ); - QDomElement top = doc.createElement( "objects" ); + TQTextStream s2( modelerData, IO_WriteOnly ); + TQDomDocument doc( "KPOVMODELER" ); + TQDomElement top = doc.createElement( "objects" ); doc.appendChild( top ); top.setAttribute( "majorFormat", c_majorDocumentFormat ); top.setAttribute( "minorFormat", c_minorDocumentFormat ); @@ -117,13 +117,13 @@ PMObjectDrag::PMObjectDrag( PMPart* part, const PMObjectList& objList, QWidget* PMObject* o = it.current( )->firstChild( ); for( ; o; o = o->nextSibling( ) ) { - QDomElement e = o->serialize( doc ); + TQDomElement e = o->serialize( doc ); top.appendChild( e ); } } else { - QDomElement e = it.current( )->serialize( doc ); + TQDomElement e = it.current( )->serialize( doc ); top.appendChild( e ); } } @@ -133,14 +133,14 @@ PMObjectDrag::PMObjectDrag( PMPart* part, const PMObjectList& objList, QWidget* m_data.push_back( modelerData ); m_mimeTypes.push_back( c_kpmDocumentMimeFormat ); - const QPtrList<PMIOFormat>& formats = part->ioManager( )->formats( ); - QPtrListIterator<PMIOFormat> fit( formats ); + const TQPtrList<PMIOFormat>& formats = part->ioManager( )->formats( ); + TQPtrListIterator<PMIOFormat> fit( formats ); for( ; fit.current( ); ++fit ) { if( fit.current( )->services( ) & PMIOFormat::Export ) { - QByteArray data; - QBuffer buffer( data ); + TQByteArray data; + TQBuffer buffer( data ); buffer.open( IO_WriteOnly ); PMSerializer* ser = fit.current( )->newSerializer( &buffer ); @@ -170,10 +170,10 @@ PMObjectDrag::~PMObjectDrag( ) { } -QByteArray PMObjectDrag::encodedData( const char* format ) const +TQByteArray PMObjectDrag::encodedData( const char* format ) const { - QValueList<QByteArray>::ConstIterator dit; - QStringList::ConstIterator sit; + TQValueList<TQByteArray>::ConstIterator dit; + TQStringList::ConstIterator sit; for( dit = m_data.begin( ), sit = m_mimeTypes.begin( ); dit != m_data.end( ) && sit != m_mimeTypes.end( ); ++dit, ++sit ) @@ -182,7 +182,7 @@ QByteArray PMObjectDrag::encodedData( const char* format ) const return *dit; } - QByteArray empty; + TQByteArray empty; return empty; } @@ -193,13 +193,13 @@ const char* PMObjectDrag::format( int i /*=0*/ ) const return 0; } -bool PMObjectDrag::canDecode( const QMimeSource* e, PMPart* part ) +bool PMObjectDrag::canDecode( const TQMimeSource* e, PMPart* part ) { if( e->provides( c_kpmDocumentMimeFormat ) ) return true; - const QPtrList<PMIOFormat>& formats = part->ioManager( )->formats( ); - QPtrListIterator<PMIOFormat> fit( formats ); + const TQPtrList<PMIOFormat>& formats = part->ioManager( )->formats( ); + TQPtrListIterator<PMIOFormat> fit( formats ); for( ; fit.current( ); ++fit ) if( fit.current( )->services( ) & PMIOFormat::Import && e->provides( fit.current( )->mimeType( ).latin1( ) ) ) @@ -208,17 +208,17 @@ bool PMObjectDrag::canDecode( const QMimeSource* e, PMPart* part ) return false; } -PMParser* PMObjectDrag::newParser( const QMimeSource* e, PMPart* part ) +PMParser* PMObjectDrag::newParser( const TQMimeSource* e, PMPart* part ) { if( e->provides( c_kpmDocumentMimeFormat ) ) return new PMXMLParser( part, e->encodedData( c_kpmDocumentMimeFormat ) ); - const QPtrList<PMIOFormat>& formats = part->ioManager( )->formats( ); - QPtrListIterator<PMIOFormat> fit( formats ); + const TQPtrList<PMIOFormat>& formats = part->ioManager( )->formats( ); + TQPtrListIterator<PMIOFormat> fit( formats ); for( ; fit.current( ); ++fit ) { PMIOFormat* f = fit.current( ); - QString str = f->mimeType( ); + TQString str = f->mimeType( ); const char* lat = str.latin1( ); if( f->services( ) & PMIOFormat::Import && e->provides( lat ) ) return f->newParser( part, e->encodedData( lat ) ); diff --git a/kpovmodeler/pmobjectdrag.h b/kpovmodeler/pmobjectdrag.h index a8f4daf3..757eae8d 100644 --- a/kpovmodeler/pmobjectdrag.h +++ b/kpovmodeler/pmobjectdrag.h @@ -20,8 +20,8 @@ #ifndef PMOBJECTDRAG_H #define PMOBJECTDRAG_H -#include <qdragobject.h> -#include <qstringlist.h> +#include <tqdragobject.h> +#include <tqstringlist.h> #include "pmobject.h" class PMParser; @@ -41,12 +41,12 @@ public: * by the part. * @see PMIOManager */ - PMObjectDrag( PMPart* part, PMObject* object, QWidget* dragSource = 0, + PMObjectDrag( PMPart* part, PMObject* object, TQWidget* dragSource = 0, const char* name = 0 ); /** * Creates a drag object for all objects in objList */ - PMObjectDrag( PMPart* part, const PMObjectList& objList, QWidget* dragSource = 0, + PMObjectDrag( PMPart* part, const PMObjectList& objList, TQWidget* dragSource = 0, const char* name = 0 ); /** * Deletes the drag object @@ -56,7 +56,7 @@ public: * Returns the encoded payload of this object, in the * specified MIME format. */ - virtual QByteArray encodedData( const char* ) const; + virtual TQByteArray encodedData( const char* ) const; /** * Returns the ith format, or NULL. */ @@ -64,18 +64,18 @@ public: /** * Returns true if the information in e can be decoded */ - static bool canDecode( const QMimeSource* e, PMPart* part ); + static bool canDecode( const TQMimeSource* e, PMPart* part ); /** * Returns a pointer to a parser for this drag object or 0, if the data * can't be decoded. * * The caller is responsible to delete the parser. */ - static PMParser* newParser( const QMimeSource* e, PMPart* part ); + static PMParser* newParser( const TQMimeSource* e, PMPart* part ); private: - QValueList<QByteArray> m_data; - QStringList m_mimeTypes; + TQValueList<TQByteArray> m_data; + TQStringList m_mimeTypes; }; #endif diff --git a/kpovmodeler/pmobjectlibrarysettings.cpp b/kpovmodeler/pmobjectlibrarysettings.cpp index ce80f77c..47a38435 100644 --- a/kpovmodeler/pmobjectlibrarysettings.cpp +++ b/kpovmodeler/pmobjectlibrarysettings.cpp @@ -24,54 +24,54 @@ #include "pmlibraryhandleedit.h" #include "pmdebug.h" -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kfiledialog.h> #include <kmessagebox.h> #include <kstandarddirs.h> -PMObjectLibrarySettings::PMObjectLibrarySettings( QWidget* parent, const char* name ) +PMObjectLibrarySettings::PMObjectLibrarySettings( TQWidget* parent, const char* name ) : PMSettingsDialogPage( parent, name ) { - QVBoxLayout* vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) ); + TQVBoxLayout* vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); - QGroupBox* gb = new QGroupBox( i18n( "Libraries" ), this ); + TQGroupBox* gb = new TQGroupBox( i18n( "Libraries" ), this ); vlayout->addWidget( gb ); - QHBoxLayout* hlayout = new QHBoxLayout( gb, KDialog::marginHint( ) + 5, KDialog::spacingHint( ) ); - m_pObjectLibraries = new QListBox( gb ); - connect( m_pObjectLibraries, SIGNAL( selectionChanged( ) ), SLOT( slotObjectLibraryChanged( ) ) ); + TQHBoxLayout* hlayout = new TQHBoxLayout( gb, KDialog::marginHint( ) + 5, KDialog::spacingHint( ) ); + m_pObjectLibraries = new TQListBox( gb ); + connect( m_pObjectLibraries, TQT_SIGNAL( selectionChanged( ) ), TQT_SLOT( slotObjectLibraryChanged( ) ) ); hlayout->addWidget( m_pObjectLibraries ); - QVBoxLayout* gvl = new QVBoxLayout( hlayout ); - m_pCreateObjectLibrary = new QPushButton( i18n( "Create..." ), gb ); - connect( m_pCreateObjectLibrary, SIGNAL( clicked( ) ), SLOT( slotCreateObjectLibrary( ) ) ); + TQVBoxLayout* gvl = new TQVBoxLayout( hlayout ); + m_pCreateObjectLibrary = new TQPushButton( i18n( "Create..." ), gb ); + connect( m_pCreateObjectLibrary, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotCreateObjectLibrary( ) ) ); gvl->addWidget( m_pCreateObjectLibrary ); - m_pRemoveObjectLibrary = new QPushButton( i18n( "Remove" ), gb ); - connect( m_pRemoveObjectLibrary, SIGNAL( clicked( ) ), SLOT( slotRemoveObjectLibrary( ) ) ); + m_pRemoveObjectLibrary = new TQPushButton( i18n( "Remove" ), gb ); + connect( m_pRemoveObjectLibrary, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveObjectLibrary( ) ) ); gvl->addWidget( m_pRemoveObjectLibrary ); - m_pImportObjectLibrary = new QPushButton( i18n( "Import" ), gb ); - connect( m_pImportObjectLibrary, SIGNAL( clicked( ) ), SLOT( slotImportObjectLibrary( ) ) ); + m_pImportObjectLibrary = new TQPushButton( i18n( "Import" ), gb ); + connect( m_pImportObjectLibrary, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotImportObjectLibrary( ) ) ); gvl->addWidget( m_pImportObjectLibrary ); - m_pModifyObjectLibrary = new QPushButton( i18n( "Properties" ), gb ); - connect( m_pModifyObjectLibrary, SIGNAL( clicked( ) ), SLOT( slotModifyObjectLibrary( ) ) ); + m_pModifyObjectLibrary = new TQPushButton( i18n( "Properties" ), gb ); + connect( m_pModifyObjectLibrary, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotModifyObjectLibrary( ) ) ); gvl->addWidget( m_pModifyObjectLibrary ); gvl->addStretch( 1 ); - gb = new QGroupBox( i18n( "Library Details" ), this ); - QGridLayout* grid = new QGridLayout( gb, 4, 2, KDialog::marginHint( ) + 5, KDialog::spacingHint( ) ); - QLabel* lbl = new QLabel( i18n( "Path" ), gb ); + gb = new TQGroupBox( i18n( "Library Details" ), this ); + TQGridLayout* grid = new TQGridLayout( gb, 4, 2, KDialog::marginHint( ) + 5, KDialog::spacingHint( ) ); + TQLabel* lbl = new TQLabel( i18n( "Path" ), gb ); grid->addWidget( lbl, 0, 0 ); - lbl = new QLabel( i18n( "Author" ), gb ); + lbl = new TQLabel( i18n( "Author" ), gb ); grid->addWidget( lbl, 1, 0 ); - lbl = new QLabel( i18n( "Description" ), gb ); + lbl = new TQLabel( i18n( "Description" ), gb ); grid->addWidget( lbl, 2, 0 ); - m_pLibraryPath = new QLabel( "", gb ); - m_pLibraryAuthor = new QLabel( "", gb ); - m_pLibraryDescription = new QLabel( "", gb ); - m_pReadOnlyText = new QLabel( "", gb ); + m_pLibraryPath = new TQLabel( "", gb ); + m_pLibraryAuthor = new TQLabel( "", gb ); + m_pLibraryDescription = new TQLabel( "", gb ); + m_pReadOnlyText = new TQLabel( "", gb ); grid->addWidget( m_pLibraryPath, 0, 1 ); grid->addWidget( m_pLibraryAuthor, 1, 1 ); grid->addWidget( m_pLibraryDescription, 2, 1 ); @@ -113,7 +113,7 @@ void PMObjectLibrarySettings::slotModifyObjectLibrary( ) { PMLibraryHandleEdit h_dlg( h, this ); - if( h_dlg.exec( ) == QDialog::Accepted ) + if( h_dlg.exec( ) == TQDialog::Accepted ) { h->saveLibraryInfo( ); displaySettings( ); @@ -139,9 +139,9 @@ void PMObjectLibrarySettings::slotCreateObjectLibrary( ) { PMLibraryHandle h; PMLibraryHandleEdit h_dlg( &h, this ); - QString libfilename; + TQString libfilename; - if( h_dlg.exec( ) == QDialog::Accepted ) + if( h_dlg.exec( ) == TQDialog::Accepted ) { libfilename = h.name( ); h.setPath( locateLocal( "appdata", "library/" ) + libfilename.stripWhiteSpace( ) + "/" ); diff --git a/kpovmodeler/pmobjectlibrarysettings.h b/kpovmodeler/pmobjectlibrarysettings.h index 1c4c9ab9..f4e7f854 100644 --- a/kpovmodeler/pmobjectlibrarysettings.h +++ b/kpovmodeler/pmobjectlibrarysettings.h @@ -26,8 +26,8 @@ #include "pmsettingsdialog.h" -class QPushButton; -class QListBox; +class TQPushButton; +class TQListBox; /** * Object library configuration dialog page @@ -39,7 +39,7 @@ public: /** * Default constructor */ - PMObjectLibrarySettings( QWidget* parent, const char* name = 0 ); + PMObjectLibrarySettings( TQWidget* parent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ @@ -62,16 +62,16 @@ protected slots: private: int m_objectLibraryIndex; int m_selectionIndex; - QListBox* m_pObjectLibraries; - QPushButton* m_pCreateObjectLibrary; - QPushButton* m_pModifyObjectLibrary; - QPushButton* m_pRemoveObjectLibrary; - QPushButton* m_pImportObjectLibrary; + TQListBox* m_pObjectLibraries; + TQPushButton* m_pCreateObjectLibrary; + TQPushButton* m_pModifyObjectLibrary; + TQPushButton* m_pRemoveObjectLibrary; + TQPushButton* m_pImportObjectLibrary; - QLabel* m_pLibraryPath; - QLabel* m_pLibraryAuthor; - QLabel* m_pLibraryDescription; - QLabel* m_pReadOnlyText; + TQLabel* m_pLibraryPath; + TQLabel* m_pLibraryAuthor; + TQLabel* m_pLibraryDescription; + TQLabel* m_pReadOnlyText; }; diff --git a/kpovmodeler/pmobjectlink.cpp b/kpovmodeler/pmobjectlink.cpp index 6596471d..559d3fe4 100644 --- a/kpovmodeler/pmobjectlink.cpp +++ b/kpovmodeler/pmobjectlink.cpp @@ -53,7 +53,7 @@ PMObjectLink::~PMObjectLink( ) { } -QString PMObjectLink::description( ) const +TQString PMObjectLink::description( ) const { return i18n( "object link" ); } @@ -139,7 +139,7 @@ void PMObjectLink::setLinkedObjectProperty( PMObject* o ) setLinkedObject( ( PMDeclare* ) o ); } -void PMObjectLink::serialize( QDomElement& e, QDomDocument& doc ) const +void PMObjectLink::serialize( TQDomElement& e, TQDomDocument& doc ) const { if( m_pLinkedObject ) e.setAttribute( "prototype", m_pLinkedObject->id( ) ); @@ -148,7 +148,7 @@ void PMObjectLink::serialize( QDomElement& e, QDomDocument& doc ) const void PMObjectLink::readAttributes( const PMXMLHelper& h ) { - QString id = h.stringAttribute( "prototype", "" ); + TQString id = h.stringAttribute( "prototype", "" ); if( !id.isEmpty( ) ) { PMDeclare* link = h.parser( )->checkLink( id ); @@ -167,7 +167,7 @@ void PMObjectLink::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMObjectLink::editWidget( QWidget* parent ) const +PMDialogEditBase* PMObjectLink::editWidget( TQWidget* parent ) const { return new PMObjectLinkEdit( parent ); } diff --git a/kpovmodeler/pmobjectlink.h b/kpovmodeler/pmobjectlink.h index 54eb4833..8ec7b474 100644 --- a/kpovmodeler/pmobjectlink.h +++ b/kpovmodeler/pmobjectlink.h @@ -50,7 +50,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMObjectLink( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -74,15 +74,15 @@ public: void setLinkedObjectProperty( PMObject* o ); /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMObjectLinkEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmobjectlink" ); } + virtual TQString pixmap( ) const { return TQString( "pmobjectlink" ); } /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmobjectlinkedit.cpp b/kpovmodeler/pmobjectlinkedit.cpp index 935f8714..98aead0c 100644 --- a/kpovmodeler/pmobjectlinkedit.cpp +++ b/kpovmodeler/pmobjectlinkedit.cpp @@ -22,9 +22,9 @@ #include "pmobjectselect.h" #include "pmlinkedit.h" -#include <qlayout.h> +#include <tqlayout.h> -PMObjectLinkEdit::PMObjectLinkEdit( QWidget* parent, const char* name ) +PMObjectLinkEdit::PMObjectLinkEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -35,12 +35,12 @@ void PMObjectLinkEdit::createTopWidgets( ) Base::createTopWidgets( ); m_pLinkEdit = new PMLinkEdit( this ); - QStringList l; + TQStringList l; l.append( "GraphicalObject" ); l.append( "Light" ); m_pLinkEdit->setLinkPossibilities( l ); topLayout( )->addWidget( m_pLinkEdit ); - connect( m_pLinkEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pLinkEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMObjectLinkEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmobjectlinkedit.h b/kpovmodeler/pmobjectlinkedit.h index 2f517951..fd1ce86b 100644 --- a/kpovmodeler/pmobjectlinkedit.h +++ b/kpovmodeler/pmobjectlinkedit.h @@ -40,7 +40,7 @@ public: /** * Creates a PMObjectLinkEdit with parent and name */ - PMObjectLinkEdit( QWidget* parent, const char* name = 0 ); + PMObjectLinkEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmobjectselect.cpp b/kpovmodeler/pmobjectselect.cpp index fb9fa0ce..fcfbb3f5 100644 --- a/kpovmodeler/pmobjectselect.cpp +++ b/kpovmodeler/pmobjectselect.cpp @@ -20,17 +20,17 @@ #include <klocale.h> #include <kiconloader.h> -PMListBoxObject::PMListBoxObject( QListBox* listbox, PMObject* obj, - QListBoxItem* after ) - : QListBoxPixmap( listbox, +PMListBoxObject::PMListBoxObject( TQListBox* listbox, PMObject* obj, + TQListBoxItem* after ) + : TQListBoxPixmap( listbox, SmallIcon( obj->pixmap( ), PMFactory::instance( ) ), checkName( obj->name( ) ), after ) { m_pObject = obj; } -PMListBoxObject::PMListBoxObject( QListBox* listbox, PMObject* obj ) - : QListBoxPixmap( listbox, +PMListBoxObject::PMListBoxObject( TQListBox* listbox, PMObject* obj ) + : TQListBoxPixmap( listbox, SmallIcon( obj->pixmap( ), PMFactory::instance( ) ), checkName( obj->name( ) ) ) { @@ -38,38 +38,38 @@ PMListBoxObject::PMListBoxObject( QListBox* listbox, PMObject* obj ) } PMListBoxObject::PMListBoxObject( PMObject* obj ) - : QListBoxPixmap( SmallIcon( obj->pixmap( ), PMFactory::instance( ) ), + : TQListBoxPixmap( SmallIcon( obj->pixmap( ), PMFactory::instance( ) ), checkName( obj->name( ) ) ) { m_pObject = obj; } -PMListBoxObject::PMListBoxObject( QListBox* listbox, PMObject* obj, - const QString& text, QListBoxItem* after ) - : QListBoxPixmap( listbox, +PMListBoxObject::PMListBoxObject( TQListBox* listbox, PMObject* obj, + const TQString& text, TQListBoxItem* after ) + : TQListBoxPixmap( listbox, SmallIcon( obj->pixmap( ), PMFactory::instance( ) ), text, after ) { m_pObject = obj; } -PMListBoxObject::PMListBoxObject( QListBox* listbox, PMObject* obj, - const QString& text ) - : QListBoxPixmap( listbox, +PMListBoxObject::PMListBoxObject( TQListBox* listbox, PMObject* obj, + const TQString& text ) + : TQListBoxPixmap( listbox, SmallIcon( obj->pixmap( ), PMFactory::instance( ) ), text ) { m_pObject = obj; } -PMListBoxObject::PMListBoxObject( PMObject* obj, const QString& text ) - : QListBoxPixmap( SmallIcon( obj->pixmap( ), PMFactory::instance( ) ), +PMListBoxObject::PMListBoxObject( PMObject* obj, const TQString& text ) + : TQListBoxPixmap( SmallIcon( obj->pixmap( ), PMFactory::instance( ) ), text ) { m_pObject = obj; } -QString PMListBoxObject::checkName( const QString& text ) +TQString PMListBoxObject::checkName( const TQString& text ) { if( text.isEmpty( ) ) return i18n( "(unnamed)" ); @@ -81,21 +81,21 @@ PMListBoxObject::~PMListBoxObject( ) } -QSize PMObjectSelect::s_size = QSize( 200, 300 ); +TQSize PMObjectSelect::s_size = TQSize( 200, 300 ); -PMObjectSelect::PMObjectSelect( QWidget* parent, const char* name, bool modal ) +PMObjectSelect::PMObjectSelect( TQWidget* parent, const char* name, bool modal ) : KDialogBase( parent, name, modal, i18n( "Choose Object" ), Ok | Cancel ) { m_pSelectedObject = 0; - m_pListBox = new QListBox( this ); + m_pListBox = new TQListBox( this ); setMainWidget( m_pListBox ); setInitialSize( s_size ); - connect( m_pListBox, SIGNAL( highlighted( QListBoxItem* ) ), - SLOT( slotHighlighted( QListBoxItem* ) ) ); - connect( m_pListBox, SIGNAL( selected( QListBoxItem* ) ), - SLOT( slotSelected( QListBoxItem* ) ) ); + connect( m_pListBox, TQT_SIGNAL( highlighted( TQListBoxItem* ) ), + TQT_SLOT( slotHighlighted( TQListBoxItem* ) ) ); + connect( m_pListBox, TQT_SIGNAL( selected( TQListBoxItem* ) ), + TQT_SLOT( slotSelected( TQListBoxItem* ) ) ); enableButtonOK( false ); } @@ -109,8 +109,8 @@ void PMObjectSelect::addObject( PMObject* obj ) m_pListBox->insertItem( new PMListBoxObject( obj ) ); } -int PMObjectSelect::selectObject( PMObject* link, const QString& t, - PMObject* & obj, QWidget* parent ) +int PMObjectSelect::selectObject( PMObject* link, const TQString& t, + PMObject* & obj, TQWidget* parent ) { PMObject* last = link; PMObject* scene; @@ -166,8 +166,8 @@ int PMObjectSelect::selectObject( PMObject* link, const QString& t, } int PMObjectSelect::selectObject( PMObject* link, - const QStringList& t, - PMObject* & obj, QWidget* parent ) + const TQStringList& t, + PMObject* & obj, TQWidget* parent ) { PMObject* last = link; PMObject* scene; @@ -222,8 +222,8 @@ int PMObjectSelect::selectObject( PMObject* link, return Rejected; } -int PMObjectSelect::selectDeclare( PMObject* link, const QString& declareType, - PMObject* & obj, QWidget* parent ) +int PMObjectSelect::selectDeclare( PMObject* link, const TQString& declareType, + PMObject* & obj, TQWidget* parent ) { PMObject* last = link; PMObject* scene; @@ -284,8 +284,8 @@ int PMObjectSelect::selectDeclare( PMObject* link, const QString& declareType, return Rejected; } -int PMObjectSelect::selectDeclare( PMObject* link, const QStringList& declareTypes, - PMObject* & obj, QWidget* parent ) +int PMObjectSelect::selectDeclare( PMObject* link, const TQStringList& declareTypes, + PMObject* & obj, TQWidget* parent ) { PMObject* last = link; PMObject* scene; @@ -346,13 +346,13 @@ int PMObjectSelect::selectDeclare( PMObject* link, const QStringList& declareTyp return Rejected; } -void PMObjectSelect::slotHighlighted( QListBoxItem* lbi ) +void PMObjectSelect::slotHighlighted( TQListBoxItem* lbi ) { m_pSelectedObject = ( ( PMListBoxObject* ) lbi )->object( ); enableButtonOK( true ); } -void PMObjectSelect::slotSelected( QListBoxItem* lbi ) +void PMObjectSelect::slotSelected( TQListBoxItem* lbi ) { m_pSelectedObject = ( ( PMListBoxObject* ) lbi )->object( ); enableButtonOK( true ); diff --git a/kpovmodeler/pmobjectselect.h b/kpovmodeler/pmobjectselect.h index c69af315..46d39d21 100644 --- a/kpovmodeler/pmobjectselect.h +++ b/kpovmodeler/pmobjectselect.h @@ -24,15 +24,15 @@ #endif #include <kdialogbase.h> -#include <qlistbox.h> -#include <qsize.h> -#include <qvaluelist.h> -#include <qstringlist.h> +#include <tqlistbox.h> +#include <tqsize.h> +#include <tqvaluelist.h> +#include <tqstringlist.h> #include "pmobject.h" #include "pmdeclare.h" /** - * QListBoxItem for @ref PMObject + * TQListBoxItem for @ref PMObject */ class PMListBoxObject : public QListBoxPixmap { @@ -41,11 +41,11 @@ public: * Constructs a list box item in listbox listbox showing the * object obj. The item gets inserted after the item after */ - PMListBoxObject( QListBox* listbox, PMObject* obj, QListBoxItem* after ); + PMListBoxObject( TQListBox* listbox, PMObject* obj, TQListBoxItem* after ); /** * Constructs a list box item in listbox listbox showing the object obj */ - PMListBoxObject( QListBox* listbox, PMObject* obj ); + PMListBoxObject( TQListBox* listbox, PMObject* obj ); /** * Constructs a list box item showing the object obj */ @@ -54,16 +54,16 @@ public: * Constructs a list box item in listbox listbox showing the * text text. The item gets inserted after the item after */ - PMListBoxObject( QListBox* listbox, PMObject* obj, const QString& text, - QListBoxItem* after ); + PMListBoxObject( TQListBox* listbox, PMObject* obj, const TQString& text, + TQListBoxItem* after ); /** * Constructs a list box item in listbox listbox showing the text text */ - PMListBoxObject( QListBox* listbox, PMObject* obj, const QString& text ); + PMListBoxObject( TQListBox* listbox, PMObject* obj, const TQString& text ); /** * Constructs a list box item showing the text text */ - PMListBoxObject( PMObject* obj, const QString& text ); + PMListBoxObject( PMObject* obj, const TQString& text ); /** * Deletes the item */ @@ -74,7 +74,7 @@ public: */ PMObject* object( ) const { return m_pObject; } private: - static QString checkName( const QString& text ); + static TQString checkName( const TQString& text ); PMObject* m_pObject; }; @@ -88,7 +88,7 @@ public: /** * Creates a selection widget with parent and name */ - PMObjectSelect( QWidget* parent = 0, const char* name = 0, + PMObjectSelect( TQWidget* parent = 0, const char* name = 0, bool modal = true ); /** * Deletes the dialog @@ -111,22 +111,22 @@ public: * * Only objects above the object link are listed. */ - static int selectObject( PMObject* link, const QString& t, PMObject* & obj, - QWidget* parent = 0 ); - static int selectObject( PMObject* link, const QStringList& t, - PMObject* & obj, QWidget* parent = 0 ); - static int selectDeclare( PMObject* link, const QString& declareType, - PMObject* & obj, QWidget* parent = 0 ); - static int selectDeclare( PMObject* link, const QStringList& dt, - PMObject* & obj, QWidget* parent = 0 ); + static int selectObject( PMObject* link, const TQString& t, PMObject* & obj, + TQWidget* parent = 0 ); + static int selectObject( PMObject* link, const TQStringList& t, + PMObject* & obj, TQWidget* parent = 0 ); + static int selectDeclare( PMObject* link, const TQString& declareType, + PMObject* & obj, TQWidget* parent = 0 ); + static int selectDeclare( PMObject* link, const TQStringList& dt, + PMObject* & obj, TQWidget* parent = 0 ); protected slots: - void slotHighlighted( QListBoxItem* lbi ); - void slotSelected( QListBoxItem* lbi ); + void slotHighlighted( TQListBoxItem* lbi ); + void slotSelected( TQListBoxItem* lbi ); private: - QListBox* m_pListBox; + TQListBox* m_pListBox; PMObject* m_pSelectedObject; - static QSize s_size; + static TQSize s_size; }; #endif diff --git a/kpovmodeler/pmobjectsettings.cpp b/kpovmodeler/pmobjectsettings.cpp index 06aae64e..411b0a49 100644 --- a/kpovmodeler/pmobjectsettings.cpp +++ b/kpovmodeler/pmobjectsettings.cpp @@ -37,195 +37,195 @@ #include "pmheightfield.h" #include "pmtext.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qgroupbox.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqgroupbox.h> +#include <tqlabel.h> #include <klocale.h> -PMObjectSettings::PMObjectSettings( QWidget* parent, const char* name ) +PMObjectSettings::PMObjectSettings( TQWidget* parent, const char* name ) : PMSettingsDialogPage( parent, name ) { - QHBoxLayout* hlayout; - QVBoxLayout* vlayout; - QVBoxLayout* gvl; - QGridLayout* grid; - QGroupBox* gb; + TQHBoxLayout* hlayout; + TQVBoxLayout* vlayout; + TQVBoxLayout* gvl; + TQGridLayout* grid; + TQGroupBox* gb; - vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) ); + vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); - gb = new QGroupBox( i18n( "Subdivisions" ), this ); + gb = new TQGroupBox( i18n( "Subdivisions" ), this ); vlayout->addWidget( gb ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - grid = new QGridLayout( gvl, 13, 3 ); + grid = new TQGridLayout( gvl, 13, 3 ); - grid->addWidget( new QLabel( i18n( "Sphere:" ), gb ), 0, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Sphere:" ), gb ), 0, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 0, 2 ); - grid->addWidget( new QLabel( "u", gb ), 0, 1 ); + grid->addWidget( new TQLabel( "u", gb ), 0, 1 ); m_pSphereUSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pSphereUSteps ); m_pSphereUSteps->setValidation( true, 2, true, 32 ); - hlayout->addWidget( new QLabel( "v", gb ) ); + hlayout->addWidget( new TQLabel( "v", gb ) ); m_pSphereVSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pSphereVSteps ); m_pSphereVSteps->setValidation( true, 4, true, 64 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Cylinder:" ), gb ), 1, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Cylinder:" ), gb ), 1, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 1, 2 ); m_pCylinderSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pCylinderSteps ); m_pCylinderSteps->setValidation( true, 4, true, 64 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Cone:" ), gb ), 2, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Cone:" ), gb ), 2, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 2, 2 ); m_pConeSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pConeSteps ); m_pConeSteps->setValidation( true, 4, true, 64 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Torus:" ), gb ), 3, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Torus:" ), gb ), 3, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 3, 2 ); - grid->addWidget( new QLabel( "u", gb ), 3, 1 ); + grid->addWidget( new TQLabel( "u", gb ), 3, 1 ); m_pTorusUSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pTorusUSteps ); m_pTorusUSteps->setValidation( true, 2, true, 16 ); - hlayout->addWidget( new QLabel( "v", gb ) ); + hlayout->addWidget( new TQLabel( "v", gb ) ); m_pTorusVSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pTorusVSteps ); m_pTorusVSteps->setValidation( true, 4, true, 64 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Disc:" ), gb ), 4, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Disc:" ), gb ), 4, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 4, 2 ); m_pDiscSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pDiscSteps ); m_pDiscSteps->setValidation( true, 4, true, 64 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Blob sphere:" ), gb ), 5, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Blob sphere:" ), gb ), 5, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 5, 2 ); - grid->addWidget( new QLabel( "u", gb ), 5, 1 ); + grid->addWidget( new TQLabel( "u", gb ), 5, 1 ); m_pBlobSphereUSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pBlobSphereUSteps ); m_pBlobSphereUSteps->setValidation( true, 2, true, 32 ); - hlayout->addWidget( new QLabel( "v", gb ) ); + hlayout->addWidget( new TQLabel( "v", gb ) ); m_pBlobSphereVSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pBlobSphereVSteps ); m_pBlobSphereVSteps->setValidation( true, 4, true, 64 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Blob cylinder:" ), gb ), 6, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Blob cylinder:" ), gb ), 6, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 6, 2 ); - grid->addWidget( new QLabel( "u", gb ), 6, 1 ); + grid->addWidget( new TQLabel( "u", gb ), 6, 1 ); m_pBlobCylinderUSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pBlobCylinderUSteps ); m_pBlobCylinderUSteps->setValidation( true, 2, true, 32 ); - hlayout->addWidget( new QLabel( "v", gb ) ); + hlayout->addWidget( new TQLabel( "v", gb ) ); m_pBlobCylinderVSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pBlobCylinderVSteps ); m_pBlobCylinderVSteps->setValidation( true, 4, true, 64 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Lathe:" ), gb ), 7, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Lathe:" ), gb ), 7, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 7, 2 ); - grid->addWidget( new QLabel( "u", gb ), 7, 1 ); + grid->addWidget( new TQLabel( "u", gb ), 7, 1 ); m_pLatheUSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pLatheUSteps ); m_pLatheUSteps->setValidation( true, 1, true, 16 ); - hlayout->addWidget( new QLabel( "v", gb ) ); + hlayout->addWidget( new TQLabel( "v", gb ) ); m_pLatheRSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pLatheRSteps ); m_pLatheRSteps->setValidation( true, 4, true, 64 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Surface of revolution:" ), gb ), 8, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Surface of revolution:" ), gb ), 8, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 8, 2 ); - grid->addWidget( new QLabel( "u", gb ), 8, 1 ); + grid->addWidget( new TQLabel( "u", gb ), 8, 1 ); m_pSorUSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pSorUSteps ); m_pSorUSteps->setValidation( true, 1, true, 16 ); - hlayout->addWidget( new QLabel( "v", gb ) ); + hlayout->addWidget( new TQLabel( "v", gb ) ); m_pSorRSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pSorRSteps ); m_pSorRSteps->setValidation( true, 4, true, 64 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Prism:" ), gb ), 9, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Prism:" ), gb ), 9, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 9, 2 ); m_pPrismSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pPrismSteps ); m_pPrismSteps->setValidation( true, 1, true, 16 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Superquadric ellipsoid:" ), gb ), 10, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Superquadric ellipsoid:" ), gb ), 10, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 10, 2 ); - grid->addWidget( new QLabel( "u", gb ), 10, 1 ); + grid->addWidget( new TQLabel( "u", gb ), 10, 1 ); m_pSqeUSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pSqeUSteps ); m_pSqeUSteps->setValidation( true, 2, true, 8 ); - hlayout->addWidget( new QLabel( "v", gb ) ); + hlayout->addWidget( new TQLabel( "v", gb ) ); m_pSqeVSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pSqeVSteps ); m_pSqeVSteps->setValidation( true, 2, true, 8 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Sphere sweep:" ), gb ), 11, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Sphere sweep:" ), gb ), 11, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 11, 2 ); - grid->addWidget( new QLabel( "r", gb ), 11, 1 ); + grid->addWidget( new TQLabel( "r", gb ), 11, 1 ); m_pSphereSweepRSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pSphereSweepRSteps ); m_pSphereSweepRSteps->setValidation( true, 4, true, 64 ); - hlayout->addWidget( new QLabel( "s", gb ) ); + hlayout->addWidget( new TQLabel( "s", gb ) ); m_pSphereSweepSSteps = new PMIntEdit( gb ); hlayout->addWidget( m_pSphereSweepSSteps ); m_pSphereSweepSSteps->setValidation( true, 1, true, 16 ); hlayout->addStretch( 1 ); - grid->addWidget( new QLabel( i18n( "Heightfield:" ), gb ), 12, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Heightfield:" ), gb ), 12, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 12, 2 ); m_pHeightFieldVariance = new PMIntEdit( gb ); hlayout->addWidget( m_pHeightFieldVariance ); m_pHeightFieldVariance->setValidation( true, 1, true, 16 ); hlayout->addStretch( 1 ); - gb = new QGroupBox( i18n( "Sizes" ), this ); + gb = new TQGroupBox( i18n( "Sizes" ), this ); vlayout->addWidget( gb ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - grid = new QGridLayout( gvl, 1, 2 ); + grid = new TQGridLayout( gvl, 1, 2 ); - grid->addWidget( new QLabel( i18n( "Plane:" ), gb ), 0, 0 ); - hlayout = new QHBoxLayout( ); + grid->addWidget( new TQLabel( i18n( "Plane:" ), gb ), 0, 0 ); + hlayout = new TQHBoxLayout( ); grid->addLayout( hlayout, 0, 1 ); m_pPlaneSize = new PMFloatEdit( gb ); hlayout->addWidget( m_pPlaneSize ); m_pPlaneSize->setValidation( true, 0.1, false, 0.0 ); hlayout->addStretch( 1 ); - gb = new QGroupBox( i18n( "Camera Views" ), this ); + gb = new TQGroupBox( i18n( "Camera Views" ), this ); vlayout->addWidget( gb ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - m_pHighDetailCameraViews = new QCheckBox( i18n( "High detail for enhanced projections" ), gb ); + m_pHighDetailCameraViews = new TQCheckBox( i18n( "High detail for enhanced projections" ), gb ); gvl->addWidget( m_pHighDetailCameraViews ); vlayout->addStretch( 1 ); diff --git a/kpovmodeler/pmobjectsettings.h b/kpovmodeler/pmobjectsettings.h index 716631c0..426ee47d 100644 --- a/kpovmodeler/pmobjectsettings.h +++ b/kpovmodeler/pmobjectsettings.h @@ -26,7 +26,7 @@ class PMIntEdit; class PMFloatEdit; -class QCheckBox; +class TQCheckBox; /** * Object details configuration dialog page @@ -38,7 +38,7 @@ public: /** * Default constructor */ - PMObjectSettings( QWidget* parent, const char* name = 0 ); + PMObjectSettings( TQWidget* parent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ @@ -71,7 +71,7 @@ private: PMIntEdit* m_pSphereSweepRSteps; PMIntEdit* m_pSphereSweepSSteps; PMIntEdit* m_pHeightFieldVariance; - QCheckBox* m_pHighDetailCameraViews; + TQCheckBox* m_pHighDetailCameraViews; }; diff --git a/kpovmodeler/pmopenglsettings.cpp b/kpovmodeler/pmopenglsettings.cpp index 64f3ac9c..9c125c32 100644 --- a/kpovmodeler/pmopenglsettings.cpp +++ b/kpovmodeler/pmopenglsettings.cpp @@ -20,18 +20,18 @@ #include "pmglview.h" #include "pmdefaults.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqlabel.h> #include <klocale.h> -PMOpenGLSettings::PMOpenGLSettings( QWidget* parent, const char* name ) +PMOpenGLSettings::PMOpenGLSettings( TQWidget* parent, const char* name ) : PMSettingsDialogPage( parent, name ) { - QVBoxLayout* vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) ); + TQVBoxLayout* vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); - m_pDirect = new QCheckBox( i18n( "Direct rendering" ), this ); - vlayout->addWidget( new QLabel( i18n( "Changes take only effect after a restart!" ), this ) ); + m_pDirect = new TQCheckBox( i18n( "Direct rendering" ), this ); + vlayout->addWidget( new TQLabel( i18n( "Changes take only effect after a restart!" ), this ) ); vlayout->addWidget( m_pDirect ); vlayout->addStretch( 1 ); } diff --git a/kpovmodeler/pmopenglsettings.h b/kpovmodeler/pmopenglsettings.h index d893a6b0..424265f7 100644 --- a/kpovmodeler/pmopenglsettings.h +++ b/kpovmodeler/pmopenglsettings.h @@ -24,7 +24,7 @@ #include "pmsettingsdialog.h" -class QCheckBox; +class TQCheckBox; /** * OpenGL configuration dialog page @@ -36,7 +36,7 @@ public: /** * Default constructor */ - PMOpenGLSettings( QWidget* parent, const char* name = 0 ); + PMOpenGLSettings( TQWidget* parent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ @@ -47,7 +47,7 @@ public: virtual void displayDefaults( ); private: - QCheckBox* m_pDirect; + TQCheckBox* m_pDirect; }; diff --git a/kpovmodeler/pmoutputdevice.cpp b/kpovmodeler/pmoutputdevice.cpp index 5feb8ec2..abad0e36 100644 --- a/kpovmodeler/pmoutputdevice.cpp +++ b/kpovmodeler/pmoutputdevice.cpp @@ -18,13 +18,13 @@ #include "pmoutputdevice.h" #include "pmpovrayformat.h" -#include <qtextstream.h> +#include <tqtextstream.h> #include <klocale.h> unsigned int PMOutputDevice::s_indentOffset = 3; bool PMOutputDevice::s_bracketBehindType = true; -PMOutputDevice::PMOutputDevice( QIODevice* dev, PMPovrayFormat* format ) +PMOutputDevice::PMOutputDevice( TQIODevice* dev, PMPovrayFormat* format ) : PMSerializer( dev ), m_stream( dev ) { m_pFormat = format; @@ -38,9 +38,9 @@ PMOutputDevice::~PMOutputDevice( ) { } -QString PMOutputDevice::description( ) const +TQString PMOutputDevice::description( ) const { - return QString( "POV-Ray" ); + return TQString( "POV-Ray" ); } void PMOutputDevice::callSerialization( const PMObject* o, const PMMetaObject* mo ) @@ -78,7 +78,7 @@ void PMOutputDevice::close( ) // m_stream << ( char ) 0; } -void PMOutputDevice::objectBegin( const QString& type ) +void PMOutputDevice::objectBegin( const TQString& type ) { if( m_pendingNewLine ) newLine( ); @@ -97,7 +97,7 @@ void PMOutputDevice::objectBegin( const QString& type ) m_objectSeparation = false; } -void PMOutputDevice::declareBegin( const QString& id ) +void PMOutputDevice::declareBegin( const TQString& id ) { if( m_pendingNewLine ) newLine( ); @@ -118,7 +118,7 @@ void PMOutputDevice::objectEnd( ) m_objectSeparation = true; } -void PMOutputDevice::writeLine( const QString& str ) +void PMOutputDevice::writeLine( const TQString& str ) { if( m_pendingNewLine ) newLine( ); @@ -127,7 +127,7 @@ void PMOutputDevice::writeLine( const QString& str ) m_objectSeparation = true; } -void PMOutputDevice::write( const QString& str ) +void PMOutputDevice::write( const TQString& str ) { if( m_pendingNewLine ) newLine( ); @@ -142,10 +142,10 @@ void PMOutputDevice::newLine( ) m_stream << '\n' << m_indentString; } -void PMOutputDevice::writeComment( const QString& text ) +void PMOutputDevice::writeComment( const TQString& text ) { - QString s( text ); - QTextStream str( &s, IO_ReadOnly ); + TQString s( text ); + TQTextStream str( &s, IO_ReadOnly ); bool lwc = m_lastWasComment; if( m_pendingNewLine ) @@ -158,7 +158,7 @@ void PMOutputDevice::writeComment( const QString& text ) writeLine( "//" ); else while( !str.atEnd( ) ) - writeLine( QString( "// " ) + str.readLine( ) ); + writeLine( TQString( "// " ) + str.readLine( ) ); m_lastWasComment = true; m_objectSeparation = false; } @@ -169,18 +169,18 @@ void PMOutputDevice::writeSemicolon( ) m_stream << ';'; } -void PMOutputDevice::writeName( const QString& name ) +void PMOutputDevice::writeName( const TQString& name ) { if( !name.isEmpty( ) ) - writeLine( QString( "//*PMName " ) + name ); + writeLine( TQString( "//*PMName " ) + name ); } -QString PMOutputDevice::escapeAndQuoteString( const QString& s ) +TQString PMOutputDevice::escapeAndQuoteString( const TQString& s ) { - QString result = "\""; - QString tmp = s; - QTextStream stream( &tmp, IO_ReadOnly ); - QChar current, last; + TQString result = "\""; + TQString tmp = s; + TQTextStream stream( &tmp, IO_ReadOnly ); + TQChar current, last; while( !stream.atEnd( ) ) { @@ -191,7 +191,7 @@ QString PMOutputDevice::escapeAndQuoteString( const QString& s ) result += current; // correctly quoted backslash if( ( last == '\\' ) && ( current == '\\' ) ) - current = QChar( 0 ); // clear the last char + current = TQChar( 0 ); // clear the last char last = current; } // backslash at the end diff --git a/kpovmodeler/pmoutputdevice.h b/kpovmodeler/pmoutputdevice.h index 25b3c58b..41bad2e5 100644 --- a/kpovmodeler/pmoutputdevice.h +++ b/kpovmodeler/pmoutputdevice.h @@ -26,9 +26,9 @@ #include "pmserializer.h" -#include <qstring.h> +#include <tqstring.h> -class QTextStream; +class TQTextStream; class PMPovrayFormat; /** @@ -49,12 +49,12 @@ public: * Creates an PMOutputDevice that serializes the povray code * to the device */ - PMOutputDevice( QIODevice* dev, PMPovrayFormat* format ); + PMOutputDevice( TQIODevice* dev, PMPovrayFormat* format ); /** */ virtual ~PMOutputDevice( ); /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual void serialize( PMObject* o ); /** */ @@ -64,11 +64,11 @@ public: * Writes the povray object type, an open bracket to the text stream * and indents the next lines */ - void objectBegin( const QString& type ); + void objectBegin( const TQString& type ); /** * Begins a declare with the identifier id */ - void declareBegin( const QString& id ); + void declareBegin( const TQString& id ); /** * Writes an closing bracket to the text stream * and decreases the indentation @@ -80,11 +80,11 @@ public: * * Adds a newline before the string. */ - void writeLine( const QString& str ); + void writeLine( const TQString& str ); /** * Writes the string to the text stream */ - void write( const QString& str ); + void write( const TQString& str ); /** * Writes a new line to the text stream and indents the next line. */ @@ -92,7 +92,7 @@ public: /** * Writes a comment string to the text stream */ - void writeComment( const QString& text ); + void writeComment( const TQString& text ); /** * Writes a semicolon after a call to objectEnd( ) */ @@ -101,7 +101,7 @@ public: * Writes a special name comment to the text stream, if the * name is not empty */ - void writeName( const QString& name ); + void writeName( const TQString& name ); /** * Returns the basic indentation offset @@ -131,7 +131,7 @@ public: * Escapes only not escaped characters. "\"" and "\\" in the string * are not escaped. */ - static QString escapeAndQuoteString( const QString& s ); + static TQString escapeAndQuoteString( const TQString& s ); /** * Calls the serialization method for the object o and class @@ -148,8 +148,8 @@ private: PMPovrayFormat* m_pFormat; unsigned int m_indentation; - QString m_indentString; - QTextStream m_stream; + TQString m_indentString; + TQTextStream m_stream; bool m_lastWasComment; bool m_pendingNewLine; bool m_objectSeparation; diff --git a/kpovmodeler/pmpalettevalue.cpp b/kpovmodeler/pmpalettevalue.cpp index f2b26fff..170c551f 100644 --- a/kpovmodeler/pmpalettevalue.cpp +++ b/kpovmodeler/pmpalettevalue.cpp @@ -40,15 +40,15 @@ void PMPaletteValue::setValue( double value ) m_value = value; } -void PMPaletteValue::serialize( QDomElement& e, QDomDocument& /* doc */ ) const +void PMPaletteValue::serialize( TQDomElement& e, TQDomDocument& /* doc */ ) const { e.setAttribute( "index", m_index ); e.setAttribute( "value", m_value ); } -void PMPaletteValue::readAttributes( const QDomElement& h ) +void PMPaletteValue::readAttributes( const TQDomElement& h ) { - QString str; + TQString str; bool ok; str = h.attribute( "index" ); diff --git a/kpovmodeler/pmpalettevalue.h b/kpovmodeler/pmpalettevalue.h index 05f9712a..44d443f4 100644 --- a/kpovmodeler/pmpalettevalue.h +++ b/kpovmodeler/pmpalettevalue.h @@ -55,11 +55,11 @@ public: /** * Serializes the palette entry into a XML document. */ - void serialize( QDomElement& e, QDomDocument& doc ) const; + void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** * Reads the palette entry from a XML document. */ - void readAttributes( const QDomElement& h ); + void readAttributes( const TQDomElement& h ); /** * Returns true if both values have the same index and value diff --git a/kpovmodeler/pmpalettevalueedit.cpp b/kpovmodeler/pmpalettevalueedit.cpp index ae6ea653..ca029887 100644 --- a/kpovmodeler/pmpalettevalueedit.cpp +++ b/kpovmodeler/pmpalettevalueedit.cpp @@ -21,42 +21,42 @@ #include "pmlineedits.h" #include "pmdebug.h" -#include <qwidget.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> +#include <tqtooltip.h> #include <ktabctl.h> #include <klocale.h> #include <kmessagebox.h> #include <kdialog.h> #include <kfiledialog.h> -PMPaletteValueEdit::PMPaletteValueEdit( QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMPaletteValueEdit::PMPaletteValueEdit( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { - QLabel* lbl; - QHBoxLayout* layout; + TQLabel* lbl; + TQHBoxLayout* layout; m_pIndexEdit = new PMIntEdit( this ); m_pValueEdit = new PMFloatEdit( this ); - layout = new QHBoxLayout( this ); - lbl = new QLabel( i18n( "Index" ), this ); + layout = new TQHBoxLayout( this ); + lbl = new TQLabel( i18n( "Index" ), this ); layout->addWidget( lbl ); layout->addSpacing( KDialog::spacingHint( ) ); layout->addWidget( m_pIndexEdit ); layout->addSpacing( KDialog::spacingHint( ) ); - lbl = new QLabel( i18n( "Value" ), this ); + lbl = new TQLabel( i18n( "Value" ), this ); layout->addWidget( lbl ); layout->addSpacing( KDialog::spacingHint( ) ); layout->addWidget( m_pValueEdit ); - connect( m_pIndexEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pValueEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pIndexEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pValueEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMPaletteValueEdit::setIndex( int idx ) diff --git a/kpovmodeler/pmpalettevalueedit.h b/kpovmodeler/pmpalettevalueedit.h index c5795cd9..c2375de5 100644 --- a/kpovmodeler/pmpalettevalueedit.h +++ b/kpovmodeler/pmpalettevalueedit.h @@ -37,7 +37,7 @@ class PMPaletteValueEdit: public QWidget Q_OBJECT public: /** */ - PMPaletteValueEdit( QWidget* parent, const char* name = 0 ); + PMPaletteValueEdit( TQWidget* parent, const char* name = 0 ); /** */ void setIndex( int idx ); /** */ diff --git a/kpovmodeler/pmpalettevaluememento.cpp b/kpovmodeler/pmpalettevaluememento.cpp index 6db9b922..f683068c 100644 --- a/kpovmodeler/pmpalettevaluememento.cpp +++ b/kpovmodeler/pmpalettevaluememento.cpp @@ -29,17 +29,17 @@ PMPaletteValueMemento::~PMPaletteValueMemento( ) { } -void PMPaletteValueMemento::setFilterPaletteValues( const QValueList<PMPaletteValue>& v ) +void PMPaletteValueMemento::setFilterPaletteValues( const TQValueList<PMPaletteValue>& v ) { if( !m_bFilterPaletteValuesSaved ) { // Direct assignment does not work with Qt 2.3.x // The list will be changed later in a graphical - // change because QValueList::detach( ) is called + // change because TQValueList::detach( ) is called // too late! // Copy the list by hand. - QValueList<PMPaletteValue>::ConstIterator it = v.begin( ); + TQValueList<PMPaletteValue>::ConstIterator it = v.begin( ); for( ; it != v.end( ); ++it ) m_filterPaletteValues.append( *it ); @@ -48,7 +48,7 @@ void PMPaletteValueMemento::setFilterPaletteValues( const QValueList<PMPaletteVa } } -QValueList<PMPaletteValue> PMPaletteValueMemento::filterPaletteValues( ) const +TQValueList<PMPaletteValue> PMPaletteValueMemento::filterPaletteValues( ) const { if( !m_bFilterPaletteValuesSaved ) kdError( PMArea ) << "Filter palette values not saved in PMPaletteValueMemento::filterPaletteValues\n"; @@ -56,17 +56,17 @@ QValueList<PMPaletteValue> PMPaletteValueMemento::filterPaletteValues( ) const return m_filterPaletteValues; } -void PMPaletteValueMemento::setTransmitPaletteValues( const QValueList<PMPaletteValue>& v ) +void PMPaletteValueMemento::setTransmitPaletteValues( const TQValueList<PMPaletteValue>& v ) { if( !m_bTransmitPaletteValuesSaved ) { // Direct assignment does not work with Qt 2.3.x // The list will be changed later in a graphical - // change because QValueList::detach( ) is called + // change because TQValueList::detach( ) is called // too late! // Copy the list by hand. - QValueList<PMPaletteValue>::ConstIterator it = v.begin( ); + TQValueList<PMPaletteValue>::ConstIterator it = v.begin( ); for( ; it != v.end( ); ++it ) m_transmitPaletteValues.append( *it ); @@ -75,7 +75,7 @@ void PMPaletteValueMemento::setTransmitPaletteValues( const QValueList<PMPalette } } -QValueList<PMPaletteValue> PMPaletteValueMemento::transmitPaletteValues( ) const +TQValueList<PMPaletteValue> PMPaletteValueMemento::transmitPaletteValues( ) const { if( !m_bTransmitPaletteValuesSaved ) kdError( PMArea ) << "Transmit palette values not saved in PMPaletteValueMemento::transmitPaletteValues\n"; diff --git a/kpovmodeler/pmpalettevaluememento.h b/kpovmodeler/pmpalettevaluememento.h index 0ac1242e..8741b80c 100644 --- a/kpovmodeler/pmpalettevaluememento.h +++ b/kpovmodeler/pmpalettevaluememento.h @@ -26,7 +26,7 @@ #include "pmmemento.h" #include "pmpalettevalue.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> /** @@ -47,11 +47,11 @@ public: /** * Saves the filter palette values */ - void setFilterPaletteValues( const QValueList<PMPaletteValue>& v ); + void setFilterPaletteValues( const TQValueList<PMPaletteValue>& v ); /** * Returns the filter palette values */ - QValueList<PMPaletteValue> filterPaletteValues( ) const; + TQValueList<PMPaletteValue> filterPaletteValues( ) const; /** * Returns true if the filter palette values were saved */ @@ -59,11 +59,11 @@ public: /** * Saves the transmit palette values */ - void setTransmitPaletteValues( const QValueList<PMPaletteValue>& v ); + void setTransmitPaletteValues( const TQValueList<PMPaletteValue>& v ); /** * Returns the transmit palette values */ - QValueList<PMPaletteValue> transmitPaletteValues( ) const; + TQValueList<PMPaletteValue> transmitPaletteValues( ) const; /** * Returns true if the transmit palette values were saved */ @@ -73,12 +73,12 @@ private: /** * The stored values for filter */ - QValueList<PMPaletteValue> m_filterPaletteValues; + TQValueList<PMPaletteValue> m_filterPaletteValues; bool m_bFilterPaletteValuesSaved; /** * The stored values for transmit */ - QValueList<PMPaletteValue> m_transmitPaletteValues; + TQValueList<PMPaletteValue> m_transmitPaletteValues; bool m_bTransmitPaletteValuesSaved; }; diff --git a/kpovmodeler/pmparser.cpp b/kpovmodeler/pmparser.cpp index 7a252c88..dfe37a6d 100644 --- a/kpovmodeler/pmparser.cpp +++ b/kpovmodeler/pmparser.cpp @@ -18,8 +18,8 @@ #include "pmparser.h" -#include <qstring.h> -#include <qbuffer.h> +#include <tqstring.h> +#include <tqbuffer.h> #include <klocale.h> #include "pmpart.h" @@ -32,7 +32,7 @@ unsigned int PMParser::s_maxErrors = 30; unsigned int PMParser::s_maxWarnings = 50; -PMParser::PMParser( PMPart* part, QIODevice* dev ) +PMParser::PMParser( PMPart* part, TQIODevice* dev ) : m_okDeclares( 101 ) { m_pPart = part; @@ -42,11 +42,11 @@ PMParser::PMParser( PMPart* part, QIODevice* dev ) init( ); } -PMParser::PMParser( PMPart* part, const QByteArray& array ) +PMParser::PMParser( PMPart* part, const TQByteArray& array ) : m_okDeclares( 101 ) { m_pPart = part; - QBuffer* buffer = new QBuffer( array ); + TQBuffer* buffer = new TQBuffer( array ); buffer->open( IO_ReadOnly ); m_pDevice = buffer; m_bDeviceCreated = true; @@ -104,7 +104,7 @@ void PMParser::printMessage( const PMPMessage messageNum ) } } -void PMParser::printMessage( const QString& type, const QString& msg ) +void PMParser::printMessage( const TQString& type, const TQString& msg ) { if( m_lineNum >= 0 ) m_messages += PMMessage( i18n( "Line %1: " ).arg( m_lineNum ) + type + ": " + msg ); @@ -112,7 +112,7 @@ void PMParser::printMessage( const QString& type, const QString& msg ) m_messages += PMMessage( type + ": " + msg ); } -void PMParser::printError( const QString& msg ) +void PMParser::printError( const TQString& msg ) { if( m_errors < s_maxErrors ) { @@ -127,7 +127,7 @@ void PMParser::printError( const QString& msg ) } } -void PMParser::printWarning( const QString& msg ) +void PMParser::printWarning( const TQString& msg ) { if( m_warnings < s_maxWarnings ) { @@ -148,18 +148,18 @@ void PMParser::printExpected( const char c, const char* sValue ) .arg( c ).arg( sValue ) ); } -void PMParser::printExpected( const QString& str, const char* sValue ) +void PMParser::printExpected( const TQString& str, const char* sValue ) { printError( i18n( "'%1' expected, found token '%2' instead." ) .arg( str ).arg( sValue ) ); } -void PMParser::printUnexpected( const QString& str ) +void PMParser::printUnexpected( const TQString& str ) { printError( i18n( "Unexpected token '%1'." ).arg( str ) ); } -void PMParser::printInfo( const QString& msg ) +void PMParser::printInfo( const TQString& msg ) { printMessage( i18n( "Info" ), msg ); } @@ -230,7 +230,7 @@ void PMParser::parse( PMObjectList* list, PMObject* parent, topParse( ); - QPtrListIterator<PMSymbol> it( m_renamedObjectSymbols ); + TQPtrListIterator<PMSymbol> it( m_renamedObjectSymbols ); for( ; it.current( ); ++it ) it.current( )->setRenamedSymbol( 0 ); m_renamedObjectSymbols.clear( ); @@ -333,7 +333,7 @@ void PMParser::checkID( PMDeclare* decl ) } } -void PMParser::checkID( const QString& id, const PMValue& v ) +void PMParser::checkID( const TQString& id, const PMValue& v ) { PMSymbolTable* st = m_pPart->symbolTable( ); PMSymbol* s = m_pLocalST.find( id ); @@ -368,7 +368,7 @@ void PMParser::checkID( const QString& id, const PMValue& v ) } } -PMDeclare* PMParser::checkLink( const QString& id ) +PMDeclare* PMParser::checkLink( const TQString& id ) { PMSymbolTable* t = m_pPart->symbolTable( ); bool ok = false; @@ -423,7 +423,7 @@ PMDeclare* PMParser::checkLink( const QString& id ) return 0; } -PMSymbol* PMParser::getSymbol( const QString& id ) const +PMSymbol* PMParser::getSymbol( const TQString& id ) const { PMSymbol* s = m_pLocalST.find( id ); if( !s ) diff --git a/kpovmodeler/pmparser.h b/kpovmodeler/pmparser.h index 48250798..e72cbd60 100644 --- a/kpovmodeler/pmparser.h +++ b/kpovmodeler/pmparser.h @@ -25,20 +25,20 @@ #endif #include <kurl.h> -#include <qcstring.h> -#include <qstring.h> -#include <qstringlist.h> -#include <qvaluelist.h> -#include <qptrdict.h> -#include <qptrlist.h> +#include <tqcstring.h> +#include <tqstring.h> +#include <tqstringlist.h> +#include <tqvaluelist.h> +#include <tqptrdict.h> +#include <tqptrlist.h> #include "pmobject.h" #include "pmsymboltable.h" #include "pmvalue.h" #include "pmerrordialog.h" -class QTextStream; -class QIODevice; +class TQTextStream; +class TQIODevice; class PMScanner; class PMPart; @@ -56,11 +56,11 @@ public: /** * Parser that parses the device */ - PMParser( PMPart* part, QIODevice* device ); + PMParser( PMPart* part, TQIODevice* device ); /** * Parser that parses the byte array */ - PMParser( PMPart* part, const QByteArray& array ); + PMParser( PMPart* part, const TQByteArray& array ); /** * Deletes the parser */ @@ -70,7 +70,7 @@ public: * Quickly scans the top level objects. Appends all top level object * types to the list. */ - virtual void quickParse( QStringList& /*list*/ ) { }; + virtual void quickParse( TQStringList& /*list*/ ) { }; /** * Returns true, if the parser can quickly scan the top level objects. */ @@ -132,11 +132,11 @@ public: /** * Adds an error to the message string */ - void printError( const QString& msg ); + void printError( const TQString& msg ); /** * Adds the error "'<str>' expected, found <token> instead" to the message string */ - void printExpected( const QString& str, const char* token ); + void printExpected( const TQString& str, const char* token ); /** * Adds the error "'<c>' expected" to the message string */ @@ -144,20 +144,20 @@ public: /** * Adds the error "Unexpected token '<str>', found <token> instead" to the message string */ - void printUnexpected( const QString& str ); + void printUnexpected( const TQString& str ); /** * Adds a warning to the message string */ - void printWarning( const QString& msg ); + void printWarning( const TQString& msg ); /** * Adds an info to the message string */ - void printInfo( const QString& msg ); + void printInfo( const TQString& msg ); /** * Adds the message to the message string. Type is "error", "warning", * "info" or "scanner error" */ - void printMessage( const QString& type, const QString& msg ); + void printMessage( const TQString& type, const TQString& msg ); /** * Prints a messages that should only reported once */ @@ -177,7 +177,7 @@ public: * Returns the declare object with id, if it exists and is declared at * the current parse position, otherwise 0 */ - PMDeclare* checkLink( const QString& id ); + PMDeclare* checkLink( const TQString& id ); /** * Checks the id of the declare. If there is already a declare with * the same id, the id of the object is renamed. @@ -190,11 +190,11 @@ public: * the same id, the id of the value is renamed. * * Inserts the object into the symbol table.*/ - void checkID( const QString& id, const PMValue& v ); + void checkID( const TQString& id, const PMValue& v ); /** * Returns the symbol with id id or 0 if the id is undeclared */ - PMSymbol* getSymbol( const QString& id ) const; + PMSymbol* getSymbol( const TQString& id ) const; /** * Tries to insert obj as child of parent. If parent is 0, the object * will be inserted in the list of top level objects. @@ -229,7 +229,7 @@ protected: /** * The QIODevice */ - QIODevice* m_pDevice; + TQIODevice* m_pDevice; /** * True, if the device was created by the parser */ @@ -248,7 +248,7 @@ private: /** * A dictionary object -> message */ - QPtrDict< QPtrList<PMMessage> > m_messageDict; + TQPtrDict< TQPtrList<PMMessage> > m_messageDict; /** * Number of warnings during parsing */ @@ -281,11 +281,11 @@ private: /** * List of renamed declares */ - QPtrList<PMSymbol> m_renamedObjectSymbols; + TQPtrList<PMSymbol> m_renamedObjectSymbols; /** * Dictionary of symbol names, that can be linked */ - QDict<bool> m_okDeclares; + TQDict<bool> m_okDeclares; PMObject* m_pNextCheckDeclare; /** * Symbol table used during parsing. The symbol table of the part diff --git a/kpovmodeler/pmpart.cpp b/kpovmodeler/pmpart.cpp index c87f4719..fe0f58b4 100644 --- a/kpovmodeler/pmpart.cpp +++ b/kpovmodeler/pmpart.cpp @@ -17,18 +17,18 @@ // include files for QT -#include <qapplication.h> -#include <qdir.h> -#include <qstrlist.h> -#include <qclipboard.h> -#include <qfile.h> -#include <qtextstream.h> -#include <qmessagebox.h> -#include <qcombobox.h> -#include <qspinbox.h> -#include <qlabel.h> -#include <qdatetime.h> -#include <qstringlist.h> +#include <tqapplication.h> +#include <tqdir.h> +#include <tqstrlist.h> +#include <tqclipboard.h> +#include <tqfile.h> +#include <tqtextstream.h> +#include <tqmessagebox.h> +#include <tqcombobox.h> +#include <tqspinbox.h> +#include <tqlabel.h> +#include <tqdatetime.h> +#include <tqstringlist.h> // include files for KDE #include <kiconloader.h> @@ -94,13 +94,13 @@ #include "pmfiledialog.h" #ifdef PMEnableSimpleProfiling -QTime PMDebugTime; +TQTime PMDebugTime; #endif //#define KPM_WITH_OBJECT_LIBRARY -PMPart::PMPart( QWidget* parentWidget, const char* widgetName, - QObject* parent, const char* name, bool readwrite, +PMPart::PMPart( TQWidget* parentWidget, const char* widgetName, + TQObject* parent, const char* name, bool readwrite, PMShell* shell ) : DCOPObject( "PMPartIface" ), KParts::ReadWritePart( parent, name ), @@ -145,15 +145,15 @@ PMPart::PMPart( QWidget* parentWidget, const char* widgetName, restoreConfig( instance( )->config( ) ); - connect( qApp->clipboard( ), SIGNAL( dataChanged( ) ), - SLOT( slotClipboardDataChanged( ) ) ); + connect( qApp->clipboard( ), TQT_SIGNAL( dataChanged( ) ), + TQT_SLOT( slotClipboardDataChanged( ) ) ); slotClipboardDataChanged( ); - connect( &m_commandManager, SIGNAL( updateUndoRedo( const QString&, const QString& ) ), - SLOT( slotUpdateUndoRedo( const QString&, const QString& ) ) ); - connect( &m_commandManager, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ), - SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) ); - connect( &m_commandManager, SIGNAL( idChanged( PMObject*, const QString& ) ), - SLOT( slotIDChanged( PMObject*, const QString& ) ) ); + connect( &m_commandManager, TQT_SIGNAL( updateUndoRedo( const TQString&, const TQString& ) ), + TQT_SLOT( slotUpdateUndoRedo( const TQString&, const TQString& ) ) ); + connect( &m_commandManager, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ), + TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) ); + connect( &m_commandManager, TQT_SIGNAL( idChanged( PMObject*, const TQString& ) ), + TQT_SLOT( slotIDChanged( PMObject*, const TQString& ) ) ); PMPluginManager::theManager( )->registerPart( this ); @@ -161,8 +161,8 @@ PMPart::PMPart( QWidget* parentWidget, const char* widgetName, slotObjectChanged( m_pScene, PMCNewSelection, this ); } -PMPart::PMPart( QWidget* /*parentWidget*/, const char* /*widgetName*/, - QObject* parent, const char* name, bool readwrite, +PMPart::PMPart( TQWidget* /*parentWidget*/, const char* /*widgetName*/, + TQObject* parent, const char* name, bool readwrite, bool /*onlyCutPaste*/, PMShell* shell ) : DCOPObject( "LibraryBrowserIface" ), KParts::ReadWritePart( parent, name ), @@ -202,8 +202,8 @@ PMPart::PMPart( QWidget* /*parentWidget*/, const char* /*widgetName*/, initCopyPasteActions( ); - connect( &m_commandManager, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ), - SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) ); + connect( &m_commandManager, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ), + TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) ); PMPluginManager::theManager( )->registerPart( this ); @@ -222,13 +222,13 @@ PMPart::~PMPart( ) void PMPart::initCopyPasteActions( ) { // setup edit menu - m_pCutAction = KStdAction::cut( this, SLOT( slotEditCut( ) ), actionCollection( ) ); - m_pCopyAction = KStdAction::copy( this, SLOT( slotEditCopy( ) ), actionCollection( ) ); - m_pPasteAction = KStdAction::paste( this, SLOT( slotEditPaste( ) ), actionCollection( ) ); + m_pCutAction = KStdAction::cut( this, TQT_SLOT( slotEditCut( ) ), actionCollection( ) ); + m_pCopyAction = KStdAction::copy( this, TQT_SLOT( slotEditCopy( ) ), actionCollection( ) ); + m_pPasteAction = KStdAction::paste( this, TQT_SLOT( slotEditPaste( ) ), actionCollection( ) ); m_pDeleteAction = new KAction( i18n( "Delete" ), "edittrash", Qt::Key_Delete, - this, SLOT( slotEditDelete( ) ), + this, TQT_SLOT( slotEditDelete( ) ), actionCollection( ), "edit_delete" ); m_pCutAction->setEnabled( false ); @@ -242,311 +242,311 @@ void PMPart::initActions( ) { // file menu m_pImportAction = new KAction( i18n( "Import..." ), 0, this, - SLOT( slotFileImport( ) ), actionCollection( ), + TQT_SLOT( slotFileImport( ) ), actionCollection( ), "file_import" ); m_pExportAction = new KAction( i18n( "&Export..." ), 0, this, - SLOT( slotFileExport( ) ), actionCollection( ), + TQT_SLOT( slotFileExport( ) ), actionCollection( ), "file_export" ); initCopyPasteActions( ); m_onlyCopyPaste = false; - m_pRenderComboAction = new PMComboAction( i18n( "Render Modes" ), 0, this, SLOT( slotRenderMode( int ) ), + m_pRenderComboAction = new PMComboAction( i18n( "Render Modes" ), 0, this, TQT_SLOT( slotRenderMode( int ) ), actionCollection( ), "view_render_combo" ); m_pRenderComboAction->setMinimumWidth( 250 ); - connect( m_pRenderComboAction, SIGNAL( plugged( ) ), - SLOT( slotRenderModeActionPlugged( ) ) ); - m_pRenderAction = new KAction( i18n( "Render" ), "pmrender", 0, this, SLOT( slotRender( ) ), + connect( m_pRenderComboAction, TQT_SIGNAL( plugged( ) ), + TQT_SLOT( slotRenderModeActionPlugged( ) ) ); + m_pRenderAction = new KAction( i18n( "Render" ), "pmrender", 0, this, TQT_SLOT( slotRender( ) ), actionCollection( ), "view_render" ); - m_pRenderSettingsAction = new KAction( i18n( "Render Modes..." ), "pmrendersettings", 0, this, SLOT( slotRenderSettings( ) ), + m_pRenderSettingsAction = new KAction( i18n( "Render Modes..." ), "pmrendersettings", 0, this, TQT_SLOT( slotRenderSettings( ) ), actionCollection( ), "view_render_settings" ); - m_pViewRenderWindowAction = new KAction( i18n( "Render Window" ), 0, this, SLOT( slotViewRenderWindow( ) ), + m_pViewRenderWindowAction = new KAction( i18n( "Render Window" ), 0, this, TQT_SLOT( slotViewRenderWindow( ) ), actionCollection( ), "view_render_window" ); - m_pVisibilityLabelAction = new PMLabelAction( i18n( "Visibility level:" ) + QString( " " ), actionCollection( ), "view_visibility_label" ); + m_pVisibilityLabelAction = new PMLabelAction( i18n( "Visibility level:" ) + TQString( " " ), actionCollection( ), "view_visibility_label" ); m_pVisibilityLevelAction = new PMSpinBoxAction( i18n( "Visibility Level" ), - 0, this, SLOT( slotVisibilityLevelChanged( int ) ), + 0, this, TQT_SLOT( slotVisibilityLevelChanged( int ) ), actionCollection( ), "view_visibility_level" ); - connect( m_pVisibilityLevelAction, SIGNAL( plugged( ) ), - SLOT( slotVisibilityActionPlugged( ) ) ); + connect( m_pVisibilityLevelAction, TQT_SIGNAL( plugged( ) ), + TQT_SLOT( slotVisibilityActionPlugged( ) ) ); - m_pGlobalDetailLabelAction = new PMLabelAction( i18n( "Global detail:" ) + QString( " " ), actionCollection( ), "global_detail_label" ); + m_pGlobalDetailLabelAction = new PMLabelAction( i18n( "Global detail:" ) + TQString( " " ), actionCollection( ), "global_detail_label" ); m_pGlobalDetailAction = new KSelectAction( i18n("Global Detail Level"), KShortcut(), actionCollection(), "global_detail_level" ); - QStringList strList; + TQStringList strList; strList.append( i18n( "Very Low" ) ); strList.append( i18n( "Low" ) ); strList.append( i18n( "Medium" ) ); strList.append( i18n( "High" ) ); strList.append( i18n( "Very High" ) ); m_pGlobalDetailAction->setItems( strList ); - connect( m_pGlobalDetailAction, SIGNAL( activated( int ) ), SLOT( slotGlobalDetailLevelChanged( int ) ) ); + connect( m_pGlobalDetailAction, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotGlobalDetailLevelChanged( int ) ) ); // new objects if( isReadWrite( ) ) { - m_pNewGlobalSettingsAction = new KAction( i18n( "Global Settings" ), "pmglobalsettings", 0, this, SLOT( slotNewGlobalSettings( ) ), + m_pNewGlobalSettingsAction = new KAction( i18n( "Global Settings" ), "pmglobalsettings", 0, this, TQT_SLOT( slotNewGlobalSettings( ) ), actionCollection( ), "new_globalsettings" ); m_readWriteActions.append( m_pNewGlobalSettingsAction ); - m_pNewSkySphereAction = new KAction( i18n( "Sky Sphere" ), "pmskysphere", 0, this, SLOT( slotNewSkySphere( ) ), + m_pNewSkySphereAction = new KAction( i18n( "Sky Sphere" ), "pmskysphere", 0, this, TQT_SLOT( slotNewSkySphere( ) ), actionCollection( ), "new_skysphere" ); m_readWriteActions.append( m_pNewSkySphereAction ); - m_pNewRainbowAction = new KAction( i18n( "Rainbow" ), "pmrainbow", 0, this, SLOT( slotNewRainbow( ) ), + m_pNewRainbowAction = new KAction( i18n( "Rainbow" ), "pmrainbow", 0, this, TQT_SLOT( slotNewRainbow( ) ), actionCollection( ), "new_rainbow" ); m_readWriteActions.append( m_pNewRainbowAction ); - m_pNewFogAction = new KAction( i18n( "Fog" ), "pmfog", 0, this, SLOT( slotNewFog( ) ), + m_pNewFogAction = new KAction( i18n( "Fog" ), "pmfog", 0, this, TQT_SLOT( slotNewFog( ) ), actionCollection( ), "new_fog" ); m_readWriteActions.append( m_pNewFogAction ); - m_pNewInteriorAction = new KAction( i18n( "Interior" ), "pminterior", 0, this, SLOT( slotNewInterior( ) ), + m_pNewInteriorAction = new KAction( i18n( "Interior" ), "pminterior", 0, this, TQT_SLOT( slotNewInterior( ) ), actionCollection( ), "new_interior" ); m_readWriteActions.append( m_pNewInteriorAction ); - m_pNewMediaAction = new KAction( i18n( "Media" ), "pmmedia", 0, this, SLOT( slotNewMedia( ) ), + m_pNewMediaAction = new KAction( i18n( "Media" ), "pmmedia", 0, this, TQT_SLOT( slotNewMedia( ) ), actionCollection( ), "new_media" ); m_readWriteActions.append( m_pNewMediaAction ); - m_pNewDensityAction = new KAction( i18n( "Density" ), "pmdensity", 0, this, SLOT( slotNewDensity( ) ), + m_pNewDensityAction = new KAction( i18n( "Density" ), "pmdensity", 0, this, TQT_SLOT( slotNewDensity( ) ), actionCollection( ), "new_density" ); m_readWriteActions.append( m_pNewDensityAction ); - m_pNewMaterialAction = new KAction( i18n( "Material" ), "pmmaterial", 0, this, SLOT( slotNewMaterial( ) ), + m_pNewMaterialAction = new KAction( i18n( "Material" ), "pmmaterial", 0, this, TQT_SLOT( slotNewMaterial( ) ), actionCollection( ), "new_material" ); m_readWriteActions.append( m_pNewMaterialAction ); - m_pNewBoxAction = new KAction( i18n( "Box" ), "pmbox", 0, this, SLOT( slotNewBox( ) ), + m_pNewBoxAction = new KAction( i18n( "Box" ), "pmbox", 0, this, TQT_SLOT( slotNewBox( ) ), actionCollection( ), "new_box" ); m_readWriteActions.append( m_pNewBoxAction ); - m_pNewSphereAction = new KAction( i18n( "Sphere" ), "pmsphere", 0, this, SLOT( slotNewSphere( ) ), + m_pNewSphereAction = new KAction( i18n( "Sphere" ), "pmsphere", 0, this, TQT_SLOT( slotNewSphere( ) ), actionCollection( ), "new_sphere" ); m_readWriteActions.append( m_pNewSphereAction ); - m_pNewCylinderAction = new KAction( i18n( "Cylinder" ), "pmcylinder", 0, this, SLOT( slotNewCylinder( ) ), + m_pNewCylinderAction = new KAction( i18n( "Cylinder" ), "pmcylinder", 0, this, TQT_SLOT( slotNewCylinder( ) ), actionCollection( ), "new_cylinder" ); m_readWriteActions.append( m_pNewCylinderAction ); - m_pNewConeAction = new KAction( i18n( "Cone" ), "pmcone", 0, this, SLOT( slotNewCone( ) ), + m_pNewConeAction = new KAction( i18n( "Cone" ), "pmcone", 0, this, TQT_SLOT( slotNewCone( ) ), actionCollection( ), "new_cone" ); m_readWriteActions.append( m_pNewConeAction ); - m_pNewTorusAction = new KAction( i18n( "Torus" ), "pmtorus", 0, this, SLOT( slotNewTorus( ) ), + m_pNewTorusAction = new KAction( i18n( "Torus" ), "pmtorus", 0, this, TQT_SLOT( slotNewTorus( ) ), actionCollection( ), "new_torus" ); m_readWriteActions.append( m_pNewTorusAction ); - m_pNewLatheAction = new KAction( i18n( "Lathe" ), "pmlathe", 0, this, SLOT( slotNewLathe( ) ), + m_pNewLatheAction = new KAction( i18n( "Lathe" ), "pmlathe", 0, this, TQT_SLOT( slotNewLathe( ) ), actionCollection( ), "new_lathe" ); m_readWriteActions.append( m_pNewLatheAction ); - m_pNewPrismAction = new KAction( i18n( "Prism" ), "pmprism", 0, this, SLOT( slotNewPrism( ) ), + m_pNewPrismAction = new KAction( i18n( "Prism" ), "pmprism", 0, this, TQT_SLOT( slotNewPrism( ) ), actionCollection( ), "new_prism" ); m_readWriteActions.append( m_pNewPrismAction ); - m_pNewSurfaceOfRevolutionAction = new KAction( i18n( "Surface of Revolution" ), "pmsor", 0, this, SLOT( slotNewSurfaceOfRevolution( ) ), + m_pNewSurfaceOfRevolutionAction = new KAction( i18n( "Surface of Revolution" ), "pmsor", 0, this, TQT_SLOT( slotNewSurfaceOfRevolution( ) ), actionCollection( ), "new_surfaceofrevolution" ); m_readWriteActions.append( m_pNewSurfaceOfRevolutionAction ); - m_pNewSuperquadricEllipsoidAction = new KAction( i18n( "Superquadric Ellipsoid" ), "pmsqe", 0, this, SLOT( slotNewSuperquadricEllipsoid( ) ), + m_pNewSuperquadricEllipsoidAction = new KAction( i18n( "Superquadric Ellipsoid" ), "pmsqe", 0, this, TQT_SLOT( slotNewSuperquadricEllipsoid( ) ), actionCollection( ), "new_superquadricellipsoid" ); m_readWriteActions.append( m_pNewSuperquadricEllipsoidAction ); - m_pNewJuliaFractalAction = new KAction( i18n( "Julia Fractal" ), "pmjuliafractal", 0, this, SLOT( slotNewJuliaFractal( ) ), + m_pNewJuliaFractalAction = new KAction( i18n( "Julia Fractal" ), "pmjuliafractal", 0, this, TQT_SLOT( slotNewJuliaFractal( ) ), actionCollection( ), "new_juliafractal" ); m_readWriteActions.append( m_pNewJuliaFractalAction ); - m_pNewHeightFieldAction = new KAction( i18n( "Height Field" ), "pmheightfield", 0, this, SLOT( slotNewHeightField( ) ), + m_pNewHeightFieldAction = new KAction( i18n( "Height Field" ), "pmheightfield", 0, this, TQT_SLOT( slotNewHeightField( ) ), actionCollection( ), "new_heightfield" ); m_readWriteActions.append( m_pNewHeightFieldAction ); - m_pNewTextAction = new KAction( i18n( "Text" ), "pmtext", 0, this, SLOT( slotNewText( ) ), + m_pNewTextAction = new KAction( i18n( "Text" ), "pmtext", 0, this, TQT_SLOT( slotNewText( ) ), actionCollection( ), "new_text" ); m_readWriteActions.append( m_pNewTextAction ); - m_pNewBlobAction = new KAction( i18n( "Blob" ), "pmblob", 0, this, SLOT( slotNewBlob( ) ), + m_pNewBlobAction = new KAction( i18n( "Blob" ), "pmblob", 0, this, TQT_SLOT( slotNewBlob( ) ), actionCollection( ), "new_blob" ); m_readWriteActions.append( m_pNewBlobAction ); - m_pNewBlobSphereAction = new KAction( i18n( "Blob Sphere" ), "pmblobsphere", 0, this, SLOT( slotNewBlobSphere( ) ), + m_pNewBlobSphereAction = new KAction( i18n( "Blob Sphere" ), "pmblobsphere", 0, this, TQT_SLOT( slotNewBlobSphere( ) ), actionCollection( ), "new_blobsphere" ); m_readWriteActions.append( m_pNewBlobSphereAction ); - m_pNewBlobCylinderAction = new KAction( i18n( "Blob Cylinder" ), "pmblobcylinder", 0, this, SLOT( slotNewBlobCylinder( ) ), + m_pNewBlobCylinderAction = new KAction( i18n( "Blob Cylinder" ), "pmblobcylinder", 0, this, TQT_SLOT( slotNewBlobCylinder( ) ), actionCollection( ), "new_blobcylinder" ); m_readWriteActions.append( m_pNewBlobCylinderAction ); - m_pNewPlaneAction = new KAction( i18n( "Plane" ), "pmplane", 0, this, SLOT( slotNewPlane( ) ), + m_pNewPlaneAction = new KAction( i18n( "Plane" ), "pmplane", 0, this, TQT_SLOT( slotNewPlane( ) ), actionCollection( ), "new_plane" ); m_readWriteActions.append( m_pNewPlaneAction ); - m_pNewPolynomAction = new KAction( i18n( "Polynom" ), "pmpolynom", 0, this, SLOT( slotNewPolynom( ) ), + m_pNewPolynomAction = new KAction( i18n( "Polynom" ), "pmpolynom", 0, this, TQT_SLOT( slotNewPolynom( ) ), actionCollection( ), "new_polynom" ); m_readWriteActions.append( m_pNewPolynomAction ); - m_pNewDeclareAction = new KAction( i18n( "Declaration" ), "pmdeclare", 0, this, SLOT( slotNewDeclare( ) ), + m_pNewDeclareAction = new KAction( i18n( "Declaration" ), "pmdeclare", 0, this, TQT_SLOT( slotNewDeclare( ) ), actionCollection( ), "new_declare" ); m_readWriteActions.append( m_pNewDeclareAction ); - m_pNewObjectLinkAction = new KAction( i18n( "Object Link" ), "pmobjectlink", 0, this, SLOT( slotNewObjectLink( ) ), + m_pNewObjectLinkAction = new KAction( i18n( "Object Link" ), "pmobjectlink", 0, this, TQT_SLOT( slotNewObjectLink( ) ), actionCollection( ), "new_objectlink" ); m_readWriteActions.append( m_pNewObjectLinkAction ); - m_pNewUnionAction = new KAction( i18n( "Union" ), "pmunion", 0, this, SLOT( slotNewUnion( ) ), + m_pNewUnionAction = new KAction( i18n( "Union" ), "pmunion", 0, this, TQT_SLOT( slotNewUnion( ) ), actionCollection( ), "new_union" ); m_readWriteActions.append( m_pNewUnionAction ); - m_pNewIntersectionAction = new KAction( i18n( "Intersection" ), "pmintersection", 0, this, SLOT( slotNewIntersection( ) ), + m_pNewIntersectionAction = new KAction( i18n( "Intersection" ), "pmintersection", 0, this, TQT_SLOT( slotNewIntersection( ) ), actionCollection( ), "new_intersection" ); m_readWriteActions.append( m_pNewIntersectionAction ); - m_pNewDifferenceAction = new KAction( i18n( "Difference" ), "pmdifference", 0, this, SLOT( slotNewDifference( ) ), + m_pNewDifferenceAction = new KAction( i18n( "Difference" ), "pmdifference", 0, this, TQT_SLOT( slotNewDifference( ) ), actionCollection( ), "new_difference" ); m_readWriteActions.append( m_pNewDifferenceAction ); - m_pNewMergeAction = new KAction( i18n( "Merge" ), "pmmerge", 0, this, SLOT( slotNewMerge( ) ), + m_pNewMergeAction = new KAction( i18n( "Merge" ), "pmmerge", 0, this, TQT_SLOT( slotNewMerge( ) ), actionCollection( ), "new_merge" ); m_readWriteActions.append( m_pNewMergeAction ); - m_pNewBoundedByAction = new KAction( i18n( "Bounded By" ), "pmboundedby", 0, this, SLOT( slotNewBoundedBy( ) ), + m_pNewBoundedByAction = new KAction( i18n( "Bounded By" ), "pmboundedby", 0, this, TQT_SLOT( slotNewBoundedBy( ) ), actionCollection( ), "new_boundedby" ); m_readWriteActions.append( m_pNewBoundedByAction ); - m_pNewClippedByAction = new KAction( i18n( "Clipped By" ), "pmclippedby", 0, this, SLOT( slotNewClippedBy( ) ), + m_pNewClippedByAction = new KAction( i18n( "Clipped By" ), "pmclippedby", 0, this, TQT_SLOT( slotNewClippedBy( ) ), actionCollection( ), "new_clippedby" ); m_readWriteActions.append( m_pNewClippedByAction ); - m_pNewLightAction = new KAction( i18n( "Light" ), "pmlight", 0, this, SLOT( slotNewLight( ) ), + m_pNewLightAction = new KAction( i18n( "Light" ), "pmlight", 0, this, TQT_SLOT( slotNewLight( ) ), actionCollection( ), "new_light" ); m_readWriteActions.append( m_pNewLightAction ); - m_pNewLooksLikeAction = new KAction( i18n( "Looks Like" ), "pmlookslike", 0, this, SLOT( slotNewLooksLike( ) ), + m_pNewLooksLikeAction = new KAction( i18n( "Looks Like" ), "pmlookslike", 0, this, TQT_SLOT( slotNewLooksLike( ) ), actionCollection( ), "new_lookslike" ); m_readWriteActions.append( m_pNewLooksLikeAction ); - m_pNewProjectedThroughAction = new KAction( i18n( "Projected Through" ), "pmprojectedthrough", 0, this, SLOT( slotNewProjectedThrough( ) ), + m_pNewProjectedThroughAction = new KAction( i18n( "Projected Through" ), "pmprojectedthrough", 0, this, TQT_SLOT( slotNewProjectedThrough( ) ), actionCollection( ), "new_projectedthrough" ); m_readWriteActions.append( m_pNewProjectedThroughAction ); - m_pNewBicubicPatchAction = new KAction( i18n( "Bicubic Patch" ), "pmbicubicpatch", 0, this, SLOT( slotNewBicubicPatch( ) ), + m_pNewBicubicPatchAction = new KAction( i18n( "Bicubic Patch" ), "pmbicubicpatch", 0, this, TQT_SLOT( slotNewBicubicPatch( ) ), actionCollection( ), "new_bicubicpatch" ); m_readWriteActions.append( m_pNewBicubicPatchAction ); - m_pNewDiscAction = new KAction( i18n( "Disc" ), "pmdisc", 0, this, SLOT( slotNewDisc( ) ), + m_pNewDiscAction = new KAction( i18n( "Disc" ), "pmdisc", 0, this, TQT_SLOT( slotNewDisc( ) ), actionCollection( ), "new_disc" ); m_readWriteActions.append( m_pNewDiscAction ); - m_pNewTriangleAction = new KAction( i18n( "Triangle" ), "pmtriangle", 0, this, SLOT( slotNewTriangle( ) ), + m_pNewTriangleAction = new KAction( i18n( "Triangle" ), "pmtriangle", 0, this, TQT_SLOT( slotNewTriangle( ) ), actionCollection( ), "new_triangle" ); m_readWriteActions.append( m_pNewTriangleAction ); - m_pNewCameraAction = new KAction( i18n( "Camera" ), "pmcamera", 0, this, SLOT( slotNewCamera( ) ), + m_pNewCameraAction = new KAction( i18n( "Camera" ), "pmcamera", 0, this, TQT_SLOT( slotNewCamera( ) ), actionCollection( ), "new_camera" ); m_readWriteActions.append( m_pNewCameraAction ); - m_pNewTextureAction = new KAction( i18n( "Texture" ), "pmtexture", 0, this, SLOT( slotNewTexture( ) ), + m_pNewTextureAction = new KAction( i18n( "Texture" ), "pmtexture", 0, this, TQT_SLOT( slotNewTexture( ) ), actionCollection( ), "new_texture" ); m_readWriteActions.append( m_pNewTextureAction ); - m_pNewPigmentAction = new KAction( i18n( "Pigment" ), "pmpigment", 0, this, SLOT( slotNewPigment( ) ), + m_pNewPigmentAction = new KAction( i18n( "Pigment" ), "pmpigment", 0, this, TQT_SLOT( slotNewPigment( ) ), actionCollection( ), "new_pigment" ); m_readWriteActions.append( m_pNewPigmentAction ); - m_pNewNormalAction = new KAction( i18n( "Normal" ), "pmnormal", 0, this, SLOT( slotNewNormal( ) ), + m_pNewNormalAction = new KAction( i18n( "Normal" ), "pmnormal", 0, this, TQT_SLOT( slotNewNormal( ) ), actionCollection( ), "new_normal" ); m_readWriteActions.append( m_pNewNormalAction ); - m_pNewSolidColorAction = new KAction( i18n( "Solid Color" ), "pmsolidcolor", 0, this, SLOT( slotNewSolidColor( ) ), + m_pNewSolidColorAction = new KAction( i18n( "Solid Color" ), "pmsolidcolor", 0, this, TQT_SLOT( slotNewSolidColor( ) ), actionCollection( ), "new_solidcolor" ); m_readWriteActions.append( m_pNewSolidColorAction ); - m_pNewTextureListAction = new KAction( i18n( "Texture List" ), "pmtexturelist", 0, this, SLOT( slotNewTextureList( ) ), + m_pNewTextureListAction = new KAction( i18n( "Texture List" ), "pmtexturelist", 0, this, TQT_SLOT( slotNewTextureList( ) ), actionCollection( ), "new_texturelist" ); m_readWriteActions.append( m_pNewTextureListAction ); - m_pNewColorListAction = new KAction( i18n( "Color List" ), "pmcolorlist", 0, this, SLOT( slotNewColorList( ) ), + m_pNewColorListAction = new KAction( i18n( "Color List" ), "pmcolorlist", 0, this, TQT_SLOT( slotNewColorList( ) ), actionCollection( ), "new_colorlist" ); m_readWriteActions.append( m_pNewColorListAction ); - m_pNewPigmentListAction = new KAction( i18n( "Pigment List" ), "pmpigmentlist", 0, this, SLOT( slotNewPigmentList( ) ), + m_pNewPigmentListAction = new KAction( i18n( "Pigment List" ), "pmpigmentlist", 0, this, TQT_SLOT( slotNewPigmentList( ) ), actionCollection( ), "new_pigmentlist" ); m_readWriteActions.append( m_pNewPigmentListAction ); - m_pNewNormalListAction = new KAction( i18n( "Normal List" ), "pmnormallist", 0, this, SLOT( slotNewNormalList( ) ), + m_pNewNormalListAction = new KAction( i18n( "Normal List" ), "pmnormallist", 0, this, TQT_SLOT( slotNewNormalList( ) ), actionCollection( ), "new_normallist" ); m_readWriteActions.append( m_pNewNormalListAction ); - m_pNewDensityListAction = new KAction( i18n( "Density List" ), "pmdensitylist", 0, this, SLOT( slotNewDensityList( ) ), + m_pNewDensityListAction = new KAction( i18n( "Density List" ), "pmdensitylist", 0, this, TQT_SLOT( slotNewDensityList( ) ), actionCollection( ), "new_densitylist" ); m_readWriteActions.append( m_pNewDensityListAction ); - m_pNewFinishAction = new KAction( i18n( "Finish" ), "pmfinish", 0, this, SLOT( slotNewFinish( ) ), + m_pNewFinishAction = new KAction( i18n( "Finish" ), "pmfinish", 0, this, TQT_SLOT( slotNewFinish( ) ), actionCollection( ), "new_finish" ); m_readWriteActions.append( m_pNewFinishAction ); - m_pNewPatternAction = new KAction( i18n( "Pattern" ), "pmpattern", 0, this, SLOT( slotNewPattern( ) ), + m_pNewPatternAction = new KAction( i18n( "Pattern" ), "pmpattern", 0, this, TQT_SLOT( slotNewPattern( ) ), actionCollection( ), "new_pattern" ); m_readWriteActions.append( m_pNewPatternAction ); - m_pNewBlendMapModifiersAction = new KAction( i18n( "Blend Map Modifiers" ), "pmblendmapmodifiers", 0, this, SLOT( slotNewBlendMapModifiers( ) ), + m_pNewBlendMapModifiersAction = new KAction( i18n( "Blend Map Modifiers" ), "pmblendmapmodifiers", 0, this, TQT_SLOT( slotNewBlendMapModifiers( ) ), actionCollection( ), "new_blendmapmodifiers" ); m_readWriteActions.append( m_pNewBlendMapModifiersAction ); - m_pNewTextureMapAction = new KAction( i18n( "Texture Map" ), "pmtexturemap", 0, this, SLOT( slotNewTextureMap( ) ), + m_pNewTextureMapAction = new KAction( i18n( "Texture Map" ), "pmtexturemap", 0, this, TQT_SLOT( slotNewTextureMap( ) ), actionCollection( ), "new_texturemap" ); m_readWriteActions.append( m_pNewTextureMapAction ); - m_pNewMaterialMapAction = new KAction( i18n( "Material Map" ), "pmmaterialmap", 0, this, SLOT( slotNewMaterialMap( ) ), + m_pNewMaterialMapAction = new KAction( i18n( "Material Map" ), "pmmaterialmap", 0, this, TQT_SLOT( slotNewMaterialMap( ) ), actionCollection( ), "new_materialmap" ); m_readWriteActions.append( m_pNewMaterialMapAction ); - m_pNewPigmentMapAction = new KAction( i18n( "Pigment Map" ), "pmpigmentmap", 0, this, SLOT( slotNewPigmentMap( ) ), + m_pNewPigmentMapAction = new KAction( i18n( "Pigment Map" ), "pmpigmentmap", 0, this, TQT_SLOT( slotNewPigmentMap( ) ), actionCollection( ), "new_pigmentmap" ); m_readWriteActions.append( m_pNewPigmentMapAction ); - m_pNewColorMapAction = new KAction( i18n( "Color Map" ), "pmcolormap", 0, this, SLOT( slotNewColorMap( ) ), + m_pNewColorMapAction = new KAction( i18n( "Color Map" ), "pmcolormap", 0, this, TQT_SLOT( slotNewColorMap( ) ), actionCollection( ), "new_colormap" ); m_readWriteActions.append( m_pNewColorMapAction ); - m_pNewNormalMapAction = new KAction( i18n( "Normal Map" ), "pmnormalmap", 0, this, SLOT( slotNewNormalMap( ) ), + m_pNewNormalMapAction = new KAction( i18n( "Normal Map" ), "pmnormalmap", 0, this, TQT_SLOT( slotNewNormalMap( ) ), actionCollection( ), "new_normalmap" ); m_readWriteActions.append( m_pNewNormalMapAction ); - m_pNewBumpMapAction = new KAction( i18n( "Bump Map" ), "pmbumpmap", 0, this, SLOT( slotNewBumpMap( ) ), + m_pNewBumpMapAction = new KAction( i18n( "Bump Map" ), "pmbumpmap", 0, this, TQT_SLOT( slotNewBumpMap( ) ), actionCollection( ), "new_bumpmap" ); m_readWriteActions.append( m_pNewBumpMapAction ); - m_pNewSlopeMapAction = new KAction( i18n( "Slope Map" ), "pmslopemap", 0, this, SLOT( slotNewSlopeMap( ) ), + m_pNewSlopeMapAction = new KAction( i18n( "Slope Map" ), "pmslopemap", 0, this, TQT_SLOT( slotNewSlopeMap( ) ), actionCollection( ), "new_slopemap" ); m_readWriteActions.append( m_pNewSlopeMapAction ); - m_pNewDensityMapAction = new KAction( i18n( "Density Map" ), "pmdensitymap", 0, this, SLOT( slotNewDensityMap( ) ), + m_pNewDensityMapAction = new KAction( i18n( "Density Map" ), "pmdensitymap", 0, this, TQT_SLOT( slotNewDensityMap( ) ), actionCollection( ), "new_densitymap" ); m_readWriteActions.append( m_pNewDensityMapAction ); - m_pNewSlopeAction = new KAction( i18n( "Slope" ), "pmslope", 0, this, SLOT( slotNewSlope( ) ), + m_pNewSlopeAction = new KAction( i18n( "Slope" ), "pmslope", 0, this, TQT_SLOT( slotNewSlope( ) ), actionCollection( ), "new_slope" ); m_readWriteActions.append( m_pNewSlopeAction ); - m_pNewWarpAction = new KAction( i18n( "Warp" ), "pmwarp", 0, this, SLOT( slotNewWarp( ) ), + m_pNewWarpAction = new KAction( i18n( "Warp" ), "pmwarp", 0, this, TQT_SLOT( slotNewWarp( ) ), actionCollection( ), "new_warp" ); m_readWriteActions.append( m_pNewWarpAction ); - m_pNewImageMapAction = new KAction( i18n( "Image Map" ), "pmimagemap", 0, this, SLOT( slotNewImageMap( ) ), + m_pNewImageMapAction = new KAction( i18n( "Image Map" ), "pmimagemap", 0, this, TQT_SLOT( slotNewImageMap( ) ), actionCollection( ), "new_imagemap" ); m_readWriteActions.append( m_pNewImageMapAction ); - m_pNewQuickColorAction = new KAction( i18n( "QuickColor" ), "pmquickcolor", 0, this, SLOT( slotNewQuickColor( ) ), + m_pNewQuickColorAction = new KAction( i18n( "QuickColor" ), "pmquickcolor", 0, this, TQT_SLOT( slotNewQuickColor( ) ), actionCollection( ), "new_quickcolor" ); m_readWriteActions.append( m_pNewQuickColorAction ); - m_pNewTranslateAction = new KAction( i18n( "Translate" ), "pmtranslate", 0, this, SLOT( slotNewTranslate( ) ), + m_pNewTranslateAction = new KAction( i18n( "Translate" ), "pmtranslate", 0, this, TQT_SLOT( slotNewTranslate( ) ), actionCollection( ), "new_translate" ); m_readWriteActions.append( m_pNewTranslateAction ); - m_pNewScaleAction = new KAction( i18n( "Scale" ), "pmscale", 0, this, SLOT( slotNewScale( ) ), + m_pNewScaleAction = new KAction( i18n( "Scale" ), "pmscale", 0, this, TQT_SLOT( slotNewScale( ) ), actionCollection( ), "new_scale" ); m_readWriteActions.append( m_pNewScaleAction ); - m_pNewRotateAction = new KAction( i18n( "Rotate" ), "pmrotate", 0, this, SLOT( slotNewRotate( ) ), + m_pNewRotateAction = new KAction( i18n( "Rotate" ), "pmrotate", 0, this, TQT_SLOT( slotNewRotate( ) ), actionCollection( ), "new_rotate" ); m_readWriteActions.append( m_pNewRotateAction ); - m_pNewMatrixAction = new KAction( i18n( "Matrix" ), "pmmatrix", 0, this, SLOT( slotNewMatrix( ) ), + m_pNewMatrixAction = new KAction( i18n( "Matrix" ), "pmmatrix", 0, this, TQT_SLOT( slotNewMatrix( ) ), actionCollection( ), "new_povraymatrix" ); m_readWriteActions.append( m_pNewMatrixAction ); - m_pNewCommentAction = new KAction( i18n( "Comment" ), "pmcomment", 0, this, SLOT( slotNewComment( ) ), + m_pNewCommentAction = new KAction( i18n( "Comment" ), "pmcomment", 0, this, TQT_SLOT( slotNewComment( ) ), actionCollection( ), "new_comment" ); m_readWriteActions.append( m_pNewCommentAction ); - m_pNewRawAction = new KAction( i18n( "Raw Povray" ), "pmraw", 0, this, SLOT( slotNewRaw( ) ), + m_pNewRawAction = new KAction( i18n( "Raw Povray" ), "pmraw", 0, this, TQT_SLOT( slotNewRaw( ) ), actionCollection( ), "new_raw" ); m_readWriteActions.append( m_pNewRawAction ); // POV-Ray 3.5 objects - m_pNewIsoSurfaceAction = new KAction( i18n( "Iso Surface" ), "pmisosurface", 0, this, SLOT( slotNewIsoSurface( ) ), + m_pNewIsoSurfaceAction = new KAction( i18n( "Iso Surface" ), "pmisosurface", 0, this, TQT_SLOT( slotNewIsoSurface( ) ), actionCollection( ), "new_isosurface" ); m_readWriteActions.append( m_pNewIsoSurfaceAction ); - m_pNewRadiosityAction = new KAction( i18n( "Radiosity" ), "pmradiosity", 0, this, SLOT( slotNewRadiosity( ) ), + m_pNewRadiosityAction = new KAction( i18n( "Radiosity" ), "pmradiosity", 0, this, TQT_SLOT( slotNewRadiosity( ) ), actionCollection( ), "new_radiosity" ); m_readWriteActions.append( m_pNewRadiosityAction ); - m_pNewGlobalPhotonsAction = new KAction( i18n( "Global Photons" ), "pmglobalphotons", 0, this, SLOT( slotNewGlobalPhotons( ) ), + m_pNewGlobalPhotonsAction = new KAction( i18n( "Global Photons" ), "pmglobalphotons", 0, this, TQT_SLOT( slotNewGlobalPhotons( ) ), actionCollection( ), "new_globalphotons" ); m_readWriteActions.append( m_pNewGlobalPhotonsAction ); - m_pNewPhotonsAction = new KAction( i18n( "Photons" ), "pmphotons", 0, this, SLOT( slotNewPhotons( ) ), + m_pNewPhotonsAction = new KAction( i18n( "Photons" ), "pmphotons", 0, this, TQT_SLOT( slotNewPhotons( ) ), actionCollection( ), "new_photons" ); m_readWriteActions.append( m_pNewPhotonsAction ); - m_pNewLightGroupAction = new KAction( i18n( "Light Group" ), "pmlightgroup", 0, this, SLOT( slotNewLightGroup( ) ), + m_pNewLightGroupAction = new KAction( i18n( "Light Group" ), "pmlightgroup", 0, this, TQT_SLOT( slotNewLightGroup( ) ), actionCollection( ), "new_lightgroup" ); m_readWriteActions.append( m_pNewLightGroupAction ); - m_pNewInteriorTextureAction = new KAction( i18n( "Interior Texture" ), "pminteriortexture", 0, this, SLOT( slotNewInteriorTexture( ) ), + m_pNewInteriorTextureAction = new KAction( i18n( "Interior Texture" ), "pminteriortexture", 0, this, TQT_SLOT( slotNewInteriorTexture( ) ), actionCollection( ), "new_interiortexture" ); m_readWriteActions.append( m_pNewInteriorTextureAction ); - m_pNewSphereSweepAction = new KAction( i18n( "Sphere Sweep" ), "pmspheresweep", 0, this, SLOT( slotNewSphereSweep( ) ), + m_pNewSphereSweepAction = new KAction( i18n( "Sphere Sweep" ), "pmspheresweep", 0, this, TQT_SLOT( slotNewSphereSweep( ) ), actionCollection( ), "new_spheresweep" ); m_readWriteActions.append( m_pNewSphereSweepAction ); - m_pNewMeshAction = new KAction( i18n( "Mesh" ), "pmmesh", 0, this, SLOT( slotNewMesh( ) ), + m_pNewMeshAction = new KAction( i18n( "Mesh" ), "pmmesh", 0, this, TQT_SLOT( slotNewMesh( ) ), actionCollection( ), "new_mesh" ); m_readWriteActions.append( m_pNewMeshAction ); #ifdef KPM_WITH_OBJECT_LIBRARY - m_pSearchLibraryObjectAction = new KAction( i18n( "Search Object" ), "pmsearchlibrary", 0, this, SLOT( slotSearchLibraryObject( ) ), + m_pSearchLibraryObjectAction = new KAction( i18n( "Search Object" ), "pmsearchlibrary", 0, this, TQT_SLOT( slotSearchLibraryObject( ) ), actionCollection( ), "search_library_object" ); m_readWriteActions.append( m_pSearchLibraryObjectAction ); #endif - m_pUndoAction = KStdAction::undo( this, SLOT( slotEditUndo( ) ), actionCollection( ) ); - m_pRedoAction = KStdAction::redo( this, SLOT( slotEditRedo( ) ), actionCollection( ) ); + m_pUndoAction = KStdAction::undo( this, TQT_SLOT( slotEditUndo( ) ), actionCollection( ) ); + m_pRedoAction = KStdAction::redo( this, TQT_SLOT( slotEditRedo( ) ), actionCollection( ) ); m_pUndoAction->setEnabled( false ); m_pRedoAction->setEnabled( false ); } @@ -655,7 +655,7 @@ void PMPart::updateNewObjectActions( ) { if( isReadWrite( ) && !m_onlyCopyPaste ) { - QPtrListIterator<PMMetaObject> it = + TQPtrListIterator<PMMetaObject> it = m_pPrototypeManager->prototypeIterator( ); KAction* action; bool enable; @@ -672,13 +672,13 @@ void PMPart::updateNewObjectActions( ) // action names are "new_" + povray name // (like new_box, new_sphere ...) - QString actionName = "new_" + it.current( )->className( ).lower( ); + TQString actionName = "new_" + it.current( )->className( ).lower( ); action = actionCollection( )->action( actionName.latin1( ) ); if( action ) { if( m_pActiveObject ) { - QString insertName = it.current( )->className( ); + TQString insertName = it.current( )->className( ); enable = m_pActiveObject->canInsert( insertName, 0 ); if( !enable ) if( m_pActiveObject->lastChild( ) ) @@ -695,13 +695,13 @@ void PMPart::updateNewObjectActions( ) // special treatment for csg actions if( m_pActiveObject ) { - enable = m_pActiveObject->canInsert( QString( "CSG" ), 0 ); + enable = m_pActiveObject->canInsert( TQString( "CSG" ), 0 ); if( !enable ) if( m_pActiveObject->lastChild( ) ) - enable = m_pActiveObject->canInsert( QString( "CSG" ), m_pActiveObject->lastChild( ) ); + enable = m_pActiveObject->canInsert( TQString( "CSG" ), m_pActiveObject->lastChild( ) ); if( !enable ) if( readWriteParent ) - enable = m_pActiveObject->parent( )->canInsert( QString( "CSG" ), m_pActiveObject ); + enable = m_pActiveObject->parent( )->canInsert( TQString( "CSG" ), m_pActiveObject ); } else enable = false; @@ -715,7 +715,7 @@ void PMPart::updateNewObjectActions( ) void PMPart::disableReadWriteActions( ) { - QPtrListIterator<KAction> it( m_readWriteActions); + TQPtrListIterator<KAction> it( m_readWriteActions); for( ; it.current( ); ++it ) it.current( )->setEnabled( false ); } @@ -725,7 +725,7 @@ void PMPart::initDocument( ) newDocument( ); } -void PMPart::initView( QWidget* parent, const char* name ) +void PMPart::initView( TQWidget* parent, const char* name ) { if( !m_pShell ) { @@ -838,7 +838,7 @@ void PMPart::restoreConfig( KConfig* cfg ) bool PMPart::openFile( ) { - QIODevice* dev = KFilterDev::deviceForFile( m_file, "application/x-gzip" ); + TQIODevice* dev = KFilterDev::deviceForFile( m_file, "application/x-gzip" ); bool success = true; PMObjectList list; @@ -856,7 +856,7 @@ bool PMPart::openFile( ) { PMErrorDialog dlg( parser.messages( ), parser.errorFlags( ) ); // still try to insert the correct parsed objects? - success = ( dlg.exec( ) == QDialog::Accepted ); + success = ( dlg.exec( ) == TQDialog::Accepted ); } if( success ) { @@ -901,14 +901,14 @@ bool PMPart::saveFile( ) { bool success = false; - QIODevice* dev = KFilterDev::deviceForFile( m_file, "application/x-gzip" ); + TQIODevice* dev = KFilterDev::deviceForFile( m_file, "application/x-gzip" ); if( dev && dev->open( IO_WriteOnly ) ) { - QDomDocument doc( "KPOVMODELER" ); - QDomElement e = ( ( PMObject* )m_pScene)->serialize( doc ); + TQDomDocument doc( "KPOVMODELER" ); + TQDomElement e = ( ( PMObject* )m_pScene)->serialize( doc ); doc.appendChild( e ); - QTextStream str( dev ); + TQTextStream str( dev ); str << doc; dev->close( ); setModified( false ); @@ -924,7 +924,7 @@ bool PMPart::saveFile( ) bool PMPart::exportPovray( const KURL& url ) { KTempFile* tempFile = 0; - QFile* file = 0; + TQFile* file = 0; bool ok = true; if( !url.isValid( ) ) @@ -933,7 +933,7 @@ bool PMPart::exportPovray( const KURL& url ) if( url.isLocalFile( ) ) { // Local file - file = new QFile( url.path( ) ); + file = new TQFile( url.path( ) ); if( !file->open( IO_WriteOnly ) ) ok = false; } @@ -958,7 +958,7 @@ bool PMPart::exportPovray( const KURL& url ) if( tempFile ) { tempFile->close( ); - ok = KIO::NetAccess::upload( tempFile->name( ), url, (QWidget*) 0 ); + ok = KIO::NetAccess::upload( tempFile->name( ), url, (TQWidget*) 0 ); tempFile->unlink( ); file = 0; } @@ -972,9 +972,9 @@ bool PMPart::exportPovray( const KURL& url ) return ok; } -QString PMPart::activeObjectName( ) +TQString PMPart::activeObjectName( ) { - QString result = ""; + TQString result = ""; PMObject* tmpObj; PMObject* testSib; int idx = 0; @@ -990,7 +990,7 @@ QString PMPart::activeObjectName( ) // prepend to result if( idx != 0 ) - result = tmpObj->type( ) + "[" + QString::number( idx ) + "]/" + result; + result = tmpObj->type( ) + "[" + TQString::number( idx ) + "]/" + result; else result = tmpObj->type( ) + "/" + result; @@ -1005,13 +1005,13 @@ QString PMPart::activeObjectName( ) return result; } -bool PMPart::setActiveObject( const QString& name ) +bool PMPart::setActiveObject( const TQString& name ) { PMObject* tmpObj; PMObject* tmpSibling; int pos, siblingIndex, objIndex, firstBracket, lastBracket; - QString objPath; - QString pathElem; + TQString objPath; + TQString pathElem; // check if it's a absolute object name if( name[0] == '/' ) @@ -1032,7 +1032,7 @@ bool PMPart::setActiveObject( const QString& name ) else { pathElem = objPath; - objPath = QString::null; + objPath = TQString::null; } while( !pathElem.isNull( ) ) @@ -1079,7 +1079,7 @@ bool PMPart::setActiveObject( const QString& name ) else { pathElem = objPath; - objPath = QString::null; + objPath = TQString::null; } } if( tmpObj ) @@ -1091,18 +1091,18 @@ bool PMPart::setActiveObject( const QString& name ) return false; } -QStringList PMPart::getProperties( ) +TQStringList PMPart::getProperties( ) { PMObject* curObj = activeObject( ); // Ensure that there is an active object if( !curObj ) - return QStringList( ); + return TQStringList( ); return curObj->properties( ); } -bool PMPart::setProperty( const QString& name, const PMVariant& value ) +bool PMPart::setProperty( const TQString& name, const PMVariant& value ) { PMObject* curObj = activeObject( ); @@ -1115,7 +1115,7 @@ bool PMPart::setProperty( const QString& name, const PMVariant& value ) return true; } -bool PMPart::setProperty( const QString& name, const QString& value ) +bool PMPart::setProperty( const TQString& name, const TQString& value ) { PMObject* curObj = activeObject( ); PMVariant variant; @@ -1130,7 +1130,7 @@ bool PMPart::setProperty( const QString& name, const QString& value ) return true; } -const PMVariant PMPart::getProperty( const QString& name ) +const PMVariant PMPart::getProperty( const TQString& name ) { PMObject* curObj = activeObject( ); @@ -1141,7 +1141,7 @@ const PMVariant PMPart::getProperty( const QString& name ) return curObj->property( name ); } -const QString PMPart::getPropertyStr( const QString& name ) +const TQString PMPart::getPropertyStr( const TQString& name ) { PMObject* curObj = activeObject( ); @@ -1159,7 +1159,7 @@ const PMObjectList& PMPart::selectedObjects( ) bool stop = false; PMObject* tmp; - QPtrStack<PMObject> stack; + TQPtrStack<PMObject> stack; if( !m_sortedListUpToDate ) { @@ -1212,7 +1212,7 @@ const PMObjectList& PMPart::selectedObjects( ) int PMPart::whereToInsert( PMObject* obj, const PMObjectList& list ) { // if you change this function, change - // whereToInsert( PMObject* obj, const QStringList& ), too + // whereToInsert( PMObject* obj, const TQStringList& ), too int canInsertAsFirstChild = 0; int canInsertAsLastChild = 0; @@ -1270,7 +1270,7 @@ int PMPart::whereToInsert( PMObject* obj, const PMObjectList& list ) return insertAs; } -int PMPart::whereToInsert( PMObject* obj, const QStringList& list ) +int PMPart::whereToInsert( PMObject* obj, const TQStringList& list ) { // if you change this function, change // whereToInsert( PMObject* obj, const PMObjectList ), too @@ -1359,14 +1359,14 @@ int PMPart::whereToInsert( PMObject* obj ) void PMPart::slotFileImport( ) { - QString fileName; + TQString fileName; PMIOFormat* selectedFormat = 0; fileName = PMFileDialog::getImportFileName( 0, this, selectedFormat ); if( !fileName.isEmpty( ) && selectedFormat ) { - QFile file( fileName ); + TQFile file( fileName ); if( file.open( IO_ReadOnly ) ) { PMParser* newParser = selectedFormat->newParser( this, &file ); @@ -1393,15 +1393,15 @@ void PMPart::slotFileExport( ) { emit aboutToSave( ); - QString fileName, filter; + TQString fileName, filter; PMIOFormat* selectedFormat = 0; fileName = PMFileDialog::getExportFileName( 0, this, selectedFormat, filter ); if( !fileName.isEmpty( ) && selectedFormat ) { - QByteArray baData; - QBuffer buffer( baData ); + TQByteArray baData; + TQBuffer buffer( baData ); buffer.open( IO_WriteOnly ); PMSerializer* newSer = selectedFormat->newSerializer( &buffer ); @@ -1416,15 +1416,15 @@ void PMPart::slotFileExport( ) // there were errors, display them PMErrorDialog dlg( newSer->messages( ), newSer->errorFlags( ) ); // still try to export? - success = ( dlg.exec( ) == QDialog::Accepted ); + success = ( dlg.exec( ) == TQDialog::Accepted ); } if( success ) { - QFileInfo info( fileName ); + TQFileInfo info( fileName ); if( info.extension( ).isEmpty( ) ) fileName += filter.right( filter.length( ) - 1 ); // remove '*' - QFile file( fileName ); + TQFile file( fileName ); if( file.open( IO_WriteOnly ) ) { file.writeBlock( baData ); @@ -1450,7 +1450,7 @@ void PMPart::slotEditCut( ) if( sortedList.count( ) > 0 ) { - QApplication::clipboard( )->setData( new PMObjectDrag( this, sortedList ) ); + TQApplication::clipboard( )->setData( new PMObjectDrag( this, sortedList ) ); removeSelection( i18n( "Cut" ) ); } @@ -1472,7 +1472,7 @@ void PMPart::slotEditCopy( ) const PMObjectList& sortedList = selectedObjects( ); if( sortedList.count( ) > 0 ) - QApplication::clipboard( )->setData( new PMObjectDrag( this, sortedList ) ); + TQApplication::clipboard( )->setData( new PMObjectDrag( this, sortedList ) ); emit setStatusBarText( "" ); } @@ -1526,7 +1526,7 @@ bool PMPart::dragMoveSelectionTo( PMObject* obj ) return false; } -bool PMPart::removeSelection( const QString& type ) +bool PMPart::removeSelection( const TQString& type ) { PMDeleteCommand* cmd = 0; const PMObjectList& sortedList = selectedObjects( ); @@ -1540,7 +1540,7 @@ bool PMPart::removeSelection( const QString& type ) return false; } -bool PMPart::drop( PMObject* obj, QMimeSource* mime ) +bool PMPart::drop( PMObject* obj, TQMimeSource* mime ) { return pasteOrDrop( i18n( "Drop" ), mime, obj ); } @@ -1555,7 +1555,7 @@ void PMPart::slotEditPaste( ) emit setStatusBarText( "" ); } -bool PMPart::pasteOrDrop( const QString& type, QMimeSource* mime, PMObject* obj ) +bool PMPart::pasteOrDrop( const TQString& type, TQMimeSource* mime, PMObject* obj ) { bool success = false; @@ -1569,7 +1569,7 @@ bool PMPart::pasteOrDrop( const QString& type, QMimeSource* mime, PMObject* obj return success; } -bool PMPart::insertFromParser( const QString& type, PMParser* parser, +bool PMPart::insertFromParser( const TQString& type, PMParser* parser, PMObject* obj ) { PMObjectList list; @@ -1580,7 +1580,7 @@ bool PMPart::insertFromParser( const QString& type, PMParser* parser, // try to parse if( parser->canQuickParse( ) ) { - QStringList types; + TQStringList types; parser->quickParse( types ); success = !( parser->warnings( ) || parser->errors( ) ); @@ -1590,7 +1590,7 @@ bool PMPart::insertFromParser( const QString& type, PMParser* parser, // there were errors, display them PMErrorDialog dlg( parser->messages( ), parser->errorFlags( ) ); // still try to insert the correct parsed objects? - success = ( dlg.exec( ) == QDialog::Accepted ); + success = ( dlg.exec( ) == TQDialog::Accepted ); } if( success && ( types.count( ) > 0 ) ) insertAs = whereToInsert( obj, types ); @@ -1631,7 +1631,7 @@ bool PMPart::insertFromParser( const QString& type, PMParser* parser, // there were errors, display them PMErrorDialog dlg( parser->messages( ), parser->errorFlags( ) ); // still try to insert the correct parsed objects? - success = ( dlg.exec( ) == QDialog::Accepted ); + success = ( dlg.exec( ) == TQDialog::Accepted ); } if( list.count( ) > 0 ) @@ -1725,7 +1725,7 @@ bool PMPart::executeCommand( PMCommand* cmd ) if( flags ) { PMErrorDialog dlg( cmd->messages( ), flags ); - execute = ( dlg.exec( ) == QDialog::Accepted ); + execute = ( dlg.exec( ) == TQDialog::Accepted ); } if( execute ) @@ -1755,7 +1755,7 @@ bool PMPart::executeCommand( PMCommand* cmd ) } void PMPart::slotObjectChanged( PMObject* obj, const int m, - QObject* sender ) + TQObject* sender ) { int mode = m; bool selectionChanged = false; @@ -1785,7 +1785,7 @@ void PMPart::slotObjectChanged( PMObject* obj, const int m, { if( obj->selectedChildren( ) > 0 ) { - QPtrStack<PMObject> stack; + TQPtrStack<PMObject> stack; PMObject* tmp = obj->firstChild( ); bool stop = false; @@ -1930,8 +1930,8 @@ void PMPart::slotObjectChanged( PMObject* obj, const int m, if( mode & PMCInsertError ) { m_numInsertErrors++; - QString detail; - detail = obj->description( ) + QString( " " ) + obj->name( ); + TQString detail; + detail = obj->description( ) + TQString( " " ) + obj->name( ); m_insertErrorDetails.append( detail ); if( obj->isA( "Declare" ) ) @@ -1972,7 +1972,7 @@ void PMPart::slotObjectChanged( PMObject* obj, const int m, emit objectChanged( obj, mode, sender ); } -void PMPart::slotIDChanged( PMObject* obj, const QString& oldID ) +void PMPart::slotIDChanged( PMObject* obj, const TQString& oldID ) { if( obj->isA( "Declare" ) ) { @@ -2050,14 +2050,14 @@ void PMPart::slotNewObject( PMObject* newObject, int insertAs ) } } -void PMPart::slotNewObject( const QString& type ) +void PMPart::slotNewObject( const TQString& type ) { PMObject* newObject = m_pPrototypeManager->newObject( type ); if( newObject ) slotNewObject( newObject ); } -void PMPart::slotNewObject( const QString& type, const QString& pos ) +void PMPart::slotNewObject( const TQString& type, const TQString& pos ) { PMObject* newObject = m_pPrototypeManager->newObject( type ); if( newObject ) @@ -2073,10 +2073,10 @@ void PMPart::slotNewObject( const QString& type, const QString& pos ) } } -QStringList PMPart::getObjectTypes( ) +TQStringList PMPart::getObjectTypes( ) { - QStringList result; - QPtrListIterator<PMMetaObject> it = m_pPrototypeManager->prototypeIterator( ); + TQStringList result; + TQPtrListIterator<PMMetaObject> it = m_pPrototypeManager->prototypeIterator( ); for( ; it.current( ); ++it ) { @@ -2089,11 +2089,11 @@ void PMPart::slotNewTransformedObject( PMObject* o ) { if( o ) { - if( o->canInsert( QString( "Scale" ), o->lastChild( ) ) ) + if( o->canInsert( TQString( "Scale" ), o->lastChild( ) ) ) o->appendChild( new PMScale( this ) ); - if( o->canInsert( QString( "Rotate" ), o->lastChild( ) ) ) + if( o->canInsert( TQString( "Rotate" ), o->lastChild( ) ) ) o->appendChild( new PMRotate( this ) ); - if( o->canInsert( QString( "Translate" ), o->lastChild( ) ) ) + if( o->canInsert( TQString( "Translate" ), o->lastChild( ) ) ) o->appendChild( new PMTranslate( this ) ); slotNewObject( o ); } @@ -2625,7 +2625,7 @@ void PMPart::deleteContents( ) m_bCameraListUpToDate = true; } -void PMPart::slotUpdateUndoRedo( const QString& undo, const QString& redo ) +void PMPart::slotUpdateUndoRedo( const TQString& undo, const TQString& redo ) { if( isReadWrite( ) ) { @@ -2685,11 +2685,11 @@ PMCamera* PMPart::firstCamera( ) return m_cameras.first( ); } -QPtrListIterator<PMCamera> PMPart::cameras( ) +TQPtrListIterator<PMCamera> PMPart::cameras( ) { if( !m_bCameraListUpToDate ) updateCameraList( ); - return QPtrListIterator<PMCamera>( m_cameras ); + return TQPtrListIterator<PMCamera>( m_cameras ); } void PMPart::updateCameraList( ) @@ -2709,8 +2709,8 @@ void PMPart::slotRender( ) { emit aboutToRender( ); - QByteArray a; - QBuffer buffer( a ); + TQByteArray a; + TQBuffer buffer( a ); buffer.open( IO_WriteOnly ); PMPovray35Format format; PMSerializer* dev = format.newSerializer( &buffer ); @@ -2732,7 +2732,7 @@ void PMPart::slotRenderSettings( ) PMRenderModesDialog dlg( m_pScene->renderModes( ), widget( ) ); int result = dlg.exec( ); - if( result == QDialog::Accepted ) + if( result == TQDialog::Accepted ) { if( isReadWrite( ) ) setModified( true ); @@ -2762,7 +2762,7 @@ void PMPart::updateRenderModes( ) PMRenderModeList* list = m_pScene->renderModes( ); PMRenderModeListIterator it( *list ); - QComboBox* box = m_pRenderComboAction->combo( ); + TQComboBox* box = m_pRenderComboAction->combo( ); if( box ) { bool b = box->signalsBlocked( ); @@ -2783,8 +2783,8 @@ void PMPart::updateRenderModes( ) void PMPart::slotRenderModeActionPlugged( ) { updateRenderModes( ); -// connect( m_pRenderComboAction->combo( ), SIGNAL( activated( int ) ), -// SLOT( slotRenderMode( int ) ) ); +// connect( m_pRenderComboAction->combo( ), TQT_SIGNAL( activated( int ) ), +// TQT_SLOT( slotRenderMode( int ) ) ); } void PMPart::slotVisibilityLevelChanged( int l ) @@ -2802,7 +2802,7 @@ void PMPart::slotVisibilityActionPlugged( ) { if( m_pVisibilityLevelAction ) { - QSpinBox* box = m_pVisibilityLevelAction->spinBox( ); + TQSpinBox* box = m_pVisibilityLevelAction->spinBox( ); if( box ) { box->setMinValue( -1000 ); @@ -2816,7 +2816,7 @@ void PMPart::updateVisibilityLevel( ) { if( m_pVisibilityLevelAction ) { - QSpinBox* box = m_pVisibilityLevelAction->spinBox( ); + TQSpinBox* box = m_pVisibilityLevelAction->spinBox( ); if( box && m_pScene ) { bool sb = box->signalsBlocked( ); diff --git a/kpovmodeler/pmpart.h b/kpovmodeler/pmpart.h index e0ebcd06..e1b36b46 100644 --- a/kpovmodeler/pmpart.h +++ b/kpovmodeler/pmpart.h @@ -30,9 +30,9 @@ #include <kurl.h> #include <kparts/part.h> #include <kparts/browserextension.h> -#include <qstringlist.h> -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqstringlist.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> #include <kglobal.h> #include <klocale.h> @@ -56,7 +56,7 @@ class PMPrototypeManager; class PMInsertRuleSystem; class PMIOManager; -class QMimeSource; +class TQMimeSource; class KAction; class KSelectAction; class PMComboAction; @@ -75,16 +75,16 @@ public: * construtor of PMPart, calls all init functions to create the * application. */ - PMPart( QWidget* parentWidget, const char* widgetName, - QObject* parent, const char* name, bool readWrite, + PMPart( TQWidget* parentWidget, const char* widgetName, + TQObject* parent, const char* name, bool readWrite, PMShell* shell = 0 ); /** * construtor of PMPart, calls all init functions to create the * application. It does not create the main widget. */ - PMPart( QWidget* parentWidget, const char* widgetName, - QObject* parent, const char* name, bool readWrite, + PMPart( TQWidget* parentWidget, const char* widgetName, + TQObject* parent, const char* name, bool readWrite, bool onlyCutPaste, PMShell* shell = 0 ); /** @@ -157,7 +157,7 @@ public: * * Returns PMIFirstChild, PMILastChild, PMISibling or 0, if the objects * should not be inserted.*/ - int whereToInsert( PMObject* obj, const QStringList& list ); + int whereToInsert( PMObject* obj, const TQStringList& list ); /** * Asks the user, where to insert new objects. * @@ -176,7 +176,7 @@ public: /** * Returns an iterator to the list of cameras */ - QPtrListIterator<PMCamera> cameras( ); + TQPtrListIterator<PMCamera> cameras( ); /** * The active object */ @@ -184,31 +184,31 @@ public: /** * The active object's name */ - virtual QString activeObjectName( ); + virtual TQString activeObjectName( ); /** * Set the active object */ - virtual bool setActiveObject( const QString& name ); + virtual bool setActiveObject( const TQString& name ); /** * Get the valid properties of the currently active object */ - virtual QStringList getProperties( ); + virtual TQStringList getProperties( ); /** * set a property on the active object */ - virtual bool setProperty( const QString& name, const PMVariant& value ); + virtual bool setProperty( const TQString& name, const PMVariant& value ); /** * set a property on the active object */ - virtual bool setProperty( const QString& name, const QString& value ); + virtual bool setProperty( const TQString& name, const TQString& value ); /** * get a property on the active object */ - virtual const PMVariant getProperty( const QString& name ); + virtual const PMVariant getProperty( const TQString& name ); /** * get a property on the active object */ - virtual const QString getPropertyStr( const QString& name ); + virtual const TQString getPropertyStr( const TQString& name ); /** * List of control points of the active object */ @@ -226,14 +226,14 @@ public: * * Returns true if successful. */ - bool drop( PMObject* obj, QMimeSource* e ); + bool drop( PMObject* obj, TQMimeSource* e ); /** * Tries to parse the data and insert the parsed objects * as child or siblings of object obj * * Type is the actions description for the undo/redo menu. */ - bool insertFromParser( const QString& type, PMParser* parser, PMObject* obj ); + bool insertFromParser( const TQString& type, PMParser* parser, PMObject* obj ); /** * Returns a pointer to the prototype manager @@ -287,16 +287,16 @@ public slots: * Called when an object is changed. * Mode is a bit combination of @ref PMChange constants */ - void slotObjectChanged( PMObject* obj, const int mode, QObject* sender ); + void slotObjectChanged( PMObject* obj, const int mode, TQObject* sender ); /** * Called when an id is changed */ - void slotIDChanged( PMObject* obj, const QString& oldID ); + void slotIDChanged( PMObject* obj, const TQString& oldID ); /** * Inserts a new PMObject of type type */ - void slotNewObject( const QString& type ); + void slotNewObject( const TQString& type ); /** * Inserts a new PMObject of type type at position pos. * pos can be one of: @@ -304,7 +304,7 @@ public slots: * LastChild * Sibling */ - void slotNewObject( const QString& type, const QString& pos ); + void slotNewObject( const TQString& type, const TQString& pos ); /** * Inserts the new PMObject. The object will be deleted if it can't be * inserted or the user aborts the action @@ -314,7 +314,7 @@ public slots: /** * List the known object types */ - virtual QStringList getObjectTypes( ); + virtual TQStringList getObjectTypes( ); /** * Adds transformations to the object and calls slotNewObject @@ -654,7 +654,7 @@ public slots: /** * updates the undo/redo menu items */ - void slotUpdateUndoRedo( const QString& undo, const QString& redo ); + void slotUpdateUndoRedo( const TQString& undo, const TQString& redo ); /** * Starts rendering with povray @@ -712,7 +712,7 @@ signals: * Signal that is emitted when an object is changed. * Mode is a bit combination of @ref PMChange constants. */ - void objectChanged( PMObject* obj, const int mode, QObject* sender ); + void objectChanged( PMObject* obj, const int mode, TQObject* sender ); /** * Signal that is emitted when the views have to be refreshed. * Usually on newDocument or openDocument @@ -729,7 +729,7 @@ signals: /** * Emitted when the mouse is over a control point */ - void controlPointMessage( const QString& msg ); + void controlPointMessage( const TQString& msg ); /** * Emitted when the active render mode has changed */ @@ -770,7 +770,7 @@ protected: * creates the widget of the part instance and sets * it as the view */ - void initView( QWidget* parent, const char* name ); + void initView( TQWidget* parent, const char* name ); /** * initializes the documents contents */ @@ -796,7 +796,7 @@ private: * * Returns the number. */ - unsigned int findNewID( const QString& prefix, unsigned int firstNumber, + unsigned int findNewID( const TQString& prefix, unsigned int firstNumber, PMDeclare* obj ); /** * Updates the list of cameras @@ -806,11 +806,11 @@ private: /** * Generic drop/paste function */ - bool pasteOrDrop( const QString& type, QMimeSource* mime, PMObject* obj ); + bool pasteOrDrop( const TQString& type, TQMimeSource* mime, PMObject* obj ); /** * Generic cut/delete/remove function */ - bool removeSelection( const QString& type ); + bool removeSelection( const TQString& type ); /** * Updates the render mode combo action */ @@ -851,7 +851,7 @@ private: /** * List of all cameras */ - QPtrList<PMCamera> m_cameras; + TQPtrList<PMCamera> m_cameras; /** * true if the m_cameras list is up to date */ @@ -879,7 +879,7 @@ private: /** * Details of insert errors */ - QStringList m_insertErrorDetails; + TQStringList m_insertErrorDetails; /** * The symbol table for this document */ @@ -1015,7 +1015,7 @@ private: KSelectAction* m_pGlobalDetailAction; PMLabelAction* m_pGlobalDetailLabelAction; - QPtrList<KAction> m_readWriteActions; + TQPtrList<KAction> m_readWriteActions; PMPrototypeManager* m_pPrototypeManager; PMInsertRuleSystem* m_pInsertRuleSystem; diff --git a/kpovmodeler/pmpartiface.h b/kpovmodeler/pmpartiface.h index a1fe495e..744b85ca 100644 --- a/kpovmodeler/pmpartiface.h +++ b/kpovmodeler/pmpartiface.h @@ -52,7 +52,7 @@ k_dcop: /** * Inserts a new PMObject of type type */ - virtual void slotNewObject( const QString& type, const QString& pos ) = 0; + virtual void slotNewObject( const TQString& type, const TQString& pos ) = 0; /** * initializes the documents contents */ @@ -84,36 +84,36 @@ k_dcop: /** * returns the currently selected object */ - virtual QString activeObjectName( ) = 0; + virtual TQString activeObjectName( ) = 0; /** * set the current selected object. * returns true if successful or false otherwise */ - virtual bool setActiveObject( const QString& name ) = 0; + virtual bool setActiveObject( const TQString& name ) = 0; /** * Get known properties of the currently active object */ - virtual QStringList getProperties( ) = 0; + virtual TQStringList getProperties( ) = 0; /** * set a property on the currently active object */ - virtual bool setProperty( const QString& property, const PMVariant& value ) = 0; + virtual bool setProperty( const TQString& property, const PMVariant& value ) = 0; /** * set a property on the currently active object */ - virtual bool setProperty( const QString& property, const QString& value ) = 0; + virtual bool setProperty( const TQString& property, const TQString& value ) = 0; /** * Get the value of the given property */ - virtual const PMVariant getProperty( const QString& property ) = 0; + virtual const PMVariant getProperty( const TQString& property ) = 0; /** * Get the value of the given property */ - virtual const QString getPropertyStr( const QString& property ) = 0; + virtual const TQString getPropertyStr( const TQString& property ) = 0; /** * Get a list of known object types. */ - virtual QStringList getObjectTypes( ) = 0; + virtual TQStringList getObjectTypes( ) = 0; }; #endif diff --git a/kpovmodeler/pmpattern.cpp b/kpovmodeler/pmpattern.cpp index c9377f84..2d60e9ce 100644 --- a/kpovmodeler/pmpattern.cpp +++ b/kpovmodeler/pmpattern.cpp @@ -33,7 +33,7 @@ const PMVector crackleFormDefault = PMVector( -1.0, 1.0, 0.0 ); const int crackleMetricDefault = 2; const double crackleOffsetDefault = 0.0; const bool crackleSolidDefault = false; -const QString densityFileDefault = QString( "" ); +const TQString densityFileDefault = TQString( "" ); const int densityInterpolateDefault = 0; const PMVector gradientDefault = PMVector( 1.0, 1.0, 1.0 ); const PMVector juliaComplexDefault = PMVector( 0.353, 0.288 ); @@ -56,7 +56,7 @@ const double slopeLoAltDefault = 0.0; const double slopeHiAltDefault = 1.0; const int spiralNumberArmsDefault = 0; const PMPattern::PMNoiseType noiseGeneratorDefault = PMPattern::GlobalSetting; -const QString noiseGeneratorDefaultText = QString( "global_setting" ); +const TQString noiseGeneratorDefaultText = TQString( "global_setting" ); const bool turbulenceDefault = false; const PMVector valueVectorDefault = PMVector( 0.0, 0.0, 0.0 ); const int octavesDefault = 6; @@ -182,7 +182,7 @@ PMPattern::~PMPattern( ) { } -void PMPattern::serialize( QDomElement& e, QDomDocument& ) const +void PMPattern::serialize( TQDomElement& e, TQDomDocument& ) const { switch( m_patternType ) { @@ -336,7 +336,7 @@ void PMPattern::serialize( QDomElement& e, QDomDocument& ) const void PMPattern::readAttributes( const PMXMLHelper& h ) { - QString str = h.stringAttribute( "patterntype", "agate" ); + TQString str = h.stringAttribute( "patterntype", "agate" ); if( str == "agate" ) m_patternType = PatternAgate; @@ -549,7 +549,7 @@ void PMPattern::cleanUp( ) const Base::cleanUp( ); } -QString PMPattern::description( ) const +TQString PMPattern::description( ) const { return i18n( "pattern" ); } @@ -630,7 +630,7 @@ void PMPattern::setDensityInterpolate( int c ) } } -void PMPattern::setDensityFile( const QString& s ) +void PMPattern::setDensityFile( const TQString& s ) { if( s != m_densityFile ) { @@ -982,7 +982,7 @@ void PMPattern::setDepth( const double c ) } } -PMDialogEditBase* PMPattern::editWidget( QWidget* parent ) const +PMDialogEditBase* PMPattern::editWidget( TQWidget* parent ) const { return new PMPatternEdit( parent ); } diff --git a/kpovmodeler/pmpattern.h b/kpovmodeler/pmpattern.h index 69001a41..7dcf9cff 100644 --- a/kpovmodeler/pmpattern.h +++ b/kpovmodeler/pmpattern.h @@ -28,8 +28,8 @@ #include "pmvector.h" #include "pmcolor.h" -#include <qvaluelist.h> -#include <qvaluestack.h> +#include <tqvaluelist.h> +#include <tqvaluestack.h> /** * Class for povray patterns. @@ -71,9 +71,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMPattern( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmpattern" ); } + virtual TQString pixmap( ) const { return TQString( "pmpattern" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -81,14 +81,14 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMPatternEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Gets the pattern type @@ -116,7 +116,7 @@ public: /** * Gets the desity file name */ - QString densityFile( ) const { return m_densityFile; } + TQString densityFile( ) const { return m_densityFile; } /** * Gets the density interpolation */ @@ -257,7 +257,7 @@ public: /** * Sets the Density File Name */ - void setDensityFile( const QString& v ); + void setDensityFile( const TQString& v ); /** * Sets the density interpolation */ @@ -402,7 +402,7 @@ private: double m_crackleOffset; bool m_crackleSolid; // density - QString m_densityFile; + TQString m_densityFile; int m_densityInterpolate; // gradient PMVector m_gradient; diff --git a/kpovmodeler/pmpatternedit.cpp b/kpovmodeler/pmpatternedit.cpp index 1f9647c2..1e07b822 100644 --- a/kpovmodeler/pmpatternedit.cpp +++ b/kpovmodeler/pmpatternedit.cpp @@ -24,13 +24,13 @@ #include "pmlineedits.h" #include "pmvector.h" -#include <qwidget.h> -#include <qlayout.h> -#include <qcombobox.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqwidget.h> +#include <tqlayout.h> +#include <tqcombobox.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include <ktabctl.h> #include <klocale.h> #include <kmessagebox.h> @@ -38,7 +38,7 @@ #include <kfiledialog.h> #include <kiconloader.h> -PMPatternEdit::PMPatternEdit( QWidget* parent, const char* name ) +PMPatternEdit::PMPatternEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -48,15 +48,15 @@ void PMPatternEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QGridLayout* layout; - QHBoxLayout* hl; - QVBoxLayout* vl; - QGridLayout* gl; + TQGridLayout* layout; + TQHBoxLayout* hl; + TQVBoxLayout* vl; + TQGridLayout* gl; - layout = new QGridLayout( topLayout( ), 12, 2 ); - hl = new QHBoxLayout( KDialog::spacingHint( ) ); - hl->addWidget( new QLabel( i18n( "Type:" ), this ) ); - m_pTypeCombo = new QComboBox( false, this ); + layout = new TQGridLayout( topLayout( ), 12, 2 ); + hl = new TQHBoxLayout( KDialog::spacingHint( ) ); + hl->addWidget( new TQLabel( i18n( "Type:" ), this ) ); + m_pTypeCombo = new TQComboBox( false, this ); m_pTypeCombo->insertItem( i18n( "Agate" ) ); m_pTypeCombo->insertItem( i18n( "Average" ) ); m_pTypeCombo->insertItem( i18n( "Boxed" ) ); @@ -90,86 +90,86 @@ void PMPatternEdit::createTopWidgets( ) hl->addStretch( 1 ); layout->addMultiCellLayout( hl, 0, 0, 0, 1 ); - m_pAgateTurbulenceLabel = new QLabel( i18n( "Turbulence:" ), this ); + m_pAgateTurbulenceLabel = new TQLabel( i18n( "Turbulence:" ), this ); layout->addWidget( m_pAgateTurbulenceLabel, 1, 0 ); m_pAgateTurbulenceEdit = new PMFloatEdit( this ); layout->addWidget( m_pAgateTurbulenceEdit, 1, 1, AlignLeft ); - m_pCrackleWidget = new QWidget( this ); - vl = new QVBoxLayout( m_pCrackleWidget, 0, KDialog::spacingHint( ) ); - hl = new QHBoxLayout( vl ); - hl->addWidget( new QLabel( i18n( "Form:" ), m_pCrackleWidget ) ); + m_pCrackleWidget = new TQWidget( this ); + vl = new TQVBoxLayout( m_pCrackleWidget, 0, KDialog::spacingHint( ) ); + hl = new TQHBoxLayout( vl ); + hl->addWidget( new TQLabel( i18n( "Form:" ), m_pCrackleWidget ) ); m_pCrackleForm = new PMVectorEdit( "x", "y", "z", m_pCrackleWidget ); hl->addWidget( m_pCrackleForm ); hl->addStretch( 1 ); - hl = new QHBoxLayout( vl ); - gl = new QGridLayout( hl, 3, 2 ); - gl->addWidget( new QLabel( i18n( "Metric:" ), m_pCrackleWidget ), 0, 0 ); + hl = new TQHBoxLayout( vl ); + gl = new TQGridLayout( hl, 3, 2 ); + gl->addWidget( new TQLabel( i18n( "Metric:" ), m_pCrackleWidget ), 0, 0 ); m_pCrackleMetric = new PMIntEdit( m_pCrackleWidget ); m_pCrackleMetric->setValidation( true, 1, false, 0 ); gl->addWidget( m_pCrackleMetric, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Offset:" ), m_pCrackleWidget ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Offset:" ), m_pCrackleWidget ), 1, 0 ); m_pCrackleOffset = new PMFloatEdit( m_pCrackleWidget ); gl->addWidget( m_pCrackleOffset, 1, 1 ); - m_pCrackleSolid = new QCheckBox( i18n( "Solid:" ), m_pCrackleWidget ); + m_pCrackleSolid = new TQCheckBox( i18n( "Solid:" ), m_pCrackleWidget ); gl->addMultiCellWidget( m_pCrackleSolid, 2, 2, 0, 1 ); hl->addStretch( 1 ); layout->addMultiCellWidget( m_pCrackleWidget, 2, 2, 0, 1 ); - m_pDensityWidget = new QWidget( this ); - vl = new QVBoxLayout( m_pDensityWidget, 0, KDialog::spacingHint( ) ); - hl = new QHBoxLayout( vl ); - hl->addWidget( new QLabel( i18n( "File:" ), m_pDensityWidget ) ); - m_pDensityFile = new QLineEdit( m_pDensityWidget ); + m_pDensityWidget = new TQWidget( this ); + vl = new TQVBoxLayout( m_pDensityWidget, 0, KDialog::spacingHint( ) ); + hl = new TQHBoxLayout( vl ); + hl->addWidget( new TQLabel( i18n( "File:" ), m_pDensityWidget ) ); + m_pDensityFile = new TQLineEdit( m_pDensityWidget ); hl->addWidget( m_pDensityFile, 1 ); - m_pDensityFileBrowse = new QPushButton( m_pDensityWidget ); + m_pDensityFileBrowse = new TQPushButton( m_pDensityWidget ); m_pDensityFileBrowse->setPixmap( SmallIcon( "fileopen" ) ); hl->addWidget( m_pDensityFileBrowse ); - hl = new QHBoxLayout( vl ); - hl->addWidget( new QLabel( i18n( "Interpolation:" ), m_pDensityWidget ) ); - m_pDensityInterpolate = new QComboBox( false, m_pDensityWidget ); + hl = new TQHBoxLayout( vl ); + hl->addWidget( new TQLabel( i18n( "Interpolation:" ), m_pDensityWidget ) ); + m_pDensityInterpolate = new TQComboBox( false, m_pDensityWidget ); m_pDensityInterpolate->insertItem( i18n( "None" ) ); m_pDensityInterpolate->insertItem( i18n( "Trilinear" ) ); hl->addWidget( m_pDensityInterpolate ); hl->addStretch( 1 ); layout->addMultiCellWidget( m_pDensityWidget, 3, 3, 0, 1 ); - m_pGradientLabel = new QLabel( i18n( "Gradient:" ), this ); + m_pGradientLabel = new TQLabel( i18n( "Gradient:" ), this ); layout->addWidget( m_pGradientLabel, 4, 0 ); m_pGradientEdit = new PMVectorEdit( "x", "y", "z", this ); layout->addWidget( m_pGradientEdit, 4, 1 ); - m_pJuliaComplexLabel = new QLabel( i18n( "Complex number:" ), this ); + m_pJuliaComplexLabel = new TQLabel( i18n( "Complex number:" ), this ); layout->addWidget( m_pJuliaComplexLabel, 5, 0 ); m_pJuliaComplex = new PMVectorEdit( "Real", "Imaginary", this ); layout->addWidget( m_pJuliaComplex, 5, 1 ); - m_pFractalWidget = new QWidget( this ); - vl = new QVBoxLayout( m_pFractalWidget, 0, KDialog::spacingHint( ) ); - hl = new QHBoxLayout( vl ); - m_pFractalMagnet = new QCheckBox( i18n( "Magnet" ), m_pFractalWidget ); + m_pFractalWidget = new TQWidget( this ); + vl = new TQVBoxLayout( m_pFractalWidget, 0, KDialog::spacingHint( ) ); + hl = new TQHBoxLayout( vl ); + m_pFractalMagnet = new TQCheckBox( i18n( "Magnet" ), m_pFractalWidget ); hl->addWidget( m_pFractalMagnet ); - m_pFractalMagnetType = new QComboBox( false, m_pFractalWidget ); + m_pFractalMagnetType = new TQComboBox( false, m_pFractalWidget ); m_pFractalMagnetType->insertItem( i18n( "Type 1" ) ); m_pFractalMagnetType->insertItem( i18n( "Type 2" ) ); hl->addWidget( m_pFractalMagnetType ); hl->addStretch( 1 ); - hl = new QHBoxLayout( vl ); - gl = new QGridLayout( hl, 2, 2 ); - gl->addWidget( new QLabel( i18n( "Maximum iterations:" ), m_pFractalWidget ), 0, 0 ); + hl = new TQHBoxLayout( vl ); + gl = new TQGridLayout( hl, 2, 2 ); + gl->addWidget( new TQLabel( i18n( "Maximum iterations:" ), m_pFractalWidget ), 0, 0 ); m_pMaxIterationsEdit = new PMIntEdit( m_pFractalWidget ); m_pMaxIterationsEdit->setValidation( true, 1, false, 0 ); gl->addWidget( m_pMaxIterationsEdit, 0, 1 ); - m_pFractalExponentLabel = new QLabel( i18n( "Exponent:" ), m_pFractalWidget ); + m_pFractalExponentLabel = new TQLabel( i18n( "Exponent:" ), m_pFractalWidget ); gl->addWidget( m_pFractalExponentLabel, 1, 0 ); m_pFractalExponent = new PMIntEdit( m_pFractalWidget ); m_pFractalExponent->setValidation( true, 2, true, 33 ); gl->addWidget( m_pFractalExponent, 1, 1 ); hl->addStretch( 1 ); - hl = new QHBoxLayout( vl ); - gl = new QGridLayout( hl, 2, 4 ); - gl->addWidget( new QLabel( i18n( "Exterior type:" ), m_pFractalWidget ), 0, 0 ); - m_pFractalExtType = new QComboBox( false, m_pFractalWidget ); + hl = new TQHBoxLayout( vl ); + gl = new TQGridLayout( hl, 2, 4 ); + gl->addWidget( new TQLabel( i18n( "Exterior type:" ), m_pFractalWidget ), 0, 0 ); + m_pFractalExtType = new TQComboBox( false, m_pFractalWidget ); m_pFractalExtType->insertItem( i18n( "0: Returns Just 1" ) ); m_pFractalExtType->insertItem( i18n( "1: Iterations Until Bailout" ) ); m_pFractalExtType->insertItem( i18n( "2: Real Part" ) ); @@ -178,11 +178,11 @@ void PMPatternEdit::createTopWidgets( ) m_pFractalExtType->insertItem( i18n( "5: Squared Imaginary Part" ) ); m_pFractalExtType->insertItem( i18n( "6: Absolute Value" ) ); gl->addWidget( m_pFractalExtType, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Factor:" ), m_pFractalWidget ), 0, 2 ); + gl->addWidget( new TQLabel( i18n( "Factor:" ), m_pFractalWidget ), 0, 2 ); m_pFractalExtFactor = new PMFloatEdit( m_pFractalWidget ); gl->addWidget( m_pFractalExtFactor, 0, 3 ); - gl->addWidget( new QLabel( i18n( "Interior type:" ), m_pFractalWidget ), 1, 0 ); - m_pFractalIntType = new QComboBox( false, m_pFractalWidget ); + gl->addWidget( new TQLabel( i18n( "Interior type:" ), m_pFractalWidget ), 1, 0 ); + m_pFractalIntType = new TQComboBox( false, m_pFractalWidget ); m_pFractalIntType->insertItem( i18n( "0: Returns Just 1" ) ); m_pFractalIntType->insertItem( i18n( "1: Absolute Value Smallest" ) ); m_pFractalIntType->insertItem( i18n( "2: Real Part" ) ); @@ -191,69 +191,69 @@ void PMPatternEdit::createTopWidgets( ) m_pFractalIntType->insertItem( i18n( "5: Squared Imaginary Part" ) ); m_pFractalIntType->insertItem( i18n( "6: Absolute Value Last" ) ); gl->addWidget( m_pFractalIntType, 1, 1 ); - gl->addWidget( new QLabel( i18n( "Factor:" ), m_pFractalWidget ), 1, 2 ); + gl->addWidget( new TQLabel( i18n( "Factor:" ), m_pFractalWidget ), 1, 2 ); m_pFractalIntFactor = new PMFloatEdit( m_pFractalWidget ); gl->addWidget( m_pFractalIntFactor, 1, 3 ); hl->addStretch( 1 ); layout->addMultiCellWidget( m_pFractalWidget, 6, 6, 0, 1 ); - m_pQuiltControlsLabel = new QLabel( i18n( "Quilt controls:" ), this ); + m_pQuiltControlsLabel = new TQLabel( i18n( "Quilt controls:" ), this ); m_pQuiltControl0Edit = new PMFloatEdit( this ); m_pQuiltControl1Edit = new PMFloatEdit( this ); - hl = new QHBoxLayout( ); + hl = new TQHBoxLayout( ); hl->addWidget( m_pQuiltControl0Edit ); hl->addWidget( m_pQuiltControl1Edit ); hl->addStretch( 1 ); layout->addWidget( m_pQuiltControlsLabel, 7, 0 ); layout->addLayout( hl, 7, 1 ); - m_pSlopeWidget = new QWidget( this ); - vl = new QVBoxLayout( m_pSlopeWidget, 0, KDialog::spacingHint( ) ); - hl = new QHBoxLayout( vl ); - hl->addWidget( new QLabel( i18n( "Direction:" ), m_pSlopeWidget ) ); + m_pSlopeWidget = new TQWidget( this ); + vl = new TQVBoxLayout( m_pSlopeWidget, 0, KDialog::spacingHint( ) ); + hl = new TQHBoxLayout( vl ); + hl->addWidget( new TQLabel( i18n( "Direction:" ), m_pSlopeWidget ) ); m_pSlopeDirection = new PMVectorEdit( "x", "y", "z", m_pSlopeWidget ); hl->addWidget( m_pSlopeDirection ); - hl = new QHBoxLayout( vl ); - gl = new QGridLayout( hl, 2, 2 ); - gl->addWidget( new QLabel( i18n( "Low slope:" ), m_pSlopeWidget ), 0, 0 ); + hl = new TQHBoxLayout( vl ); + gl = new TQGridLayout( hl, 2, 2 ); + gl->addWidget( new TQLabel( i18n( "Low slope:" ), m_pSlopeWidget ), 0, 0 ); m_pSlopeLoSlope = new PMFloatEdit( m_pSlopeWidget ); m_pSlopeLoSlope->setValidation( true, 0.0, true, 1.0 ); gl->addWidget( m_pSlopeLoSlope, 0, 1 ); - gl->addWidget( new QLabel( i18n( "High slope:" ), m_pSlopeWidget ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "High slope:" ), m_pSlopeWidget ), 1, 0 ); m_pSlopeHiSlope = new PMFloatEdit( m_pSlopeWidget ); m_pSlopeHiSlope->setValidation( true, 0.0, true, 1.0 ); gl->addWidget( m_pSlopeHiSlope, 1, 1 ); hl->addStretch( 1 ); - hl = new QHBoxLayout( vl ); - m_pSlopeAltFlag = new QCheckBox( i18n( "Altitiude" ), m_pSlopeWidget ); + hl = new TQHBoxLayout( vl ); + m_pSlopeAltFlag = new TQCheckBox( i18n( "Altitiude" ), m_pSlopeWidget ); hl->addWidget( m_pSlopeAltFlag ); m_pSlopeAltitude = new PMVectorEdit( "x", "y", "z", m_pSlopeWidget ); hl->addWidget( m_pSlopeAltitude ); - hl = new QHBoxLayout( vl ); - gl = new QGridLayout( hl, 2, 2 ); - m_pSlopeLoAltLabel = new QLabel( i18n( "Low altitude:" ), m_pSlopeWidget ); + hl = new TQHBoxLayout( vl ); + gl = new TQGridLayout( hl, 2, 2 ); + m_pSlopeLoAltLabel = new TQLabel( i18n( "Low altitude:" ), m_pSlopeWidget ); gl->addWidget( m_pSlopeLoAltLabel, 0, 0 ); m_pSlopeLoAlt = new PMFloatEdit( m_pSlopeWidget ); gl->addWidget( m_pSlopeLoAlt, 0, 1 ); - m_pSlopeHiAltLabel = new QLabel( i18n( "High altitude:" ), m_pSlopeWidget ); + m_pSlopeHiAltLabel = new TQLabel( i18n( "High altitude:" ), m_pSlopeWidget ); gl->addWidget( m_pSlopeHiAltLabel, 1, 0 ); m_pSlopeHiAlt = new PMFloatEdit( m_pSlopeWidget ); gl->addWidget( m_pSlopeHiAlt, 1, 1 ); hl->addStretch( 1 ); layout->addMultiCellWidget( m_pSlopeWidget, 8, 8, 0, 1 ); - m_pSpiralNumberLabel = new QLabel( i18n( "Spiral number:" ), this ); + m_pSpiralNumberLabel = new TQLabel( i18n( "Spiral number:" ), this ); m_pSpiralNumberEdit = new PMIntEdit( this ); layout->addWidget( m_pSpiralNumberLabel, 9, 0 ); layout->addWidget( m_pSpiralNumberEdit, 9, 1, AlignLeft ); - m_pDepthLabel = new QLabel( i18n( "Depth:" ), this ); + m_pDepthLabel = new TQLabel( i18n( "Depth:" ), this ); m_pDepthEdit = new PMFloatEdit( this ); layout->addWidget( m_pDepthLabel, 10, 0 ); layout->addWidget( m_pDepthEdit, 10, 1, AlignLeft ); - m_pNoiseGeneratorLabel = new QLabel( i18n( "Noise generator:" ), this ); - m_pNoiseGenerator = new QComboBox( false, this ); + m_pNoiseGeneratorLabel = new TQLabel( i18n( "Noise generator:" ), this ); + m_pNoiseGenerator = new TQComboBox( false, this ); m_pNoiseGenerator->insertItem( i18n( "Use Global Setting" ) ); m_pNoiseGenerator->insertItem( i18n( "Original" ) ); m_pNoiseGenerator->insertItem( i18n( "Range Corrected" ) ); @@ -261,80 +261,80 @@ void PMPatternEdit::createTopWidgets( ) layout->addWidget( m_pNoiseGeneratorLabel, 11, 0 ); layout->addWidget( m_pNoiseGenerator, 11, 1 ); - m_pEnableTurbulenceEdit = new QCheckBox( i18n( "Turbulence" ), this ); + m_pEnableTurbulenceEdit = new TQCheckBox( i18n( "Turbulence" ), this ); topLayout( )->addWidget( m_pEnableTurbulenceEdit ); - m_pTurbulenceWidget = new QWidget( this ); - vl = new QVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) ); - hl = new QHBoxLayout( vl ); - hl->addWidget( new QLabel( i18n( "Value:" ), m_pTurbulenceWidget ) ); + m_pTurbulenceWidget = new TQWidget( this ); + vl = new TQVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) ); + hl = new TQHBoxLayout( vl ); + hl->addWidget( new TQLabel( i18n( "Value:" ), m_pTurbulenceWidget ) ); m_pValueVectorEdit = new PMVectorEdit( "x", "y", "z", m_pTurbulenceWidget ); hl->addWidget( m_pValueVectorEdit ); - hl = new QHBoxLayout( vl ); - gl = new QGridLayout( hl, 3, 2 ); - gl->addWidget( new QLabel( i18n( "Octaves:" ), m_pTurbulenceWidget ), 0, 0 ); + hl = new TQHBoxLayout( vl ); + gl = new TQGridLayout( hl, 3, 2 ); + gl->addWidget( new TQLabel( i18n( "Octaves:" ), m_pTurbulenceWidget ), 0, 0 ); m_pOctavesEdit = new PMIntEdit( m_pTurbulenceWidget ); gl->addWidget( m_pOctavesEdit, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Omega:" ), m_pTurbulenceWidget ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Omega:" ), m_pTurbulenceWidget ), 1, 0 ); m_pOmegaEdit = new PMFloatEdit( m_pTurbulenceWidget ); gl->addWidget( m_pOmegaEdit, 1, 1 ); - gl->addWidget( new QLabel( i18n( "Lambda:" ), m_pTurbulenceWidget ), 2, 0 ); + gl->addWidget( new TQLabel( i18n( "Lambda:" ), m_pTurbulenceWidget ), 2, 0 ); m_pLambdaEdit = new PMFloatEdit( m_pTurbulenceWidget ); gl->addWidget( m_pLambdaEdit, 2, 1 ); hl->addStretch( 1 ); topLayout( )->addWidget( m_pTurbulenceWidget ); /* connect all signals to slots/signals */ - connect( m_pTypeCombo, SIGNAL( activated( int ) ), SLOT( slotComboChanged( int ) ) ); + connect( m_pTypeCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotComboChanged( int ) ) ); - connect( m_pAgateTurbulenceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pAgateTurbulenceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); - connect( m_pCrackleForm, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCrackleMetric, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCrackleOffset, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCrackleSolid, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pCrackleForm, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCrackleMetric, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCrackleOffset, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCrackleSolid, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); - connect( m_pDensityInterpolate, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDensityFile, SIGNAL( textChanged( const QString& ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDensityFileBrowse, SIGNAL( clicked( ) ), SLOT( slotDensityFileBrowseClicked( ) ) ); + connect( m_pDensityInterpolate, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDensityFile, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDensityFileBrowse, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDensityFileBrowseClicked( ) ) ); - connect( m_pGradientEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pGradientEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); - connect( m_pJuliaComplex, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFractalMagnet, SIGNAL( clicked( ) ), SLOT( slotFractalMagnetClicked( ) ) ); - connect( m_pFractalMagnetType, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMaxIterationsEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFractalExponent, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFractalExtType, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFractalExtFactor, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFractalIntType, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFractalIntFactor, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pJuliaComplex, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFractalMagnet, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFractalMagnetClicked( ) ) ); + connect( m_pFractalMagnetType, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMaxIterationsEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFractalExponent, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFractalExtType, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFractalExtFactor, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFractalIntType, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFractalIntFactor, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); - connect( m_pQuiltControl0Edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pQuiltControl1Edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pQuiltControl0Edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pQuiltControl1Edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); - connect( m_pSlopeDirection, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSlopeLoSlope, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSlopeHiSlope, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSlopeAltFlag, SIGNAL( clicked( ) ), SLOT( slotSlopeAltFlagClicked( ) ) ); - connect( m_pSlopeAltitude, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSlopeLoAlt, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSlopeHiAlt, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pSlopeDirection, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSlopeLoSlope, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSlopeHiSlope, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSlopeAltFlag, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSlopeAltFlagClicked( ) ) ); + connect( m_pSlopeAltitude, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSlopeLoAlt, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSlopeHiAlt, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); - connect( m_pSpiralNumberEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pSpiralNumberEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); - connect( m_pNoiseGenerator, SIGNAL( activated( int ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pNoiseGenerator, TQT_SIGNAL( activated( int ) ), TQT_SIGNAL( dataChanged( ) ) ); - connect( m_pEnableTurbulenceEdit, SIGNAL( clicked( ) ), SLOT( slotTurbulenceClicked( ) ) ); - connect( m_pValueVectorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOctavesEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOmegaEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pLambdaEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDepthEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pEnableTurbulenceEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotTurbulenceClicked( ) ) ); + connect( m_pValueVectorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOctavesEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOmegaEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pLambdaEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDepthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMPatternEdit::displayObject( PMObject* o ) { - QString str; + TQString str; bool readOnly; if( o->isA( "Pattern" ) ) @@ -1008,7 +1008,7 @@ void PMPatternEdit::slotComboChanged( int c ) void PMPatternEdit::slotDensityFileBrowseClicked( ) { - QString str = KFileDialog::getOpenFileName( QString::null, QString::null ); + TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmpatternedit.h b/kpovmodeler/pmpatternedit.h index 9f36ccf4..6826e13b 100644 --- a/kpovmodeler/pmpatternedit.h +++ b/kpovmodeler/pmpatternedit.h @@ -30,14 +30,14 @@ class PMPattern; class PMVectorEdit; -class QComboBox; +class TQComboBox; class PMFloatEdit; class PMIntEdit; -class QLabel; -class QCheckBox; -class QWidget; -class QLineEdit; -class QPushButton; +class TQLabel; +class TQCheckBox; +class TQWidget; +class TQLineEdit; +class TQPushButton; /** * Dialog edit class for @ref PMPattern. @@ -50,7 +50,7 @@ public: /** * Creates a PMPatternEdit with parent and name */ - PMPatternEdit( QWidget* parent, const char* name = 0 ); + PMPatternEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -96,67 +96,67 @@ private: */ bool m_noDepth; PMPattern* m_pDisplayedObject; - QComboBox* m_pTypeCombo; + TQComboBox* m_pTypeCombo; - QLabel* m_pAgateTurbulenceLabel; + TQLabel* m_pAgateTurbulenceLabel; PMFloatEdit* m_pAgateTurbulenceEdit; - QWidget* m_pCrackleWidget; + TQWidget* m_pCrackleWidget; PMVectorEdit* m_pCrackleForm; PMIntEdit* m_pCrackleMetric; PMFloatEdit* m_pCrackleOffset; - QCheckBox* m_pCrackleSolid; + TQCheckBox* m_pCrackleSolid; - QWidget* m_pDensityWidget; - QComboBox* m_pDensityInterpolate; - QLineEdit* m_pDensityFile; - QPushButton* m_pDensityFileBrowse; + TQWidget* m_pDensityWidget; + TQComboBox* m_pDensityInterpolate; + TQLineEdit* m_pDensityFile; + TQPushButton* m_pDensityFileBrowse; - QLabel* m_pGradientLabel; + TQLabel* m_pGradientLabel; PMVectorEdit* m_pGradientEdit; - QLabel* m_pJuliaComplexLabel; + TQLabel* m_pJuliaComplexLabel; PMVectorEdit* m_pJuliaComplex; - QWidget* m_pFractalWidget; - QCheckBox* m_pFractalMagnet; - QComboBox* m_pFractalMagnetType; + TQWidget* m_pFractalWidget; + TQCheckBox* m_pFractalMagnet; + TQComboBox* m_pFractalMagnetType; PMIntEdit* m_pMaxIterationsEdit; - QLabel* m_pFractalExponentLabel; + TQLabel* m_pFractalExponentLabel; PMIntEdit* m_pFractalExponent; - QComboBox* m_pFractalExtType; + TQComboBox* m_pFractalExtType; PMFloatEdit* m_pFractalExtFactor; - QComboBox* m_pFractalIntType; + TQComboBox* m_pFractalIntType; PMFloatEdit* m_pFractalIntFactor; - QLabel* m_pQuiltControlsLabel; + TQLabel* m_pQuiltControlsLabel; PMFloatEdit* m_pQuiltControl0Edit; PMFloatEdit* m_pQuiltControl1Edit; - QWidget* m_pSlopeWidget; + TQWidget* m_pSlopeWidget; PMVectorEdit* m_pSlopeDirection; PMFloatEdit* m_pSlopeLoSlope; PMFloatEdit* m_pSlopeHiSlope; - QCheckBox* m_pSlopeAltFlag; + TQCheckBox* m_pSlopeAltFlag; PMVectorEdit* m_pSlopeAltitude; - QLabel* m_pSlopeLoAltLabel; + TQLabel* m_pSlopeLoAltLabel; PMFloatEdit* m_pSlopeLoAlt; - QLabel* m_pSlopeHiAltLabel; + TQLabel* m_pSlopeHiAltLabel; PMFloatEdit* m_pSlopeHiAlt; - QLabel* m_pSpiralNumberLabel; + TQLabel* m_pSpiralNumberLabel; PMIntEdit* m_pSpiralNumberEdit; - QLabel* m_pNoiseGeneratorLabel; - QComboBox* m_pNoiseGenerator; + TQLabel* m_pNoiseGeneratorLabel; + TQComboBox* m_pNoiseGenerator; - QCheckBox* m_pEnableTurbulenceEdit; - QWidget* m_pTurbulenceWidget; + TQCheckBox* m_pEnableTurbulenceEdit; + TQWidget* m_pTurbulenceWidget; PMVectorEdit* m_pValueVectorEdit; PMIntEdit* m_pOctavesEdit; PMFloatEdit* m_pOmegaEdit; PMFloatEdit* m_pLambdaEdit; - QLabel* m_pDepthLabel; + TQLabel* m_pDepthLabel; PMFloatEdit* m_pDepthEdit; }; diff --git a/kpovmodeler/pmphotons.cpp b/kpovmodeler/pmphotons.cpp index 8297e3be..cce7665b 100644 --- a/kpovmodeler/pmphotons.cpp +++ b/kpovmodeler/pmphotons.cpp @@ -95,12 +95,12 @@ void PMPhotons::cleanUp( ) const Base::cleanUp( ); } -QString PMPhotons::description( ) const +TQString PMPhotons::description( ) const { return i18n( "photons" ); } -void PMPhotons::serialize( QDomElement& e, QDomDocument& ) const +void PMPhotons::serialize( TQDomElement& e, TQDomDocument& ) const { e.setAttribute( "target", m_target ); e.setAttribute( "spacing_multi", m_spacingMulti ); @@ -192,7 +192,7 @@ void PMPhotons::setAreaLight( bool al ) } } -PMDialogEditBase* PMPhotons::editWidget( QWidget* parent ) const +PMDialogEditBase* PMPhotons::editWidget( TQWidget* parent ) const { return new PMPhotonsEdit( parent ); } diff --git a/kpovmodeler/pmphotons.h b/kpovmodeler/pmphotons.h index 14ce9f6f..a28041f5 100644 --- a/kpovmodeler/pmphotons.h +++ b/kpovmodeler/pmphotons.h @@ -50,7 +50,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMPhotons( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -58,19 +58,19 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMPhotonsEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmphotons" ); } + virtual TQString pixmap( ) const { return TQString( "pmphotons" ); } /** * Returns the target flag diff --git a/kpovmodeler/pmphotonsedit.cpp b/kpovmodeler/pmphotonsedit.cpp index 21f5d106..a2fde9a2 100644 --- a/kpovmodeler/pmphotonsedit.cpp +++ b/kpovmodeler/pmphotonsedit.cpp @@ -20,15 +20,15 @@ #include "pmphotons.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kdialog.h> #include <kmessagebox.h> -PMPhotonsEdit::PMPhotonsEdit( QWidget* parent, const char* name ) +PMPhotonsEdit::PMPhotonsEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -36,45 +36,45 @@ PMPhotonsEdit::PMPhotonsEdit( QWidget* parent, const char* name ) void PMPhotonsEdit::createTopWidgets( ) { - QGridLayout* gl; - QHBoxLayout* hl; + TQGridLayout* gl; + TQHBoxLayout* hl; Base::createTopWidgets( ); - m_pLayoutWidget = new QWidget( this ); - m_pTarget = new QCheckBox( i18n( "Target" ), m_pLayoutWidget ); - m_pSpacingMultiLabel = new QLabel( i18n( "Spacing multiplier:" ), m_pLayoutWidget ); + m_pLayoutWidget = new TQWidget( this ); + m_pTarget = new TQCheckBox( i18n( "Target" ), m_pLayoutWidget ); + m_pSpacingMultiLabel = new TQLabel( i18n( "Spacing multiplier:" ), m_pLayoutWidget ); m_pSpacingMulti = new PMFloatEdit( m_pLayoutWidget ); m_pSpacingMulti->setValidation( true, 0, false, 0 ); - m_pRefraction = new QCheckBox( i18n( "Refraction" ), this ); - m_pReflection = new QCheckBox( i18n( "Reflection" ), this ); - m_pCollect = new QCheckBox( i18n( "Collect" ), this ); - m_pPassThrough = new QCheckBox( i18n( "Pass through" ), this ); - m_pAreaLight = new QCheckBox( i18n( "Area light" ), this ); + m_pRefraction = new TQCheckBox( i18n( "Refraction" ), this ); + m_pReflection = new TQCheckBox( i18n( "Reflection" ), this ); + m_pCollect = new TQCheckBox( i18n( "Collect" ), this ); + m_pPassThrough = new TQCheckBox( i18n( "Pass through" ), this ); + m_pAreaLight = new TQCheckBox( i18n( "Area light" ), this ); - hl = new QHBoxLayout( m_pLayoutWidget, 0, KDialog::spacingHint( ) ); - gl = new QGridLayout( hl, 2, 2 ); + hl = new TQHBoxLayout( m_pLayoutWidget, 0, KDialog::spacingHint( ) ); + gl = new TQGridLayout( hl, 2, 2 ); gl->addMultiCellWidget( m_pTarget, 0, 0, 0, 1 ); gl->addWidget( m_pSpacingMultiLabel, 1, 0 ); gl->addWidget( m_pSpacingMulti, 1, 1 ); hl->addStretch( 1 ); topLayout( )->addWidget( m_pLayoutWidget ); - gl = new QGridLayout( topLayout( ), 2, 2 ); + gl = new TQGridLayout( topLayout( ), 2, 2 ); gl->addWidget( m_pRefraction, 0, 0 ); gl->addWidget( m_pReflection, 0, 1 ); gl->addWidget( m_pCollect, 1, 0 ); gl->addWidget( m_pPassThrough, 1, 1 ); gl->addWidget( m_pAreaLight, 1, 0 ); - connect( m_pTarget, SIGNAL( clicked( ) ), SLOT( slotTargetClicked( ) ) ); - connect( m_pSpacingMulti, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRefraction, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pReflection, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCollect, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPassThrough, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAreaLight, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pTarget, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotTargetClicked( ) ) ); + connect( m_pSpacingMulti, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRefraction, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pReflection, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCollect, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPassThrough, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAreaLight, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMPhotonsEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmphotonsedit.h b/kpovmodeler/pmphotonsedit.h index d40e84cf..a4d3e414 100644 --- a/kpovmodeler/pmphotonsedit.h +++ b/kpovmodeler/pmphotonsedit.h @@ -28,8 +28,8 @@ class PMPhotons; class PMFloatEdit; -class QCheckBox; -class QLabel; +class TQCheckBox; +class TQLabel; /** * Dialog edit class for @ref PMPhotons. @@ -42,7 +42,7 @@ public: /** * Creates a PMPhotonsEdit with parent and name */ - PMPhotonsEdit( QWidget* parent, const char* name = 0 ); + PMPhotonsEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -64,15 +64,15 @@ protected slots: private: PMPhotons* m_pDisplayedObject; - QWidget* m_pLayoutWidget; - QCheckBox* m_pTarget; + TQWidget* m_pLayoutWidget; + TQCheckBox* m_pTarget; PMFloatEdit* m_pSpacingMulti; - QLabel* m_pSpacingMultiLabel; - QCheckBox* m_pRefraction; - QCheckBox* m_pReflection; - QCheckBox* m_pCollect; - QCheckBox* m_pPassThrough; - QCheckBox* m_pAreaLight; + TQLabel* m_pSpacingMultiLabel; + TQCheckBox* m_pRefraction; + TQCheckBox* m_pReflection; + TQCheckBox* m_pCollect; + TQCheckBox* m_pPassThrough; + TQCheckBox* m_pAreaLight; }; diff --git a/kpovmodeler/pmpigment.cpp b/kpovmodeler/pmpigment.cpp index 39e5a4e3..be37cfb1 100644 --- a/kpovmodeler/pmpigment.cpp +++ b/kpovmodeler/pmpigment.cpp @@ -67,17 +67,17 @@ void PMPigment::cleanUp( ) const Base::cleanUp( ); } -QString PMPigment::description( ) const +TQString PMPigment::description( ) const { return i18n( "pigment" ); } -PMDialogEditBase* PMPigment::editWidget( QWidget* parent ) const +PMDialogEditBase* PMPigment::editWidget( TQWidget* parent ) const { return new PMPigmentEdit( parent ); } -void PMPigment::serialize( QDomElement& e, QDomDocument& doc ) const +void PMPigment::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "uv_mapping", m_uvMapping ); Base::serialize( e, doc ); diff --git a/kpovmodeler/pmpigment.h b/kpovmodeler/pmpigment.h index 3f465e0e..b520ad27 100644 --- a/kpovmodeler/pmpigment.h +++ b/kpovmodeler/pmpigment.h @@ -49,7 +49,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMPigment( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -57,16 +57,16 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMPigmentEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmpigment" ); } + virtual TQString pixmap( ) const { return TQString( "pmpigment" ); } /** * Returns the uv mapping flag diff --git a/kpovmodeler/pmpigmentedit.cpp b/kpovmodeler/pmpigmentedit.cpp index 939f18cf..16bfab2c 100644 --- a/kpovmodeler/pmpigmentedit.cpp +++ b/kpovmodeler/pmpigmentedit.cpp @@ -20,12 +20,12 @@ #include "pmpigment.h" #include "pmlinkedit.h" -#include <qlayout.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> #include <klocale.h> -PMPigmentEdit::PMPigmentEdit( QWidget* parent, const char* name ) +PMPigmentEdit::PMPigmentEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -34,10 +34,10 @@ PMPigmentEdit::PMPigmentEdit( QWidget* parent, const char* name ) void PMPigmentEdit::createTopWidgets() { Base::createTopWidgets(); - m_pUVMapping = new QCheckBox( i18n( "UV mapping" ), this ); + m_pUVMapping = new TQCheckBox( i18n( "UV mapping" ), this ); topLayout( )->addWidget( m_pUVMapping ); - connect( m_pUVMapping, SIGNAL( clicked() ), SIGNAL( dataChanged() ) ); + connect( m_pUVMapping, TQT_SIGNAL( clicked() ), TQT_SIGNAL( dataChanged() ) ); } void PMPigmentEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmpigmentedit.h b/kpovmodeler/pmpigmentedit.h index 7a3960a2..89bb2fb0 100644 --- a/kpovmodeler/pmpigmentedit.h +++ b/kpovmodeler/pmpigmentedit.h @@ -27,7 +27,7 @@ #include "pmtexturebaseedit.h" class PMPigment; -class QCheckBox; +class TQCheckBox; /** * Dialog edit class for @ref PMPigment @@ -40,7 +40,7 @@ public: /** * Creates a PMPigmentEdit with parent and name */ - PMPigmentEdit( QWidget* parent, const char* name = 0 ); + PMPigmentEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -53,7 +53,7 @@ protected: private: PMPigment* m_pDisplayedObject; - QCheckBox* m_pUVMapping; + TQCheckBox* m_pUVMapping; }; diff --git a/kpovmodeler/pmplane.cpp b/kpovmodeler/pmplane.cpp index 171df53f..db7af35a 100644 --- a/kpovmodeler/pmplane.cpp +++ b/kpovmodeler/pmplane.cpp @@ -63,12 +63,12 @@ PMPlane::~PMPlane( ) { } -QString PMPlane::description( ) const +TQString PMPlane::description( ) const { return i18n( "plane" ); } -void PMPlane::serialize( QDomElement& e, QDomDocument& doc ) const +void PMPlane::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "normal", m_normal.serializeXML( ) ); e.setAttribute( "distance", m_distance ); @@ -126,7 +126,7 @@ void PMPlane::setDistance( double distance ) } } -PMDialogEditBase* PMPlane::editWidget( QWidget* parent ) const +PMDialogEditBase* PMPlane::editWidget( TQWidget* parent ) const { return new PMPlaneEdit( parent ); } diff --git a/kpovmodeler/pmplane.h b/kpovmodeler/pmplane.h index 34829ade..d5321dd8 100644 --- a/kpovmodeler/pmplane.h +++ b/kpovmodeler/pmplane.h @@ -54,23 +54,23 @@ public: virtual PMObject* copy( ) const { return new PMPlane( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMPlaneEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view and dialog view */ - virtual QString pixmap( ) const { return QString( "pmplane" ); } + virtual TQString pixmap( ) const { return TQString( "pmplane" ); } /** * Return the normal diff --git a/kpovmodeler/pmplaneedit.cpp b/kpovmodeler/pmplaneedit.cpp index 62e7e08e..13e28aab 100644 --- a/kpovmodeler/pmplaneedit.cpp +++ b/kpovmodeler/pmplaneedit.cpp @@ -21,14 +21,14 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kmessagebox.h> -PMPlaneEdit::PMPlaneEdit( QWidget* parent, const char* name ) +PMPlaneEdit::PMPlaneEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -38,28 +38,28 @@ void PMPlaneEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout; + TQHBoxLayout* layout; m_pNormal = new PMVectorEdit( "x", "y", "z", this ); m_pDistance = new PMFloatEdit( this ); - layout = new QHBoxLayout( topLayout( ) ); - layout->addWidget( new QLabel( i18n( "Normal:" ), this ) ); + layout = new TQHBoxLayout( topLayout( ) ); + layout->addWidget( new TQLabel( i18n( "Normal:" ), this ) ); layout->addWidget( m_pNormal ); - layout = new QHBoxLayout( topLayout( ) ); - layout->addWidget( new QLabel( i18n( "Distance:" ), this ) ); + layout = new TQHBoxLayout( topLayout( ) ); + layout->addWidget( new TQLabel( i18n( "Distance:" ), this ) ); layout->addWidget( m_pDistance ); layout->addStretch( 1 ); - QPushButton* nb = new QPushButton( i18n( "Normalize" ), this ); - layout = new QHBoxLayout( topLayout( ) ); + TQPushButton* nb = new TQPushButton( i18n( "Normalize" ), this ); + layout = new TQHBoxLayout( topLayout( ) ); layout->addWidget( nb ); layout->addStretch( 1 ); - connect( m_pNormal, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDistance, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( nb, SIGNAL( clicked( ) ), SLOT( slotNormalize( ) ) ); + connect( m_pNormal, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDistance, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( nb, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotNormalize( ) ) ); } void PMPlaneEdit::slotNormalize( ) diff --git a/kpovmodeler/pmplaneedit.h b/kpovmodeler/pmplaneedit.h index 97a07467..80e72e47 100644 --- a/kpovmodeler/pmplaneedit.h +++ b/kpovmodeler/pmplaneedit.h @@ -29,7 +29,7 @@ class PMVectorEdit; class PMFloatEdit; class PMPlane; -class QCheckBox; +class TQCheckBox; class PMPlaneEdit : public PMSolidObjectEdit { @@ -39,7 +39,7 @@ public: /** * Creates a PMPlaneEdit with parent and name */ - PMPlaneEdit( QWidget* parent, const char* name = 0 ); + PMPlaneEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmplanenormalcontrolpoint.cpp b/kpovmodeler/pmplanenormalcontrolpoint.cpp index f28c035e..bfafb697 100644 --- a/kpovmodeler/pmplanenormalcontrolpoint.cpp +++ b/kpovmodeler/pmplanenormalcontrolpoint.cpp @@ -22,7 +22,7 @@ PMPlaneNormalControlPoint::PMPlaneNormalControlPoint( PMDistanceControlPoint* d, const PMVector& normal, int id, - const QString& description ) + const TQString& description ) : PMControlPoint( id, description ) { m_normal = normal; diff --git a/kpovmodeler/pmplanenormalcontrolpoint.h b/kpovmodeler/pmplanenormalcontrolpoint.h index 0faf10b8..ccff2000 100644 --- a/kpovmodeler/pmplanenormalcontrolpoint.h +++ b/kpovmodeler/pmplanenormalcontrolpoint.h @@ -40,7 +40,7 @@ public: * is changed, too! */ PMPlaneNormalControlPoint( PMDistanceControlPoint* d, const PMVector& normal, - int id, const QString& description ); + int id, const TQString& description ); /** * Deletes the PMPlaneNormalControlPoint */ diff --git a/kpovmodeler/pmpluginmanager.cpp b/kpovmodeler/pmpluginmanager.cpp index 0921f79d..7af50d5c 100644 --- a/kpovmodeler/pmpluginmanager.cpp +++ b/kpovmodeler/pmpluginmanager.cpp @@ -21,8 +21,8 @@ #include "pmfactory.h" #include "pmdebug.h" -#include <qmap.h> -#include <qapplication.h> +#include <tqmap.h> +#include <tqapplication.h> #include <kparts/plugin.h> #include <kxmlguifactory.h> @@ -38,7 +38,7 @@ class PMPluginWorkaround : public Plugin { public: PMPluginWorkaround( ) : Plugin( 0, 0 ) { }; - static QValueList<Plugin::PluginInfo> installedPlugins( const KInstance* instance ) + static TQValueList<Plugin::PluginInfo> installedPlugins( const KInstance* instance ) { return pluginInfos( instance ); } @@ -49,16 +49,16 @@ PMPluginManager::PMPluginManager( ) // find installed plugins KConfigGroup cfgGroup( PMFactory::instance( )->config( ), "KParts Plugins" ); - QValueList<Plugin::PluginInfo> plugins + TQValueList<Plugin::PluginInfo> plugins = PMPluginWorkaround::installedPlugins( PMFactory::instance( ) ); - QValueList<Plugin::PluginInfo>::ConstIterator pIt = plugins.begin( ); - QValueList<Plugin::PluginInfo>::ConstIterator pEnd = plugins.end( ); + TQValueList<Plugin::PluginInfo>::ConstIterator pIt = plugins.begin( ); + TQValueList<Plugin::PluginInfo>::ConstIterator pEnd = plugins.end( ); for( ; pIt != pEnd; ++pIt ) { - QDomElement docElem = ( *pIt ).m_document.documentElement( ); - QString name = docElem.attribute( "name" ); - QString description = docElem.attribute( "description" ); + TQDomElement docElem = ( *pIt ).m_document.documentElement( ); + TQString name = docElem.attribute( "name" ); + TQString description = docElem.attribute( "description" ); if( !description.isEmpty( ) ) description = i18n( description.latin1( ) ); bool enabled = cfgGroup.readBoolEntry( name + "Enabled", false ); @@ -97,13 +97,13 @@ void PMPluginManager::updatePlugins( ) { KConfigGroup cfgGroup( PMFactory::instance( )->config( ), "KParts Plugins" ); - QPtrListIterator<PMPluginInfo> pit( m_plugins ); + TQPtrListIterator<PMPluginInfo> pit( m_plugins ); for( ; *pit; ++pit ) cfgGroup.writeEntry( ( *pit )->name( ) + "Enabled", ( *pit )->enabled( ) ); cfgGroup.sync( ); - QPtrListIterator<PMPart> it( m_parts ); + TQPtrListIterator<PMPart> it( m_parts ); for( ; *it; ++it ) { Plugin::loadPlugins( *it, *it, PMFactory::instance( ), false ); diff --git a/kpovmodeler/pmpluginmanager.h b/kpovmodeler/pmpluginmanager.h index 9424e014..364658a0 100644 --- a/kpovmodeler/pmpluginmanager.h +++ b/kpovmodeler/pmpluginmanager.h @@ -20,8 +20,8 @@ #include <kstaticdeleter.h> -#include <qstring.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqptrlist.h> class PMPart; @@ -34,7 +34,7 @@ public: /** * Default constructor */ - PMPluginInfo( const QString& name, const QString& description, + PMPluginInfo( const TQString& name, const TQString& description, bool enabled ) { m_name = name; @@ -44,11 +44,11 @@ public: /** * Returns the plugin name */ - QString name( ) const { return m_name; } + TQString name( ) const { return m_name; } /** * Returns the plugin description (i18n'ed) */ - QString description( ) const { return m_description; } + TQString description( ) const { return m_description; } /** * Returns true if the plugin is enabled */ @@ -58,7 +58,7 @@ public: */ void enable( bool en ) { m_enabled = en; } private: - QString m_name, m_description; + TQString m_name, m_description; bool m_enabled; }; @@ -91,7 +91,7 @@ public: /** * Returns a list of available plugins */ - QPtrList<PMPluginInfo> plugins( ) const { return m_plugins; } + TQPtrList<PMPluginInfo> plugins( ) const { return m_plugins; } /** * Loads and unloads plugins for all parts when plugins were activated or * deactivated @@ -103,8 +103,8 @@ private: */ PMPluginManager( ); - QPtrList<PMPluginInfo> m_plugins; - QPtrList<PMPart> m_parts; + TQPtrList<PMPluginInfo> m_plugins; + TQPtrList<PMPart> m_parts; static PMPluginManager* s_pInstance; static KStaticDeleter<PMPluginManager> s_staticDeleter; diff --git a/kpovmodeler/pmpluginsettings.cpp b/kpovmodeler/pmpluginsettings.cpp index 6b6611f2..0a635845 100644 --- a/kpovmodeler/pmpluginsettings.cpp +++ b/kpovmodeler/pmpluginsettings.cpp @@ -19,17 +19,17 @@ #include "pmpluginmanager.h" -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlistview.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlistview.h> +#include <tqpushbutton.h> #include <klocale.h> class PMPluginListViewItem : public QListViewItem { public: - PMPluginListViewItem( QListView* parent, PMPluginInfo* info ) - : QListViewItem( parent, info->name( ), info->description( ) ) + PMPluginListViewItem( TQListView* parent, PMPluginInfo* info ) + : TQListViewItem( parent, info->name( ), info->description( ) ) { m_info = info; m_enabled = info->enabled( ); @@ -51,29 +51,29 @@ public: bool m_enabled; }; -PMPluginSettings::PMPluginSettings( QWidget* parent, const char* name ) +PMPluginSettings::PMPluginSettings( TQWidget* parent, const char* name ) : PMSettingsDialogPage( parent, name ) { - QVBoxLayout* vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) ); + TQVBoxLayout* vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); - QGroupBox* gb = new QGroupBox( i18n( "Installed Plugins" ), this ); + TQGroupBox* gb = new TQGroupBox( i18n( "Installed Plugins" ), this ); vlayout->addWidget( gb ); - QVBoxLayout* gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + TQVBoxLayout* gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - m_pPluginsList = new QListView( gb ); - connect( m_pPluginsList, SIGNAL( selectionChanged( ) ), - SLOT( slotSelectionChanged( ) ) ); + m_pPluginsList = new TQListView( gb ); + connect( m_pPluginsList, TQT_SIGNAL( selectionChanged( ) ), + TQT_SLOT( slotSelectionChanged( ) ) ); m_pPluginsList->addColumn( i18n( "Name" ) ); m_pPluginsList->addColumn( i18n( "Description" ) ); m_pPluginsList->addColumn( i18n( "Status" ) ); gvl->addWidget( m_pPluginsList, 1 ); - QHBoxLayout* hl = new QHBoxLayout( gvl ); - m_pToggle = new QPushButton( i18n( "Load" ), gb ); + TQHBoxLayout* hl = new TQHBoxLayout( gvl ); + m_pToggle = new TQPushButton( i18n( "Load" ), gb ); m_pToggle->setEnabled( false ); - connect( m_pToggle, SIGNAL( clicked( ) ), SLOT( slotToggle( ) ) ); + connect( m_pToggle, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotToggle( ) ) ); hl->addWidget( m_pToggle ); hl->addStretch( 1 ); @@ -82,8 +82,8 @@ PMPluginSettings::PMPluginSettings( QWidget* parent, const char* name ) void PMPluginSettings::displaySettings( ) { - QPtrList<PMPluginInfo> plugins = PMPluginManager::theManager( )->plugins( ); - QPtrListIterator<PMPluginInfo> it( plugins ); + TQPtrList<PMPluginInfo> plugins = PMPluginManager::theManager( )->plugins( ); + TQPtrListIterator<PMPluginInfo> it( plugins ); m_pPluginsList->clear( ); for( ; *it; ++it ) diff --git a/kpovmodeler/pmpluginsettings.h b/kpovmodeler/pmpluginsettings.h index 1ee9191a..186ca074 100644 --- a/kpovmodeler/pmpluginsettings.h +++ b/kpovmodeler/pmpluginsettings.h @@ -24,9 +24,9 @@ #include "pmsettingsdialog.h" -class QFrame; -class QListView; -class QPushButton; +class TQFrame; +class TQListView; +class TQPushButton; /** * Plugins configuration dialog page @@ -38,7 +38,7 @@ public: /** * Default constructor */ - PMPluginSettings( QWidget* parent, const char* name = 0 ); + PMPluginSettings( TQWidget* parent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ @@ -53,9 +53,9 @@ protected slots: void slotSelectionChanged( ); private: - QFrame* m_pPluginOptions; - QListView* m_pPluginsList; - QPushButton* m_pToggle; + TQFrame* m_pPluginOptions; + TQListView* m_pPluginsList; + TQPushButton* m_pToggle; }; diff --git a/kpovmodeler/pmpoint.h b/kpovmodeler/pmpoint.h index 729d60c0..553358ab 100644 --- a/kpovmodeler/pmpoint.h +++ b/kpovmodeler/pmpoint.h @@ -21,7 +21,7 @@ #define PMPOINT_H #include "GL/gl.h" -#include <qmemarray.h> +#include <tqmemarray.h> class PMVector; class PMMatrix; @@ -114,9 +114,9 @@ private: }; /** - * @ref QMemArray of PMPoints + * @ref TQMemArray of PMPoints */ -typedef QMemArray<PMPoint> PMPointArray; +typedef TQMemArray<PMPoint> PMPointArray; #endif diff --git a/kpovmodeler/pmpolynom.cpp b/kpovmodeler/pmpolynom.cpp index 93555a58..e44044c5 100644 --- a/kpovmodeler/pmpolynom.cpp +++ b/kpovmodeler/pmpolynom.cpp @@ -103,7 +103,7 @@ PMPolynom::~PMPolynom( ) { } -QString PMPolynom::description( ) const +TQString PMPolynom::description( ) const { if( m_order == 2 ) return i18n( "quadric" ); @@ -114,7 +114,7 @@ QString PMPolynom::description( ) const return i18n( "polynom" ); } -void PMPolynom::serialize( QDomElement& e, QDomDocument& doc ) const +void PMPolynom::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "order", m_order ); e.setAttribute( "coefficients", m_coefficients.serializeXML( ) ); @@ -158,7 +158,7 @@ void PMPolynom::cleanUp( ) const Base::cleanUp( ); } -PMDialogEditBase* PMPolynom::editWidget( QWidget* parent ) const +PMDialogEditBase* PMPolynom::editWidget( TQWidget* parent ) const { return new PMPolynomEdit( parent ); } diff --git a/kpovmodeler/pmpolynom.h b/kpovmodeler/pmpolynom.h index dc59be67..65a9ad20 100644 --- a/kpovmodeler/pmpolynom.h +++ b/kpovmodeler/pmpolynom.h @@ -51,7 +51,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMPolynom( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -59,15 +59,15 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** */ - virtual QString pixmap( ) const { return QString( "pmpolynom" ); } + virtual TQString pixmap( ) const { return TQString( "pmpolynom" ); } /** * Returns a new @ref PMPolynomEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmpolynomedit.cpp b/kpovmodeler/pmpolynomedit.cpp index b236a8c6..e0e3bebc 100644 --- a/kpovmodeler/pmpolynomedit.cpp +++ b/kpovmodeler/pmpolynomedit.cpp @@ -22,14 +22,14 @@ #include "pmlineedits.h" #include "pmformulalabel.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qspinbox.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqspinbox.h> +#include <tqlabel.h> #include <klocale.h> #include <kdialog.h> -PMPolynomEdit::PMPolynomEdit( QWidget* parent, const char* name ) +PMPolynomEdit::PMPolynomEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -41,19 +41,19 @@ void PMPolynomEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Order" ), this ) ); - m_pOrder = new QSpinBox( 2, 7, 1, this ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Order" ), this ) ); + m_pOrder = new TQSpinBox( 2, 7, 1, this ); hl->addWidget( m_pOrder ); hl->addStretch( 1 ); - connect( m_pOrder, SIGNAL( valueChanged( int ) ), SLOT( slotOrderChanged( int ) ) ); + connect( m_pOrder, TQT_SIGNAL( valueChanged( int ) ), TQT_SLOT( slotOrderChanged( int ) ) ); - topLayout( )->addWidget( new QLabel( i18n( "Formula:" ), this ) ); - m_pPolyWidget = new QWidget( this ); + topLayout( )->addWidget( new TQLabel( i18n( "Formula:" ), this ) ); + m_pPolyWidget = new TQWidget( this ); topLayout( )->addWidget( m_pPolyWidget ); - m_pSturm = new QCheckBox( i18n( "Sturm" ), this ); + m_pSturm = new TQCheckBox( i18n( "Sturm" ), this ); topLayout( )->addWidget( m_pSturm ); - connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMPolynomEdit::displayObject( PMObject* o ) @@ -89,7 +89,7 @@ void PMPolynomEdit::displayObject( PMObject* o ) void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder, int dOrder ) { - QValueList<PMPolynomExponents>& polynom + TQValueList<PMPolynomExponents>& polynom = PMPolynomExponents::polynom( dOrder ); if( dOrder != m_currentOrder ) @@ -111,15 +111,15 @@ void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder, int nr = ( nedit + 2 ) / 3; int i; - QGridLayout* gl = new QGridLayout( m_pPolyWidget, nr * 2 - 1, 9, 0 ); - QLabel* l = 0; + TQGridLayout* gl = new TQGridLayout( m_pPolyWidget, nr * 2 - 1, 9, 0 ); + TQLabel* l = 0; PMFloatEdit* edit; PMFormulaLabel* fl; - QValueList<PMPolynomExponents>::ConstIterator it = polynom.begin( ); - QString text; + TQValueList<PMPolynomExponents>::ConstIterator it = polynom.begin( ); + TQString text; int row, col; - QString plus( "+" ); + TQString plus( "+" ); for( i = 0; it != polynom.end( ); i++, ++it ) { @@ -128,14 +128,14 @@ void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder, if( i != 0 ) { - l = new QLabel( plus, m_pPolyWidget ); + l = new TQLabel( plus, m_pPolyWidget ); m_labels.append( l ); gl->addWidget( l, row, col ); l->show( ); } edit = new PMFloatEdit( m_pPolyWidget ); - connect( edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); m_edits.append( edit ); gl->addWidget( edit, row, col + 1 ); edit->show( ); @@ -157,18 +157,18 @@ void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder, if( dOrder == cOrder ) { - QPtrListIterator<PMFloatEdit> eit( m_edits ); + TQPtrListIterator<PMFloatEdit> eit( m_edits ); int i; for( i = 0; *eit; ++eit, ++i ) ( *eit )->setValue( co[i] ); } else if( dOrder > cOrder ) { - QValueList<PMPolynomExponents>::ConstIterator dit = polynom.begin( ); - QValueList<PMPolynomExponents>& cpoly + TQValueList<PMPolynomExponents>::ConstIterator dit = polynom.begin( ); + TQValueList<PMPolynomExponents>& cpoly = PMPolynomExponents::polynom( cOrder ); - QValueList<PMPolynomExponents>::ConstIterator cit = cpoly.begin( ); - QPtrListIterator<PMFloatEdit> eit( m_edits ); + TQValueList<PMPolynomExponents>::ConstIterator cit = cpoly.begin( ); + TQPtrListIterator<PMFloatEdit> eit( m_edits ); int i = 0; for( ; ( dit != polynom.end( ) ) && ( cit != cpoly.end( ) ); ++dit, ++eit ) @@ -187,11 +187,11 @@ void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder, } else // dOrder < cOrder { - QValueList<PMPolynomExponents>::ConstIterator dit = polynom.begin( ); - QValueList<PMPolynomExponents>& cpoly + TQValueList<PMPolynomExponents>::ConstIterator dit = polynom.begin( ); + TQValueList<PMPolynomExponents>& cpoly = PMPolynomExponents::polynom( cOrder ); - QValueList<PMPolynomExponents>::ConstIterator cit = cpoly.begin( ); - QPtrListIterator<PMFloatEdit> eit( m_edits ); + TQValueList<PMPolynomExponents>::ConstIterator cit = cpoly.begin( ); + TQPtrListIterator<PMFloatEdit> eit( m_edits ); int i = 0; for( ; ( dit != polynom.end( ) ) && ( cit != cpoly.end( ) ); ++cit, ++i ) @@ -210,7 +210,7 @@ void PMPolynomEdit::displayCoefficients( const PMVector& co, int cOrder, PMVector PMPolynomEdit::coefficients( ) const { - QPtrListIterator<PMFloatEdit> eit( m_edits ); + TQPtrListIterator<PMFloatEdit> eit( m_edits ); int num = m_edits.count( ); PMVector v( num ); int i; @@ -235,7 +235,7 @@ void PMPolynomEdit::saveContents( ) bool PMPolynomEdit::isDataValid( ) { - QPtrListIterator<PMFloatEdit> eit( m_edits ); + TQPtrListIterator<PMFloatEdit> eit( m_edits ); for( ; *eit; ++eit ) if( !( *eit )->isDataValid( ) ) return false; diff --git a/kpovmodeler/pmpolynomedit.h b/kpovmodeler/pmpolynomedit.h index 6ffb05b4..1d745437 100644 --- a/kpovmodeler/pmpolynomedit.h +++ b/kpovmodeler/pmpolynomedit.h @@ -25,13 +25,13 @@ #endif #include "pmsolidobjectedit.h" -#include <qptrlist.h> +#include <tqptrlist.h> class PMPolynom; class PMFloatEdit; class PMFormulaLabel; -class QSpinBox; -class QCheckBox; +class TQSpinBox; +class TQCheckBox; /** * Dialog edit class for @ref PMPolynom @@ -44,7 +44,7 @@ public: /** * Creates a PMPolynomEdit with parent and name */ - PMPolynomEdit( QWidget* parent, const char* name = 0 ); + PMPolynomEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -68,11 +68,11 @@ private: int m_currentOrder; - QWidget* m_pPolyWidget; - QPtrList<QWidget> m_labels; - QPtrList<PMFloatEdit> m_edits; - QCheckBox* m_pSturm; - QSpinBox* m_pOrder; + TQWidget* m_pPolyWidget; + TQPtrList<TQWidget> m_labels; + TQPtrList<PMFloatEdit> m_edits; + TQCheckBox* m_pSturm; + TQSpinBox* m_pOrder; bool m_readOnly; }; diff --git a/kpovmodeler/pmpolynomexponents.cpp b/kpovmodeler/pmpolynomexponents.cpp index fdda7bdf..a8d82b19 100644 --- a/kpovmodeler/pmpolynomexponents.cpp +++ b/kpovmodeler/pmpolynomexponents.cpp @@ -20,7 +20,7 @@ bool PMPolynomExponents::m_created[6] = { false, false, false, false, false, false }; -QValueList<PMPolynomExponents> PMPolynomExponents::m_lists[6]; +TQValueList<PMPolynomExponents> PMPolynomExponents::m_lists[6]; PMPolynomExponents operator+ ( const PMPolynomExponents& p1, const PMPolynomExponents& p2 ) @@ -30,7 +30,7 @@ PMPolynomExponents operator+ ( const PMPolynomExponents& p1, p1.m_exponents[2] + p2.m_exponents[2] ); } -QValueList<PMPolynomExponents>& PMPolynomExponents::polynom( int n ) +TQValueList<PMPolynomExponents>& PMPolynomExponents::polynom( int n ) { if( ( n < 2 ) || ( n > 7 ) ) { @@ -48,11 +48,11 @@ QValueList<PMPolynomExponents>& PMPolynomExponents::polynom( int n ) return m_lists[n-2]; } -QValueList<PMPolynomExponents> +TQValueList<PMPolynomExponents> PMPolynomExponents::recPolynom( const PMPolynomExponents& base, int xyz, int n, int rem ) { - QValueList<PMPolynomExponents> res; + TQValueList<PMPolynomExponents> res; if( n >= 0 ) { diff --git a/kpovmodeler/pmpolynomexponents.h b/kpovmodeler/pmpolynomexponents.h index 6f1812ba..cd2b39b6 100644 --- a/kpovmodeler/pmpolynomexponents.h +++ b/kpovmodeler/pmpolynomexponents.h @@ -24,8 +24,8 @@ #include <config.h> #endif -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> /** * Helper class for the @ref PMPolynomBaseEdit widget @@ -117,13 +117,13 @@ public: /** * Returns the exponents for a polynom with order n ( 2 <= n <= 7 ) */ - static QValueList<PMPolynomExponents>& polynom( int n ); + static TQValueList<PMPolynomExponents>& polynom( int n ); private: - static QValueList<PMPolynomExponents> //... + static TQValueList<PMPolynomExponents> //... recPolynom( const PMPolynomExponents& base, int xyz, int n, int rem ); static bool m_created[6]; - static QValueList<PMPolynomExponents> m_lists[6]; + static TQValueList<PMPolynomExponents> m_lists[6]; }; #endif diff --git a/kpovmodeler/pmpovray31format.cpp b/kpovmodeler/pmpovray31format.cpp index 417dd177..dc2bb54e 100644 --- a/kpovmodeler/pmpovray31format.cpp +++ b/kpovmodeler/pmpovray31format.cpp @@ -109,17 +109,17 @@ PMPovray31Format::~PMPovray31Format( ) } -PMParser* PMPovray31Format::newParser( PMPart* part, QIODevice* dev ) const +PMParser* PMPovray31Format::newParser( PMPart* part, TQIODevice* dev ) const { return new PMPovrayParser( part, dev ); } -PMParser* PMPovray31Format::newParser( PMPart* part, const QByteArray& data ) const +PMParser* PMPovray31Format::newParser( PMPart* part, const TQByteArray& data ) const { return new PMPovrayParser( part, data ); } -PMSerializer* PMPovray31Format::newSerializer( QIODevice* dev ) +PMSerializer* PMPovray31Format::newSerializer( TQIODevice* dev ) { return new PMOutputDevice( dev, this ); } @@ -130,24 +130,24 @@ PMRenderer* PMPovray31Format::newRenderer( PMPart* ) const return 0; } -QString PMPovray31Format::mimeType( ) const +TQString PMPovray31Format::mimeType( ) const { - return QString( "text/plain" ); + return TQString( "text/plain" ); } -QStringList PMPovray31Format::importPatterns( ) const +TQStringList PMPovray31Format::importPatterns( ) const { - QStringList result; - result.push_back( QString( "*.pov *.inc|" ) + TQStringList result; + result.push_back( TQString( "*.pov *.inc|" ) + i18n( "POV-Ray 3.1 Files (*.pov, *.inc)" ) ); return result; } -QStringList PMPovray31Format::exportPatterns( ) const +TQStringList PMPovray31Format::exportPatterns( ) const { - QStringList result; - result.push_back( QString( "*.pov|" ) + i18n( "POV-Ray 3.1 Files (*.pov)" ) ); - result.push_back( QString( "*.ini|" ) + i18n( "POV-Ray 3.1 Include Files (*.ini)" ) ); + TQStringList result; + result.push_back( TQString( "*.pov|" ) + i18n( "POV-Ray 3.1 Files (*.pov)" ) ); + result.push_back( TQString( "*.ini|" ) + i18n( "POV-Ray 3.1 Include Files (*.ini)" ) ); return result; } diff --git a/kpovmodeler/pmpovray31format.h b/kpovmodeler/pmpovray31format.h index a0e3453e..4765093d 100644 --- a/kpovmodeler/pmpovray31format.h +++ b/kpovmodeler/pmpovray31format.h @@ -40,25 +40,25 @@ public: virtual ~PMPovray31Format( ); /** */ - virtual QString name( ) const { return "povray31"; }; + virtual TQString name( ) const { return "povray31"; }; /** */ - virtual QString description( ) const { return "POV-Ray 3.1"; } + virtual TQString description( ) const { return "POV-Ray 3.1"; } /** */ virtual int services( ) const { return AllServices; } /** */ - virtual PMParser* newParser( PMPart*, QIODevice* ) const; + virtual PMParser* newParser( PMPart*, TQIODevice* ) const; /** */ - virtual PMParser* newParser( PMPart*, const QByteArray& ) const; + virtual PMParser* newParser( PMPart*, const TQByteArray& ) const; /** */ - virtual PMSerializer* newSerializer( QIODevice* ); + virtual PMSerializer* newSerializer( TQIODevice* ); /** */ virtual PMRenderer* newRenderer( PMPart* ) const; /** */ - virtual QString mimeType( ) const; + virtual TQString mimeType( ) const; /** */ - virtual QStringList importPatterns( ) const; + virtual TQStringList importPatterns( ) const; /** */ - virtual QStringList exportPatterns( ) const; + virtual TQStringList exportPatterns( ) const; }; #endif diff --git a/kpovmodeler/pmpovray31serialization.cpp b/kpovmodeler/pmpovray31serialization.cpp index dd4b7603..d153261d 100644 --- a/kpovmodeler/pmpovray31serialization.cpp +++ b/kpovmodeler/pmpovray31serialization.cpp @@ -26,7 +26,7 @@ void PMPov31SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObj PMBicubicPatch* o = ( PMBicubicPatch* ) object; int u, v; - QString str, line; + TQString str, line; dev->objectBegin( "bicubic_patch" ); dev->writeName( object->name( ) ); @@ -47,7 +47,7 @@ void PMPov31SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObj { line = o->controlPoint( v*4 ).serialize( ); for( u = 1; u < 4; u++ ) - line += QString( ", " ) + o->controlPoint( u+4*v ).serialize( ); + line += TQString( ", " ) + o->controlPoint( u+4*v ).serialize( ); if( v != 3 ) line += ","; dev->writeLine( line ); @@ -61,7 +61,7 @@ void PMPov31SerBlendMapModifiers( const PMObject* object, const PMMetaObject*, P { PMBlendMapModifiers* o = ( PMBlendMapModifiers* ) object; - QString str; + TQString str; if( o->isFrequencyEnabled( ) ) { @@ -109,7 +109,7 @@ void PMPov31SerBlob( const PMObject* object, const PMMetaObject* metaObject, PMO dev->objectBegin( "blob" ); dev->writeName( object->name( ) ); - dev->writeLine( QString( "threshold %1" ).arg( o->threshold( ) ) ); + dev->writeLine( TQString( "threshold %1" ).arg( o->threshold( ) ) ); dev->callSerialization( object, metaObject->superClass( ) ); @@ -128,11 +128,11 @@ void PMPov31SerBlobCylinder( const PMObject* object, const PMMetaObject* metaObj dev->objectBegin( "cylinder" ); dev->writeName( object->name( ) ); - QString str1; + TQString str1; str1.setNum( o->radius( ) ); dev->writeLine( o->end1( ).serialize( ) + ", " + o->end2( ).serialize( ) + ", " + str1 + "," ); - dev->writeLine( QString( "strength %1" ).arg( o->strength( ) ) ); + dev->writeLine( TQString( "strength %1" ).arg( o->strength( ) ) ); dev->callSerialization( object, metaObject->superClass( ) ); dev->objectEnd( ); @@ -144,8 +144,8 @@ void PMPov31SerBlobSphere( const PMObject* object, const PMMetaObject* metaObjec dev->objectBegin( "sphere" ); dev->writeName( object->name( ) ); - dev->writeLine( o->centre( ).serialize( ) + QString( ", %1," ).arg( o->radius( ) ) ); - dev->writeLine( QString( "strength %1" ).arg( o->strength( ) ) ); + dev->writeLine( o->centre( ).serialize( ) + TQString( ", %1," ).arg( o->radius( ) ) ); + dev->writeLine( TQString( "strength %1" ).arg( o->strength( ) ) ); dev->callSerialization( object, metaObject->superClass( ) ); dev->objectEnd( ); } @@ -178,7 +178,7 @@ void PMPov31SerBumpMap( const PMObject* object, const PMMetaObject*, PMOutputDev { PMBumpMap* o = ( PMBumpMap* ) object; - QString str1; + TQString str1; dev->objectBegin( "bump_map" ); @@ -262,7 +262,7 @@ void PMPov31SerCamera( const PMObject* object, const PMMetaObject* metaObject, P PMCamera* o = ( PMCamera* ) object; dev->objectBegin( "camera" ); - QString str; + TQString str; dev->writeName( object->name( ) ); @@ -341,13 +341,13 @@ void PMPov31SerCone( const PMObject* object, const PMMetaObject* metaObject, PMO dev->objectBegin( "cone" ); dev->writeName( object->name( ) ); - QString str1; + TQString str1; str1.setNum( o->radius1( ) ); dev->writeLine( o->end1( ).serialize( ) + ", " + str1 + "," ); str1.setNum( o->radius2( ) ); dev->writeLine( o->end2( ).serialize( ) + ", " + str1 ); if( o->open( ) ) - dev->writeLine( QString( "open" ) ); + dev->writeLine( TQString( "open" ) ); dev->callSerialization( object, metaObject->superClass( ) ); dev->objectEnd( ); @@ -385,12 +385,12 @@ void PMPov31SerCylinder( const PMObject* object, const PMMetaObject* metaObject, dev->objectBegin( "cylinder" ); dev->writeName( object->name( ) ); - QString str1; + TQString str1; str1.setNum( o->radius( ) ); dev->writeLine( o->end1( ).serialize( ) + ", " + o->end2( ).serialize( ) + ", " + str1 ); if( o->open( ) ) - dev->writeLine( QString( "open" ) ); + dev->writeLine( TQString( "open" ) ); dev->callSerialization( object, metaObject->superClass( ) ); dev->objectEnd( ); @@ -428,7 +428,7 @@ void PMPov31SerDisc( const PMObject* object, const PMMetaObject* metaObject, PMO dev->objectBegin( "disc" ); dev->writeName( object->name( ) ); - QString str1, str2; + TQString str1, str2; str1.setNum( o->radius( ) ); if( o->radius( ) != 0.0 ) { @@ -447,7 +447,7 @@ void PMPov31SerFinish( const PMObject* object, const PMMetaObject* metaObject, P { PMFinish* o = ( PMFinish* ) object; - QString str1; + TQString str1; dev->objectBegin( "finish" ); @@ -525,7 +525,7 @@ void PMPov31SerFog( const PMObject* object, const PMMetaObject*, PMOutputDevice* { PMFog* o = ( PMFog* ) object; - QString str; + TQString str; dev->objectBegin( "fog" ); @@ -539,12 +539,12 @@ void PMPov31SerFog( const PMObject* object, const PMMetaObject*, PMOutputDevice* dev->writeLine( o->linkedObject( )->id( ) ); else { - QString text; + TQString text; text = o->name( ); if( text.isEmpty( ) ) text = o->description( ); - dev->writeComment( QString( "No prototype for %1" ).arg( text ) ); + dev->writeComment( TQString( "No prototype for %1" ).arg( text ) ); } } @@ -615,7 +615,7 @@ void PMPov31SerGlobalSettings( const PMObject* object, const PMMetaObject*, PMOu { PMGlobalSettings* o = ( PMGlobalSettings* ) object; - QString str1; + TQString str1; dev->objectBegin( "global_settings" ); @@ -727,7 +727,7 @@ void PMPov31SerHeightField( const PMObject* object, const PMMetaObject* metaObje dev->writeLine( o->typeToString( o->heightFieldType( ) ) + " \"" + o->fileName( ) + "\"" ); if( o->waterLevel( ) > 0.0 ) - dev->writeLine( QString( "water_level %1" ).arg( o->waterLevel( ) ) ); + dev->writeLine( TQString( "water_level %1" ).arg( o->waterLevel( ) ) ); if( !o->hierarchy( ) ) dev->writeLine( "hierarchy off" ); if( o->smooth( ) ) @@ -741,10 +741,10 @@ void PMPov31SerImageMap( const PMObject* object, const PMMetaObject*, PMOutputDe { PMImageMap* o = ( PMImageMap* ) object; - typedef QValueList<PMPaletteValue> PMPaletteValueList; + typedef TQValueList<PMPaletteValue> PMPaletteValueList; PMPaletteValueList values; PMPaletteValueList::ConstIterator tmpPalette; - QString str1, str2; + TQString str1, str2; dev->objectBegin( "image_map" ); @@ -846,7 +846,7 @@ void PMPov31SerInterior( const PMObject* object, const PMMetaObject* metaObject, { PMInterior* o = ( PMInterior* ) object; - QString str1; + TQString str1; dev->objectBegin( "interior" ); dev->callSerialization( object, metaObject->superClass( ) ); @@ -885,14 +885,14 @@ void PMPov31SerJuliaFractal( const PMObject* object, const PMMetaObject* metaObj dev->writeLine( o->algebraTypeToString( o->algebraType( ) ) ); if( o->functionType( ) == PMJuliaFractal::FTpwr ) - dev->writeLine( QString( "pwr(%1, %2)" ).arg( o->exponent( )[0] ). + dev->writeLine( TQString( "pwr(%1, %2)" ).arg( o->exponent( )[0] ). arg( o->exponent( )[1] ) ); else dev->writeLine( o->functionTypeToString( o->functionType( ) ) ); - dev->writeLine( QString( "max_iteration %1" ).arg( o->maximumIterations( ) ) ); - dev->writeLine( QString( "precision %1" ).arg( o->precision( ) ) ); - dev->writeLine( QString( "slice %1, %2" ).arg( o->sliceNormal( ).serialize( ) ) + dev->writeLine( TQString( "max_iteration %1" ).arg( o->maximumIterations( ) ) ); + dev->writeLine( TQString( "precision %1" ).arg( o->precision( ) ) ); + dev->writeLine( TQString( "slice %1, %2" ).arg( o->sliceNormal( ).serialize( ) ) .arg( o->sliceDistance( ) ) ); @@ -925,11 +925,11 @@ void PMPov31SerLathe( const PMObject* object, const PMMetaObject* metaObject, PM } int num = o->points( ).count( ); - dev->writeLine( QString( "%1," ).arg( num ) ); + dev->writeLine( TQString( "%1," ).arg( num ) ); bool first = true; - QValueList<PMVector> points = o->points( ); - QValueList<PMVector>::ConstIterator it = points.begin( ); + TQValueList<PMVector> points = o->points( ); + TQValueList<PMVector>::ConstIterator it = points.begin( ); for( ; it != points.end( ); ++it ) { if( !first ) @@ -953,49 +953,49 @@ void PMPov31SerLight( const PMObject* object, const PMMetaObject* metaObject, PM { PMLight* o = ( PMLight* ) object; - dev->objectBegin( QString( "light_source" ) ); + dev->objectBegin( TQString( "light_source" ) ); dev->writeName( object->name( ) ); dev->writeLine( o->location( ).serialize( ) + ", " + o->color( ).serialize( ) ); if( o->lightType( ) == PMLight::SpotLight ) - dev->writeLine( QString( "spotlight" ) ); + dev->writeLine( TQString( "spotlight" ) ); else if( o->lightType( ) == PMLight::CylinderLight ) - dev->writeLine( QString( "cylinder" ) ); + dev->writeLine( TQString( "cylinder" ) ); else if( o->lightType( ) == PMLight::ShadowlessLight ) - dev->writeLine( QString( "shadowless" ) ); + dev->writeLine( TQString( "shadowless" ) ); if( ( o->lightType( ) == PMLight::SpotLight ) || ( o->lightType( ) == PMLight::CylinderLight ) ) { - dev->writeLine( QString( "radius %1" ).arg( o->radius( ) ) ); - dev->writeLine( QString( "falloff %1" ).arg( o->falloff( ) ) ); + dev->writeLine( TQString( "radius %1" ).arg( o->radius( ) ) ); + dev->writeLine( TQString( "falloff %1" ).arg( o->falloff( ) ) ); if( o->tightness( ) != c_defaultLightTightness ) - dev->writeLine( QString( "tightness %1" ).arg( o->tightness( ) ) ); - dev->writeLine( QString( "point_at " ) + o->pointAt( ).serialize( ) ); + dev->writeLine( TQString( "tightness %1" ).arg( o->tightness( ) ) ); + dev->writeLine( TQString( "point_at " ) + o->pointAt( ).serialize( ) ); } if( o->isAreaLight( ) ) { - dev->writeLine( QString( "area_light " ) + o->axis1( ).serialize( ) - + QString( ", " ) + o->axis2( ).serialize( ) - + QString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) ); + dev->writeLine( TQString( "area_light " ) + o->axis1( ).serialize( ) + + TQString( ", " ) + o->axis2( ).serialize( ) + + TQString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) ); if( o->adaptive( ) != c_defaultLightAdaptive ) - dev->writeLine( QString( "adaptive %1" ).arg( o->adaptive( ) ) ); + dev->writeLine( TQString( "adaptive %1" ).arg( o->adaptive( ) ) ); if( o->jitter( ) ) - dev->writeLine( QString( "jitter" ) ); + dev->writeLine( TQString( "jitter" ) ); } if( o->fading( ) ) { - dev->writeLine( QString( "fade_distance %1" ).arg( o->fadeDistance( ) ) ); - dev->writeLine( QString( "fade_power %1" ).arg( o->fadePower( ) ) ); + dev->writeLine( TQString( "fade_distance %1" ).arg( o->fadeDistance( ) ) ); + dev->writeLine( TQString( "fade_power %1" ).arg( o->fadePower( ) ) ); } if( !o->mediaInteraction( ) ) - dev->writeLine( QString( "media_interaction off" ) ); + dev->writeLine( TQString( "media_interaction off" ) ); if( !o->mediaAttenuation( ) ) - dev->writeLine( QString( "media_attenuation off" ) ); + dev->writeLine( TQString( "media_attenuation off" ) ); dev->callSerialization( object, metaObject->superClass( ) ); dev->objectEnd( ); @@ -1005,7 +1005,7 @@ void PMPov31SerListPattern( const PMObject* object, const PMMetaObject* metaObje { PMListPattern* o = ( PMListPattern* ) object; - QString str1; + TQString str1; switch( o->listType( ) ) { @@ -1055,7 +1055,7 @@ void PMPov31SerNormalList( const PMObject* object, const PMMetaObject*, PMOutput { PMNormalList* o = ( PMNormalList* ) object; - QString str1; + TQString str1; switch( o->listType( ) ) { @@ -1102,7 +1102,7 @@ void PMPov31SerMaterialMap( const PMObject* object, const PMMetaObject* metaObje { PMMaterialMap* o = ( PMMaterialMap* ) object; - QString str1; + TQString str1; dev->objectBegin( "material_map" ); @@ -1187,8 +1187,8 @@ void PMPov31SerMedia( const PMObject* object, const PMMetaObject* metaObject, PM { PMMedia* o = ( PMMedia* ) object; - QString str1; - QString str2; + TQString str1; + TQString str2; dev->objectBegin( "media" ); dev->callSerialization( object, metaObject->superClass( ) ); @@ -1257,7 +1257,7 @@ void PMPov31SerNormal( const PMObject* object, const PMMetaObject* metaObject, P { PMNormal* o = ( PMNormal* ) object; - QString str1; + TQString str1; bool bObject = true; if( o->parent( ) ) @@ -1297,12 +1297,12 @@ void PMPov31SerObjectLink( const PMObject* object, const PMMetaObject* metaObjec } if( writeComment ) { - QString text; + TQString text; text = o->name( ); if( text.isEmpty( ) ) text = o->description( ); - dev->writeComment( QString( "No prototype for %1" ).arg( text ) ); + dev->writeComment( TQString( "No prototype for %1" ).arg( text ) ); } } @@ -1314,7 +1314,7 @@ void PMPov31SerPattern( const PMObject* object, const PMMetaObject*, PMOutputDev { PMPattern* o = ( PMPattern* ) object; - QString str; + TQString str; // pattern type switch( o->patternType( ) ) @@ -1476,7 +1476,7 @@ void PMPov31SerPlane( const PMObject* object, const PMMetaObject* metaObject, PM dev->objectBegin( "plane" ); dev->writeName( object->name( ) ); - QString str1; + TQString str1; str1.setNum( o->distance( ) ); dev->writeLine( o->normal( ).serialize( ) + ", " + str1 ); dev->callSerialization( object, metaObject->superClass( ) ); @@ -1501,23 +1501,23 @@ void PMPov31SerPolynom( const PMObject* object, const PMMetaObject* metaObject, if( o->polynomOrder( ) == 2 ) { - dev->writeLine( QString( "<%1, %2, %3>," ).arg( coefficients[0] ) + dev->writeLine( TQString( "<%1, %2, %3>," ).arg( coefficients[0] ) .arg( coefficients[4] ).arg( coefficients[7] ) ); - dev->writeLine( QString( "<%1, %2, %3>," ).arg( coefficients[1] ) + dev->writeLine( TQString( "<%1, %2, %3>," ).arg( coefficients[1] ) .arg( coefficients[2] ).arg( coefficients[5] ) ); - dev->writeLine( QString( "<%1, %2, %3>, %4" ).arg( coefficients[3] ) + dev->writeLine( TQString( "<%1, %2, %3>, %4" ).arg( coefficients[3] ) .arg( coefficients[6] ).arg( coefficients[8] ) .arg( coefficients[9] ) ); } else { if( o->polynomOrder( ) > 4 ) - dev->writeLine( QString( "%1," ).arg( o->polynomOrder( ) ) ); + dev->writeLine( TQString( "%1," ).arg( o->polynomOrder( ) ) ); int size = coefficients.size( ); int i; - QString hlp; + TQString hlp; dev->write( "<" ); for( i = 0; i < size; i++ ) @@ -1545,13 +1545,13 @@ void PMPov31SerPovrayMatrix( const PMObject* object, const PMMetaObject*, PMOutp { PMPovrayMatrix* o = ( PMPovrayMatrix* ) object; - dev->writeLine( QString( "matrix < %1, %2, %3," ).arg( o->values( )[0] ) + dev->writeLine( TQString( "matrix < %1, %2, %3," ).arg( o->values( )[0] ) .arg( o->values( )[1] ).arg( o->values( )[2] ) ); - dev->writeLine( QString( " %1, %2, %3," ).arg( o->values( )[3] ) + dev->writeLine( TQString( " %1, %2, %3," ).arg( o->values( )[3] ) .arg( o->values( )[4] ).arg( o->values( )[5] ) ); - dev->writeLine( QString( " %1, %2, %3," ).arg( o->values( )[6] ) + dev->writeLine( TQString( " %1, %2, %3," ).arg( o->values( )[6] ) .arg( o->values( )[7] ).arg( o->values( )[8] ) ); - dev->writeLine( QString( " %1, %2, %3 >" ).arg( o->values( )[9] ) + dev->writeLine( TQString( " %1, %2, %3 >" ).arg( o->values( )[9] ) .arg( o->values( )[10] ).arg( o->values( )[11] ) ); } @@ -1587,11 +1587,11 @@ void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PM dev->writeLine( "conic_sweep" ); break; } - dev->writeLine( QString( "%1, %2," ).arg( o->height1( ) ).arg( o->height2( ) ) ); + dev->writeLine( TQString( "%1, %2," ).arg( o->height1( ) ).arg( o->height2( ) ) ); // count number of points - QValueList< QValueList<PMVector> > points = o->points( ); - QValueList< QValueList<PMVector> >::ConstIterator spit = points.begin( ); + TQValueList< TQValueList<PMVector> > points = o->points( ); + TQValueList< TQValueList<PMVector> >::ConstIterator spit = points.begin( ); int lines = 0; for( ; spit != points.end( ); ++spit ) { @@ -1600,14 +1600,14 @@ void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PM else lines += ( *spit ).count( ) / 3 * 4; } - dev->writeLine( QString( "%1," ).arg( lines ) ); + dev->writeLine( TQString( "%1," ).arg( lines ) ); for( spit = points.begin( ); spit != points.end( ); ++spit ) { bool first = true; - QValueList<PMVector> fullPoints = o->expandedPoints( *spit ); - QValueList<PMVector>::ConstIterator it = fullPoints.begin( ); + TQValueList<PMVector> fullPoints = o->expandedPoints( *spit ); + TQValueList<PMVector>::ConstIterator it = fullPoints.begin( ); for( ; it != fullPoints.end( ); ++it ) { @@ -1616,7 +1616,7 @@ void PMPov31SerPrism( const PMObject* object, const PMMetaObject* metaObject, PM dev->write( ( *it ).serialize( ) ); first = false; } - QValueList< QValueList<PMVector> >::ConstIterator spit2 = spit; + TQValueList< TQValueList<PMVector> >::ConstIterator spit2 = spit; spit2++; if( spit2 != points.end( ) ) dev->write( "," ); @@ -1643,7 +1643,7 @@ void PMPov31SerRainbow( const PMObject* object, const PMMetaObject* metaObject, { PMRainbow* o = ( PMRainbow* ) object; - QString str1; + TQString str1; dev->objectBegin( "rainbow" ); dev->callSerialization( object, metaObject->superClass( ) ); @@ -1691,8 +1691,8 @@ void PMPov31SerRaw( const PMObject* object, const PMMetaObject*, PMOutputDevice* dev->writeLine( "//*PMRawBegin" ); - QString tmp = o->code( ); - QTextStream str( &tmp, IO_ReadOnly ); + TQString tmp = o->code( ); + TQTextStream str( &tmp, IO_ReadOnly ); while( !str.atEnd( ) ) dev->writeLine( str.readLine( ) ); @@ -1704,8 +1704,8 @@ void PMPov31SerRotate( const PMObject* object, const PMMetaObject*, PMOutputDevi PMRotate* o = ( PMRotate* ) object; PMVector rotate = o->rotation( ); - QString vector; - QTextStream str( &vector, IO_WriteOnly ); + TQString vector; + TQTextStream str( &vector, IO_WriteOnly ); int i; bool z[3]; @@ -1756,7 +1756,7 @@ void PMPov31SerScale( const PMObject* object, const PMMetaObject* , PMOutputDevi if( approx( scale[0], scale[1] ) && approx( scale[1], scale[2] ) ) - dev->writeLine( QString( "scale %1" ).arg( scale[0] ) ); + dev->writeLine( TQString( "scale %1" ).arg( scale[0] ) ); else dev->writeLine( "scale " + scale.serialize( ) ); } @@ -1777,7 +1777,7 @@ void PMPov31SerSlope( const PMObject* object, const PMMetaObject* , PMOutputDevi { PMSlope* o = ( PMSlope* ) object; - QString str1,str2; + TQString str1,str2; str1.setNum(o->height( )); str2.setNum(o->slope( )); @@ -1821,11 +1821,11 @@ void PMPov31SerSurfaceOfRevolution( const PMObject* object, const PMMetaObject* dev->writeName( object->name( ) ); int num = o->points( ).count( ); - dev->writeLine( QString( "%1," ).arg( num ) ); + dev->writeLine( TQString( "%1," ).arg( num ) ); bool first = true; - QValueList<PMVector> points = o->points( ); - QValueList<PMVector>::ConstIterator it = points.begin( ); + TQValueList<PMVector> points = o->points( ); + TQValueList<PMVector>::ConstIterator it = points.begin( ); for( ; it != points.end( ); ++it ) { if( !first ) @@ -1850,7 +1850,7 @@ void PMPov31SerSphere( const PMObject* object, const PMMetaObject* metaObject, P dev->objectBegin( "sphere" ); dev->writeName( object->name( ) ); - QString str; + TQString str; str.setNum( o->radius( ) ); dev->writeLine( o->centre( ).serialize( ) + ", " + str ); dev->callSerialization( object, metaObject->superClass( ) ); @@ -1864,7 +1864,7 @@ void PMPov31SerSuperquadricEllipsoid( const PMObject* object, const PMMetaObject dev->objectBegin( "superellipsoid" ); dev->writeName( object->name( ) ); - dev->writeLine( QString( "<%1, %2>" ).arg( o->eastWestExponent( ) ) + dev->writeLine( TQString( "<%1, %2>" ).arg( o->eastWestExponent( ) ) .arg( o->northSouthExponent( ) ) ); dev->callSerialization( object, metaObject->superClass( ) ); @@ -1878,9 +1878,9 @@ void PMPov31SerText( const PMObject* object, const PMMetaObject* metaObject, PMO dev->objectBegin( "text" ); dev->writeName( object->name( ) ); - dev->writeLine( QString( "ttf \"" ) + o->font( ) + "\"" ); + dev->writeLine( TQString( "ttf \"" ) + o->font( ) + "\"" ); dev->writeLine( PMOutputDevice::escapeAndQuoteString( o->text( ) ) ); - dev->writeLine( QString( "%1, " ).arg( o->thickness( ) ) + dev->writeLine( TQString( "%1, " ).arg( o->thickness( ) ) + o->offset( ).serialize( ) ); dev->callSerialization( object, metaObject->superClass( ) ); @@ -1917,12 +1917,12 @@ void PMPov31SerTextureBase( const PMObject* object, const PMMetaObject* metaObje dev->writeLine( linkedObject->id( ) ); else { - QString text; + TQString text; text = o->name( ); if( text.isEmpty( ) ) text = o->description( ); - dev->writeComment( QString( "No prototype for %1" ).arg( text ) ); + dev->writeComment( TQString( "No prototype for %1" ).arg( text ) ); } } @@ -1933,8 +1933,8 @@ void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMO { PMTextureMapBase* o = ( PMTextureMapBase* ) object; - QValueList<double> mapValues = o->mapValues( ); - QValueList<double>::ConstIterator it = mapValues.begin( ); + TQValueList<double> mapValues = o->mapValues( ); + TQValueList<double>::ConstIterator it = mapValues.begin( ); PMObject* c = o->firstChild( ); double value = 0.0; @@ -1945,12 +1945,12 @@ void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMO dev->writeLine( o->linkedObject( )->id( ) ); else { - QString text; + TQString text; text = o->name( ); if( text.isEmpty( ) ) text = o->description( ); - dev->writeComment( QString( "No prototype for %1" ).arg( text ) ); + dev->writeComment( TQString( "No prototype for %1" ).arg( text ) ); } } @@ -1962,7 +1962,7 @@ void PMPov31SerTextureMapBase( const PMObject* object, const PMMetaObject* , PMO value = 1.0; if( it != mapValues.end( ) ) value = *it; - dev->write( QString( "[ %1 " ).arg( value ) ); + dev->write( TQString( "[ %1 " ).arg( value ) ); dev->serialize( c ); dev->writeLine( "]" ); ++it; @@ -2018,14 +2018,14 @@ void PMPov31SerTorus( const PMObject* object, const PMMetaObject* metaObject, PM dev->objectBegin( "torus" ); dev->writeName( object->name( ) ); - QString strMinor; - QString strMajor; + TQString strMinor; + TQString strMajor; strMinor.setNum( o->minorRadius( ) ); strMajor.setNum( o->majorRadius( ) ); dev->writeLine(strMajor + ", " + strMinor); if( o->sturm( ) ) - dev->writeLine( QString( "sturm" ) ); + dev->writeLine( TQString( "sturm" ) ); dev->callSerialization( object, metaObject->superClass( ) ); dev->objectEnd( ); @@ -2035,8 +2035,8 @@ void PMPov31SerTranslate( const PMObject* object, const PMMetaObject* , PMOutput { PMTranslate* o = ( PMTranslate* ) object; - QString vector; - QTextStream str( &vector, IO_WriteOnly ); + TQString vector; + TQTextStream str( &vector, IO_WriteOnly ); int i; bool z[3]; PMVector move = o->translation( ); @@ -2130,7 +2130,7 @@ void PMPov31SerWarp( const PMObject* object, const PMMetaObject* , PMOutputDevic { PMWarp* o = ( PMWarp* ) object; - QString str1; + TQString str1; dev->objectBegin( "warp" ); switch( o->warpType( ) ) diff --git a/kpovmodeler/pmpovray35format.cpp b/kpovmodeler/pmpovray35format.cpp index c00b1d65..438eb261 100644 --- a/kpovmodeler/pmpovray35format.cpp +++ b/kpovmodeler/pmpovray35format.cpp @@ -56,17 +56,17 @@ PMPovray35Format::~PMPovray35Format( ) } -PMParser* PMPovray35Format::newParser( PMPart* part, QIODevice* dev ) const +PMParser* PMPovray35Format::newParser( PMPart* part, TQIODevice* dev ) const { return new PMPovrayParser( part, dev ); } -PMParser* PMPovray35Format::newParser( PMPart* part, const QByteArray& data ) const +PMParser* PMPovray35Format::newParser( PMPart* part, const TQByteArray& data ) const { return new PMPovrayParser( part, data ); } -PMSerializer* PMPovray35Format::newSerializer( QIODevice* dev ) +PMSerializer* PMPovray35Format::newSerializer( TQIODevice* dev ) { return new PMOutputDevice( dev, this ); } @@ -77,24 +77,24 @@ PMRenderer* PMPovray35Format::newRenderer( PMPart* ) const return 0; } -QString PMPovray35Format::mimeType( ) const +TQString PMPovray35Format::mimeType( ) const { - return QString( "text/plain" ); + return TQString( "text/plain" ); } -QStringList PMPovray35Format::importPatterns( ) const +TQStringList PMPovray35Format::importPatterns( ) const { - QStringList result; - result.push_back( QString( "*.pov *.inc|" ) + TQStringList result; + result.push_back( TQString( "*.pov *.inc|" ) + i18n( "POV-Ray 3.5 Files (*.pov, *.inc)" ) ); return result; } -QStringList PMPovray35Format::exportPatterns( ) const +TQStringList PMPovray35Format::exportPatterns( ) const { - QStringList result; - result.push_back( QString( "*.pov|" ) + i18n( "POV-Ray 3.5 Files (*.pov)" ) ); - result.push_back( QString( "*.ini|" ) + i18n( "POV-Ray 3.5 Include Files (*.ini)" ) ); + TQStringList result; + result.push_back( TQString( "*.pov|" ) + i18n( "POV-Ray 3.5 Files (*.pov)" ) ); + result.push_back( TQString( "*.ini|" ) + i18n( "POV-Ray 3.5 Include Files (*.ini)" ) ); return result; } diff --git a/kpovmodeler/pmpovray35format.h b/kpovmodeler/pmpovray35format.h index 117d0375..85ebc9ec 100644 --- a/kpovmodeler/pmpovray35format.h +++ b/kpovmodeler/pmpovray35format.h @@ -40,25 +40,25 @@ public: virtual ~PMPovray35Format( ); /** */ - virtual QString name( ) const { return "povray35"; }; + virtual TQString name( ) const { return "povray35"; }; /** */ - virtual QString description( ) const { return "POV-Ray 3.5"; } + virtual TQString description( ) const { return "POV-Ray 3.5"; } /** */ virtual int services( ) const { return AllServices; } /** */ - virtual PMParser* newParser( PMPart*, QIODevice* ) const; + virtual PMParser* newParser( PMPart*, TQIODevice* ) const; /** */ - virtual PMParser* newParser( PMPart*, const QByteArray& ) const; + virtual PMParser* newParser( PMPart*, const TQByteArray& ) const; /** */ - virtual PMSerializer* newSerializer( QIODevice* ); + virtual PMSerializer* newSerializer( TQIODevice* ); /** */ virtual PMRenderer* newRenderer( PMPart* ) const; /** */ - virtual QString mimeType( ) const; + virtual TQString mimeType( ) const; /** */ - virtual QStringList importPatterns( ) const; + virtual TQStringList importPatterns( ) const; /** */ - virtual QStringList exportPatterns( ) const; + virtual TQStringList exportPatterns( ) const; }; #endif diff --git a/kpovmodeler/pmpovray35serialization.cpp b/kpovmodeler/pmpovray35serialization.cpp index 2c3a88e0..d567100e 100644 --- a/kpovmodeler/pmpovray35serialization.cpp +++ b/kpovmodeler/pmpovray35serialization.cpp @@ -61,19 +61,19 @@ const bool c_defaultIsoAllIntersections = false; void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* metaObject, PMOutputDevice* dev ) { PMIsoSurface* o = ( PMIsoSurface* ) object; - QString str; + TQString str; dev->objectBegin( "isosurface" ); dev->writeName( object->name( ) ); if( o->containedBy( ) == PMIsoSurface::Box ) { - dev->writeLine( QString( "function { " ) + o->function( ) + " }" ); + dev->writeLine( TQString( "function { " ) + o->function( ) + " }" ); if( o->corner1( ) != c_defaultIsoCorner1 || o->corner2( ) != c_defaultIsoCorner2 ) { - dev->writeLine( QString( "contained_by { box { " ) + + dev->writeLine( TQString( "contained_by { box { " ) + o->corner1( ).serialize( ) + ", " + o->corner2( ).serialize( ) + " } }" ); } @@ -81,7 +81,7 @@ void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* metaObjec else { str.setNum( o->radius( ) ); - dev->writeLine( QString( "contained_by { sphere { " ) + + dev->writeLine( TQString( "contained_by { sphere { " ) + o->center( ).serialize( ) + ", " + str + " } }" ); } @@ -102,7 +102,7 @@ void PMPov35SerIsoSurface( const PMObject* object, const PMMetaObject* metaObjec } if( o->evaluate( ) ) { - str = QString( "%1, %2, %3" ).arg( o->evaluateValue( 0 ) ) + str = TQString( "%1, %2, %3" ).arg( o->evaluateValue( 0 ) ) .arg( o->evaluateValue( 1 ) ).arg( o->evaluateValue( 2 ) ); dev->writeLine( "evaluate " + str ); } @@ -127,56 +127,56 @@ void PMPov35SerLight( const PMObject* object, const PMMetaObject* metaObject, PM { PMLight* o = ( PMLight* ) object; - dev->objectBegin( QString( "light_source" ) ); + dev->objectBegin( TQString( "light_source" ) ); dev->writeName( object->name( ) ); dev->writeLine( o->location( ).serialize( ) + ", " + o->color( ).serialize( ) ); if( o->lightType( ) == PMLight::SpotLight ) - dev->writeLine( QString( "spotlight" ) ); + dev->writeLine( TQString( "spotlight" ) ); else if( o->lightType( ) == PMLight::CylinderLight ) - dev->writeLine( QString( "cylinder" ) ); + dev->writeLine( TQString( "cylinder" ) ); else if( o->lightType( ) == PMLight::ShadowlessLight ) - dev->writeLine( QString( "shadowless" ) ); + dev->writeLine( TQString( "shadowless" ) ); if( o->parallel( ) ) - dev->writeLine( QString( "parallel" ) ); + dev->writeLine( TQString( "parallel" ) ); if( ( o->lightType( ) == PMLight::SpotLight ) || ( o->lightType( ) == PMLight::CylinderLight ) ) { - dev->writeLine( QString( "radius %1" ).arg( o->radius( ) ) ); - dev->writeLine( QString( "falloff %1" ).arg( o->falloff( ) ) ); + dev->writeLine( TQString( "radius %1" ).arg( o->radius( ) ) ); + dev->writeLine( TQString( "falloff %1" ).arg( o->falloff( ) ) ); if( o->tightness( ) != c_defaultLightTightness ) - dev->writeLine( QString( "tightness %1" ).arg( o->tightness( ) ) ); - dev->writeLine( QString( "point_at " ) + o->pointAt( ).serialize( ) ); + dev->writeLine( TQString( "tightness %1" ).arg( o->tightness( ) ) ); + dev->writeLine( TQString( "point_at " ) + o->pointAt( ).serialize( ) ); } if( o->isAreaLight( ) ) { - dev->writeLine( QString( "area_light " ) + o->axis1( ).serialize( ) - + QString( ", " ) + o->axis2( ).serialize( ) - + QString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) ); + dev->writeLine( TQString( "area_light " ) + o->axis1( ).serialize( ) + + TQString( ", " ) + o->axis2( ).serialize( ) + + TQString( ", %1, %2" ).arg( o->size1( ) ).arg( o->size2( ) ) ); if( o->adaptive( ) != c_defaultLightAdaptive ) - dev->writeLine( QString( "adaptive %1" ).arg( o->adaptive( ) ) ); + dev->writeLine( TQString( "adaptive %1" ).arg( o->adaptive( ) ) ); if( o->jitter( ) ) - dev->writeLine( QString( "jitter" ) ); + dev->writeLine( TQString( "jitter" ) ); if ( o->areaType( ) == PMLight::Circular ) - dev->writeLine( QString( "circular" ) ); + dev->writeLine( TQString( "circular" ) ); if ( o->orient( ) ) - dev->writeLine( QString( "orient" ) ); + dev->writeLine( TQString( "orient" ) ); } if( o->fading( ) ) { - dev->writeLine( QString( "fade_distance %1" ).arg( o->fadeDistance( ) ) ); - dev->writeLine( QString( "fade_power %1" ).arg( o->fadePower( ) ) ); + dev->writeLine( TQString( "fade_distance %1" ).arg( o->fadeDistance( ) ) ); + dev->writeLine( TQString( "fade_power %1" ).arg( o->fadePower( ) ) ); } if( !o->mediaInteraction( ) ) - dev->writeLine( QString( "media_interaction off" ) ); + dev->writeLine( TQString( "media_interaction off" ) ); if( !o->mediaAttenuation( ) ) - dev->writeLine( QString( "media_attenuation off" ) ); + dev->writeLine( TQString( "media_attenuation off" ) ); dev->callSerialization( object, metaObject->superClass( ) ); dev->objectEnd( ); @@ -213,7 +213,7 @@ void PMPov35SerGlobalSettings( const PMObject* object, const PMMetaObject* metaO { PMGlobalSettings* o = ( PMGlobalSettings* ) object; - QString str1; + TQString str1; dev->objectBegin( "global_settings" ); @@ -254,11 +254,11 @@ void PMPov35SerGlobalSettings( const PMObject* object, const PMMetaObject* metaO dev->writeLine( "number_of_waves " + str1 ); } if ( o->noiseGenerator( ) == PMGlobalSettings::Original ) - dev->writeLine( QString( "noise_generator 1" ) ); + dev->writeLine( TQString( "noise_generator 1" ) ); else if ( o->noiseGenerator( ) == PMGlobalSettings::RangeCorrected ) - dev->writeLine( QString( "noise_generator 2" ) ); + dev->writeLine( TQString( "noise_generator 2" ) ); else - dev->writeLine( QString( "noise_generator 3" ) ); + dev->writeLine( TQString( "noise_generator 3" ) ); if( o->isRadiosityEnabled( ) ) { dev->objectBegin( "radiosity" ); @@ -331,7 +331,7 @@ void PMPov35SerRadiosity( const PMObject* object, const PMMetaObject*, PMOutputD { PMRadiosity* o = ( PMRadiosity* ) object; - QString str1; + TQString str1; dev->objectBegin( "radiosity" ); @@ -434,7 +434,7 @@ void PMPov35SerGlobalPhotons( const PMObject* object, const PMMetaObject*, PMOut { PMGlobalPhotons* o = ( PMGlobalPhotons* ) object; - QString str1, str2; + TQString str1, str2; dev->objectBegin( "photons" ); @@ -506,7 +506,7 @@ void PMPov35SerGlobalPhotons( const PMObject* object, const PMMetaObject*, PMOut o->radiusMedia( ) != c_defaultGlobalPhotonsRadiusMedia || o->radiusMediaMulti( ) != c_defaultGlobalPhotonsRadiusMediaMulti ) { - QString str3, str4; + TQString str3, str4; str1.setNum( o->radiusGather( ) ); str2.setNum( o->radiusGatherMulti( ) ); str3.setNum( o->radiusMedia( ) ); @@ -522,18 +522,18 @@ void PMPov35SerPhotons( const PMObject* object, const PMMetaObject*, PMOutputDev { PMPhotons* o = ( PMPhotons* ) object; - QString str1; + TQString str1; dev->objectBegin( "photons" ); if( o->parent( ) && ( o->parent( )->type( ) == "Light" ) ) { if( o->refraction( ) ) - dev->writeLine( QString( "refraction on" ) ); + dev->writeLine( TQString( "refraction on" ) ); if( o->reflection( ) ) - dev->writeLine( QString( "reflection on" ) ); + dev->writeLine( TQString( "reflection on" ) ); if( o->areaLight( ) ) - dev->writeLine( QString( "area_light" ) ); + dev->writeLine( TQString( "area_light" ) ); } else { @@ -545,16 +545,16 @@ void PMPov35SerPhotons( const PMObject* object, const PMMetaObject*, PMOutputDev dev->writeLine( "target " + str1 ); } else - dev->writeLine( QString( "target" ) ); + dev->writeLine( TQString( "target" ) ); } if( o->refraction( ) ) - dev->writeLine( QString( "refraction on" ) ); + dev->writeLine( TQString( "refraction on" ) ); if( o->reflection( ) ) - dev->writeLine( QString( "reflection on" ) ); + dev->writeLine( TQString( "reflection on" ) ); if( !o->collect( ) ) - dev->writeLine( QString( "collect off" ) ); + dev->writeLine( TQString( "collect off" ) ); if( o->passThrough( ) ) - dev->writeLine( QString( "pass_through" ) ); + dev->writeLine( TQString( "pass_through" ) ); } dev->objectEnd( ); } @@ -563,7 +563,7 @@ void PMPov35SerInterior( const PMObject* object, const PMMetaObject* metaObject, { PMInterior* o = ( PMInterior* ) object; - QString str1; + TQString str1; dev->objectBegin( "interior" ); dev->callSerialization( object, metaObject->superClass( ) ); @@ -639,7 +639,7 @@ void PMPov35SerPattern( const PMObject* object, const PMMetaObject*, PMOutputDev { PMPattern* o = ( PMPattern* ) object; - QString str, str2; + TQString str, str2; // pattern type switch( o->patternType( ) ) @@ -849,13 +849,13 @@ void PMPov35SerPattern( const PMObject* object, const PMMetaObject*, PMOutputDev switch( o->noiseGenerator( ) ) { case PMPattern::Original: - dev->writeLine( QString( "noise_generator 1" ) ); + dev->writeLine( TQString( "noise_generator 1" ) ); break; case PMPattern::RangeCorrected: - dev->writeLine( QString( "noise_generator 2" ) ); + dev->writeLine( TQString( "noise_generator 2" ) ); break; case PMPattern::Perlin: - dev->writeLine( QString( "noise_generator 3" ) ); + dev->writeLine( TQString( "noise_generator 3" ) ); break; default: break; @@ -891,7 +891,7 @@ void PMPov35SerNormal( const PMObject* object, const PMMetaObject* metaObject, P { PMNormal* o = ( PMNormal* ) object; - QString str1; + TQString str1; bool bObject = true; if( o->parent( ) ) @@ -954,7 +954,7 @@ void PMPov35SerWarp( const PMObject* object, const PMMetaObject* , PMOutputDevic { PMWarp* o = ( PMWarp* ) object; - QString str1, str2; + TQString str1, str2; dev->objectBegin( "warp" ); switch( o->warpType( ) ) @@ -1061,23 +1061,23 @@ void PMPov35SerSphereSweep( const PMObject* object, const PMMetaObject* metaObje { PMSphereSweep* o = ( PMSphereSweep* ) object; - QString str1; + TQString str1; int numSpheres; - QValueList<PMVector> points; - QValueList<double> radii; + TQValueList<PMVector> points; + TQValueList<double> radii; dev->objectBegin( "sphere_sweep" ); switch( o->splineType( ) ) { case PMSphereSweep::LinearSpline: - dev->writeLine( QString( "linear_spline," ) ); + dev->writeLine( TQString( "linear_spline," ) ); break; case PMSphereSweep::BSpline: - dev->writeLine( QString( "b_spline," ) ); + dev->writeLine( TQString( "b_spline," ) ); break; case PMSphereSweep::CubicSpline: - dev->writeLine( QString( "cubic_spline," ) ); + dev->writeLine( TQString( "cubic_spline," ) ); break; } @@ -1107,7 +1107,7 @@ void PMPov35SerFinish( const PMObject* object, const PMMetaObject* metaObject, P { PMFinish* o = ( PMFinish* ) object; - QString str1; + TQString str1; dev->objectBegin( "finish" ); @@ -1249,8 +1249,8 @@ void PMPov35SerMedia( const PMObject* object, const PMMetaObject* metaObject, PM { PMMedia* o = ( PMMedia* ) object; - QString str1; - QString str2; + TQString str1; + TQString str2; dev->objectBegin( "media" ); dev->callSerialization( object, metaObject->superClass( ) ); @@ -1398,7 +1398,7 @@ void PMPov35SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObj PMBicubicPatch* o = ( PMBicubicPatch* ) object; int u, v; - QString str, line; + TQString str, line; dev->objectBegin( "bicubic_patch" ); dev->writeName( object->name( ) ); @@ -1427,7 +1427,7 @@ void PMPov35SerBicubicPatch( const PMObject* object, const PMMetaObject* metaObj { line = o->controlPoint( v*4 ).serialize( ); for( u = 1; u < 4; u++ ) - line += QString( ", " ) + o->controlPoint( u+4*v ).serialize( ); + line += TQString( ", " ) + o->controlPoint( u+4*v ).serialize( ); if( v != 3 ) line += ","; dev->writeLine( line ); diff --git a/kpovmodeler/pmpovrayformat.cpp b/kpovmodeler/pmpovrayformat.cpp index a2c48c80..35e0881a 100644 --- a/kpovmodeler/pmpovrayformat.cpp +++ b/kpovmodeler/pmpovrayformat.cpp @@ -29,7 +29,7 @@ PMPovrayFormat::~PMPovrayFormat( ) } -void PMPovrayFormat::registerMethod( const QString& className, +void PMPovrayFormat::registerMethod( const TQString& className, PMPovraySerializeMethod method ) { PMPovraySerializeMethodInfo* info = m_methodDict.find( className ); @@ -40,13 +40,13 @@ void PMPovrayFormat::registerMethod( const QString& className, m_methodDict.insert( className, info ); } -void PMPovrayFormat::removeMethod( const QString& className ) +void PMPovrayFormat::removeMethod( const TQString& className ) { m_methodDict.remove( className ); } const PMPovraySerializeMethodInfo* PMPovrayFormat::serializationMethod( - const QString& className ) + const TQString& className ) { return m_methodDict.find( className ); } diff --git a/kpovmodeler/pmpovrayformat.h b/kpovmodeler/pmpovrayformat.h index 398cae42..fe823618 100644 --- a/kpovmodeler/pmpovrayformat.h +++ b/kpovmodeler/pmpovrayformat.h @@ -72,23 +72,23 @@ public: /** * Registers the serialization method for the class className */ - void registerMethod( const QString& className, PMPovraySerializeMethod method ); + void registerMethod( const TQString& className, PMPovraySerializeMethod method ); /** * Removes a registered serialization method */ - void removeMethod( const QString& className ); + void removeMethod( const TQString& className ); /** * Returns the serialization methods info for the given object type * or 0 if there is none. */ const PMPovraySerializeMethodInfo* serializationMethod( - const QString& className ); + const TQString& className ); private: /** * Dict class name -> serialization method */ - QDict<PMPovraySerializeMethodInfo> m_methodDict; + TQDict<PMPovraySerializeMethodInfo> m_methodDict; }; #endif diff --git a/kpovmodeler/pmpovraymatrix.cpp b/kpovmodeler/pmpovraymatrix.cpp index 4100d46a..d51610f1 100644 --- a/kpovmodeler/pmpovraymatrix.cpp +++ b/kpovmodeler/pmpovraymatrix.cpp @@ -51,12 +51,12 @@ PMPovrayMatrix::~PMPovrayMatrix( ) { } -QString PMPovrayMatrix::description( ) const +TQString PMPovrayMatrix::description( ) const { return i18n( "matrix" ); } -void PMPovrayMatrix::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const +void PMPovrayMatrix::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const { e.setAttribute( "value", m_values.serializeXML( ) ); } @@ -108,7 +108,7 @@ void PMPovrayMatrix::setValues( const PMVector& v ) } } -PMDialogEditBase* PMPovrayMatrix::editWidget( QWidget* parent ) const +PMDialogEditBase* PMPovrayMatrix::editWidget( TQWidget* parent ) const { return new PMPovrayMatrixEdit( parent ); } diff --git a/kpovmodeler/pmpovraymatrix.h b/kpovmodeler/pmpovraymatrix.h index 25a1e03b..c4e0d886 100644 --- a/kpovmodeler/pmpovraymatrix.h +++ b/kpovmodeler/pmpovraymatrix.h @@ -50,7 +50,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMPovrayMatrix( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -58,15 +58,15 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMPovrayMatrixEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmmatrix" ); } + virtual TQString pixmap( ) const { return TQString( "pmmatrix" ); } /** * Returns the matrix values. diff --git a/kpovmodeler/pmpovraymatrixedit.cpp b/kpovmodeler/pmpovraymatrixedit.cpp index 0d78c226..1e0f7833 100644 --- a/kpovmodeler/pmpovraymatrixedit.cpp +++ b/kpovmodeler/pmpovraymatrixedit.cpp @@ -20,12 +20,12 @@ #include "pmpovraymatrix.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMPovrayMatrixEdit::PMPovrayMatrixEdit( QWidget* parent, const char* name ) +PMPovrayMatrixEdit::PMPovrayMatrixEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -36,21 +36,21 @@ void PMPovrayMatrixEdit::createTopWidgets( ) Base::createTopWidgets( ); int i, r, c; - QGridLayout* gl = new QGridLayout( topLayout( ), 4, 4 ); + TQGridLayout* gl = new TQGridLayout( topLayout( ), 4, 4 ); for( i = 0; i < 12; i++ ) { m_pValue[i] = new PMFloatEdit( this ); - connect( m_pValue[i], SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pValue[i], TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } for( r = 0; r < 4; r++ ) for( c = 0; c < 3; c++ ) gl->addWidget( m_pValue[r*3+c], r, c ); - gl->addWidget( new QLabel( "0.0", this ), 0, 3 ); - gl->addWidget( new QLabel( "0.0", this ), 1, 3 ); - gl->addWidget( new QLabel( "0.0", this ), 2, 3 ); - gl->addWidget( new QLabel( "1.0", this ), 3, 3 ); + gl->addWidget( new TQLabel( "0.0", this ), 0, 3 ); + gl->addWidget( new TQLabel( "0.0", this ), 1, 3 ); + gl->addWidget( new TQLabel( "0.0", this ), 2, 3 ); + gl->addWidget( new TQLabel( "1.0", this ), 3, 3 ); } void PMPovrayMatrixEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmpovraymatrixedit.h b/kpovmodeler/pmpovraymatrixedit.h index 2dbd41ae..4b3b3512 100644 --- a/kpovmodeler/pmpovraymatrixedit.h +++ b/kpovmodeler/pmpovraymatrixedit.h @@ -40,7 +40,7 @@ public: /** * Creates a PMPovrayMatrixEdit with parent and name */ - PMPovrayMatrixEdit( QWidget* parent, const char* name = 0 ); + PMPovrayMatrixEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmpovrayoutputwidget.cpp b/kpovmodeler/pmpovrayoutputwidget.cpp index b0d4ca73..f7eb9da4 100644 --- a/kpovmodeler/pmpovrayoutputwidget.cpp +++ b/kpovmodeler/pmpovrayoutputwidget.cpp @@ -17,8 +17,8 @@ #include "pmpovrayoutputwidget.h" -#include <qtextedit.h> -#include <qlayout.h> +#include <tqtextedit.h> +#include <tqlayout.h> #include <klocale.h> #include <kglobalsettings.h> @@ -28,25 +28,25 @@ #include "pmdebug.h" -QSize PMPovrayOutputWidget::s_size = QSize( 400, 400 ); +TQSize PMPovrayOutputWidget::s_size = TQSize( 400, 400 ); -PMPovrayOutputWidget::PMPovrayOutputWidget( QWidget* parent, const char* name ) +PMPovrayOutputWidget::PMPovrayOutputWidget( TQWidget* parent, const char* name ) : KDialog( parent, name ) { - QVBoxLayout* topLayout = new QVBoxLayout( this, KDialog::marginHint( ), KDialog::spacingHint( ) ); + TQVBoxLayout* topLayout = new TQVBoxLayout( this, KDialog::marginHint( ), KDialog::spacingHint( ) ); - m_pTextView = new QTextEdit( this ); + m_pTextView = new TQTextEdit( this ); topLayout->addWidget( m_pTextView, 1 ); m_pTextView->setFont( KGlobalSettings::fixedFont( ) ); m_pTextView->setTextFormat( Qt::PlainText ); m_pTextView->setReadOnly( true ); - QHBoxLayout* buttonLayout = new QHBoxLayout( topLayout ); + TQHBoxLayout* buttonLayout = new TQHBoxLayout( topLayout ); buttonLayout->addStretch( 1 ); - QPushButton* closeButton = new KPushButton( KStdGuiItem::close(), this ); + TQPushButton* closeButton = new KPushButton( KStdGuiItem::close(), this ); buttonLayout->addWidget( closeButton ); closeButton->setDefault( true ); - connect( closeButton, SIGNAL( clicked( ) ), SLOT( hide( ) ) ); + connect( closeButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( hide( ) ) ); setCaption( i18n( "Povray Output" ) ); resize( s_size ); @@ -60,18 +60,18 @@ PMPovrayOutputWidget::~PMPovrayOutputWidget( ) void PMPovrayOutputWidget::slotClear( ) { - m_output = QString::null; + m_output = TQString::null; m_startOfLastLine = 0; m_pTextView->clear( ); } -void PMPovrayOutputWidget::slotText( const QString& output ) +void PMPovrayOutputWidget::slotText( const TQString& output ) { unsigned int i; for( i = 0; i < output.length( ); i++ ) { - QChar c = output[i]; + TQChar c = output[i]; if( c == '\r' ) m_output.truncate( m_startOfLastLine ); else if( c == '\n' ) @@ -103,11 +103,11 @@ void PMPovrayOutputWidget::restoreConfig( KConfig* cfg ) { cfg->setGroup( "Appearance" ); - QSize defaultSize( 500, 400 ); + TQSize defaultSize( 500, 400 ); s_size = cfg->readSizeEntry( "PovrayOutputWidgetSize", &defaultSize ); } -void PMPovrayOutputWidget::resizeEvent( QResizeEvent* ev ) +void PMPovrayOutputWidget::resizeEvent( TQResizeEvent* ev ) { s_size = ev->size( ); } diff --git a/kpovmodeler/pmpovrayoutputwidget.h b/kpovmodeler/pmpovrayoutputwidget.h index faac7352..e617dba1 100644 --- a/kpovmodeler/pmpovrayoutputwidget.h +++ b/kpovmodeler/pmpovrayoutputwidget.h @@ -25,7 +25,7 @@ #include <kdialog.h> -class QTextEdit; +class TQTextEdit; class KConfig; /** @@ -38,7 +38,7 @@ public: /** * Standard constructor */ - PMPovrayOutputWidget( QWidget* parent = 0, const char* name = 0 ); + PMPovrayOutputWidget( TQWidget* parent = 0, const char* name = 0 ); /** * Destructor */ @@ -55,7 +55,7 @@ public slots: /** * Adds the text to the output */ - void slotText( const QString& output ); + void slotText( const TQString& output ); protected slots: /** @@ -64,13 +64,13 @@ protected slots: void slotClose( ); protected: - virtual void resizeEvent( QResizeEvent* ev ); + virtual void resizeEvent( TQResizeEvent* ev ); private: - QTextEdit* m_pTextView; + TQTextEdit* m_pTextView; int m_startOfLastLine; - QString m_output; - static QSize s_size; + TQString m_output; + static TQSize s_size; }; diff --git a/kpovmodeler/pmpovrayparser.cpp b/kpovmodeler/pmpovrayparser.cpp index 88bd8393..3755ce42 100644 --- a/kpovmodeler/pmpovrayparser.cpp +++ b/kpovmodeler/pmpovrayparser.cpp @@ -19,7 +19,7 @@ #include "pmpovrayparser.h" #include <klocale.h> -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "pmpart.h" #include "pmscanner.h" @@ -31,13 +31,13 @@ #include "pmxmlhelper.h" -PMPovrayParser::PMPovrayParser( PMPart* part, QIODevice* dev ) +PMPovrayParser::PMPovrayParser( PMPart* part, TQIODevice* dev ) : PMParser( part, dev ) { init( ); } -PMPovrayParser::PMPovrayParser( PMPart* part, const QByteArray& array ) +PMPovrayParser::PMPovrayParser( PMPart* part, const TQByteArray& array ) : PMParser( part, array ) { init( ); @@ -70,7 +70,7 @@ void PMPovrayParser::nextToken( ) // create the objects (string) only if necessary PMComment* c; int lastCommentLine = -2; - QString commentText; + TQString commentText; while( ( m_token == SCANNER_ERROR_TOK ) || ( m_token == COMMENT_TOK ) || ( m_token == LINE_COMMENT_TOK ) || ( m_token == PMNAME_TOK ) ) @@ -697,7 +697,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, nextToken( ); if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); nextToken( ); if( !parseToken( '=' ) ) @@ -825,7 +825,7 @@ bool PMPovrayParser::parseChildObjects( PMCompositeObject* parent, return finished; } -bool PMPovrayParser::parseToken( int t, const QString& tokenName ) +bool PMPovrayParser::parseToken( int t, const TQString& tokenName ) { if( t == ',' ) { @@ -2871,7 +2871,7 @@ bool PMPovrayParser::parseLathe( PMLathe* pNewLathe ) if( !parseInt( nump ) ) return false; - QValueList<PMVector> points; + TQValueList<PMVector> points; for( i = 0; i < nump; i++ ) { parseToken( ',' ); @@ -2976,7 +2976,7 @@ bool PMPovrayParser::parsePrism( PMPrism* pNewPrism ) if( !parseInt( nump ) ) return false; - QValueList<PMVector> allPoints; + TQValueList<PMVector> allPoints; for( i = 0; i < nump; i++ ) { parseToken( ',' ); @@ -2986,9 +2986,9 @@ bool PMPovrayParser::parsePrism( PMPrism* pNewPrism ) allPoints.append( vector ); } - QValueList< QValueList<PMVector> > points; - QValueList<PMVector> subPoints; - QValueList<PMVector>::Iterator it = allPoints.begin( ); + TQValueList< TQValueList<PMVector> > points; + TQValueList<PMVector> subPoints; + TQValueList<PMVector>::Iterator it = allPoints.begin( ); int pnr = 0, pmod4; PMVector ref( 2 ), ref2( 2 ); bool error = false; @@ -3205,7 +3205,7 @@ bool PMPovrayParser::parseSor( PMSurfaceOfRevolution* pNewSor ) if( !parseInt( nump ) ) return false; - QValueList<PMVector> points; + TQValueList<PMVector> points; for( i = 0; i < nump; i++ ) { parseToken( ',' ); @@ -3219,9 +3219,9 @@ bool PMPovrayParser::parseSor( PMSurfaceOfRevolution* pNewSor ) printError( i18n( "At least 4 points are needed for the surface of revolution" ) ); else { - QValueList<PMVector>::Iterator it1 = points.begin( ); - QValueList<PMVector>::Iterator it2 = it1; ++it2; - QValueList<PMVector>::Iterator it3 = it2; ++it3; + TQValueList<PMVector>::Iterator it1 = points.begin( ); + TQValueList<PMVector>::Iterator it2 = it1; ++it2; + TQValueList<PMVector>::Iterator it3 = it2; ++it3; int pnr = 0; for( ; it3 != points.end( ); ++it1, ++it2, ++it3, pnr++ ) @@ -3740,7 +3740,7 @@ bool PMPovrayParser::parseTexture( PMTexture* texture, bool parseOuter ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -4396,7 +4396,7 @@ bool PMPovrayParser::parsePigment( PMPigment* pigment, bool parseOuter ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMSymbol* s = getSymbol( id ); bool skipID = false; @@ -4477,7 +4477,7 @@ bool PMPovrayParser::parseNormal( PMNormal* normal ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -4526,7 +4526,7 @@ bool PMPovrayParser::parseTextureMap( PMTextureMap* textureMap ) int oldConsumed; double f_number1; PMTexture* texture; - QValueList<double> mapValues; + TQValueList<double> mapValues; if( !parseToken( TEXTURE_MAP_TOK, "texture_map" ) ) return false; @@ -4535,7 +4535,7 @@ bool PMPovrayParser::parseTextureMap( PMTextureMap* textureMap ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -4582,7 +4582,7 @@ bool PMPovrayParser::parsePigmentMap( PMPigmentMap* pigmentMap ) int oldConsumed; double f_number1; PMPigment* pigment; - QValueList<double> mapValues; + TQValueList<double> mapValues; if( !parseToken( PIGMENT_MAP_TOK, "pigment_map" ) ) return false; @@ -4591,7 +4591,7 @@ bool PMPovrayParser::parsePigmentMap( PMPigmentMap* pigmentMap ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -4635,7 +4635,7 @@ bool PMPovrayParser::parseNormalMap( PMNormalMap* normalMap ) int oldConsumed; double f_number1; PMNormal* normal; - QValueList<double> mapValues; + TQValueList<double> mapValues; if( !parseToken( NORMAL_MAP_TOK, "normal_map" ) ) return false; @@ -4644,7 +4644,7 @@ bool PMPovrayParser::parseNormalMap( PMNormalMap* normalMap ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -4935,7 +4935,7 @@ bool PMPovrayParser::parseSlopeMap( PMSlopeMap* slopeMap ) int oldConsumed; double f_number1; PMSlope* slope; - QValueList<double> mapValues; + TQValueList<double> mapValues; if( !parseToken( SLOPE_MAP_TOK, "slope_map" ) ) return false; @@ -4944,7 +4944,7 @@ bool PMPovrayParser::parseSlopeMap( PMSlopeMap* slopeMap ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -4991,7 +4991,7 @@ bool PMPovrayParser::parseDensityMap( PMDensityMap* densityMap ) int oldConsumed; double f_number1; PMDensity* density; - QValueList<double> mapValues; + TQValueList<double> mapValues; if( !parseToken( DENSITY_MAP_TOK, "density_map" ) ) return false; @@ -5000,7 +5000,7 @@ bool PMPovrayParser::parseDensityMap( PMDensityMap* densityMap ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -5048,8 +5048,8 @@ bool PMPovrayParser::parseImageMap( PMImageMap* imageMap ) int i_number; double f_number; PMPaletteValue newPaletteValue; - QValueList<PMPaletteValue> l_valuesFilter; - QValueList<PMPaletteValue> l_valuesTransmit; + TQValueList<PMPaletteValue> l_valuesFilter; + TQValueList<PMPaletteValue> l_valuesTransmit; if( !parseToken( IMAGE_MAP_TOK, "image_map" ) ) return false; @@ -5353,7 +5353,7 @@ bool PMPovrayParser::parseColorMap( PMColorMap* colorMap ) PMColor color1, color2; PMSolidColor* solidColor; PMSolidColor* lastColor = 0; - QValueList<double> mapValues; + TQValueList<double> mapValues; bool newEntry; bool twoColors; @@ -5365,7 +5365,7 @@ bool PMPovrayParser::parseColorMap( PMColorMap* colorMap ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -5482,7 +5482,7 @@ bool PMPovrayParser::parseSkySphere( PMSkySphere* sky ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -5518,7 +5518,7 @@ bool PMPovrayParser::parseRainbow( PMRainbow* rainbow ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -5626,7 +5626,7 @@ bool PMPovrayParser::parseFog( PMFog* fog ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -5752,7 +5752,7 @@ bool PMPovrayParser::parseMedia( PMMedia* media ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -5880,7 +5880,7 @@ bool PMPovrayParser::parseDensity( PMDensity* density ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -5916,7 +5916,7 @@ bool PMPovrayParser::parseInterior( PMInterior* interior ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -6004,7 +6004,7 @@ bool PMPovrayParser::parseMaterial( PMMaterial* material ) if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -6150,7 +6150,7 @@ bool PMPovrayParser::parseFinish( PMFinish* finish ) // Parse a possible declare link identifier if( m_token == ID_TOK ) { - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -6640,7 +6640,7 @@ bool PMPovrayParser::parseObjectLink( PMObjectLink* link ) return false; } - QString id( m_pScanner->sValue( ) ); + TQString id( m_pScanner->sValue( ) ); PMDeclare* decl = checkLink( id ); if( decl ) { @@ -6692,7 +6692,7 @@ bool PMPovrayParser::parseIsoSurface( PMIsoSurface* iso ) nextToken( ); if( m_token != FUNCTION_TOK ) return false; - iso->setFunction( QString( m_pScanner->sValue( ) ).simplifyWhiteSpace( ) ); + iso->setFunction( TQString( m_pScanner->sValue( ) ).simplifyWhiteSpace( ) ); nextToken( ); parseToken( '}' ); @@ -7105,8 +7105,8 @@ bool PMPovrayParser::parseInteriorTexture( PMInteriorTexture* it ) bool PMPovrayParser::parseSphereSweep( PMSphereSweep* ss ) { int oldConsumed, numspheres; - QValueList<PMVector> points; - QValueList<double> radii; + TQValueList<PMVector> points; + TQValueList<double> radii; PMVector point; double f; diff --git a/kpovmodeler/pmpovrayparser.h b/kpovmodeler/pmpovrayparser.h index b41beaf9..72306508 100644 --- a/kpovmodeler/pmpovrayparser.h +++ b/kpovmodeler/pmpovrayparser.h @@ -117,11 +117,11 @@ public: /** * Parser that parses the device */ - PMPovrayParser( PMPart* part, QIODevice* device ); + PMPovrayParser( PMPart* part, TQIODevice* device ); /** * Parser that parses the byte array */ - PMPovrayParser( PMPart* part, const QByteArray& array ); + PMPovrayParser( PMPart* part, const TQByteArray& array ); /** * Deletes the parser */ @@ -179,7 +179,7 @@ private: * If t is not a single character token, set tokenName to the token * name (like "box", "sphere" ...) */ - bool parseToken( int t, const QString& tokenName = QString::null ); + bool parseToken( int t, const TQString& tokenName = TQString::null ); /** * Parses an item of a vector, float or color expression @@ -520,10 +520,10 @@ private: /** * All comments are skipped during parsing and stored here */ - QPtrList<PMComment> m_skippedComments; + TQPtrList<PMComment> m_skippedComments; /** * The last skipped comment text with special kpovmodeler tags*/ - QString m_lastPMComment; + TQString m_lastPMComment; /** * true if m_lastPMComment is empty */ diff --git a/kpovmodeler/pmpovrayrenderwidget.cpp b/kpovmodeler/pmpovrayrenderwidget.cpp index 3cd44f20..7581cbea 100644 --- a/kpovmodeler/pmpovrayrenderwidget.cpp +++ b/kpovmodeler/pmpovrayrenderwidget.cpp @@ -26,10 +26,10 @@ #include <kconfig.h> #include <kurl.h> #include <ktempfile.h> -#include <qcolor.h> -#include <qpainter.h> -#include <qtextstream.h> -#include <qdragobject.h> +#include <tqcolor.h> +#include <tqpainter.h> +#include <tqtextstream.h> +#include <tqdragobject.h> #ifdef KDE_NO_COMPAT #undef KDE_NO_COMPAT @@ -37,10 +37,10 @@ #include <kapplication.h> -QString PMPovrayRenderWidget::s_povrayCommand = c_defaultPovrayCommand; -QStringList PMPovrayRenderWidget::s_libraryPaths; +TQString PMPovrayRenderWidget::s_povrayCommand = c_defaultPovrayCommand; +TQStringList PMPovrayRenderWidget::s_libraryPaths; -PMPovrayRenderWidget::PMPovrayRenderWidget( QWidget* parent, const char* name ) +PMPovrayRenderWidget::PMPovrayRenderWidget( TQWidget* parent, const char* name ) : PMDragWidget( parent, name ) { m_pProcess = 0; @@ -50,7 +50,7 @@ PMPovrayRenderWidget::PMPovrayRenderWidget( QWidget* parent, const char* name ) m_bPixmapUpToDate = false; m_pTempFile = 0; - setBackgroundColor( QColor( 0, 0, 0 ) ); + setBackgroundColor( TQColor( 0, 0, 0 ) ); } PMPovrayRenderWidget::~PMPovrayRenderWidget( ) @@ -58,7 +58,7 @@ PMPovrayRenderWidget::~PMPovrayRenderWidget( ) cleanup( ); } -bool PMPovrayRenderWidget::render( const QByteArray& scene, +bool PMPovrayRenderWidget::render( const TQByteArray& scene, const PMRenderMode& m, const KURL& documentURL ) { @@ -74,8 +74,8 @@ bool PMPovrayRenderWidget::render( const QByteArray& scene, } // output to tmp file - m_pTempFile = new KTempFile( QString::null, ".pov" ); - QDataStream* dstr = m_pTempFile->dataStream( ); + m_pTempFile = new KTempFile( TQString::null, ".pov" ); + TQDataStream* dstr = m_pTempFile->dataStream( ); if( ( m_pTempFile->status( ) != 0 ) || !dstr ) { @@ -87,29 +87,29 @@ bool PMPovrayRenderWidget::render( const QByteArray& scene, m_pTempFile->close( ); m_pProcess = new KProcess( ); - connect( m_pProcess, SIGNAL( receivedStdout( KProcess*, char*, int ) ), - SLOT( slotPovrayImage( KProcess*, char*, int ) ) ); - connect( m_pProcess, SIGNAL( receivedStderr( KProcess*, char*, int ) ), - SLOT( slotPovrayMessage( KProcess*, char*, int ) ) ); - connect( m_pProcess, SIGNAL( processExited( KProcess* ) ), - SLOT( slotRenderingFinished( KProcess* ) ) ); + connect( m_pProcess, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ), + TQT_SLOT( slotPovrayImage( KProcess*, char*, int ) ) ); + connect( m_pProcess, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ), + TQT_SLOT( slotPovrayMessage( KProcess*, char*, int ) ) ); + connect( m_pProcess, TQT_SIGNAL( processExited( KProcess* ) ), + TQT_SLOT( slotRenderingFinished( KProcess* ) ) ); *m_pProcess << s_povrayCommand; - QStringList::ConstIterator it; - QStringList args = m_renderMode.commandLineSwitches( ); + TQStringList::ConstIterator it; + TQStringList args = m_renderMode.commandLineSwitches( ); for( it = args.begin( ); it != args.end( ); ++it ) *m_pProcess << *it; for( it = s_libraryPaths.begin( ); it != s_libraryPaths.end( ); ++it ) { - QString path = *it; - if( path != QString( "/" ) ) - if( path.right( 1 ) == QString( "/" ) ) + TQString path = *it; + if( path != TQString( "/" ) ) + if( path.right( 1 ) == TQString( "/" ) ) path.truncate( path.length( ) - 1 ); - *m_pProcess << ( QString( "+L" ) + path ); + *m_pProcess << ( TQString( "+L" ) + path ); } - *m_pProcess << QString( "+I" ) + m_pTempFile->name( ) << "+O-" << "+FT" + *m_pProcess << TQString( "+I" ) + m_pTempFile->name( ) << "+O-" << "+FT" << "+K0.0" << "+KFI1" << "+KFF1" << "+KI0.0" << "+KF0.0" << "+SF1" << "+EF1" << "-KC" << "-D"; @@ -182,7 +182,7 @@ void PMPovrayRenderWidget::resumeRendering( ) void PMPovrayRenderWidget::slotPovrayMessage( KProcess*, char* buffer, int buflen ) { - QString str; + TQString str; str.setLatin1( buffer, buflen ); m_povrayOutput += str; emit povrayMessage( str ); @@ -289,7 +289,7 @@ void PMPovrayRenderWidget::slotPovrayImage( KProcess*, char* buffer, int buflen if( m_line != oldLine ) { - QPainter paint( this ); + TQPainter paint( this ); int offset = 0; if( m_renderMode.subSection( ) ) { @@ -367,7 +367,7 @@ void PMPovrayRenderWidget::slotRenderingFinished( KProcess* ) cleanup( ); } -void PMPovrayRenderWidget::paintEvent( QPaintEvent* ev ) +void PMPovrayRenderWidget::paintEvent( TQPaintEvent* ev ) { if( !m_bPixmapUpToDate ) { @@ -393,11 +393,11 @@ void PMPovrayRenderWidget::cleanup( ) m_pTempFile = 0; } -QSize PMPovrayRenderWidget::sizeHint( ) const +TQSize PMPovrayRenderWidget::sizeHint( ) const { - QSize s; + TQSize s; if( m_image.isNull( ) ) - s = QSize( 200, 200 ); + s = TQSize( 200, 200 ); else s = m_image.size( ); @@ -430,7 +430,7 @@ void PMPovrayRenderWidget::restoreConfig( KConfig* cfg ) void PMPovrayRenderWidget::startDrag( ) { - QImageDrag* d = new QImageDrag( m_image, this ); + TQImageDrag* d = new TQImageDrag( m_image, this ); d->dragCopy( ); } diff --git a/kpovmodeler/pmpovrayrenderwidget.h b/kpovmodeler/pmpovrayrenderwidget.h index 23e30721..cc447b06 100644 --- a/kpovmodeler/pmpovrayrenderwidget.h +++ b/kpovmodeler/pmpovrayrenderwidget.h @@ -22,11 +22,11 @@ #include <config.h> #endif -#include <qwidget.h> -#include <qcstring.h> -#include <qimage.h> -#include <qbuffer.h> -#include <qstringlist.h> +#include <tqwidget.h> +#include <tqcstring.h> +#include <tqimage.h> +#include <tqbuffer.h> +#include <tqstringlist.h> #include "pmrendermode.h" #include "pmdragwidget.h" @@ -47,7 +47,7 @@ public: /** * Standard constructor */ - PMPovrayRenderWidget( QWidget* parent = 0, const char* name = 0 ); + PMPovrayRenderWidget( TQWidget* parent = 0, const char* name = 0 ); /** * destructor */ @@ -58,17 +58,17 @@ public: * render mode m. * @see PMRenderMode */ - bool render( const QByteArray& scene, const PMRenderMode& m, + bool render( const TQByteArray& scene, const PMRenderMode& m, const KURL& documentURL ); /** * Returns the povray text output */ - QString povrayOutput( ) const { return m_povrayOutput; } + TQString povrayOutput( ) const { return m_povrayOutput; } /** * Returns the rendered image */ - QImage image( ) const { return m_image; } + TQImage image( ) const { return m_image; } static void saveConfig( KConfig* cfg ); static void restoreConfig( KConfig* cfg ); @@ -76,21 +76,21 @@ public: /** * Returns the povray command */ - static QString povrayCommand( ) { return s_povrayCommand; } + static TQString povrayCommand( ) { return s_povrayCommand; } /** * Sets the povray command */ - static void setPovrayCommand( const QString& c ) { s_povrayCommand = c; } + static void setPovrayCommand( const TQString& c ) { s_povrayCommand = c; } /** * Returns the library paths */ - static QStringList povrayLibraryPaths( ) { return s_libraryPaths; } + static TQStringList povrayLibraryPaths( ) { return s_libraryPaths; } /** * Sets the library paths */ - static void setPovrayLibraryPaths( const QStringList& slist ) + static void setPovrayLibraryPaths( const TQStringList& slist ) { s_libraryPaths = slist; } - virtual QSize sizeHint( ) const; + virtual TQSize sizeHint( ) const; virtual void startDrag( ); signals: @@ -109,7 +109,7 @@ signals: /** * The povray output text */ - void povrayMessage( const QString& msg ); + void povrayMessage( const TQString& msg ); public slots: /** @@ -144,7 +144,7 @@ protected slots: void slotRenderingFinished( KProcess* proc ); protected: - virtual void paintEvent( QPaintEvent* ); + virtual void paintEvent( TQPaintEvent* ); private: void setPixel( int x, int y, uint c ); @@ -153,7 +153,7 @@ private: KProcess* m_pProcess; bool m_bSuspended; PMRenderMode m_renderMode; - QImage m_image; + TQImage m_image; bool m_rcvHeader; unsigned char m_header[18]; int m_rcvHeaderBytes; @@ -165,13 +165,13 @@ private: int m_numRestBytes; int m_line; int m_column; - QPixmap m_pixmap; + TQPixmap m_pixmap; bool m_bPixmapUpToDate; - QString m_povrayOutput; + TQString m_povrayOutput; KTempFile* m_pTempFile; - static QString s_povrayCommand; - static QStringList s_libraryPaths; + static TQString s_povrayCommand; + static TQStringList s_libraryPaths; }; #endif diff --git a/kpovmodeler/pmpovraysettings.cpp b/kpovmodeler/pmpovraysettings.cpp index 0b2824ae..607c5752 100644 --- a/kpovmodeler/pmpovraysettings.cpp +++ b/kpovmodeler/pmpovraysettings.cpp @@ -23,94 +23,94 @@ #include "pmresourcelocator.h" #include "pmtext.h" -#include <qlayout.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qlistbox.h> -#include <qcombobox.h> -#include <qgroupbox.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> +#include <tqlistbox.h> +#include <tqcombobox.h> +#include <tqgroupbox.h> +#include <tqlabel.h> #include <klocale.h> #include <kiconloader.h> #include <kmessagebox.h> #include <kfiledialog.h> -PMPovraySettings::PMPovraySettings( QWidget* parent, const char* name ) +PMPovraySettings::PMPovraySettings( TQWidget* parent, const char* name ) : PMSettingsDialogPage( parent, name ) { m_selectionIndex = 0; - QHBoxLayout* hlayout; - QVBoxLayout* vlayout; - QVBoxLayout* gvl; - QGroupBox* gb; + TQHBoxLayout* hlayout; + TQVBoxLayout* vlayout; + TQVBoxLayout* gvl; + TQGroupBox* gb; - vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) ); + vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); - gb = new QGroupBox( i18n( "Povray Command" ), this ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gb = new TQGroupBox( i18n( "Povray Command" ), this ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new QHBoxLayout( gvl ); - hlayout->addWidget( new QLabel( i18n( "Command:" ), gb ) ); - m_pPovrayCommand = new QLineEdit( gb ); + hlayout = new TQHBoxLayout( gvl ); + hlayout->addWidget( new TQLabel( i18n( "Command:" ), gb ) ); + m_pPovrayCommand = new TQLineEdit( gb ); hlayout->addWidget( m_pPovrayCommand ); - m_pBrowsePovrayCommand = new QPushButton( gb ); + m_pBrowsePovrayCommand = new TQPushButton( gb ); m_pBrowsePovrayCommand->setPixmap( SmallIcon( "fileopen" ) ); - connect( m_pBrowsePovrayCommand, SIGNAL( clicked( ) ), - SLOT( slotBrowsePovrayCommand( ) ) ); + connect( m_pBrowsePovrayCommand, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotBrowsePovrayCommand( ) ) ); hlayout->addWidget( m_pBrowsePovrayCommand ); vlayout->addWidget( gb ); - gb = new QGroupBox( i18n( "Povray User Documentation" ), this ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gb = new TQGroupBox( i18n( "Povray User Documentation" ), this ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new QHBoxLayout( gvl ); - hlayout->addWidget( new QLabel( i18n( "Path:" ), gb ) ); - m_pDocumentationPath = new QLineEdit( gb ); + hlayout = new TQHBoxLayout( gvl ); + hlayout->addWidget( new TQLabel( i18n( "Path:" ), gb ) ); + m_pDocumentationPath = new TQLineEdit( gb ); hlayout->addWidget( m_pDocumentationPath ); - m_pBrowseDocumentationPath = new QPushButton( gb ); + m_pBrowseDocumentationPath = new TQPushButton( gb ); m_pBrowseDocumentationPath->setPixmap( SmallIcon( "fileopen" ) ); - connect( m_pBrowseDocumentationPath, SIGNAL( clicked( ) ), - SLOT( slotBrowsePovrayDocumentation( ) ) ); + connect( m_pBrowseDocumentationPath, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotBrowsePovrayDocumentation( ) ) ); hlayout->addWidget( m_pBrowseDocumentationPath ); vlayout->addWidget( gb ); - hlayout = new QHBoxLayout( gvl ); - hlayout->addWidget( new QLabel( i18n( "Version:" ), gb ) ); - m_pDocumentationVersion = new QComboBox( false, gb ); - QValueList<QString> versions = PMDocumentationMap::theMap( )->availableVersions( ); - QValueListIterator<QString> it; + hlayout = new TQHBoxLayout( gvl ); + hlayout->addWidget( new TQLabel( i18n( "Version:" ), gb ) ); + m_pDocumentationVersion = new TQComboBox( false, gb ); + TQValueList<TQString> versions = PMDocumentationMap::theMap( )->availableVersions( ); + TQValueListIterator<TQString> it; for( it = versions.begin( ); it != versions.end( ); ++it ) m_pDocumentationVersion->insertItem( *it ); hlayout->addWidget( m_pDocumentationVersion ); hlayout->addStretch( ); - gb = new QGroupBox( i18n( "Library Paths" ), this ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gb = new TQGroupBox( i18n( "Library Paths" ), this ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - hlayout = new QHBoxLayout( gvl ); - m_pLibraryPaths = new QListBox( gb ); - connect( m_pLibraryPaths, SIGNAL( highlighted( int ) ), - SLOT( slotPathSelected( int ) ) ); + hlayout = new TQHBoxLayout( gvl ); + m_pLibraryPaths = new TQListBox( gb ); + connect( m_pLibraryPaths, TQT_SIGNAL( highlighted( int ) ), + TQT_SLOT( slotPathSelected( int ) ) ); hlayout->addWidget( m_pLibraryPaths ); - QVBoxLayout* bl = new QVBoxLayout( hlayout ); - m_pAddLibraryPath = new QPushButton( i18n( "Add..." ), gb ); - connect( m_pAddLibraryPath, SIGNAL( clicked( ) ), SLOT( slotAddPath( ) ) ); + TQVBoxLayout* bl = new TQVBoxLayout( hlayout ); + m_pAddLibraryPath = new TQPushButton( i18n( "Add..." ), gb ); + connect( m_pAddLibraryPath, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPath( ) ) ); bl->addWidget( m_pAddLibraryPath ); - m_pRemoveLibraryPath = new QPushButton( i18n( "Remove" ), gb ); - connect( m_pRemoveLibraryPath, SIGNAL( clicked( ) ), - SLOT( slotRemovePath( ) ) ); + m_pRemoveLibraryPath = new TQPushButton( i18n( "Remove" ), gb ); + connect( m_pRemoveLibraryPath, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotRemovePath( ) ) ); bl->addWidget( m_pRemoveLibraryPath ); - m_pChangeLibraryPath = new QPushButton( i18n( "Edit..." ), gb ); - connect( m_pChangeLibraryPath, SIGNAL( clicked( ) ), - SLOT( slotEditPath( ) ) ); + m_pChangeLibraryPath = new TQPushButton( i18n( "Edit..." ), gb ); + connect( m_pChangeLibraryPath, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotEditPath( ) ) ); bl->addWidget( m_pChangeLibraryPath ); - m_pLibraryPathUp = new QPushButton( i18n( "Up" ), gb ); - connect( m_pLibraryPathUp, SIGNAL( clicked( ) ), SLOT( slotPathUp( ) ) ); + m_pLibraryPathUp = new TQPushButton( i18n( "Up" ), gb ); + connect( m_pLibraryPathUp, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotPathUp( ) ) ); bl->addWidget( m_pLibraryPathUp ); - m_pLibraryPathDown = new QPushButton( i18n( "Down" ), gb ); - connect( m_pLibraryPathDown, SIGNAL( clicked( ) ), - SLOT( slotPathDown( ) ) ); + m_pLibraryPathDown = new TQPushButton( i18n( "Down" ), gb ); + connect( m_pLibraryPathDown, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotPathDown( ) ) ); bl->addWidget( m_pLibraryPathDown ); bl->addStretch( 1 ); vlayout->addWidget( gb ); @@ -123,7 +123,7 @@ void PMPovraySettings::displaySettings( ) m_pPovrayCommand->setText( PMPovrayRenderWidget::povrayCommand( ) ); m_pDocumentationPath->setText( PMDocumentationMap::theMap( )->povrayDocumentationPath( ) ); int c = m_pDocumentationVersion->count( ); - QString s = PMDocumentationMap::theMap( )->documentationVersion( ); + TQString s = PMDocumentationMap::theMap( )->documentationVersion( ); int i; for( i = 0; i < c; i++ ) if( m_pDocumentationVersion->text( i ) == s ) @@ -132,8 +132,8 @@ void PMPovraySettings::displaySettings( ) bool sb = m_pLibraryPaths->signalsBlocked( ); m_pLibraryPaths->blockSignals( true ); m_pLibraryPaths->clear( ); - QStringList plist = PMPovrayRenderWidget::povrayLibraryPaths( ); - QStringList::ConstIterator it = plist.begin( ); + TQStringList plist = PMPovrayRenderWidget::povrayLibraryPaths( ); + TQStringList::ConstIterator it = plist.begin( ); m_selectionIndex = -1; for( ; it != plist.end( ); ++it ) { @@ -152,7 +152,7 @@ void PMPovraySettings::displayDefaults( ) { m_pPovrayCommand->setText( c_defaultPovrayCommand ); m_pDocumentationVersion->setCurrentItem( 0 ); - m_pDocumentationPath->setText( QString::null ); + m_pDocumentationPath->setText( TQString::null ); m_pLibraryPaths->clear(); } @@ -169,7 +169,7 @@ void PMPovraySettings::applySettings( ) m_pDocumentationPath->text( ) ); PMDocumentationMap::theMap( )->setDocumentationVersion( m_pDocumentationVersion->currentText( ) ); - QStringList plist; + TQStringList plist; int num = ( signed ) m_pLibraryPaths->count( ); int i; for( i = 0; i < num; i++ ) @@ -190,13 +190,13 @@ void PMPovraySettings::slotAddPath( ) KMessageBox::error( this, i18n( "Povray only supports up to 20 library paths." ) ); else { - QString path = KFileDialog::getExistingDirectory( QString::null, this ); + TQString path = KFileDialog::getExistingDirectory( TQString::null, this ); if( !path.isEmpty( ) ) { #if ( QT_VERSION >= 300 ) - QListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch ); + TQListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch ); #else - QListBoxItem* item = 0; + TQListBoxItem* item = 0; #endif if( !item ) { @@ -219,10 +219,10 @@ void PMPovraySettings::slotRemovePath( ) void PMPovraySettings::slotPathUp( ) { - QListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex ); + TQListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex ); if( lbi ) { - QString text = lbi->text( ); + TQString text = lbi->text( ); m_pLibraryPaths->removeItem( m_selectionIndex ); if( m_selectionIndex > 0 ) m_selectionIndex--; @@ -233,10 +233,10 @@ void PMPovraySettings::slotPathUp( ) void PMPovraySettings::slotPathDown( ) { - QListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex ); + TQListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex ); if( lbi ) { - QString text = lbi->text( ); + TQString text = lbi->text( ); m_pLibraryPaths->removeItem( m_selectionIndex ); if( ( unsigned ) m_selectionIndex < m_pLibraryPaths->count( ) ) m_selectionIndex++; @@ -247,17 +247,17 @@ void PMPovraySettings::slotPathDown( ) void PMPovraySettings::slotEditPath( ) { - QListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex ); + TQListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex ); if( lbi ) { - QString text = lbi->text( ); - QString path = KFileDialog::getExistingDirectory( text, this ); + TQString text = lbi->text( ); + TQString path = KFileDialog::getExistingDirectory( text, this ); if( !path.isEmpty( ) ) { #if ( QT_VERSION >= 300 ) - QListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch ); + TQListBoxItem* item = m_pLibraryPaths->findItem( path, ExactMatch ); #else - QListBoxItem* item = 0; + TQListBoxItem* item = 0; #endif if( !item ) m_pLibraryPaths->changeItem( path, m_selectionIndex ); @@ -270,7 +270,7 @@ void PMPovraySettings::slotEditPath( ) void PMPovraySettings::slotPathSelected( int index ) { m_selectionIndex = index; - QListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex ); + TQListBoxItem* lbi = m_pLibraryPaths->item( m_selectionIndex ); if( lbi ) { m_pRemoveLibraryPath->setEnabled( true ); @@ -289,7 +289,7 @@ void PMPovraySettings::slotPathSelected( int index ) void PMPovraySettings::slotBrowsePovrayCommand( ) { - QString str = KFileDialog::getOpenFileName( QString::null, QString::null ); + TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); if( !str.isEmpty() ) { @@ -299,7 +299,7 @@ void PMPovraySettings::slotBrowsePovrayCommand( ) void PMPovraySettings::slotBrowsePovrayDocumentation( ) { - QString str = KFileDialog::getExistingDirectory( ); + TQString str = KFileDialog::getExistingDirectory( ); if( !str.isEmpty( ) ) m_pDocumentationPath->setText( str ); diff --git a/kpovmodeler/pmpovraysettings.h b/kpovmodeler/pmpovraysettings.h index cbe07827..6858eb5f 100644 --- a/kpovmodeler/pmpovraysettings.h +++ b/kpovmodeler/pmpovraysettings.h @@ -24,10 +24,10 @@ #include "pmsettingsdialog.h" -class QLineEdit; -class QPushButton; -class QComboBox; -class QListBox; +class TQLineEdit; +class TQPushButton; +class TQComboBox; +class TQListBox; /** * Povray configuration dialog page @@ -39,7 +39,7 @@ public: /** * Default constructor */ - PMPovraySettings( QWidget* parent, const char* name = 0 ); + PMPovraySettings( TQWidget* parent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ @@ -81,17 +81,17 @@ protected slots: void slotBrowsePovrayDocumentation( ); private: - QLineEdit* m_pPovrayCommand; - QPushButton* m_pBrowsePovrayCommand; - QLineEdit* m_pDocumentationPath; - QPushButton* m_pBrowseDocumentationPath; - QComboBox* m_pDocumentationVersion; - QListBox* m_pLibraryPaths; - QPushButton* m_pAddLibraryPath; - QPushButton* m_pRemoveLibraryPath; - QPushButton* m_pChangeLibraryPath; - QPushButton* m_pLibraryPathUp; - QPushButton* m_pLibraryPathDown; + TQLineEdit* m_pPovrayCommand; + TQPushButton* m_pBrowsePovrayCommand; + TQLineEdit* m_pDocumentationPath; + TQPushButton* m_pBrowseDocumentationPath; + TQComboBox* m_pDocumentationVersion; + TQListBox* m_pLibraryPaths; + TQPushButton* m_pAddLibraryPath; + TQPushButton* m_pRemoveLibraryPath; + TQPushButton* m_pChangeLibraryPath; + TQPushButton* m_pLibraryPathUp; + TQPushButton* m_pLibraryPathDown; int m_selectionIndex; }; diff --git a/kpovmodeler/pmpovraywidget.cpp b/kpovmodeler/pmpovraywidget.cpp index d50edc7e..cd1232e4 100644 --- a/kpovmodeler/pmpovraywidget.cpp +++ b/kpovmodeler/pmpovraywidget.cpp @@ -30,25 +30,25 @@ #include <kpushbutton.h> #include <kstdguiitem.h> -#include <qlayout.h> -#include <qprogressbar.h> -#include <qlabel.h> -#include <qscrollview.h> -#include <qtimer.h> -#include <qapplication.h> +#include <tqlayout.h> +#include <tqprogressbar.h> +#include <tqlabel.h> +#include <tqscrollview.h> +#include <tqtimer.h> +#include <tqapplication.h> const int timerIntervall = 1000; bool PMPovrayWidget::s_imageFormatsRegistered = false; -PMPovrayWidget::PMPovrayWidget( QWidget* parent, const char* name ) +PMPovrayWidget::PMPovrayWidget( TQWidget* parent, const char* name ) : KDialog( parent, name ) { - QVBoxLayout* topLayout = new QVBoxLayout( this, KDialog::marginHint( ), KDialog::spacingHint( ) ); + TQVBoxLayout* topLayout = new TQVBoxLayout( this, KDialog::marginHint( ), KDialog::spacingHint( ) ); topLayout->addStretch( ); - QHBoxLayout* renderLayout = new QHBoxLayout( ); + TQHBoxLayout* renderLayout = new TQHBoxLayout( ); topLayout->addLayout( renderLayout, 2 ); - m_pScrollView = new QScrollView( this ); + m_pScrollView = new TQScrollView( this ); m_pScrollView->setBackgroundMode( PaletteBase ); renderLayout->addWidget( m_pScrollView, 2 ); m_pRenderWidget = new PMPovrayRenderWidget( m_pScrollView->viewport( ) ); @@ -56,54 +56,54 @@ PMPovrayWidget::PMPovrayWidget( QWidget* parent, const char* name ) m_pScrollView->addChild( m_pRenderWidget ); topLayout->addStretch( ); - QHBoxLayout* progressLayout = new QHBoxLayout( topLayout ); - m_pProgressBar = new QProgressBar( this ); + TQHBoxLayout* progressLayout = new TQHBoxLayout( topLayout ); + m_pProgressBar = new TQProgressBar( this ); m_pProgressBar->hide( ); progressLayout->addWidget( m_pProgressBar, 1 ); - m_pProgressLabel = new QLabel( this ); + m_pProgressLabel = new TQLabel( this ); progressLayout->addWidget( m_pProgressLabel, 2 ); - QHBoxLayout* buttonLayout = new QHBoxLayout( topLayout ); - m_pStopButton = new QPushButton( i18n( "Stop" ), this ); + TQHBoxLayout* buttonLayout = new TQHBoxLayout( topLayout ); + m_pStopButton = new TQPushButton( i18n( "Stop" ), this ); m_pStopButton->setEnabled( false ); buttonLayout->addWidget( m_pStopButton ); - m_pSuspendButton = new QPushButton( i18n( "Suspend" ), this ); + m_pSuspendButton = new TQPushButton( i18n( "Suspend" ), this ); m_pSuspendButton->setEnabled( false ); buttonLayout->addWidget( m_pSuspendButton ); - m_pResumeButton = new QPushButton( i18n( "Resume" ), this ); + m_pResumeButton = new TQPushButton( i18n( "Resume" ), this ); m_pResumeButton->setEnabled( false ); buttonLayout->addWidget( m_pResumeButton ); buttonLayout->addStretch( 1 ); - m_pPovrayOutputButton = new QPushButton( i18n( "Povray Output" ), this ); + m_pPovrayOutputButton = new TQPushButton( i18n( "Povray Output" ), this ); buttonLayout->addWidget( m_pPovrayOutputButton ); - buttonLayout = new QHBoxLayout( topLayout ); + buttonLayout = new TQHBoxLayout( topLayout ); m_pSaveButton = new KPushButton( KStdGuiItem::saveAs(), this ); m_pSaveButton->setEnabled( false ); buttonLayout->addWidget( m_pSaveButton ); buttonLayout->addStretch( 1 ); - QPushButton* closeButton = new KPushButton( KStdGuiItem::close(), this ); + TQPushButton* closeButton = new KPushButton( KStdGuiItem::close(), this ); buttonLayout->addWidget( closeButton ); - connect( m_pRenderWidget, SIGNAL( finished( int ) ), - SLOT( slotRenderingFinished( int ) ) ); - connect( m_pRenderWidget, SIGNAL( progress( int ) ), - SLOT( slotProgress( int ) ) ); - connect( m_pRenderWidget, SIGNAL( lineFinished( int ) ), - SLOT( slotLineFinished( int ) ) ); - - connect( m_pStopButton, SIGNAL( clicked( ) ), SLOT( slotStop( ) ) ); - connect( m_pSuspendButton, SIGNAL( clicked( ) ), SLOT( slotSuspend( ) ) ); - connect( m_pResumeButton, SIGNAL( clicked( ) ), SLOT( slotResume( ) ) ); - connect( m_pSaveButton, SIGNAL( clicked( ) ), SLOT( slotSave( ) ) ); - connect( closeButton, SIGNAL( clicked( ) ), SLOT( slotClose( ) ) ); - connect( m_pPovrayOutputButton, SIGNAL( clicked( ) ), - SLOT( slotPovrayOutput( ) ) ); + connect( m_pRenderWidget, TQT_SIGNAL( finished( int ) ), + TQT_SLOT( slotRenderingFinished( int ) ) ); + connect( m_pRenderWidget, TQT_SIGNAL( progress( int ) ), + TQT_SLOT( slotProgress( int ) ) ); + connect( m_pRenderWidget, TQT_SIGNAL( lineFinished( int ) ), + TQT_SLOT( slotLineFinished( int ) ) ); + + connect( m_pStopButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotStop( ) ) ); + connect( m_pSuspendButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSuspend( ) ) ); + connect( m_pResumeButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotResume( ) ) ); + connect( m_pSaveButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotSave( ) ) ); + connect( closeButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotClose( ) ) ); + connect( m_pPovrayOutputButton, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotPovrayOutput( ) ) ); m_bRunning = false; - m_pProgressTimer = new QTimer( this ); - connect( m_pProgressTimer, SIGNAL( timeout( ) ), - SLOT( slotUpdateSpeed( ) ) ); + m_pProgressTimer = new TQTimer( this ); + connect( m_pProgressTimer, TQT_SIGNAL( timeout( ) ), + TQT_SLOT( slotUpdateSpeed( ) ) ); setCaption( i18n( "Render Window" ) ); @@ -111,8 +111,8 @@ PMPovrayWidget::PMPovrayWidget( QWidget* parent, const char* name ) m_stopped = false; m_pPovrayOutputWidget = new PMPovrayOutputWidget( ); - connect( m_pRenderWidget, SIGNAL( povrayMessage( const QString& ) ), - m_pPovrayOutputWidget, SLOT( slotText( const QString& ) ) ); + connect( m_pRenderWidget, TQT_SIGNAL( povrayMessage( const TQString& ) ), + m_pPovrayOutputWidget, TQT_SLOT( slotText( const TQString& ) ) ); } PMPovrayWidget::~PMPovrayWidget( ) @@ -120,7 +120,7 @@ PMPovrayWidget::~PMPovrayWidget( ) delete m_pPovrayOutputWidget; } -bool PMPovrayWidget::render( const QByteArray& scene, const PMRenderMode& m, +bool PMPovrayWidget::render( const TQByteArray& scene, const PMRenderMode& m, const KURL& documentURL ) { bool updateSize = ( m_height != m.height( ) ) || ( m_width != m.width( ) ); @@ -131,7 +131,7 @@ bool PMPovrayWidget::render( const QByteArray& scene, const PMRenderMode& m, m_stopped = false; m_pRenderWidget->setFixedSize( m_width, m_height ); - QSize maxSize( m_width + m_pScrollView->frameWidth( ) * 2, + TQSize maxSize( m_width + m_pScrollView->frameWidth( ) * 2, m_height + m_pScrollView->frameWidth( ) * 2 ); m_pScrollView->setMaximumSize( maxSize ); @@ -152,13 +152,13 @@ bool PMPovrayWidget::render( const QByteArray& scene, const PMRenderMode& m, h += 16; #if ( ( KDE_VERSION_MAJOR == 3 ) && ( KDE_VERSION_MINOR <= 1 ) ) - QWidget* dw = QApplication::desktop( ); + TQWidget* dw = TQApplication::desktop( ); if( w > dw->width( ) ) w = dw->width( ); if( h > dw->height( ) ) h = dw->height( ); #else - QRect dw = KGlobalSettings::desktopGeometry(this); + TQRect dw = KGlobalSettings::desktopGeometry(this); if( w > dw.width() ) w = dw.width(); if( h > dw.height() ) @@ -178,7 +178,7 @@ bool PMPovrayWidget::render( const QByteArray& scene, const PMRenderMode& m, m_pResumeButton->setEnabled( false ); m_pSaveButton->setEnabled( false ); - m_lastSpeedTime = QTime( ); + m_lastSpeedTime = TQTime( ); m_pProgressTimer->start( timerIntervall, true ); m_speedInfo = false; m_speed = 0; @@ -205,7 +205,7 @@ void PMPovrayWidget::slotSuspend( ) m_pSaveButton->setEnabled( true ); m_pProgressTimer->stop( ); - m_lastSpeedTime = QTime( ); + m_lastSpeedTime = TQTime( ); m_speedInfo = false; m_immediateUpdate = false; m_pProgressLabel->setText( i18n( "suspended" ) ); @@ -230,7 +230,7 @@ void PMPovrayWidget::slotClose( ) void PMPovrayWidget::slotSave( ) { KTempFile* tempFile = 0; - QFile* file = 0; + TQFile* file = 0; bool ok = true; if( !s_imageFormatsRegistered ) @@ -239,7 +239,7 @@ void PMPovrayWidget::slotSave( ) s_imageFormatsRegistered = true; } - KURL url = KFileDialog::getSaveURL( QString::null, KImageIO::pattern( KImageIO::Writing ) ); + KURL url = KFileDialog::getSaveURL( TQString::null, KImageIO::pattern( KImageIO::Writing ) ); if( url.isEmpty( ) ) return; if( !PMShell::overwriteURL( url ) ) @@ -251,7 +251,7 @@ void PMPovrayWidget::slotSave( ) return; } - QString format = KImageIO::type( url.fileName( ) ); + TQString format = KImageIO::type( url.fileName( ) ); if( format.isEmpty( ) ) { KMessageBox::error( this, i18n( "Unknown image format.\n" @@ -268,7 +268,7 @@ void PMPovrayWidget::slotSave( ) if( url.isLocalFile( ) ) { // Local file - file = new QFile( url.path( ) ); + file = new TQFile( url.path( ) ); if( !file->open( IO_WriteOnly ) ) ok = false; } @@ -285,7 +285,7 @@ void PMPovrayWidget::slotSave( ) if( ok ) { - QImageIO iio( file, format.latin1( ) ); + TQImageIO iio( file, format.latin1( ) ); iio.setImage( m_pRenderWidget->image( ) ); ok = iio.write( ); @@ -352,7 +352,7 @@ void PMPovrayWidget::slotProgress( int i ) void PMPovrayWidget::slotLineFinished( int line ) { m_speedInfo = true; - QTime ct = QTime::currentTime( ); + TQTime ct = TQTime::currentTime( ); if( !m_lastSpeedTime.isNull( ) ) { @@ -391,7 +391,7 @@ void PMPovrayWidget::slotUpdateSpeed( ) void PMPovrayWidget::showSpeed( double pps ) { - QString num; + TQString num; if( pps >= 1000000 ) { num.setNum( pps / 100000, 'g', 3 ); diff --git a/kpovmodeler/pmpovraywidget.h b/kpovmodeler/pmpovraywidget.h index 26d5bb1e..058e12ee 100644 --- a/kpovmodeler/pmpovraywidget.h +++ b/kpovmodeler/pmpovraywidget.h @@ -23,17 +23,17 @@ #endif #include <kdialog.h> -#include <qcstring.h> -#include <qdatetime.h> +#include <tqcstring.h> +#include <tqdatetime.h> class PMPovrayRenderWidget; class PMPovrayOutputWidget; class PMRenderMode; -class QProgressBar; -class QPushButton; -class QLabel; -class QScrollView; +class TQProgressBar; +class TQPushButton; +class TQLabel; +class TQScrollView; class KURL; /** @@ -46,7 +46,7 @@ public: /** * Standard constructor */ - PMPovrayWidget( QWidget* parent = 0, const char* name = 0 ); + PMPovrayWidget( TQWidget* parent = 0, const char* name = 0 ); /** * Destructor */ @@ -57,7 +57,7 @@ public: * render mode m. * @see PMRenderMode */ - bool render( const QByteArray& scene, const PMRenderMode& m, + bool render( const TQByteArray& scene, const PMRenderMode& m, const KURL& documentURL ); public slots: @@ -80,18 +80,18 @@ protected: private: PMPovrayRenderWidget* m_pRenderWidget; PMPovrayOutputWidget* m_pPovrayOutputWidget; - QPushButton* m_pStopButton; - QPushButton* m_pSuspendButton; - QPushButton* m_pResumeButton; - QPushButton* m_pSaveButton; - QPushButton* m_pPovrayOutputButton; - QProgressBar* m_pProgressBar; - QLabel* m_pProgressLabel; - QScrollView* m_pScrollView; + TQPushButton* m_pStopButton; + TQPushButton* m_pSuspendButton; + TQPushButton* m_pResumeButton; + TQPushButton* m_pSaveButton; + TQPushButton* m_pPovrayOutputButton; + TQProgressBar* m_pProgressBar; + TQLabel* m_pProgressLabel; + TQScrollView* m_pScrollView; int m_height, m_width; bool m_bRunning; - QTime m_lastSpeedTime; - QTimer* m_pProgressTimer; + TQTime m_lastSpeedTime; + TQTimer* m_pProgressTimer; bool m_speedInfo; bool m_immediateUpdate; float m_speed; diff --git a/kpovmodeler/pmpreviewsettings.cpp b/kpovmodeler/pmpreviewsettings.cpp index 1254431e..700c19ee 100644 --- a/kpovmodeler/pmpreviewsettings.cpp +++ b/kpovmodeler/pmpreviewsettings.cpp @@ -21,90 +21,90 @@ #include "pmdialogeditbase.h" #include "pmdefaults.h" -#include <qlayout.h> -#include <qgroupbox.h> -#include <qlabel.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqgroupbox.h> +#include <tqlabel.h> +#include <tqcheckbox.h> #include <kcolorbutton.h> #include <klocale.h> #include <kmessagebox.h> -PMPreviewSettings::PMPreviewSettings( QWidget* parent, const char* name ) +PMPreviewSettings::PMPreviewSettings( TQWidget* parent, const char* name ) : PMSettingsDialogPage( parent, name ) { - QHBoxLayout* hlayout; - QVBoxLayout* vlayout; - QVBoxLayout* gvl; - QGridLayout* grid; - QGroupBox* gb; + TQHBoxLayout* hlayout; + TQVBoxLayout* vlayout; + TQVBoxLayout* gvl; + TQGridLayout* grid; + TQGroupBox* gb; - vlayout = new QVBoxLayout( this, 0, KDialog::spacingHint( ) ); + vlayout = new TQVBoxLayout( this, 0, KDialog::spacingHint( ) ); - hlayout = new QHBoxLayout( vlayout ); - grid = new QGridLayout( hlayout, 2, 2 ); - grid->addWidget( new QLabel( i18n( "Size:" ), this ), 0, 0 ); + hlayout = new TQHBoxLayout( vlayout ); + grid = new TQGridLayout( hlayout, 2, 2 ); + grid->addWidget( new TQLabel( i18n( "Size:" ), this ), 0, 0 ); m_pPreviewSize = new PMIntEdit( this ); m_pPreviewSize->setValidation( true, 10, true, 400 ); grid->addWidget( m_pPreviewSize, 0, 1 ); - grid->addWidget( new QLabel( i18n( "Gamma:" ), this ), 1, 0 ); + grid->addWidget( new TQLabel( i18n( "Gamma:" ), this ), 1, 0 ); m_pPreviewGamma = new PMFloatEdit( this ); grid->addWidget( m_pPreviewGamma, 1, 1 ); hlayout->addStretch( 1 ); - gb = new QGroupBox( i18n( "Rendered Objects" ), this ); + gb = new TQGroupBox( i18n( "Rendered Objects" ), this ); vlayout->addWidget( gb ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - m_pPreviewSphere = new QCheckBox( i18n( "Sphere" ), gb ); + m_pPreviewSphere = new TQCheckBox( i18n( "Sphere" ), gb ); gvl->addWidget( m_pPreviewSphere ); - m_pPreviewCylinder = new QCheckBox( i18n( "Cylinder" ), gb ); + m_pPreviewCylinder = new TQCheckBox( i18n( "Cylinder" ), gb ); gvl->addWidget( m_pPreviewCylinder ); - m_pPreviewBox = new QCheckBox( i18n( "Box" ), gb ); + m_pPreviewBox = new TQCheckBox( i18n( "Box" ), gb ); gvl->addWidget( m_pPreviewBox ); - gb = new QGroupBox( i18n( "Wall" ), this ); + gb = new TQGroupBox( i18n( "Wall" ), this ); vlayout->addWidget( gb ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - m_pPreviewWall = new QCheckBox( i18n( "Enable wall" ), gb ); + m_pPreviewWall = new TQCheckBox( i18n( "Enable wall" ), gb ); gvl->addWidget( m_pPreviewWall ); - hlayout = new QHBoxLayout( gvl ); - hlayout->addWidget( new QLabel( i18n( "Color 1:" ), gb ) ); + hlayout = new TQHBoxLayout( gvl ); + hlayout->addWidget( new TQLabel( i18n( "Color 1:" ), gb ) ); m_pWallColor1 = new KColorButton( gb ); hlayout->addWidget( m_pWallColor1 ); - hlayout->addWidget( new QLabel( i18n( "Color 2:" ), gb ) ); + hlayout->addWidget( new TQLabel( i18n( "Color 2:" ), gb ) ); m_pWallColor2 = new KColorButton( gb ); hlayout->addWidget( m_pWallColor2 ); hlayout->addStretch( 1 ); - gb = new QGroupBox( i18n( "Floor" ), this ); + gb = new TQGroupBox( i18n( "Floor" ), this ); vlayout->addWidget( gb ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - m_pPreviewFloor = new QCheckBox( i18n( "Enable floor" ), gb ); + m_pPreviewFloor = new TQCheckBox( i18n( "Enable floor" ), gb ); gvl->addWidget( m_pPreviewFloor ); - hlayout = new QHBoxLayout( gvl ); - hlayout->addWidget( new QLabel( i18n( "Color 1:" ), gb ) ); + hlayout = new TQHBoxLayout( gvl ); + hlayout->addWidget( new TQLabel( i18n( "Color 1:" ), gb ) ); m_pFloorColor1 = new KColorButton( gb ); hlayout->addWidget( m_pFloorColor1 ); - hlayout->addWidget( new QLabel( i18n( "Color 2:" ), gb ) ); + hlayout->addWidget( new TQLabel( i18n( "Color 2:" ), gb ) ); m_pFloorColor2 = new KColorButton( gb ); hlayout->addWidget( m_pFloorColor2 ); hlayout->addStretch( 1 ); - gb = new QGroupBox( i18n( "Antialiasing" ), this ); + gb = new TQGroupBox( i18n( "Antialiasing" ), this ); vlayout->addWidget( gb ); - gvl = new QVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); + gvl = new TQVBoxLayout( gb, KDialog::marginHint( ), KDialog::spacingHint( ) ); gvl->addSpacing( 10 ); - m_pPreviewAA = new QCheckBox( i18n( "Enable antialiasing" ), gb ); + m_pPreviewAA = new TQCheckBox( i18n( "Enable antialiasing" ), gb ); gvl->addWidget( m_pPreviewAA ); - hlayout = new QHBoxLayout( gvl ); - hlayout->addWidget( new QLabel( i18n( "Depth:" ), gb ) ); + hlayout = new TQHBoxLayout( gvl ); + hlayout->addWidget( new TQLabel( i18n( "Depth:" ), gb ) ); m_pPreviewAALevel = new PMIntEdit( gb ); m_pPreviewAALevel->setValidation( true, 1, true, 9 ); hlayout->addWidget( m_pPreviewAALevel ); - hlayout->addWidget( new QLabel( i18n( "Threshold:" ), gb ) ); + hlayout->addWidget( new TQLabel( i18n( "Threshold:" ), gb ) ); m_pPreviewAAThreshold = new PMFloatEdit( gb ); hlayout->addWidget( m_pPreviewAAThreshold ); hlayout->addStretch( 1 ); diff --git a/kpovmodeler/pmpreviewsettings.h b/kpovmodeler/pmpreviewsettings.h index a0983002..b3c38af2 100644 --- a/kpovmodeler/pmpreviewsettings.h +++ b/kpovmodeler/pmpreviewsettings.h @@ -26,7 +26,7 @@ class PMIntEdit; class PMFloatEdit; -class QCheckBox; +class TQCheckBox; class KColorButton; /** @@ -39,7 +39,7 @@ public: /** * Default constructor */ - PMPreviewSettings( QWidget* parent, const char* name = 0 ); + PMPreviewSettings( TQWidget* parent, const char* name = 0 ); /** */ virtual void displaySettings( ); /** */ @@ -51,14 +51,14 @@ public: private: PMIntEdit* m_pPreviewSize; - QCheckBox* m_pPreviewSphere; - QCheckBox* m_pPreviewCylinder; - QCheckBox* m_pPreviewBox; - QCheckBox* m_pPreviewAA; + TQCheckBox* m_pPreviewSphere; + TQCheckBox* m_pPreviewCylinder; + TQCheckBox* m_pPreviewBox; + TQCheckBox* m_pPreviewAA; PMIntEdit* m_pPreviewAALevel; PMFloatEdit* m_pPreviewAAThreshold; - QCheckBox* m_pPreviewWall; - QCheckBox* m_pPreviewFloor; + TQCheckBox* m_pPreviewWall; + TQCheckBox* m_pPreviewFloor; KColorButton* m_pFloorColor1; KColorButton* m_pFloorColor2; KColorButton* m_pWallColor1; diff --git a/kpovmodeler/pmprism.cpp b/kpovmodeler/pmprism.cpp index 26fa9035..81417ba3 100644 --- a/kpovmodeler/pmprism.cpp +++ b/kpovmodeler/pmprism.cpp @@ -80,12 +80,12 @@ public: virtual int size( PMObject* object, int dimension ) const { PMPrism* prism = ( PMPrism* ) object; - QValueList< QValueList<PMVector> > points = prism->points( ); + TQValueList< TQValueList<PMVector> > points = prism->points( ); if( dimension == 0 ) return points.size( ); else { - QValueList< QValueList<PMVector> >::ConstIterator it + TQValueList< TQValueList<PMVector> >::ConstIterator it = points.at( m_index[0] ); if( it != points.end( ) ) return ( *it ).size( ); @@ -96,8 +96,8 @@ protected: virtual bool setProtected( PMObject* obj, const PMVariant& var ) { PMPrism* p = ( PMPrism* ) obj; - QValueList< QValueList<PMVector> > list = p->points( ); - QValueList< QValueList<PMVector> >::Iterator sit = list.begin( ); + TQValueList< TQValueList<PMVector> > list = p->points( ); + TQValueList< TQValueList<PMVector> >::Iterator sit = list.begin( ); int i; PMVector v = var.vectorData( ); v.resize( 2 ); @@ -106,11 +106,11 @@ protected: ++sit; // expand the list if necessary for( ; i < m_index[0]; ++i ) - list.insert( sit, QValueList< PMVector >( ) ); + list.insert( sit, TQValueList< PMVector >( ) ); if( sit == list.end( ) ) - sit = list.insert( sit, QValueList< PMVector >( ) ); + sit = list.insert( sit, TQValueList< PMVector >( ) ); - QValueList<PMVector>::Iterator it = ( *sit ).begin( ); + TQValueList<PMVector>::Iterator it = ( *sit ).begin( ); for( i = 0; i < m_index[1] && it != ( *sit ).end( ); ++i ) ++it; @@ -128,15 +128,15 @@ protected: virtual PMVariant getProtected( const PMObject* obj ) { PMPrism* p = ( PMPrism* ) obj; - QValueList< QValueList<PMVector> > list = p->points( ); - QValueList< QValueList<PMVector> >::ConstIterator sit = list.at( m_index[0] ); + TQValueList< TQValueList<PMVector> > list = p->points( ); + TQValueList< TQValueList<PMVector> >::ConstIterator sit = list.at( m_index[0] ); if( sit == list.end( ) ) { kdError( PMArea ) << "Range error in PMPrism::PointProperty::get" << endl; return PMVariant( ); } - QValueList<PMVector>::ConstIterator it = ( *sit ).at( m_index[1] ); + TQValueList<PMVector>::ConstIterator it = ( *sit ).at( m_index[1] ); if( it == ( *sit ).end( ) ) { @@ -155,7 +155,7 @@ PMPrism::PMPrism( PMPart* part ) : Base( part ) { int i; - QValueList<PMVector> p; + TQValueList<PMVector> p; for( i = 0; i < defaultNumberOfPoints; ++i ) p.append( defaultPoint[i] ); @@ -184,15 +184,15 @@ PMPrism::~PMPrism( ) { } -QString PMPrism::description( ) const +TQString PMPrism::description( ) const { return i18n( "prism" ); } -void PMPrism::serialize( QDomElement& e, QDomDocument& doc ) const +void PMPrism::serialize( TQDomElement& e, TQDomDocument& doc ) const { - QDomElement data = doc.createElement( "extra_data" ); - QDomElement p, p2; + TQDomElement data = doc.createElement( "extra_data" ); + TQDomElement p, p2; e.setAttribute( "spline_type", m_splineType ); e.setAttribute( "sweep_type", m_sweepType ); @@ -201,8 +201,8 @@ void PMPrism::serialize( QDomElement& e, QDomDocument& doc ) const e.setAttribute( "height1", m_height1 ); e.setAttribute( "height2", m_height2 ); - QValueList< QValueList<PMVector> >::ConstIterator it; - QValueList<PMVector>::ConstIterator it2; + TQValueList< TQValueList<PMVector> >::ConstIterator it; + TQValueList<PMVector>::ConstIterator it2; for( it = m_points.begin( ); it != m_points.end( ); ++it ) { p = doc.createElement( "sub_prism" ); @@ -229,30 +229,30 @@ void PMPrism::readAttributes( const PMXMLHelper& h ) m_height2 = h.doubleAttribute( "height2", defaultHeight2 ); m_points.clear( ); - QValueList<PMVector> list; + TQValueList<PMVector> list; PMVector v( 2 ); - QDomElement e = h.extraData( ); + TQDomElement e = h.extraData( ); if( !e.isNull( ) ) { - QDomNode sp = e.firstChild( ); + TQDomNode sp = e.firstChild( ); while( !sp.isNull( ) ) { if( sp.isElement( ) ) { - QDomElement spe = sp.toElement( ); + TQDomElement spe = sp.toElement( ); if( spe.tagName( ) == "sub_prism" ) { list.clear( ); - QDomNode c = spe.firstChild( ); + TQDomNode c = spe.firstChild( ); while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); if( ce.tagName( ) == "point" ) { - QString str = ce.attribute( "vector" ); + TQString str = ce.attribute( "vector" ); if( !str.isNull( ) ) { v.loadXML( str ); @@ -380,7 +380,7 @@ void PMPrism::setHeight2( double h ) } } -void PMPrism::setPoints( const QValueList< QValueList<PMVector> >& points ) +void PMPrism::setPoints( const TQValueList< TQValueList<PMVector> >& points ) { if( m_points != points ) { @@ -392,7 +392,7 @@ void PMPrism::setPoints( const QValueList< QValueList<PMVector> >& points ) } } -PMDialogEditBase* PMPrism::editWidget( QWidget* parent ) const +PMDialogEditBase* PMPrism::editWidget( TQWidget* parent ) const { return new PMPrismEdit( parent ); } @@ -456,7 +456,7 @@ void PMPrism::createViewStructure( ) int sSteps = (int)( ( (float)s_sSteps / 2 ) * ( displayDetail( ) + 1 ) ); // calculate number of points and lines of the view structure - QValueList< QValueList<PMVector> >::ConstIterator spit = m_points.begin( ); + TQValueList< TQValueList<PMVector> >::ConstIterator spit = m_points.begin( ); int np = 0; for( ; spit != m_points.end( ); ++spit ) { @@ -499,8 +499,8 @@ void PMPrism::createViewStructure( ) for( spit = m_points.begin( ); spit != m_points.end( ); ++spit ) { - QValueList<PMSplineSegment> segments; - QValueList<PMVector> fullPoints = expandedPoints( *spit ); + TQValueList<PMSplineSegment> segments; + TQValueList<PMVector> fullPoints = expandedPoints( *spit ); int ns = fullPoints.count( ); int i, j; @@ -520,7 +520,7 @@ void PMPrism::createViewStructure( ) ns = ns / 4; break; } - QValueList<PMVector>::Iterator it1, it2, it3, it4; + TQValueList<PMVector>::Iterator it1, it2, it3, it4; // create the spline segments it1 = fullPoints.begin( ); @@ -581,7 +581,7 @@ void PMPrism::createViewStructure( ) // calculate the points PMVector point2( 2 ), point3; - QValueList<PMSplineSegment>::Iterator sit = segments.begin( ); + TQValueList<PMSplineSegment>::Iterator sit = segments.begin( ); int pi = 0; double poffset = 1.0 / sSteps; @@ -616,8 +616,8 @@ void PMPrism::createViewStructure( ) void PMPrism::controlPoints( PMControlPointList& list ) { - QValueList< QValueList<PMVector> >::Iterator it1; - QValueList<PMVector>::Iterator it2; + TQValueList< TQValueList<PMVector> >::Iterator it1; + TQValueList<PMVector>::Iterator it2; int i1, i2; list.append( new PMDistanceControlPoint( PMVector( 0.0, 0.0, 0.0 ), @@ -708,8 +708,8 @@ void PMPrism::controlPoints( PMControlPointList& list ) void PMPrism::controlPointsChanged( PMControlPointList& list ) { PMControlPointListIterator it( list ); - QValueList< QValueList<PMVector> >::Iterator spit = m_points.begin( ); - QValueList<PMVector>::Iterator pit = ( *spit ).begin( ); + TQValueList< TQValueList<PMVector> >::Iterator spit = m_points.begin( ); + TQValueList<PMVector>::Iterator pit = ( *spit ).begin( ); PM2DControlPoint* p1; PMDistanceControlPoint* dcp; bool firstChange = true; @@ -765,7 +765,7 @@ void PMPrism::controlPointsChanged( PMControlPointList& list ) } void PMPrism::addObjectActions( const PMControlPointList& /*cp*/, - QPtrList<PMObjectAction>& actions ) + TQPtrList<PMObjectAction>& actions ) { PMObjectAction* a; @@ -777,7 +777,7 @@ void PMPrism::addObjectActions( const PMControlPointList& /*cp*/, i18n( "Remove Point" ) ); bool enableJoin = false; - QValueList< QValueList<PMVector> >::ConstIterator spit = m_points.begin( ); + TQValueList< TQValueList<PMVector> >::ConstIterator spit = m_points.begin( ); int minp = 4; switch( m_splineType ) @@ -806,7 +806,7 @@ void PMPrism::addObjectActions( const PMControlPointList& /*cp*/, void PMPrism::objectActionCalled( const PMObjectAction* action, const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { if( action->objectType( ) == s_pMetaObject ) @@ -829,7 +829,7 @@ void PMPrism::objectActionCalled( const PMObjectAction* action, } void PMPrism::splitSegment( const PMControlPointList& /*cp*/, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { // find nearest segment @@ -841,12 +841,12 @@ void PMPrism::splitSegment( const PMControlPointList& /*cp*/, PMVector mid( 3 ), dist( 2 ); PMVector firstPoint( 3 ); - QPtrListIterator<PMVector> it1( cpViewPosition ); - QPtrListIterator<PMVector> it2( cpViewPosition ); + TQPtrListIterator<PMVector> it1( cpViewPosition ); + TQPtrListIterator<PMVector> it2( cpViewPosition ); for( i = 0; i < 2; ++i ) ++it1; for( i = 0; i < 3; ++i ) ++it2; - QValueList< QValueList<PMVector> >::Iterator spit = m_points.begin( ); + TQValueList< TQValueList<PMVector> >::Iterator spit = m_points.begin( ); for( spnr = 0; spit != m_points.end( ); ++spit, ++spnr ) { int nump = ( *spit ).count( ); @@ -901,18 +901,18 @@ void PMPrism::splitSegment( const PMControlPointList& /*cp*/, } // add a new segment - QValueList< QValueList<PMVector> > newPoints = m_points; + TQValueList< TQValueList<PMVector> > newPoints = m_points; spit = newPoints.at( nsp ); - QValueList<PMVector> newSubPoints = *spit; + TQValueList<PMVector> newSubPoints = *spit; if( m_splineType == BezierSpline ) { ns /= 3; ns *= 3; } - QValueList<PMVector>::Iterator it = newSubPoints.at( ( unsigned ) ns ); + TQValueList<PMVector>::Iterator it = newSubPoints.at( ( unsigned ) ns ); PMVector p[4]; - QValueList<PMVector>::Iterator hit = it, eit = newSubPoints.end( ); + TQValueList<PMVector>::Iterator hit = it, eit = newSubPoints.end( ); --eit; // calculate the spline segment @@ -1007,7 +1007,7 @@ void PMPrism::splitSegment( const PMControlPointList& /*cp*/, } void PMPrism::joinSegments( const PMControlPointList& /*cp*/, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { // find nearest point @@ -1018,7 +1018,7 @@ void PMPrism::joinSegments( const PMControlPointList& /*cp*/, int i; PMVector dist( 2 ); - QPtrListIterator<PMVector> it1( cpViewPosition ); + TQPtrListIterator<PMVector> it1( cpViewPosition ); for( i = 0; i < 2; ++i ) ++it1; int minp = 0; @@ -1038,7 +1038,7 @@ void PMPrism::joinSegments( const PMControlPointList& /*cp*/, break; } - QValueList< QValueList<PMVector> >::Iterator spit = m_points.begin( ); + TQValueList< TQValueList<PMVector> >::Iterator spit = m_points.begin( ); for( spnr = 0; spit != m_points.end( ); ++spit, ++spnr ) { int nump = ( *spit ).count( ); @@ -1088,10 +1088,10 @@ void PMPrism::joinSegments( const PMControlPointList& /*cp*/, } // remove the segment - QValueList< QValueList<PMVector> > newPoints = m_points; + TQValueList< TQValueList<PMVector> > newPoints = m_points; spit = newPoints.at( nsp ); - QValueList<PMVector> newSubPoints = *spit; - QValueList<PMVector>::Iterator it; + TQValueList<PMVector> newSubPoints = *spit; + TQValueList<PMVector>::Iterator it; if( m_splineType != BezierSpline ) { @@ -1138,11 +1138,11 @@ void PMPrism::setSSteps( int s ) ++s_parameterKey; } -QValueList<PMVector> PMPrism::expandedPoints( const QValueList<PMVector>& p ) const +TQValueList<PMVector> PMPrism::expandedPoints( const TQValueList<PMVector>& p ) const { // add the missing points int refa = 0, refb = p.count( ); - QValueList<PMVector> result = p; + TQValueList<PMVector> result = p; switch( m_splineType ) { @@ -1159,7 +1159,7 @@ QValueList<PMVector> PMPrism::expandedPoints( const QValueList<PMVector>& p ) co refb = refb / 3 * 4; break; } - QValueList<PMVector>::Iterator it1, it2, it3; + TQValueList<PMVector>::Iterator it1, it2, it3; if( m_splineType != BezierSpline ) { it1 = result.at( refa ); diff --git a/kpovmodeler/pmprism.h b/kpovmodeler/pmprism.h index 64511ee5..a22fb748 100644 --- a/kpovmodeler/pmprism.h +++ b/kpovmodeler/pmprism.h @@ -26,8 +26,8 @@ #include "pmsolidobject.h" #include "pmvector.h" -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> #include <math.h> class PMViewStructure; @@ -64,7 +64,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMPrism( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -72,18 +72,18 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMPrismEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmprism" ); } + virtual TQString pixmap( ) const { return TQString( "pmprism" ); } /** */ virtual void createMemento( ); @@ -99,21 +99,21 @@ public: virtual bool hasDisplayDetail( ) const { return true; } /** */ virtual void addObjectActions( const PMControlPointList&, - QPtrList<PMObjectAction>& ); + TQPtrList<PMObjectAction>& ); /** */ virtual void objectActionCalled( const PMObjectAction*, const PMControlPointList&, - const QPtrList<PMVector>&, + const TQPtrList<PMVector>&, const PMVector& ); /** * Returns the spline points */ - QValueList< QValueList<PMVector> > points( ) const { return m_points; } + TQValueList< TQValueList<PMVector> > points( ) const { return m_points; } /** * Sets the spline points */ - void setPoints( const QValueList< QValueList<PMVector> >& points ); + void setPoints( const TQValueList< TQValueList<PMVector> >& points ); /** * Returns the spline type */ @@ -174,7 +174,7 @@ public: /** * Returns the points for POV-Ray serialization (contains additional points) */ - QValueList<PMVector> expandedPoints( const QValueList<PMVector>& p ) const; + TQValueList<PMVector> expandedPoints( const TQValueList<PMVector>& p ) const; protected: /** */ @@ -187,17 +187,17 @@ private: * Object action. Adds a spline point */ void splitSegment( const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ); /** * Object action. Removes a spline point */ void joinSegments( const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ); - void stringToValues( const QString& str ); - QString valuesToString( ) const; + void stringToValues( const TQString& str ); + TQString valuesToString( ) const; /** * IDs for @ref PMMementoData @@ -210,7 +210,7 @@ private: enum PMPrismActionID { PMSplitSegmentID, PMJoinSegmentsID }; SplineType m_splineType; SweepType m_sweepType; - QValueList< QValueList<PMVector> > m_points; + TQValueList< TQValueList<PMVector> > m_points; double m_height1, m_height2; bool m_sturm; bool m_open; diff --git a/kpovmodeler/pmprismedit.cpp b/kpovmodeler/pmprismedit.cpp index 13ac49b5..e5cf8615 100644 --- a/kpovmodeler/pmprismedit.cpp +++ b/kpovmodeler/pmprismedit.cpp @@ -23,18 +23,18 @@ #include "pmvectorlistedit.h" #include "pmpart.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kdialog.h> #include <kiconloader.h> #include <kmessagebox.h> -PMPrismEdit::PMPrismEdit( QWidget* parent, const char* name ) +PMPrismEdit::PMPrismEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -49,51 +49,51 @@ void PMPrismEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Spline type:" ), this ) ); - m_pSplineType = new QComboBox( false, this ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Spline type:" ), this ) ); + m_pSplineType = new TQComboBox( false, this ); m_pSplineType->insertItem( i18n( "Linear Spline" ) ); m_pSplineType->insertItem( i18n( "Quadratic Spline" ) ); m_pSplineType->insertItem( i18n( "Cubic Spline" ) ); m_pSplineType->insertItem( i18n( "Bezier Spline" ) ); hl->addWidget( m_pSplineType ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Sweep type:" ), this ) ); - m_pSweepType = new QComboBox( false, this ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Sweep type:" ), this ) ); + m_pSweepType = new TQComboBox( false, this ); m_pSweepType->insertItem( i18n( "Linear Sweep" ) ); m_pSweepType->insertItem( i18n( "Conic Sweep" ) ); hl->addWidget( m_pSweepType ); - connect( m_pSplineType, SIGNAL( activated( int ) ), - SLOT( slotTypeChanged( int ) ) ); - connect( m_pSweepType, SIGNAL( activated( int ) ), - SLOT( slotSweepChanged( int ) ) ); + connect( m_pSplineType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotTypeChanged( int ) ) ); + connect( m_pSweepType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotSweepChanged( int ) ) ); - hl = new QHBoxLayout( topLayout( ) ); - QGridLayout* gl = new QGridLayout( hl, 2, 2 ); - gl->addWidget( new QLabel( i18n( "Height 1:" ), this ), 0, 0 ); + hl = new TQHBoxLayout( topLayout( ) ); + TQGridLayout* gl = new TQGridLayout( hl, 2, 2 ); + gl->addWidget( new TQLabel( i18n( "Height 1:" ), this ), 0, 0 ); m_pHeight1 = new PMFloatEdit( this ); gl->addWidget( m_pHeight1, 0, 1 ); - connect( m_pHeight1, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pHeight1, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); - gl->addWidget( new QLabel( i18n( "Height 2:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Height 2:" ), this ), 1, 0 ); m_pHeight2 = new PMFloatEdit( this ); gl->addWidget( m_pHeight2, 1, 1 ); - connect( m_pHeight2, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pHeight2, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); hl->addStretch( 1 ); } void PMPrismEdit::createBottomWidgets( ) { - m_pEditWidget = new QWidget( this ); + m_pEditWidget = new TQWidget( this ); topLayout( )->addWidget( m_pEditWidget ); - m_pOpen = new QCheckBox( i18n( "type of the object", "Open" ), this ); + m_pOpen = new TQCheckBox( i18n( "type of the object", "Open" ), this ); topLayout( )->addWidget( m_pOpen ); - m_pSturm = new QCheckBox( i18n( "Sturm" ), this ); + m_pSturm = new TQCheckBox( i18n( "Sturm" ), this ); topLayout( )->addWidget( m_pSturm ); - connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOpen, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOpen, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); Base::createBottomWidgets( ); } @@ -147,16 +147,16 @@ void PMPrismEdit::displayObject( PMObject* o ) kdError( PMArea ) << "PMPrismEdit: Can't display object\n"; } -void PMPrismEdit::displayPoints( const QValueList< QValueList<PMVector> >& sp ) +void PMPrismEdit::displayPoints( const TQValueList< TQValueList<PMVector> >& sp ) { bool readOnly = m_pDisplayedObject->isReadOnly( ); // (re)create the edit widget if necessary createEdits( sp ); - QValueList< QValueList<PMVector> >::ConstIterator spit = sp.begin( ); - QPtrListIterator< PMVectorListEdit > seit( m_points ); - QPtrListIterator< QPushButton > sbit1( m_removeButtons ); + TQValueList< TQValueList<PMVector> >::ConstIterator spit = sp.begin( ); + TQPtrListIterator< PMVectorListEdit > seit( m_points ); + TQPtrListIterator< TQPushButton > sbit1( m_removeButtons ); // display the points for( ; ( spit != sp.end( ) ) && *seit; ++spit, ++seit, ++sbit1 ) @@ -166,23 +166,23 @@ void PMPrismEdit::displayPoints( const QValueList< QValueList<PMVector> >& sp ) ( *sbit1 )->setEnabled( !readOnly && ( *spit ).size( ) > 3 ); } - QPtrListIterator< QPushButton > sbit2( m_addAboveButtons ); - QPtrListIterator< QPushButton > sbit3( m_addBelowButtons ); + TQPtrListIterator< TQPushButton > sbit2( m_addAboveButtons ); + TQPtrListIterator< TQPushButton > sbit3( m_addBelowButtons ); for( ; *sbit2; ++sbit2 ) ( *sbit2 )->setEnabled( !readOnly ); for( ; *sbit3; ++sbit3 ) ( *sbit3 )->setEnabled( !readOnly ); - QPtrListIterator<QPushButton> bit1( m_subPrismAddButtons ); + TQPtrListIterator<TQPushButton> bit1( m_subPrismAddButtons ); for( ; *bit1; ++bit1 ) ( *bit1 )->setEnabled( !readOnly ); - QPtrListIterator<QPushButton> bit2( m_subPrismRemoveButtons ); + TQPtrListIterator<TQPushButton> bit2( m_subPrismRemoveButtons ); for( ; *bit2; ++bit2 ) ( *bit2 )->setEnabled( !readOnly && sp.size( ) > 1 ); updateControlPointSelection( ); } -void PMPrismEdit::createEdits( const QValueList< QValueList<PMVector> >& sp ) +void PMPrismEdit::createEdits( const TQValueList< TQValueList<PMVector> >& sp ) { int st = m_pSplineType->currentItem( ); @@ -190,74 +190,74 @@ void PMPrismEdit::createEdits( const QValueList< QValueList<PMVector> >& sp ) { deleteEdits( ); - QPixmap addPixmap = SmallIcon( "pmaddpoint" ); - QPixmap removePixmap = SmallIcon( "pmremovepoint" ); - QPixmap addPrismPixmap = SmallIcon( "pmaddsubprism" ); - QVBoxLayout* tvl = new QVBoxLayout( m_pEditWidget, + TQPixmap addPixmap = SmallIcon( "pmaddpoint" ); + TQPixmap removePixmap = SmallIcon( "pmremovepoint" ); + TQPixmap addPrismPixmap = SmallIcon( "pmaddsubprism" ); + TQVBoxLayout* tvl = new TQVBoxLayout( m_pEditWidget, 0, KDialog::spacingHint( ) ); - QHBoxLayout* hl = 0; - QVBoxLayout* vl; - QLabel* label = 0; - QPushButton* button = 0; + TQHBoxLayout* hl = 0; + TQVBoxLayout* vl; + TQLabel* label = 0; + TQPushButton* button = 0; PMVectorListEdit* vle; int spnr = 0; for( spnr = 0; spnr < ( signed ) sp.size( ); spnr++ ) { // create all edits for one sub prism - hl = new QHBoxLayout( tvl ); - label = new QLabel( i18n( "Sub prism %1:" ).arg( spnr + 1 ), + hl = new TQHBoxLayout( tvl ); + label = new TQLabel( i18n( "Sub prism %1:" ).arg( spnr + 1 ), m_pEditWidget ); hl->addWidget( label ); hl->addStretch( 1 ); m_labels.append( label ); label->show( ); - button = new QPushButton( m_pEditWidget ); + button = new TQPushButton( m_pEditWidget ); button->setPixmap( addPrismPixmap ); m_subPrismAddButtons.append( button ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotAddSubPrism( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddSubPrism( ) ) ); hl->addWidget( button ); button->show( ); - QToolTip::add( button, i18n( "Add sub prism" ) ); + TQToolTip::add( button, i18n( "Add sub prism" ) ); - button = new QPushButton( m_pEditWidget ); + button = new TQPushButton( m_pEditWidget ); button->setPixmap( removePixmap ); m_subPrismRemoveButtons.append( button ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotRemoveSubPrism( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemoveSubPrism( ) ) ); hl->addWidget( button ); button->show( ); if( sp.size( ) < 2 ) button->setEnabled( false ); - QToolTip::add( button, i18n( "Remove sub prism" ) ); + TQToolTip::add( button, i18n( "Remove sub prism" ) ); - hl = new QHBoxLayout( tvl ); + hl = new TQHBoxLayout( tvl ); vle = new PMVectorListEdit( "x", "z", m_pEditWidget ); m_points.append( vle ); - connect( vle, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( vle, SIGNAL( selectionChanged( ) ), - SLOT( slotSelectionChanged( ) ) ); + connect( vle, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( vle, TQT_SIGNAL( selectionChanged( ) ), + TQT_SLOT( slotSelectionChanged( ) ) ); hl->addWidget( vle, 2 ); vle->show( ); - vl = new QVBoxLayout( hl ); + vl = new TQVBoxLayout( hl ); - button = new QPushButton( m_pEditWidget ); + button = new TQPushButton( m_pEditWidget ); button->setPixmap( SmallIcon( "pmaddpointabove" ) ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotAddPointAbove( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointAbove( ) ) ); m_addAboveButtons.append( button ); button->show( ); vl->addWidget( button ); - button = new QPushButton( m_pEditWidget ); + button = new TQPushButton( m_pEditWidget ); button->setPixmap( SmallIcon( "pmaddpoint" ) ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotAddPointBelow( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointBelow( ) ) ); m_addBelowButtons.append( button ); button->show( ); vl->addWidget( button ); - button = new QPushButton( m_pEditWidget ); + button = new TQPushButton( m_pEditWidget ); button->setPixmap( SmallIcon( "pmremovepoint" ) ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotRemovePoint( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemovePoint( ) ) ); m_removeButtons.append( button ); button->show( ); vl->addWidget( button ); @@ -267,24 +267,24 @@ void PMPrismEdit::createEdits( const QValueList< QValueList<PMVector> >& sp ) tvl->addSpacing( KDialog::spacingHint( ) ); } - hl = new QHBoxLayout( tvl ); - label = new QLabel( i18n( "New sub prism" ), m_pEditWidget ); + hl = new TQHBoxLayout( tvl ); + label = new TQLabel( i18n( "New sub prism" ), m_pEditWidget ); hl->addWidget( label ); hl->addStretch( 1 ); m_labels.append( label ); label->show( ); - button = new QPushButton( m_pEditWidget ); + button = new TQPushButton( m_pEditWidget ); button->setPixmap( addPrismPixmap ); m_subPrismAddButtons.append( button ); - connect( button, SIGNAL( clicked( ) ), SLOT( slotAddSubPrism( ) ) ); + connect( button, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddSubPrism( ) ) ); hl->addWidget( button ); button->show( ); - QToolTip::add( button, i18n( "Append sub prism" ) ); + TQToolTip::add( button, i18n( "Append sub prism" ) ); } - QPtrListIterator< PMVectorListEdit > vlit( m_points ); - QValueList< QValueList< PMVector > >::ConstIterator spit; + TQPtrListIterator< PMVectorListEdit > vlit( m_points ); + TQValueList< TQValueList< PMVector > >::ConstIterator spit; PMVectorListEdit* vle = 0; bool newSize = false; @@ -336,10 +336,10 @@ void PMPrismEdit::deleteEdits( ) delete m_pEditWidget->layout( ); } -QValueList< QValueList<PMVector> > PMPrismEdit::splinePoints( ) +TQValueList< TQValueList<PMVector> > PMPrismEdit::splinePoints( ) { - QPtrListIterator< PMVectorListEdit > it( m_points ); - QValueList< QValueList<PMVector> > values; + TQPtrListIterator< PMVectorListEdit > it( m_points ); + TQValueList< TQValueList<PMVector> > values; for( ; it.current( ); ++it ) values.append( ( *it )->vectors( ) ); @@ -387,7 +387,7 @@ void PMPrismEdit::saveContents( ) bool PMPrismEdit::isDataValid( ) { - QPtrListIterator< PMVectorListEdit > it( m_points ); + TQPtrListIterator< PMVectorListEdit > it( m_points ); for( ; it.current( ); ++it ) if( !it.current( )->isDataValid( ) ) return false; @@ -449,7 +449,7 @@ void PMPrismEdit::slotSweepChanged( int ) void PMPrismEdit::slotAddPointAbove( ) { - QPushButton* bt = ( QPushButton* ) sender( ); + TQPushButton* bt = ( TQPushButton* ) sender( ); if( bt ) { int subIndex = m_addAboveButtons.findRef( bt ); @@ -459,8 +459,8 @@ void PMPrismEdit::slotAddPointAbove( ) int index = ed->currentRow( ); if( index >= 0 && index < ed->size( ) ) { - QValueList<PMVector> points = ed->vectors( ); - QValueListIterator<PMVector> it = points.at( index ); + TQValueList<PMVector> points = ed->vectors( ); + TQValueListIterator<PMVector> it = points.at( index ); PMVector newPoint = *it; if( index != 0 ) @@ -485,7 +485,7 @@ void PMPrismEdit::slotAddPointAbove( ) void PMPrismEdit::slotAddPointBelow( ) { - QPushButton* bt = ( QPushButton* ) sender( ); + TQPushButton* bt = ( TQPushButton* ) sender( ); if( bt ) { int subIndex = m_addBelowButtons.findRef( bt ); @@ -495,8 +495,8 @@ void PMPrismEdit::slotAddPointBelow( ) int index = ed->currentRow( ); if( index >= 0 && index < ed->size( ) ) { - QValueList<PMVector> points = ed->vectors( ); - QValueListIterator<PMVector> it = points.at( index ); + TQValueList<PMVector> points = ed->vectors( ); + TQValueListIterator<PMVector> it = points.at( index ); PMVector newPoint = *it; ++it; @@ -521,7 +521,7 @@ void PMPrismEdit::slotAddPointBelow( ) void PMPrismEdit::slotRemovePoint( ) { - QPushButton* bt = ( QPushButton* ) sender( ); + TQPushButton* bt = ( TQPushButton* ) sender( ); if( bt ) { int subIndex = m_removeButtons.findRef( bt ); @@ -531,8 +531,8 @@ void PMPrismEdit::slotRemovePoint( ) int index = ed->currentRow( ); if( index >= 0 && index < ed->size( ) ) { - QValueList<PMVector> points = ed->vectors( ); - QValueListIterator<PMVector> it = points.at( index ); + TQValueList<PMVector> points = ed->vectors( ); + TQValueListIterator<PMVector> it = points.at( index ); points.remove( it ); @@ -557,15 +557,15 @@ void PMPrismEdit::slotAddSubPrism( ) i18n( "Warning" ), "subPrismWithBezierSplines" ); } - QPushButton* button = ( QPushButton* ) sender( ); + TQPushButton* button = ( TQPushButton* ) sender( ); if( button ) { int index = m_subPrismAddButtons.findRef( button ); if( index >= 0 ) { - QValueList< QValueList<PMVector> > points = splinePoints( ); - QValueList< QValueList<PMVector> >::Iterator it = points.at( index ); - QValueList<PMVector> newSubPrism; + TQValueList< TQValueList<PMVector> > points = splinePoints( ); + TQValueList< TQValueList<PMVector> >::Iterator it = points.at( index ); + TQValueList<PMVector> newSubPrism; if( it != points.begin( ) ) { @@ -576,7 +576,7 @@ void PMPrismEdit::slotAddSubPrism( ) // find middle point PMVector mid( 2 ); int num = 0; - QValueList<PMVector>::Iterator pit = newSubPrism.begin( ); + TQValueList<PMVector>::Iterator pit = newSubPrism.begin( ); for( ; pit != newSubPrism.end( ); ++pit, ++num ) mid += *pit; if( num > 0 ) @@ -597,14 +597,14 @@ void PMPrismEdit::slotAddSubPrism( ) void PMPrismEdit::slotRemoveSubPrism( ) { - QPushButton* button = ( QPushButton* ) sender( ); + TQPushButton* button = ( TQPushButton* ) sender( ); if( button ) { int index = m_subPrismRemoveButtons.findRef( button ); if( index >= 0 ) { - QValueList< QValueList<PMVector> > points = splinePoints( ); - QValueList< QValueList<PMVector> >::Iterator it = points.at( index ); + TQValueList< TQValueList<PMVector> > points = splinePoints( ); + TQValueList< TQValueList<PMVector> >::Iterator it = points.at( index ); if( points.count( ) > 1 ) { @@ -622,16 +622,16 @@ void PMPrismEdit::slotSelectionChanged( ) PMVectorListEdit* edit = ( PMVectorListEdit* ) sender( ); if( edit ) { - QValueList< QValueList< PMVector > > points = m_pDisplayedObject->points( ); + TQValueList< TQValueList< PMVector > > points = m_pDisplayedObject->points( ); if( m_points.count( ) == points.size( ) ) { int i; bool changed = false; - QValueList< QValueList< PMVector > >::Iterator spit; + TQValueList< TQValueList< PMVector > >::Iterator spit; PMControlPointList cp = part( )->activeControlPoints( ); PMControlPointListIterator it( cp ); ++it; ++it; - QPtrListIterator<PMVectorListEdit> edit( m_points ); + TQPtrListIterator<PMVectorListEdit> edit( m_points ); for( spit = points.begin( ); spit != points.end( ) && it.current( ); ++spit, ++edit ) @@ -656,14 +656,14 @@ void PMPrismEdit::slotSelectionChanged( ) void PMPrismEdit::updateControlPointSelection( ) { - QValueList< QValueList< PMVector > > points = m_pDisplayedObject->points( ); + TQValueList< TQValueList< PMVector > > points = m_pDisplayedObject->points( ); if( m_points.count( ) == points.size( ) ) { - QValueList< QValueList< PMVector > >::Iterator spit; + TQValueList< TQValueList< PMVector > >::Iterator spit; PMControlPointList cp = part( )->activeControlPoints( ); PMControlPointListIterator it( cp ); ++it; ++it; - QPtrListIterator<PMVectorListEdit> edit( m_points ); + TQPtrListIterator<PMVectorListEdit> edit( m_points ); for( spit = points.begin( ); spit != points.end( ) && it.current( ); ++spit, ++edit ) diff --git a/kpovmodeler/pmprismedit.h b/kpovmodeler/pmprismedit.h index 75a65dbd..8f54beb2 100644 --- a/kpovmodeler/pmprismedit.h +++ b/kpovmodeler/pmprismedit.h @@ -26,18 +26,18 @@ #include "pmsolidobjectedit.h" #include "pmvectoredit.h" -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> class PMPrism; class PMFloatEdit; class PMVectorListEdit; -class QVBoxLayout; -class QComboBox; -class QCheckBox; -class QPushButton; -class QLabel; +class TQVBoxLayout; +class TQComboBox; +class TQCheckBox; +class TQPushButton; +class TQLabel; /** * Dialog edit class for @ref PMPrism @@ -50,7 +50,7 @@ public: /** * Creates a PMPrismEdit with parent and name */ - PMPrismEdit( QWidget* parent, const char* name = 0 ); + PMPrismEdit( TQWidget* parent, const char* name = 0 ); /** * Destructor */ @@ -75,11 +75,11 @@ private: /** * Displays the spline points */ - void displayPoints( const QValueList< QValueList<PMVector> >& list ); + void displayPoints( const TQValueList< TQValueList<PMVector> >& list ); /** * Returns the spline points from the vector edits */ - QValueList< QValueList<PMVector> > splinePoints( ); + TQValueList< TQValueList<PMVector> > splinePoints( ); /** * Deletes the spline point edits */ @@ -87,7 +87,7 @@ private: /** * Creates the edits for the points */ - void createEdits( const QValueList< QValueList<PMVector> >& points ); + void createEdits( const TQValueList< TQValueList<PMVector> >& points ); protected slots: void slotTypeChanged( int ); @@ -101,18 +101,18 @@ protected slots: private: PMPrism* m_pDisplayedObject; - QPtrList< QLabel > m_labels; - QPtrList< QPushButton > m_subPrismAddButtons; - QPtrList< QPushButton > m_subPrismRemoveButtons; - QPtrList< QPushButton > m_addAboveButtons; - QPtrList< QPushButton > m_addBelowButtons; - QPtrList< QPushButton > m_removeButtons; - QPtrList< PMVectorListEdit> m_points; - QWidget* m_pEditWidget; - QComboBox* m_pSplineType; - QComboBox* m_pSweepType; - QCheckBox* m_pSturm; - QCheckBox* m_pOpen; + TQPtrList< TQLabel > m_labels; + TQPtrList< TQPushButton > m_subPrismAddButtons; + TQPtrList< TQPushButton > m_subPrismRemoveButtons; + TQPtrList< TQPushButton > m_addAboveButtons; + TQPtrList< TQPushButton > m_addBelowButtons; + TQPtrList< TQPushButton > m_removeButtons; + TQPtrList< PMVectorListEdit> m_points; + TQWidget* m_pEditWidget; + TQComboBox* m_pSplineType; + TQComboBox* m_pSweepType; + TQCheckBox* m_pSturm; + TQCheckBox* m_pOpen; PMFloatEdit* m_pHeight1; PMFloatEdit* m_pHeight2; int m_lastSplineType; diff --git a/kpovmodeler/pmprismmemento.cpp b/kpovmodeler/pmprismmemento.cpp index 0f50449d..4b24d500 100644 --- a/kpovmodeler/pmprismmemento.cpp +++ b/kpovmodeler/pmprismmemento.cpp @@ -27,21 +27,21 @@ PMPrismMemento::~PMPrismMemento( ) { } -void PMPrismMemento::setPrismPoints( const QValueList< QValueList<PMVector> >& v ) +void PMPrismMemento::setPrismPoints( const TQValueList< TQValueList<PMVector> >& v ) { if( !m_bPrismPointsSaved ) { // Direct assignment does not work with Qt 2.3.x // The list will be changed later in a graphical - // change because QValueList::detach( ) is called + // change because TQValueList::detach( ) is called // too late! // Copy the list by hand. - QValueList< QValueList< PMVector > >::ConstIterator sit = v.begin( ); + TQValueList< TQValueList< PMVector > >::ConstIterator sit = v.begin( ); for( ; sit != v.end( ); ++sit ) { - QValueList<PMVector> list; - QValueList<PMVector>::ConstIterator it = ( *sit ).begin( ); + TQValueList<PMVector> list; + TQValueList<PMVector>::ConstIterator it = ( *sit ).begin( ); for( ; it != ( *sit ).end( ); ++it ) list.append( *it ); m_prismPoints.append( list ); diff --git a/kpovmodeler/pmprismmemento.h b/kpovmodeler/pmprismmemento.h index a45f7fef..13adf608 100644 --- a/kpovmodeler/pmprismmemento.h +++ b/kpovmodeler/pmprismmemento.h @@ -26,7 +26,7 @@ #include "pmmemento.h" #include "pmvector.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> /** @@ -47,11 +47,11 @@ public: /** * Saves the prism points */ - void setPrismPoints( const QValueList< QValueList<PMVector> >& v ); + void setPrismPoints( const TQValueList< TQValueList<PMVector> >& v ); /** * Returns the prism points */ - QValueList< QValueList<PMVector> > prismPoints( ) const + TQValueList< TQValueList<PMVector> > prismPoints( ) const { return m_prismPoints; } @@ -64,7 +64,7 @@ private: /** * The stored points */ - QValueList< QValueList<PMVector> > m_prismPoints; + TQValueList< TQValueList<PMVector> > m_prismPoints; bool m_bPrismPointsSaved; }; diff --git a/kpovmodeler/pmprojectedthrough.cpp b/kpovmodeler/pmprojectedthrough.cpp index 46ecc51c..96c0c00a 100644 --- a/kpovmodeler/pmprojectedthrough.cpp +++ b/kpovmodeler/pmprojectedthrough.cpp @@ -44,7 +44,7 @@ PMProjectedThrough::~PMProjectedThrough( ) } -QString PMProjectedThrough::description( ) const +TQString PMProjectedThrough::description( ) const { return i18n( "projected through" ); } @@ -70,7 +70,7 @@ void PMProjectedThrough::cleanUp( ) const Base::cleanUp( ); } -void PMProjectedThrough::serialize( QDomElement& e, QDomDocument& doc ) const +void PMProjectedThrough::serialize( TQDomElement& e, TQDomDocument& doc ) const { Base::serialize( e, doc ); } @@ -80,7 +80,7 @@ void PMProjectedThrough::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMProjectedThrough::editWidget( QWidget* parent ) const +PMDialogEditBase* PMProjectedThrough::editWidget( TQWidget* parent ) const { return new PMNamedObjectEdit( parent ); } diff --git a/kpovmodeler/pmprojectedthrough.h b/kpovmodeler/pmprojectedthrough.h index 66b2a7bd..4212097f 100644 --- a/kpovmodeler/pmprojectedthrough.h +++ b/kpovmodeler/pmprojectedthrough.h @@ -50,7 +50,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMProjectedThrough( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -58,18 +58,18 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMProjectedThroughEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmprojectedthrough" ); } + virtual TQString pixmap( ) const { return TQString( "pmprojectedthrough" ); } /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmprototypemanager.cpp b/kpovmodeler/pmprototypemanager.cpp index f458e248..a32a6692 100644 --- a/kpovmodeler/pmprototypemanager.cpp +++ b/kpovmodeler/pmprototypemanager.cpp @@ -180,9 +180,9 @@ void PMPrototypeManager::addPrototype( PMObject* obj ) delete obj; } -void PMPrototypeManager::addDeclarationType( const QString& className, - const QString& description, - const QString& pixmap ) +void PMPrototypeManager::addDeclarationType( const TQString& className, + const TQString& description, + const TQString& pixmap ) { PMMetaObject* m = metaObject( className ); if( !m ) @@ -191,17 +191,17 @@ void PMPrototypeManager::addDeclarationType( const QString& className, m_declareDescriptions.push_back( PMDeclareDescription( m, description, pixmap ) ); } -QPtrListIterator<PMMetaObject> PMPrototypeManager::prototypeIterator( ) const +TQPtrListIterator<PMMetaObject> PMPrototypeManager::prototypeIterator( ) const { - return QPtrListIterator<PMMetaObject>( m_prototypes ); + return TQPtrListIterator<PMMetaObject>( m_prototypes ); } -const QValueList<PMDeclareDescription>& PMPrototypeManager::declarationTypes( ) const +const TQValueList<PMDeclareDescription>& PMPrototypeManager::declarationTypes( ) const { return m_declareDescriptions; } -PMObject* PMPrototypeManager::newObject( const QString& name ) const +PMObject* PMPrototypeManager::newObject( const TQString& name ) const { if( name.isEmpty( ) ) return 0; @@ -212,21 +212,21 @@ PMObject* PMPrototypeManager::newObject( const QString& name ) const return meta->newObject( m_pPart ); } -PMMetaObject* PMPrototypeManager::metaObject( const QString& name ) const +PMMetaObject* PMPrototypeManager::metaObject( const TQString& name ) const { if( name.isNull( ) ) return 0; return m_metaDict.find( name ); } -bool PMPrototypeManager::isA( const QString& className, - const QString& baseClass ) const +bool PMPrototypeManager::isA( const TQString& className, + const TQString& baseClass ) const { return isA( metaObject( className ), baseClass ); } bool PMPrototypeManager::isA( PMMetaObject* c, - const QString& baseClass ) const + const TQString& baseClass ) const { PMMetaObject* bc = metaObject( baseClass ); while( c && c != bc ) @@ -234,10 +234,10 @@ bool PMPrototypeManager::isA( PMMetaObject* c, return( c && ( c == bc ) ); } -QString PMPrototypeManager::className( const QString& lowercase ) const +TQString PMPrototypeManager::className( const TQString& lowercase ) const { - QMap<QString, QString>::const_iterator it = m_lowerCaseDict.find( lowercase ); + TQMap<TQString, TQString>::const_iterator it = m_lowerCaseDict.find( lowercase ); if( it != m_lowerCaseDict.end( ) ) return *it; - return QString::null; + return TQString::null; } diff --git a/kpovmodeler/pmprototypemanager.h b/kpovmodeler/pmprototypemanager.h index 025b8213..bade9e29 100644 --- a/kpovmodeler/pmprototypemanager.h +++ b/kpovmodeler/pmprototypemanager.h @@ -21,9 +21,9 @@ #define PMPTMANAGER_H #include "pmobject.h" -#include <qdict.h> -#include <qmap.h> -#include <qvaluelist.h> +#include <tqdict.h> +#include <tqmap.h> +#include <tqvaluelist.h> class PMPart; @@ -41,7 +41,7 @@ public: description = d.description; pixmap = d.pixmap; } - PMDeclareDescription( PMMetaObject* t, const QString& d, const QString& p ) + PMDeclareDescription( PMMetaObject* t, const TQString& d, const TQString& p ) { type = t; description = d; @@ -55,8 +55,8 @@ public: return *this; } PMMetaObject* type; - QString description; - QString pixmap; + TQString description; + TQString pixmap; }; /** @@ -91,31 +91,31 @@ public: * Adds a declaration type. Needed information is the class type, * the @ref description( ) and the @ref pixmap( ) */ - void addDeclarationType( const QString& className, - const QString& description, - const QString& pixmap ); + void addDeclarationType( const TQString& className, + const TQString& description, + const TQString& pixmap ); /** * Returns an iterator to the list of available objects */ - QPtrListIterator<PMMetaObject> prototypeIterator( ) const; + TQPtrListIterator<PMMetaObject> prototypeIterator( ) const; /** * Returns an iterator to the list of available declaration types */ - const QValueList<PMDeclareDescription>& declarationTypes( ) const; + const TQValueList<PMDeclareDescription>& declarationTypes( ) const; /** * Returns a new PMObject by class name */ - PMObject* newObject( const QString& name ) const; + PMObject* newObject( const TQString& name ) const; /** * Returns the meta object by class name or 0 if this class does * not exist. * @see PMMetaObject */ - PMMetaObject* metaObject( const QString& name ) const; + PMMetaObject* metaObject( const TQString& name ) const; /** * Returns true if the class exists */ - bool existsClass( const QString& name ) const + bool existsClass( const TQString& name ) const { return metaObject( name ); } @@ -123,27 +123,27 @@ public: * Returns true if the second class is a base class for * the first class */ - bool isA( const QString& className, const QString& baseClassName ) const; + bool isA( const TQString& className, const TQString& baseClassName ) const; /** * Returns true if the second class is a base class for * the first class */ - bool isA( PMMetaObject* c, const QString& baseClassName ) const; + bool isA( PMMetaObject* c, const TQString& baseClassName ) const; /** * Returns the real class if only the lower case version is know. * Used by the xml parser */ - QString className( const QString& lowercase ) const; + TQString className( const TQString& lowercase ) const; /** * Returns a pointer to the part */ PMPart* part( ) const { return m_pPart; } private: - QPtrList<PMMetaObject> m_prototypes; - QDict<PMMetaObject> m_metaDict; - QMap<QString, QString> m_lowerCaseDict; - QValueList<PMDeclareDescription> m_declareDescriptions; + TQPtrList<PMMetaObject> m_prototypes; + TQDict<PMMetaObject> m_metaDict; + TQMap<TQString, TQString> m_lowerCaseDict; + TQValueList<PMDeclareDescription> m_declareDescriptions; PMPart* m_pPart; }; #endif diff --git a/kpovmodeler/pmquickcolor.cpp b/kpovmodeler/pmquickcolor.cpp index fcf34e85..25fc7aff 100644 --- a/kpovmodeler/pmquickcolor.cpp +++ b/kpovmodeler/pmquickcolor.cpp @@ -52,12 +52,12 @@ PMQuickColor::~PMQuickColor( ) { } -QString PMQuickColor::description( ) const +TQString PMQuickColor::description( ) const { return i18n( "quick color" ); } -void PMQuickColor::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const +void PMQuickColor::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const { e.setAttribute( "quickcolor", m_color.serializeXML( ) ); } @@ -102,7 +102,7 @@ void PMQuickColor::setColor( const PMColor& c ) } } -PMDialogEditBase* PMQuickColor::editWidget( QWidget* parent ) const +PMDialogEditBase* PMQuickColor::editWidget( TQWidget* parent ) const { return new PMQuickColorEdit( parent ); } diff --git a/kpovmodeler/pmquickcolor.h b/kpovmodeler/pmquickcolor.h index a1dce42d..84a3afb5 100644 --- a/kpovmodeler/pmquickcolor.h +++ b/kpovmodeler/pmquickcolor.h @@ -54,7 +54,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMQuickColor( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -62,19 +62,19 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMQuickColorEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmquickcolor" ); } + virtual TQString pixmap( ) const { return TQString( "pmquickcolor" ); } /** * Returns the color diff --git a/kpovmodeler/pmquickcoloredit.cpp b/kpovmodeler/pmquickcoloredit.cpp index 35c21234..cb86c0c0 100644 --- a/kpovmodeler/pmquickcoloredit.cpp +++ b/kpovmodeler/pmquickcoloredit.cpp @@ -21,12 +21,12 @@ #include "pmcoloredit.h" #include "pmdebug.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMQuickColorEdit::PMQuickColorEdit( QWidget* parent, const char* name ) +PMQuickColorEdit::PMQuickColorEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -36,12 +36,12 @@ void PMQuickColorEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout = new QHBoxLayout( topLayout( ) ); + TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); m_pColorEdit = new PMColorEdit( false, this ); - layout->addWidget( new QLabel( i18n( "Color:" ), this ), 0, AlignTop ); + layout->addWidget( new TQLabel( i18n( "Color:" ), this ), 0, AlignTop ); layout->addWidget( m_pColorEdit ); - connect( m_pColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMQuickColorEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmquickcoloredit.h b/kpovmodeler/pmquickcoloredit.h index 78759a88..7f6d16e9 100644 --- a/kpovmodeler/pmquickcoloredit.h +++ b/kpovmodeler/pmquickcoloredit.h @@ -42,7 +42,7 @@ public: /** * Creates a PMQuickColorEdit with parent and name */ - PMQuickColorEdit( QWidget* parent, const char* name = 0 ); + PMQuickColorEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmradiosity.cpp b/kpovmodeler/pmradiosity.cpp index d5446b25..86d36e74 100644 --- a/kpovmodeler/pmradiosity.cpp +++ b/kpovmodeler/pmradiosity.cpp @@ -136,12 +136,12 @@ void PMRadiosity::cleanUp( ) const Base::cleanUp( ); } -QString PMRadiosity::description( ) const +TQString PMRadiosity::description( ) const { return i18n( "radiosity" ); } -void PMRadiosity::serialize( QDomElement& e, QDomDocument& ) const +void PMRadiosity::serialize( TQDomElement& e, TQDomDocument& ) const { e.setAttribute( "adc_bailout", m_adcBailout ); @@ -356,7 +356,7 @@ void PMRadiosity::setRecursionLimit( int c ) } } -PMDialogEditBase* PMRadiosity::editWidget( QWidget* parent ) const +PMDialogEditBase* PMRadiosity::editWidget( TQWidget* parent ) const { return new PMRadiosityEdit( parent ); } diff --git a/kpovmodeler/pmradiosity.h b/kpovmodeler/pmradiosity.h index 56a1cbd4..c56ccec2 100644 --- a/kpovmodeler/pmradiosity.h +++ b/kpovmodeler/pmradiosity.h @@ -50,7 +50,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMRadiosity( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -58,19 +58,19 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMRadiosityEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmradiosity" ); } + virtual TQString pixmap( ) const { return TQString( "pmradiosity" ); } /** * Returns the adc bailout diff --git a/kpovmodeler/pmradiosityedit.cpp b/kpovmodeler/pmradiosityedit.cpp index 1154214d..97494ff8 100644 --- a/kpovmodeler/pmradiosityedit.cpp +++ b/kpovmodeler/pmradiosityedit.cpp @@ -20,15 +20,15 @@ #include "pmradiosity.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kdialog.h> #include <kmessagebox.h> -PMRadiosityEdit::PMRadiosityEdit( QWidget* parent, const char* name ) +PMRadiosityEdit::PMRadiosityEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -36,91 +36,91 @@ PMRadiosityEdit::PMRadiosityEdit( QWidget* parent, const char* name ) void PMRadiosityEdit::createTopWidgets( ) { - QHBoxLayout* hl; - QGridLayout *gl; - QLabel* lbl; + TQHBoxLayout* hl; + TQGridLayout *gl; + TQLabel* lbl; Base::createTopWidgets( ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 15, 2 ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 15, 2 ); - lbl = new QLabel( i18n( "Adc bailout:" ), this ); + lbl = new TQLabel( i18n( "Adc bailout:" ), this ); m_pAdcBailout = new PMFloatEdit( this ); m_pAdcBailout->setValidation( true, 0, true, 1 ); gl->addWidget( lbl, 0, 0 ); gl->addWidget( m_pAdcBailout, 0, 1 ); - m_pAlwaysSample = new QCheckBox( i18n( "Always sample" ), this ); + m_pAlwaysSample = new TQCheckBox( i18n( "Always sample" ), this ); gl->addMultiCellWidget( m_pAlwaysSample, 1, 1, 0, 1 ); - lbl = new QLabel( i18n( "Brightness:" ), this ); + lbl = new TQLabel( i18n( "Brightness:" ), this ); m_pBrightness = new PMFloatEdit( this ); m_pBrightness->setValidation( true, 0, false, 0 ); gl->addWidget( lbl, 2, 0 ); gl->addWidget( m_pBrightness, 2, 1 ); - lbl = new QLabel( i18n( "Count:" ), this ); + lbl = new TQLabel( i18n( "Count:" ), this ); m_pCount = new PMIntEdit( this ); m_pCount->setValidation( true, 0, true, 1600 ); gl->addWidget( lbl, 3, 0 ); gl->addWidget( m_pCount, 3, 1 ); - lbl = new QLabel( i18n( "Error boundary:" ), this ); + lbl = new TQLabel( i18n( "Error boundary:" ), this ); m_pErrorBound = new PMFloatEdit( this ); m_pErrorBound->setValidation( true, 0, false, 0 ); gl->addWidget( lbl, 4, 0 ); gl->addWidget( m_pErrorBound, 4, 1 ); - lbl = new QLabel( i18n( "Gray threshold:" ), this ); + lbl = new TQLabel( i18n( "Gray threshold:" ), this ); m_pGrayThreshold = new PMFloatEdit( this ); m_pGrayThreshold->setValidation( true, 0, true, 1 ); gl->addWidget( lbl, 5, 0 ); gl->addWidget( m_pGrayThreshold, 5, 1 ); - lbl = new QLabel( i18n( "Low error factor:" ), this ); + lbl = new TQLabel( i18n( "Low error factor:" ), this ); m_pLowErrorFactor = new PMFloatEdit( this ); m_pLowErrorFactor->setValidation( true, 0, true, 1 ); gl->addWidget( lbl, 6, 0 ); gl->addWidget( m_pLowErrorFactor, 6, 1 ); - lbl = new QLabel( i18n( "Maximum sample:" ), this ); + lbl = new TQLabel( i18n( "Maximum sample:" ), this ); m_pMaxSample = new PMFloatEdit( this ); m_pMaxSample->setValidation( true, -1, false, 0 ); gl->addWidget( lbl, 7, 0 ); gl->addWidget( m_pMaxSample, 7, 1 ); - m_pMedia = new QCheckBox( i18n( "Media" ), this ); + m_pMedia = new TQCheckBox( i18n( "Media" ), this ); gl->addMultiCellWidget( m_pMedia, 8, 8, 0, 1 ); - lbl = new QLabel( i18n( "Minimum reuse:" ), this ); + lbl = new TQLabel( i18n( "Minimum reuse:" ), this ); m_pMinimumReuse = new PMFloatEdit( this ); m_pMinimumReuse->setValidation( true, 0, true, 1 ); gl->addWidget( lbl, 9, 0 ); gl->addWidget( m_pMinimumReuse, 9, 1 ); - lbl = new QLabel( i18n( "Nearest count:" ), this ); + lbl = new TQLabel( i18n( "Nearest count:" ), this ); m_pNearestCount = new PMIntEdit( this ); m_pNearestCount->setValidation( true, 0, true, 20 ); gl->addWidget( lbl, 10, 0 ); gl->addWidget( m_pNearestCount, 10, 1 ); - m_pNormal = new QCheckBox( i18n( "Normal" ), this ); + m_pNormal = new TQCheckBox( i18n( "Normal" ), this ); gl->addMultiCellWidget( m_pNormal, 11, 11, 0, 1 ); - lbl = new QLabel( i18n( "Pretrace start:" ), this ); + lbl = new TQLabel( i18n( "Pretrace start:" ), this ); m_pPretraceStart = new PMFloatEdit( this ); m_pPretraceStart->setValidation( true, 0, true, 1 ); gl->addWidget( lbl, 12, 0 ); gl->addWidget( m_pPretraceStart, 12, 1 ); - lbl = new QLabel( i18n( "Pretrace end:" ), this ); + lbl = new TQLabel( i18n( "Pretrace end:" ), this ); m_pPretraceEnd = new PMFloatEdit( this ); m_pPretraceEnd->setValidation( true, 0, true, 1 ); gl->addWidget( lbl, 13, 0 ); gl->addWidget( m_pPretraceEnd, 13, 1 ); - lbl = new QLabel( i18n( "Recursion limit:" ), this ); + lbl = new TQLabel( i18n( "Recursion limit:" ), this ); m_pRecursionLimit = new PMIntEdit( this ); m_pRecursionLimit->setValidation( true, 1, true, 20 ); gl->addWidget( lbl, 14, 0 ); @@ -128,21 +128,21 @@ void PMRadiosityEdit::createTopWidgets( ) hl->addStretch( 1 ); - connect( m_pAdcBailout, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAlwaysSample, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pBrightness, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pCount, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pErrorBound, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pGrayThreshold, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pLowErrorFactor, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMaxSample, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMedia, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMinimumReuse, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pNearestCount, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pNormal, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPretraceStart, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPretraceEnd, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRecursionLimit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pAdcBailout, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAlwaysSample, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pBrightness, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pCount, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pErrorBound, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pGrayThreshold, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pLowErrorFactor, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMaxSample, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMedia, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMinimumReuse, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pNearestCount, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pNormal, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPretraceStart, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPretraceEnd, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRecursionLimit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMRadiosityEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmradiosityedit.h b/kpovmodeler/pmradiosityedit.h index 37ee18c7..d2389cab 100644 --- a/kpovmodeler/pmradiosityedit.h +++ b/kpovmodeler/pmradiosityedit.h @@ -29,7 +29,7 @@ class PMRadiosity; class PMFloatEdit; class PMIntEdit; -class QCheckBox; +class TQCheckBox; /** * Dialog edit class for @ref PMRadiosity. @@ -42,7 +42,7 @@ public: /** * Creates a PMRadiosityEdit with parent and name */ - PMRadiosityEdit( QWidget* parent, const char* name = 0 ); + PMRadiosityEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -61,17 +61,17 @@ private: PMRadiosity* m_pDisplayedObject; PMFloatEdit* m_pAdcBailout; - QCheckBox* m_pAlwaysSample; + TQCheckBox* m_pAlwaysSample; PMFloatEdit* m_pBrightness; PMIntEdit* m_pCount; PMFloatEdit* m_pErrorBound; PMFloatEdit* m_pGrayThreshold; PMFloatEdit* m_pLowErrorFactor; PMFloatEdit* m_pMaxSample; - QCheckBox* m_pMedia; + TQCheckBox* m_pMedia; PMFloatEdit* m_pMinimumReuse; PMIntEdit* m_pNearestCount; - QCheckBox* m_pNormal; + TQCheckBox* m_pNormal; PMFloatEdit* m_pPretraceStart; PMFloatEdit* m_pPretraceEnd; PMIntEdit* m_pRecursionLimit; diff --git a/kpovmodeler/pmrainbow.cpp b/kpovmodeler/pmrainbow.cpp index 5a80e013..1fd9e8ca 100644 --- a/kpovmodeler/pmrainbow.cpp +++ b/kpovmodeler/pmrainbow.cpp @@ -139,12 +139,12 @@ void PMRainbow::cleanUp( ) const Base::cleanUp( ); } -QString PMRainbow::description( ) const +TQString PMRainbow::description( ) const { return i18n( "rainbow" ); } -void PMRainbow::serialize( QDomElement& e, QDomDocument& doc ) const +void PMRainbow::serialize( TQDomElement& e, TQDomDocument& doc ) const { Base::serialize( e, doc ); e.setAttribute( "enable_direction", m_enableDirection ); @@ -347,7 +347,7 @@ void PMRainbow::enableFalloffAngle( bool c ) } } -PMDialogEditBase* PMRainbow::editWidget( QWidget* parent ) const +PMDialogEditBase* PMRainbow::editWidget( TQWidget* parent ) const { return new PMRainbowEdit( parent ); } diff --git a/kpovmodeler/pmrainbow.h b/kpovmodeler/pmrainbow.h index 0c95c459..64dae5d7 100644 --- a/kpovmodeler/pmrainbow.h +++ b/kpovmodeler/pmrainbow.h @@ -49,7 +49,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMRainbow( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -57,16 +57,16 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMRainbowEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmrainbow" ); } + virtual TQString pixmap( ) const { return TQString( "pmrainbow" ); } /** */ virtual void restoreMemento( PMMemento* s ); diff --git a/kpovmodeler/pmrainbowedit.cpp b/kpovmodeler/pmrainbowedit.cpp index ff359a7e..7765f720 100644 --- a/kpovmodeler/pmrainbowedit.cpp +++ b/kpovmodeler/pmrainbowedit.cpp @@ -23,14 +23,14 @@ #include "pmvector.h" #include "pmmath.h" -#include <qlayout.h> -#include <qcheckbox.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqcheckbox.h> +#include <tqlabel.h> #include <klocale.h> #include <kmessagebox.h> -PMRainbowEdit::PMRainbowEdit( QWidget* parent, const char* name ) +PMRainbowEdit::PMRainbowEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -38,76 +38,76 @@ PMRainbowEdit::PMRainbowEdit( QWidget* parent, const char* name ) void PMRainbowEdit::createTopWidgets( ) { - QHBoxLayout* hl; - QGridLayout* gl; + TQHBoxLayout* hl; + TQGridLayout* gl; Base::createTopWidgets( ); - hl = new QHBoxLayout( topLayout( ) ); - m_pEnableDirectionEdit = new QCheckBox( i18n( "Direction:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pEnableDirectionEdit = new TQCheckBox( i18n( "Direction:" ), this ); m_pDirectionEdit = new PMVectorEdit( "x", "y", "z", this ); hl->addWidget( m_pEnableDirectionEdit ); hl->addWidget( m_pDirectionEdit ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 4, 2 ); - m_pEnableAngleEdit = new QCheckBox( i18n( "Angle:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 4, 2 ); + m_pEnableAngleEdit = new TQCheckBox( i18n( "Angle:" ), this ); m_pAngleEdit = new PMFloatEdit( this ); gl->addWidget( m_pEnableAngleEdit, 0, 0 ); gl->addWidget( m_pAngleEdit, 0, 1 ); - m_pEnableWidthEdit = new QCheckBox( i18n( "Width:" ), this ); + m_pEnableWidthEdit = new TQCheckBox( i18n( "Width:" ), this ); m_pWidthEdit = new PMFloatEdit( this ); gl->addWidget( m_pEnableWidthEdit, 1, 0 ); gl->addWidget( m_pWidthEdit, 1, 1 ); - m_pEnableDistanceEdit = new QCheckBox( i18n( "Distance:" ), this ); + m_pEnableDistanceEdit = new TQCheckBox( i18n( "Distance:" ), this ); m_pDistanceEdit = new PMFloatEdit( this ); gl->addWidget( m_pEnableDistanceEdit, 2, 0 ); gl->addWidget( m_pDistanceEdit, 2, 1 ); - m_pEnableJitterEdit = new QCheckBox( i18n( "Jitter:" ), this ); + m_pEnableJitterEdit = new TQCheckBox( i18n( "Jitter:" ), this ); m_pJitterEdit = new PMFloatEdit( this ); gl->addWidget( m_pEnableJitterEdit, 3, 0 ); gl->addWidget( m_pJitterEdit, 3, 1 ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - m_pEnableUpEdit = new QCheckBox( i18n( "Up:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pEnableUpEdit = new TQCheckBox( i18n( "Up:" ), this ); m_pUpEdit = new PMVectorEdit( "x", "y", "z", this ); hl->addWidget( m_pEnableUpEdit ); hl->addWidget( m_pUpEdit ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 2, 2 ); - m_pEnableArcAngleEdit = new QCheckBox( i18n( "Arc angle:" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 2, 2 ); + m_pEnableArcAngleEdit = new TQCheckBox( i18n( "Arc angle:" ), this ); m_pArcAngleEdit = new PMFloatEdit( this ); m_pArcAngleEdit->setValidation( true, 0, true, 360 ); gl->addWidget( m_pEnableArcAngleEdit, 0, 0 ); gl->addWidget( m_pArcAngleEdit, 0, 1 ); - m_pEnableFalloffAngleEdit = new QCheckBox( i18n( "Falloff angle:" ), this ); + m_pEnableFalloffAngleEdit = new TQCheckBox( i18n( "Falloff angle:" ), this ); m_pFalloffAngleEdit = new PMFloatEdit( this ); m_pFalloffAngleEdit->setValidation( true, 0, true, 360 ); gl->addWidget( m_pEnableFalloffAngleEdit, 1, 0 ); gl->addWidget( m_pFalloffAngleEdit, 1, 1 ); hl->addStretch( 1 ); - connect( m_pDirectionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pAngleEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pWidthEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDistanceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pJitterEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pUpEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pArcAngleEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFalloffAngleEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pEnableDirectionEdit, SIGNAL( clicked( ) ), SLOT( slotDirectionClicked( ) ) ); - connect( m_pEnableAngleEdit, SIGNAL( clicked( ) ), SLOT( slotAngleClicked( ) ) ); - connect( m_pEnableWidthEdit, SIGNAL( clicked( ) ), SLOT( slotWidthClicked( ) ) ); - connect( m_pEnableDistanceEdit, SIGNAL( clicked( ) ), SLOT( slotDistanceClicked( ) ) ); - connect( m_pEnableJitterEdit, SIGNAL( clicked( ) ), SLOT( slotJitterClicked( ) ) ); - connect( m_pEnableUpEdit, SIGNAL( clicked( ) ), SLOT( slotUpClicked( ) ) ); - connect( m_pEnableArcAngleEdit, SIGNAL( clicked( ) ), SLOT( slotArcAngleClicked( ) ) ); - connect( m_pEnableFalloffAngleEdit, SIGNAL( clicked( ) ), SLOT( slotFalloffAngleClicked( ) ) ); + connect( m_pDirectionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pAngleEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pWidthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDistanceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pJitterEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pUpEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pArcAngleEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFalloffAngleEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pEnableDirectionEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDirectionClicked( ) ) ); + connect( m_pEnableAngleEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAngleClicked( ) ) ); + connect( m_pEnableWidthEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotWidthClicked( ) ) ); + connect( m_pEnableDistanceEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDistanceClicked( ) ) ); + connect( m_pEnableJitterEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotJitterClicked( ) ) ); + connect( m_pEnableUpEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotUpClicked( ) ) ); + connect( m_pEnableArcAngleEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotArcAngleClicked( ) ) ); + connect( m_pEnableFalloffAngleEdit, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotFalloffAngleClicked( ) ) ); } void PMRainbowEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmrainbowedit.h b/kpovmodeler/pmrainbowedit.h index c5d4b714..d520f6e2 100644 --- a/kpovmodeler/pmrainbowedit.h +++ b/kpovmodeler/pmrainbowedit.h @@ -29,8 +29,8 @@ class PMRainbow; class PMFloatEdit; class PMVectorEdit; -class QCheckBox; -class QLabel; +class TQCheckBox; +class TQLabel; /** * Dialog edit class for @ref PMRainbow @@ -43,7 +43,7 @@ public: /** * Creates a PMRainbowEdit with parent and name */ - PMRainbowEdit( QWidget* parent, const char* name = 0 ); + PMRainbowEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -76,14 +76,14 @@ private: PMVectorEdit* m_pUpEdit; PMFloatEdit* m_pArcAngleEdit; PMFloatEdit* m_pFalloffAngleEdit; - QCheckBox* m_pEnableDirectionEdit; - QCheckBox* m_pEnableAngleEdit; - QCheckBox* m_pEnableWidthEdit; - QCheckBox* m_pEnableDistanceEdit; - QCheckBox* m_pEnableJitterEdit; - QCheckBox* m_pEnableUpEdit; - QCheckBox* m_pEnableArcAngleEdit; - QCheckBox* m_pEnableFalloffAngleEdit; + TQCheckBox* m_pEnableDirectionEdit; + TQCheckBox* m_pEnableAngleEdit; + TQCheckBox* m_pEnableWidthEdit; + TQCheckBox* m_pEnableDistanceEdit; + TQCheckBox* m_pEnableJitterEdit; + TQCheckBox* m_pEnableUpEdit; + TQCheckBox* m_pEnableArcAngleEdit; + TQCheckBox* m_pEnableFalloffAngleEdit; }; diff --git a/kpovmodeler/pmraw.cpp b/kpovmodeler/pmraw.cpp index a2d44784..31d7ec1a 100644 --- a/kpovmodeler/pmraw.cpp +++ b/kpovmodeler/pmraw.cpp @@ -23,7 +23,7 @@ #include "pmmemento.h" #include <klocale.h> -#include <qtextstream.h> +#include <tqtextstream.h> PMDefinePropertyClass( PMRaw, PMRawProperty ); @@ -44,7 +44,7 @@ PMRaw::PMRaw( const PMRaw& r ) m_code = r.m_code; } -PMRaw::PMRaw( PMPart* part, const QString& t ) +PMRaw::PMRaw( PMPart* part, const TQString& t ) : Base( part ) { m_code = t; @@ -54,12 +54,12 @@ PMRaw::~PMRaw( ) { } -QString PMRaw::description( ) const +TQString PMRaw::description( ) const { return i18n( "raw povray" ); } -void PMRaw::setCode( const QString& code ) +void PMRaw::setCode( const TQString& code ) { if( code != m_code ) { @@ -91,20 +91,20 @@ void PMRaw::cleanUp( ) const Base::cleanUp( ); } -void PMRaw::serialize( QDomElement& e, QDomDocument& doc ) const +void PMRaw::serialize( TQDomElement& e, TQDomDocument& doc ) const { - QDomText t = doc.createTextNode( m_code ); + TQDomText t = doc.createTextNode( m_code ); e.appendChild( t ); } void PMRaw::readAttributes( const PMXMLHelper& h ) { - QDomNode e = h.element( ).firstChild( ); + TQDomNode e = h.element( ).firstChild( ); if( e.isText( ) ) m_code = e.toText( ).data( ); } -PMDialogEditBase* PMRaw::editWidget( QWidget* parent ) const +PMDialogEditBase* PMRaw::editWidget( TQWidget* parent ) const { return new PMRawEdit( parent ); } diff --git a/kpovmodeler/pmraw.h b/kpovmodeler/pmraw.h index 2ba888bc..11c28ad2 100644 --- a/kpovmodeler/pmraw.h +++ b/kpovmodeler/pmraw.h @@ -21,7 +21,7 @@ #define PMRAW_H #include "pmnamedobject.h" -#include <qstring.h> +#include <tqstring.h> /** @@ -42,7 +42,7 @@ public: /** * Creates a raw povray object with text t */ - PMRaw( PMPart* part, const QString& t ); + PMRaw( PMPart* part, const TQString& t ); /** * Deletes the raw povray object */ @@ -51,18 +51,18 @@ public: /** * Sets the povray code */ - void setCode( const QString& text ); + void setCode( const TQString& text ); /** * Returns the raw povray code */ - QString code( ) const { return m_code; } + TQString code( ) const { return m_code; } /** */ virtual PMObject* copy( ) const { return new PMRaw( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); @@ -72,9 +72,9 @@ public: virtual void cleanUp( ) const; /** */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmraw" ); } + virtual TQString pixmap( ) const { return TQString( "pmraw" ); } /** */ virtual void restoreMemento( PMMemento* s ); private: @@ -82,7 +82,7 @@ private: * IDs for @ref PMMementoData */ enum PMRawMementoID { PMCodeID }; - QString m_code; + TQString m_code; static PMMetaObject* s_pMetaObject; }; diff --git a/kpovmodeler/pmrawedit.cpp b/kpovmodeler/pmrawedit.cpp index 81d752d2..59e0f237 100644 --- a/kpovmodeler/pmrawedit.cpp +++ b/kpovmodeler/pmrawedit.cpp @@ -19,13 +19,13 @@ #include "pmrawedit.h" #include "pmraw.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qmultilineedit.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqmultilineedit.h> #include <kglobalsettings.h> #include <klocale.h> -PMRawEdit::PMRawEdit( QWidget* parent, const char* name ) +PMRawEdit::PMRawEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -35,16 +35,16 @@ void PMRawEdit::createTopWidgets( ) { Base::createTopWidgets( ); - topLayout( )->addWidget( new QLabel( i18n( "Povray code:" ), this ) ); - m_pEdit = new QMultiLineEdit( this ); + topLayout( )->addWidget( new TQLabel( i18n( "Povray code:" ), this ) ); + m_pEdit = new TQMultiLineEdit( this ); #if ( QT_VERSION >= 300 ) m_pEdit->setTextFormat( Qt::PlainText ); - m_pEdit->setWordWrap( QTextEdit::NoWrap ); + m_pEdit->setWordWrap( TQTextEdit::NoWrap ); #endif m_pEdit->setFont( KGlobalSettings::fixedFont( ) ); topLayout( )->addWidget( m_pEdit, 2 ); - connect( m_pEdit, SIGNAL( textChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pEdit, TQT_SIGNAL( textChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMRawEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmrawedit.h b/kpovmodeler/pmrawedit.h index 911ceb4e..2a34db6a 100644 --- a/kpovmodeler/pmrawedit.h +++ b/kpovmodeler/pmrawedit.h @@ -27,7 +27,7 @@ #include "pmnamedobjectedit.h" class PMRaw; -class QMultiLineEdit; +class TQMultiLineEdit; /** * Dialog edit class for @ref PMRaw. @@ -40,7 +40,7 @@ public: /** * Creates a PMRawEdit with parent and name */ - PMRawEdit( QWidget* parent, const char* name = 0 ); + PMRawEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -55,7 +55,7 @@ protected: private: PMRaw* m_pDisplayedObject; - QMultiLineEdit* m_pEdit; + TQMultiLineEdit* m_pEdit; }; diff --git a/kpovmodeler/pmrendermanager.cpp b/kpovmodeler/pmrendermanager.cpp index 664f0fd9..27d62465 100644 --- a/kpovmodeler/pmrendermanager.cpp +++ b/kpovmodeler/pmrendermanager.cpp @@ -30,11 +30,11 @@ #include "pmgraphicalobject.h" #include "pmmath.h" -#include <qptrstack.h> -#include <qapplication.h> -#include <qbitmap.h> -#include <qimage.h> -#include <qpainter.h> +#include <tqptrstack.h> +#include <tqapplication.h> +#include <tqbitmap.h> +#include <tqimage.h> +#include <tqpainter.h> #include <kconfig.h> #include <klocale.h> @@ -78,7 +78,7 @@ PMRenderManager* PMRenderManager::theManager( ) } PMRenderManager::PMRenderManager( ) - : QObject( qApp ) + : TQObject( qApp ) { int i; @@ -213,40 +213,40 @@ bool PMRenderManager::containsTask( PMGLView* view ) const return contains; } -QColor PMRenderManager::controlPointColor( int i ) const +TQColor PMRenderManager::controlPointColor( int i ) const { if( ( i >= 0 ) && ( i <= 1 ) ) return m_controlPointColor[i]; - return QColor( 0, 0, 0 ); + return TQColor( 0, 0, 0 ); } -void PMRenderManager::setControlPointColor( int i, const QColor& c ) +void PMRenderManager::setControlPointColor( int i, const TQColor& c ) { if( ( i >= 0 ) && ( i <= 1 ) ) m_controlPointColor[i] = c; } -QColor PMRenderManager::graphicalObjectColor( int i ) const +TQColor PMRenderManager::graphicalObjectColor( int i ) const { if( ( i >= 0 ) && ( i <= 1 ) ) return m_graphicalObjectColor[i]; - return QColor( 0, 0, 0 ); + return TQColor( 0, 0, 0 ); } -void PMRenderManager::setGraphicalObjectColor( int i, const QColor& c ) +void PMRenderManager::setGraphicalObjectColor( int i, const TQColor& c ) { if( ( i >= 0 ) && ( i <= 1 ) ) m_graphicalObjectColor[i] = c; } -QColor PMRenderManager::axesColor( int i ) const +TQColor PMRenderManager::axesColor( int i ) const { if( ( i >= 0 ) && ( i <= 2 ) ) return m_axesColor[i]; - return QColor( 0, 0, 0 ); + return TQColor( 0, 0, 0 ); } -void PMRenderManager::setAxesColor( int i, const QColor& c ) +void PMRenderManager::setAxesColor( int i, const TQColor& c ) { if( ( i >= 0 ) && ( i <= 2 ) ) m_axesColor[i] = c; @@ -278,7 +278,7 @@ void PMRenderManager::slotStopRendering( ) m_renderTasks.clear( ); } -void PMRenderManager::timerEvent( QTimerEvent* ) +void PMRenderManager::timerEvent( TQTimerEvent* ) { killTimers( ); renderTask( ); @@ -499,7 +499,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender ) if( m_quickColorObjects.top( ) != it.current( ) ) { m_quickColorObjects.push( it.current( ) ); - m_quickColors.push( new QColor( m_currentColor ) ); + m_quickColors.push( new TQColor( m_currentColor ) ); m_currentColor = qc->color( ).toQColor( ); } } @@ -563,7 +563,7 @@ void PMRenderManager::renderObject( PMObject* objectToRender ) if( m_quickColorObjects.top( ) == objectToRender ) { m_quickColorObjects.pop( ); - QColor* col = m_quickColors.pop( ); + TQColor* col = m_quickColors.pop( ); if( col ) { m_currentColor = *col; @@ -1410,7 +1410,7 @@ void PMRenderManager::renderGrid( ) glVertex2d( screenx, height/2 ); glEnd( ); - QString label = QString( "%1" ).arg( x * signx, 0, 'g', 4 ); + TQString label = TQString( "%1" ).arg( x * signx, 0, 'g', 4 ); if( approxZero( x ) && label.find( "e-" ) ) label = "0"; @@ -1431,7 +1431,7 @@ void PMRenderManager::renderGrid( ) glVertex2d( width/2, screeny ); glEnd( ); - QString label = QString( "%1" ).arg( y * signy, 0, 'g', 4 ); + TQString label = TQString( "%1" ).arg( y * signy, 0, 'g', 4 ); if( approxZero( y ) && label.find( "e-" ) ) label = "0"; @@ -1536,7 +1536,7 @@ void PMRenderManager::renderDescription( ) PMCamera* c = m_pCurrentGlView->camera( ); if( c ) { - QString name( "-" ); + TQString name( "-" ); if( !c->name( ).isEmpty( ) ) name = c->name( ); else @@ -1559,27 +1559,27 @@ void PMRenderManager::renderDescription( ) glPopMatrix( ); } -void PMRenderManager::renderString( const QString& str, double x, double y ) +void PMRenderManager::renderString( const TQString& str, double x, double y ) { int width = qApp->fontMetrics( ).boundingRect( str ).width( ); int height = qApp->fontMetrics( ).height( ); // GL wants word aligned bitmap - QBitmap bm( ( ( width + 32 ) % 32 ) * 32, height, true ); + TQBitmap bm( ( ( width + 32 ) % 32 ) * 32, height, true ); - QPainter p( &bm ); + TQPainter p( &bm ); p.setFont( qApp->font( ) ); p.drawText( bm.rect( ), Qt::AlignLeft | Qt::AlignBottom, str ); p.end(); // Transform to GL bitmap - QImage img = bm.convertToImage( ).mirror( ).convertBitOrder( QImage::BigEndian ); + TQImage img = bm.convertToImage( ).mirror( ).convertBitOrder( TQImage::BigEndian ); glRasterPos2d( x, y ); glBitmap( img.width( ), img.height( ), 0, 0, 0, 0, img.bits( ) ); } -void PMRenderManager::setGLColor( const QColor& c ) +void PMRenderManager::setGLColor( const TQColor& c ) { int r, g, b; diff --git a/kpovmodeler/pmrendermanager.h b/kpovmodeler/pmrendermanager.h index a29a6589..f8e248fb 100644 --- a/kpovmodeler/pmrendermanager.h +++ b/kpovmodeler/pmrendermanager.h @@ -28,11 +28,11 @@ #include "pmobject.h" #include "pmviewstructure.h" -#include <qobject.h> -#include <qptrlist.h> -#include <qcolor.h> -#include <qptrstack.h> -#include <qvaluestack.h> +#include <tqobject.h> +#include <tqptrlist.h> +#include <tqcolor.h> +#include <tqptrstack.h> +#include <tqvaluestack.h> #include <kstaticdeleter.h> #include <GL/gl.h> @@ -40,7 +40,7 @@ class PMGLView; class PMCamera; class PMPoint; class KConfig; -class QString; +class TQString; /** * Used internally by PMRenderManager. @@ -87,8 +87,8 @@ private: int m_visibilityLevel; }; -typedef QPtrList<PMRenderTask> PMRenderTaskList; -typedef QPtrListIterator<PMRenderTask> PMRenderTaskListIterator; +typedef TQPtrList<PMRenderTask> PMRenderTaskList; +typedef TQPtrListIterator<PMRenderTask> PMRenderTaskListIterator; /** * Class that controls the background rendering @@ -141,52 +141,52 @@ public: /** * Returns the color for the control points */ - QColor controlPointColor( int i ) const; + TQColor controlPointColor( int i ) const; /** * Sets the control point color */ - void setControlPointColor( int i, const QColor& c ); + void setControlPointColor( int i, const TQColor& c ); /** * Returns the color for graphical objects */ - QColor graphicalObjectColor( int i ) const; + TQColor graphicalObjectColor( int i ) const; /** * Sets the graphical object color */ - void setGraphicalObjectColor( int i, const QColor& c ); + void setGraphicalObjectColor( int i, const TQColor& c ); /** * Returns the color for the coordinate axes */ - QColor axesColor( int i ) const; + TQColor axesColor( int i ) const; /** * Sets the axes color */ - void setAxesColor( int i, const QColor& c ); + void setAxesColor( int i, const TQColor& c ); /** * Returns the background color */ - QColor backgroundColor( ) const { return m_backgroundColor; } + TQColor backgroundColor( ) const { return m_backgroundColor; } /** * Sets the background color */ - void setBackgroundColor( const QColor& c ) { m_backgroundColor = c; } + void setBackgroundColor( const TQColor& c ) { m_backgroundColor = c; } /** * Returns the field of view color. */ - QColor fieldOfViewColor( ) const { return m_fieldOfViewColor; } + TQColor fieldOfViewColor( ) const { return m_fieldOfViewColor; } /** * Sets the field of view color */ - void setFieldOfViewColor( const QColor& c ) { m_fieldOfViewColor = c; } + void setFieldOfViewColor( const TQColor& c ) { m_fieldOfViewColor = c; } /** * Sets the grid color */ - void setGridColor( const QColor& c ) { m_gridColor = c; } + void setGridColor( const TQColor& c ) { m_gridColor = c; } /** * Returns the grid color */ - QColor gridColor( ) { return m_gridColor; } + TQColor gridColor( ) { return m_gridColor; } /** * Sets the grid distance */ @@ -209,7 +209,7 @@ public: /** * Sets the gl drawing color */ - static void setGLColor( const QColor& c ); + static void setGLColor( const TQColor& c ); /** * Saves the configuration @@ -266,7 +266,7 @@ signals: void renderingFinished( ); protected: - virtual void timerEvent( QTimerEvent* ); + virtual void timerEvent( TQTimerEvent* ); private: /** @@ -319,7 +319,7 @@ private: /** * Renders the string */ - void renderString( const QString& str, double x, double y ); + void renderString( const TQString& str, double x, double y ); /** * Transforms and renders the view structure for special @@ -343,7 +343,7 @@ private: /** * List of render tasks. The first has the highest priority */ - QPtrList<PMRenderTask> m_renderTasks; + TQPtrList<PMRenderTask> m_renderTasks; /** * Flag for background rendering */ @@ -353,35 +353,35 @@ private: * * index 0: normal color, 1: selected */ - QColor m_graphicalObjectColor[2]; + TQColor m_graphicalObjectColor[2]; /** * The color for view structures of textures */ - QColor m_textureColor[2]; + TQColor m_textureColor[2]; /** * The color for the coordinate axes */ - QColor m_axesColor[3]; + TQColor m_axesColor[3]; /** * The background color */ - QColor m_backgroundColor; + TQColor m_backgroundColor; /** * color for control points * * index 0: normal color, 1: selected */ - QColor m_controlPointColor[2]; + TQColor m_controlPointColor[2]; /** * Color for the field of view box */ - QColor m_fieldOfViewColor; + TQColor m_fieldOfViewColor; /** * Grid distance and color */ int m_gridDistance; - QColor m_gridColor; + TQColor m_gridColor; /** * If true, lines are subdivided in camera views with complex * projections @@ -406,14 +406,14 @@ private: // Member variables to save stack space during rendering PMRenderTask* m_pCurrentTask; PMGLView* m_pCurrentGlView; - QPtrStack<PMMatrix> m_matrixStack; // I don't know if the build in gl matrix stack is deep enough + TQPtrStack<PMMatrix> m_matrixStack; // I don't know if the build in gl matrix stack is deep enough bool m_selected; PMObject* m_pDeselectObject; PMObjectList m_objectToRenderStack; - QPtrStack<PMObject> m_quickColorObjects; - QPtrStack<QColor> m_quickColors; - QColor m_currentColor; - QValueStack<int> m_visibilityStack; + TQPtrStack<PMObject> m_quickColorObjects; + TQPtrStack<TQColor> m_quickColors; + TQColor m_currentColor; + TQValueStack<int> m_visibilityStack; int m_currentVisibility; unsigned int m_renderedLines; PMMatrix m_controlPointTransformation; diff --git a/kpovmodeler/pmrendermode.cpp b/kpovmodeler/pmrendermode.cpp index 1dc32290..8ef8d207 100644 --- a/kpovmodeler/pmrendermode.cpp +++ b/kpovmodeler/pmrendermode.cpp @@ -53,7 +53,7 @@ void PMRenderMode::init( ) m_alpha = false; } -PMRenderMode::PMRenderMode( const QDomElement& e ) +PMRenderMode::PMRenderMode( const TQDomElement& e ) { init( ); @@ -77,7 +77,7 @@ PMRenderMode::PMRenderMode( const QDomElement& e ) m_alpha = hlp.boolAttribute( "alpha", m_alpha ); } -void PMRenderMode::serialize( QDomElement& e ) const +void PMRenderMode::serialize( TQDomElement& e ) const { e.setAttribute( "description", m_description ); e.setAttribute( "height", m_height ); @@ -155,47 +155,47 @@ void PMRenderMode::setSamplingMethod( int method ) m_samplingMethod = AntialiasingNonRecursive; } -QStringList PMRenderMode::commandLineSwitches( ) const +TQStringList PMRenderMode::commandLineSwitches( ) const { - QStringList cl; - QString tmp; + TQStringList cl; + TQString tmp; - cl.append( QString( "+W%1" ).arg( m_width ) ); - cl.append( QString( "+H%1" ).arg( m_height ) ); + cl.append( TQString( "+W%1" ).arg( m_width ) ); + cl.append( TQString( "+H%1" ).arg( m_height ) ); if( m_subSection ) { if( m_startRow < 1.0 ) tmp.sprintf( "+SR%4.2f", m_startRow ); else - tmp = QString( "+SR%1" ).arg( ( int ) ( m_startRow + 0.5 ) ); + tmp = TQString( "+SR%1" ).arg( ( int ) ( m_startRow + 0.5 ) ); cl.append( tmp ); if( m_endRow < 1.0 ) tmp.sprintf( "+ER%4.2f", m_endRow ); else - tmp = QString( "+ER%1" ).arg( ( int ) ( m_endRow + 0.5 ) ); + tmp = TQString( "+ER%1" ).arg( ( int ) ( m_endRow + 0.5 ) ); cl.append( tmp ); if( m_startColumn < 1.0 ) tmp.sprintf( "+SC%4.2f", m_startColumn ); else - tmp = QString( "+SC%1" ).arg( ( int ) ( m_startColumn + 0.5 ) ); + tmp = TQString( "+SC%1" ).arg( ( int ) ( m_startColumn + 0.5 ) ); cl.append( tmp ); if( m_endColumn < 1.0 ) tmp.sprintf( "+EC%4.2f", m_endColumn ); else - tmp = QString( "+EC%1" ).arg( ( int ) ( m_endColumn + 0.5 ) ); + tmp = TQString( "+EC%1" ).arg( ( int ) ( m_endColumn + 0.5 ) ); cl.append( tmp ); } - cl.append( QString( "+Q%1" ).arg( m_quality ) ); + cl.append( TQString( "+Q%1" ).arg( m_quality ) ); if( m_radiosity ) - cl.append( QString( "+QR" ) ); + cl.append( TQString( "+QR" ) ); else - cl.append( QString( "-QR" ) ); + cl.append( TQString( "-QR" ) ); if( m_antialiasing ) { - cl.append( QString( "+A" ) ); - cl.append( QString( "+AM%1" ).arg( m_samplingMethod ) ); + cl.append( TQString( "+A" ) ); + cl.append( TQString( "+AM%1" ).arg( m_samplingMethod ) ); tmp.sprintf( "+A%5.3f", m_antialiasThreshold ); cl.append( tmp ); if( m_antialiasJitter ) @@ -204,16 +204,16 @@ QStringList PMRenderMode::commandLineSwitches( ) const cl.append( tmp ); } else - cl.append( QString( "-J" ) ); - cl.append( QString( "+R%1" ).arg( m_antialiasDepth ) ); + cl.append( TQString( "-J" ) ); + cl.append( TQString( "+R%1" ).arg( m_antialiasDepth ) ); } else - cl.append( QString( "-A" ) ); + cl.append( TQString( "-A" ) ); if( m_alpha ) - cl.append( QString( "+UA" ) ); + cl.append( TQString( "+UA" ) ); else - cl.append( QString( "-UA" ) ); + cl.append( TQString( "-UA" ) ); return cl; } diff --git a/kpovmodeler/pmrendermode.h b/kpovmodeler/pmrendermode.h index a8c891ce..eb9410e4 100644 --- a/kpovmodeler/pmrendermode.h +++ b/kpovmodeler/pmrendermode.h @@ -24,10 +24,10 @@ #include <config.h> #endif -#include <qstring.h> -#include <qptrlist.h> -#include <qstringlist.h> -#include <qdom.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqstringlist.h> +#include <tqdom.h> /** * Class that represents the render options for povray @@ -49,10 +49,10 @@ public: /** * Reads the attributes from the QDomElement */ - PMRenderMode( const QDomElement& e ); + PMRenderMode( const TQDomElement& e ); - void setDescription( const QString& descr ) { m_description = descr; } - QString description( ) const { return m_description; } + void setDescription( const TQString& descr ) { m_description = descr; } + TQString description( ) const { return m_description; } void setHeight( int height ); int height( ) const { return m_height; } @@ -96,16 +96,16 @@ public: /** * Returns the settings as povray command line switches */ - QStringList commandLineSwitches( ) const; + TQStringList commandLineSwitches( ) const; /** * Saves the data */ - void serialize( QDomElement& e ) const; + void serialize( TQDomElement& e ) const; private: void init( ); - QString m_description; + TQString m_description; int m_height, m_width; bool m_subSection; double m_startRow, m_endRow, m_startColumn, m_endColumn; @@ -122,7 +122,7 @@ private: bool m_alpha; }; -typedef QPtrList<PMRenderMode> PMRenderModeList; -typedef QPtrListIterator<PMRenderMode> PMRenderModeListIterator; +typedef TQPtrList<PMRenderMode> PMRenderModeList; +typedef TQPtrListIterator<PMRenderMode> PMRenderModeListIterator; #endif diff --git a/kpovmodeler/pmrendermodesdialog.cpp b/kpovmodeler/pmrendermodesdialog.cpp index 5c4b4b7b..4fa8f09f 100644 --- a/kpovmodeler/pmrendermodesdialog.cpp +++ b/kpovmodeler/pmrendermodesdialog.cpp @@ -18,15 +18,15 @@ #include "pmrendermodesdialog.h" -#include <qlistbox.h> -#include <qpushbutton.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qtabwidget.h> -#include <qvbox.h> -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> +#include <tqlistbox.h> +#include <tqpushbutton.h> +#include <tqcheckbox.h> +#include <tqlineedit.h> +#include <tqtabwidget.h> +#include <tqvbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> #include <klocale.h> #include <kconfig.h> @@ -35,9 +35,9 @@ #include "pmlineedits.h" -QSize PMRenderModesDialog::s_size = QSize( 300, 200 ); +TQSize PMRenderModesDialog::s_size = TQSize( 300, 200 ); -PMRenderModesDialog::PMRenderModesDialog( PMRenderModeList* modes, QWidget* parent, const char* name ) +PMRenderModesDialog::PMRenderModesDialog( PMRenderModeList* modes, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Render Modes" ), Ok | Cancel, Ok ) { @@ -48,22 +48,22 @@ PMRenderModesDialog::PMRenderModesDialog( PMRenderModeList* modes, QWidget* pare m_workingModes.append( new PMRenderMode( *( it.current( ) ) ) ); m_workingModes.setAutoDelete( true ); - QVBox* mainPage = makeVBoxMainWidget( ); - m_pListBox = new QListBox( mainPage ); - connect( m_pListBox, SIGNAL( highlighted( int ) ), SLOT( slotModeSelected( int ) ) ); + TQVBox* mainPage = makeVBoxMainWidget( ); + m_pListBox = new TQListBox( mainPage ); + connect( m_pListBox, TQT_SIGNAL( highlighted( int ) ), TQT_SLOT( slotModeSelected( int ) ) ); - QHBox* buttons = new QHBox( mainPage ); + TQHBox* buttons = new TQHBox( mainPage ); buttons->setSpacing( KDialog::spacingHint( ) ); - m_pAddButton = new QPushButton( i18n( "Add" ), buttons ); - connect( m_pAddButton, SIGNAL( clicked( ) ), SLOT( slotAdd( ) ) ); - m_pRemoveButton = new QPushButton( i18n( "Remove" ), buttons ); - connect( m_pRemoveButton, SIGNAL( clicked( ) ), SLOT( slotRemove( ) ) ); - m_pEditButton = new QPushButton( i18n( "Edit..." ), buttons ); - connect( m_pEditButton, SIGNAL( clicked( ) ), SLOT( slotEdit( ) ) ); - m_pUpButton = new QPushButton( i18n( "Up" ), buttons ); - connect( m_pUpButton, SIGNAL( clicked( ) ), SLOT( slotUp( ) ) ); - m_pDownButton = new QPushButton( i18n( "Down" ), buttons ); - connect( m_pDownButton, SIGNAL( clicked( ) ), SLOT( slotDown( ) ) ); + m_pAddButton = new TQPushButton( i18n( "Add" ), buttons ); + connect( m_pAddButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAdd( ) ) ); + m_pRemoveButton = new TQPushButton( i18n( "Remove" ), buttons ); + connect( m_pRemoveButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemove( ) ) ); + m_pEditButton = new TQPushButton( i18n( "Edit..." ), buttons ); + connect( m_pEditButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotEdit( ) ) ); + m_pUpButton = new TQPushButton( i18n( "Up" ), buttons ); + connect( m_pUpButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotUp( ) ) ); + m_pDownButton = new TQPushButton( i18n( "Down" ), buttons ); + connect( m_pDownButton, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotDown( ) ) ); m_pRemoveButton->setEnabled( false ); m_pUpButton->setEnabled( false ); @@ -73,7 +73,7 @@ PMRenderModesDialog::PMRenderModesDialog( PMRenderModeList* modes, QWidget* pare resize( s_size ); displayList( ); - connect( m_pListBox, SIGNAL( doubleClicked ( QListBoxItem *) ), this, SLOT(slotEdit( ) ) ); + connect( m_pListBox, TQT_SIGNAL( doubleClicked ( TQListBoxItem *) ), this, TQT_SLOT(slotEdit( ) ) ); } void PMRenderModesDialog::slotChanged( ) @@ -134,11 +134,11 @@ void PMRenderModesDialog::restoreConfig( KConfig* cfg ) { cfg->setGroup( "Appearance" ); - QSize defaultSize( 300, 200 ); + TQSize defaultSize( 300, 200 ); s_size = cfg->readSizeEntry( "RenderModesDialogSize", &defaultSize ); } -void PMRenderModesDialog::resizeEvent( QResizeEvent* ev ) +void PMRenderModesDialog::resizeEvent( TQResizeEvent* ev ) { s_size = ev->size( ); } @@ -197,7 +197,7 @@ void PMRenderModesDialog::slotEdit( ) if ( m_selectionIndex==-1 ) return; PMRenderModeDialog dlg( m_workingModes.at( m_selectionIndex ) ); - bool changed = ( dlg.exec( ) == QDialog::Accepted ); + bool changed = ( dlg.exec( ) == TQDialog::Accepted ); if( changed ) { slotChanged( ); @@ -220,7 +220,7 @@ void PMRenderModesDialog::slotOk( ) } -QSize PMRenderModeDialog::s_size = QSize( 300, 200 ); +TQSize PMRenderModeDialog::s_size = TQSize( 300, 200 ); const int numQuality = 9; const char* qualityString[numQuality] = @@ -239,7 +239,7 @@ const char* qualityString[numQuality] = const int c_qualityToIndex[12] = { 0, 0, 1, 1, 2, 3, 4, 4, 5, 6, 7, 8 }; const int c_indexToQuality[numQuality] = { 0, 2, 4, 5, 6, 8, 9, 10, 11 }; -PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, QWidget* parent, const char* name ) +PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, TQWidget* parent, const char* name ) : KDialogBase( parent, name, true, i18n( "Render Modes" ), Ok | Cancel, Ok ) { @@ -247,58 +247,58 @@ PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, QWidget* parent, con int i; // main page - QWidget* page = new QWidget( this ); + TQWidget* page = new TQWidget( this ); setMainWidget( page ); - QVBoxLayout* topLayout = new QVBoxLayout( page, 0, spacingHint( ) ); + TQVBoxLayout* topLayout = new TQVBoxLayout( page, 0, spacingHint( ) ); - QHBoxLayout* descrLayout = new QHBoxLayout( topLayout ); - QLabel* descrLabel = new QLabel( i18n( "Description:" ), page ); + TQHBoxLayout* descrLayout = new TQHBoxLayout( topLayout ); + TQLabel* descrLabel = new TQLabel( i18n( "Description:" ), page ); descrLayout->addWidget( descrLabel ); - m_pDescriptionEdit = new QLineEdit( page ); + m_pDescriptionEdit = new TQLineEdit( page ); descrLayout->addWidget( m_pDescriptionEdit ); - m_pTabWidget = new QTabWidget( page ); + m_pTabWidget = new TQTabWidget( page ); topLayout->addWidget( m_pTabWidget ); - QWidget* tab; - QVBoxLayout* tabLayout; + TQWidget* tab; + TQVBoxLayout* tabLayout; // size tab - tab = new QWidget( ); + tab = new TQWidget( ); m_pTabWidget->addTab( tab, i18n( "Size" ) ); - tabLayout = new QVBoxLayout( tab, marginHint( ), spacingHint( ) ); + tabLayout = new TQVBoxLayout( tab, marginHint( ), spacingHint( ) ); - QHBoxLayout* sizeHelpLayout = new QHBoxLayout( tabLayout ); - QGridLayout* sizeLayout = new QGridLayout( sizeHelpLayout, 2, 2 ); - sizeLayout->addWidget( new QLabel( i18n( "Width:" ), tab ), 0, 0 ); + TQHBoxLayout* sizeHelpLayout = new TQHBoxLayout( tabLayout ); + TQGridLayout* sizeLayout = new TQGridLayout( sizeHelpLayout, 2, 2 ); + sizeLayout->addWidget( new TQLabel( i18n( "Width:" ), tab ), 0, 0 ); m_pWidthEdit = new PMIntEdit( tab ); m_pWidthEdit->setValidation( true, 1, false, 0 ); sizeLayout->addWidget( m_pWidthEdit, 0, 1 ); - sizeLayout->addWidget( new QLabel( i18n( "Height:" ), tab ), 1, 0 ); + sizeLayout->addWidget( new TQLabel( i18n( "Height:" ), tab ), 1, 0 ); m_pHeightEdit = new PMIntEdit( tab ); m_pHeightEdit->setValidation( true, 1, false, 0 ); sizeLayout->addWidget( m_pHeightEdit, 1, 1 ); sizeHelpLayout->addStretch( 1 ); - m_pSubsectionBox = new QCheckBox( i18n( "Subsection" ), tab ); + m_pSubsectionBox = new TQCheckBox( i18n( "Subsection" ), tab ); tabLayout->addWidget( m_pSubsectionBox ); - QHBoxLayout* ssHelpLayout = new QHBoxLayout( tabLayout ); - QGridLayout* ssLayout = new QGridLayout( ssHelpLayout, 4, 2 ); - ssLayout->addWidget( new QLabel( i18n( "Start column:" ), tab ), 0, 0 ); + TQHBoxLayout* ssHelpLayout = new TQHBoxLayout( tabLayout ); + TQGridLayout* ssLayout = new TQGridLayout( ssHelpLayout, 4, 2 ); + ssLayout->addWidget( new TQLabel( i18n( "Start column:" ), tab ), 0, 0 ); m_pStartColumnEdit = new PMFloatEdit( tab ); m_pStartColumnEdit->setValidation( true, 0.0, false, 0.0 ); ssLayout->addWidget( m_pStartColumnEdit, 0, 1 ); - ssLayout->addWidget( new QLabel( i18n( "End column:" ), tab ), 1, 0 ); + ssLayout->addWidget( new TQLabel( i18n( "End column:" ), tab ), 1, 0 ); m_pEndColumnEdit = new PMFloatEdit( tab ); m_pEndColumnEdit->setValidation( true, 0.0, false, 0.0 ); ssLayout->addWidget( m_pEndColumnEdit, 1, 1 ); - ssLayout->addWidget( new QLabel( i18n( "Start row:" ), tab ), 2, 0 ); + ssLayout->addWidget( new TQLabel( i18n( "Start row:" ), tab ), 2, 0 ); m_pStartRowEdit = new PMFloatEdit( tab ); m_pStartRowEdit->setValidation( true, 0.0, false, 0.0 ); ssLayout->addWidget( m_pStartRowEdit, 2, 1 ); - ssLayout->addWidget( new QLabel( i18n( "End row:" ), tab ), 3, 0 ); + ssLayout->addWidget( new TQLabel( i18n( "End row:" ), tab ), 3, 0 ); m_pEndRowEdit = new PMFloatEdit( tab ); m_pEndRowEdit->setValidation( true, 0.0, false, 0.0 ); ssLayout->addWidget( m_pEndRowEdit, 3, 1 ); @@ -307,57 +307,57 @@ PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, QWidget* parent, con tabLayout->addStretch( 1 ); // quality tab - tab = new QWidget( ); + tab = new TQWidget( ); m_pTabWidget->addTab( tab, i18n( "Quality" ) ); - tabLayout = new QVBoxLayout( tab, marginHint( ), spacingHint( ) ); + tabLayout = new TQVBoxLayout( tab, marginHint( ), spacingHint( ) ); - QHBoxLayout* quHelpLayout = new QHBoxLayout( tabLayout ); - quHelpLayout->addWidget( new QLabel( i18n( "Quality:" ), tab ) ); - m_pQualityCombo = new QComboBox( tab ); + TQHBoxLayout* quHelpLayout = new TQHBoxLayout( tabLayout ); + quHelpLayout->addWidget( new TQLabel( i18n( "Quality:" ), tab ) ); + m_pQualityCombo = new TQComboBox( tab ); quHelpLayout->addWidget( m_pQualityCombo ); for( i = 0; i < numQuality; i++ ) m_pQualityCombo->insertItem( i18n( qualityString[i] ) ); - m_pAntialiasingBox = new QCheckBox( i18n( "Antialiasing" ), tab ); + m_pAntialiasingBox = new TQCheckBox( i18n( "Antialiasing" ), tab ); tabLayout->addWidget( m_pAntialiasingBox ); - QHBoxLayout* aaHelpLayout = new QHBoxLayout( tabLayout ); - QGridLayout* aaGridLayout = new QGridLayout( aaHelpLayout, 5, 2 ); - aaGridLayout->addWidget( new QLabel( i18n( "Method:" ), tab ), 0, 0 ); - m_pSamplingCombo = new QComboBox( tab ); + TQHBoxLayout* aaHelpLayout = new TQHBoxLayout( tabLayout ); + TQGridLayout* aaGridLayout = new TQGridLayout( aaHelpLayout, 5, 2 ); + aaGridLayout->addWidget( new TQLabel( i18n( "Method:" ), tab ), 0, 0 ); + m_pSamplingCombo = new TQComboBox( tab ); aaGridLayout->addWidget( m_pSamplingCombo, 0, 1 ); m_pSamplingCombo->insertItem( i18n( "Non Recursive" ) ); m_pSamplingCombo->insertItem( i18n( "Recursive" ) ); - aaGridLayout->addWidget( new QLabel( i18n( "Threshold:" ), tab ), 1, 0 ); + aaGridLayout->addWidget( new TQLabel( i18n( "Threshold:" ), tab ), 1, 0 ); m_pThresholdEdit = new PMFloatEdit( tab ); aaGridLayout->addWidget( m_pThresholdEdit, 1, 1 ); - aaGridLayout->addWidget( new QLabel( i18n( "Depth:" ), tab ), 2, 0 ); + aaGridLayout->addWidget( new TQLabel( i18n( "Depth:" ), tab ), 2, 0 ); m_pAntialiasDepthEdit = new PMIntEdit( tab ); m_pAntialiasDepthEdit->setValidation( true, 1, true, 9 ); aaGridLayout->addWidget( m_pAntialiasDepthEdit, 2, 1 ); - m_pJitterBox = new QCheckBox( i18n( "Jitter" ), tab ); + m_pJitterBox = new TQCheckBox( i18n( "Jitter" ), tab ); aaGridLayout->addMultiCellWidget( m_pJitterBox, 3, 3, 0, 1 ); - aaGridLayout->addWidget( new QLabel( i18n( "Amount:" ), tab ), 4, 0 ); + aaGridLayout->addWidget( new TQLabel( i18n( "Amount:" ), tab ), 4, 0 ); m_pJitterAmountEdit = new PMFloatEdit( tab ); aaGridLayout->addWidget( m_pJitterAmountEdit, 4, 1 ); aaHelpLayout->addStretch( 1 ); - m_pRadiosityBox = new QCheckBox( i18n( "Radiosity" ), tab ); + m_pRadiosityBox = new TQCheckBox( i18n( "Radiosity" ), tab ); tabLayout->addWidget( m_pRadiosityBox ); tabLayout->addStretch( 1 ); // output options tab - tab = new QWidget( ); + tab = new TQWidget( ); m_pTabWidget->addTab( tab, i18n( "Output" ) ); - tabLayout = new QVBoxLayout( tab, marginHint( ), spacingHint( ) ); + tabLayout = new TQVBoxLayout( tab, marginHint( ), spacingHint( ) ); - m_pAlphaBox = new QCheckBox( i18n( "Alpha" ), tab ); + m_pAlphaBox = new TQCheckBox( i18n( "Alpha" ), tab ); tabLayout->addWidget( m_pAlphaBox ); tabLayout->addStretch( 1 ); @@ -371,23 +371,23 @@ PMRenderModeDialog::PMRenderModeDialog( PMRenderMode* mode, QWidget* parent, con enableButtonOK( false ); // connect signals - connect( m_pDescriptionEdit, SIGNAL( textChanged( const QString& ) ), SLOT( slotTextChanged( const QString& ) ) ); - connect( m_pHeightEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) ); - connect( m_pWidthEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) ); - connect( m_pSubsectionBox, SIGNAL( toggled( bool ) ), SLOT( slotSubsectionToggled( bool ) ) ); - connect( m_pStartRowEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) ); - connect( m_pEndRowEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) ); - connect( m_pStartColumnEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) ); - connect( m_pEndColumnEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) ); - connect( m_pQualityCombo, SIGNAL( activated( int ) ), SLOT( slotActivated( int ) ) ); - connect( m_pRadiosityBox, SIGNAL( clicked( ) ), SLOT( slotChanged( ) ) ); - connect( m_pAntialiasingBox, SIGNAL( toggled( bool ) ), SLOT( slotAntialiasingToggled( bool ) ) ); - connect( m_pSamplingCombo, SIGNAL( activated( int ) ), SLOT( slotActivated( int ) ) ); - connect( m_pThresholdEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) ); - connect( m_pJitterBox, SIGNAL( toggled( bool ) ), SLOT( slotJitterToggled( bool ) ) ); - connect( m_pJitterAmountEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) ); - connect( m_pAntialiasDepthEdit, SIGNAL( dataChanged( ) ), SLOT( slotChanged( ) ) ); - connect( m_pAlphaBox, SIGNAL( toggled( bool ) ), SLOT( slotToggled( bool ) ) ); + connect( m_pDescriptionEdit, TQT_SIGNAL( textChanged( const TQString& ) ), TQT_SLOT( slotTextChanged( const TQString& ) ) ); + connect( m_pHeightEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) ); + connect( m_pWidthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) ); + connect( m_pSubsectionBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotSubsectionToggled( bool ) ) ); + connect( m_pStartRowEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) ); + connect( m_pEndRowEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) ); + connect( m_pStartColumnEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) ); + connect( m_pEndColumnEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) ); + connect( m_pQualityCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotActivated( int ) ) ); + connect( m_pRadiosityBox, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotChanged( ) ) ); + connect( m_pAntialiasingBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotAntialiasingToggled( bool ) ) ); + connect( m_pSamplingCombo, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotActivated( int ) ) ); + connect( m_pThresholdEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) ); + connect( m_pJitterBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotJitterToggled( bool ) ) ); + connect( m_pJitterAmountEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) ); + connect( m_pAntialiasDepthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SLOT( slotChanged( ) ) ); + connect( m_pAlphaBox, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( slotToggled( bool ) ) ); } void PMRenderModeDialog::saveConfig( KConfig* cfg ) @@ -400,11 +400,11 @@ void PMRenderModeDialog::restoreConfig( KConfig* cfg ) { cfg->setGroup( "Appearance" ); - QSize defaultSize( 400, 400 ); + TQSize defaultSize( 400, 400 ); s_size = cfg->readSizeEntry( "RenderModeDialogSize", &defaultSize ); } -void PMRenderModeDialog::resizeEvent( QResizeEvent* ev ) +void PMRenderModeDialog::resizeEvent( TQResizeEvent* ev ) { s_size = ev->size( ); } @@ -574,7 +574,7 @@ void PMRenderModeDialog::slotChanged( ) enableButtonOK( true ); } -void PMRenderModeDialog::slotTextChanged( const QString& ) +void PMRenderModeDialog::slotTextChanged( const TQString& ) { slotChanged( ); } diff --git a/kpovmodeler/pmrendermodesdialog.h b/kpovmodeler/pmrendermodesdialog.h index a6b6482f..1afce03b 100644 --- a/kpovmodeler/pmrendermodesdialog.h +++ b/kpovmodeler/pmrendermodesdialog.h @@ -22,12 +22,12 @@ #include "pmrendermode.h" #include <kdialogbase.h> -class QCheckBox; -class QComboBox; -class QLineEdit; -class QListBox; -class QPushButton; -class QTabWidget; +class TQCheckBox; +class TQComboBox; +class TQLineEdit; +class TQListBox; +class TQPushButton; +class TQTabWidget; class KConfig; class PMIntEdit; class PMFloatEdit; @@ -43,7 +43,7 @@ public: /** * Creates a dialog for the modes list */ - PMRenderModesDialog( PMRenderModeList* modes, QWidget* parent = 0, const char* name = 0 ); + PMRenderModesDialog( PMRenderModeList* modes, TQWidget* parent = 0, const char* name = 0 ); static void saveConfig( KConfig* cfg ); static void restoreConfig( KConfig* cfg ); @@ -81,7 +81,7 @@ protected slots: virtual void slotOk( ); protected: - virtual void resizeEvent( QResizeEvent* ev ); + virtual void resizeEvent( TQResizeEvent* ev ); private: void displayList( ); @@ -91,13 +91,13 @@ private: PMRenderModeList m_workingModes; int m_selectionIndex; - QListBox* m_pListBox; - QPushButton* m_pAddButton; - QPushButton* m_pRemoveButton; - QPushButton* m_pUpButton; - QPushButton* m_pDownButton; - QPushButton* m_pEditButton; - static QSize s_size; + TQListBox* m_pListBox; + TQPushButton* m_pAddButton; + TQPushButton* m_pRemoveButton; + TQPushButton* m_pUpButton; + TQPushButton* m_pDownButton; + TQPushButton* m_pEditButton; + static TQSize s_size; }; /** @@ -111,19 +111,19 @@ public: /** * Creates a dialog for the mode */ - PMRenderModeDialog( PMRenderMode* mode, QWidget* parent = 0, const char* name = 0 ); + PMRenderModeDialog( PMRenderMode* mode, TQWidget* parent = 0, const char* name = 0 ); static void saveConfig( KConfig* cfg ); static void restoreConfig( KConfig* cfg ); protected: - virtual void resizeEvent( QResizeEvent* ev ); + virtual void resizeEvent( TQResizeEvent* ev ); protected slots: virtual void slotOk( ); void slotChanged( ); - void slotTextChanged( const QString& ); + void slotTextChanged( const TQString& ); void slotActivated( int ); void slotSubsectionToggled( bool ); void slotAntialiasingToggled( bool ); @@ -152,28 +152,28 @@ private: PMRenderMode* m_pMode; - QTabWidget* m_pTabWidget; - QLineEdit* m_pDescriptionEdit; + TQTabWidget* m_pTabWidget; + TQLineEdit* m_pDescriptionEdit; PMIntEdit* m_pHeightEdit; PMIntEdit* m_pWidthEdit; - QCheckBox* m_pSubsectionBox; + TQCheckBox* m_pSubsectionBox; PMFloatEdit* m_pStartRowEdit; PMFloatEdit* m_pEndRowEdit; PMFloatEdit* m_pStartColumnEdit; PMFloatEdit* m_pEndColumnEdit; // quality - QComboBox* m_pQualityCombo; - QCheckBox* m_pRadiosityBox; - QCheckBox* m_pAntialiasingBox; - QComboBox* m_pSamplingCombo; + TQComboBox* m_pQualityCombo; + TQCheckBox* m_pRadiosityBox; + TQCheckBox* m_pAntialiasingBox; + TQComboBox* m_pSamplingCombo; PMFloatEdit* m_pThresholdEdit; - QCheckBox* m_pJitterBox; + TQCheckBox* m_pJitterBox; PMFloatEdit* m_pJitterAmountEdit; PMIntEdit* m_pAntialiasDepthEdit; // output - QCheckBox* m_pAlphaBox; + TQCheckBox* m_pAlphaBox; - static QSize s_size; + static TQSize s_size; }; #endif diff --git a/kpovmodeler/pmresourcelocator.cpp b/kpovmodeler/pmresourcelocator.cpp index 7c778b31..715abc45 100644 --- a/kpovmodeler/pmresourcelocator.cpp +++ b/kpovmodeler/pmresourcelocator.cpp @@ -19,8 +19,8 @@ #include "pmpovrayrenderwidget.h" #include "pmdebug.h" -#include <qfileinfo.h> -#include <qdir.h> +#include <tqfileinfo.h> +#include <tqdir.h> PMResourceLocator* PMResourceLocator::s_pInstance = 0; KStaticDeleter<PMResourceLocator> PMResourceLocator::s_staticDeleter; @@ -36,7 +36,7 @@ PMResourceLocator::~PMResourceLocator( ) m_cache.clear( ); } -QString PMResourceLocator::findFile( const QString& file ) +TQString PMResourceLocator::findFile( const TQString& file ) { if( !s_pInstance ) s_staticDeleter.setObject( s_pInstance, new PMResourceLocator( ) ); @@ -49,24 +49,24 @@ void PMResourceLocator::clearCache( ) s_pInstance->m_cache.clear( ); } -QString PMResourceLocator::lookUp( const QString& file ) +TQString PMResourceLocator::lookUp( const TQString& file ) { if( file.isEmpty( ) ) - return QString::null; + return TQString::null; kdDebug( PMArea ) << "LookUp: " << file << endl; - QString* ps = m_cache.find( file ); + TQString* ps = m_cache.find( file ); if( ps ) return *ps; bool found = false; - QString fullPath = QString::null; + TQString fullPath = TQString::null; if( file[0] == '/' ) { // absolute path, library paths are not used - QFileInfo info( file ); + TQFileInfo info( file ); if( info.exists( ) && info.isReadable( ) && info.isFile( ) ) { found = true; @@ -75,12 +75,12 @@ QString PMResourceLocator::lookUp( const QString& file ) } else { - QStringList plist = PMPovrayRenderWidget::povrayLibraryPaths( ); - QStringList::ConstIterator it = plist.begin( ); + TQStringList plist = PMPovrayRenderWidget::povrayLibraryPaths( ); + TQStringList::ConstIterator it = plist.begin( ); for( ; ( it != plist.end( ) ) && !found; ++it ) { - QDir dir( *it ); - QFileInfo info( dir, file ); + TQDir dir( *it ); + TQFileInfo info( dir, file ); if( info.exists( ) && info.isReadable( ) && info.isFile( ) ) { found = true; @@ -91,7 +91,7 @@ QString PMResourceLocator::lookUp( const QString& file ) if( found ) { - QString* ni = new QString( fullPath ); + TQString* ni = new TQString( fullPath ); if( !m_cache.insert( file, ni ) ) delete ni; kdDebug( PMArea ) << "File \"" << file << "\" found in " diff --git a/kpovmodeler/pmresourcelocator.h b/kpovmodeler/pmresourcelocator.h index 02e725cb..1c016114 100644 --- a/kpovmodeler/pmresourcelocator.h +++ b/kpovmodeler/pmresourcelocator.h @@ -23,8 +23,8 @@ #include <config.h> #endif -#include <qstring.h> -#include <qcache.h> +#include <tqstring.h> +#include <tqcache.h> #include <kstaticdeleter.h> /** @@ -41,7 +41,7 @@ public: * Returns the full path for the file or a null string if the file * was not found. The file can be a relative or absolute path. */ - static QString findFile( const QString& file ); + static TQString findFile( const TQString& file ); /** * Clears the resource cache. Call this if the library paths are changed */ @@ -55,11 +55,11 @@ private: /** * File lookup function */ - QString lookUp( const QString& file ); + TQString lookUp( const TQString& file ); static PMResourceLocator* s_pInstance; static KStaticDeleter<PMResourceLocator> s_staticDeleter; - QCache<QString> m_cache; + TQCache<TQString> m_cache; }; #endif diff --git a/kpovmodeler/pmrotate.cpp b/kpovmodeler/pmrotate.cpp index f3e34040..5a432c91 100644 --- a/kpovmodeler/pmrotate.cpp +++ b/kpovmodeler/pmrotate.cpp @@ -24,7 +24,7 @@ #include "pmrotatecontrolpoint.h" #include <klocale.h> -#include <qdom.h> +#include <tqdom.h> const PMVector rotateDefault = PMVector( 0, 0, 0 ); @@ -51,12 +51,12 @@ PMRotate::~PMRotate( ) { } -QString PMRotate::description( ) const +TQString PMRotate::description( ) const { return i18n( "rotate" ); } -void PMRotate::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const +void PMRotate::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const { e.setAttribute( "value", m_rotate.serializeXML( ) ); } @@ -102,7 +102,7 @@ void PMRotate::setRotation( const PMVector& p ) } } -PMDialogEditBase* PMRotate::editWidget( QWidget* parent ) const +PMDialogEditBase* PMRotate::editWidget( TQWidget* parent ) const { return new PMRotateEdit( parent ); } diff --git a/kpovmodeler/pmrotate.h b/kpovmodeler/pmrotate.h index 0a8a1dbb..4ecc6d9a 100644 --- a/kpovmodeler/pmrotate.h +++ b/kpovmodeler/pmrotate.h @@ -51,7 +51,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMRotate( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -59,16 +59,16 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMRotateEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmrotate" ); } + virtual TQString pixmap( ) const { return TQString( "pmrotate" ); } /** * Returns the rotation diff --git a/kpovmodeler/pmrotateedit.cpp b/kpovmodeler/pmrotateedit.cpp index df2c2340..2ad5f06e 100644 --- a/kpovmodeler/pmrotateedit.cpp +++ b/kpovmodeler/pmrotateedit.cpp @@ -20,11 +20,11 @@ #include "pmrotate.h" #include "pmvectoredit.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> -PMRotateEdit::PMRotateEdit( QWidget* parent, const char* name ) +PMRotateEdit::PMRotateEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,7 +37,7 @@ void PMRotateEdit::createTopWidgets( ) m_pVector = new PMVectorEdit( "x", "y", "z", this ); topLayout( )->addWidget( m_pVector ); - connect( m_pVector, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pVector, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMRotateEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmrotateedit.h b/kpovmodeler/pmrotateedit.h index 89ca56fd..f9e895df 100644 --- a/kpovmodeler/pmrotateedit.h +++ b/kpovmodeler/pmrotateedit.h @@ -40,7 +40,7 @@ public: /** * Creates a PMRotateEdit with parent and name */ - PMRotateEdit( QWidget* parent, const char* name = 0 ); + PMRotateEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmscale.cpp b/kpovmodeler/pmscale.cpp index 2be064c2..af8245b8 100644 --- a/kpovmodeler/pmscale.cpp +++ b/kpovmodeler/pmscale.cpp @@ -51,12 +51,12 @@ PMScale::~PMScale( ) { } -QString PMScale::description( ) const +TQString PMScale::description( ) const { return i18n( "scale" ); } -void PMScale::serialize( QDomElement& e, QDomDocument& /*d*/ ) const +void PMScale::serialize( TQDomElement& e, TQDomDocument& /*d*/ ) const { e.setAttribute( "value", m_scale.serializeXML( ) ); } @@ -102,7 +102,7 @@ void PMScale::setScale( const PMVector& p ) } } -PMDialogEditBase* PMScale::editWidget( QWidget* parent ) const +PMDialogEditBase* PMScale::editWidget( TQWidget* parent ) const { return new PMScaleEdit( parent ); } diff --git a/kpovmodeler/pmscale.h b/kpovmodeler/pmscale.h index bc1a391d..72821041 100644 --- a/kpovmodeler/pmscale.h +++ b/kpovmodeler/pmscale.h @@ -52,7 +52,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMScale( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -60,16 +60,16 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMScaleEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmscale" ); } + virtual TQString pixmap( ) const { return TQString( "pmscale" ); } /** * Returns the scale diff --git a/kpovmodeler/pmscaleedit.cpp b/kpovmodeler/pmscaleedit.cpp index 1df7b40f..24f3a471 100644 --- a/kpovmodeler/pmscaleedit.cpp +++ b/kpovmodeler/pmscaleedit.cpp @@ -20,11 +20,11 @@ #include "pmscale.h" #include "pmvectoredit.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> -PMScaleEdit::PMScaleEdit( QWidget* parent, const char* name ) +PMScaleEdit::PMScaleEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,7 +37,7 @@ void PMScaleEdit::createTopWidgets( ) m_pVector = new PMVectorEdit( "x", "y", "z", this ); topLayout( )->addWidget( m_pVector ); - connect( m_pVector, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pVector, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMScaleEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmscaleedit.h b/kpovmodeler/pmscaleedit.h index f18989f5..0e553be5 100644 --- a/kpovmodeler/pmscaleedit.h +++ b/kpovmodeler/pmscaleedit.h @@ -40,7 +40,7 @@ public: /** * Creates a PMScaleEdit with parent and name */ - PMScaleEdit( QWidget* parent, const char* name = 0 ); + PMScaleEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmscanner.cpp b/kpovmodeler/pmscanner.cpp index f67b7035..ebabb147 100644 --- a/kpovmodeler/pmscanner.cpp +++ b/kpovmodeler/pmscanner.cpp @@ -28,7 +28,7 @@ //#define PMSCAN_DEBUG PMReservedWordDict::PMReservedWordDict( PMDictMode mode ) - : QAsciiDict<int>( 353 ) + : TQAsciiDict<int>( 353 ) { switch( mode ) { @@ -479,7 +479,7 @@ const char* c_commentRawEnd = "//*PMRawEnd"; const int c_commentRawEndLength = 11; -PMScanner::PMScanner( QIODevice* device ) +PMScanner::PMScanner( TQIODevice* device ) { m_svalueAlloc = 256; m_svalue = ( char* ) malloc( m_svalueAlloc ); @@ -704,7 +704,7 @@ int PMScanner::nextToken( ) #ifdef PMSCAN_DEBUG kdDebug( PMArea ) << "Line " << m_line << ": Single char '" - << QString( QChar( ( char ) m_char ) ) << "'\n"; + << TQString( TQChar( ( char ) m_char ) ) << "'\n"; #endif break; } diff --git a/kpovmodeler/pmscanner.h b/kpovmodeler/pmscanner.h index 6a3e8529..9d2515ea 100644 --- a/kpovmodeler/pmscanner.h +++ b/kpovmodeler/pmscanner.h @@ -20,9 +20,9 @@ #ifndef PMSCANNER_H #define PMSCANNER_H -#include <qiodevice.h> -#include <qstring.h> -#include <qasciidict.h> +#include <tqiodevice.h> +#include <tqstring.h> +#include <tqasciidict.h> /** * Dictionary of reserved words for fast lookup @@ -30,7 +30,7 @@ * The class @ref PMScanner has two static dictionaries: one for reserved * words and one for directives. The constructor will insert the items. */ -class PMReservedWordDict : protected QAsciiDict<int> +class PMReservedWordDict : protected TQAsciiDict<int> { public: /** @@ -55,7 +55,7 @@ public: */ int find( const char* key ) const { - int* result = QAsciiDict<int>::find( key ); + int* result = TQAsciiDict<int>::find( key ); if( result ) return *result; return -1; @@ -70,9 +70,9 @@ class PMScanner { public: /** - * Creates a scanner that scans the QIODevice device + * Creates a scanner that scans the TQIODevice device */ - PMScanner( QIODevice* device ); + PMScanner( TQIODevice* device ); /** * Deletes the scanner */ @@ -110,7 +110,7 @@ public: /** * Returns the error string if current token is SCANNER_ERROR_TOK */ - QString error( ) const { return m_error; } + TQString error( ) const { return m_error; } /** * Special parse method for a function statement */ @@ -168,7 +168,7 @@ private: TOKEN_END_ST }; - QIODevice* m_pDevice; + TQIODevice* m_pDevice; int m_char; int m_token; @@ -184,7 +184,7 @@ private: bool m_bFunctionMode; int m_line; - QString m_error; + TQString m_error; }; diff --git a/kpovmodeler/pmscene.cpp b/kpovmodeler/pmscene.cpp index b8de8eef..cd6593cd 100644 --- a/kpovmodeler/pmscene.cpp +++ b/kpovmodeler/pmscene.cpp @@ -18,7 +18,7 @@ #include "pmscene.h" #include <klocale.h> -#include <qdom.h> +#include <tqdom.h> #include "pmxmlhelper.h" #include "pmdocumentformat.h" @@ -47,7 +47,7 @@ PMScene::~PMScene( ) m_renderModes.clear( ); } -QString PMScene::description( ) const +TQString PMScene::description( ) const { return i18n( "scene" ); } @@ -72,13 +72,13 @@ void PMScene::cleanUp( ) const Base::cleanUp( ); } -void PMScene::serialize( QDomElement& e, QDomDocument& doc ) const +void PMScene::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "majorFormat", c_majorDocumentFormat ); e.setAttribute( "minorFormat", c_minorDocumentFormat ); e.setAttribute( "visibility_level", m_visibilityLevel ); - QDomElement data = doc.createElement( "extra_data" ); - QDomElement rm; + TQDomElement data = doc.createElement( "extra_data" ); + TQDomElement rm; PMRenderModeListIterator it( m_renderModes ); for( ; it.current( ); ++it ) @@ -95,15 +95,15 @@ void PMScene::serialize( QDomElement& e, QDomDocument& doc ) const void PMScene::readAttributes( const PMXMLHelper& h ) { m_visibilityLevel = h.intAttribute( "visibility_level", c_defaultVisibilityLevel ); - QDomElement e = h.extraData( ); + TQDomElement e = h.extraData( ); if( !e.isNull( ) ) { - QDomNode c = e.firstChild( ); + TQDomNode c = e.firstChild( ); while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); if( ce.tagName( ) == "rendermode" ) m_renderModes.append( new PMRenderMode( ce ) ); } diff --git a/kpovmodeler/pmscene.h b/kpovmodeler/pmscene.h index 2932c43c..ed7cf227 100644 --- a/kpovmodeler/pmscene.h +++ b/kpovmodeler/pmscene.h @@ -58,13 +58,13 @@ public: /** */ virtual PMObject* copy( ) const { return new PMScene( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmscene" ); } + virtual TQString pixmap( ) const { return TQString( "pmscene" ); } /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); diff --git a/kpovmodeler/pmserializer.cpp b/kpovmodeler/pmserializer.cpp index 087631cc..2f58d0c1 100644 --- a/kpovmodeler/pmserializer.cpp +++ b/kpovmodeler/pmserializer.cpp @@ -25,7 +25,7 @@ unsigned int PMSerializer::s_maxErrors = 30; unsigned int PMSerializer::s_maxWarnings = 50; -PMSerializer::PMSerializer( QIODevice* dev ) +PMSerializer::PMSerializer( TQIODevice* dev ) { m_pDev = dev; m_errors = 0; @@ -57,12 +57,12 @@ int PMSerializer::errorFlags( ) const return result; } -void PMSerializer::printMessage( const QString& type, const QString& msg ) +void PMSerializer::printMessage( const TQString& type, const TQString& msg ) { m_messages += PMMessage( type + ": " + msg ); } -void PMSerializer::printError( const QString& msg ) +void PMSerializer::printError( const TQString& msg ) { if( m_errors < s_maxErrors ) { @@ -77,7 +77,7 @@ void PMSerializer::printError( const QString& msg ) } } -void PMSerializer::printWarning( const QString& msg ) +void PMSerializer::printWarning( const TQString& msg ) { if( m_warnings < s_maxWarnings ) { diff --git a/kpovmodeler/pmserializer.h b/kpovmodeler/pmserializer.h index 73e509d8..4c579364 100644 --- a/kpovmodeler/pmserializer.h +++ b/kpovmodeler/pmserializer.h @@ -23,12 +23,12 @@ #include <config.h> #endif -class QIODevice; +class TQIODevice; #include "pmobject.h" #include "pmerrordialog.h" -#include <qdict.h> +#include <tqdict.h> /** @@ -50,7 +50,7 @@ public: * * The serialized data will be written to the io device */ - PMSerializer( QIODevice* dev ); + PMSerializer( TQIODevice* dev ); /** * Destructor */ @@ -60,7 +60,7 @@ public: * the same string as description( ) of the corresponding * IO format. */ - virtual QString description( ) const = 0; + virtual TQString description( ) const = 0; /** * Serializes one object to the device @@ -101,20 +101,20 @@ public: /** * Adds an error to the message string */ - void printError( const QString& msg ); + void printError( const TQString& msg ); /** * Adds a warning to the message string */ - void printWarning( const QString& msg ); + void printWarning( const TQString& msg ); /** * Adds an info to the message string */ - void printInfo( const QString& msg ); + void printInfo( const TQString& msg ); /** * Adds the message to the message string. Type is "error", "warning", * "info" */ - void printMessage( const QString& type, const QString& msg ); + void printMessage( const TQString& type, const TQString& msg ); /** * Sets the fatal error flag @@ -142,7 +142,7 @@ protected: /** * The assigned IO device for serialization */ - QIODevice* m_pDev; + TQIODevice* m_pDev; private: /** @@ -152,7 +152,7 @@ private: /** * A dictionary object -> message */ - QPtrDict< QPtrList<PMMessage> > m_messageDict; + TQPtrDict< TQPtrList<PMMessage> > m_messageDict; /** * Number of warnings during parsing */ diff --git a/kpovmodeler/pmsettingsdialog.cpp b/kpovmodeler/pmsettingsdialog.cpp index 898719bc..3830a5d9 100644 --- a/kpovmodeler/pmsettingsdialog.cpp +++ b/kpovmodeler/pmsettingsdialog.cpp @@ -32,27 +32,27 @@ #include "pmrendermanager.h" #include "pmdebug.h" -#include <qvbox.h> -#include <qlistview.h> +#include <tqvbox.h> +#include <tqlistview.h> #include <klocale.h> #include <kconfig.h> #include <kiconloader.h> //#define KPM_WITH_OBJECT_LIBRARY -PMSettingsDialogPage::PMSettingsDialogPage( QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMSettingsDialogPage::PMSettingsDialogPage( TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { } -QSize PMSettingsDialog::s_size = QSize( 640, 400 ); +TQSize PMSettingsDialog::s_size = TQSize( 640, 400 ); -PMSettingsDialog::PMSettingsDialog( PMPart* part, QWidget* parent, const char* name ) +PMSettingsDialog::PMSettingsDialog( PMPart* part, TQWidget* parent, const char* name ) : KDialogBase( TreeList, i18n( "Configure" ), Ok | Apply | Cancel | Default, Ok, parent, name ) { - QStringList sl; - QWidget* w = 0; + TQStringList sl; + TQWidget* w = 0; PMSettingsDialogPage* p = 0; m_pPart = part; @@ -139,14 +139,14 @@ PMSettingsDialog::PMSettingsDialog( PMPart* part, QWidget* parent, const char* n void PMSettingsDialog::displaySettings( ) { - QValueList<PMRegisteredSettingsPage>::const_iterator it; + TQValueList<PMRegisteredSettingsPage>::const_iterator it; for( it = m_pages.begin( ); it != m_pages.end( ); ++it ) ( *it ).page->displaySettings( ); } void PMSettingsDialog::slotCancel( ) { - QDialog::reject( ); + TQDialog::reject( ); } void PMSettingsDialog::slotApply( ) @@ -160,7 +160,7 @@ void PMSettingsDialog::slotOk( ) if( validateData( ) ) { saveSettings( ); - QDialog::accept( ); + TQDialog::accept( ); } } @@ -168,7 +168,7 @@ void PMSettingsDialog::slotDefault( ) { int currentPage = activePageIndex( ); PMSettingsDialogPage* page = 0; - QValueList<PMRegisteredSettingsPage>::const_iterator it; + TQValueList<PMRegisteredSettingsPage>::const_iterator it; for( it = m_pages.begin( ); it != m_pages.end( ) && !page; ++it ) if( ( *it ).index == currentPage ) page = ( *it ).page; @@ -179,7 +179,7 @@ void PMSettingsDialog::slotDefault( ) bool PMSettingsDialog::validateData( ) { bool valid = true; - QValueList<PMRegisteredSettingsPage>::const_iterator it; + TQValueList<PMRegisteredSettingsPage>::const_iterator it; for( it = m_pages.begin( ); it != m_pages.end( ) && valid; ++it ) valid = ( *it ).page->validateData( ); return valid; @@ -189,7 +189,7 @@ void PMSettingsDialog::saveSettings( ) { m_repaint = false; - QValueList<PMRegisteredSettingsPage>::const_iterator it; + TQValueList<PMRegisteredSettingsPage>::const_iterator it; for( it = m_pages.begin( ); it != m_pages.end( ); ++it ) ( *it ).page->applySettings( ); @@ -210,16 +210,16 @@ void PMSettingsDialog::restoreConfig( KConfig* cfg ) { cfg->setGroup( "Appearance" ); - QSize defaultSize( 640, 400 ); + TQSize defaultSize( 640, 400 ); s_size = cfg->readSizeEntry( "SettingsDialogSize", &defaultSize ); } -void PMSettingsDialog::resizeEvent( QResizeEvent* ev ) +void PMSettingsDialog::resizeEvent( TQResizeEvent* ev ) { s_size = ev->size( ); } -void PMSettingsDialog::registerPage( QWidget* topPage, +void PMSettingsDialog::registerPage( TQWidget* topPage, PMSettingsDialogPage* page ) { int i = pageIndex( topPage ); @@ -229,8 +229,8 @@ void PMSettingsDialog::registerPage( QWidget* topPage, else { m_pages.push_back( PMRegisteredSettingsPage( topPage, page, i ) ); - connect( page, SIGNAL( repaintViews( ) ), SLOT( slotRepaint( ) ) ); - connect( page, SIGNAL( showMe( ) ), SLOT( slotShowPage( ) ) ); + connect( page, TQT_SIGNAL( repaintViews( ) ), TQT_SLOT( slotRepaint( ) ) ); + connect( page, TQT_SIGNAL( showMe( ) ), TQT_SLOT( slotShowPage( ) ) ); } } @@ -241,7 +241,7 @@ void PMSettingsDialog::slotRepaint( ) void PMSettingsDialog::slotShowPage( ) { - const QObject* w = sender( ); + const TQObject* w = sender( ); if( w ) { int index = findPage( ( const PMSettingsDialogPage* ) w ); @@ -253,7 +253,7 @@ void PMSettingsDialog::slotShowPage( ) int PMSettingsDialog::findPage( const PMSettingsDialogPage* p ) { int index = -1; - QValueList<PMRegisteredSettingsPage>::const_iterator it; + TQValueList<PMRegisteredSettingsPage>::const_iterator it; for( it = m_pages.begin( ); it != m_pages.end( ) && index < 0; ++it ) if( ( *it ).page == p ) index = ( *it ).index; diff --git a/kpovmodeler/pmsettingsdialog.h b/kpovmodeler/pmsettingsdialog.h index 09f00973..478fafe0 100644 --- a/kpovmodeler/pmsettingsdialog.h +++ b/kpovmodeler/pmsettingsdialog.h @@ -24,16 +24,16 @@ #endif #include <kdialogbase.h> -#include <qvaluelist.h> -#include <qvaluevector.h> +#include <tqvaluelist.h> +#include <tqvaluevector.h> -class QFrame; -class QCheckBox; -class QLineEdit; -class QListBox; -class QListView; -class QButtonGroup; -class QComboBox; +class TQFrame; +class TQCheckBox; +class TQLineEdit; +class TQListBox; +class TQListView; +class TQButtonGroup; +class TQComboBox; class KColorButton; class KConfig; class PMIntEdit; @@ -56,7 +56,7 @@ public: /** * Constructor */ - PMSettingsDialogPage( QWidget* parent, const char* name = 0 ); + PMSettingsDialogPage( TQWidget* parent, const char* name = 0 ); /** * Display the settings here. * @@ -108,14 +108,14 @@ public: page = 0; index = 0; } - PMRegisteredSettingsPage( QWidget* top, PMSettingsDialogPage* p, + PMRegisteredSettingsPage( TQWidget* top, PMSettingsDialogPage* p, int i ) { topPage = top; page = p; index = i; } - QWidget* topPage; + TQWidget* topPage; PMSettingsDialogPage* page; int index; }; @@ -130,20 +130,20 @@ public: /** * Standard constructor */ - PMSettingsDialog( PMPart* part, QWidget* parent = 0, const char* name = 0 ); + PMSettingsDialog( PMPart* part, TQWidget* parent = 0, const char* name = 0 ); /** * Registers a new settings page. * * @param topPage The page created with addVBoxPage * @param page The internal settings page */ - void registerPage( QWidget* topPage, PMSettingsDialogPage* page ); + void registerPage( TQWidget* topPage, PMSettingsDialogPage* page ); static void saveConfig( KConfig* cfg ); static void restoreConfig( KConfig* cfg ); protected: - virtual void resizeEvent( QResizeEvent* ev ); + virtual void resizeEvent( TQResizeEvent* ev ); protected slots: /** @@ -178,10 +178,10 @@ private: void saveSettings( ); int findPage( const PMSettingsDialogPage* page ); bool m_repaint; - QValueList<PMRegisteredSettingsPage> m_pages; + TQValueList<PMRegisteredSettingsPage> m_pages; PMPart* m_pPart; - static QSize s_size; + static TQSize s_size; }; #endif diff --git a/kpovmodeler/pmshell.cpp b/kpovmodeler/pmshell.cpp index 52702492..a09b1f82 100644 --- a/kpovmodeler/pmshell.cpp +++ b/kpovmodeler/pmshell.cpp @@ -27,7 +27,7 @@ #include <kkeydialog.h> #include <kaboutdialog.h> #include <kpopupmenu.h> -#include <qtimer.h> +#include <tqtimer.h> #include "pmshell.h" #include "pmpart.h" @@ -81,9 +81,9 @@ PMShell::PMShell( const KURL& url ) openURL( url ); setCaption( url.prettyURL( ) ); - connect( m_pPart, SIGNAL( modified( ) ), SLOT( slotModified( ) ) ); - connect( m_pPart, SIGNAL( controlPointMessage( const QString& ) ), - SLOT( slotControlPointMsg( const QString& ) ) ); + connect( m_pPart, TQT_SIGNAL( modified( ) ), TQT_SLOT( slotModified( ) ) ); + connect( m_pPart, TQT_SIGNAL( controlPointMessage( const TQString& ) ), + TQT_SLOT( slotControlPointMsg( const TQString& ) ) ); } PMShell::~PMShell( ) @@ -95,67 +95,67 @@ void PMShell::setupActions( ) // m_helpMenu = new KHelpMenu( this, PMFactory::aboutData( ), true, // actionCollection( ) ); - KStdAction::openNew( this, SLOT( slotFileNew( ) ), actionCollection( ) ); - KStdAction::open( this, SLOT( slotFileOpen( ) ), actionCollection( ) ); - m_pRecent = KStdAction::openRecent( this, SLOT( slotOpenRecent( const KURL& ) ), + KStdAction::openNew( this, TQT_SLOT( slotFileNew( ) ), actionCollection( ) ); + KStdAction::open( this, TQT_SLOT( slotFileOpen( ) ), actionCollection( ) ); + m_pRecent = KStdAction::openRecent( this, TQT_SLOT( slotOpenRecent( const KURL& ) ), actionCollection( ) ); - KStdAction::save( this, SLOT( slotFileSave( ) ), actionCollection( ) ); - KStdAction::saveAs( this, SLOT( slotFileSaveAs( ) ), actionCollection( ) ); + KStdAction::save( this, TQT_SLOT( slotFileSave( ) ), actionCollection( ) ); + KStdAction::saveAs( this, TQT_SLOT( slotFileSaveAs( ) ), actionCollection( ) ); - KStdAction::revert( this, SLOT( slotFileRevert( ) ), actionCollection( ) ); - KStdAction::print( this, SLOT( slotFilePrint( ) ), actionCollection( ) ); + KStdAction::revert( this, TQT_SLOT( slotFileRevert( ) ), actionCollection( ) ); + KStdAction::print( this, TQT_SLOT( slotFilePrint( ) ), actionCollection( ) ); - KStdAction::close( this, SLOT( slotFileClose( ) ), actionCollection( ) ); - KStdAction::quit( this, SLOT( close( ) ), actionCollection( ) ); + KStdAction::close( this, TQT_SLOT( slotFileClose( ) ), actionCollection( ) ); + KStdAction::quit( this, TQT_SLOT( close( ) ), actionCollection( ) ); m_pPathAction = new KToggleAction( i18n( "Show &Path" ), 0, this, - SLOT( slotShowPath( ) ), actionCollection( ), + TQT_SLOT( slotShowPath( ) ), actionCollection( ), "options_show_path" ); m_pPathAction->setCheckedState(i18n("Hide &Path")); - m_pStatusbarAction = KStdAction::showStatusbar( this, SLOT( slotShowStatusbar( ) ), + m_pStatusbarAction = KStdAction::showStatusbar( this, TQT_SLOT( slotShowStatusbar( ) ), actionCollection( ) ); - KStdAction::saveOptions( this, SLOT( saveOptions( ) ), actionCollection( ) ); + KStdAction::saveOptions( this, TQT_SLOT( saveOptions( ) ), actionCollection( ) ); - KStdAction::keyBindings( this, SLOT( slotConfigureKeys( ) ), + KStdAction::keyBindings( this, TQT_SLOT( slotConfigureKeys( ) ), actionCollection( ) ); - KStdAction::configureToolbars( this, SLOT( slotConfigureToolbars( ) ), + KStdAction::configureToolbars( this, TQT_SLOT( slotConfigureToolbars( ) ), actionCollection( ) ); - KStdAction::preferences( this, SLOT( slotSettings( ) ), actionCollection( ) ); + KStdAction::preferences( this, TQT_SLOT( slotSettings( ) ), actionCollection( ) ); m_pNewTopViewAction = new KAction( i18n( "New Top View" ), 0, this, - SLOT( slotNewTopView( ) ), + TQT_SLOT( slotNewTopView( ) ), actionCollection( ), "view_new_topview" ); m_pNewBottomViewAction = new KAction( i18n( "New Bottom View" ), 0, this, - SLOT( slotNewBottomView( ) ), + TQT_SLOT( slotNewBottomView( ) ), actionCollection( ), "view_new_bottomview" ); m_pNewLeftViewAction = new KAction( i18n( "New Left View" ), 0, this, - SLOT( slotNewLeftView( ) ), + TQT_SLOT( slotNewLeftView( ) ), actionCollection( ), "view_new_leftview" ); m_pNewRightViewAction = new KAction( i18n( "New Right View" ), 0, this, - SLOT( slotNewRightView( ) ), + TQT_SLOT( slotNewRightView( ) ), actionCollection( ), "view_new_rightview" ); m_pNewFrontViewAction = new KAction( i18n( "New Front View" ), 0, this, - SLOT( slotNewFrontView( ) ), + TQT_SLOT( slotNewFrontView( ) ), actionCollection( ), "view_new_frontview" ); m_pNewBackViewAction = new KAction( i18n( "New Back View" ), 0, this, - SLOT( slotNewBackView( ) ), + TQT_SLOT( slotNewBackView( ) ), actionCollection( ), "view_new_back_view" ); m_pNewCameraViewAction = new KAction( i18n( "New Camera View" ), 0, this, - SLOT( slotNewCameraView( ) ), + TQT_SLOT( slotNewCameraView( ) ), actionCollection( ), "view_new_cameraview" ); m_pNewTreeViewAction = new KAction( i18n( "New Object Tree" ), 0, this, - SLOT( slotNewTreeView( ) ), actionCollection( ), + TQT_SLOT( slotNewTreeView( ) ), actionCollection( ), "view_new_treeview" ); m_pNewDialogViewAction = new KAction( i18n( "New Properties View" ), 0, this, - SLOT( slotNewDialogView( ) ), actionCollection( ), + TQT_SLOT( slotNewDialogView( ) ), actionCollection( ), "view_new_dialogview" ); #ifdef KPM_WITH_OBJECT_LIBRARY m_pNewLibraryBrowserAction = new KAction( i18n( "New Library Browser" ), 0, this, - SLOT( slotNewLibraryBrowserView( ) ), actionCollection( ), + TQT_SLOT( slotNewLibraryBrowserView( ) ), actionCollection( ), "view_new_librarybrowser" ); #endif @@ -163,12 +163,12 @@ void PMShell::setupActions( ) m_pViewLayoutsAction = new KActionMenu( i18n( "View Layouts" ), actionCollection( ), "view_layouts_menu" ); KPopupMenu* menu = m_pViewLayoutsAction->popupMenu( ); - connect( menu, SIGNAL( aboutToShow( ) ), SLOT( slotViewsMenuAboutToShow( ) ) ); + connect( menu, TQT_SIGNAL( aboutToShow( ) ), TQT_SLOT( slotViewsMenuAboutToShow( ) ) ); PMViewLayoutManager::theManager( )->fillPopupMenu( menu ); - connect( menu, SIGNAL( activated( int ) ), SLOT( slotSelectedLayout( int ) ) ); + connect( menu, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotSelectedLayout( int ) ) ); m_pSaveViewLayoutAction = new KAction( i18n( "Save View Layout..." ), 0, this, - SLOT( slotSaveViewLayout( ) ), + TQT_SLOT( slotSaveViewLayout( ) ), actionCollection( ), "save_view_layout" ); } @@ -178,7 +178,7 @@ void PMShell::setupView( ) } -PMDockWidget* PMShell::createView( const QString& t, PMViewOptions* o, +PMDockWidget* PMShell::createView( const TQString& t, PMViewOptions* o, bool initPosition ) { PMDockWidget* dock = 0; @@ -188,11 +188,11 @@ PMDockWidget* PMShell::createView( const QString& t, PMViewOptions* o, PMViewFactory::theFactory( )->viewFactory( t ); m_viewNumber++; - QString name = QString( "View (%1)" ).arg( m_viewNumber ); + TQString name = TQString( "View (%1)" ).arg( m_viewNumber ); if( factory ) { - QString desc; + TQString desc; // Create the appropriate dock widget if( o ) desc = factory->description( o ); @@ -214,14 +214,14 @@ PMDockWidget* PMShell::createView( const QString& t, PMViewOptions* o, } dock->setWidget( contents ); - connect( dock, SIGNAL( headerCloseButtonClicked( ) ), - SLOT( slotDockWidgetClosed( ) ) ); + connect( dock, TQT_SIGNAL( headerCloseButtonClicked( ) ), + TQT_SLOT( slotDockWidgetClosed( ) ) ); if( initPosition ) { dock->resize( 300, 400 ); dock->manualDock( 0, PMDockWidget::DockDesktop, 50, - mapToGlobal( QPoint( 50, 50 ) ) ); + mapToGlobal( TQPoint( 50, 50 ) ) ); } return dock; } @@ -231,15 +231,15 @@ PMDockWidget* PMShell::createTreeView( ) { PMDockWidget* dock = 0; m_numTreeViews++; - QString name = QString( "Object Tree (%1)" ).arg( m_numTreeViews ); + TQString name = TQString( "Object Tree (%1)" ).arg( m_numTreeViews ); dock = createDockWidget( name, SmallIcon( "pmtreeview" ), 0L, i18n( "Object Tree" ), i18n( "Object Tree" ) ); dock->setDockSite( PMDockWidget::DockFullSite ); PMTreeView* tv = new PMTreeView( m_pPart, dock ); dock->setWidget( tv ); - connect( dock, SIGNAL( headerCloseButtonClicked( ) ), - SLOT( slotDockWidgetClosed( ) ) ); + connect( dock, TQT_SIGNAL( headerCloseButtonClicked( ) ), + TQT_SLOT( slotDockWidgetClosed( ) ) ); return dock; } @@ -248,15 +248,15 @@ PMDockWidget* PMShell::createDialogView( ) { PMDockWidget* dock = 0; m_numDialogViews++; - QString name = QString( "Object Properties (%1)" ).arg( m_numDialogViews ); + TQString name = TQString( "Object Properties (%1)" ).arg( m_numDialogViews ); dock = createDockWidget( name, SmallIcon( "pmdialogview" ), 0L, i18n( "Object Properties" ), i18n( "Object Properties" ) ); dock->setDockSite( PMDockWidget::DockFullSite ); PMDialogView* dv = new PMDialogView( m_pPart, dock ); dock->setWidget( dv ); - connect( dock, SIGNAL( headerCloseButtonClicked( ) ), - SLOT( slotDockWidgetClosed( ) ) ); + connect( dock, TQT_SIGNAL( headerCloseButtonClicked( ) ), + TQT_SLOT( slotDockWidgetClosed( ) ) ); return dock; } @@ -265,18 +265,18 @@ PMDockWidget* PMShell::create3DView( PMGLView::PMViewType t ) { PMDockWidget* dock = 0; m_numGLViews++; - QString name = QString( "3D View (%1)" ).arg( m_numGLViews ); + TQString name = TQString( "3D View (%1)" ).arg( m_numGLViews ); dock = createDockWidget( name, SmallIcon( "pmglview" ), 0L, i18n( "3D View" ), i18n( "3D View" ) ); dock->setDockSite( PMDockWidget::DockFullSite ); PMGLView* vgl = new PMGLView( m_pPart, t, dock ); dock->setWidget( vgl ); - connect( vgl, SIGNAL( viewTypeChanged( const QString& ) ), - dock, SLOT( slotSetCaption( const QString& ) ) ); + connect( vgl, TQT_SIGNAL( viewTypeChanged( const TQString& ) ), + dock, TQT_SLOT( slotSetCaption( const TQString& ) ) ); dock->slotSetCaption( PMGLView::viewTypeAsString( t ) ); - connect( dock, SIGNAL( headerCloseButtonClicked( ) ), - SLOT( slotDockWidgetClosed( ) ) ); + connect( dock, TQT_SIGNAL( headerCloseButtonClicked( ) ), + TQT_SLOT( slotDockWidgetClosed( ) ) ); return dock; } @@ -341,13 +341,13 @@ void PMShell::slotNewLibraryBrowserView( ) void PMShell::slotDockWidgetClosed( ) { - const QObject* o = sender( ); + const TQObject* o = sender( ); if( o && o->inherits( "PMDockWidget" ) ) { if( m_objectsToDelete.containsRef( o ) == 0 ) { m_objectsToDelete.append( o ); - QTimer::singleShot( 0, this, SLOT( slotDeleteClosedObjects( ) ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotDeleteClosedObjects( ) ) ); } } } @@ -377,7 +377,7 @@ void PMShell::openURL( const KURL& url ) void PMShell::slotOpenRecent( const KURL& url ) { m_openRecentURL = url; - QTimer::singleShot( 0, this, SLOT( slotOpenRecentTimer( ) ) ); + TQTimer::singleShot( 0, this, TQT_SLOT( slotOpenRecentTimer( ) ) ); } void PMShell::slotOpenRecentTimer( ) @@ -402,7 +402,7 @@ void PMShell::slotFileNew( ) void PMShell::slotFileOpen( ) { KURL url = KFileDialog::getOpenURL( - QString::null, QString( "*.kpm|" ) + i18n( "Povray Modeler Files (*.kpm)" ) + TQString::null, TQString( "*.kpm|" ) + i18n( "Povray Modeler Files (*.kpm)" ) + "\n*|" + i18n( "All Files" ) ); if( !url.isEmpty( ) ) @@ -434,9 +434,9 @@ void PMShell::slotFileSaveAs( ) void PMShell::saveAs( ) { - KFileDialog dlg( QString::null, - QString( "*.kpm|" ) + i18n( "Povray Modeler Files (*.kpm)" ) + - QString( "\n*|" ) + i18n( "All Files" ), + KFileDialog dlg( TQString::null, + TQString( "*.kpm|" ) + i18n( "Povray Modeler Files (*.kpm)" ) + + TQString( "\n*|" ) + i18n( "All Files" ), 0, "filedialog", true ); dlg.setCaption( i18n( "Save As" ) ); dlg.setOperationMode( KFileDialog::Saving ); @@ -446,8 +446,8 @@ void PMShell::saveAs( ) if( !url.isEmpty( ) ) { - if( dlg.currentFilter( ) == QString( "*.kpm" ) ) - if( QFileInfo( url.path( ) ).extension( ).isEmpty( ) ) + if( dlg.currentFilter( ) == TQString( "*.kpm" ) ) + if( TQFileInfo( url.path( ) ).extension( ).isEmpty( ) ) url.setPath( url.path( ) + ".kpm" ); if( overwriteURL( url ) ) @@ -533,8 +533,8 @@ void PMShell::slotConfigureToolbars( ) { saveMainWindowSettings( KGlobal::config( ), "Appearance" ); KEditToolbar dlg( factory( ) ); - connect( &dlg, SIGNAL( newToolbarConfig( ) ), - this, SLOT( slotNewToolbarConfig( ) ) ); + connect( &dlg, TQT_SIGNAL( newToolbarConfig( ) ), + this, TQT_SLOT( slotNewToolbarConfig( ) ) ); dlg.exec( ); } @@ -593,9 +593,9 @@ void PMShell::restoreOptions( ) m_pRecent->loadEntries( config ); } -void PMShell::setCaption( const QString& caption ) +void PMShell::setCaption( const TQString& caption ) { - QString tmp; + TQString tmp; if( caption.isEmpty( ) ) tmp = i18n( "unknown" ); @@ -610,7 +610,7 @@ void PMShell::setCaption( const QString& caption ) KMainWindow::setCaption( tmp, m_pPart->isModified( ) ); } -void PMShell::statusMsg( const QString& text ) +void PMShell::statusMsg( const TQString& text ) { m_pStatusBar->message( text, 5000 ); } @@ -621,7 +621,7 @@ bool PMShell::queryClose( ) return m_pPart->closeURL( ); } -void PMShell::showEvent( QShowEvent* ){ +void PMShell::showEvent( TQShowEvent* ){ activateDock( ); } @@ -630,12 +630,12 @@ void PMShell::slotModified( ) setCaption( m_pPart->url( ).prettyURL( ) ); } -void PMShell::slotControlPointMsg( const QString& msg ) +void PMShell::slotControlPointMsg( const TQString& msg ) { if( msg.isEmpty( ) ) m_pStatusBar->changeItem( msg, c_statusBarControlPoints ); else - m_pStatusBar->changeItem( QString( " " ) + msg + QString( " " ), + m_pStatusBar->changeItem( TQString( " " ) + msg + TQString( " " ), c_statusBarControlPoints ); } @@ -645,18 +645,18 @@ bool PMShell::overwriteURL( const KURL& u ) if( u.isLocalFile( ) ) { - QFileInfo info; - QString name( u.path( ) ); + TQFileInfo info; + TQString name( u.path( ) ); info.setFile( name ); if( info.exists( ) ) - query = KMessageBox::warningContinueCancel( 0, i18n( "A file with this name already exists.\nDo you want to overwrite it?" ), QString::null, i18n("Overwrite") ); + query = KMessageBox::warningContinueCancel( 0, i18n( "A file with this name already exists.\nDo you want to overwrite it?" ), TQString::null, i18n("Overwrite") ); } return ( query == KMessageBox::Continue ); } void PMShell::slotSelectedLayout( int id ) { - QMenuItem* menu = m_pViewLayoutsAction->popupMenu( )->findItem( id ); + TQMenuItem* menu = m_pViewLayoutsAction->popupMenu( )->findItem( id ); PMViewLayoutManager::theManager( )->displayLayout( menu->text( ), this ); } diff --git a/kpovmodeler/pmshell.h b/kpovmodeler/pmshell.h index 9a0dbb91..2165e15c 100644 --- a/kpovmodeler/pmshell.h +++ b/kpovmodeler/pmshell.h @@ -26,7 +26,7 @@ #include "pmglview.h" #include "version.h" -#include <qptrlist.h> +#include <tqptrlist.h> //class KHelpMenu; class KStatusBar; @@ -113,9 +113,9 @@ public slots: void saveOptions( ); void restoreOptions( ); - void setCaption( const QString& caption = QString::null ); - void statusMsg( const QString& text = QString::null ); - void slotControlPointMsg( const QString& msg = QString::null ); + void setCaption( const TQString& caption = TQString::null ); + void statusMsg( const TQString& text = TQString::null ); + void slotControlPointMsg( const TQString& msg = TQString::null ); void slotModified( ); void slotDockWidgetClosed( ); @@ -126,7 +126,7 @@ public slots: protected: virtual bool queryClose( ); - virtual void showEvent( QShowEvent* ); + virtual void showEvent( TQShowEvent* ); void saveAs( ); public: @@ -135,7 +135,7 @@ public: * * If initPosition is true, the widget is docked to the desktop. */ - PMDockWidget* createView( const QString& t, PMViewOptions* c = 0, + PMDockWidget* createView( const TQString& t, PMViewOptions* c = 0, bool initPosition = true ); //PMDockWidget* createTreeView( ); //PMDockWidget* createDialogView( ); @@ -165,7 +165,7 @@ private: PMPart* m_pPart; KURL m_openRecentURL; - QPtrList<QObject> m_objectsToDelete; + TQPtrList<TQObject> m_objectsToDelete; int m_viewNumber; }; diff --git a/kpovmodeler/pmskysphere.cpp b/kpovmodeler/pmskysphere.cpp index 735c851b..a31cc475 100644 --- a/kpovmodeler/pmskysphere.cpp +++ b/kpovmodeler/pmskysphere.cpp @@ -64,12 +64,12 @@ void PMSkySphere::cleanUp( ) const Base::cleanUp( ); } -QString PMSkySphere::description( ) const +TQString PMSkySphere::description( ) const { return i18n( "skysphere" ); } -PMDialogEditBase* PMSkySphere::editWidget( QWidget* parent ) const +PMDialogEditBase* PMSkySphere::editWidget( TQWidget* parent ) const { return new PMSkySphereEdit( parent ); } diff --git a/kpovmodeler/pmskysphere.h b/kpovmodeler/pmskysphere.h index f3799b75..116af543 100644 --- a/kpovmodeler/pmskysphere.h +++ b/kpovmodeler/pmskysphere.h @@ -49,7 +49,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMSkySphere( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -59,9 +59,9 @@ public: /** * Returns a new @ref PMSkySphereEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmskysphere" ); } + virtual TQString pixmap( ) const { return TQString( "pmskysphere" ); } private: /** diff --git a/kpovmodeler/pmskysphereedit.cpp b/kpovmodeler/pmskysphereedit.cpp index 0dc05580..4a1590b2 100644 --- a/kpovmodeler/pmskysphereedit.cpp +++ b/kpovmodeler/pmskysphereedit.cpp @@ -20,12 +20,12 @@ #include "pmskysphere.h" #include "pmlinkedit.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMSkySphereEdit::PMSkySphereEdit( QWidget* parent, const char* name ) +PMSkySphereEdit::PMSkySphereEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; diff --git a/kpovmodeler/pmskysphereedit.h b/kpovmodeler/pmskysphereedit.h index 10ef2567..f0e2946e 100644 --- a/kpovmodeler/pmskysphereedit.h +++ b/kpovmodeler/pmskysphereedit.h @@ -39,7 +39,7 @@ public: /** * Creates a PMSkySphereEdit with parent and name */ - PMSkySphereEdit( QWidget* parent, const char* name = 0 ); + PMSkySphereEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmslope.cpp b/kpovmodeler/pmslope.cpp index aa652be9..1d2d2977 100644 --- a/kpovmodeler/pmslope.cpp +++ b/kpovmodeler/pmslope.cpp @@ -52,12 +52,12 @@ PMSlope::~PMSlope( ) { } -QString PMSlope::description( ) const +TQString PMSlope::description( ) const { return i18n( "slope" ); } -void PMSlope::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const +void PMSlope::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const { e.setAttribute( "height", m_height ); e.setAttribute( "slope", m_slope ); @@ -113,7 +113,7 @@ void PMSlope::setSlope( const double c ) } } -PMDialogEditBase* PMSlope::editWidget( QWidget* parent ) const +PMDialogEditBase* PMSlope::editWidget( TQWidget* parent ) const { return new PMSlopeEdit( parent ); } diff --git a/kpovmodeler/pmslope.h b/kpovmodeler/pmslope.h index 5f89b5b2..eb860373 100644 --- a/kpovmodeler/pmslope.h +++ b/kpovmodeler/pmslope.h @@ -50,7 +50,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMSlope( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -58,19 +58,19 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMSlopeEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmslope" ); } + virtual TQString pixmap( ) const { return TQString( "pmslope" ); } double height( ) const { return m_height; } void setHeight( double c ); diff --git a/kpovmodeler/pmslopeedit.cpp b/kpovmodeler/pmslopeedit.cpp index 5bfcb88b..63b0ee44 100644 --- a/kpovmodeler/pmslopeedit.cpp +++ b/kpovmodeler/pmslopeedit.cpp @@ -21,15 +21,15 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kdialog.h> -PMSlopeEdit::PMSlopeEdit( QWidget* parent, const char* name ) +PMSlopeEdit::PMSlopeEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,25 +37,25 @@ PMSlopeEdit::PMSlopeEdit( QWidget* parent, const char* name ) void PMSlopeEdit::createTopWidgets( ) { - QHBoxLayout* hl; - QGridLayout* gl; + TQHBoxLayout* hl; + TQGridLayout* gl; Base::createTopWidgets( ); - QLabel* label = new QLabel( i18n( "Height:" ), this ); + TQLabel* label = new TQLabel( i18n( "Height:" ), this ); m_pHeightEdit = new PMFloatEdit( this ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 2, 2 ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 2, 2 ); gl->addWidget( label, 0, 0 ); gl->addWidget( m_pHeightEdit, 0, 1 ); - label = new QLabel( i18n( "Slope:" ), this ); + label = new TQLabel( i18n( "Slope:" ), this ); m_pSlopeEdit = new PMFloatEdit( this ); gl->addWidget( label, 1, 0 ); gl->addWidget( m_pSlopeEdit, 1, 1 ); hl->addStretch( 1 ); - connect( m_pHeightEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSlopeEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pHeightEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSlopeEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMSlopeEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmslopeedit.h b/kpovmodeler/pmslopeedit.h index 2c4d2af4..a2defaa9 100644 --- a/kpovmodeler/pmslopeedit.h +++ b/kpovmodeler/pmslopeedit.h @@ -30,9 +30,9 @@ class PMSlope; class PMVectorEdit; class PMIntEdit; class PMFloatEdit; -class QComboBox; -class QCheckBox; -class QLabel; +class TQComboBox; +class TQCheckBox; +class TQLabel; /** * Dialog edit class for @ref PMSlope. @@ -45,7 +45,7 @@ public: /** * Creates a PMSlopeEdit with parent and name */ - PMSlopeEdit( QWidget* parent, const char* name = 0 ); + PMSlopeEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmsolidcolor.cpp b/kpovmodeler/pmsolidcolor.cpp index c067b12d..dd50d030 100644 --- a/kpovmodeler/pmsolidcolor.cpp +++ b/kpovmodeler/pmsolidcolor.cpp @@ -50,12 +50,12 @@ PMSolidColor::~PMSolidColor( ) { } -QString PMSolidColor::description( ) const +TQString PMSolidColor::description( ) const { return i18n( "solid color" ); } -void PMSolidColor::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const +void PMSolidColor::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const { e.setAttribute( "color", m_color.serializeXML( ) ); } @@ -97,7 +97,7 @@ void PMSolidColor::setColor( const PMColor& c ) } } -PMDialogEditBase* PMSolidColor::editWidget( QWidget* parent ) const +PMDialogEditBase* PMSolidColor::editWidget( TQWidget* parent ) const { return new PMSolidColorEdit( parent ); } diff --git a/kpovmodeler/pmsolidcolor.h b/kpovmodeler/pmsolidcolor.h index 7a575758..225a3a5b 100644 --- a/kpovmodeler/pmsolidcolor.h +++ b/kpovmodeler/pmsolidcolor.h @@ -51,7 +51,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMSolidColor( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -59,19 +59,19 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMSolidColorEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmsolidcolor" ); } + virtual TQString pixmap( ) const { return TQString( "pmsolidcolor" ); } /** * Returns the color diff --git a/kpovmodeler/pmsolidcoloredit.cpp b/kpovmodeler/pmsolidcoloredit.cpp index 49183582..3eb326c4 100644 --- a/kpovmodeler/pmsolidcoloredit.cpp +++ b/kpovmodeler/pmsolidcoloredit.cpp @@ -20,12 +20,12 @@ #include "pmsolidcolor.h" #include "pmcoloredit.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMSolidColorEdit::PMSolidColorEdit( QWidget* parent, const char* name ) +PMSolidColorEdit::PMSolidColorEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -35,14 +35,14 @@ void PMSolidColorEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout = new QHBoxLayout( topLayout( ) ); + TQHBoxLayout* layout = new TQHBoxLayout( topLayout( ) ); m_pColorEdit = new PMColorEdit( true, this ); - QLabel* label = new QLabel( i18n( "Color:" ), this ); + TQLabel* label = new TQLabel( i18n( "Color:" ), this ); layout->addWidget( label, 0, AlignTop ); layout->addWidget( m_pColorEdit ); - connect( m_pColorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pColorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMSolidColorEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmsolidcoloredit.h b/kpovmodeler/pmsolidcoloredit.h index 57439f92..c3dada09 100644 --- a/kpovmodeler/pmsolidcoloredit.h +++ b/kpovmodeler/pmsolidcoloredit.h @@ -40,7 +40,7 @@ public: /** * Creates a PMSolidColorEdit with parent and name */ - PMSolidColorEdit( QWidget* parent, const char* name = 0 ); + PMSolidColorEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmsolidobject.cpp b/kpovmodeler/pmsolidobject.cpp index 6907e731..61ddd45c 100644 --- a/kpovmodeler/pmsolidobject.cpp +++ b/kpovmodeler/pmsolidobject.cpp @@ -66,7 +66,7 @@ void PMSolidObject::cleanUp( ) const Base::cleanUp( ); } -void PMSolidObject::serialize( QDomElement& e, QDomDocument& doc ) const +void PMSolidObject::serialize( TQDomElement& e, TQDomDocument& doc ) const { switch( m_hollow ) { diff --git a/kpovmodeler/pmsolidobject.h b/kpovmodeler/pmsolidobject.h index e497c397..be2d2f5c 100644 --- a/kpovmodeler/pmsolidobject.h +++ b/kpovmodeler/pmsolidobject.h @@ -53,7 +53,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); diff --git a/kpovmodeler/pmsolidobjectedit.cpp b/kpovmodeler/pmsolidobjectedit.cpp index e6aa3765..4a1a2205 100644 --- a/kpovmodeler/pmsolidobjectedit.cpp +++ b/kpovmodeler/pmsolidobjectedit.cpp @@ -19,11 +19,11 @@ #include "pmsolidobjectedit.h" #include "pmsolidobject.h" -#include <qcheckbox.h> -#include <qlayout.h> +#include <tqcheckbox.h> +#include <tqlayout.h> #include <klocale.h> -PMSolidObjectEdit::PMSolidObjectEdit( QWidget* parent, const char* name ) +PMSolidObjectEdit::PMSolidObjectEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -31,16 +31,16 @@ PMSolidObjectEdit::PMSolidObjectEdit( QWidget* parent, const char* name ) void PMSolidObjectEdit::createBottomWidgets( ) { - m_pInverseButton = new QCheckBox( i18n( "Inverse" ), this ); - m_pHollowButton = new QCheckBox( i18n( "Hollow" ), this ); + m_pInverseButton = new TQCheckBox( i18n( "Inverse" ), this ); + m_pHollowButton = new TQCheckBox( i18n( "Hollow" ), this ); m_pHollowButton->setTristate( true ); topLayout( )->addWidget( m_pInverseButton ); topLayout( )->addWidget( m_pHollowButton ); - connect( m_pHollowButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pInverseButton, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pHollowButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pInverseButton, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); Base::createBottomWidgets( ); } diff --git a/kpovmodeler/pmsolidobjectedit.h b/kpovmodeler/pmsolidobjectedit.h index 3da2da6a..719e3f01 100644 --- a/kpovmodeler/pmsolidobjectedit.h +++ b/kpovmodeler/pmsolidobjectedit.h @@ -27,7 +27,7 @@ #include "pmgraphicalobjectedit.h" class PMSolidObject; -class QCheckBox; +class TQCheckBox; /** * Dialog edit class for @ref PMSolidObject. @@ -40,7 +40,7 @@ public: /** * Creates a PMSolidObjectEdit with parent and name */ - PMSolidObjectEdit( QWidget* parent, const char* name = 0 ); + PMSolidObjectEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -55,8 +55,8 @@ protected: private: PMSolidObject* m_pDisplayedObject; - QCheckBox* m_pHollowButton; - QCheckBox* m_pInverseButton; + TQCheckBox* m_pHollowButton; + TQCheckBox* m_pInverseButton; }; diff --git a/kpovmodeler/pmsor.cpp b/kpovmodeler/pmsor.cpp index b7a9f0ef..2ede8b8a 100644 --- a/kpovmodeler/pmsor.cpp +++ b/kpovmodeler/pmsor.cpp @@ -74,8 +74,8 @@ protected: virtual bool setProtected( PMObject* obj, const PMVariant& var ) { PMSurfaceOfRevolution* p = ( PMSurfaceOfRevolution* ) obj; - QValueList<PMVector> list = p->points( ); - QValueList<PMVector>::Iterator it = list.begin( ); + TQValueList<PMVector> list = p->points( ); + TQValueList<PMVector>::Iterator it = list.begin( ); int i; PMVector v = var.vectorData( ); v.resize( 2 ); @@ -96,8 +96,8 @@ protected: virtual PMVariant getProtected( const PMObject* obj ) { PMSurfaceOfRevolution* p = ( PMSurfaceOfRevolution* ) obj; - QValueList<PMVector> list = p->points( ); - QValueList<PMVector>::ConstIterator it = list.at( m_index ); + TQValueList<PMVector> list = p->points( ); + TQValueList<PMVector>::ConstIterator it = list.at( m_index ); if( it == list.end( ) ) { @@ -135,20 +135,20 @@ PMSurfaceOfRevolution::~PMSurfaceOfRevolution( ) { } -QString PMSurfaceOfRevolution::description( ) const +TQString PMSurfaceOfRevolution::description( ) const { return i18n( "surface of revolution" ); } -void PMSurfaceOfRevolution::serialize( QDomElement& e, QDomDocument& doc ) const +void PMSurfaceOfRevolution::serialize( TQDomElement& e, TQDomDocument& doc ) const { - QDomElement data = doc.createElement( "extra_data" ); - QDomElement p; + TQDomElement data = doc.createElement( "extra_data" ); + TQDomElement p; e.setAttribute( "sturm", m_sturm ); e.setAttribute( "open", m_open ); - QValueList<PMVector>::ConstIterator it; + TQValueList<PMVector>::ConstIterator it; for( it = m_points.begin( ); it != m_points.end( ); ++it ) { p = doc.createElement( "point" ); @@ -168,18 +168,18 @@ void PMSurfaceOfRevolution::readAttributes( const PMXMLHelper& h ) m_points.clear( ); PMVector v( 2 ); - QDomElement e = h.extraData( ); + TQDomElement e = h.extraData( ); if( !e.isNull( ) ) { - QDomNode c = e.firstChild( ); + TQDomNode c = e.firstChild( ); while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); if( ce.tagName( ) == "point" ) { - QString str = ce.attribute( "vector" ); + TQString str = ce.attribute( "vector" ); if( !str.isNull( ) ) { v.loadXML( str ); @@ -241,7 +241,7 @@ void PMSurfaceOfRevolution::setOpen( bool o ) } } -void PMSurfaceOfRevolution::setPoints( const QValueList<PMVector>& points ) +void PMSurfaceOfRevolution::setPoints( const TQValueList<PMVector>& points ) { if( m_points != points ) { @@ -253,7 +253,7 @@ void PMSurfaceOfRevolution::setPoints( const QValueList<PMVector>& points ) } } -PMDialogEditBase* PMSurfaceOfRevolution::editWidget( QWidget* parent ) const +PMDialogEditBase* PMSurfaceOfRevolution::editWidget( TQWidget* parent ) const { return new PMSurfaceOfRevolutionEdit( parent ); } @@ -330,8 +330,8 @@ void PMSurfaceOfRevolution::createViewStructure( ) // calculate the spline segments - QValueList<PMSorSegment> segments; - QValueList<PMVector>::Iterator it1, it2, it3, it4; + TQValueList<PMSorSegment> segments; + TQValueList<PMVector>::Iterator it1, it2, it3, it4; it1 = m_points.begin( ); it2 = it1; ++it2; it3 = it2; ++it3; @@ -364,7 +364,7 @@ void PMSurfaceOfRevolution::createViewStructure( ) // calculate the points PMVector point2, point3; - QValueList<PMSorSegment>::Iterator sit = segments.begin( ); + TQValueList<PMSorSegment>::Iterator sit = segments.begin( ); double poffset = 1.0 / sSteps; PMMatrix rot = PMMatrix::rotation( 0.0, M_PI * 2.0 / rSteps, 0.0 ); @@ -408,8 +408,8 @@ void PMSurfaceOfRevolution::createViewStructure( ) void PMSurfaceOfRevolution::controlPoints( PMControlPointList& list ) { - QValueList<PMVector>::Iterator it; - QPtrList<PMSorControlPoint> tmp1, tmp2; + TQValueList<PMVector>::Iterator it; + TQPtrList<PMSorControlPoint> tmp1, tmp2; int i; PMSorControlPoint* cp = 0; @@ -436,7 +436,7 @@ void PMSurfaceOfRevolution::controlPoints( PMControlPointList& list ) tmp2.append( cp ); } - QPtrListIterator<PMSorControlPoint> cit1( tmp1 ), cit2( tmp2 ); + TQPtrListIterator<PMSorControlPoint> cit1( tmp1 ), cit2( tmp2 ); for( ; cit1.current( ) && cit2.current( ); ++cit1, ++cit2 ) { @@ -452,7 +452,7 @@ void PMSurfaceOfRevolution::controlPoints( PMControlPointList& list ) void PMSurfaceOfRevolution::controlPointsChanged( PMControlPointList& list ) { PMControlPointListIterator it1( list ), it2( list ); - QValueList<PMVector>::Iterator pit = m_points.begin( ); + TQValueList<PMVector>::Iterator pit = m_points.begin( ); PMSorControlPoint* p1; PMSorControlPoint* p2; bool firstChange = true; @@ -509,7 +509,7 @@ void PMSurfaceOfRevolution::controlPointsChanged( PMControlPointList& list ) } if( ( pnr == ( num - 1 ) ) || ( pnr == 2 ) ) { - QValueList<PMVector>::Iterator hit = pit; + TQValueList<PMVector>::Iterator hit = pit; --hit; --hit; if( approxZero( ( *hit )[1] - ( *pit )[1], c_sorTolerance ) ) @@ -525,7 +525,7 @@ void PMSurfaceOfRevolution::controlPointsChanged( PMControlPointList& list ) } void PMSurfaceOfRevolution::addObjectActions( const PMControlPointList& /*cp*/, - QPtrList<PMObjectAction>& actions ) + TQPtrList<PMObjectAction>& actions ) { PMObjectAction* a; @@ -544,7 +544,7 @@ void PMSurfaceOfRevolution::addObjectActions( const PMControlPointList& /*cp*/, void PMSurfaceOfRevolution::objectActionCalled( const PMObjectAction* action, const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { if( action->objectType( ) == s_pMetaObject ) @@ -567,7 +567,7 @@ void PMSurfaceOfRevolution::objectActionCalled( const PMObjectAction* action, } void PMSurfaceOfRevolution::splitSegment( const PMControlPointList& /*cp*/, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { // find nearest segment @@ -577,8 +577,8 @@ void PMSurfaceOfRevolution::splitSegment( const PMControlPointList& /*cp*/, int i, j; PMVector mid( 3 ), dist( 2 ); - QPtrListIterator<PMVector> it1( cpViewPosition ); - QPtrListIterator<PMVector> it2( cpViewPosition ); + TQPtrListIterator<PMVector> it1( cpViewPosition ); + TQPtrListIterator<PMVector> it2( cpViewPosition ); ++it2; for( j = 0; j < 2; ++j ) @@ -608,10 +608,10 @@ void PMSurfaceOfRevolution::splitSegment( const PMControlPointList& /*cp*/, } // add a new segment - QValueList<PMVector> newPoints = m_points; - QValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns ); + TQValueList<PMVector> newPoints = m_points; + TQValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns ); PMVector p[4]; - QValueList<PMVector>::Iterator hit = it; + TQValueList<PMVector>::Iterator hit = it; // calculate the spline segment --hit; @@ -635,7 +635,7 @@ void PMSurfaceOfRevolution::splitSegment( const PMControlPointList& /*cp*/, } void PMSurfaceOfRevolution::joinSegments( const PMControlPointList& /*cp*/, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { // find nearest point @@ -653,7 +653,7 @@ void PMSurfaceOfRevolution::joinSegments( const PMControlPointList& /*cp*/, PMVector* p; PMVector dist( 2 ); - QPtrListIterator<PMVector> it1( cpViewPosition ); + TQPtrListIterator<PMVector> it1( cpViewPosition ); for( j = 0; j < 2; ++j ) { @@ -675,8 +675,8 @@ void PMSurfaceOfRevolution::joinSegments( const PMControlPointList& /*cp*/, } // join two segments - QValueList<PMVector> newPoints = m_points; - QValueList<PMVector>::Iterator it; + TQValueList<PMVector> newPoints = m_points; + TQValueList<PMVector>::Iterator it; // never remove the first or last point if( ns == 0 ) diff --git a/kpovmodeler/pmsor.h b/kpovmodeler/pmsor.h index c15b305d..46db677e 100644 --- a/kpovmodeler/pmsor.h +++ b/kpovmodeler/pmsor.h @@ -27,8 +27,8 @@ #include "pmsolidobject.h" #include "pmvector.h" #include "pmsorcontrolpoint.h" -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> #include <math.h> class PMViewStructure; @@ -57,7 +57,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMSurfaceOfRevolution( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -65,18 +65,18 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMSurfaceOfRevolutionEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmsor" ); } + virtual TQString pixmap( ) const { return TQString( "pmsor" ); } /** */ virtual void createMemento( ); @@ -92,21 +92,21 @@ public: virtual bool hasDisplayDetail( ) const { return true; } /** */ virtual void addObjectActions( const PMControlPointList&, - QPtrList<PMObjectAction>& ); + TQPtrList<PMObjectAction>& ); /** */ virtual void objectActionCalled( const PMObjectAction*, const PMControlPointList&, - const QPtrList<PMVector>&, + const TQPtrList<PMVector>&, const PMVector& ); /** * Returns the sor points */ - QValueList<PMVector> points( ) const { return m_points; } + TQValueList<PMVector> points( ) const { return m_points; } /** * Sets the spline points */ - void setPoints( const QValueList<PMVector>& points ); + void setPoints( const TQValueList<PMVector>& points ); /** * Returns the number of spline points */ @@ -156,17 +156,17 @@ private: * Object action. Adds a spline point */ void splitSegment( const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ); /** * Object action. Removes a spline point */ void joinSegments( const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ); - void stringToValues( const QString& str ); - QString valuesToString( ) const; + void stringToValues( const TQString& str ); + TQString valuesToString( ) const; /** * IDs for @ref PMMementoData @@ -177,7 +177,7 @@ private: */ enum PMSurfaceOfRevolutionActionID { PMSplitSegmentID, PMJoinSegmentsID }; - QValueList<PMVector> m_points; + TQValueList<PMVector> m_points; bool m_sturm; bool m_open; diff --git a/kpovmodeler/pmsorcontrolpoint.cpp b/kpovmodeler/pmsorcontrolpoint.cpp index 88924d05..373d0138 100644 --- a/kpovmodeler/pmsorcontrolpoint.cpp +++ b/kpovmodeler/pmsorcontrolpoint.cpp @@ -22,7 +22,7 @@ PMSorControlPoint::PMSorControlPoint( PMSorControlPoint* prev, const PMVector& point, PMSorControlPoint::CPType type, int id, - const QString& description ) + const TQString& description ) : PMControlPoint( id, description ) { m_point = point; diff --git a/kpovmodeler/pmsorcontrolpoint.h b/kpovmodeler/pmsorcontrolpoint.h index 0d9ec283..f25ddde5 100644 --- a/kpovmodeler/pmsorcontrolpoint.h +++ b/kpovmodeler/pmsorcontrolpoint.h @@ -42,7 +42,7 @@ public: */ PMSorControlPoint( PMSorControlPoint* prev, const PMVector& point, CPType type, - int id, const QString& description ); + int id, const TQString& description ); /** * Deletes the PMSorControlPoint */ diff --git a/kpovmodeler/pmsoredit.cpp b/kpovmodeler/pmsoredit.cpp index b56949e6..127015df 100644 --- a/kpovmodeler/pmsoredit.cpp +++ b/kpovmodeler/pmsoredit.cpp @@ -21,18 +21,18 @@ #include "pmvectorlistedit.h" #include "pmpart.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kdialog.h> #include <kiconloader.h> #include <kmessagebox.h> -PMSurfaceOfRevolutionEdit::PMSurfaceOfRevolutionEdit( QWidget* parent, const char* name ) +PMSurfaceOfRevolutionEdit::PMSurfaceOfRevolutionEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -40,37 +40,37 @@ PMSurfaceOfRevolutionEdit::PMSurfaceOfRevolutionEdit( QWidget* parent, const cha void PMSurfaceOfRevolutionEdit::createBottomWidgets( ) { - topLayout( )->addWidget( new QLabel( i18n( "Spline points:" ), this ) ); + topLayout( )->addWidget( new TQLabel( i18n( "Spline points:" ), this ) ); m_pPoints = new PMVectorListEdit( "u", "v", this ); - connect( m_pPoints, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPoints, SIGNAL( selectionChanged( ) ), - SLOT( slotSelectionChanged( ) ) ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); + connect( m_pPoints, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPoints, TQT_SIGNAL( selectionChanged( ) ), + TQT_SLOT( slotSelectionChanged( ) ) ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); hl->addWidget( m_pPoints, 2 ); - m_pAddAbove = new QPushButton( this ); + m_pAddAbove = new TQPushButton( this ); m_pAddAbove->setPixmap( SmallIcon( "pmaddpointabove" ) ); - m_pAddBelow = new QPushButton( this ); + m_pAddBelow = new TQPushButton( this ); m_pAddBelow->setPixmap( SmallIcon( "pmaddpoint" ) ); - m_pRemove = new QPushButton( this ); + m_pRemove = new TQPushButton( this ); m_pRemove->setPixmap( SmallIcon( "pmremovepoint" ) ); - connect( m_pAddAbove, SIGNAL( clicked( ) ), SLOT( slotAddPointAbove( ) ) ); - connect( m_pAddBelow, SIGNAL( clicked( ) ), SLOT( slotAddPointBelow( ) ) ); - connect( m_pRemove, SIGNAL( clicked( ) ), SLOT( slotRemovePoint( ) ) ); + connect( m_pAddAbove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointAbove( ) ) ); + connect( m_pAddBelow, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointBelow( ) ) ); + connect( m_pRemove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemovePoint( ) ) ); - QVBoxLayout* bl = new QVBoxLayout( hl ); + TQVBoxLayout* bl = new TQVBoxLayout( hl ); bl->addWidget( m_pAddAbove ); bl->addWidget( m_pAddBelow ); bl->addWidget( m_pRemove ); bl->addStretch( 1 ); - m_pOpen = new QCheckBox( i18n( "type of the object", "Open" ), this ); + m_pOpen = new TQCheckBox( i18n( "type of the object", "Open" ), this ); topLayout( )->addWidget( m_pOpen ); - connect( m_pOpen, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - m_pSturm = new QCheckBox( i18n( "Sturm" ), this ); + connect( m_pOpen, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + m_pSturm = new TQCheckBox( i18n( "Sturm" ), this ); topLayout( )->addWidget( m_pSturm ); - connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); Base::createBottomWidgets( ); } @@ -146,10 +146,10 @@ bool PMSurfaceOfRevolutionEdit::isDataValid( ) return false; } - QValueList<PMVector> points = m_pPoints->vectors( ); - QValueListIterator<PMVector> it1 = points.begin( ); - QValueListIterator<PMVector> it2 = it1; ++it2; - QValueListIterator<PMVector> it3 = it2; ++it3; + TQValueList<PMVector> points = m_pPoints->vectors( ); + TQValueListIterator<PMVector> it1 = points.begin( ); + TQValueListIterator<PMVector> it2 = it1; ++it2; + TQValueListIterator<PMVector> it3 = it2; ++it3; int pnr; for( pnr = 0; it3 != points.end( ); ++it1, ++it2, ++it3, pnr++ ) @@ -186,12 +186,12 @@ void PMSurfaceOfRevolutionEdit::slotAddPointAbove( ) int index = m_pPoints->currentRow( ); if( index >= 0 ) { - QValueList<PMVector> points = m_pPoints->vectors( ); - QValueListIterator<PMVector> it = points.at( index ); + TQValueList<PMVector> points = m_pPoints->vectors( ); + TQValueListIterator<PMVector> it = points.at( index ); if( it != points.end( ) ) { - QValueListIterator<PMVector> it2 = it; + TQValueListIterator<PMVector> it2 = it; it2--; PMVector v; if( it2 == points.end( ) ) @@ -212,12 +212,12 @@ void PMSurfaceOfRevolutionEdit::slotAddPointBelow( ) int index = m_pPoints->currentRow( ); if( index >= 0 ) { - QValueList<PMVector> points = m_pPoints->vectors( ); - QValueListIterator<PMVector> it = points.at( index ); + TQValueList<PMVector> points = m_pPoints->vectors( ); + TQValueListIterator<PMVector> it = points.at( index ); if( it != points.end( ) ) { - QValueListIterator<PMVector> it2 = it; + TQValueListIterator<PMVector> it2 = it; it2++; PMVector v; if( it2 == points.end( ) ) @@ -240,8 +240,8 @@ void PMSurfaceOfRevolutionEdit::slotRemovePoint( ) if( row >= 0 ) { - QValueList<PMVector> points = m_pPoints->vectors( ); - QValueListIterator<PMVector> it = points.at( row ); + TQValueList<PMVector> points = m_pPoints->vectors( ); + TQValueListIterator<PMVector> it = points.at( row ); if( it != points.end( ) && points.size( ) > 1 ) { diff --git a/kpovmodeler/pmsoredit.h b/kpovmodeler/pmsoredit.h index eb64be67..1c7c57fd 100644 --- a/kpovmodeler/pmsoredit.h +++ b/kpovmodeler/pmsoredit.h @@ -26,15 +26,15 @@ #include "pmsolidobjectedit.h" #include "pmvectoredit.h" -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> class PMSurfaceOfRevolution; -class QVBoxLayout; -class QComboBox; -class QCheckBox; -class QPushButton; -class QLabel; +class TQVBoxLayout; +class TQComboBox; +class TQCheckBox; +class TQPushButton; +class TQLabel; class PMVectorListEdit; /** @@ -48,7 +48,7 @@ public: /** * Creates a PMSurfaceOfRevolutionEdit with parent and name */ - PMSurfaceOfRevolutionEdit( QWidget* parent, const char* name = 0 ); + PMSurfaceOfRevolutionEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -75,11 +75,11 @@ private: PMSurfaceOfRevolution* m_pDisplayedObject; PMVectorListEdit* m_pPoints; - QCheckBox* m_pOpen; - QCheckBox* m_pSturm; - QPushButton* m_pAddAbove; - QPushButton* m_pAddBelow; - QPushButton* m_pRemove; + TQCheckBox* m_pOpen; + TQCheckBox* m_pSturm; + TQPushButton* m_pAddAbove; + TQPushButton* m_pAddBelow; + TQPushButton* m_pRemove; }; diff --git a/kpovmodeler/pmsphere.cpp b/kpovmodeler/pmsphere.cpp index 698b5352..cca385c9 100644 --- a/kpovmodeler/pmsphere.cpp +++ b/kpovmodeler/pmsphere.cpp @@ -66,7 +66,7 @@ PMSphere::~PMSphere( ) } -QString PMSphere::description( ) const +TQString PMSphere::description( ) const { return i18n( "sphere" ); } @@ -85,7 +85,7 @@ PMMetaObject* PMSphere::metaObject( ) const return s_pMetaObject; } -void PMSphere::serialize( QDomElement& e, QDomDocument& doc ) const +void PMSphere::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "centre", m_centre.serializeXML( ) ); e.setAttribute( "radius", m_radius ); @@ -99,7 +99,7 @@ void PMSphere::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMSphere::editWidget( QWidget* parent ) const +PMDialogEditBase* PMSphere::editWidget( TQWidget* parent ) const { return new PMSphereEdit( parent ); diff --git a/kpovmodeler/pmsphere.h b/kpovmodeler/pmsphere.h index 876fd103..984bc6d6 100644 --- a/kpovmodeler/pmsphere.h +++ b/kpovmodeler/pmsphere.h @@ -54,24 +54,24 @@ public: /** */ virtual PMObject* copy( ) const { return new PMSphere( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMSphereEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmsphere" ); } + virtual TQString pixmap( ) const { return TQString( "pmsphere" ); } /** * Returns the centre of the sphere diff --git a/kpovmodeler/pmsphereedit.cpp b/kpovmodeler/pmsphereedit.cpp index cb46d513..c12f95bd 100644 --- a/kpovmodeler/pmsphereedit.cpp +++ b/kpovmodeler/pmsphereedit.cpp @@ -22,11 +22,11 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMSphereEdit::PMSphereEdit( QWidget* parent, const char* name ) +PMSphereEdit::PMSphereEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -36,22 +36,22 @@ void PMSphereEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* layout; + TQHBoxLayout* layout; m_pCentre = new PMVectorEdit( "x", "y", "z", this ); m_pRadius = new PMFloatEdit( this ); - layout = new QHBoxLayout( topLayout( ) ); - layout->addWidget( new QLabel( i18n( "Center:" ), this ) ); + layout = new TQHBoxLayout( topLayout( ) ); + layout->addWidget( new TQLabel( i18n( "Center:" ), this ) ); layout->addWidget( m_pCentre ); - layout = new QHBoxLayout( topLayout( ) ); - layout->addWidget( new QLabel( i18n( "Radius:" ), this ) ); + layout = new TQHBoxLayout( topLayout( ) ); + layout->addWidget( new TQLabel( i18n( "Radius:" ), this ) ); layout->addWidget( m_pRadius ); layout->addStretch( 1 ); - connect( m_pCentre, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pCentre, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMSphereEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmsphereedit.h b/kpovmodeler/pmsphereedit.h index 9cd64d86..b885b9ac 100644 --- a/kpovmodeler/pmsphereedit.h +++ b/kpovmodeler/pmsphereedit.h @@ -41,7 +41,7 @@ public: /** * Creates a PMSphereEdit with parent and name */ - PMSphereEdit( QWidget* parent, const char* name = 0 ); + PMSphereEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmspheresweep.cpp b/kpovmodeler/pmspheresweep.cpp index f65a029e..b19ef173 100644 --- a/kpovmodeler/pmspheresweep.cpp +++ b/kpovmodeler/pmspheresweep.cpp @@ -83,17 +83,17 @@ public: /** * Saves the radii */ - void setRadii( const QValueList<double>& r ) + void setRadii( const TQValueList<double>& r ) { if( !m_bRadiiSaved ) { // Direct assignment does not work with Qt 2.3.x // The list will be changed later in a graphical - // change because QValueList::detach( ) is called + // change because TQValueList::detach( ) is called // too late! // Copy the list by hand. - QValueList<double>::ConstIterator it = r.begin( ); + TQValueList<double>::ConstIterator it = r.begin( ); for( ; it != r.end( ); ++it ) m_radii.append( *it ); @@ -104,7 +104,7 @@ public: /** * Returns the radii */ - QValueList<double> radii( ) const + TQValueList<double> radii( ) const { if( !m_bRadiiSaved ) kdError( PMArea ) << "Radii points not saved in PMSphereSweepMemento::radii\n"; @@ -119,7 +119,7 @@ private: /** * The stored radii */ - QValueList<double> m_radii; + TQValueList<double> m_radii; bool m_bRadiiSaved; }; @@ -151,21 +151,21 @@ PMSphereSweep::~PMSphereSweep( ) { } -QString PMSphereSweep::description( ) const +TQString PMSphereSweep::description( ) const { return i18n( "sphere sweep" ); } -void PMSphereSweep::serialize( QDomElement& e, QDomDocument& doc ) const +void PMSphereSweep::serialize( TQDomElement& e, TQDomDocument& doc ) const { - QDomElement data = doc.createElement( "extra_data" ); - QDomElement p; + TQDomElement data = doc.createElement( "extra_data" ); + TQDomElement p; e.setAttribute( "spline_type", m_splineType ); e.setAttribute( "tolerance", m_tolerance ); - QValueList<PMVector>::ConstIterator it; - QValueList<double>::ConstIterator it2; + TQValueList<PMVector>::ConstIterator it; + TQValueList<double>::ConstIterator it2; for( it = m_points.begin( ), it2 = m_radii.begin( ); it != m_points.end( ) && it2 != m_radii.end( ); ++it, ++it2 ) { @@ -188,23 +188,23 @@ void PMSphereSweep::readAttributes( const PMXMLHelper& h ) m_radii.clear( ); PMVector v( 3 ); - QDomElement e = h.extraData( ); + TQDomElement e = h.extraData( ); if( !e.isNull( ) ) { - QDomNode c = e.firstChild( ); + TQDomNode c = e.firstChild( ); while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); if( ce.tagName( ) == "point" ) { - QString str = ce.attribute( "vector" ); + TQString str = ce.attribute( "vector" ); if( !str.isNull( ) ) { v.loadXML( str ); m_points.append( v ); - QString str = ce.attribute( "radius" ); + TQString str = ce.attribute( "radius" ); m_radii.append( str.toDouble( ) ); } } @@ -266,7 +266,7 @@ void PMSphereSweep::setTolerance( double t ) } } -void PMSphereSweep::setPoints( const QValueList<PMVector>& points ) +void PMSphereSweep::setPoints( const TQValueList<PMVector>& points ) { if( m_points != points ) { @@ -278,7 +278,7 @@ void PMSphereSweep::setPoints( const QValueList<PMVector>& points ) } } -void PMSphereSweep::setRadii( const QValueList<double>& radii ) +void PMSphereSweep::setRadii( const TQValueList<double>& radii ) { if( m_radii != radii ) { @@ -290,7 +290,7 @@ void PMSphereSweep::setRadii( const QValueList<double>& radii ) } } -PMDialogEditBase* PMSphereSweep::editWidget( QWidget* parent ) const +PMDialogEditBase* PMSphereSweep::editWidget( TQWidget* parent ) const { return new PMSphereSweepEdit( parent ); } @@ -426,8 +426,8 @@ void PMSphereSweep::createViewStructure( ) void PMSphereSweep::controlPoints( PMControlPointList& list ) { - QValueList<PMVector>::Iterator it; - QValueList<double>::Iterator it2; + TQValueList<PMVector>::Iterator it; + TQValueList<double>::Iterator it2; int i, nr; for( it = m_points.begin( ), it2 = m_radii.begin( ), nr = 1, i = 0; @@ -454,8 +454,8 @@ void PMSphereSweep::controlPoints( PMControlPointList& list ) void PMSphereSweep::controlPointsChanged( PMControlPointList& list ) { PMControlPointListIterator it1( list ); - QValueList<PMVector>::Iterator pit = m_points.begin( ); - QValueList<double>::Iterator rit = m_radii.begin( ); + TQValueList<PMVector>::Iterator pit = m_points.begin( ); + TQValueList<double>::Iterator rit = m_radii.begin( ); int i; PM3DControlPoint* p; PMDistanceControlPoint* r; @@ -513,7 +513,7 @@ void PMSphereSweep::controlPointsChanged( PMControlPointList& list ) } void PMSphereSweep::addObjectActions( const PMControlPointList& /*cp*/, - QPtrList<PMObjectAction>& actions ) + TQPtrList<PMObjectAction>& actions ) { PMObjectAction* a; @@ -545,7 +545,7 @@ void PMSphereSweep::addObjectActions( const PMControlPointList& /*cp*/, void PMSphereSweep::objectActionCalled( const PMObjectAction* action, const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { if( action->objectType( ) == s_pMetaObject ) @@ -568,7 +568,7 @@ void PMSphereSweep::objectActionCalled( const PMObjectAction* action, } void PMSphereSweep::splitSegment( const PMControlPointList& /*cp*/, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { // find nearest segment @@ -578,8 +578,8 @@ void PMSphereSweep::splitSegment( const PMControlPointList& /*cp*/, int i, j; PMVector mid( 3 ), dist( 2 ); - QPtrListIterator<PMVector> it1( cpViewPosition ); - QPtrListIterator<PMVector> it2( cpViewPosition ); + TQPtrListIterator<PMVector> it1( cpViewPosition ); + TQPtrListIterator<PMVector> it2( cpViewPosition ); ++it2; for( i = 0; i < nump; i++ ) @@ -618,17 +618,17 @@ void PMSphereSweep::splitSegment( const PMControlPointList& /*cp*/, } // add a new segment - QValueList<PMVector> newPoints = m_points; - QValueList<double> newRadii = m_radii; + TQValueList<PMVector> newPoints = m_points; + TQValueList<double> newRadii = m_radii; - QValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns ); - QValueList<PMVector>::Iterator hit = it; + TQValueList<PMVector>::Iterator it = newPoints.at( ( unsigned ) ns ); + TQValueList<PMVector>::Iterator hit = it; ++it; mid = ( *it + *hit ) / 2; newPoints.insert( it, mid ); - QValueList<double>::Iterator rit = newRadii.at( ( unsigned ) ns ); - QValueList<double>::Iterator rhit = rit; + TQValueList<double>::Iterator rit = newRadii.at( ( unsigned ) ns ); + TQValueList<double>::Iterator rhit = rit; ++rit; newRadii.insert( rit, ( *rit + *rhit ) / 2 ); @@ -637,7 +637,7 @@ void PMSphereSweep::splitSegment( const PMControlPointList& /*cp*/, } void PMSphereSweep::joinSegments( const PMControlPointList& /*cp*/, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ) { // find nearest point @@ -667,7 +667,7 @@ void PMSphereSweep::joinSegments( const PMControlPointList& /*cp*/, PMVector* p; PMVector dist( 2 ); - QPtrListIterator<PMVector> it1( cpViewPosition ); + TQPtrListIterator<PMVector> it1( cpViewPosition ); for( i = 0; i < nump; i++ ) { @@ -687,10 +687,10 @@ void PMSphereSweep::joinSegments( const PMControlPointList& /*cp*/, } // join two segments - QValueList<PMVector> newPoints = m_points; - QValueList<PMVector>::Iterator it; - QValueList<double> newRadii = m_radii; - QValueList<double>::Iterator rit; + TQValueList<PMVector> newPoints = m_points; + TQValueList<PMVector>::Iterator it; + TQValueList<double> newRadii = m_radii; + TQValueList<double>::Iterator rit; // never remove the first or last point if( ns == 0 ) diff --git a/kpovmodeler/pmspheresweep.h b/kpovmodeler/pmspheresweep.h index 281db0c3..b28d69a5 100644 --- a/kpovmodeler/pmspheresweep.h +++ b/kpovmodeler/pmspheresweep.h @@ -26,8 +26,8 @@ #include "pmsolidobject.h" #include "pmvector.h" -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> #include <math.h> class PMViewStructure; @@ -60,7 +60,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMSphereSweep( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -68,18 +68,18 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMSphereSweepEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmspheresweep" ); } + virtual TQString pixmap( ) const { return TQString( "pmspheresweep" ); } /** */ virtual void createMemento( ); @@ -93,29 +93,29 @@ public: virtual bool hasDisplayDetail( ) const { return true; } /** */ virtual void addObjectActions( const PMControlPointList&, - QPtrList<PMObjectAction>& ); + TQPtrList<PMObjectAction>& ); /** */ virtual void objectActionCalled( const PMObjectAction*, const PMControlPointList&, - const QPtrList<PMVector>&, + const TQPtrList<PMVector>&, const PMVector& ); /** * Returns the spline points */ - QValueList<PMVector> points( ) const { return m_points; } + TQValueList<PMVector> points( ) const { return m_points; } /** * Sets the spline points */ - void setPoints( const QValueList<PMVector>& points ); + void setPoints( const TQValueList<PMVector>& points ); /** * Returns the radii */ - QValueList<double> radii( ) const { return m_radii; } + TQValueList<double> radii( ) const { return m_radii; } /** * Sets the radii */ - void setRadii( const QValueList<double>& radii ); + void setRadii( const TQValueList<double>& radii ); /** * Returns the number of spline points */ @@ -165,17 +165,17 @@ private: * Object action. Adds a spline point */ void splitSegment( const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ); /** * Object action. Removes a spline point */ void joinSegments( const PMControlPointList& cp, - const QPtrList<PMVector>& cpViewPosition, + const TQPtrList<PMVector>& cpViewPosition, const PMVector& clickPosition ); - void stringToValues( const QString& str ); - QString valuesToString( ) const; + void stringToValues( const TQString& str ); + TQString valuesToString( ) const; /** * IDs for @ref PMMementoData @@ -186,8 +186,8 @@ private: */ enum PMSphereSweepActionID { PMSplitSegmentID, PMJoinSegmentsID }; SplineType m_splineType; - QValueList<PMVector> m_points; - QValueList<double> m_radii; + TQValueList<PMVector> m_points; + TQValueList<double> m_radii; double m_tolerance; static int s_rSteps; @@ -201,12 +201,12 @@ private: * creating view structure */ struct Segment{ - QValueList<PMVector> points; - QValueList<double> radii; - QValueList<PMVector> direction; + TQValueList<PMVector> points; + TQValueList<double> radii; + TQValueList<PMVector> direction; }; - QValueList<Segment> m_segments; + TQValueList<Segment> m_segments; int m_nextPoint; int m_nextLine; /** diff --git a/kpovmodeler/pmspheresweepedit.cpp b/kpovmodeler/pmspheresweepedit.cpp index 582a0e80..9798a304 100644 --- a/kpovmodeler/pmspheresweepedit.cpp +++ b/kpovmodeler/pmspheresweepedit.cpp @@ -23,18 +23,18 @@ #include "pmvectorlistedit.h" #include "pmpart.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qtooltip.h> -#include <qcombobox.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqtooltip.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kdialog.h> #include <kiconloader.h> #include <kmessagebox.h> -PMSphereSweepEdit::PMSphereSweepEdit( QWidget* parent, const char* name ) +PMSphereSweepEdit::PMSphereSweepEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -44,52 +44,52 @@ void PMSphereSweepEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Spline type:" ), this ) ); - m_pSplineType = new QComboBox( false, this ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Spline type:" ), this ) ); + m_pSplineType = new TQComboBox( false, this ); m_pSplineType->insertItem( i18n( "Linear Spline" ) ); m_pSplineType->insertItem( i18n( "B-Spline" ) ); m_pSplineType->insertItem( i18n( "Cubic Spline" ) ); hl->addWidget( m_pSplineType ); hl->addStretch( 1 ); - connect( m_pSplineType, SIGNAL( activated( int ) ), - SLOT( slotTypeChanged( int ) ) ); + connect( m_pSplineType, TQT_SIGNAL( activated( int ) ), + TQT_SLOT( slotTypeChanged( int ) ) ); } void PMSphereSweepEdit::createBottomWidgets( ) { - topLayout( )->addWidget( new QLabel( i18n( "Spheres:" ), this ) ); + topLayout( )->addWidget( new TQLabel( i18n( "Spheres:" ), this ) ); m_pPoints = new PMVectorListEdit( "x", "y", "z", "r", this ); - connect( m_pPoints, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pPoints, SIGNAL( selectionChanged( ) ), - SLOT( slotSelectionChanged( ) ) ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); + connect( m_pPoints, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pPoints, TQT_SIGNAL( selectionChanged( ) ), + TQT_SLOT( slotSelectionChanged( ) ) ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); hl->addWidget( m_pPoints, 2 ); - m_pAddAbove = new QPushButton( this ); + m_pAddAbove = new TQPushButton( this ); m_pAddAbove->setPixmap( SmallIcon( "pmaddpointabove" ) ); - m_pAddBelow = new QPushButton( this ); + m_pAddBelow = new TQPushButton( this ); m_pAddBelow->setPixmap( SmallIcon( "pmaddpoint" ) ); - m_pRemove = new QPushButton( this ); + m_pRemove = new TQPushButton( this ); m_pRemove->setPixmap( SmallIcon( "pmremovepoint" ) ); - connect( m_pAddAbove, SIGNAL( clicked( ) ), SLOT( slotAddPointAbove( ) ) ); - connect( m_pAddBelow, SIGNAL( clicked( ) ), SLOT( slotAddPointBelow( ) ) ); - connect( m_pRemove, SIGNAL( clicked( ) ), SLOT( slotRemovePoint( ) ) ); + connect( m_pAddAbove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointAbove( ) ) ); + connect( m_pAddBelow, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotAddPointBelow( ) ) ); + connect( m_pRemove, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotRemovePoint( ) ) ); - QVBoxLayout* bl = new QVBoxLayout( hl ); + TQVBoxLayout* bl = new TQVBoxLayout( hl ); bl->addWidget( m_pAddAbove ); bl->addWidget( m_pAddBelow ); bl->addWidget( m_pRemove ); bl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Tolerance" ), this ) ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Tolerance" ), this ) ); m_pTolerance = new PMFloatEdit( this ); m_pTolerance->setValidation( true, 0, false, 0 ); hl->addWidget( m_pTolerance ); - connect( m_pTolerance, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pTolerance, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); Base::createBottomWidgets( ); } @@ -118,10 +118,10 @@ void PMSphereSweepEdit::displayObject( PMObject* o ) m_pTolerance->setReadOnly( readOnly ); m_pPoints->setReadOnly( readOnly ); - QValueList<PMVector> points = m_pDisplayedObject->points( ); - QValueList<double> radii = m_pDisplayedObject->radii( ); - QValueListIterator<PMVector> pit = points.begin( ); - QValueListIterator<double> rit = radii.begin( ); + TQValueList<PMVector> points = m_pDisplayedObject->points( ); + TQValueList<double> radii = m_pDisplayedObject->radii( ); + TQValueListIterator<PMVector> pit = points.begin( ); + TQValueListIterator<double> rit = radii.begin( ); for( ; pit != points.end( ) && rit != radii.end( ); ++pit, ++rit ) { ( *pit ).resize( 4 ); @@ -170,9 +170,9 @@ void PMSphereSweepEdit::saveContents( ) { if( m_pDisplayedObject ) { - QValueList<PMVector> points = m_pPoints->vectors( ); - QValueList<double> radii; - QValueListIterator<PMVector> pit = points.begin( ); + TQValueList<PMVector> points = m_pPoints->vectors( ); + TQValueList<double> radii; + TQValueListIterator<PMVector> pit = points.begin( ); for( ; pit != points.end( ); ++pit ) { radii.append( ( *pit )[3] ); @@ -253,12 +253,12 @@ void PMSphereSweepEdit::slotAddPointAbove( ) int index = m_pPoints->currentRow( ); if( index >= 0 ) { - QValueList<PMVector> points = m_pPoints->vectors( ); - QValueListIterator<PMVector> it = points.at( index ); + TQValueList<PMVector> points = m_pPoints->vectors( ); + TQValueListIterator<PMVector> it = points.at( index ); if( it != points.end( ) ) { - QValueListIterator<PMVector> it2 = it; + TQValueListIterator<PMVector> it2 = it; it2--; PMVector v; if( it2 == points.end( ) ) @@ -280,12 +280,12 @@ void PMSphereSweepEdit::slotAddPointBelow( ) int index = m_pPoints->currentRow( ); if( index >= 0 ) { - QValueList<PMVector> points = m_pPoints->vectors( ); - QValueListIterator<PMVector> it = points.at( index ); + TQValueList<PMVector> points = m_pPoints->vectors( ); + TQValueListIterator<PMVector> it = points.at( index ); if( it != points.end( ) ) { - QValueListIterator<PMVector> it2 = it; + TQValueListIterator<PMVector> it2 = it; it2++; PMVector v; if( it2 == points.end( ) ) @@ -309,8 +309,8 @@ void PMSphereSweepEdit::slotRemovePoint( ) if( row >= 0 ) { - QValueList<PMVector> points = m_pPoints->vectors( ); - QValueListIterator<PMVector> it = points.at( row ); + TQValueList<PMVector> points = m_pPoints->vectors( ); + TQValueListIterator<PMVector> it = points.at( row ); if( it != points.end( ) && points.size( ) > 1 ) { diff --git a/kpovmodeler/pmspheresweepedit.h b/kpovmodeler/pmspheresweepedit.h index 58f89372..16d86246 100644 --- a/kpovmodeler/pmspheresweepedit.h +++ b/kpovmodeler/pmspheresweepedit.h @@ -26,17 +26,17 @@ #include "pmsolidobjectedit.h" #include "pmvectoredit.h" -#include <qptrlist.h> -#include <qvaluelist.h> +#include <tqptrlist.h> +#include <tqvaluelist.h> class PMSphereSweep; class PMVectorListEdit; class PMFloatEdit; -class QVBoxLayout; -class QComboBox; -class QCheckBox; -class QPushButton; -class QLabel; +class TQVBoxLayout; +class TQComboBox; +class TQCheckBox; +class TQPushButton; +class TQLabel; /** * Dialog edit class for @ref PMSphereSweep @@ -49,7 +49,7 @@ public: /** * Creates a PMSphereSweepEdit with parent and name */ - PMSphereSweepEdit( QWidget* parent, const char* name = 0 ); + PMSphereSweepEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -78,12 +78,12 @@ private: void updatePointButtons( ); PMSphereSweep* m_pDisplayedObject; - QComboBox* m_pSplineType; + TQComboBox* m_pSplineType; PMVectorListEdit* m_pPoints; PMFloatEdit* m_pTolerance; - QPushButton* m_pAddAbove; - QPushButton* m_pAddBelow; - QPushButton* m_pRemove; + TQPushButton* m_pAddAbove; + TQPushButton* m_pAddBelow; + TQPushButton* m_pRemove; }; diff --git a/kpovmodeler/pmsplinememento.cpp b/kpovmodeler/pmsplinememento.cpp index a197f8ea..7836fc7d 100644 --- a/kpovmodeler/pmsplinememento.cpp +++ b/kpovmodeler/pmsplinememento.cpp @@ -28,17 +28,17 @@ PMSplineMemento::~PMSplineMemento( ) { } -void PMSplineMemento::setSplinePoints( const QValueList<PMVector>& v ) +void PMSplineMemento::setSplinePoints( const TQValueList<PMVector>& v ) { if( !m_bSplinePointsSaved ) { // Direct assignment does not work with Qt 2.3.x // The list will be changed later in a graphical - // change because QValueList::detach( ) is called + // change because TQValueList::detach( ) is called // too late! // Copy the list by hand. - QValueList<PMVector>::ConstIterator it = v.begin( ); + TQValueList<PMVector>::ConstIterator it = v.begin( ); for( ; it != v.end( ); ++it ) m_splinePoints.append( *it ); @@ -47,7 +47,7 @@ void PMSplineMemento::setSplinePoints( const QValueList<PMVector>& v ) } } -QValueList<PMVector> PMSplineMemento::splinePoints( ) const +TQValueList<PMVector> PMSplineMemento::splinePoints( ) const { if( !m_bSplinePointsSaved ) kdError( PMArea ) << "Spline points not saved in PMSplineMemento::splinePoints\n"; diff --git a/kpovmodeler/pmsplinememento.h b/kpovmodeler/pmsplinememento.h index daa4a70b..4436e60c 100644 --- a/kpovmodeler/pmsplinememento.h +++ b/kpovmodeler/pmsplinememento.h @@ -26,7 +26,7 @@ #include "pmmemento.h" #include "pmvector.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> /** @@ -47,11 +47,11 @@ public: /** * Saves the spline points */ - void setSplinePoints( const QValueList<PMVector>& v ); + void setSplinePoints( const TQValueList<PMVector>& v ); /** * Returns the spline points */ - QValueList<PMVector> splinePoints( ) const; + TQValueList<PMVector> splinePoints( ) const; /** * Returns true if the spline points were saved */ @@ -61,7 +61,7 @@ private: /** * The stored points */ - QValueList<PMVector> m_splinePoints; + TQValueList<PMVector> m_splinePoints; bool m_bSplinePointsSaved; }; diff --git a/kpovmodeler/pmsplinesegment.h b/kpovmodeler/pmsplinesegment.h index 5e97ff49..c45b0a2e 100644 --- a/kpovmodeler/pmsplinesegment.h +++ b/kpovmodeler/pmsplinesegment.h @@ -25,7 +25,7 @@ #endif #include "pmvector.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> /** * Helper class for splines @@ -116,7 +116,7 @@ private: double m_a[2], m_b[2], m_c[2], m_d[2]; }; -typedef QValueList<PMSplineSegment> PMSegmentList; -typedef QValueList<PMSegmentList> PMSegmentListList; +typedef TQValueList<PMSplineSegment> PMSegmentList; +typedef TQValueList<PMSegmentList> PMSegmentListList; #endif diff --git a/kpovmodeler/pmsqe.cpp b/kpovmodeler/pmsqe.cpp index 051aac72..61279251 100644 --- a/kpovmodeler/pmsqe.cpp +++ b/kpovmodeler/pmsqe.cpp @@ -61,12 +61,12 @@ PMSuperquadricEllipsoid::~PMSuperquadricEllipsoid( ) { } -QString PMSuperquadricEllipsoid::description( ) const +TQString PMSuperquadricEllipsoid::description( ) const { return i18n( "superquadric ellipsoid" ); } -void PMSuperquadricEllipsoid::serialize( QDomElement& e, QDomDocument& doc ) const +void PMSuperquadricEllipsoid::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "value_e", m_eastWestExponent ); e.setAttribute( "value_n", m_northSouthExponent ); @@ -133,7 +133,7 @@ void PMSuperquadricEllipsoid::setNorthSouthExponent( double n ) } } -PMDialogEditBase* PMSuperquadricEllipsoid::editWidget( QWidget* parent ) const +PMDialogEditBase* PMSuperquadricEllipsoid::editWidget( TQWidget* parent ) const { return new PMSuperquadricEllipsoidEdit( parent ); } diff --git a/kpovmodeler/pmsqe.h b/kpovmodeler/pmsqe.h index e2d04c60..b73a95c3 100644 --- a/kpovmodeler/pmsqe.h +++ b/kpovmodeler/pmsqe.h @@ -55,24 +55,24 @@ public: /** */ virtual PMObject* copy( ) const { return new PMSuperquadricEllipsoid( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMSuperquadricEllipsoidEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmsqe" ); } + virtual TQString pixmap( ) const { return TQString( "pmsqe" ); } /** * Returns the east west exponent diff --git a/kpovmodeler/pmsqeedit.cpp b/kpovmodeler/pmsqeedit.cpp index 488ce2f2..377b552b 100644 --- a/kpovmodeler/pmsqeedit.cpp +++ b/kpovmodeler/pmsqeedit.cpp @@ -20,11 +20,11 @@ #include "pmsqe.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMSuperquadricEllipsoidEdit::PMSuperquadricEllipsoidEdit( QWidget* parent, const char* name ) +PMSuperquadricEllipsoidEdit::PMSuperquadricEllipsoidEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -39,18 +39,18 @@ void PMSuperquadricEllipsoidEdit::createTopWidgets( ) m_pValueN = new PMFloatEdit( this ); m_pValueN->setValidation( true, 0.01, false, 1.0 ); - topLayout( )->addWidget( new QLabel( i18n( "Exponents:" ), this ) ); + topLayout( )->addWidget( new TQLabel( i18n( "Exponents:" ), this ) ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - QGridLayout* gl = new QGridLayout( hl, 2, 2 ); - gl->addWidget( new QLabel( i18n( "East-west:" ), this ), 0, 0 ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + TQGridLayout* gl = new TQGridLayout( hl, 2, 2 ); + gl->addWidget( new TQLabel( i18n( "East-west:" ), this ), 0, 0 ); gl->addWidget( m_pValueE, 0, 1 ); - gl->addWidget( new QLabel( i18n( "North-south:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "North-south:" ), this ), 1, 0 ); gl->addWidget( m_pValueN, 1, 1 ); hl->addStretch( 1 ); - connect( m_pValueE, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pValueN, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pValueE, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pValueN, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMSuperquadricEllipsoidEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmsqeedit.h b/kpovmodeler/pmsqeedit.h index 45ae1a2f..99e87967 100644 --- a/kpovmodeler/pmsqeedit.h +++ b/kpovmodeler/pmsqeedit.h @@ -40,7 +40,7 @@ public: /** * Creates a PMSuperquadricEllipsoidEdit with parent and name */ - PMSuperquadricEllipsoidEdit( QWidget* parent, const char* name = 0 ); + PMSuperquadricEllipsoidEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmsymboltable.cpp b/kpovmodeler/pmsymboltable.cpp index bd1aab3b..e8a15c3d 100644 --- a/kpovmodeler/pmsymboltable.cpp +++ b/kpovmodeler/pmsymboltable.cpp @@ -21,7 +21,7 @@ #include <string.h> -PMSymbol::PMSymbol( const QString& id, PMDeclare* o ) +PMSymbol::PMSymbol( const TQString& id, PMDeclare* o ) { setId( id ); m_type = Object; @@ -30,7 +30,7 @@ PMSymbol::PMSymbol( const QString& id, PMDeclare* o ) m_pRenamedSymbol = 0; } -PMSymbol::PMSymbol( const QString& id, const PMValue& v ) +PMSymbol::PMSymbol( const TQString& id, const PMValue& v ) { setId( id ); m_type = Value; @@ -45,7 +45,7 @@ PMSymbol::~PMSymbol( ) delete m_pVal; } -void PMSymbol::setId( const QString& id ) +void PMSymbol::setId( const TQString& id ) { m_id = id.left( MaxIDLength ); } @@ -68,7 +68,7 @@ PMValue PMSymbol::value( ) const PMSymbolTable::PMSymbolTable( ) - : QDict<PMSymbol>( 1009 ), m_lastID( 47 ) + : TQDict<PMSymbol>( 1009 ), m_lastID( 47 ) { setAutoDelete( true ); m_lastID.setAutoDelete( true ); @@ -79,10 +79,10 @@ PMSymbolTable::~PMSymbolTable( ) clear( ); } -QString PMSymbolTable::findNewID( const QString& prefix ) +TQString PMSymbolTable::findNewID( const TQString& prefix ) { PMSymbol* symbol; - QString testID; + TQString testID; unsigned int number; int* lastNumber = m_lastID.find( prefix ); @@ -94,7 +94,7 @@ QString PMSymbolTable::findNewID( const QString& prefix ) // find next free id do { - testID = prefix + QString( "%1" ).arg( number ); + testID = prefix + TQString( "%1" ).arg( number ); symbol = find( testID ); if( symbol ) number++; @@ -109,9 +109,9 @@ QString PMSymbolTable::findNewID( const QString& prefix ) return testID; } -PMSymbol* PMSymbolTable::findNewID( const QString& prefix, PMDeclare* obj ) +PMSymbol* PMSymbolTable::findNewID( const TQString& prefix, PMDeclare* obj ) { - QString newID = findNewID( prefix ); + TQString newID = findNewID( prefix ); obj->setID( newID ); PMSymbol* s = new PMSymbol( newID, obj ); diff --git a/kpovmodeler/pmsymboltable.h b/kpovmodeler/pmsymboltable.h index 27e88785..481a2916 100644 --- a/kpovmodeler/pmsymboltable.h +++ b/kpovmodeler/pmsymboltable.h @@ -28,8 +28,8 @@ class PMObject; class PMDeclare; -#include <qdict.h> -#include <qstring.h> +#include <tqdict.h> +#include <tqstring.h> /** * Entry in a @ref PMSymbolTable. Can be a @ref PMValue or a @ref PMObject @@ -42,11 +42,11 @@ public: /** * Creates a entry for an object */ - PMSymbol( const QString& id, PMDeclare* o ); + PMSymbol( const TQString& id, PMDeclare* o ); /** * Creates a entry for a value */ - PMSymbol( const QString& id, const PMValue& v ); + PMSymbol( const TQString& id, const PMValue& v ); /** * Destructor */ @@ -59,11 +59,11 @@ public: /** * Returns the id of the symbol */ - QString id( ) const { return m_id; } + TQString id( ) const { return m_id; } /** * Sets the id */ - void setId( const QString& id ); + void setId( const TQString& id ); /** * Returns the stored object */ @@ -92,13 +92,13 @@ private: PMDeclare* m_pObj; PMSymbol* m_pRenamedSymbol; PMValue* m_pVal; - QString m_id; + TQString m_id; }; /** * Symbol table for povray #declare statements */ -class PMSymbolTable : public QDict<PMSymbol> +class PMSymbolTable : public TQDict<PMSymbol> { public: /** @@ -112,7 +112,7 @@ public: /** * Returns a free id with prefix prefix and a number as suffix */ - QString findNewID( const QString& prefix ); + TQString findNewID( const TQString& prefix ); /** * Returns a free id with prefix prefix and a number as suffix and assigns * it to the object. @@ -120,9 +120,9 @@ public: * Does NOT add the object to the symbol table. * * Returns the new symbol.*/ - PMSymbol* findNewID( const QString& prefix, PMDeclare* obj ); + PMSymbol* findNewID( const TQString& prefix, PMDeclare* obj ); private: - QDict<int> m_lastID; + TQDict<int> m_lastID; }; #endif diff --git a/kpovmodeler/pmtext.cpp b/kpovmodeler/pmtext.cpp index 21191cbc..9410228d 100644 --- a/kpovmodeler/pmtext.cpp +++ b/kpovmodeler/pmtext.cpp @@ -28,8 +28,8 @@ #include <klocale.h> -const QString c_defaultFont = QString( "" ); -const QString c_defaultText = QString( "" ); +const TQString c_defaultFont = TQString( "" ); +const TQString c_defaultText = TQString( "" ); const double c_defaultThickness = 1.0; const PMVector c_defaultOffset = PMVector( 0.0, 0.0 ); @@ -66,12 +66,12 @@ PMText::~PMText( ) { } -QString PMText::description( ) const +TQString PMText::description( ) const { return i18n( "text" ); } -void PMText::serialize( QDomElement& e, QDomDocument& doc ) const +void PMText::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "font", m_font ); e.setAttribute( "text", m_text ); @@ -117,7 +117,7 @@ void PMText::cleanUp( ) const Base::cleanUp( ); } -void PMText::setFont( const QString& f ) +void PMText::setFont( const TQString& f ) { if( f != m_font ) { @@ -128,7 +128,7 @@ void PMText::setFont( const QString& f ) } } -void PMText::setText( const QString& t ) +void PMText::setText( const TQString& t ) { if( t != m_text ) { @@ -162,7 +162,7 @@ void PMText::setOffset( const PMVector& o ) } } -PMDialogEditBase* PMText::editWidget( QWidget* parent ) const +PMDialogEditBase* PMText::editWidget( TQWidget* parent ) const { return new PMTextEdit( parent ); } @@ -205,13 +205,13 @@ void PMText::createViewStructure( ) // calculate needed points and lines int nlines = 0, npoints = 0; - QString file = PMResourceLocator::findFile( m_font ); + TQString file = PMResourceLocator::findFile( m_font ); PMTrueTypeFont* font = PMTrueTypeCache::font( file ); if( font && font->isValid( ) ) { - QTextStream str( &m_text, IO_ReadOnly ); - QChar c; + TQTextStream str( &m_text, IO_ReadOnly ); + TQChar c; PMTrueTypeOutline* ol; while( !str.atEnd( ) ) @@ -239,8 +239,8 @@ void PMText::createViewStructure( ) if( ( nlines > 0 ) && ( npoints > 0 ) && font ) { // create the view structure - QTextStream str( &m_text, IO_ReadOnly ); - QChar c, oldc; + TQTextStream str( &m_text, IO_ReadOnly ); + TQChar c, oldc; PMTrueTypeOutline* ol; double dp = 1.0 / s_steps; int i; diff --git a/kpovmodeler/pmtext.h b/kpovmodeler/pmtext.h index 3a7350bb..7ab4aff7 100644 --- a/kpovmodeler/pmtext.h +++ b/kpovmodeler/pmtext.h @@ -53,7 +53,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMText( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -61,35 +61,35 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMTextEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmtext" ); } + virtual TQString pixmap( ) const { return TQString( "pmtext" ); } /** * Returns the font file */ - QString font( ) const { return m_font; } + TQString font( ) const { return m_font; } /** * Sets the font file */ - void setFont( const QString& f ); + void setFont( const TQString& f ); /** * Returns the text */ - QString text( ) const { return m_text; } + TQString text( ) const { return m_text; } /** * Sets the text */ - void setText( const QString& t ); + void setText( const TQString& t ); /** * Returns the thickness */ @@ -134,7 +134,7 @@ private: * IDs for @ref PMMementoData */ enum PMTextMementoID { PMFontID, PMTextID, PMThicknessID, PMOffsetID }; - QString m_font, m_text; + TQString m_font, m_text; double m_thickness; PMVector m_offset; diff --git a/kpovmodeler/pmtextedit.cpp b/kpovmodeler/pmtextedit.cpp index 16f8501d..835808bd 100644 --- a/kpovmodeler/pmtextedit.cpp +++ b/kpovmodeler/pmtextedit.cpp @@ -21,15 +21,15 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qlineedit.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqlineedit.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kiconloader.h> #include <kfiledialog.h> -PMTextEdit::PMTextEdit( QWidget* parent, const char* name ) +PMTextEdit::PMTextEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -39,40 +39,40 @@ void PMTextEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Font:" ), this ) ); - m_pFont = new QLineEdit( this ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Font:" ), this ) ); + m_pFont = new TQLineEdit( this ); hl->addWidget( m_pFont ); - m_pChooseFont = new QPushButton( this ); + m_pChooseFont = new TQPushButton( this ); m_pChooseFont->setPixmap( SmallIcon( "fileopen" ) ); hl->addWidget( m_pChooseFont ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Text:" ), this ) ); - m_pText = new QLineEdit( this ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Text:" ), this ) ); + m_pText = new TQLineEdit( this ); hl->addWidget( m_pText ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Thickness:" ), this ) ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Thickness:" ), this ) ); m_pThickness = new PMFloatEdit( this ); hl->addWidget( m_pThickness ); hl->addStretch( 1 ); - hl = new QHBoxLayout( topLayout( ) ); - hl->addWidget( new QLabel( i18n( "Offset:" ), this ) ); + hl = new TQHBoxLayout( topLayout( ) ); + hl->addWidget( new TQLabel( i18n( "Offset:" ), this ) ); m_pOffset = new PMVectorEdit( "x", "y", this ); hl->addWidget( m_pOffset ); - connect( m_pFont, SIGNAL( textChanged( const QString& ) ), - SLOT( slotTextChanged( const QString& ) ) ); - connect( m_pChooseFont, SIGNAL( clicked( ) ), - SLOT( slotChooseFont( ) ) ); - connect( m_pText, SIGNAL( textChanged( const QString& ) ), - SLOT( slotTextChanged( const QString& ) ) ); - connect( m_pThickness, SIGNAL( dataChanged( ) ), - SIGNAL( dataChanged( ) ) ); - connect( m_pOffset, SIGNAL( dataChanged( ) ), - SIGNAL( dataChanged( ) ) ); + connect( m_pFont, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotTextChanged( const TQString& ) ) ); + connect( m_pChooseFont, TQT_SIGNAL( clicked( ) ), + TQT_SLOT( slotChooseFont( ) ) ); + connect( m_pText, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotTextChanged( const TQString& ) ) ); + connect( m_pThickness, TQT_SIGNAL( dataChanged( ) ), + TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOffset, TQT_SIGNAL( dataChanged( ) ), + TQT_SIGNAL( dataChanged( ) ) ); } void PMTextEdit::displayObject( PMObject* o ) @@ -119,14 +119,14 @@ bool PMTextEdit::isDataValid( ) return false; } -void PMTextEdit::slotTextChanged( const QString& ) +void PMTextEdit::slotTextChanged( const TQString& ) { emit dataChanged( ); } void PMTextEdit::slotChooseFont( ) { - QString str = KFileDialog::getOpenFileName( QString::null, QString::null ); + TQString str = KFileDialog::getOpenFileName( TQString::null, TQString::null ); if( !str.isEmpty() ) { diff --git a/kpovmodeler/pmtextedit.h b/kpovmodeler/pmtextedit.h index 3dd11280..132adc5e 100644 --- a/kpovmodeler/pmtextedit.h +++ b/kpovmodeler/pmtextedit.h @@ -29,8 +29,8 @@ class PMText; class PMVectorEdit; class PMFloatEdit; -class QLineEdit; -class QPushButton; +class TQLineEdit; +class TQPushButton; /** * Dialog edit class for @ref PMText @@ -43,7 +43,7 @@ public: /** * Creates a PMTextEdit with parent and name */ - PMTextEdit( QWidget* parent, const char* name = 0 ); + PMTextEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -52,7 +52,7 @@ public: virtual bool isDataValid( ); protected slots: - void slotTextChanged( const QString& t ); + void slotTextChanged( const TQString& t ); void slotChooseFont( ); protected: @@ -63,9 +63,9 @@ protected: private: PMText* m_pDisplayedObject; - QLineEdit* m_pFont; - QPushButton* m_pChooseFont; - QLineEdit* m_pText; + TQLineEdit* m_pFont; + TQPushButton* m_pChooseFont; + TQLineEdit* m_pText; PMFloatEdit* m_pThickness; PMVectorEdit* m_pOffset; }; diff --git a/kpovmodeler/pmtexture.cpp b/kpovmodeler/pmtexture.cpp index 4b8a21ff..a40da8cb 100644 --- a/kpovmodeler/pmtexture.cpp +++ b/kpovmodeler/pmtexture.cpp @@ -67,17 +67,17 @@ void PMTexture::cleanUp( ) const Base::cleanUp( ); } -QString PMTexture::description( ) const +TQString PMTexture::description( ) const { return i18n( "texture" ); } -PMDialogEditBase* PMTexture::editWidget( QWidget* parent ) const +PMDialogEditBase* PMTexture::editWidget( TQWidget* parent ) const { return new PMTextureEdit( parent ); } -void PMTexture::serialize( QDomElement& e, QDomDocument& doc ) const +void PMTexture::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "uv_mapping", m_uvMapping ); Base::serialize( e, doc ); diff --git a/kpovmodeler/pmtexture.h b/kpovmodeler/pmtexture.h index b8b176db..b2675b11 100644 --- a/kpovmodeler/pmtexture.h +++ b/kpovmodeler/pmtexture.h @@ -49,7 +49,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMTexture( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -57,16 +57,16 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMTextureEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmtexture" ); } + virtual TQString pixmap( ) const { return TQString( "pmtexture" ); } /** * Returns the uv mapping flag diff --git a/kpovmodeler/pmtexturebase.cpp b/kpovmodeler/pmtexturebase.cpp index 82a92418..a49b103f 100644 --- a/kpovmodeler/pmtexturebase.cpp +++ b/kpovmodeler/pmtexturebase.cpp @@ -128,7 +128,7 @@ void PMTextureBase::setLinkedObjectProperty( PMObject* o ) setLinkedObject( ( PMDeclare* ) o ); } -void PMTextureBase::serialize( QDomElement& e, QDomDocument& doc ) const +void PMTextureBase::serialize( TQDomElement& e, TQDomDocument& doc ) const { if( m_pLinkedObject ) e.setAttribute( "prototype", m_pLinkedObject->id( ) ); @@ -137,7 +137,7 @@ void PMTextureBase::serialize( QDomElement& e, QDomDocument& doc ) const void PMTextureBase::readAttributes( const PMXMLHelper& h ) { - QString id = h.stringAttribute( "prototype", "" ); + TQString id = h.stringAttribute( "prototype", "" ); if( !id.isEmpty( ) ) { PMDeclare* link = h.parser( )->checkLink( id ); diff --git a/kpovmodeler/pmtexturebase.h b/kpovmodeler/pmtexturebase.h index 2bd687f6..a3ecdc0a 100644 --- a/kpovmodeler/pmtexturebase.h +++ b/kpovmodeler/pmtexturebase.h @@ -24,7 +24,7 @@ #include <config.h> #endif -#include <qvaluelist.h> +#include <tqvaluelist.h> #include "pmnamedobject.h" #include "pmdeclare.h" @@ -50,7 +50,7 @@ public: virtual ~PMTextureBase( ); /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); diff --git a/kpovmodeler/pmtexturebaseedit.cpp b/kpovmodeler/pmtexturebaseedit.cpp index e9b91486..0768adc1 100644 --- a/kpovmodeler/pmtexturebaseedit.cpp +++ b/kpovmodeler/pmtexturebaseedit.cpp @@ -20,12 +20,12 @@ #include "pmpigment.h" #include "pmlinkedit.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -PMTextureBaseEdit::PMTextureBaseEdit( QWidget* parent, const char* name ) +PMTextureBaseEdit::PMTextureBaseEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,7 +37,7 @@ void PMTextureBaseEdit::createTopWidgets( ) Base::createTopWidgets( ); m_pLinkEdit = new PMLinkEdit( this ); topLayout( )->addWidget( m_pLinkEdit ); - connect( m_pLinkEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pLinkEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } diff --git a/kpovmodeler/pmtexturebaseedit.h b/kpovmodeler/pmtexturebaseedit.h index b8d67f56..8e89af9f 100644 --- a/kpovmodeler/pmtexturebaseedit.h +++ b/kpovmodeler/pmtexturebaseedit.h @@ -40,7 +40,7 @@ public: /** * Creates a PMTextureBaseEdit with parent and name */ - PMTextureBaseEdit( QWidget* parent, const char* name = 0 ); + PMTextureBaseEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmtextureedit.cpp b/kpovmodeler/pmtextureedit.cpp index 8a3d4f9f..768cc3cc 100644 --- a/kpovmodeler/pmtextureedit.cpp +++ b/kpovmodeler/pmtextureedit.cpp @@ -20,12 +20,12 @@ #include "pmtexture.h" #include "pmlinkedit.h" -#include <qlayout.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqcheckbox.h> #include <klocale.h> -PMTextureEdit::PMTextureEdit( QWidget* parent, const char* name ) +PMTextureEdit::PMTextureEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -34,10 +34,10 @@ PMTextureEdit::PMTextureEdit( QWidget* parent, const char* name ) void PMTextureEdit::createTopWidgets() { Base::createTopWidgets(); - m_pUVMapping = new QCheckBox( i18n( "UV mapping" ), this ); + m_pUVMapping = new TQCheckBox( i18n( "UV mapping" ), this ); topLayout( )->addWidget( m_pUVMapping ); - connect( m_pUVMapping, SIGNAL( clicked() ), SIGNAL( dataChanged() ) ); + connect( m_pUVMapping, TQT_SIGNAL( clicked() ), TQT_SIGNAL( dataChanged() ) ); } void PMTextureEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmtextureedit.h b/kpovmodeler/pmtextureedit.h index 7b799a5e..e1487794 100644 --- a/kpovmodeler/pmtextureedit.h +++ b/kpovmodeler/pmtextureedit.h @@ -27,7 +27,7 @@ #include "pmtexturebaseedit.h" class PMTexture; -class QCheckBox; +class TQCheckBox; /** * Dialog edit class for @ref PMTexture @@ -40,7 +40,7 @@ public: /** * Creates a PMTextureEdit with parent and name */ - PMTextureEdit( QWidget* parent, const char* name = 0 ); + PMTextureEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -53,7 +53,7 @@ protected: private: PMTexture* m_pDisplayedObject; - QCheckBox* m_pUVMapping; + TQCheckBox* m_pUVMapping; }; diff --git a/kpovmodeler/pmtexturemap.cpp b/kpovmodeler/pmtexturemap.cpp index fad93c61..1ab0c3a4 100644 --- a/kpovmodeler/pmtexturemap.cpp +++ b/kpovmodeler/pmtexturemap.cpp @@ -22,7 +22,7 @@ #include "pmxmlhelper.h" #include "pmmapmemento.h" -#include <qtextstream.h> +#include <tqtextstream.h> #include <klocale.h> class PMValueProperty : public PMPropertyBase @@ -46,8 +46,8 @@ protected: virtual bool setProtected( PMObject* obj, const PMVariant& var ) { PMTextureMapBase* m = ( PMTextureMapBase* ) obj; - QValueList<double> list = m->mapValues( ); - QValueList<double>::Iterator it = list.at( m_index ); + TQValueList<double> list = m->mapValues( ); + TQValueList<double>::Iterator it = list.at( m_index ); if( it == list.end( ) ) { @@ -63,8 +63,8 @@ protected: virtual PMVariant getProtected( const PMObject* obj ) { PMTextureMapBase* m = ( PMTextureMapBase* ) obj; - QValueList<double> list = m->mapValues( ); - QValueList<double>::ConstIterator it = list.at( m_index ); + TQValueList<double> list = m->mapValues( ); + TQValueList<double>::ConstIterator it = list.at( m_index ); if( it == list.end( ) ) { @@ -96,7 +96,7 @@ PMTextureMapBase::~PMTextureMapBase( ) { } -void PMTextureMapBase::serialize( QDomElement& e, QDomDocument& doc ) const +void PMTextureMapBase::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "map_values", valuesToString( ) ); Base::serialize( e, doc ); @@ -108,10 +108,10 @@ void PMTextureMapBase::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -QString PMTextureMapBase::valuesToString( ) const +TQString PMTextureMapBase::valuesToString( ) const { - QString str; - QValueList<double>::ConstIterator it; + TQString str; + TQValueList<double>::ConstIterator it; it = m_mapValues.begin( ); if( it != m_mapValues.end( ) ) @@ -119,16 +119,16 @@ QString PMTextureMapBase::valuesToString( ) const str.setNum( *it ); ++it; for( ; it != m_mapValues.end( ); ++it ) - str += QString( " %1" ).arg( *it ); + str += TQString( " %1" ).arg( *it ); } return str; } -void PMTextureMapBase::stringToValues( const QString& str ) +void PMTextureMapBase::stringToValues( const TQString& str ) { m_mapValues.clear( ); - QString tstr = str; - QTextIStream s( &tstr ); + TQString tstr = str; + TQTextIStream s( &tstr ); double d; while( !s.atEnd( ) ) @@ -158,7 +158,7 @@ void PMTextureMapBase::cleanUp( ) const Base::cleanUp( ); } -PMDialogEditBase* PMTextureMapBase::editWidget( QWidget* parent ) const +PMDialogEditBase* PMTextureMapBase::editWidget( TQWidget* parent ) const { return new PMTextureMapEdit( parent ); } @@ -189,10 +189,10 @@ void PMTextureMapBase::createMemento( ) m_pMemento = new PMMapMemento( this ); } -QValueList<double>::Iterator PMTextureMapBase::valueForChild( PMObject* obj ) +TQValueList<double>::Iterator PMTextureMapBase::valueForChild( PMObject* obj ) { PMObject* o = firstChild( ); - QValueList<double>::Iterator it = m_mapValues.begin( ); + TQValueList<double>::Iterator it = m_mapValues.begin( ); while( o && ( o != obj ) ) { @@ -206,7 +206,7 @@ QValueList<double>::Iterator PMTextureMapBase::valueForChild( PMObject* obj ) double PMTextureMapBase::mapValue( const PMObject* obj ) const { PMObject* o = firstChild( ); - QValueList<double>::ConstIterator it = m_mapValues.begin( ); + TQValueList<double>::ConstIterator it = m_mapValues.begin( ); while( o && ( o != obj ) ) { @@ -226,7 +226,7 @@ void PMTextureMapBase::childAdded( PMObject* ao ) ( ( PMMapMemento* ) m_pMemento )->setMapValues( m_mapValues ); if( m_removedValues.isEmpty( ) ) { - QValueList<double>::Iterator it = valueForChild( ao ); + TQValueList<double>::Iterator it = valueForChild( ao ); if( it == m_mapValues.end( ) ) { --it; @@ -254,7 +254,7 @@ void PMTextureMapBase::childAdded( PMObject* ao ) if( m_pMemento ) ( ( PMMapMemento* ) m_pMemento )->setRemovedValues( m_removedValues ); - QValueList<double>::Iterator it = m_mapValues.begin( ); + TQValueList<double>::Iterator it = m_mapValues.begin( ); bool stop = false; double v = m_removedValues.last( ); m_removedValues.remove( m_removedValues.fromLast( ) ); @@ -278,7 +278,7 @@ bool PMTextureMapBase::takeChild( PMObject* o ) ( ( PMMapMemento* ) m_pMemento )->setRemovedValues( m_removedValues ); } - QValueList<double>::Iterator it = valueForChild( o ); + TQValueList<double>::Iterator it = valueForChild( o ); if( it != m_mapValues.end( ) ) { m_removedValues.append( *it ); @@ -288,7 +288,7 @@ bool PMTextureMapBase::takeChild( PMObject* o ) return Base::takeChild( o ); } -void PMTextureMapBase::setMapValues( const QValueList<double>& v ) +void PMTextureMapBase::setMapValues( const TQValueList<double>& v ) { if( m_pMemento ) { @@ -362,7 +362,7 @@ void PMTextureMap::cleanUp( ) const Base::cleanUp( ); } -QString PMTextureMap::description( ) const +TQString PMTextureMap::description( ) const { return i18n( "texture map" ); } @@ -408,7 +408,7 @@ void PMPigmentMap::cleanUp( ) const Base::cleanUp( ); } -QString PMPigmentMap::description( ) const +TQString PMPigmentMap::description( ) const { return i18n( "pigment map" ); } @@ -454,7 +454,7 @@ void PMColorMap::cleanUp( ) const Base::cleanUp( ); } -QString PMColorMap::description( ) const +TQString PMColorMap::description( ) const { return i18n( "color map" ); } @@ -500,7 +500,7 @@ void PMNormalMap::cleanUp( ) const Base::cleanUp( ); } -QString PMNormalMap::description( ) const +TQString PMNormalMap::description( ) const { return i18n( "normal map" ); } @@ -546,7 +546,7 @@ void PMSlopeMap::cleanUp( ) const Base::cleanUp( ); } -QString PMSlopeMap::description( ) const +TQString PMSlopeMap::description( ) const { return i18n( "slope map" ); } @@ -592,7 +592,7 @@ void PMDensityMap::cleanUp( ) const Base::cleanUp( ); } -QString PMDensityMap::description( ) const +TQString PMDensityMap::description( ) const { return i18n( "density map" ); } diff --git a/kpovmodeler/pmtexturemap.h b/kpovmodeler/pmtexturemap.h index 227c7e1f..6a7b020d 100644 --- a/kpovmodeler/pmtexturemap.h +++ b/kpovmodeler/pmtexturemap.h @@ -27,7 +27,7 @@ #include "pmtexturebase.h" #include "pmvector.h" -#include <qvaluelist.h> +#include <tqvaluelist.h> /** * Base class for color, pigment, texture and normal maps @@ -64,19 +64,19 @@ public: virtual bool takeChild( PMObject* o ); /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns the map object type */ - virtual QString mapType( ) const = 0; + virtual TQString mapType( ) const = 0; /** * Returns a new @ref PMTextureMapEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ virtual void createMemento( ); @@ -86,11 +86,11 @@ public: /** * Returns the map values */ - QValueList<double> mapValues( ) const { return m_mapValues; } + TQValueList<double> mapValues( ) const { return m_mapValues; } /** * Sets the map values */ - void setMapValues( const QValueList<double>& v ); + void setMapValues( const TQValueList<double>& v ); /** * Returns the map value for the object o */ @@ -102,9 +102,9 @@ public: private: PMObject* nextMapEntry( PMObject* o ); - void stringToValues( const QString& str ); - QString valuesToString( ) const; - QValueList<double>::Iterator valueForChild( PMObject* o ); + void stringToValues( const TQString& str ); + TQString valuesToString( ) const; + TQValueList<double>::Iterator valueForChild( PMObject* o ); /** * IDs for @ref PMMementoData @@ -114,11 +114,11 @@ private: /** * list of map values */ - QValueList<double> m_mapValues; + TQValueList<double> m_mapValues; /** * removed map values */ - QValueList<double> m_removedValues; + TQValueList<double> m_removedValues; static PMMetaObject* s_pMetaObject; }; @@ -148,9 +148,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMTextureMap( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString mapType( ) const { return QString( "Texture" ); } + virtual TQString mapType( ) const { return TQString( "Texture" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -158,7 +158,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmtexturemap" ); } + virtual TQString pixmap( ) const { return TQString( "pmtexturemap" ); } private: static PMMetaObject* s_pMetaObject; @@ -188,9 +188,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMPigmentMap( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString mapType( ) const { return QString( "Pigment" ); } + virtual TQString mapType( ) const { return TQString( "Pigment" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -198,7 +198,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmpigmentmap" ); } + virtual TQString pixmap( ) const { return TQString( "pmpigmentmap" ); } private: static PMMetaObject* s_pMetaObject; @@ -228,9 +228,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMColorMap( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString mapType( ) const { return QString( "SolidColor" ); } + virtual TQString mapType( ) const { return TQString( "SolidColor" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -238,7 +238,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmcolormap" ); } + virtual TQString pixmap( ) const { return TQString( "pmcolormap" ); } private: static PMMetaObject* s_pMetaObject; @@ -269,9 +269,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMNormalMap( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString mapType( ) const { return QString( "Normal" ); } + virtual TQString mapType( ) const { return TQString( "Normal" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -279,7 +279,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmnormalmap" ); } + virtual TQString pixmap( ) const { return TQString( "pmnormalmap" ); } private: static PMMetaObject* s_pMetaObject; @@ -309,9 +309,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMSlopeMap( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString mapType( ) const { return QString( "Slope" ); } + virtual TQString mapType( ) const { return TQString( "Slope" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -319,7 +319,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmslopemap" ); } + virtual TQString pixmap( ) const { return TQString( "pmslopemap" ); } private: static PMMetaObject* s_pMetaObject; @@ -349,9 +349,9 @@ public: /** */ virtual PMObject* copy( ) const { return new PMDensityMap( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ - virtual QString mapType( ) const { return QString( "Density" ); } + virtual TQString mapType( ) const { return TQString( "Density" ); } /** */ virtual PMMetaObject* metaObject( ) const; @@ -359,7 +359,7 @@ public: virtual void cleanUp( ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmdensitymap" ); } + virtual TQString pixmap( ) const { return TQString( "pmdensitymap" ); } private: static PMMetaObject* s_pMetaObject; diff --git a/kpovmodeler/pmtexturemapedit.cpp b/kpovmodeler/pmtexturemapedit.cpp index 6faf4376..2efa7708 100644 --- a/kpovmodeler/pmtexturemapedit.cpp +++ b/kpovmodeler/pmtexturemapedit.cpp @@ -20,13 +20,13 @@ #include "pmtexturemap.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> #include <kmessagebox.h> -PMTextureMapEdit::PMTextureMapEdit( QWidget* parent, const char* name ) +PMTextureMapEdit::PMTextureMapEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -36,27 +36,27 @@ PMTextureMapEdit::PMTextureMapEdit( QWidget* parent, const char* name ) void PMTextureMapEdit::createTopWidgets( ) { Base::createTopWidgets( ); - topLayout( )->addWidget( new QLabel( i18n( "Map values:" ), this ) ); - m_pNoChildLabel = new QLabel( i18n( "(No Child Objects)" ), this ); - m_pPureLinkLabel = new QLabel( i18n( "(Pure Link)" ), this ); + topLayout( )->addWidget( new TQLabel( i18n( "Map values:" ), this ) ); + m_pNoChildLabel = new TQLabel( i18n( "(No Child Objects)" ), this ); + m_pPureLinkLabel = new TQLabel( i18n( "(Pure Link)" ), this ); topLayout( )->addWidget( m_pNoChildLabel ); topLayout( )->addWidget( m_pPureLinkLabel ); - QHBoxLayout* hl = new QHBoxLayout( topLayout( ) ); - m_pEditLayout = new QVBoxLayout( hl ); + TQHBoxLayout* hl = new TQHBoxLayout( topLayout( ) ); + m_pEditLayout = new TQVBoxLayout( hl ); hl->addStretch( 1 ); } void PMTextureMapEdit::displayObject( PMObject* o ) { - QString str; + TQString str; if( o->isA( "TextureMapBase" ) ) { bool readOnly = o->isReadOnly( ); m_pDisplayedObject = ( PMTextureMapBase* ) o; - QValueList<double> mv = m_pDisplayedObject->mapValues( ); - QValueList<double>::Iterator vit = mv.begin( ); - QPtrListIterator<PMFloatEdit> eit( m_edits ); + TQValueList<double> mv = m_pDisplayedObject->mapValues( ); + TQValueList<double>::Iterator vit = mv.begin( ); + TQPtrListIterator<PMFloatEdit> eit( m_edits ); PMFloatEdit* edit; m_numValues = 0; @@ -78,7 +78,7 @@ void PMTextureMapEdit::displayObject( PMObject* o ) edit->setValue( *vit ); edit->setValidation( true, 0.0, true, 1.0 ); edit->setReadOnly( readOnly ); - connect( edit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( edit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } m_numValues++; } @@ -115,9 +115,9 @@ void PMTextureMapEdit::saveContents( ) { if( m_numValues > 0 ) { - QPtrListIterator<PMFloatEdit> it( m_edits ); + TQPtrListIterator<PMFloatEdit> it( m_edits ); int i = 0; - QValueList<double> values; + TQValueList<double> values; for( ; ( i < m_numValues ) && it.current( ); ++i, ++it ) values.append( it.current( )->value( ) ); @@ -129,7 +129,7 @@ void PMTextureMapEdit::saveContents( ) bool PMTextureMapEdit::isDataValid( ) { - QPtrListIterator<PMFloatEdit> it( m_edits ); + TQPtrListIterator<PMFloatEdit> it( m_edits ); int i = 0; double last = 0.0; diff --git a/kpovmodeler/pmtexturemapedit.h b/kpovmodeler/pmtexturemapedit.h index 818d7435..7ec806d3 100644 --- a/kpovmodeler/pmtexturemapedit.h +++ b/kpovmodeler/pmtexturemapedit.h @@ -25,13 +25,13 @@ #endif #include "pmtexturebaseedit.h" -#include <qptrlist.h> +#include <tqptrlist.h> class PMTextureMapBase; class PMFloatEdit; -class QWidget; -class QVBoxLayout; -class QLabel; +class TQWidget; +class TQVBoxLayout; +class TQLabel; /** * Dialog edit class for @ref PMTextureMapBase. @@ -44,7 +44,7 @@ public: /** * Creates a PMTextureMapEdit with parent and name */ - PMTextureMapEdit( QWidget* parent, const char* name = 0 ); + PMTextureMapEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -59,10 +59,10 @@ protected: private: PMTextureMapBase* m_pDisplayedObject; - QPtrList<PMFloatEdit> m_edits; - QVBoxLayout* m_pEditLayout; - QLabel* m_pNoChildLabel; - QLabel* m_pPureLinkLabel; + TQPtrList<PMFloatEdit> m_edits; + TQVBoxLayout* m_pEditLayout; + TQLabel* m_pNoChildLabel; + TQLabel* m_pPureLinkLabel; int m_numValues; }; diff --git a/kpovmodeler/pmtorus.cpp b/kpovmodeler/pmtorus.cpp index c6f4238a..5e5be5ea 100644 --- a/kpovmodeler/pmtorus.cpp +++ b/kpovmodeler/pmtorus.cpp @@ -69,7 +69,7 @@ PMTorus::~PMTorus( ) } -QString PMTorus::description( ) const +TQString PMTorus::description( ) const { return i18n( "torus" ); } @@ -92,7 +92,7 @@ PMMetaObject* PMTorus::metaObject( ) const return s_pMetaObject; } -void PMTorus::serialize( QDomElement& e, QDomDocument& doc ) const +void PMTorus::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "minor_radius", m_minorRadius ); e.setAttribute( "major_radius", m_majorRadius ); @@ -110,7 +110,7 @@ void PMTorus::readAttributes( const PMXMLHelper& h ) Base::readAttributes( h ); } -PMDialogEditBase* PMTorus::editWidget( QWidget* parent ) const +PMDialogEditBase* PMTorus::editWidget( TQWidget* parent ) const { return new PMTorusEdit( parent ); diff --git a/kpovmodeler/pmtorus.h b/kpovmodeler/pmtorus.h index 9f3f8225..a7f1ee6a 100644 --- a/kpovmodeler/pmtorus.h +++ b/kpovmodeler/pmtorus.h @@ -55,24 +55,24 @@ public: /** */ virtual PMObject* copy( ) const { return new PMTorus( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMTrousEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmtorus" ); } + virtual TQString pixmap( ) const { return TQString( "pmtorus" ); } /** * set minor radius see povray documentation about torus */ diff --git a/kpovmodeler/pmtorusedit.cpp b/kpovmodeler/pmtorusedit.cpp index 01784e1d..e47301b9 100644 --- a/kpovmodeler/pmtorusedit.cpp +++ b/kpovmodeler/pmtorusedit.cpp @@ -20,13 +20,13 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klocale.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> -PMTorusEdit::PMTorusEdit( QWidget* parent, const char* name ) +PMTorusEdit::PMTorusEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -36,27 +36,27 @@ void PMTorusEdit::createTopWidgets( ) { Base::createTopWidgets( ); - QGridLayout* gl; - QHBoxLayout* hl; + TQGridLayout* gl; + TQHBoxLayout* hl; m_pMinorRadius = new PMFloatEdit( this ); m_pMajorRadius = new PMFloatEdit( this ); - m_pSturm = new QCheckBox( i18n( "Sturm" ), this ); + m_pSturm = new TQCheckBox( i18n( "Sturm" ), this ); - hl = new QHBoxLayout( topLayout( ) ); - gl = new QGridLayout( hl, 2, 2 ); - gl->addWidget( new QLabel( i18n( "Minor radius:" ), this ), 0, 0 ); + hl = new TQHBoxLayout( topLayout( ) ); + gl = new TQGridLayout( hl, 2, 2 ); + gl->addWidget( new TQLabel( i18n( "Minor radius:" ), this ), 0, 0 ); gl->addWidget( m_pMinorRadius, 0, 1 ); - gl->addWidget( new QLabel( i18n( "Major radius:" ), this ), 1, 0 ); + gl->addWidget( new TQLabel( i18n( "Major radius:" ), this ), 1, 0 ); gl->addWidget( m_pMajorRadius, 1, 1 ); hl->addStretch( 1 ); topLayout( )->addWidget( m_pSturm ); - connect( m_pMinorRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMajorRadius, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pSturm, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pMinorRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMajorRadius, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pSturm, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMTorusEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmtorusedit.h b/kpovmodeler/pmtorusedit.h index 2aea334b..1d3f4f5a 100644 --- a/kpovmodeler/pmtorusedit.h +++ b/kpovmodeler/pmtorusedit.h @@ -27,7 +27,7 @@ class PMTorus; class PMFloatEdit ; -class QCheckBox; +class TQCheckBox; /** * Dialog edit class for @ref PMTorus @@ -40,7 +40,7 @@ public: /** * Creates a PMSphereEdit with parent and name */ - PMTorusEdit( QWidget* parent, const char* name = 0 ); + PMTorusEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -57,7 +57,7 @@ private: PMTorus* m_pDisplayedObject; PMFloatEdit* m_pMinorRadius; PMFloatEdit* m_pMajorRadius; - QCheckBox * m_pSturm; + TQCheckBox * m_pSturm; }; diff --git a/kpovmodeler/pmtranslate.cpp b/kpovmodeler/pmtranslate.cpp index 0cfab44f..a0a09b7b 100644 --- a/kpovmodeler/pmtranslate.cpp +++ b/kpovmodeler/pmtranslate.cpp @@ -50,12 +50,12 @@ PMTranslate::~PMTranslate( ) { } -QString PMTranslate::description( ) const +TQString PMTranslate::description( ) const { return i18n( "translate" ); } -void PMTranslate::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const +void PMTranslate::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const { e.setAttribute( "value", m_move.serializeXML( ) ); } @@ -101,7 +101,7 @@ void PMTranslate::setTranslation( const PMVector& p ) } } -PMDialogEditBase* PMTranslate::editWidget( QWidget* parent ) const +PMDialogEditBase* PMTranslate::editWidget( TQWidget* parent ) const { return new PMTranslateEdit( parent ); } diff --git a/kpovmodeler/pmtranslate.h b/kpovmodeler/pmtranslate.h index 91f1c7c3..d1272bf6 100644 --- a/kpovmodeler/pmtranslate.h +++ b/kpovmodeler/pmtranslate.h @@ -51,7 +51,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMTranslate( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -59,15 +59,15 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMTranslateEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** */ - virtual QString pixmap( ) const { return QString( "pmtranslate" ); } + virtual TQString pixmap( ) const { return TQString( "pmtranslate" ); } /** * Returns the movement diff --git a/kpovmodeler/pmtranslateedit.cpp b/kpovmodeler/pmtranslateedit.cpp index d2690f51..f98bcf00 100644 --- a/kpovmodeler/pmtranslateedit.cpp +++ b/kpovmodeler/pmtranslateedit.cpp @@ -20,11 +20,11 @@ #include "pmtranslate.h" #include "pmvectoredit.h" -#include <qlayout.h> +#include <tqlayout.h> #include <klocale.h> -PMTranslateEdit::PMTranslateEdit( QWidget* parent, const char* name ) +PMTranslateEdit::PMTranslateEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,7 +37,7 @@ void PMTranslateEdit::createTopWidgets( ) m_pVector = new PMVectorEdit( "x", "y", "z", this ); topLayout( )->addWidget( m_pVector ); - connect( m_pVector, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pVector, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMTranslateEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmtranslateedit.h b/kpovmodeler/pmtranslateedit.h index ce27b037..f2061ca0 100644 --- a/kpovmodeler/pmtranslateedit.h +++ b/kpovmodeler/pmtranslateedit.h @@ -40,7 +40,7 @@ public: /** * Creates a PMTranslateEdit with parent and name */ - PMTranslateEdit( QWidget* parent, const char* name = 0 ); + PMTranslateEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); diff --git a/kpovmodeler/pmtreeview.cpp b/kpovmodeler/pmtreeview.cpp index 66ec18a0..827a52c0 100644 --- a/kpovmodeler/pmtreeview.cpp +++ b/kpovmodeler/pmtreeview.cpp @@ -18,11 +18,11 @@ #include <stdlib.h> -#include <qlistview.h> -#include <qheader.h> -#include <qlayout.h> -#include <qpopupmenu.h> -#include <qcursor.h> +#include <tqlistview.h> +#include <tqheader.h> +#include <tqlayout.h> +#include <tqpopupmenu.h> +#include <tqcursor.h> #include <klocale.h> #include <kmessagebox.h> @@ -38,23 +38,23 @@ #include "pmobjectdrag.h" -PMTreeViewWidget::PMTreeViewWidget( PMPart* part, QWidget* parent /*= 0*/, +PMTreeViewWidget::PMTreeViewWidget( PMPart* part, TQWidget* parent /*= 0*/, const char* name /*=0*/ ) : PMViewBase( parent, name ) { - QHBoxLayout* hl = new QHBoxLayout( this ); + TQHBoxLayout* hl = new TQHBoxLayout( this ); PMTreeView* tv = new PMTreeView( part, this ); hl->addWidget( tv ); } -QString PMTreeViewWidget::description( ) const +TQString PMTreeViewWidget::description( ) const { return i18n( "Object Tree" ); } -PMTreeView::PMTreeView( PMPart* part, QWidget* parent /*= 0*/, +PMTreeView::PMTreeView( PMPart* part, TQWidget* parent /*= 0*/, const char* name /*= 0*/ ) - : QListView( parent, name ) + : TQListView( parent, name ) { addColumn( i18n( "Objects" ) ); header( )->hide( ); @@ -75,16 +75,16 @@ PMTreeView::PMTreeView( PMPart* part, QWidget* parent /*= 0*/, viewport( )->setAcceptDrops( true ); viewport( )->setMouseTracking( true ); - viewport( )->setFocusPolicy( QWidget::WheelFocus ); - setFocusPolicy( QWidget::WheelFocus ); + viewport( )->setFocusPolicy( TQWidget::WheelFocus ); + setFocusPolicy( TQWidget::WheelFocus ); setAcceptDrops( true ); - connect( part, SIGNAL( refresh( ) ), SLOT( slotRefresh( ) ) ); - connect( part, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ), - SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) ); - connect( part, SIGNAL( clear( ) ), SLOT( slotClear( ) ) ); - connect( this, SIGNAL( objectChanged( PMObject*, const int, QObject* ) ), - part, SLOT( slotObjectChanged( PMObject*, const int, QObject* ) ) ); + connect( part, TQT_SIGNAL( refresh( ) ), TQT_SLOT( slotRefresh( ) ) ); + connect( part, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ), + TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) ); + connect( part, TQT_SIGNAL( clear( ) ), TQT_SLOT( slotClear( ) ) ); + connect( this, TQT_SIGNAL( objectChanged( PMObject*, const int, TQObject* ) ), + part, TQT_SLOT( slotObjectChanged( PMObject*, const int, TQObject* ) ) ); slotRefresh( ); } @@ -95,7 +95,7 @@ PMTreeView::~PMTreeView( ) } void PMTreeView::slotObjectChanged( PMObject* obj, const int mode, - QObject* sender ) + TQObject* sender ) { PMTreeViewItem* pTreeItem = 0; bool as = m_acceptSelect; @@ -114,11 +114,11 @@ void PMTreeView::slotObjectChanged( PMObject* obj, const int mode, else { // find the parent in the listview - QListViewItem* pParentTreeItem = findObject( obj->parent( ) ); + TQListViewItem* pParentTreeItem = findObject( obj->parent( ) ); if( pParentTreeItem ) { PMObject* hObj = obj->prevSibling( ); - QListViewItem* pSibling = 0; + TQListViewItem* pSibling = 0; bool found = false; if( hObj ) @@ -261,9 +261,9 @@ PMTreeViewItem* PMTreeView::findObject( const PMObject* obj ) } -void PMTreeView::selectItem( QListViewItem* /*sitem*/ ) +void PMTreeView::selectItem( TQListViewItem* /*sitem*/ ) { -/* QListViewItem* pItem = 0; +/* TQListViewItem* pItem = 0; bool emitSig; emitSig = ( m_pSelectedObject != ( ( PMTreeViewItem* ) sitem )->object( ) ); @@ -342,7 +342,7 @@ void PMTreeView::itemSelected( PMTreeViewItem* item, bool selected ) } } -void PMTreeView::contentsMousePressEvent( QMouseEvent * e ) +void PMTreeView::contentsMousePressEvent( TQMouseEvent * e ) { m_itemSelected = false; m_itemDeselected = false; @@ -351,11 +351,11 @@ void PMTreeView::contentsMousePressEvent( QMouseEvent * e ) m_selectOnReleaseEvent = false; bool specialAction = false; - QListViewItem* oldCurrent = currentItem( ); + TQListViewItem* oldCurrent = currentItem( ); m_event = true; m_acceptSelect = true; - QListView::contentsMousePressEvent( e ); + TQListView::contentsMousePressEvent( e ); m_event = false; m_acceptSelect = true; @@ -399,7 +399,7 @@ void PMTreeView::contentsMousePressEvent( QMouseEvent * e ) if( m_pLastSelected->object( )->isSelectable( ) ) { bool down = oldCurrent->itemPos( ) < m_pLastSelected->itemPos( ); - QListViewItem* tmp; + TQListViewItem* tmp; if( down ) { @@ -446,7 +446,7 @@ void PMTreeView::contentsMousePressEvent( QMouseEvent * e ) m_acceptSelect = false; } -void PMTreeView::contentsMouseMoveEvent( QMouseEvent * e ) +void PMTreeView::contentsMouseMoveEvent( TQMouseEvent * e ) { m_itemSelected = false; m_itemDeselected = false; @@ -454,7 +454,7 @@ void PMTreeView::contentsMouseMoveEvent( QMouseEvent * e ) m_selectionCleared = false; m_event = true; - QListView::contentsMouseMoveEvent( e ); + TQListView::contentsMouseMoveEvent( e ); m_event = false; // ignore all selections/deselections @@ -462,24 +462,24 @@ void PMTreeView::contentsMouseMoveEvent( QMouseEvent * e ) m_pLastSelected->setSelected( m_pLastSelected->object( )->isSelected( ) ); } -void PMTreeView::viewportMousePressEvent( QMouseEvent* e ) +void PMTreeView::viewportMousePressEvent( TQMouseEvent* e ) { m_acceptSelect = true; - QListView::viewportMousePressEvent( e ); + TQListView::viewportMousePressEvent( e ); m_acceptSelect = false; m_pressed = false; - QPoint p = e->pos( ); + TQPoint p = e->pos( ); if( e->button( ) & RightButton ) { if( m_pPart->factory( ) ) { - QPopupMenu* m = - ( QPopupMenu* ) m_pPart->factory( )->container( "treeViewPopup", m_pPart ); + TQPopupMenu* m = + ( TQPopupMenu* ) m_pPart->factory( )->container( "treeViewPopup", m_pPart ); if( m ) - m->exec( QCursor::pos( ) ); + m->exec( TQCursor::pos( ) ); } return; } @@ -507,9 +507,9 @@ void PMTreeView::viewportMousePressEvent( QMouseEvent* e ) } } -void PMTreeView::viewportMouseReleaseEvent( QMouseEvent* e ) +void PMTreeView::viewportMouseReleaseEvent( TQMouseEvent* e ) { - QListView::viewportMouseReleaseEvent( e ); + TQListView::viewportMouseReleaseEvent( e ); if( !m_pressed ) return; @@ -531,9 +531,9 @@ void PMTreeView::viewportMouseReleaseEvent( QMouseEvent* e ) } } -void PMTreeView::viewportMouseMoveEvent( QMouseEvent *e ) +void PMTreeView::viewportMouseMoveEvent( TQMouseEvent *e ) { - QListView::viewportMouseMoveEvent( e ); + TQListView::viewportMouseMoveEvent( e ); if( m_pressed && m_pressedItem ) { @@ -547,7 +547,7 @@ void PMTreeView::viewportMouseMoveEvent( QMouseEvent *e ) m_selectOnReleaseEvent = false; // Calculate hotspot - QPoint hotspot; + TQPoint hotspot; PMObjectList sortedList = m_pPart->selectedObjects( ); // Do not handle more mouse move or mouse release events @@ -576,7 +576,7 @@ void PMTreeView::viewportMouseMoveEvent( QMouseEvent *e ) } } -void PMTreeView::viewportDragMoveEvent( QDragMoveEvent *e ) +void PMTreeView::viewportDragMoveEvent( TQDragMoveEvent *e ) { bool accept = false; @@ -645,7 +645,7 @@ void PMTreeView::viewportDragMoveEvent( QDragMoveEvent *e ) e->ignore( ); } -void PMTreeView::viewportDragEnterEvent( QDragEnterEvent *e ) +void PMTreeView::viewportDragEnterEvent( TQDragEnterEvent *e ) { m_pDragOverItem = 0L; @@ -655,12 +655,12 @@ void PMTreeView::viewportDragEnterEvent( QDragEnterEvent *e ) e->ignore( ); } -void PMTreeView::viewportDragLeaveEvent( QDragLeaveEvent* ) +void PMTreeView::viewportDragLeaveEvent( TQDragLeaveEvent* ) { m_pDragOverItem = 0L; } -void PMTreeView::viewportDropEvent( QDropEvent* e ) +void PMTreeView::viewportDropEvent( TQDropEvent* e ) { PMObject* obj; @@ -674,7 +674,7 @@ void PMTreeView::viewportDropEvent( QDropEvent* e ) if( PMObjectDrag::canDecode( e, m_pPart ) ) { if( targetDisplaysPart( e->source( ) ) && - ( e->action( ) == QDropEvent::Move ) ) + ( e->action( ) == TQDropEvent::Move ) ) { if( m_pPart->dragMoveSelectionTo( obj ) ) e->acceptAction( ); @@ -698,24 +698,24 @@ void PMTreeView::viewportDropEvent( QDropEvent* e ) m_pDragOverItem = 0L; } -void PMTreeView::focusOutEvent( QFocusEvent* e ) +void PMTreeView::focusOutEvent( TQFocusEvent* e ) { - QWidget::focusOutEvent( e ); + TQWidget::focusOutEvent( e ); m_pressed = false; m_pressedItem = 0; } -void PMTreeView::focusInEvent( QFocusEvent* e ) +void PMTreeView::focusInEvent( TQFocusEvent* e ) { - QWidget::focusInEvent( e ); + TQWidget::focusInEvent( e ); m_pressed = false; m_pressedItem = 0; } -void PMTreeView::keyPressEvent( QKeyEvent* e ) +void PMTreeView::keyPressEvent( TQKeyEvent* e ) { - QListViewItem* current = currentItem( ); - QListViewItem* newSelection = 0; + TQListViewItem* current = currentItem( ); + TQListViewItem* newSelection = 0; bool accept = false; bool deleteItem = false; bool pasteItem = false; @@ -788,10 +788,10 @@ void PMTreeView::keyPressEvent( QKeyEvent* e ) e->accept( ); else e->ignore( ); - QWidget::keyPressEvent( e ); + TQWidget::keyPressEvent( e ); } -bool PMTreeView::targetDisplaysPart( QWidget* target ) +bool PMTreeView::targetDisplaysPart( TQWidget* target ) { bool result = false; if( !target ) // another application @@ -802,7 +802,7 @@ bool PMTreeView::targetDisplaysPart( QWidget* target ) { // Widget may be a view port // find the tree view - QWidget* t = target; + TQWidget* t = target; while( t && !t->isA( "PMTreeView" ) ) t = t->parentWidget( ); if( t ) @@ -812,7 +812,7 @@ bool PMTreeView::targetDisplaysPart( QWidget* target ) return result; } -QString PMTreeViewFactory::description( ) const +TQString PMTreeViewFactory::description( ) const { return i18n( "Object Tree" ); } diff --git a/kpovmodeler/pmtreeview.h b/kpovmodeler/pmtreeview.h index 24f6f33f..ec4d9c1b 100644 --- a/kpovmodeler/pmtreeview.h +++ b/kpovmodeler/pmtreeview.h @@ -24,7 +24,7 @@ #include <config.h> #endif -#include <qlistview.h> +#include <tqlistview.h> #include "pmobject.h" #include "pmviewbase.h" #include "pmviewfactory.h" @@ -41,12 +41,12 @@ public: /** * Default constructor */ - PMTreeViewWidget( PMPart* pare, QWidget* parent, const char* name = 0 ); + PMTreeViewWidget( PMPart* pare, TQWidget* parent, const char* name = 0 ); /** */ - virtual QString viewType( ) const { return QString( "treeview" ); } + virtual TQString viewType( ) const { return TQString( "treeview" ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; }; /** @@ -61,7 +61,7 @@ public: * Creates a PMTreeView with parent and name that displays the * document doc */ - PMTreeView( PMPart* part, QWidget* parent = 0, const char* name = 0 ); + PMTreeView( PMPart* part, TQWidget* parent = 0, const char* name = 0 ); /** * Deletes the PMTreeView */ @@ -80,7 +80,7 @@ public slots: /** * Called when an object is changed. * @see PMPart::objectChanged( ) */ - void slotObjectChanged( PMObject* obj, const int mode, QObject* sender ); + void slotObjectChanged( PMObject* obj, const int mode, TQObject* sender ); /** * Refreshes the whole csg tree */ @@ -94,30 +94,30 @@ signals: /** * Emitted, when an object is selected or deselected */ - void objectChanged( PMObject* obj, const int mode, QObject* sender ); + void objectChanged( PMObject* obj, const int mode, TQObject* sender ); /** * Emitted in the destructor */ void destroyed( PMTreeView* v ); protected: - void contentsMousePressEvent( QMouseEvent * e ); - void contentsMouseMoveEvent( QMouseEvent * e ); + void contentsMousePressEvent( TQMouseEvent * e ); + void contentsMouseMoveEvent( TQMouseEvent * e ); void itemSelected( PMTreeViewItem* item, bool selected ); - void viewportMousePressEvent( QMouseEvent * e ); - void viewportMouseReleaseEvent( QMouseEvent* e ); - void viewportMouseMoveEvent( QMouseEvent* e ); + void viewportMousePressEvent( TQMouseEvent * e ); + void viewportMouseReleaseEvent( TQMouseEvent* e ); + void viewportMouseMoveEvent( TQMouseEvent* e ); - void viewportDragMoveEvent( QDragMoveEvent *e ); - void viewportDragEnterEvent( QDragEnterEvent *e ); - void viewportDragLeaveEvent( QDragLeaveEvent* e ); - void viewportDropEvent( QDropEvent* e ); + void viewportDragMoveEvent( TQDragMoveEvent *e ); + void viewportDragEnterEvent( TQDragEnterEvent *e ); + void viewportDragLeaveEvent( TQDragLeaveEvent* e ); + void viewportDropEvent( TQDropEvent* e ); - void focusOutEvent( QFocusEvent* e ); - void focusInEvent( QFocusEvent* e ); + void focusOutEvent( TQFocusEvent* e ); + void focusInEvent( TQFocusEvent* e ); - void keyPressEvent( QKeyEvent* e ); + void keyPressEvent( TQKeyEvent* e ); private: /** @@ -131,11 +131,11 @@ private: /** * Selects the item. Expands the tree if necessary */ - void selectItem( QListViewItem* item ); + void selectItem( TQListViewItem* item ); /** * Returns true if the drop target is a tree view for the same part */ - bool targetDisplaysPart( QWidget* target ); + bool targetDisplaysPart( TQWidget* target ); /** * the displayed document @@ -145,7 +145,7 @@ private: /** * the selected items */ -// QPtrList<PMTreeViewItem> m_selectedItems; +// TQPtrList<PMTreeViewItem> m_selectedItems; PMTreeViewItem* m_pLastSelected; bool m_itemSelected; bool m_itemDeselected; @@ -155,11 +155,11 @@ private: bool m_selectOnReleaseEvent; PMTreeViewItem* m_pDragOverItem; -// QStringList m_lstDropFormats; +// TQStringList m_lstDropFormats; // for drag and drop, copied from KonqBaseListViewWidget bool m_pressed; - QPoint m_pressedPos; + TQPoint m_pressedPos; PMTreeViewItem* m_pressedItem; }; @@ -170,10 +170,10 @@ class PMTreeViewFactory : public PMViewTypeFactory { public: PMTreeViewFactory( ) { } - virtual QString viewType( ) const { return QString( "treeview" ); } - virtual QString description( ) const; - virtual QString iconName( ) const { return QString( "pmtreeview" ); } - virtual PMViewBase* newInstance( QWidget* parent, PMPart* part ) const + virtual TQString viewType( ) const { return TQString( "treeview" ); } + virtual TQString description( ) const; + virtual TQString iconName( ) const { return TQString( "pmtreeview" ); } + virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const { return new PMTreeViewWidget( part, parent ); } diff --git a/kpovmodeler/pmtreeviewitem.cpp b/kpovmodeler/pmtreeviewitem.cpp index 72562f78..cac3b3c7 100644 --- a/kpovmodeler/pmtreeviewitem.cpp +++ b/kpovmodeler/pmtreeviewitem.cpp @@ -24,34 +24,34 @@ #include "pmfactory.h" #include "pmtexturemap.h" -PMTreeViewItem::PMTreeViewItem( PMObject* object, QListView* parent ) - : QListViewItem( parent ) +PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListView* parent ) + : TQListViewItem( parent ) { m_pObject = object; setDescriptions( ); initSelection( ); } -PMTreeViewItem::PMTreeViewItem( PMObject* object, QListViewItem* parent ) - : QListViewItem( parent ) +PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListViewItem* parent ) + : TQListViewItem( parent ) { m_pObject = object; setDescriptions( ); initSelection( ); } -PMTreeViewItem::PMTreeViewItem( PMObject* object, QListView* parent, - QListViewItem* after ) - : QListViewItem( parent, after ) +PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListView* parent, + TQListViewItem* after ) + : TQListViewItem( parent, after ) { m_pObject = object; setDescriptions( ); initSelection( ); } -PMTreeViewItem::PMTreeViewItem( PMObject* object, QListViewItem* parent, - QListViewItem* after ) - : QListViewItem( parent, after ) +PMTreeViewItem::PMTreeViewItem( PMObject* object, TQListViewItem* parent, + TQListViewItem* after ) + : TQListViewItem( parent, after ) { m_pObject = object; setDescriptions( ); @@ -60,7 +60,7 @@ PMTreeViewItem::PMTreeViewItem( PMObject* object, QListViewItem* parent, void PMTreeViewItem::setDescriptions( ) { - QString text; + TQString text; setPixmap( 0, SmallIcon( m_pObject->pixmap( ), PMFactory::instance( ) ) ); if( m_pObject->canHaveName( ) ) @@ -78,15 +78,15 @@ void PMTreeViewItem::setDescriptions( ) { PMTextureMapBase* tm = ( PMTextureMapBase* ) m_pObject->parent( ); if( m_pObject->type( ) == tm->mapType( ) ) - text = QString( "[%1] " ).arg( tm->mapValue( m_pObject ), 4, 'f', 2 ) + text; + text = TQString( "[%1] " ).arg( tm->mapValue( m_pObject ), 4, 'f', 2 ) + text; } } setText( 0, text ); } -QString PMTreeViewItem::key( int, bool ) const +TQString PMTreeViewItem::key( int, bool ) const { - QString result; + TQString result; if( m_pObject->parent( ) ) result.sprintf( "%06i", m_pObject->parent( )->findChild( m_pObject ) ); else @@ -102,7 +102,7 @@ void PMTreeViewItem::setSelected( bool select ) // ignore selections during a move event if( treeview->acceptSelect( ) ) { - QListViewItem::setSelected( select ); + TQListViewItem::setSelected( select ); if( ws != isSelected( ) ) treeview->itemSelected( this, isSelected( ) ); @@ -111,7 +111,7 @@ void PMTreeViewItem::setSelected( bool select ) void PMTreeViewItem::initSelection( ) { - QListViewItem::setSelected( m_pObject->isSelected( ) ); + TQListViewItem::setSelected( m_pObject->isSelected( ) ); // if( m_pObject->isSelected( ) ) // repaint( ); } diff --git a/kpovmodeler/pmtreeviewitem.h b/kpovmodeler/pmtreeviewitem.h index 499e2d16..21cd26c1 100644 --- a/kpovmodeler/pmtreeviewitem.h +++ b/kpovmodeler/pmtreeviewitem.h @@ -24,11 +24,11 @@ #include <config.h> #endif -#include <qlistview.h> +#include <tqlistview.h> class PMObject; /** - * QListViewItem for a @ref PMObject + * TQListViewItem for a @ref PMObject * * Each PMListViewItem is connected to a PMObject. */ @@ -36,25 +36,25 @@ class PMTreeViewItem : public QListViewItem { public: /** - * Constructs a new top-level list view item in the QListView parent. + * Constructs a new top-level list view item in the TQListView parent. */ - PMTreeViewItem( PMObject* object, QListView* parent ); + PMTreeViewItem( PMObject* object, TQListView* parent ); /** * Constructs a new list view item which is a child of parent and * first in the parent's list of children. */ - PMTreeViewItem( PMObject* object, QListViewItem* parent ); + PMTreeViewItem( PMObject* object, TQListViewItem* parent ); /** * Constructs a list view item which is a child of parent * and is after after in the parent's list of children. */ - PMTreeViewItem( PMObject* object, QListView* parent, QListViewItem* after ); + PMTreeViewItem( PMObject* object, TQListView* parent, TQListViewItem* after ); /** * Constructs a list view item which is a child of parent * and is after after in the parent's list of children. */ - PMTreeViewItem( PMObject* object, QListViewItem* parent, - QListViewItem* after ); + PMTreeViewItem( PMObject* object, TQListViewItem* parent, + TQListViewItem* after ); /** * Returns the connected @ref PMObject */ @@ -63,13 +63,13 @@ public: * Returns a key that can be used for sorting, here the index in the * parents list of children */ - virtual QString key( int column, bool ascending ) const; + virtual TQString key( int column, bool ascending ) const; /** * Returns a pointer to the parent item */ PMTreeViewItem* parent( ) { - return ( PMTreeViewItem* ) QListViewItem::parent( ); + return ( PMTreeViewItem* ) TQListViewItem::parent( ); } void setSelected( bool select ); diff --git a/kpovmodeler/pmtriangle.cpp b/kpovmodeler/pmtriangle.cpp index 3cae7e37..ecf00f8c 100644 --- a/kpovmodeler/pmtriangle.cpp +++ b/kpovmodeler/pmtriangle.cpp @@ -189,14 +189,14 @@ PMTriangle::~PMTriangle( ) { } -QString PMTriangle::description( ) const +TQString PMTriangle::description( ) const { if( m_smooth ) return i18n( "smooth triangle" ); return i18n( "triangle" ); } -void PMTriangle::serialize( QDomElement& e, QDomDocument& doc ) const +void PMTriangle::serialize( TQDomElement& e, TQDomDocument& doc ) const { e.setAttribute( "point0", m_point[0].serializeXML( ) ); e.setAttribute( "point1", m_point[1].serializeXML( ) ); @@ -345,7 +345,7 @@ void PMTriangle::enableUV( bool yes ) } } -PMDialogEditBase* PMTriangle::editWidget( QWidget* parent ) const +PMDialogEditBase* PMTriangle::editWidget( TQWidget* parent ) const { return new PMTriangleEdit( parent ); } diff --git a/kpovmodeler/pmtriangle.h b/kpovmodeler/pmtriangle.h index e2309c79..e2ef3026 100644 --- a/kpovmodeler/pmtriangle.h +++ b/kpovmodeler/pmtriangle.h @@ -53,24 +53,24 @@ public: /** */ virtual PMObject* copy( ) const { return new PMTriangle( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMTriangleEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmtriangle" ); } + virtual TQString pixmap( ) const { return TQString( "pmtriangle" ); } /** * Returns true if the triangle is a smooth triangle diff --git a/kpovmodeler/pmtriangleedit.cpp b/kpovmodeler/pmtriangleedit.cpp index 7b225aa8..457ddb29 100644 --- a/kpovmodeler/pmtriangleedit.cpp +++ b/kpovmodeler/pmtriangleedit.cpp @@ -20,14 +20,14 @@ #include "pmtriangle.h" #include "pmvectoredit.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcheckbox.h> -#include <qpushbutton.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcheckbox.h> +#include <tqpushbutton.h> #include <klocale.h> #include <kmessagebox.h> -PMTriangleEdit::PMTriangleEdit( QWidget* parent, const char* name ) +PMTriangleEdit::PMTriangleEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -39,47 +39,47 @@ void PMTriangleEdit::createTopWidgets( ) int i; - QHBoxLayout *hl = new QHBoxLayout( topLayout( ) ); - m_pSmooth = new QCheckBox( i18n( "Smooth" ), this ); + TQHBoxLayout *hl = new TQHBoxLayout( topLayout( ) ); + m_pSmooth = new TQCheckBox( i18n( "Smooth" ), this ); hl->addWidget( m_pSmooth ); - connect( m_pSmooth, SIGNAL( toggled( bool ) ), - SLOT( slotSmoothChecked( bool ) ) ); + connect( m_pSmooth, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( slotSmoothChecked( bool ) ) ); - m_pUVEnabled = new QCheckBox( i18n( "UV vectors" ), this ); + m_pUVEnabled = new TQCheckBox( i18n( "UV vectors" ), this ); hl->addWidget( m_pUVEnabled ); - connect( m_pUVEnabled, SIGNAL( toggled( bool ) ), - SLOT( slotUVVectorsChecked( bool ) ) ); + connect( m_pUVEnabled, TQT_SIGNAL( toggled( bool ) ), + TQT_SLOT( slotUVVectorsChecked( bool ) ) ); - QGridLayout* gl = new QGridLayout( topLayout( ), 9, 2 ); + TQGridLayout* gl = new TQGridLayout( topLayout( ), 9, 2 ); for( i = 0; i < 3; i++ ) { m_pPoint[i] = new PMVectorEdit( "x", "y", "z", this ); - gl->addWidget( new QLabel( i18n( "Point %1:" ).arg( i+1 ), this ), + gl->addWidget( new TQLabel( i18n( "Point %1:" ).arg( i+1 ), this ), i * 3, 0 ); gl->addWidget( m_pPoint[i], i * 3, 1 ); - connect( m_pPoint[i], SIGNAL( dataChanged( ) ), - SIGNAL( dataChanged( ) ) ); + connect( m_pPoint[i], TQT_SIGNAL( dataChanged( ) ), + TQT_SIGNAL( dataChanged( ) ) ); m_pNormal[i] = new PMVectorEdit( "x", "y", "z", this ); - m_pNormalLabel[i] = new QLabel( i18n( "Normal %1:" ).arg( i+1 ), this ); + m_pNormalLabel[i] = new TQLabel( i18n( "Normal %1:" ).arg( i+1 ), this ); gl->addWidget( m_pNormalLabel[i], i * 3 + 1, 0 ); gl->addWidget( m_pNormal[i], i * 3 + 1, 1 ); - connect( m_pNormal[i], SIGNAL( dataChanged( ) ), - SIGNAL( dataChanged( ) ) ); + connect( m_pNormal[i], TQT_SIGNAL( dataChanged( ) ), + TQT_SIGNAL( dataChanged( ) ) ); m_pUVVector[i] = new PMVectorEdit( "u", "v", this ); - m_pUVVectorLabel[i] = new QLabel( i18n( "UV vector %1:" ).arg( i+1 ), this ); + m_pUVVectorLabel[i] = new TQLabel( i18n( "UV vector %1:" ).arg( i+1 ), this ); gl->addWidget( m_pUVVectorLabel[i], i * 3 + 2, 0 ); gl->addWidget( m_pUVVector[i], i * 3 + 2, 1 ); - connect( m_pUVVector[i], SIGNAL( dataChanged( ) ), - SIGNAL( dataChanged( ) ) ); + connect( m_pUVVector[i], TQT_SIGNAL( dataChanged( ) ), + TQT_SIGNAL( dataChanged( ) ) ); } - hl = new QHBoxLayout( topLayout( ) ); - m_pMirror = new QPushButton( i18n( "Invert Normal Vectors" ), this ); + hl = new TQHBoxLayout( topLayout( ) ); + m_pMirror = new TQPushButton( i18n( "Invert Normal Vectors" ), this ); hl->addWidget( m_pMirror ); hl->addStretch( 1 ); - connect( m_pMirror, SIGNAL( clicked( ) ), SLOT( slotInvertNormals( ) ) ); + connect( m_pMirror, TQT_SIGNAL( clicked( ) ), TQT_SLOT( slotInvertNormals( ) ) ); } void PMTriangleEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmtriangleedit.h b/kpovmodeler/pmtriangleedit.h index 821ad68d..aff323ad 100644 --- a/kpovmodeler/pmtriangleedit.h +++ b/kpovmodeler/pmtriangleedit.h @@ -28,9 +28,9 @@ class PMTriangle; class PMVectorEdit; -class QCheckBox; -class QLabel; -class QPushButton; +class TQCheckBox; +class TQLabel; +class TQPushButton; /** * Dialog edit class for @ref PMTriangle @@ -43,7 +43,7 @@ public: /** * Creates a PMTriangleEdit with parent and name */ - PMTriangleEdit( QWidget* parent, const char* name = 0 ); + PMTriangleEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -65,12 +65,12 @@ private: PMTriangle* m_pDisplayedObject; PMVectorEdit* m_pPoint[3]; PMVectorEdit* m_pNormal[3]; - QLabel* m_pNormalLabel[3]; - QCheckBox* m_pSmooth; - QLabel* m_pUVVectorLabel[3]; + TQLabel* m_pNormalLabel[3]; + TQCheckBox* m_pSmooth; + TQLabel* m_pUVVectorLabel[3]; PMVectorEdit* m_pUVVector[3]; - QCheckBox* m_pUVEnabled; - QPushButton* m_pMirror; + TQCheckBox* m_pUVEnabled; + TQPushButton* m_pMirror; }; diff --git a/kpovmodeler/pmtruetypecache.cpp b/kpovmodeler/pmtruetypecache.cpp index 9aa28d89..f685001a 100644 --- a/kpovmodeler/pmtruetypecache.cpp +++ b/kpovmodeler/pmtruetypecache.cpp @@ -50,7 +50,7 @@ PMTrueTypeCache::~PMTrueTypeCache( ) FT_Done_FreeType( m_library ); } -PMTrueTypeFont* PMTrueTypeCache::lookUp( const QString& file ) +PMTrueTypeFont* PMTrueTypeCache::lookUp( const TQString& file ) { if( !m_library ) return 0; @@ -81,7 +81,7 @@ PMTrueTypeFont* PMTrueTypeCache::lookUp( const QString& file ) return 0; } -PMTrueTypeFont* PMTrueTypeCache::font( const QString& file ) +PMTrueTypeFont* PMTrueTypeCache::font( const TQString& file ) { if( !s_pInstance ) s_staticDeleter.setObject( s_pInstance, new PMTrueTypeCache( ) ); @@ -144,13 +144,13 @@ bool PMTrueTypeFont::isValid( ) return m_valid; } -PMTrueTypeOutline* PMTrueTypeFont::outline( QChar c ) +PMTrueTypeOutline* PMTrueTypeFont::outline( TQChar c ) { PMTrueTypeOutline* ol = 0; if( isValid( ) ) { - QString str( c ); + TQString str( c ); ol = m_cache.find( str ); if( !ol ) { @@ -193,7 +193,7 @@ PMTrueTypeOutline* PMTrueTypeFont::outline( QChar c ) return ol; } -double PMTrueTypeFont::kerning( QChar c1, QChar c2 ) +double PMTrueTypeFont::kerning( TQChar c1, TQChar c2 ) { double k = 0.0; if( m_useKerning && !c1.isNull( ) && !c2.isNull( ) ) @@ -211,7 +211,7 @@ double PMTrueTypeFont::kerning( QChar c1, QChar c2 ) return k; } -FT_UInt PMTrueTypeFont::findGlyphIndex( QChar c ) +FT_UInt PMTrueTypeFont::findGlyphIndex( TQChar c ) { FT_UInt glyphIndex = 0; @@ -368,7 +368,7 @@ PMTrueTypeCache::PMTrueTypeCache( ) { } -PMTrueTypeFont* PMTrueTypeCache::font( const QString& ) +PMTrueTypeFont* PMTrueTypeCache::font( const TQString& ) { return 0; } @@ -382,12 +382,12 @@ bool PMTrueTypeFont::isValid( ) return false; } -PMTrueTypeOutline* PMTrueTypeFont::outline( QChar ) +PMTrueTypeOutline* PMTrueTypeFont::outline( TQChar ) { return 0; } -double PMTrueTypeFont::kerning( QChar, QChar ) +double PMTrueTypeFont::kerning( TQChar, TQChar ) { return 0; } diff --git a/kpovmodeler/pmtruetypecache.h b/kpovmodeler/pmtruetypecache.h index b305cb1c..342597b0 100644 --- a/kpovmodeler/pmtruetypecache.h +++ b/kpovmodeler/pmtruetypecache.h @@ -25,7 +25,7 @@ #include "pmsplinesegment.h" -#include <qcache.h> +#include <tqcache.h> #include <kstaticdeleter.h> #ifdef HAVE_FREETYPE @@ -49,7 +49,7 @@ public: * * Returns 0 if freetype is not available. */ - static PMTrueTypeFont* font( const QString& file ); + static PMTrueTypeFont* font( const TQString& file ); #ifdef HAVE_FREETYPE @@ -65,9 +65,9 @@ private: /** * Lookup function */ - PMTrueTypeFont* lookUp( const QString& file ); + PMTrueTypeFont* lookUp( const TQString& file ); - QCache<PMTrueTypeFont> m_cache; + TQCache<PMTrueTypeFont> m_cache; FT_Library m_library; #endif //HAVE_FREETYPE @@ -142,7 +142,7 @@ public: * Returns 0 if there is no glyph for the character or the font is * not a valid, scalable true type font. */ - PMTrueTypeOutline* outline( QChar c ); + PMTrueTypeOutline* outline( TQChar c ); /** * Returns true if the font is a valid, scalable true type font */ @@ -150,7 +150,7 @@ public: /** * Returns the kerning offset for the two characters */ - double kerning( QChar c1, QChar c2 ); + double kerning( TQChar c1, TQChar c2 ); #ifdef HAVE_FREETYPE @@ -165,7 +165,7 @@ public: ~PMTrueTypeFont( ); private: - FT_UInt findGlyphIndex( QChar c ); + FT_UInt findGlyphIndex( TQChar c ); FT_Library m_library; FT_Face m_face; @@ -174,7 +174,7 @@ private: bool m_validChecked; bool m_useKerning; - QCache<PMTrueTypeOutline> m_cache; + TQCache<PMTrueTypeOutline> m_cache; #else //!HAVE_FREETYPE diff --git a/kpovmodeler/pmunknownview.cpp b/kpovmodeler/pmunknownview.cpp index b6067c02..e1660d02 100644 --- a/kpovmodeler/pmunknownview.cpp +++ b/kpovmodeler/pmunknownview.cpp @@ -17,21 +17,21 @@ #include "pmunknownview.h" #include <klocale.h> -#include <qlayout.h> +#include <tqlayout.h> -PMUnknownView::PMUnknownView( const QString& viewType, - QWidget* parent, const char* name ) +PMUnknownView::PMUnknownView( const TQString& viewType, + TQWidget* parent, const char* name ) : PMViewBase( parent, name ) { - QHBoxLayout* hl = new QHBoxLayout( this ); - QLabel* l; - l = new QLabel( i18n( "Unknown view type \"%1\"" ).arg( viewType ), this ); + TQHBoxLayout* hl = new TQHBoxLayout( this ); + TQLabel* l; + l = new TQLabel( i18n( "Unknown view type \"%1\"" ).arg( viewType ), this ); l->setAlignment( Qt::AlignCenter ); hl->addWidget( l ); m_viewType = viewType; } -QString PMUnknownView::description( ) const +TQString PMUnknownView::description( ) const { return i18n( "Unknown" ); } diff --git a/kpovmodeler/pmunknownview.h b/kpovmodeler/pmunknownview.h index b8921dd6..dbb5d042 100644 --- a/kpovmodeler/pmunknownview.h +++ b/kpovmodeler/pmunknownview.h @@ -22,7 +22,7 @@ #include <config.h> #endif -#include <qlabel.h> +#include <tqlabel.h> #include "pmviewbase.h" /** @@ -34,14 +34,14 @@ public: /** * Default constructor */ - PMUnknownView( const QString& viewType, QWidget* parent, + PMUnknownView( const TQString& viewType, TQWidget* parent, const char* name = 0 ); /** */ - virtual QString viewType( ) const { return m_viewType; } + virtual TQString viewType( ) const { return m_viewType; } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; private: - QString m_viewType; + TQString m_viewType; }; #endif diff --git a/kpovmodeler/pmvariant.cpp b/kpovmodeler/pmvariant.cpp index d6b5384c..fb2175c7 100644 --- a/kpovmodeler/pmvariant.cpp +++ b/kpovmodeler/pmvariant.cpp @@ -17,7 +17,7 @@ #include "pmvariant.h" -#include <qstring.h> +#include <tqstring.h> #include "pmcolor.h" #include "pmvector.h" #include "pmdebug.h" @@ -62,10 +62,10 @@ PMVariant::PMVariant( PMThreeState data ) } -PMVariant::PMVariant( const QString& data ) +PMVariant::PMVariant( const TQString& data ) { m_dataType = PMVariant::String; - m_pData = new QString( data ); + m_pData = new TQString( data ); } PMVariant::PMVariant( const PMVector& data ) @@ -109,7 +109,7 @@ PMVariant::PMVariant( const PMVariant& v ) setThreeState( *( ( PMThreeState* ) v.m_pData ) ); break; case PMVariant::String: - setString( *( ( QString* ) v.m_pData ) ); + setString( *( ( TQString* ) v.m_pData ) ); break; case PMVariant::Vector: setVector( *( ( PMVector* ) v.m_pData ) ); @@ -145,7 +145,7 @@ PMVariant& PMVariant::operator= ( const PMVariant& v ) setThreeState( *( ( PMThreeState* ) v.m_pData ) ); break; case PMVariant::String: - setString( *( ( QString* ) v.m_pData ) ); + setString( *( ( TQString* ) v.m_pData ) ); break; case PMVariant::Vector: setVector( *( ( PMVector* ) v.m_pData ) ); @@ -188,7 +188,7 @@ void PMVariant::clear( ) delete( ( PMThreeState* ) m_pData ); break; case PMVariant::String: - delete( ( QString* ) m_pData ); + delete( ( TQString* ) m_pData ); break; case PMVariant::Vector: delete( ( PMVector* ) m_pData ); @@ -267,16 +267,16 @@ void PMVariant::setThreeState( const PMThreeState data ) *( ( PMThreeState* ) m_pData ) = data; } -void PMVariant::setString( const QString& data ) +void PMVariant::setString( const TQString& data ) { if( m_dataType != PMVariant::String ) { clear( ); - m_pData = new QString( data ); + m_pData = new TQString( data ); m_dataType = PMVariant::String; } else - *( ( QString* ) m_pData ) = data; + *( ( TQString* ) m_pData ) = data; } void PMVariant::setVector( const PMVector& data ) @@ -355,12 +355,12 @@ PMThreeState PMVariant::threeStateData( ) const return PMUnspecified; } -QString PMVariant::stringData( ) const +TQString PMVariant::stringData( ) const { if( m_dataType == PMVariant::String ) - return *( ( QString* ) m_pData ); + return *( ( TQString* ) m_pData ); kdError( PMArea ) << "Wrong type in PMVariant get function\n"; - return QString::null; + return TQString::null; } PMVector PMVariant::vectorData( ) const @@ -415,7 +415,7 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t ) break; case PMVariant::String: { - QString tmp; + TQString tmp; tmp.setNum( data ); setString( tmp ); break; @@ -458,7 +458,7 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t ) break; case PMVariant::String: { - QString tmp; + TQString tmp; tmp.setNum( data ); setString( tmp ); break; @@ -501,7 +501,7 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t ) break; case PMVariant::String: { - QString tmp; + TQString tmp; tmp.setNum( data ); setString( tmp ); break; @@ -547,9 +547,9 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t ) break; case PMVariant::String: if( data ) - setString( QString( "true" ) ); + setString( TQString( "true" ) ); else - setString( QString( "false" ) ); + setString( TQString( "false" ) ); break; case PMVariant::Vector: success = false; @@ -594,11 +594,11 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t ) break; case PMVariant::String: if( data == PMTrue ) - setString( QString( "true" ) ); + setString( TQString( "true" ) ); else if( data == PMFalse ) - setString( QString( "false" ) ); + setString( TQString( "false" ) ); else - setString( QString( "unspecified" ) ); + setString( TQString( "unspecified" ) ); break; case PMVariant::Vector: success = false; @@ -618,7 +618,7 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t ) case PMVariant::String: { - QString data = *( ( QString* ) m_pData ); + TQString data = *( ( TQString* ) m_pData ); switch( t ) { @@ -738,9 +738,9 @@ bool PMVariant::convertTo( PMVariant::PMVariantDataType t ) return success; } -QString PMVariant::asString( ) const +TQString PMVariant::asString( ) const { - QString tmp; + TQString tmp; switch( m_dataType ) { @@ -789,7 +789,7 @@ QString PMVariant::asString( ) const } case PMVariant::String: { - tmp = *( ( QString* ) m_pData ); + tmp = *( ( TQString* ) m_pData ); break; } case PMVariant::Vector: @@ -822,7 +822,7 @@ QString PMVariant::asString( ) const return tmp; } -bool PMVariant::fromString( const PMVariant::PMVariantDataType t, const QString& value ) +bool PMVariant::fromString( const PMVariant::PMVariantDataType t, const TQString& value ) { bool success; @@ -895,7 +895,7 @@ bool PMVariant::fromString( const PMVariant::PMVariantDataType t, const QString& return success; } -QDataStream& operator<<( QDataStream& stream, const PMVariant& value ) +TQDataStream& operator<<( TQDataStream& stream, const PMVariant& value ) { stream << (Q_INT8)value.dataType( ); stream << value.asString( ); @@ -903,11 +903,11 @@ QDataStream& operator<<( QDataStream& stream, const PMVariant& value ) return stream; } -QDataStream& operator>>( QDataStream& stream, PMVariant& value ) +TQDataStream& operator>>( TQDataStream& stream, PMVariant& value ) { Q_INT8 type; PMVariant::PMVariantDataType dataType; - QString str; + TQString str; stream >> type; dataType = (PMVariant::PMVariantDataType)type; diff --git a/kpovmodeler/pmvariant.h b/kpovmodeler/pmvariant.h index 01519a01..e6bcdee9 100644 --- a/kpovmodeler/pmvariant.h +++ b/kpovmodeler/pmvariant.h @@ -19,7 +19,7 @@ #ifndef PMVARIANT_H #define PMVARIANT_H -#include <qstring.h> +#include <tqstring.h> #include "pmcolor.h" #include "pmvector.h" #include "pmthreestate.h" @@ -30,9 +30,9 @@ class PMObject; * Variant class for KPovModeler. * * Can store and convert: int, unsigned int, double, bool, - * PMThreeState, QString, PMVector, PMColor, PMObject*. + * PMThreeState, TQString, PMVector, PMColor, PMObject*. * - * Enums are stored as QString. + * Enums are stored as TQString. * * The variant can store one type at a time. You can try to convert * the type with the convertTo* methods. These will return bool on success. @@ -76,7 +76,7 @@ public: /** * Stores a string */ - PMVariant( const QString& data ); + PMVariant( const TQString& data ); /** * Stores a @ref PMVector */ @@ -131,7 +131,7 @@ public: /** * Sets the string data */ - void setString( const QString& data ); + void setString( const TQString& data ); /** * Sets the vector data */ @@ -168,7 +168,7 @@ public: /** * Returns the string data. Data type has to be String! */ - QString stringData( ) const; + TQString stringData( ) const; /** * Returns the vector data. Data type has to be Vector! */ @@ -195,11 +195,11 @@ public: /** * Returns the value of the stored data in string format */ - QString asString( ) const; + TQString asString( ) const; /** * Sets the value of the variant based on the string */ - bool fromString( const PMVariant::PMVariantDataType t, const QString& value ); + bool fromString( const PMVariant::PMVariantDataType t, const TQString& value ); private: void clear( ); @@ -214,8 +214,8 @@ private: }; // Streaming operators for PMVariant -QDataStream& operator<<( QDataStream& stream, const PMVariant& value ); -QDataStream& operator>>( QDataStream& stream, PMVariant& value ); +TQDataStream& operator<<( TQDataStream& stream, const PMVariant& value ); +TQDataStream& operator>>( TQDataStream& stream, PMVariant& value ); #endif diff --git a/kpovmodeler/pmvector.cpp b/kpovmodeler/pmvector.cpp index 035f0d2b..13ba6ba4 100644 --- a/kpovmodeler/pmvector.cpp +++ b/kpovmodeler/pmvector.cpp @@ -21,7 +21,7 @@ #include "pmmatrix.h" #include "pmdebug.h" -#include <qtextstream.h> +#include <tqtextstream.h> #include <stdio.h> #include <stdlib.h> @@ -528,10 +528,10 @@ PMVector PMVector::orthogonal( ) const return result / rl; } -QString PMVector::serialize( ) const +TQString PMVector::serialize( ) const { - QString result; - QTextStream str( &result, IO_WriteOnly ); + TQString result; + TQTextStream str( &result, IO_WriteOnly ); unsigned int i; if( m_size > 0 ) @@ -551,10 +551,10 @@ QString PMVector::serialize( ) const return result; } -QString PMVector::serializeXML( ) const +TQString PMVector::serializeXML( ) const { - QString result; - QTextStream str( &result, IO_WriteOnly ); + TQString result; + TQTextStream str( &result, IO_WriteOnly ); unsigned int i; if( m_size > 0 ) @@ -572,13 +572,13 @@ QString PMVector::serializeXML( ) const return result; } -bool PMVector::loadXML( const QString& str ) +bool PMVector::loadXML( const TQString& str ) { int i; int size = str.contains( ' ' ) + 1; - QString tmp( str ); - QTextStream s( &tmp, IO_ReadOnly ); - QString val; + TQString tmp( str ); + TQTextStream s( &tmp, IO_ReadOnly ); + TQString val; bool ok; resize( size ); diff --git a/kpovmodeler/pmvector.h b/kpovmodeler/pmvector.h index 6794d02a..f5e885a5 100644 --- a/kpovmodeler/pmvector.h +++ b/kpovmodeler/pmvector.h @@ -20,8 +20,8 @@ #ifndef PMVECTOR_H #define PMVECTOR_H -#include <qmemarray.h> -#include <qstring.h> +#include <tqmemarray.h> +#include <tqstring.h> class PMMatrix; @@ -255,15 +255,15 @@ public: /** * Returns a string for serialization */ - QString serialize( ) const; + TQString serialize( ) const; /** * Returns a string for xml output */ - QString serializeXML( ) const; + TQString serializeXML( ) const; /** * loads the vector data from the xml string */ - bool loadXML( const QString& str ); + bool loadXML( const TQString& str ); private: void allocateMemory( unsigned int size ); diff --git a/kpovmodeler/pmvectorcontrolpoint.cpp b/kpovmodeler/pmvectorcontrolpoint.cpp index 0a14d0b8..fe7b0fe2 100644 --- a/kpovmodeler/pmvectorcontrolpoint.cpp +++ b/kpovmodeler/pmvectorcontrolpoint.cpp @@ -21,7 +21,7 @@ PMVectorControlPoint::PMVectorControlPoint( PMControlPoint* base, const PMVector& v, int id, - const QString& description, + const TQString& description, bool extraLine, bool normalize ) : PMControlPoint( id, description ) { @@ -33,7 +33,7 @@ PMVectorControlPoint::PMVectorControlPoint( PMControlPoint* base, PMVectorControlPoint::PMVectorControlPoint( const PMVector& base, const PMVector& v, int id, - const QString& description, + const TQString& description, bool extraLine, bool normalize ) : PMControlPoint( id, description ) { diff --git a/kpovmodeler/pmvectorcontrolpoint.h b/kpovmodeler/pmvectorcontrolpoint.h index 92713bc6..1aca3088 100644 --- a/kpovmodeler/pmvectorcontrolpoint.h +++ b/kpovmodeler/pmvectorcontrolpoint.h @@ -38,7 +38,7 @@ public: * The base point of the vector is given by the control point location. */ PMVectorControlPoint( PMControlPoint* location, const PMVector& v, - int id, const QString& description, + int id, const TQString& description, bool extraLine = true, bool normalize = false ); /** * Creates a PMVectorControlPoint with id. @@ -46,7 +46,7 @@ public: * The base point of the vector is given by the vector p. */ PMVectorControlPoint( const PMVector& location, const PMVector& v, - int id, const QString& description, + int id, const TQString& description, bool extraLine = true, bool normalize = false ); /** * Deletes the PMVectorControlPoint diff --git a/kpovmodeler/pmvectoredit.cpp b/kpovmodeler/pmvectoredit.cpp index 7264f8f3..7b9b6568 100644 --- a/kpovmodeler/pmvectoredit.cpp +++ b/kpovmodeler/pmvectoredit.cpp @@ -18,36 +18,36 @@ #include "pmvectoredit.h" #include "pmdebug.h" -#include <qstring.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqstring.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kdialog.h> #include <kmessagebox.h> #include <klocale.h> -PMVectorEdit::PMVectorEdit( const QString& descriptionX, - const QString& descriptionY, - QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMVectorEdit::PMVectorEdit( const TQString& descriptionX, + const TQString& descriptionY, + TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { unsigned int i; - QHBoxLayout* layout; - QLabel* label; + TQHBoxLayout* layout; + TQLabel* label; m_edits.resize( 2 ); for( i = 0; i < 2; i++ ) { - m_edits.insert( i, new QLineEdit( this ) ); - connect( m_edits[i], SIGNAL( textChanged( const QString& ) ), - SLOT( slotTextChanged( const QString& ) ) ); + m_edits.insert( i, new TQLineEdit( this ) ); + connect( m_edits[i], TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotTextChanged( const TQString& ) ) ); } - layout = new QHBoxLayout( this ); + layout = new TQHBoxLayout( this ); if( !descriptionX.isEmpty( ) ) { - label = new QLabel( descriptionX, this ); + label = new TQLabel( descriptionX, this ); layout->addWidget( label ); layout->addSpacing( KDialog::spacingHint( ) ); } @@ -56,36 +56,36 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionX, if( !descriptionY.isEmpty( ) ) { - label = new QLabel( descriptionY, this ); + label = new TQLabel( descriptionY, this ); layout->addWidget( label ); layout->addSpacing( KDialog::spacingHint( ) ); } layout->addWidget( m_edits[1] ); } -PMVectorEdit::PMVectorEdit( const QString& descriptionX, - const QString& descriptionY, - const QString& descriptionZ, - QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMVectorEdit::PMVectorEdit( const TQString& descriptionX, + const TQString& descriptionY, + const TQString& descriptionZ, + TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { unsigned int i; - QHBoxLayout* layout; - QLabel* label; + TQHBoxLayout* layout; + TQLabel* label; m_edits.resize( 3 ); for( i = 0; i < 3; i++ ) { - m_edits.insert( i, new QLineEdit( this ) ); - connect( m_edits[i], SIGNAL( textChanged( const QString& ) ), - SLOT( slotTextChanged( const QString& ) ) ); + m_edits.insert( i, new TQLineEdit( this ) ); + connect( m_edits[i], TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotTextChanged( const TQString& ) ) ); } - layout = new QHBoxLayout( this ); + layout = new TQHBoxLayout( this ); if( !descriptionX.isEmpty( ) ) { - label = new QLabel( descriptionX, this ); + label = new TQLabel( descriptionX, this ); layout->addWidget( label ); layout->addSpacing( KDialog::spacingHint( ) ); } @@ -94,7 +94,7 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionX, if( !descriptionY.isEmpty( ) ) { - label = new QLabel( descriptionY, this ); + label = new TQLabel( descriptionY, this ); layout->addWidget( label ); layout->addSpacing( KDialog::spacingHint( ) ); } @@ -103,37 +103,37 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionX, if( !descriptionZ.isEmpty( ) ) { - label = new QLabel( descriptionZ, this ); + label = new TQLabel( descriptionZ, this ); layout->addWidget( label ); layout->addSpacing( KDialog::spacingHint( ) ); } layout->addWidget( m_edits[2] ); } -PMVectorEdit::PMVectorEdit( const QString& descriptionA, - const QString& descriptionB, - const QString& descriptionC, - const QString& descriptionD, - QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMVectorEdit::PMVectorEdit( const TQString& descriptionA, + const TQString& descriptionB, + const TQString& descriptionC, + const TQString& descriptionD, + TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { unsigned int i; - QHBoxLayout* layout; - QLabel* label; + TQHBoxLayout* layout; + TQLabel* label; m_edits.resize( 4 ); for( i = 0; i < 4; i++ ) { - m_edits.insert( i, new QLineEdit( this ) ); - connect( m_edits[i], SIGNAL( textChanged( const QString& ) ), - SLOT( slotTextChanged( const QString& ) ) ); + m_edits.insert( i, new TQLineEdit( this ) ); + connect( m_edits[i], TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotTextChanged( const TQString& ) ) ); } - layout = new QHBoxLayout( this ); + layout = new TQHBoxLayout( this ); if( !descriptionA.isEmpty( ) ) { - label = new QLabel( descriptionA, this ); + label = new TQLabel( descriptionA, this ); layout->addWidget( label ); layout->addSpacing( KDialog::spacingHint( ) ); } @@ -142,7 +142,7 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionA, if( !descriptionB.isEmpty( ) ) { - label = new QLabel( descriptionB, this ); + label = new TQLabel( descriptionB, this ); layout->addWidget( label ); layout->addSpacing( KDialog::spacingHint( ) ); } @@ -151,7 +151,7 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionA, if( !descriptionC.isEmpty( ) ) { - label = new QLabel( descriptionC, this ); + label = new TQLabel( descriptionC, this ); layout->addWidget( label ); layout->addSpacing( KDialog::spacingHint( ) ); } @@ -160,7 +160,7 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionA, if( !descriptionD.isEmpty( ) ) { - label = new QLabel( descriptionD, this ); + label = new TQLabel( descriptionD, this ); layout->addWidget( label ); layout->addSpacing( KDialog::spacingHint( ) ); } @@ -170,7 +170,7 @@ PMVectorEdit::PMVectorEdit( const QString& descriptionA, void PMVectorEdit::setVector( const PMVector& v, int precision ) { unsigned int i; - QString str; + TQString str; if( v.size( ) != m_edits.size( ) ) kdError( PMArea ) << "Vector has wrong size in PMVectorEdit::setVector\n"; @@ -213,7 +213,7 @@ bool PMVectorEdit::isDataValid( ) return ok; } -void PMVectorEdit::slotTextChanged( const QString& ) +void PMVectorEdit::slotTextChanged( const TQString& ) { emit dataChanged( ); } diff --git a/kpovmodeler/pmvectoredit.h b/kpovmodeler/pmvectoredit.h index 8be64ebe..be94977d 100644 --- a/kpovmodeler/pmvectoredit.h +++ b/kpovmodeler/pmvectoredit.h @@ -24,9 +24,9 @@ #include <config.h> #endif -#include <qwidget.h> -#include <qptrvector.h> -#include <qlineedit.h> +#include <tqwidget.h> +#include <tqptrvector.h> +#include <tqlineedit.h> #include "pmvector.h" /** @@ -41,26 +41,26 @@ public: * * The labels shown are descriptionX and descriptionY */ - PMVectorEdit( const QString& descriptionX, - const QString& descriptionY, - QWidget* parent, const char* name = 0 ); + PMVectorEdit( const TQString& descriptionX, + const TQString& descriptionY, + TQWidget* parent, const char* name = 0 ); /** * Creates an edit widget for 3D vectors. * * The labels shown are descriptionX, descriptionY and descriptionZ */ - PMVectorEdit( const QString& descriptionX, - const QString& descriptionY, const QString& descriptionZ, - QWidget* parent, const char* name = 0 ); + PMVectorEdit( const TQString& descriptionX, + const TQString& descriptionY, const TQString& descriptionZ, + TQWidget* parent, const char* name = 0 ); /** * Creates an edit widget for 4D vectors. * * The labels shown are descriptionA, descriptionB, descriptionC * and description D */ - PMVectorEdit( const QString& descriptionA, const QString& descriptionB, - const QString& descriptionC, const QString& descriptionD, - QWidget* parent, const char* name = 0 ); + PMVectorEdit( const TQString& descriptionA, const TQString& descriptionB, + const TQString& descriptionC, const TQString& descriptionD, + TQWidget* parent, const char* name = 0 ); /** * Sets the displayed vector @@ -92,9 +92,9 @@ signals: void dataChanged( ); protected slots: - void slotTextChanged( const QString& ); + void slotTextChanged( const TQString& ); private: - QPtrVector<QLineEdit> m_edits; + TQPtrVector<TQLineEdit> m_edits; }; #endif diff --git a/kpovmodeler/pmvectorlistedit.cpp b/kpovmodeler/pmvectorlistedit.cpp index 224c6b69..bf8f74ad 100644 --- a/kpovmodeler/pmvectorlistedit.cpp +++ b/kpovmodeler/pmvectorlistedit.cpp @@ -18,10 +18,10 @@ #include "pmvectorlistedit.h" #include "pmdebug.h" -#include <qheader.h> -#include <qapplication.h> -#include <qpalette.h> -#include <qpainter.h> +#include <tqheader.h> +#include <tqapplication.h> +#include <tqpalette.h> +#include <tqpainter.h> #include <kmessagebox.h> #include <klocale.h> @@ -29,19 +29,19 @@ const int c_columnWidth = 65; /* -PMTableItem::PMTableItem( QTable* table ) - : QTableItem( table, QTableItem::OnTyping, QString( "" ) ) +PMTableItem::PMTableItem( TQTable* table ) + : TQTableItem( table, TQTableItem::OnTyping, TQString( "" ) ) { m_readOnly = false; } -void PMTableItem::paint( QPainter* p, const QColorGroup& cg, - const QRect& cr, bool selected ) +void PMTableItem::paint( TQPainter* p, const TQColorGroup& cg, + const TQRect& cr, bool selected ) { p->fillRect( 0, 0, cr.width( ), cr.height( ), - selected ? cg.brush( QColorGroup::Highlight ) - : ( m_readOnly ? cg.brush( QColorGroup::Background ) : - cg.brush( QColorGroup::Base ) ) ); + selected ? cg.brush( TQColorGroup::Highlight ) + : ( m_readOnly ? cg.brush( TQColorGroup::Background ) : + cg.brush( TQColorGroup::Base ) ) ); int w = cr.width( ); int h = cr.height( ); @@ -57,51 +57,51 @@ void PMTableItem::paint( QPainter* p, const QColorGroup& cg, } */ -PMVectorListEdit::PMVectorListEdit( QWidget* parent, const char* name ) - : QTable( 1, 3, parent, name ) +PMVectorListEdit::PMVectorListEdit( TQWidget* parent, const char* name ) + : TQTable( 1, 3, parent, name ) { init( 3 ); - QHeader* header = horizontalHeader( ); + TQHeader* header = horizontalHeader( ); header->setLabel( 0, "x" ); header->setLabel( 1, "y" ); header->setLabel( 2, "z" ); } -PMVectorListEdit::PMVectorListEdit( const QString& c1, const QString& c2, - const QString& c3, const QString& c4, - QWidget* parent, const char* name ) - : QTable( 1, 4, parent, name ) +PMVectorListEdit::PMVectorListEdit( const TQString& c1, const TQString& c2, + const TQString& c3, const TQString& c4, + TQWidget* parent, const char* name ) + : TQTable( 1, 4, parent, name ) { init( 4 ); - QHeader* header = horizontalHeader( ); + TQHeader* header = horizontalHeader( ); header->setLabel( 0, c1 ); header->setLabel( 1, c2 ); header->setLabel( 2, c3 ); header->setLabel( 3, c4 ); } -PMVectorListEdit::PMVectorListEdit( const QString& c1, const QString& c2, - const QString& c3, QWidget* parent, +PMVectorListEdit::PMVectorListEdit( const TQString& c1, const TQString& c2, + const TQString& c3, TQWidget* parent, const char* name ) - : QTable( 1, 3, parent, name ) + : TQTable( 1, 3, parent, name ) { init( 3 ); - QHeader* header = horizontalHeader( ); + TQHeader* header = horizontalHeader( ); header->setLabel( 0, c1 ); header->setLabel( 1, c2 ); header->setLabel( 2, c3 ); } -PMVectorListEdit::PMVectorListEdit( const QString& c1, const QString& c2, - QWidget* parent, const char* name ) - : QTable( 1, 2, parent, name ) +PMVectorListEdit::PMVectorListEdit( const TQString& c1, const TQString& c2, + TQWidget* parent, const char* name ) + : TQTable( 1, 2, parent, name ) { init( 2 ); - QHeader* header = horizontalHeader( ); + TQHeader* header = horizontalHeader( ); header->setLabel( 0, c1 ); header->setLabel( 1, c2 ); } @@ -116,18 +116,18 @@ void PMVectorListEdit::init( int dimensions ) horizontalHeader( )->setResizeEnabled( false ); verticalHeader( )->setResizeEnabled( false ); - setSelectionMode( QTable::MultiRow ); + setSelectionMode( TQTable::MultiRow ); for( i = 0; i < m_dimension; ++i ) setColumnStretchable( i, true ); - connect( this, SIGNAL( valueChanged( int, int ) ), - SLOT( slotTextChanged( int, int ) ) ); - setSizePolicy( QSizePolicy( QSizePolicy::Preferred, QSizePolicy::Fixed ) ); + connect( this, TQT_SIGNAL( valueChanged( int, int ) ), + TQT_SLOT( slotTextChanged( int, int ) ) ); + setSizePolicy( TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Fixed ) ); } -void PMVectorListEdit::setVectors( const QValueList<PMVector>& l, +void PMVectorListEdit::setVectors( const TQValueList<PMVector>& l, bool resize, int prec ) { - QValueList<PMVector>::ConstIterator it; + TQValueList<PMVector>::ConstIterator it; int r, nl = 0; for( r = 0; r < ( signed ) m_links.size( ); ++r ) @@ -158,9 +158,9 @@ void PMVectorListEdit::setVectors( const QValueList<PMVector>& l, kdError( PMArea ) << "Wrong size of vector list in PMVectorListEdit::setVectors" << endl; } -QValueList<PMVector> PMVectorListEdit::vectors( ) const +TQValueList<PMVector> PMVectorListEdit::vectors( ) const { - QValueList<PMVector> l; + TQValueList<PMVector> l; int i; for( i = 0; i < m_size; ++i ) @@ -183,7 +183,7 @@ void PMVectorListEdit::setVector( int r, const PMVector& v, int precision ) blockSignals( true ); int i; - QString str; + TQString str; for( i = 0; i < m_dimension && i <= ( signed ) v.size( ); ++i ) { @@ -218,8 +218,8 @@ void PMVectorListEdit::setSize( int s ) setNumRows( s ); int i; - QHeader* h = verticalHeader( ); - QString str; + TQHeader* h = verticalHeader( ); + TQString str; for( i = 0; i < s; ++i ) { @@ -240,8 +240,8 @@ void PMVectorListEdit::setLink( int p1, int p2 ) if( p1 < 0 || p1 >= m_size || p2 >= m_size ) return; - QHeader* h = verticalHeader( ); - QString str; + TQHeader* h = verticalHeader( ); + TQString str; // remove old link if( m_links[p1] >= 0 ) @@ -256,7 +256,7 @@ void PMVectorListEdit::setLink( int p1, int p2 ) if( p2 >= 0 ) { m_disabled[p2] = true; - str = QString( "%1 (=%2)" ).arg( p2 + 1 ).arg( p1 + 1 ); + str = TQString( "%1 (=%2)" ).arg( p2 + 1 ).arg( p1 + 1 ); h->setLabel( p2, str ); if( !isReadOnly( ) ) setRowReadOnly( p2, true ); @@ -285,7 +285,7 @@ void PMVectorListEdit::select( int i ) void PMVectorListEdit::select( int i, int j ) { - QTableSelection sel( i, 0, j, m_dimension - 1 ); + TQTableSelection sel( i, 0, j, m_dimension - 1 ); addSelection( sel ); } @@ -315,9 +315,9 @@ bool PMVectorListEdit::isDataValid( ) return valid; } -QSize PMVectorListEdit::sizeHint( ) const +TQSize PMVectorListEdit::sizeHint( ) const { - return QSize( c_columnWidth * m_dimension + frameWidth( ) * 2, + return TQSize( c_columnWidth * m_dimension + frameWidth( ) * 2, frameWidth( ) * 2 + horizontalHeader( )->height( ) + verticalHeader( )->sizeHint( ).height( ) ); } @@ -340,18 +340,18 @@ void PMVectorListEdit::blockSelectionUpdates( bool block ) } } -bool PMVectorListEdit::eventFilter( QObject* o, QEvent* e ) +bool PMVectorListEdit::eventFilter( TQObject* o, TQEvent* e ) { - if( e->type( ) == QEvent::Wheel && parent( ) ) - return QApplication::sendEvent( parent( ), e ); - if( e->type( ) == QEvent::MouseButtonPress - && ( ( QMouseEvent* ) e )->button( ) == RightButton ) + if( e->type( ) == TQEvent::Wheel && parent( ) ) + return TQApplication::sendEvent( parent( ), e ); + if( e->type( ) == TQEvent::MouseButtonPress + && ( ( TQMouseEvent* ) e )->button( ) == RightButton ) { - bool b = QTable::eventFilter( o, e ); + bool b = TQTable::eventFilter( o, e ); emit showContextMenu( ); return b; } - return QTable::eventFilter( o, e ); + return TQTable::eventFilter( o, e ); } #include "pmvectorlistedit.moc" diff --git a/kpovmodeler/pmvectorlistedit.h b/kpovmodeler/pmvectorlistedit.h index f8ecb938..73e32036 100644 --- a/kpovmodeler/pmvectorlistedit.h +++ b/kpovmodeler/pmvectorlistedit.h @@ -23,9 +23,9 @@ #include <config.h> #endif -#include <qtable.h> -#include <qvaluelist.h> -#include <qmemarray.h> +#include <tqtable.h> +#include <tqvaluelist.h> +#include <tqmemarray.h> #include "pmvector.h" @@ -35,10 +35,10 @@ const int c_pmTableRTTI = 14352; class PMTableItem : public QTableItem { public: - PMTableItem( QTable* table ); + PMTableItem( TQTable* table ); - virtual void paint( QPainter* p, const QColorGroup& cg, - const QRect& cr, bool selected ); + virtual void paint( TQPainter* p, const TQColorGroup& cg, + const TQRect& cr, bool selected ); int rtti( ) const { return c_pmTableRTTI; } @@ -52,7 +52,7 @@ private: /** - * Widget that displays a list of vectors, based on @ref QTable. + * Widget that displays a list of vectors, based on @ref TQTable. */ class PMVectorListEdit : public QTable { @@ -61,33 +61,33 @@ public: /** * Constructor for 3d vectors (x, y, z) */ - PMVectorListEdit( QWidget* parent, const char* name = 0 ); + PMVectorListEdit( TQWidget* parent, const char* name = 0 ); /** * Constructor for 3d vectors */ - PMVectorListEdit( const QString& c1, const QString& c2, const QString& c3, - QWidget* parent, const char* name = 0 ); + PMVectorListEdit( const TQString& c1, const TQString& c2, const TQString& c3, + TQWidget* parent, const char* name = 0 ); /** * Constructor for 2d vectors */ - PMVectorListEdit( const QString& c1, const QString& c2, - QWidget* parent, const char* name = 0 ); + PMVectorListEdit( const TQString& c1, const TQString& c2, + TQWidget* parent, const char* name = 0 ); /** * Constructor for 4d vectors */ - PMVectorListEdit( const QString& c1, const QString& c2, const QString& c3, - const QString& c4, QWidget* parent, const char* name = 0 ); + PMVectorListEdit( const TQString& c1, const TQString& c2, const TQString& c3, + const TQString& c4, TQWidget* parent, const char* name = 0 ); /** * Sets and displays the vectors. The widget will automatically * resize if no link is set and resize is true. */ - void setVectors( const QValueList<PMVector>& v, bool resize = false, + void setVectors( const TQValueList<PMVector>& v, bool resize = false, int precision = 5 ); /** * Returns the vectors */ - QValueList<PMVector> vectors( ) const; + TQValueList<PMVector> vectors( ) const; /** * Sets the i-th vector */ @@ -146,9 +146,9 @@ public: bool isDataValid( ); /** */ - virtual QSize sizeHint( ) const; + virtual TQSize sizeHint( ) const; /** */ - bool eventFilter( QObject* o, QEvent* e ); + bool eventFilter( TQObject* o, TQEvent* e ); protected slots: void slotTextChanged( int, int ); @@ -166,8 +166,8 @@ private: void init( int dimensions ); int m_dimension, m_size; - QMemArray<int> m_links; - QMemArray<bool> m_disabled; + TQMemArray<int> m_links; + TQMemArray<bool> m_disabled; }; diff --git a/kpovmodeler/pmview.cpp b/kpovmodeler/pmview.cpp index fe9f32d4..2fcd7eb2 100644 --- a/kpovmodeler/pmview.cpp +++ b/kpovmodeler/pmview.cpp @@ -16,11 +16,11 @@ **************************************************************************/ -#include <qprinter.h> -#include <qpainter.h> -#include <qsplitter.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqprinter.h> +#include <tqpainter.h> +#include <tqsplitter.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <kconfig.h> #include <kdialog.h> #include <klocale.h> @@ -34,14 +34,14 @@ #include "pmdialogview.h" #include "pmglview.h" -PMView::PMView( PMPart* part, QWidget* parent, const char* name ) - : QWidget( parent, name ) +PMView::PMView( PMPart* part, TQWidget* parent, const char* name ) + : TQWidget( parent, name ) { setBackgroundMode( PaletteBase ); - QVBoxLayout* layout = new QVBoxLayout( this ); - m_pMainSplitter = new QSplitter( Qt::Horizontal, this, "MainSplitter" ); - m_pTreeEditSplitter = new QSplitter( Qt::Vertical, m_pMainSplitter, + TQVBoxLayout* layout = new TQVBoxLayout( this ); + m_pMainSplitter = new TQSplitter( Qt::Horizontal, this, "MainSplitter" ); + m_pTreeEditSplitter = new TQSplitter( Qt::Vertical, m_pMainSplitter, "TreeEditSplitter" ); @@ -52,11 +52,11 @@ PMView::PMView( PMPart* part, QWidget* parent, const char* name ) m_pDialogView->show( ); - QWidget* glArea = new QWidget( m_pMainSplitter, "GLArea" ); + TQWidget* glArea = new TQWidget( m_pMainSplitter, "GLArea" ); glArea->show( ); PMGLView* gl; - QGridLayout* topLayout = new QGridLayout( glArea, 2, 2, 1, 1 ); + TQGridLayout* topLayout = new TQGridLayout( glArea, 2, 2, 1, 1 ); gl = new PMGLView( part, PMGLView::PMViewPosZ, glArea ); topLayout->addWidget( gl, 0, 0 ); gl = new PMGLView( part, PMGLView::PMViewPosX, glArea ); @@ -78,9 +78,9 @@ PMView::~PMView( ) { } -void PMView::print( QPrinter* pPrinter ) +void PMView::print( TQPrinter* pPrinter ) { - QPainter printpainter; + TQPainter printpainter; printpainter.begin( pPrinter ); // TODO: add your printing code here diff --git a/kpovmodeler/pmview.h b/kpovmodeler/pmview.h index 8a216663..38249ed4 100644 --- a/kpovmodeler/pmview.h +++ b/kpovmodeler/pmview.h @@ -25,12 +25,12 @@ #endif // include files for Qt -#include <qwidget.h> +#include <tqwidget.h> class PMTreeView; class PMDialogView; class PMPart; -class QSplitter; +class TQSplitter; class KConfig; /** @@ -43,7 +43,7 @@ public: /** * Constructor for the main view */ - PMView( PMPart* part, QWidget* parent = 0, const char* name = 0 ); + PMView( PMPart* part, TQWidget* parent = 0, const char* name = 0 ); /** * Destructor for the main view */ @@ -56,7 +56,7 @@ public: /** * contains the implementation for printing functionality TODO*/ - void print( QPrinter* pPrinter ); + void print( TQPrinter* pPrinter ); /** * saves settings */ @@ -69,8 +69,8 @@ private: PMTreeView* m_pTreeView; PMPart* m_pPart; PMDialogView* m_pDialogView; - QSplitter* m_pMainSplitter; - QSplitter* m_pTreeEditSplitter; + TQSplitter* m_pMainSplitter; + TQSplitter* m_pTreeEditSplitter; }; #endif diff --git a/kpovmodeler/pmviewbase.h b/kpovmodeler/pmviewbase.h index cce59922..357929c4 100644 --- a/kpovmodeler/pmviewbase.h +++ b/kpovmodeler/pmviewbase.h @@ -22,10 +22,10 @@ #include <config.h> #endif -#include <qwidget.h> -#include <qstring.h> +#include <tqwidget.h> +#include <tqstring.h> -class QDomElement; +class TQDomElement; /** * This class stores the view configuration for one view. @@ -47,15 +47,15 @@ public: * Returns the identifier for the view type. Has to be equal * to @ref PMViewBase::viewType for the corresponding view type. */ - virtual QString viewType( ) const = 0; + virtual TQString viewType( ) const = 0; /** * Loads the data from the xml element */ - virtual void loadData( QDomElement& e ) = 0; + virtual void loadData( TQDomElement& e ) = 0; /** * Saves the data from to xml element */ - virtual void saveData( QDomElement& e ) = 0; + virtual void saveData( TQDomElement& e ) = 0; }; /** @@ -69,8 +69,8 @@ public: /** * Default constructor */ - PMViewOptionsWidget( QWidget* parent, const char* name = 0 ) - : QWidget( parent, name ) + PMViewOptionsWidget( TQWidget* parent, const char* name = 0 ) + : TQWidget( parent, name ) { } @@ -94,19 +94,19 @@ public: /** * Default constructor */ - PMViewBase( QWidget* parent, const char* name = 0, WFlags f = 0 ) - : QWidget( parent, name, f ) + PMViewBase( TQWidget* parent, const char* name = 0, WFlags f = 0 ) + : TQWidget( parent, name, f ) { } /** * Returns the identifier for the view type. Has to be unique * for all view types. */ - virtual QString viewType( ) const = 0; + virtual TQString viewType( ) const = 0; /** * Returns a i18n'ed description */ - virtual QString description( ) const = 0; + virtual TQString description( ) const = 0; /** * Restores the view configuration * diff --git a/kpovmodeler/pmviewfactory.cpp b/kpovmodeler/pmviewfactory.cpp index 58e566cc..804c787c 100644 --- a/kpovmodeler/pmviewfactory.cpp +++ b/kpovmodeler/pmviewfactory.cpp @@ -61,8 +61,8 @@ void PMViewFactory::addViewType( PMViewTypeFactory* vt ) } } -PMViewBase* PMViewFactory::newViewInstance( const QString& viewType, - QWidget* parent, PMPart* part ) const +PMViewBase* PMViewFactory::newViewInstance( const TQString& viewType, + TQWidget* parent, PMPart* part ) const { PMViewTypeFactory* f = m_dict.find( viewType ); if( f ) @@ -72,7 +72,7 @@ PMViewBase* PMViewFactory::newViewInstance( const QString& viewType, return 0; } -PMViewOptions* PMViewFactory::newOptionsInstance( const QString& viewType ) const +PMViewOptions* PMViewFactory::newOptionsInstance( const TQString& viewType ) const { PMViewTypeFactory* f = m_dict.find( viewType ); if( f ) @@ -82,12 +82,12 @@ PMViewOptions* PMViewFactory::newOptionsInstance( const QString& viewType ) cons return 0; } -PMViewTypeFactory* PMViewFactory::viewFactory( const QString& viewType ) const +PMViewTypeFactory* PMViewFactory::viewFactory( const TQString& viewType ) const { return m_dict.find( viewType ); } -const QPtrList<PMViewTypeFactory>& PMViewFactory::viewTypes( ) const +const TQPtrList<PMViewTypeFactory>& PMViewFactory::viewTypes( ) const { return m_viewTypes; } diff --git a/kpovmodeler/pmviewfactory.h b/kpovmodeler/pmviewfactory.h index b24814cf..5fd42c1a 100644 --- a/kpovmodeler/pmviewfactory.h +++ b/kpovmodeler/pmviewfactory.h @@ -22,15 +22,15 @@ #include <config.h> #endif -#include <qstring.h> -#include <qptrlist.h> -#include <qdict.h> +#include <tqstring.h> +#include <tqptrlist.h> +#include <tqdict.h> #include <kstaticdeleter.h> class PMViewBase; -class QWidget; +class TQWidget; class PMPart; -class QDomElement; +class TQDomElement; class PMViewOptions; class PMViewOptionsWidget; @@ -52,27 +52,27 @@ public: /** * Returns the id for the view type. Choose an unique name. */ - virtual QString viewType( ) const = 0; + virtual TQString viewType( ) const = 0; /** * Returns a i18n'ed description for the view type */ - virtual QString description( ) const = 0; + virtual TQString description( ) const = 0; /** * Returns a i18n'ed description for the view type, dependent * on the options. Calls the method above by default. */ - virtual QString description( PMViewOptions* ) const + virtual TQString description( PMViewOptions* ) const { return description( ); } /** * Returns the icon name for the view */ - virtual QString iconName( ) const = 0; + virtual TQString iconName( ) const = 0; /** * Returns a new view instance */ - virtual PMViewBase* newInstance( QWidget* parent, PMPart* part ) const = 0; + virtual PMViewBase* newInstance( TQWidget* parent, PMPart* part ) const = 0; /** * Creates a config object for the view type. * If the view doesn't have special attributes, the function returns 0; @@ -81,7 +81,7 @@ public: /** * Creates a widget to configure the custom options */ - virtual PMViewOptionsWidget* newOptionsWidget( QWidget*, PMViewOptions* ) + virtual PMViewOptionsWidget* newOptionsWidget( TQWidget*, PMViewOptions* ) { return 0; } @@ -115,28 +115,28 @@ public: /** * Returns a new view of type viewType if available */ - PMViewBase* newViewInstance( const QString& viewType, - QWidget* parent, PMPart* part ) const; + PMViewBase* newViewInstance( const TQString& viewType, + TQWidget* parent, PMPart* part ) const; /** * Returns a new view option instance for the given view type */ - PMViewOptions* newOptionsInstance( const QString& viewType ) const; + PMViewOptions* newOptionsInstance( const TQString& viewType ) const; /** * Returns the factory for the given view type */ - PMViewTypeFactory* viewFactory( const QString& viewType ) const; + PMViewTypeFactory* viewFactory( const TQString& viewType ) const; /** * Returns the list of available view types */ - const QPtrList<PMViewTypeFactory>& viewTypes( ) const; + const TQPtrList<PMViewTypeFactory>& viewTypes( ) const; private: /** * Constructor */ PMViewFactory( ); - QPtrList<PMViewTypeFactory> m_viewTypes; - QDict<PMViewTypeFactory> m_dict; + TQPtrList<PMViewTypeFactory> m_viewTypes; + TQDict<PMViewTypeFactory> m_dict; static PMViewFactory* s_pInstance; static KStaticDeleter<PMViewFactory> s_staticDeleter; diff --git a/kpovmodeler/pmviewlayoutmanager.cpp b/kpovmodeler/pmviewlayoutmanager.cpp index 593eed27..fe3a031d 100644 --- a/kpovmodeler/pmviewlayoutmanager.cpp +++ b/kpovmodeler/pmviewlayoutmanager.cpp @@ -27,13 +27,13 @@ #include <kpopupmenu.h> #include <kiconloader.h> -#include <qfile.h> -#include <qdom.h> -#include <qwidgetlist.h> -#include <qlistbox.h> -#include <qlineedit.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqfile.h> +#include <tqdom.h> +#include <tqwidgetlist.h> +#include <tqlistbox.h> +#include <tqlineedit.h> +#include <tqlayout.h> +#include <tqlabel.h> #include "pmshell.h" #include "pmdebug.h" @@ -80,9 +80,9 @@ PMViewLayoutEntry::~PMViewLayoutEntry( ) delete m_pCustomOptions; } -void PMViewLayoutEntry::loadData( QDomElement& e ) +void PMViewLayoutEntry::loadData( TQDomElement& e ) { - QString s; + TQString s; bool ok; // Read the view type @@ -129,9 +129,9 @@ void PMViewLayoutEntry::loadData( QDomElement& e ) m_pCustomOptions->loadData( e ); } -void PMViewLayoutEntry::saveData( QDomElement& e ) const +void PMViewLayoutEntry::saveData( TQDomElement& e ) const { - QString s; + TQString s; e.setTagName( m_viewType ); switch( m_dockPosition ) { @@ -170,7 +170,7 @@ void PMViewLayoutEntry::saveData( QDomElement& e ) const m_pCustomOptions->saveData( e ); } -void PMViewLayoutEntry::setViewType( const QString& v ) +void PMViewLayoutEntry::setViewType( const TQString& v ) { m_viewType = v; } @@ -194,7 +194,7 @@ void PMViewLayoutEntry::setHeight( int i ) m_height = 1; } -const QString PMViewLayoutEntry::viewTypeAsString( ) +const TQString PMViewLayoutEntry::viewTypeAsString( ) { PMViewTypeFactory* f = PMViewFactory::theFactory( )->viewFactory( m_viewType ); if( f ) @@ -209,7 +209,7 @@ const QString PMViewLayoutEntry::viewTypeAsString( ) return i18n( "Unknown" ); } -const QString PMViewLayoutEntry::dockPositionAsString( ) +const TQString PMViewLayoutEntry::dockPositionAsString( ) { switch( m_dockPosition ) { @@ -255,17 +255,17 @@ PMViewLayout& PMViewLayout::operator = ( const PMViewLayout& vl ) return *this; } -void PMViewLayout::loadData( QDomElement& e ) +void PMViewLayout::loadData( TQDomElement& e ) { m_entries.clear( ); m_name = e.attribute( "name", "unnamed" ); - QDomNode m = e.firstChild( ); + TQDomNode m = e.firstChild( ); while( !m.isNull( ) ) { if( m.isElement( ) ) { - QDomElement me = m.toElement( ); + TQDomElement me = m.toElement( ); PMViewLayoutEntry vle; vle.loadData( me ); @@ -276,21 +276,21 @@ void PMViewLayout::loadData( QDomElement& e ) normalize( ); } -void PMViewLayout::saveData( QDomElement& e, QDomDocument& doc ) const +void PMViewLayout::saveData( TQDomElement& e, TQDomDocument& doc ) const { - QValueList< PMViewLayoutEntry>::const_iterator it; + TQValueList< PMViewLayoutEntry>::const_iterator it; e.setAttribute( "name", m_name ); for( it = m_entries.begin( ); it != m_entries.end( ) ; ++it ) { - QDomElement a; + TQDomElement a; a = doc.createElement( "unknown" ); ( *it ).saveData( a ); e.appendChild( a ); } } -void PMViewLayout::setName( const QString& n ) +void PMViewLayout::setName( const TQString& n ) { m_name = n; } @@ -311,7 +311,7 @@ void PMViewLayout::removeEntry( int index ) void PMViewLayout::displayLayout( PMShell* shell ) { PMDockWidget* lastWidget = 0; - QValueList< PMViewLayoutEntry>::const_iterator it; + TQValueList< PMViewLayoutEntry>::const_iterator it; bool isViewSet = false; int lastWidth = 0, width = 100; int lastHeight = 0, height = 100; @@ -326,7 +326,7 @@ void PMViewLayout::displayLayout( PMShell* shell ) { // the specified target is the desktop dock->manualDock( 0, PMDockWidget::DockDesktop, 50, - QPoint( ( *it ).floatingPositionX( ), + TQPoint( ( *it ).floatingPositionX( ), ( *it ).floatingPositionY( ) ) ); dock->resize( ( *it ).floatingWidth( ), ( *it ).floatingHeight( ) ); dock->show( ); @@ -445,35 +445,35 @@ PMViewLayout PMViewLayout::extractViewLayout( PMShell* shell ) { PMViewLayout layout; - QValueList< QValueList< PMViewLayoutEntry > > cols; - cols.append( QValueList< PMViewLayoutEntry >( ) ); + TQValueList< TQValueList< PMViewLayoutEntry > > cols; + cols.append( TQValueList< PMViewLayoutEntry >( ) ); // find docked widgets recursiveExtractColumns( cols, cols.begin( ), 100, shell->centralWidget( ) ); - QValueListIterator< QValueList< PMViewLayoutEntry > > cit; - QValueListIterator< PMViewLayoutEntry > eit; + TQValueListIterator< TQValueList< PMViewLayoutEntry > > cit; + TQValueListIterator< PMViewLayoutEntry > eit; for( cit = cols.begin( ); cit != cols.end( ); ++cit ) for( eit = ( *cit ).begin( ); eit != ( *cit ).end( ); ++eit ) layout.addEntry( *eit ); // find floating widgets - QPtrList<PMDockWidget> list; + TQPtrList<PMDockWidget> list; shell->manager( )->findFloatingWidgets( list ); - QPtrListIterator<PMDockWidget> it( list ); + TQPtrListIterator<PMDockWidget> it( list ); for( ; it.current( ); ++it ) { kdDebug( PMArea ) << it.current( ) << " " << it.current( )->isVisible( ) << endl; - QWidget* w = it.current( )->getWidget( ); + TQWidget* w = it.current( )->getWidget( ); if( w ) { bool invalid = false; PMViewLayoutEntry e; e.setDockPosition( PMDockWidget::DockNone ); - QPoint p = it.current( )->pos( ); + TQPoint p = it.current( )->pos( ); e.setFloatingPositionX( p.x( ) ); e.setFloatingPositionY( p.y( ) ); e.setFloatingWidth( it.current( )->width( ) ); @@ -503,9 +503,9 @@ PMViewLayout PMViewLayout::extractViewLayout( PMShell* shell ) } void PMViewLayout::recursiveExtractColumns( - QValueList< QValueList< PMViewLayoutEntry > >& cols, - QValueList< QValueList< PMViewLayoutEntry > >::iterator cit, - int width, QWidget* widget ) + TQValueList< TQValueList< PMViewLayoutEntry > >& cols, + TQValueList< TQValueList< PMViewLayoutEntry > >::iterator cit, + int width, TQWidget* widget ) { if( !widget ) return; @@ -513,7 +513,7 @@ void PMViewLayout::recursiveExtractColumns( if( widget->inherits( "PMDockWidget" ) ) { PMDockWidget* dw = ( PMDockWidget* ) widget; - QWidget* w = dw->getWidget( ); + TQWidget* w = dw->getWidget( ); if( w ) { bool colStart = true; @@ -529,8 +529,8 @@ void PMViewLayout::recursiveExtractColumns( if( w1 == 0 ) w1++; if( w2 == 0 ) w2++; - QValueList< QValueList< PMViewLayoutEntry > >::iterator cit1 - = cols.insert( cit, QValueList< PMViewLayoutEntry >( ) ); + TQValueList< TQValueList< PMViewLayoutEntry > >::iterator cit1 + = cols.insert( cit, TQValueList< PMViewLayoutEntry >( ) ); recursiveExtractColumns( cols, cit1, w1, sp->getFirst( ) ); recursiveExtractColumns( cols, cit, w2, sp->getLast( ) ); @@ -550,9 +550,9 @@ void PMViewLayout::recursiveExtractColumns( } void PMViewLayout::recursiveExtractOneColumn( - QValueList< PMViewLayoutEntry >& entries, - QValueList< PMViewLayoutEntry >::iterator eit, - int height, QWidget* widget ) + TQValueList< PMViewLayoutEntry >& entries, + TQValueList< PMViewLayoutEntry >::iterator eit, + int height, TQWidget* widget ) { if( !widget ) return; @@ -560,7 +560,7 @@ void PMViewLayout::recursiveExtractOneColumn( if( widget->inherits( "PMDockWidget" ) ) { PMDockWidget* dw = ( PMDockWidget* ) widget; - QWidget* w = dw->getWidget( ); + TQWidget* w = dw->getWidget( ); if( w ) { if( w->inherits( "PMDockSplitter" ) ) @@ -578,7 +578,7 @@ void PMViewLayout::recursiveExtractOneColumn( PMViewLayoutEntry e; e.setHeight( h2 ); e.setDockPosition( PMDockWidget::DockBottom ); - QValueList< PMViewLayoutEntry >::iterator eit1 = eit; + TQValueList< PMViewLayoutEntry >::iterator eit1 = eit; eit1 = entries.insert( ++eit1, e ); recursiveExtractOneColumn( entries, eit, h1, sp->getFirst( ) ); @@ -588,7 +588,7 @@ void PMViewLayout::recursiveExtractOneColumn( { PMDockTabGroup* g = ( PMDockTabGroup* ) w; int num = g->count( ); - QWidget* tw; + TQWidget* tw; int i; for( i = 0; i < num; i++ ) { @@ -640,15 +640,15 @@ PMViewLayoutManager::~PMViewLayoutManager( ) { } -void PMViewLayoutManager::setDefaultLayout( const QString& name ) +void PMViewLayoutManager::setDefaultLayout( const TQString& name ) { m_defaultLayout = name; } -QStringList PMViewLayoutManager::availableLayouts( ) +TQStringList PMViewLayoutManager::availableLayouts( ) { - QStringList result; - QValueListIterator<PMViewLayout> it; + TQStringList result; + TQValueListIterator<PMViewLayout> it; for( it = m_layouts.begin( ); it != m_layouts.end( ); ++it ) result.push_back( ( *it ).name( ) ); @@ -663,7 +663,7 @@ void PMViewLayoutManager::loadData( ) m_layoutsLoaded = true; - QString fileName = locate( "data", "kpovmodeler/viewlayouts.xml" ); + TQString fileName = locate( "data", "kpovmodeler/viewlayouts.xml" ); if( fileName.isEmpty( ) ) { // Generate a default layout @@ -707,7 +707,7 @@ void PMViewLayoutManager::loadData( ) return; } - QFile file( fileName ); + TQFile file( fileName ); if( !file.open( IO_ReadOnly ) ) { kdError( PMArea ) << i18n( "Could not open the view layouts file." ) @@ -715,21 +715,21 @@ void PMViewLayoutManager::loadData( ) return; } - QDomDocument doc( "VIEWLAYOUTS" ); + TQDomDocument doc( "VIEWLAYOUTS" ); doc.setContent( &file ); - QDomElement e = doc.documentElement( ); + TQDomElement e = doc.documentElement( ); m_defaultLayout = e.attribute( "default", "empty" ); - QDomNode c = e.firstChild( ); + TQDomNode c = e.firstChild( ); - QString str; + TQString str; while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); PMViewLayout v; v.loadData( ce ); m_layouts.append( v ); @@ -740,36 +740,36 @@ void PMViewLayoutManager::loadData( ) void PMViewLayoutManager::saveData( ) { - QString fileName = locateLocal( "data", "kpovmodeler/viewlayouts.xml" ); + TQString fileName = locateLocal( "data", "kpovmodeler/viewlayouts.xml" ); if( fileName.isEmpty( ) ) { kdError( PMArea ) << i18n( "View layouts not found." ) << endl; return; } - QFile file( fileName ); + TQFile file( fileName ); if( !file.open( IO_WriteOnly ) ) { kdError( PMArea ) << i18n( "Could not open the view layouts file." ) << endl; return; } - QDomDocument doc( "VIEWLAYOUTS" ); - QDomElement e = doc.createElement( "viewlist" ); + TQDomDocument doc( "VIEWLAYOUTS" ); + TQDomElement e = doc.createElement( "viewlist" ); e.setAttribute( "default", m_defaultLayout ); - QValueListIterator<PMViewLayout> it; + TQValueListIterator<PMViewLayout> it; for( it = m_layouts.begin( ); it != m_layouts.end( ); ++it ) { - QDomElement l; + TQDomElement l; l = doc.createElement( "viewlayout" ); ( *it ).saveData( l, doc ); e.appendChild( l ); } doc.appendChild( e ); - QTextStream str( &file ); - str.setEncoding( QTextStream::UnicodeUTF8 ); + TQTextStream str( &file ); + str.setEncoding( TQTextStream::UnicodeUTF8 ); str << doc.toString( ); file.close( ); } @@ -781,7 +781,7 @@ PMViewLayoutManager* PMViewLayoutManager::theManager( ) return s_pInstance; } -void PMViewLayoutManager::displayLayout( const QString& name, PMShell* shell ) +void PMViewLayoutManager::displayLayout( const TQString& name, PMShell* shell ) { PMViewLayout* v_layout = findLayout( name ); @@ -790,7 +790,7 @@ void PMViewLayoutManager::displayLayout( const QString& name, PMShell* shell ) // Destroy the existing dock widgets if( m_layoutDisplayed ) { - QWidgetList lst; + TQWidgetList lst; if( shell->centralWidget( ) ) shell->manager( )->findChildDockWidget( shell->centralWidget( ), lst ); @@ -801,7 +801,7 @@ void PMViewLayoutManager::displayLayout( const QString& name, PMShell* shell ) lst.remove( ); } - QPtrList<PMDockWidget> flist; + TQPtrList<PMDockWidget> flist; shell->manager( )->findFloatingWidgets( flist ); while( flist.first( ) ) { @@ -821,9 +821,9 @@ void PMViewLayoutManager::displayDefaultLayout( PMShell* shell ) displayLayout( m_defaultLayout, shell ); } -PMViewLayout* PMViewLayoutManager::findLayout( const QString& name ) +PMViewLayout* PMViewLayoutManager::findLayout( const TQString& name ) { - QValueListIterator<PMViewLayout> it; + TQValueListIterator<PMViewLayout> it; for( it = m_layouts.begin( ); it != m_layouts.end( ) && ( *it ).name( ) != name; ++it ); @@ -834,8 +834,8 @@ PMViewLayout* PMViewLayoutManager::findLayout( const QString& name ) void PMViewLayoutManager::fillPopupMenu( KPopupMenu* pMenu ) { - QStringList lst = availableLayouts( ); - QStringList::ConstIterator it = lst.begin( ); + TQStringList lst = availableLayouts( ); + TQStringList::ConstIterator it = lst.begin( ); pMenu->clear( ); if( it != lst.end( ) ) @@ -845,7 +845,7 @@ void PMViewLayoutManager::fillPopupMenu( KPopupMenu* pMenu ) } } -void PMViewLayoutManager::addLayout( const QString& name ) +void PMViewLayoutManager::addLayout( const TQString& name ) { PMViewLayout a; @@ -855,9 +855,9 @@ void PMViewLayoutManager::addLayout( const QString& name ) m_layouts.append( a ); } -void PMViewLayoutManager::removeLayout( const QString& name ) +void PMViewLayoutManager::removeLayout( const TQString& name ) { - QValueListIterator<PMViewLayout> it; + TQValueListIterator<PMViewLayout> it; for( it = m_layouts.begin( ); it != m_layouts.end( ) && ( *it ).name( ) != name; ++it ); @@ -876,26 +876,26 @@ PMSaveViewLayoutDialog::PMSaveViewLayoutDialog( PMShell* parent, setButtonOK( KStdGuiItem::save() ); enableButtonOK( false ); - QWidget* w = new QWidget( this ); - QVBoxLayout* vl = new QVBoxLayout( w, 0, KDialog::spacingHint( ) ); + TQWidget* w = new TQWidget( this ); + TQVBoxLayout* vl = new TQVBoxLayout( w, 0, KDialog::spacingHint( ) ); - QLabel* l = new QLabel( i18n( "Enter view layout name:" ), w ); + TQLabel* l = new TQLabel( i18n( "Enter view layout name:" ), w ); vl->addWidget( l ); - m_pLayoutName = new QLineEdit( w ); + m_pLayoutName = new TQLineEdit( w ); vl->addWidget( m_pLayoutName ); - connect( m_pLayoutName, SIGNAL( textChanged( const QString& ) ), - SLOT( slotNameChanged( const QString& ) ) ); + connect( m_pLayoutName, TQT_SIGNAL( textChanged( const TQString& ) ), + TQT_SLOT( slotNameChanged( const TQString& ) ) ); - QListBox* lb = new QListBox( w ); + TQListBox* lb = new TQListBox( w ); vl->addWidget( lb ); - connect( lb, SIGNAL( highlighted( const QString& ) ), - SLOT( slotNameSelected( const QString& ) ) ); + connect( lb, TQT_SIGNAL( highlighted( const TQString& ) ), + TQT_SLOT( slotNameSelected( const TQString& ) ) ); lb->insertStringList( PMViewLayoutManager::theManager( ) ->availableLayouts( ) ); setMainWidget( w ); - setInitialSize( QSize( 300, 200 ) ); + setInitialSize( TQSize( 300, 200 ) ); } PMSaveViewLayoutDialog::~PMSaveViewLayoutDialog( ) @@ -904,7 +904,7 @@ PMSaveViewLayoutDialog::~PMSaveViewLayoutDialog( ) void PMSaveViewLayoutDialog::slotOk( ) { - QString name = m_pLayoutName->text( ); + TQString name = m_pLayoutName->text( ); PMViewLayoutManager* m = PMViewLayoutManager::theManager( ); PMViewLayout* layout = m->findLayout( name ); @@ -922,12 +922,12 @@ void PMSaveViewLayoutDialog::slotOk( ) KDialogBase::slotOk( ); } -void PMSaveViewLayoutDialog::slotNameChanged( const QString& s ) +void PMSaveViewLayoutDialog::slotNameChanged( const TQString& s ) { enableButtonOK( !s.isEmpty( ) ); } -void PMSaveViewLayoutDialog::slotNameSelected( const QString& s ) +void PMSaveViewLayoutDialog::slotNameSelected( const TQString& s ) { m_pLayoutName->setText( s ); } diff --git a/kpovmodeler/pmviewlayoutmanager.h b/kpovmodeler/pmviewlayoutmanager.h index c0246c5d..01235337 100644 --- a/kpovmodeler/pmviewlayoutmanager.h +++ b/kpovmodeler/pmviewlayoutmanager.h @@ -25,9 +25,9 @@ #include <config.h> #endif -#include <qstring.h> -#include <qmap.h> -#include <qvaluelist.h> +#include <tqstring.h> +#include <tqmap.h> +#include <tqvaluelist.h> #include <kstaticdeleter.h> #include <kdialogbase.h> @@ -36,8 +36,8 @@ #include "pmviewbase.h" class KConfig; -class QDomElement; -class QLineEdit; +class TQDomElement; +class TQLineEdit; class PMShell; /** @@ -61,8 +61,8 @@ public: */ ~PMViewLayoutEntry( ); - QString viewType( ) const { return m_viewType; } - void setViewType( const QString& vt ); + TQString viewType( ) const { return m_viewType; } + void setViewType( const TQString& vt ); PMDockWidget::DockPosition dockPosition( ) const { return m_dockPosition; } void setDockPosition( PMDockWidget::DockPosition i ); @@ -84,17 +84,17 @@ public: int floatingPositionY( ) const { return m_floatingPositionY; } void setFloatingPositionY( int p ) { m_floatingPositionY = p; } - void loadData( QDomElement& e ); - void saveData( QDomElement& e ) const; + void loadData( TQDomElement& e ); + void saveData( TQDomElement& e ) const; PMViewOptions* customOptions( ) const { return m_pCustomOptions; } void setCustomOptions( PMViewOptions* o ); - const QString dockPositionAsString( ); - const QString viewTypeAsString( ); + const TQString dockPositionAsString( ); + const TQString viewTypeAsString( ); private: - QString m_viewType; + TQString m_viewType; PMDockWidget::DockPosition m_dockPosition; int m_columnWidth; int m_height; @@ -114,7 +114,7 @@ private: class PMViewLayout { public: - typedef QValueList< PMViewLayoutEntry >::iterator iterator; + typedef TQValueList< PMViewLayoutEntry >::iterator iterator; /** * Constructor */ @@ -133,11 +133,11 @@ public: */ PMViewLayout& operator = ( const PMViewLayout& vl ); - QString name( ) const { return m_name; } + TQString name( ) const { return m_name; } - void loadData( QDomElement& e ); + void loadData( TQDomElement& e ); - void saveData( QDomElement& e, QDomDocument& doc ) const; + void saveData( TQDomElement& e, TQDomDocument& doc ) const; /** * Destroy all dock widgets in PMShell and create the new ones */ @@ -145,7 +145,7 @@ public: /** * Sets the name of the layout */ - void setName( const QString& n ); + void setName( const TQString& n ); /** * * Add a new entry to the layout. By default it adds the entry at the end @@ -184,17 +184,17 @@ public: static PMViewLayout extractViewLayout( PMShell* shell ); private: static void recursiveExtractColumns( - QValueList< QValueList< PMViewLayoutEntry > >& cols, - QValueList< QValueList< PMViewLayoutEntry > >::iterator cit, - int width, QWidget* widget ); + TQValueList< TQValueList< PMViewLayoutEntry > >& cols, + TQValueList< TQValueList< PMViewLayoutEntry > >::iterator cit, + int width, TQWidget* widget ); static void recursiveExtractOneColumn( - QValueList< PMViewLayoutEntry >& entries, - QValueList< PMViewLayoutEntry >::iterator eit, - int height, QWidget* widget ); + TQValueList< PMViewLayoutEntry >& entries, + TQValueList< PMViewLayoutEntry >::iterator eit, + int height, TQWidget* widget ); - QString m_name; - QValueList< PMViewLayoutEntry > m_entries; + TQString m_name; + TQValueList< PMViewLayoutEntry > m_entries; }; /** @@ -219,19 +219,19 @@ public: /** * Returns the list of available view layouts */ - QStringList availableLayouts( ); + TQStringList availableLayouts( ); /** * Sets the default layout */ - void setDefaultLayout( const QString& name ); + void setDefaultLayout( const TQString& name ); /** * Returns the default layout */ - QString defaultLayout( ) const { return m_defaultLayout; } + TQString defaultLayout( ) const { return m_defaultLayout; } /** * Destroy all dock widgets in PMShell and create the new ones */ - void displayLayout( const QString& name, PMShell* shell ); + void displayLayout( const TQString& name, PMShell* shell ); /** * Displays the layout indicated as default */ @@ -247,7 +247,7 @@ public: /** * Add a new empty layout */ - void addLayout( const QString& name ); + void addLayout( const TQString& name ); /** * Add a new layout */ @@ -255,19 +255,19 @@ public: /** * Remove a layout */ - void removeLayout( const QString& name ); + void removeLayout( const TQString& name ); /** * Get a known layout */ - PMViewLayout* findLayout( const QString& name ); + PMViewLayout* findLayout( const TQString& name ); /** * Returns the list of available layouts */ - QValueList<PMViewLayout> layouts( ) { return m_layouts; } + TQValueList<PMViewLayout> layouts( ) { return m_layouts; } /** * Sets the list of available layouts */ - void setLayouts( const QValueList<PMViewLayout>& l ) { m_layouts = l; } + void setLayouts( const TQValueList<PMViewLayout>& l ) { m_layouts = l; } /** * Fill the available layouts menu */ @@ -280,8 +280,8 @@ private: bool m_layoutsLoaded; bool m_layoutDisplayed; - QString m_defaultLayout; - QValueList< PMViewLayout > m_layouts; + TQString m_defaultLayout; + TQValueList< PMViewLayout > m_layouts; static PMViewLayoutManager* s_pInstance; static KStaticDeleter<PMViewLayoutManager> s_staticDeleter; @@ -296,10 +296,10 @@ public: ~PMSaveViewLayoutDialog( ); protected slots: virtual void slotOk( ); - void slotNameChanged( const QString& ); - void slotNameSelected( const QString& ); + void slotNameChanged( const TQString& ); + void slotNameSelected( const TQString& ); private: - QLineEdit* m_pLayoutName; + TQLineEdit* m_pLayoutName; PMShell* m_pShell; }; diff --git a/kpovmodeler/pmwarp.cpp b/kpovmodeler/pmwarp.cpp index 76d58cf3..166777ce 100644 --- a/kpovmodeler/pmwarp.cpp +++ b/kpovmodeler/pmwarp.cpp @@ -101,12 +101,12 @@ PMWarp::~PMWarp( ) { } -QString PMWarp::description( ) const +TQString PMWarp::description( ) const { return i18n( "warp" ); } -void PMWarp::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const +void PMWarp::serialize( TQDomElement& e, TQDomDocument& /*doc*/ ) const { bool mapping = false; @@ -164,7 +164,7 @@ void PMWarp::serialize( QDomElement& e, QDomDocument& /*doc*/ ) const void PMWarp::readAttributes( const PMXMLHelper& h ) { bool mapping = false; - QString str = h.stringAttribute( "warp_type", "repeat" ); + TQString str = h.stringAttribute( "warp_type", "repeat" ); if( str == "repeat" ) { @@ -467,7 +467,7 @@ void PMWarp::setMajorRadius( const double c ) } } -PMDialogEditBase* PMWarp::editWidget( QWidget* parent ) const +PMDialogEditBase* PMWarp::editWidget( TQWidget* parent ) const { return new PMWarpEdit( parent ); } diff --git a/kpovmodeler/pmwarp.h b/kpovmodeler/pmwarp.h index a6ed213b..6b50f498 100644 --- a/kpovmodeler/pmwarp.h +++ b/kpovmodeler/pmwarp.h @@ -53,7 +53,7 @@ public: /** */ virtual PMObject* copy( ) const { return new PMWarp( *this ); } /** */ - virtual QString description( ) const; + virtual TQString description( ) const; /** */ virtual PMMetaObject* metaObject( ) const; @@ -61,19 +61,19 @@ public: virtual void cleanUp( ) const; /** */ - virtual void serialize( QDomElement& e, QDomDocument& doc ) const; + virtual void serialize( TQDomElement& e, TQDomDocument& doc ) const; /** */ virtual void readAttributes( const PMXMLHelper& h ); /** * Returns a new @ref PMWarpEdit */ - virtual PMDialogEditBase* editWidget( QWidget* parent ) const; + virtual PMDialogEditBase* editWidget( TQWidget* parent ) const; /** * Returns the name of the pixmap that is displayed in the tree view * and dialog view */ - virtual QString pixmap( ) const { return QString( "pmwarp" ); } + virtual TQString pixmap( ) const { return TQString( "pmwarp" ); } PMWarpType warpType( ) const { return m_warpType; } void setWarpType( PMWarpType c ); diff --git a/kpovmodeler/pmwarpedit.cpp b/kpovmodeler/pmwarpedit.cpp index 99c620dd..3f247eee 100644 --- a/kpovmodeler/pmwarpedit.cpp +++ b/kpovmodeler/pmwarpedit.cpp @@ -21,15 +21,15 @@ #include "pmvectoredit.h" #include "pmlineedits.h" -#include <qlayout.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qcheckbox.h> +#include <tqlayout.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqcheckbox.h> #include <klocale.h> #include <kdialog.h> -PMWarpEdit::PMWarpEdit( QWidget* parent, const char* name ) +PMWarpEdit::PMWarpEdit( TQWidget* parent, const char* name ) : Base( parent, name ) { m_pDisplayedObject = 0; @@ -37,14 +37,14 @@ PMWarpEdit::PMWarpEdit( QWidget* parent, const char* name ) void PMWarpEdit::createTopWidgets( ) { - QHBoxLayout* hl; - QVBoxLayout* vl; - QGridLayout* gl; + TQHBoxLayout* hl; + TQVBoxLayout* vl; + TQGridLayout* gl; Base::createTopWidgets( ); - QLabel* label = new QLabel( i18n( "Warp type:" ), this ); - m_pWarpTypeEdit = new QComboBox( false, this ); + TQLabel* label = new TQLabel( i18n( "Warp type:" ), this ); + m_pWarpTypeEdit = new TQComboBox( false, this ); m_pWarpTypeEdit->insertItem( i18n( "Repeat" ) ); m_pWarpTypeEdit->insertItem( i18n( "Black Hole" ) ); m_pWarpTypeEdit->insertItem( i18n( "Turbulence" ) ); @@ -52,44 +52,44 @@ void PMWarpEdit::createTopWidgets( ) m_pWarpTypeEdit->insertItem( i18n( "Spherical" ) ); m_pWarpTypeEdit->insertItem( i18n( "Toroidal" ) ); m_pWarpTypeEdit->insertItem( i18n( "Planar" ) ); - hl = new QHBoxLayout( topLayout( ) ); + hl = new TQHBoxLayout( topLayout( ) ); hl->addWidget( label ); hl->addWidget( m_pWarpTypeEdit ); hl->addStretch( 1 ); /* Repeat Warp Objects */ - m_pRepeatWidget = new QWidget( this ); - vl = new QVBoxLayout( m_pRepeatWidget, 0, KDialog::spacingHint( ) ); - gl = new QGridLayout( vl, 3, 2 ); - m_pDirectionLabel = new QLabel( i18n( "Direction:" ), m_pRepeatWidget ); + m_pRepeatWidget = new TQWidget( this ); + vl = new TQVBoxLayout( m_pRepeatWidget, 0, KDialog::spacingHint( ) ); + gl = new TQGridLayout( vl, 3, 2 ); + m_pDirectionLabel = new TQLabel( i18n( "Direction:" ), m_pRepeatWidget ); m_pDirectionEdit = new PMVectorEdit( "x", "y", "z", m_pRepeatWidget ); gl->addWidget( m_pDirectionLabel, 0, 0 ); gl->addWidget( m_pDirectionEdit, 0, 1 ); - m_pOffsetLabel = new QLabel( i18n( "Offset:" ), m_pRepeatWidget ); + m_pOffsetLabel = new TQLabel( i18n( "Offset:" ), m_pRepeatWidget ); m_pOffsetEdit = new PMVectorEdit( "x", "y", "z", m_pRepeatWidget ); gl->addWidget( m_pOffsetLabel, 1, 0 ); gl->addWidget( m_pOffsetEdit, 1, 1 ); - m_pFlipLabel = new QLabel( i18n( "Flip:" ), m_pRepeatWidget ); + m_pFlipLabel = new TQLabel( i18n( "Flip:" ), m_pRepeatWidget ); m_pFlipEdit = new PMVectorEdit( "x", "y", "z", m_pRepeatWidget ); gl->addWidget( m_pFlipLabel, 2, 0 ); gl->addWidget( m_pFlipEdit, 2, 1 ); /* Black Hole Warp Objects */ - m_pBlackHoleWidget = new QWidget( this ); - vl = new QVBoxLayout( m_pBlackHoleWidget, 0, KDialog::spacingHint( ) ); - m_pLocationLabel = new QLabel( i18n( "Location:" ), m_pBlackHoleWidget ); + m_pBlackHoleWidget = new TQWidget( this ); + vl = new TQVBoxLayout( m_pBlackHoleWidget, 0, KDialog::spacingHint( ) ); + m_pLocationLabel = new TQLabel( i18n( "Location:" ), m_pBlackHoleWidget ); m_pLocationEdit = new PMVectorEdit( "x", "y", "z", m_pBlackHoleWidget ); - hl = new QHBoxLayout( vl ); + hl = new TQHBoxLayout( vl ); hl->addWidget( m_pLocationLabel ); hl->addWidget( m_pLocationEdit ); - m_pRadiusLabel = new QLabel( i18n( "Radius:" ), m_pBlackHoleWidget ); + m_pRadiusLabel = new TQLabel( i18n( "Radius:" ), m_pBlackHoleWidget ); m_pRadiusEdit = new PMFloatEdit( m_pBlackHoleWidget ); - m_pStrengthLabel = new QLabel( i18n( "Strength:" ), m_pBlackHoleWidget ); + m_pStrengthLabel = new TQLabel( i18n( "Strength:" ), m_pBlackHoleWidget ); m_pStrengthEdit = new PMFloatEdit( m_pBlackHoleWidget ); - m_pFalloffLabel = new QLabel( i18n( "Falloff:" ), m_pBlackHoleWidget ); + m_pFalloffLabel = new TQLabel( i18n( "Falloff:" ), m_pBlackHoleWidget ); m_pFalloffEdit = new PMFloatEdit( m_pBlackHoleWidget ); - hl = new QHBoxLayout( vl ); - gl = new QGridLayout( hl, 3, 2 ); + hl = new TQHBoxLayout( vl ); + gl = new TQGridLayout( hl, 3, 2 ); gl->addWidget( m_pRadiusLabel, 0, 0 ); gl->addWidget( m_pRadiusEdit, 0, 1 ); gl->addWidget( m_pStrengthLabel, 1, 0 ); @@ -98,88 +98,88 @@ void PMWarpEdit::createTopWidgets( ) gl->addWidget( m_pFalloffEdit, 2, 1 ); hl->addStretch( 1 ); - m_pRepeatLabel = new QLabel( i18n( "Repeat:" ), m_pBlackHoleWidget ); + m_pRepeatLabel = new TQLabel( i18n( "Repeat:" ), m_pBlackHoleWidget ); m_pRepeatEdit = new PMVectorEdit( "x", "y", "z", m_pBlackHoleWidget ); - hl = new QHBoxLayout( vl ); + hl = new TQHBoxLayout( vl ); hl->addWidget( m_pRepeatLabel ); hl->addWidget( m_pRepeatEdit ); - m_pTurbulenceLabel = new QLabel( i18n( "Turbulence:" ), m_pBlackHoleWidget ); + m_pTurbulenceLabel = new TQLabel( i18n( "Turbulence:" ), m_pBlackHoleWidget ); m_pTurbulenceEdit = new PMVectorEdit( "x", "y", "z", m_pBlackHoleWidget ); - hl = new QHBoxLayout( vl ); + hl = new TQHBoxLayout( vl ); hl->addWidget( m_pTurbulenceLabel ); hl->addWidget( m_pTurbulenceEdit ); - m_pInverseEdit = new QCheckBox( i18n( "Inverse" ), m_pBlackHoleWidget ); + m_pInverseEdit = new TQCheckBox( i18n( "Inverse" ), m_pBlackHoleWidget ); vl->addWidget( m_pInverseEdit ); /* Turbulence Warp Objects */ - m_pTurbulenceWidget = new QWidget( this ); - vl = new QVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) ); - m_pValueVectorLabel = new QLabel( i18n( "Value:" ), m_pTurbulenceWidget ); + m_pTurbulenceWidget = new TQWidget( this ); + vl = new TQVBoxLayout( m_pTurbulenceWidget, 0, KDialog::spacingHint( ) ); + m_pValueVectorLabel = new TQLabel( i18n( "Value:" ), m_pTurbulenceWidget ); m_pValueVectorEdit = new PMVectorEdit( "x", "y", "z", m_pTurbulenceWidget ); - hl = new QHBoxLayout( vl ); + hl = new TQHBoxLayout( vl ); hl->addWidget( m_pValueVectorLabel ); hl->addWidget( m_pValueVectorEdit ); - hl = new QHBoxLayout( vl ); - gl = new QGridLayout( hl, 3, 2 ); - m_pOctavesLabel = new QLabel( i18n( "Octaves:" ), m_pTurbulenceWidget ); + hl = new TQHBoxLayout( vl ); + gl = new TQGridLayout( hl, 3, 2 ); + m_pOctavesLabel = new TQLabel( i18n( "Octaves:" ), m_pTurbulenceWidget ); m_pOctavesEdit = new PMIntEdit( m_pTurbulenceWidget ); gl->addWidget( m_pOctavesLabel, 0, 0 ); gl->addWidget( m_pOctavesEdit, 0, 1 ); - m_pOmegaLabel = new QLabel( i18n( "Omega:" ), m_pTurbulenceWidget ); + m_pOmegaLabel = new TQLabel( i18n( "Omega:" ), m_pTurbulenceWidget ); m_pOmegaEdit = new PMFloatEdit( m_pTurbulenceWidget ); gl->addWidget( m_pOmegaLabel, 1, 0 ); gl->addWidget( m_pOmegaEdit, 1, 1 ); - m_pLambdaLabel = new QLabel( i18n( "Lambda:" ), m_pTurbulenceWidget ); + m_pLambdaLabel = new TQLabel( i18n( "Lambda:" ), m_pTurbulenceWidget ); m_pLambdaEdit = new PMFloatEdit( m_pTurbulenceWidget ); gl->addWidget( m_pLambdaLabel, 2, 0 ); gl->addWidget( m_pLambdaEdit, 2, 1 ); hl->addStretch( 1 ); /* Mapping Warp Objects */ - m_pMappingWidget = new QWidget( this ); - vl = new QVBoxLayout( m_pMappingWidget, 0, KDialog::spacingHint( ) ); - label = new QLabel( i18n( "Orientation:" ), m_pMappingWidget ); + m_pMappingWidget = new TQWidget( this ); + vl = new TQVBoxLayout( m_pMappingWidget, 0, KDialog::spacingHint( ) ); + label = new TQLabel( i18n( "Orientation:" ), m_pMappingWidget ); m_pOrientationEdit = new PMVectorEdit( "x", "y", "z", m_pMappingWidget ); - hl = new QHBoxLayout( vl ); + hl = new TQHBoxLayout( vl ); hl->addWidget( label ); hl->addWidget( m_pOrientationEdit ); - gl = new QGridLayout( vl, 2, 2 ); - label = new QLabel( i18n( "Distance exponent:" ), m_pMappingWidget ); + gl = new TQGridLayout( vl, 2, 2 ); + label = new TQLabel( i18n( "Distance exponent:" ), m_pMappingWidget ); m_pDistExpEdit = new PMFloatEdit( m_pMappingWidget ); gl->addWidget( label, 0, 0 ); gl->addWidget( m_pDistExpEdit, 0, 1 ); - m_pMajorRadiusLabel = new QLabel( i18n( "Major radius:" ), m_pMappingWidget ); + m_pMajorRadiusLabel = new TQLabel( i18n( "Major radius:" ), m_pMappingWidget ); m_pMajorRadiusEdit = new PMFloatEdit( m_pMappingWidget ); gl->addWidget( m_pMajorRadiusLabel, 1, 0 ); gl->addWidget( m_pMajorRadiusEdit, 1, 1 ); - vl = new QVBoxLayout( topLayout( ) ); + vl = new TQVBoxLayout( topLayout( ) ); vl->addSpacing( 0 ); vl->addWidget( m_pRepeatWidget ); vl->addWidget( m_pBlackHoleWidget ); vl->addWidget( m_pTurbulenceWidget ); vl->addWidget( m_pMappingWidget ); - connect( m_pWarpTypeEdit, SIGNAL( activated( int ) ), SLOT( slotComboChanged( int ) ) ); - connect( m_pDirectionEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOffsetEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFlipEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pLocationEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRadiusEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pStrengthEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pFalloffEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pInverseEdit, SIGNAL( clicked( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pRepeatEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pTurbulenceEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pValueVectorEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOctavesEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOmegaEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pLambdaEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pOrientationEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pDistExpEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); - connect( m_pMajorRadiusEdit, SIGNAL( dataChanged( ) ), SIGNAL( dataChanged( ) ) ); + connect( m_pWarpTypeEdit, TQT_SIGNAL( activated( int ) ), TQT_SLOT( slotComboChanged( int ) ) ); + connect( m_pDirectionEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOffsetEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFlipEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pLocationEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRadiusEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pStrengthEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pFalloffEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pInverseEdit, TQT_SIGNAL( clicked( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pRepeatEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pTurbulenceEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pValueVectorEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOctavesEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOmegaEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pLambdaEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pOrientationEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pDistExpEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); + connect( m_pMajorRadiusEdit, TQT_SIGNAL( dataChanged( ) ), TQT_SIGNAL( dataChanged( ) ) ); } void PMWarpEdit::displayObject( PMObject* o ) diff --git a/kpovmodeler/pmwarpedit.h b/kpovmodeler/pmwarpedit.h index 1140e3e6..fa12a358 100644 --- a/kpovmodeler/pmwarpedit.h +++ b/kpovmodeler/pmwarpedit.h @@ -30,9 +30,9 @@ class PMWarp; class PMVectorEdit; class PMIntEdit; class PMFloatEdit; -class QComboBox; -class QCheckBox; -class QLabel; +class TQComboBox; +class TQCheckBox; +class TQLabel; /** * Dialog edit class for @ref PMWarp. @@ -45,7 +45,7 @@ public: /** * Creates a PMWarpEdit with parent and name */ - PMWarpEdit( QWidget* parent, const char* name = 0 ); + PMWarpEdit( TQWidget* parent, const char* name = 0 ); /** */ virtual void displayObject( PMObject* o ); @@ -64,46 +64,46 @@ protected slots: private: PMWarp* m_pDisplayedObject; - QComboBox* m_pWarpTypeEdit; + TQComboBox* m_pWarpTypeEdit; PMVectorEdit* m_pDirectionEdit; - QLabel* m_pDirectionLabel; + TQLabel* m_pDirectionLabel; PMVectorEdit* m_pOffsetEdit; - QLabel* m_pOffsetLabel; + TQLabel* m_pOffsetLabel; PMVectorEdit* m_pFlipEdit; - QLabel* m_pFlipLabel; + TQLabel* m_pFlipLabel; PMVectorEdit* m_pLocationEdit; - QLabel* m_pLocationLabel; + TQLabel* m_pLocationLabel; PMFloatEdit* m_pRadiusEdit; - QLabel* m_pRadiusLabel; + TQLabel* m_pRadiusLabel; PMFloatEdit* m_pStrengthEdit; - QLabel* m_pStrengthLabel; + TQLabel* m_pStrengthLabel; PMFloatEdit* m_pFalloffEdit; - QLabel* m_pFalloffLabel; - QCheckBox* m_pInverseEdit; + TQLabel* m_pFalloffLabel; + TQCheckBox* m_pInverseEdit; PMVectorEdit* m_pRepeatEdit; - QLabel* m_pRepeatLabel; + TQLabel* m_pRepeatLabel; PMVectorEdit* m_pTurbulenceEdit; - QLabel* m_pTurbulenceLabel; + TQLabel* m_pTurbulenceLabel; PMVectorEdit* m_pValueVectorEdit; - QLabel* m_pValueVectorLabel; + TQLabel* m_pValueVectorLabel; PMIntEdit* m_pOctavesEdit; - QLabel* m_pOctavesLabel; + TQLabel* m_pOctavesLabel; PMFloatEdit* m_pOmegaEdit; - QLabel* m_pOmegaLabel; + TQLabel* m_pOmegaLabel; PMFloatEdit* m_pLambdaEdit; - QLabel* m_pLambdaLabel; + TQLabel* m_pLambdaLabel; PMVectorEdit* m_pOrientationEdit; PMFloatEdit* m_pDistExpEdit; PMFloatEdit* m_pMajorRadiusEdit; - QLabel* m_pMajorRadiusLabel; + TQLabel* m_pMajorRadiusLabel; - QWidget* m_pRepeatWidget; - QWidget* m_pBlackHoleWidget; - QWidget* m_pTurbulenceWidget; - QWidget* m_pMappingWidget; + TQWidget* m_pRepeatWidget; + TQWidget* m_pBlackHoleWidget; + TQWidget* m_pTurbulenceWidget; + TQWidget* m_pMappingWidget; }; diff --git a/kpovmodeler/pmxmlhelper.cpp b/kpovmodeler/pmxmlhelper.cpp index bbb3c32c..2146c1d6 100644 --- a/kpovmodeler/pmxmlhelper.cpp +++ b/kpovmodeler/pmxmlhelper.cpp @@ -17,7 +17,7 @@ #include "pmxmlhelper.h" -PMXMLHelper::PMXMLHelper( const QDomElement& e, PMPart* p, PMParser* par, +PMXMLHelper::PMXMLHelper( const TQDomElement& e, PMPart* p, PMParser* par, int majorDocumentFormat, int minorDocumentFormat ) { m_e = e; @@ -27,14 +27,14 @@ PMXMLHelper::PMXMLHelper( const QDomElement& e, PMPart* p, PMParser* par, m_minor = minorDocumentFormat; } -bool PMXMLHelper::hasAttribute( const QString& name ) const +bool PMXMLHelper::hasAttribute( const TQString& name ) const { return m_e.hasAttribute( name ); } -int PMXMLHelper::intAttribute( const QString& name, int def ) const +int PMXMLHelper::intAttribute( const TQString& name, int def ) const { - QString str = m_e.attribute( name ); + TQString str = m_e.attribute( name ); bool ok; int res; @@ -46,9 +46,9 @@ int PMXMLHelper::intAttribute( const QString& name, int def ) const return def; } -double PMXMLHelper::doubleAttribute( const QString& name, double def ) const +double PMXMLHelper::doubleAttribute( const TQString& name, double def ) const { - QString str = m_e.attribute( name ); + TQString str = m_e.attribute( name ); bool ok; double res; @@ -60,9 +60,9 @@ double PMXMLHelper::doubleAttribute( const QString& name, double def ) const return def; } -bool PMXMLHelper::boolAttribute( const QString& name, bool def ) const +bool PMXMLHelper::boolAttribute( const TQString& name, bool def ) const { - QString str = m_e.attribute( name ); + TQString str = m_e.attribute( name ); bool ok; int res; @@ -74,9 +74,9 @@ bool PMXMLHelper::boolAttribute( const QString& name, bool def ) const return def; } -PMThreeState PMXMLHelper::threeStateAttribute( const QString& name ) const +PMThreeState PMXMLHelper::threeStateAttribute( const TQString& name ) const { - QString str = m_e.attribute( name ); + TQString str = m_e.attribute( name ); bool ok; int res; @@ -93,14 +93,14 @@ PMThreeState PMXMLHelper::threeStateAttribute( const QString& name ) const return PMUnspecified; } -QString PMXMLHelper::stringAttribute( const QString& name, const QString& def ) const +TQString PMXMLHelper::stringAttribute( const TQString& name, const TQString& def ) const { return m_e.attribute( name, def ); } -PMVector PMXMLHelper::vectorAttribute( const QString& name, const PMVector& def ) const +PMVector PMXMLHelper::vectorAttribute( const TQString& name, const PMVector& def ) const { - QString str = m_e.attribute( name ); + TQString str = m_e.attribute( name ); if( str.isNull( ) ) return def; @@ -113,9 +113,9 @@ PMVector PMXMLHelper::vectorAttribute( const QString& name, const PMVector& def return def; } -PMMatrix PMXMLHelper::matrixAttribute( const QString& name, const PMMatrix& def ) const +PMMatrix PMXMLHelper::matrixAttribute( const TQString& name, const PMMatrix& def ) const { - QString str = m_e.attribute( name ); + TQString str = m_e.attribute( name ); if( str.isNull( ) ) return def; @@ -128,9 +128,9 @@ PMMatrix PMXMLHelper::matrixAttribute( const QString& name, const PMMatrix& def return def; } -PMColor PMXMLHelper::colorAttribute( const QString& name, const PMColor& def ) const +PMColor PMXMLHelper::colorAttribute( const TQString& name, const PMColor& def ) const { - QString str = m_e.attribute( name ); + TQString str = m_e.attribute( name ); if( str.isNull( ) ) return def; @@ -143,18 +143,18 @@ PMColor PMXMLHelper::colorAttribute( const QString& name, const PMColor& def ) c return def; } -QDomElement PMXMLHelper::extraData( ) const +TQDomElement PMXMLHelper::extraData( ) const { - QDomNode c = m_e.firstChild( ); + TQDomNode c = m_e.firstChild( ); while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); if( ce.tagName( ) == "extra_data" ) return ce; } c = c.nextSibling( ); } - return QDomElement( ); + return TQDomElement( ); } diff --git a/kpovmodeler/pmxmlhelper.h b/kpovmodeler/pmxmlhelper.h index 25ae6947..9e9af51c 100644 --- a/kpovmodeler/pmxmlhelper.h +++ b/kpovmodeler/pmxmlhelper.h @@ -23,8 +23,8 @@ #include <config.h> #endif -#include <qdom.h> -#include <qstring.h> +#include <tqdom.h> +#include <tqstring.h> #include "pmobject.h" #include "pmcolor.h" @@ -41,57 +41,57 @@ class PMXMLHelper { public: /** - * Creates a PMXMLHelper for the QDomElement& e + * Creates a PMXMLHelper for the TQDomElement& e */ - PMXMLHelper( const QDomElement& e, PMPart* p, PMParser* par, + PMXMLHelper( const TQDomElement& e, PMPart* p, PMParser* par, int majorDocumentFormat, int minorDocumentFormat ); /** * Returns the QDomElement */ - QDomElement element( ) const { return m_e; } + TQDomElement element( ) const { return m_e; } /** * Returns true if the element contains the attribute */ - bool hasAttribute( const QString& name ) const; + bool hasAttribute( const TQString& name ) const; /** * Reads an integer attribute */ - int intAttribute( const QString& name, int def ) const; + int intAttribute( const TQString& name, int def ) const; /** * Reads a double attribute */ - double doubleAttribute( const QString& name, double def ) const; + double doubleAttribute( const TQString& name, double def ) const; /** * Reads a bool attribute */ - bool boolAttribute( const QString& name, bool def ) const; + bool boolAttribute( const TQString& name, bool def ) const; /** * Reads a PMThreeState attribute */ - PMThreeState threeStateAttribute( const QString& name ) const; + PMThreeState threeStateAttribute( const TQString& name ) const; /** * Reads a string attribute */ - QString stringAttribute( const QString& name, const QString& def ) const; + TQString stringAttribute( const TQString& name, const TQString& def ) const; /** * Reads a vector attribute */ - PMVector vectorAttribute( const QString& name, const PMVector& def ) const; + PMVector vectorAttribute( const TQString& name, const PMVector& def ) const; /** * Reads a matrix attribute */ - PMMatrix matrixAttribute( const QString& name, const PMMatrix& def ) const; + PMMatrix matrixAttribute( const TQString& name, const PMMatrix& def ) const; /** * Reads a color attribute */ - PMColor colorAttribute( const QString& name, const PMColor& def ) const; + PMColor colorAttribute( const TQString& name, const PMColor& def ) const; /** * Returns the "extra_data" child element or a null element, if there * is no child element with tag name "extra_data" */ - QDomElement extraData( ) const; + TQDomElement extraData( ) const; /** * Returns a pointer to the part @@ -111,7 +111,7 @@ public: int minorDocumentFormat( ) const { return m_minor; } private: - QDomElement m_e; + TQDomElement m_e; PMPart* m_pPart; PMParser* m_pParser; int m_major; diff --git a/kpovmodeler/pmxmlparser.cpp b/kpovmodeler/pmxmlparser.cpp index 520b19c0..11d42015 100644 --- a/kpovmodeler/pmxmlparser.cpp +++ b/kpovmodeler/pmxmlparser.cpp @@ -17,7 +17,7 @@ #include "pmxmlparser.h" -#include <qbuffer.h> +#include <tqbuffer.h> #include <klocale.h> #include "pmpart.h" @@ -27,13 +27,13 @@ #include "pmdocumentformat.h" #include "pmdebug.h" -PMXMLParser::PMXMLParser( PMPart* part, QIODevice* dev ) +PMXMLParser::PMXMLParser( PMPart* part, TQIODevice* dev ) : PMParser( part, dev ) { init( ); } -PMXMLParser::PMXMLParser( PMPart* part, const QByteArray& array ) +PMXMLParser::PMXMLParser( PMPart* part, const TQByteArray& array ) : PMParser( part, array ) { init( ); @@ -56,7 +56,7 @@ bool PMXMLParser::initDocument( ) { if( !m_pDoc ) { - m_pDoc = new QDomDocument( "KPOVMODELER" ); + m_pDoc = new TQDomDocument( "KPOVMODELER" ); if( m_pDoc->setContent( m_pDevice ) ) return true; else @@ -73,10 +73,10 @@ void PMXMLParser::topParse( ) { if( initDocument( ) ) { - QDomElement e = m_pDoc->documentElement( ); + TQDomElement e = m_pDoc->documentElement( ); // read the format number // assume 1.0 on error - QString fstring = e.attribute( "majorFormat", "1" ); + TQString fstring = e.attribute( "majorFormat", "1" ); bool ok = true; int format = fstring.toInt( &ok ); if( !ok || ( format < 1 ) ) @@ -117,14 +117,14 @@ void PMXMLParser::topParse( ) } } -void PMXMLParser::parseChildObjects( QDomElement& e, PMObject* parent ) +void PMXMLParser::parseChildObjects( TQDomElement& e, PMObject* parent ) { - QDomNode c = e.firstChild( ); + TQDomNode c = e.firstChild( ); while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); + TQDomElement ce = c.toElement( ); PMPrototypeManager* m = m_pPart->prototypeManager( ); PMObject* obj = m->newObject( m->className( ce.tagName( ) ) ); if( obj ) @@ -150,21 +150,21 @@ void PMXMLParser::parseChildObjects( QDomElement& e, PMObject* parent ) } -void PMXMLParser::quickParse( QStringList& list ) +void PMXMLParser::quickParse( TQStringList& list ) { if( initDocument( ) ) { - QDomElement e = m_pDoc->documentElement( ); + TQDomElement e = m_pDoc->documentElement( ); if( ( e.tagName( ) == "objects" ) || ( e.tagName( ) == "scene" ) ) { - QDomNode c = e.firstChild( ); + TQDomNode c = e.firstChild( ); while( !c.isNull( ) ) { if( c.isElement( ) ) { - QDomElement ce = c.toElement( ); - QString type = m_pPart->prototypeManager( )->className( ce.tagName( ) ); + TQDomElement ce = c.toElement( ); + TQString type = m_pPart->prototypeManager( )->className( ce.tagName( ) ); if( !type.isNull( ) ) list.append( type ); } diff --git a/kpovmodeler/pmxmlparser.h b/kpovmodeler/pmxmlparser.h index ca311048..2ff8f351 100644 --- a/kpovmodeler/pmxmlparser.h +++ b/kpovmodeler/pmxmlparser.h @@ -34,11 +34,11 @@ public: /** * Parser that parses the device */ - PMXMLParser( PMPart* part, QIODevice* device ); + PMXMLParser( PMPart* part, TQIODevice* device ); /** * Parser that parses the byte array */ - PMXMLParser( PMPart* part, const QByteArray& array ); + PMXMLParser( PMPart* part, const TQByteArray& array ); /** * Deletes the parser */ @@ -48,7 +48,7 @@ public: * Quickly scans the top level objects. Appends all top level object * types to the list. */ - virtual void quickParse( QStringList& list ); + virtual void quickParse( TQStringList& list ); /** * Returns true, if the parser can quickly scan the top level objects. */ @@ -65,7 +65,7 @@ private: */ void init( ); /** - * Initializes the QDomDocument. Returns true if successful. + * Initializes the TQDomDocument. Returns true if successful. */ bool initDocument( ); @@ -73,9 +73,9 @@ private: * Looks for child objects, parses them and appends them to the parent * object. If parent is 0, all objects are appended to the result list. */ - void parseChildObjects( QDomElement& e, PMObject* parent ); + void parseChildObjects( TQDomElement& e, PMObject* parent ); - QDomDocument* m_pDoc; + TQDomDocument* m_pDoc; int m_majorDocumentFormat; int m_minorDocumentFormat; }; |