diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /languages/cpp/compiler | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'languages/cpp/compiler')
-rw-r--r-- | languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp | 160 | ||||
-rw-r--r-- | languages/cpp/compiler/gccoptions/gccoptionsplugin.h | 14 |
2 files changed, 87 insertions, 87 deletions
diff --git a/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp b/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp index ac547fc7..8f632d69 100644 --- a/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp +++ b/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp @@ -9,14 +9,14 @@ * * ***************************************************************************/ -#include <qapplication.h> -#include <qlabel.h> -#include <qvbuttongroup.h> -#include <qradiobutton.h> -#include <qvaluelist.h> -#include <qtabwidget.h> -#include <qlayout.h> -#include <qvbox.h> +#include <tqapplication.h> +#include <tqlabel.h> +#include <tqvbuttongroup.h> +#include <tqradiobutton.h> +#include <tqvaluelist.h> +#include <tqtabwidget.h> +#include <tqlayout.h> +#include <tqvbox.h> #include <kdialog.h> #include <klocale.h> #include <kgenericfactory.h> @@ -29,11 +29,11 @@ K_EXPORT_COMPONENT_FACTORY( libkdevgccoptions, KGenericFactory<GccOptionsPlugin> class GeneralTab : public QWidget { public: - GeneralTab( GccOptionsPlugin::Type type, QWidget *parent = 0, const char *name = 0 ); + GeneralTab( GccOptionsPlugin::Type type, TQWidget *parent = 0, const char *name = 0 ); ~GeneralTab(); - void readFlags( QStringList *str ); - void writeFlags( QStringList *str ); + void readFlags( TQStringList *str ); + void writeFlags( TQStringList *str ); private: FlagCheckBoxController *controller; @@ -43,14 +43,14 @@ private: class OptimizationTab : public QWidget { public: - OptimizationTab( GccOptionsPlugin::Type type, QWidget *parent = 0, const char *name = 0 ); + OptimizationTab( GccOptionsPlugin::Type type, TQWidget *parent = 0, const char *name = 0 ); ~OptimizationTab(); - void readFlags( QStringList *str ); - void writeFlags( QStringList *str ); + void readFlags( TQStringList *str ); + void writeFlags( TQStringList *str ); private: - QRadioButton *Odefault, *O0, *O1, *O2; + TQRadioButton *Odefault, *O0, *O1, *O2; FlagListBox *optBox; }; @@ -58,11 +58,11 @@ private: class G77Tab : public QWidget { public: - G77Tab( QWidget *parent = 0, const char *name = 0 ); + G77Tab( TQWidget *parent = 0, const char *name = 0 ); ~G77Tab(); - void readFlags( QStringList *str ); - void writeFlags( QStringList *str ); + void readFlags( TQStringList *str ); + void writeFlags( TQStringList *str ); private: FlagCheckBoxController *controller; @@ -72,11 +72,11 @@ private: class Warnings1Tab : public QWidget { public: - Warnings1Tab( GccOptionsPlugin::Type type, QWidget *parent = 0, const char *name = 0 ); + Warnings1Tab( GccOptionsPlugin::Type type, TQWidget *parent = 0, const char *name = 0 ); ~Warnings1Tab(); - void readFlags( QStringList *str ); - void writeFlags( QStringList *str ); + void readFlags( TQStringList *str ); + void writeFlags( TQStringList *str ); private: FlagCheckBoxController *controller; @@ -87,25 +87,25 @@ private: class Warnings2Tab : public QWidget { public: - Warnings2Tab( GccOptionsPlugin::Type type, QWidget *parent = 0, const char *name = 0 ); + Warnings2Tab( GccOptionsPlugin::Type type, TQWidget *parent = 0, const char *name = 0 ); ~Warnings2Tab(); - void readFlags( QStringList *str ); - void writeFlags( QStringList *str ); + void readFlags( TQStringList *str ); + void writeFlags( TQStringList *str ); private: FlagListBox *wrestBox; }; -GeneralTab::GeneralTab( GccOptionsPlugin::Type type, QWidget *parent, const char *name ) - : QWidget( parent, name ), controller( new FlagCheckBoxController ) +GeneralTab::GeneralTab( GccOptionsPlugin::Type type, TQWidget *parent, const char *name ) + : TQWidget( parent, name ), controller( new FlagCheckBoxController ) { - QBoxLayout * layout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); layout->setAutoAdd( true ); layout->addSpacing( 10 ); - QVButtonGroup *output_group = new QVButtonGroup( i18n( "Output" ), this ); + TQVButtonGroup *output_group = new TQVButtonGroup( i18n( "Output" ), this ); new FlagCheckBox( output_group, controller, "-fsyntax-only", i18n( "Only check the code for syntax errors, do not produce object code" ) ); new FlagCheckBox( output_group, controller, @@ -113,10 +113,10 @@ GeneralTab::GeneralTab( GccOptionsPlugin::Type type, QWidget *parent, const char new FlagCheckBox( output_group, controller, "-save-temps", i18n( "Do not delete intermediate output like assembler files" ) ); - QApplication::sendPostedEvents( this, QEvent::ChildInserted ); + TQApplication::sendPostedEvents( this, TQEvent::ChildInserted ); layout->addSpacing( 10 ); - QVButtonGroup *codegen_group = new QVButtonGroup( i18n( "Code Generation" ), this ); + TQVButtonGroup *codegen_group = new TQVButtonGroup( i18n( "Code Generation" ), this ); if ( type != GccOptionsPlugin::GPP ) { new FlagCheckBox( codegen_group, controller, @@ -141,7 +141,7 @@ GeneralTab::GeneralTab( GccOptionsPlugin::Type type, QWidget *parent, const char new FlagCheckBox( codegen_group, controller, "-short-double", i18n( "Make 'double' the same as 'float'" ) ); - QApplication::sendPostedEvents( this, QEvent::ChildInserted ); + TQApplication::sendPostedEvents( this, TQEvent::ChildInserted ); layout->addStretch(); } @@ -152,30 +152,30 @@ GeneralTab::~GeneralTab() } -void GeneralTab::readFlags( QStringList *list ) +void GeneralTab::readFlags( TQStringList *list ) { controller->readFlags( list ); } -void GeneralTab::writeFlags( QStringList *list ) +void GeneralTab::writeFlags( TQStringList *list ) { controller->writeFlags( list ); } -OptimizationTab::OptimizationTab( GccOptionsPlugin::Type type, QWidget *parent, const char *name ) - : QWidget( parent, name ) +OptimizationTab::OptimizationTab( GccOptionsPlugin::Type type, TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - QBoxLayout * layout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); layout->setAutoAdd( true ); - QVButtonGroup *group = new QVButtonGroup( i18n( "Optimization Level" ), this ); - Odefault = new QRadioButton( i18n( "Default" ), group ); + TQVButtonGroup *group = new TQVButtonGroup( i18n( "Optimization Level" ), this ); + Odefault = new TQRadioButton( i18n( "Default" ), group ); Odefault->setChecked( true ); - O0 = new QRadioButton( i18n( "No optimization" ), group ); - O1 = new QRadioButton( i18n( "Level 1" ), group ); - O2 = new QRadioButton( i18n( "Level 2" ), group ); + O0 = new TQRadioButton( i18n( "No optimization" ), group ); + O1 = new TQRadioButton( i18n( "Level 1" ), group ); + O2 = new TQRadioButton( i18n( "Level 2" ), group ); optBox = new FlagListBox( this ); @@ -210,7 +210,7 @@ OptimizationTab::OptimizationTab( GccOptionsPlugin::Type type, QWidget *parent, "-fdefault-inline" ); } - QApplication::sendPostedEvents( this, QEvent::ChildInserted ); + TQApplication::sendPostedEvents( this, TQEvent::ChildInserted ); layout->addStretch(); } @@ -219,11 +219,11 @@ OptimizationTab::~OptimizationTab() {} -void OptimizationTab::readFlags( QStringList *list ) +void OptimizationTab::readFlags( TQStringList *list ) { optBox->readFlags( list ); - QStringList::Iterator sli; + TQStringList::Iterator sli; sli = list->find( "-O0" ); if ( sli != list->end() ) { @@ -248,7 +248,7 @@ void OptimizationTab::readFlags( QStringList *list ) } -void OptimizationTab::writeFlags( QStringList *list ) +void OptimizationTab::writeFlags( TQStringList *list ) { optBox->writeFlags( list ); @@ -261,14 +261,14 @@ void OptimizationTab::writeFlags( QStringList *list ) } -G77Tab::G77Tab( QWidget *parent, const char *name ) - : QWidget( parent, name ), controller( new FlagCheckBoxController ) +G77Tab::G77Tab( TQWidget *parent, const char *name ) + : TQWidget( parent, name ), controller( new FlagCheckBoxController ) { - QBoxLayout * layout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); layout->setAutoAdd( true ); layout->addSpacing( 10 ); - QVButtonGroup *dialect_group = new QVButtonGroup( i18n( "Dialect" ), this ); + TQVButtonGroup *dialect_group = new TQVButtonGroup( i18n( "Dialect" ), this ); new FlagCheckBox( dialect_group, controller, "-ffree-form", i18n( "Interpret source code as Fortran 90 free form" ), "-fno-exception" ); @@ -282,10 +282,10 @@ G77Tab::G77Tab( QWidget *parent, const char *name ) new FlagCheckBox( dialect_group, controller, "-fonetrip", i18n( "DO loops are executed at least once" ) ); - QApplication::sendPostedEvents( this, QEvent::ChildInserted ); + TQApplication::sendPostedEvents( this, TQEvent::ChildInserted ); layout->addSpacing( 10 ); - QVButtonGroup *codegen_group = new QVButtonGroup( i18n( "Code Generation" ), this ); + TQVButtonGroup *codegen_group = new TQVButtonGroup( i18n( "Code Generation" ), this ); new FlagCheckBox( codegen_group, controller, "-fno-automatic", i18n( "Treat local variables as if SAVE statement had been specified" ) ); new FlagCheckBox( codegen_group, controller, @@ -293,7 +293,7 @@ G77Tab::G77Tab( QWidget *parent, const char *name ) new FlagCheckBox( codegen_group, controller, "-fbounds-check", i18n( "Generate run-time checks for array subscripts" ) ); - QApplication::sendPostedEvents( this, QEvent::ChildInserted ); + TQApplication::sendPostedEvents( this, TQEvent::ChildInserted ); layout->addStretch(); } @@ -304,22 +304,22 @@ G77Tab::~G77Tab() } -void G77Tab::readFlags( QStringList *list ) +void G77Tab::readFlags( TQStringList *list ) { controller->readFlags( list ); } -void G77Tab::writeFlags( QStringList *list ) +void G77Tab::writeFlags( TQStringList *list ) { controller->writeFlags( list ); } -Warnings1Tab::Warnings1Tab( GccOptionsPlugin::Type type, QWidget *parent, const char *name ) - : QWidget( parent, name ), controller( new FlagCheckBoxController ) +Warnings1Tab::Warnings1Tab( GccOptionsPlugin::Type type, TQWidget *parent, const char *name ) + : TQWidget( parent, name ), controller( new FlagCheckBoxController ) { - QBoxLayout * layout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); layout->setAutoAdd( true ); new FlagCheckBox( this, controller, @@ -400,24 +400,24 @@ Warnings1Tab::~Warnings1Tab() } -void Warnings1Tab::readFlags( QStringList *list ) +void Warnings1Tab::readFlags( TQStringList *list ) { controller->readFlags( list ); wallBox->readFlags( list ); } -void Warnings1Tab::writeFlags( QStringList *list ) +void Warnings1Tab::writeFlags( TQStringList *list ) { controller->writeFlags( list ); wallBox->writeFlags( list ); } -Warnings2Tab::Warnings2Tab( GccOptionsPlugin::Type type, QWidget *parent, const char *name ) - : QWidget( parent, name ) +Warnings2Tab::Warnings2Tab( GccOptionsPlugin::Type type, TQWidget *parent, const char *name ) + : TQWidget( parent, name ) { - QBoxLayout * layout = new QVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); + TQBoxLayout * layout = new TQVBoxLayout( this, KDialog::marginHint(), KDialog::spacingHint() ); layout->setAutoAdd( true ); wrestBox = new FlagListBox( this ); @@ -559,23 +559,23 @@ Warnings2Tab::~Warnings2Tab() {} -void Warnings2Tab::readFlags( QStringList *list ) +void Warnings2Tab::readFlags( TQStringList *list ) { wrestBox->readFlags( list ); } -void Warnings2Tab::writeFlags( QStringList *list ) +void Warnings2Tab::writeFlags( TQStringList *list ) { wrestBox->writeFlags( list ); } // Last but not least... :-) -GccOptionsDialog::GccOptionsDialog( GccOptionsPlugin::Type type, QWidget *parent, const char *name ) +GccOptionsDialog::GccOptionsDialog( GccOptionsPlugin::Type type, TQWidget *parent, const char *name ) : KDialogBase( Tabbed, GccOptionsPlugin::captionForType( type ), Ok | Cancel, Ok, parent, name, true ) { - QVBox * vbox; + TQVBox * vbox; vbox = addVBoxPage( i18n( "General" ) ); general = new GeneralTab( type, vbox, "general tab" ); @@ -603,9 +603,9 @@ GccOptionsDialog::~GccOptionsDialog() {} -void GccOptionsDialog::setFlags( const QString &flags ) +void GccOptionsDialog::setFlags( const TQString &flags ) { - QStringList flaglist = QStringList::split( " ", flags ); + TQStringList flaglist = TQStringList::split( " ", flags ); // Hand them to 'general' at last, so it can make a line edit // with the unprocessed items @@ -619,9 +619,9 @@ void GccOptionsDialog::setFlags( const QString &flags ) } -QString GccOptionsDialog::flags() const +TQString GccOptionsDialog::flags() const { - QStringList flaglist; + TQStringList flaglist; if ( g77 ) g77->writeFlags( &flaglist ); @@ -630,8 +630,8 @@ QString GccOptionsDialog::flags() const warnings2->writeFlags( &flaglist ); general->writeFlags( &flaglist ); - QString flags; - QStringList::ConstIterator li; + TQString flags; + TQStringList::ConstIterator li; for ( li = flaglist.begin(); li != flaglist.end(); ++li ) { flags += ( *li ); @@ -649,7 +649,7 @@ QString GccOptionsDialog::flags() const } -GccOptionsPlugin::GccOptionsPlugin( QObject *parent, const char *name, const QStringList &args ) +GccOptionsPlugin::GccOptionsPlugin( TQObject *parent, const char *name, const TQStringList &args ) : KDevCompilerOptions( parent, name ) { gcctype = Unknown; @@ -657,7 +657,7 @@ GccOptionsPlugin::GccOptionsPlugin( QObject *parent, const char *name, const QSt if ( args.count() == 0 ) return ; - QString typeStr = args[ 0 ]; + TQString typeStr = args[ 0 ]; if ( typeStr == "gcc" ) gcctype = GccOptionsPlugin::GCC; @@ -672,7 +672,7 @@ GccOptionsPlugin::~GccOptionsPlugin() {} -QString GccOptionsPlugin::captionForType( Type type ) +TQString GccOptionsPlugin::captionForType( Type type ) { switch ( type ) { @@ -683,19 +683,19 @@ QString GccOptionsPlugin::captionForType( Type type ) case G77: return i18n( "GNU Fortran 77 Compiler Options" ); default: - return QString::null; + return TQString::null; } } -QString GccOptionsPlugin::exec( QWidget *parent, const QString &flags ) +TQString GccOptionsPlugin::exec( TQWidget *parent, const TQString &flags ) { if ( gcctype == Unknown ) - return QString::null; + return TQString::null; GccOptionsDialog *dlg = new GccOptionsDialog( gcctype, parent, "gcc options dialog" ); - QString newFlags = flags; + TQString newFlags = flags; dlg->setFlags( flags ); - if ( dlg->exec() == QDialog::Accepted ) + if ( dlg->exec() == TQDialog::Accepted ) newFlags = dlg->flags(); delete dlg; return newFlags; diff --git a/languages/cpp/compiler/gccoptions/gccoptionsplugin.h b/languages/cpp/compiler/gccoptions/gccoptionsplugin.h index a3b8cd70..e5144e01 100644 --- a/languages/cpp/compiler/gccoptions/gccoptionsplugin.h +++ b/languages/cpp/compiler/gccoptions/gccoptionsplugin.h @@ -30,12 +30,12 @@ class GccOptionsPlugin : public KDevCompilerOptions public: enum Type { GCC, GPP, G77, Unknown }; - GccOptionsPlugin( QObject *parent, const char *name, const QStringList &args ); + GccOptionsPlugin( TQObject *parent, const char *name, const TQStringList &args ); ~GccOptionsPlugin(); - static QString captionForType(Type type); + static TQString captionForType(Type type); - virtual QString exec(QWidget *parent, const QString &flags); + virtual TQString exec(TQWidget *parent, const TQString &flags); private: Type gcctype; @@ -45,11 +45,11 @@ private: class GccOptionsDialog : public KDialogBase { public: - GccOptionsDialog( GccOptionsPlugin::Type type, QWidget *parent=0, const char *name=0 ); + GccOptionsDialog( GccOptionsPlugin::Type type, TQWidget *parent=0, const char *name=0 ); ~GccOptionsDialog(); - void setFlags(const QString &flags); - QString flags() const; + void setFlags(const TQString &flags); + TQString flags() const; private: GeneralTab *general; @@ -57,7 +57,7 @@ private: G77Tab *g77; Warnings1Tab *warnings1; Warnings2Tab *warnings2; - QStringList unrecognizedFlags; + TQStringList unrecognizedFlags; }; #endif |