diff options
author | Timothy Pearson <[email protected]> | 2013-07-24 11:31:17 -0500 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-07-24 11:31:17 -0500 |
commit | d598a49a3e1cadea0d72be28d147d219686413e7 (patch) | |
tree | 3111c0383d0b514f59aaeef0a2f656acc595fd8a /src/timingwidget.cpp | |
parent | 56ffa61b35fc088a0e7e2aa885b9ffed82c8d8be (diff) | |
download | knmap-d598a49a3e1cadea0d72be28d147d219686413e7.tar.gz knmap-d598a49a3e1cadea0d72be28d147d219686413e7.zip |
Convert to TDE R14 API
Diffstat (limited to 'src/timingwidget.cpp')
-rw-r--r-- | src/timingwidget.cpp | 170 |
1 files changed, 85 insertions, 85 deletions
diff --git a/src/timingwidget.cpp b/src/timingwidget.cpp index 30f121b..79e6cb6 100644 --- a/src/timingwidget.cpp +++ b/src/timingwidget.cpp @@ -20,20 +20,20 @@ * * ***************************************************************************/ -#include <qbuttongroup.h> -#include <qcheckbox.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qradiobutton.h> - -#include <kconfig.h> +#include <ntqbuttongroup.h> +#include <ntqcheckbox.h> +#include <ntqiconset.h> +#include <ntqlabel.h> +#include <ntqlayout.h> +#include <ntqlineedit.h> +#include <ntqpushbutton.h> +#include <ntqradiobutton.h> + +#include <tdeconfig.h> #include <kdebug.h> -#include <kglobal.h> +#include <tdeglobal.h> #include <kiconloader.h> -#include <klocale.h> +#include <tdelocale.h> #include <kmessagebox.h> #include "timingwidget.h" @@ -42,8 +42,8 @@ // constructor // =========== -TimingWidget::TimingWidget( QWidget* parent, const char* name ) -: QWidget( parent, name ) +TimingWidget::TimingWidget( TQWidget* parent, const char* name ) +: TQWidget( parent, name ) { createLayout( ); } @@ -51,55 +51,55 @@ TimingWidget::TimingWidget( QWidget* parent, const char* name ) // ============ void TimingWidget::createLayout( ) -{ QGridLayout* gridLayout = new QGridLayout( this ); - KIconLoader* iconLoader = KGlobal::iconLoader( ); - QIconSet clearLeftIconSet = iconLoader->loadIconSet( "clear_left", KIcon::Small ); +{ TQGridLayout* gridLayout = new TQGridLayout( this ); + TDEIconLoader* iconLoader = TDEGlobal::iconLoader( ); + TQIconSet clearLeftIconSet = iconLoader->loadIconSet( "clear_left", TDEIcon::Small ); byte row = 1; - QButtonGroup* timingGroupBox = new QButtonGroup( 7, Qt::Vertical, "Simple Timing", this, "timing group box" ); - m_defaultRadio = new QRadioButton( i18n( "Default" ), timingGroupBox, "default radio button" ); - m_aggressiveRadio = new QRadioButton( i18n( "Aggressive (-T4)" ), timingGroupBox, "aggressive radio button" ); - m_insaneRadio = new QRadioButton( i18n( "Insane (-T5)" ), timingGroupBox, "insane radio button" ); - m_normalRadio = new QRadioButton( i18n( "Normal (-T3)" ), timingGroupBox, "normal radio button" ); - m_paranoidRadio = new QRadioButton( i18n( "Paranoid (-T0)" ), timingGroupBox, "paranoid radio button" ); - m_politeRadio = new QRadioButton( i18n( "Polite (-T2)" ), timingGroupBox, "polite radio button" ); - m_sneakyRadio = new QRadioButton( i18n( "Sneaky (-T1)" ), timingGroupBox, "sneaky radio button" ); + TQButtonGroup* timingGroupBox = new TQButtonGroup( 7, TQt::Vertical, "Simple Timing", this, "timing group box" ); + m_defaultRadio = new TQRadioButton( i18n( "Default" ), timingGroupBox, "default radio button" ); + m_aggressiveRadio = new TQRadioButton( i18n( "Aggressive (-T4)" ), timingGroupBox, "aggressive radio button" ); + m_insaneRadio = new TQRadioButton( i18n( "Insane (-T5)" ), timingGroupBox, "insane radio button" ); + m_normalRadio = new TQRadioButton( i18n( "Normal (-T3)" ), timingGroupBox, "normal radio button" ); + m_paranoidRadio = new TQRadioButton( i18n( "Paranoid (-T0)" ), timingGroupBox, "paranoid radio button" ); + m_politeRadio = new TQRadioButton( i18n( "Polite (-T2)" ), timingGroupBox, "polite radio button" ); + m_sneakyRadio = new TQRadioButton( i18n( "Sneaky (-T1)" ), timingGroupBox, "sneaky radio button" ); gridLayout->addMultiCellWidget( timingGroupBox, row, row + 7, 1, 1 ); row += 7; byte rowBlock1 = row; - m_hostTimeoutButton = new QPushButton( clearLeftIconSet, NULL, this, "host timeout button" ); - m_initialRTTTimeoutButton = new QPushButton( clearLeftIconSet, NULL, this, "initial rtt timeout button" ); - m_maxHostGroupButton = new QPushButton( clearLeftIconSet, NULL, this, "max host group button" ); - m_maxParallelismButton = new QPushButton( clearLeftIconSet, NULL, this, "max parallelism button" ); - m_maxRTTTimeoutButton = new QPushButton( clearLeftIconSet, NULL, this, "max rtt timeout button" ); - m_maxScanDelayButton = new QPushButton( clearLeftIconSet, NULL, this, "max scan delay button" ); - m_minHostGroupButton = new QPushButton( clearLeftIconSet, NULL, this, "min host group button" ); - m_minParallelismButton = new QPushButton( clearLeftIconSet, NULL, this, "min parallelism button" ); - m_minRTTTimeoutButton = new QPushButton( clearLeftIconSet, NULL, this, "min rtt timeout button" ); - m_scanDelayButton = new QPushButton( clearLeftIconSet, NULL, this, "min scan delay button" ); - - m_hostTimeoutCheckBox = new QCheckBox( i18n( "Host timeout (--host_timeout)" ), this, "host timeout checkbox" ); - m_initialRTTTimeoutCheckBox = new QCheckBox( i18n( "Initial RTT timeout (--initial_rtt_timeout)" ), this, "initial rtt timeout checkbox" ); - m_maxHostGroupCheckBox = new QCheckBox( i18n( "Max Host group (--max_hostgroup)" ), this, "max host group checkbox" ); - m_maxParallelismCheckBox = new QCheckBox( i18n( "Max Parallelism (--max_parallelism)" ), this, "max parallelism checkbox" ); - m_maxRTTTimeoutCheckBox = new QCheckBox( i18n( "Max RTT timeout (--max_rtt_timeout)" ), this, "max rtt timeout checkbox" ); - m_maxScanDelayCheckBox = new QCheckBox( i18n( "Max Scan delay (--max_scan_delay)" ), this, "max scan delay checkbox" ); - m_minHostGroupCheckBox = new QCheckBox( i18n( "Min Host group (--min_hostgroup)" ), this, "min host group checkbox" ); - m_minParallelismCheckBox = new QCheckBox( i18n( "Min Parallelism (--min_parallelism)" ), this, "min parallelism checkbox" ); - m_minRTTTimeoutCheckBox = new QCheckBox( i18n( "Min RTT timeout (--min_rtt_timeout)" ), this, "min rtt timeout checkbox" ); - m_scanDelayCheckBox = new QCheckBox( i18n( "Min Scan delay (--scan_delay)" ), this, "min scan delay checkbox" ); - - m_hostTimeoutLineEdit = new QLineEdit( this, "host timeout line edit" ); - m_initialRTTTimeoutLineEdit = new QLineEdit( this, "initial rtt timeout line edit" ); - m_maxHostGroupLineEdit = new QLineEdit( this, "max host group line edit" ); - m_maxParallelismLineEdit = new QLineEdit( this, "max parallelism line edit" ); - m_maxRTTTimeoutLineEdit = new QLineEdit( this, "max rtt timeout line edit" ); - m_maxScanDelayLineEdit = new QLineEdit( this, "max scan delay line edit" ); - m_minHostGroupLineEdit = new QLineEdit( this, "min host group line edit" ); - m_minParallelismLineEdit = new QLineEdit( this, "min parallelism line edit" ); - m_minRTTTimeoutLineEdit = new QLineEdit( this, "min rtt timeout line edit" ); - m_scanDelayLineEdit = new QLineEdit( this, "min scan delay line edit" ); + m_hostTimeoutButton = new TQPushButton( clearLeftIconSet, NULL, this, "host timeout button" ); + m_initialRTTTimeoutButton = new TQPushButton( clearLeftIconSet, NULL, this, "initial rtt timeout button" ); + m_maxHostGroupButton = new TQPushButton( clearLeftIconSet, NULL, this, "max host group button" ); + m_maxParallelismButton = new TQPushButton( clearLeftIconSet, NULL, this, "max parallelism button" ); + m_maxRTTTimeoutButton = new TQPushButton( clearLeftIconSet, NULL, this, "max rtt timeout button" ); + m_maxScanDelayButton = new TQPushButton( clearLeftIconSet, NULL, this, "max scan delay button" ); + m_minHostGroupButton = new TQPushButton( clearLeftIconSet, NULL, this, "min host group button" ); + m_minParallelismButton = new TQPushButton( clearLeftIconSet, NULL, this, "min parallelism button" ); + m_minRTTTimeoutButton = new TQPushButton( clearLeftIconSet, NULL, this, "min rtt timeout button" ); + m_scanDelayButton = new TQPushButton( clearLeftIconSet, NULL, this, "min scan delay button" ); + + m_hostTimeoutCheckBox = new TQCheckBox( i18n( "Host timeout (--host_timeout)" ), this, "host timeout checkbox" ); + m_initialRTTTimeoutCheckBox = new TQCheckBox( i18n( "Initial RTT timeout (--initial_rtt_timeout)" ), this, "initial rtt timeout checkbox" ); + m_maxHostGroupCheckBox = new TQCheckBox( i18n( "Max Host group (--max_hostgroup)" ), this, "max host group checkbox" ); + m_maxParallelismCheckBox = new TQCheckBox( i18n( "Max Parallelism (--max_parallelism)" ), this, "max parallelism checkbox" ); + m_maxRTTTimeoutCheckBox = new TQCheckBox( i18n( "Max RTT timeout (--max_rtt_timeout)" ), this, "max rtt timeout checkbox" ); + m_maxScanDelayCheckBox = new TQCheckBox( i18n( "Max Scan delay (--max_scan_delay)" ), this, "max scan delay checkbox" ); + m_minHostGroupCheckBox = new TQCheckBox( i18n( "Min Host group (--min_hostgroup)" ), this, "min host group checkbox" ); + m_minParallelismCheckBox = new TQCheckBox( i18n( "Min Parallelism (--min_parallelism)" ), this, "min parallelism checkbox" ); + m_minRTTTimeoutCheckBox = new TQCheckBox( i18n( "Min RTT timeout (--min_rtt_timeout)" ), this, "min rtt timeout checkbox" ); + m_scanDelayCheckBox = new TQCheckBox( i18n( "Min Scan delay (--scan_delay)" ), this, "min scan delay checkbox" ); + + m_hostTimeoutLineEdit = new TQLineEdit( this, "host timeout line edit" ); + m_initialRTTTimeoutLineEdit = new TQLineEdit( this, "initial rtt timeout line edit" ); + m_maxHostGroupLineEdit = new TQLineEdit( this, "max host group line edit" ); + m_maxParallelismLineEdit = new TQLineEdit( this, "max parallelism line edit" ); + m_maxRTTTimeoutLineEdit = new TQLineEdit( this, "max rtt timeout line edit" ); + m_maxScanDelayLineEdit = new TQLineEdit( this, "max scan delay line edit" ); + m_minHostGroupLineEdit = new TQLineEdit( this, "min host group line edit" ); + m_minParallelismLineEdit = new TQLineEdit( this, "min parallelism line edit" ); + m_minRTTTimeoutLineEdit = new TQLineEdit( this, "min rtt timeout line edit" ); + m_scanDelayLineEdit = new TQLineEdit( this, "min scan delay line edit" ); m_hostTimeoutLineEdit->setInputMask( "999999" ); m_initialRTTTimeoutLineEdit->setInputMask( "999999" ); @@ -205,29 +205,29 @@ void TimingWidget::finaliseInitialisation( ) connect( m_aggressiveRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); connect( m_defaultRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); connect( m_hostTimeoutCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); - connect( m_hostTimeoutLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( ))); + connect( m_hostTimeoutLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( ))); connect( m_initialRTTTimeoutCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); - connect( m_initialRTTTimeoutLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( ))); + connect( m_initialRTTTimeoutLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( ))); connect( m_insaneRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); connect( m_maxHostGroupCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); - connect( m_maxHostGroupLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( ))); + connect( m_maxHostGroupLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( ))); connect( m_maxParallelismCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); - connect( m_maxParallelismLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( ))); + connect( m_maxParallelismLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( ))); connect( m_maxRTTTimeoutCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); - connect( m_maxRTTTimeoutLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( ))); + connect( m_maxRTTTimeoutLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( ))); connect( m_maxScanDelayCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); - connect( m_maxScanDelayLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( ))); + connect( m_maxScanDelayLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( ))); connect( m_minHostGroupCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); - connect( m_minHostGroupLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( ))); + connect( m_minHostGroupLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( ))); connect( m_minParallelismCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); - connect( m_minParallelismLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( ))); + connect( m_minParallelismLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( ))); connect( m_minRTTTimeoutCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); - connect( m_minRTTTimeoutLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( ))); + connect( m_minRTTTimeoutLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( ))); connect( m_normalRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); connect( m_paranoidRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); connect( m_politeRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); connect( m_scanDelayCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); - connect( m_scanDelayLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( ))); + connect( m_scanDelayLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( ))); connect( m_sneakyRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); } @@ -253,22 +253,22 @@ bool TimingWidget::getOptions( ) uint scanDelayValue = m_scanDelayLineEdit->text( ).toUInt( ); if( minHostGroupValue > maxHostGroupValue ) - { KMessageBox::error( this, i18n( QString( "Min host group not < Max host group" )), i18n( "Host group error" )); + { KMessageBox::error( this, i18n( TQString( "Min host group not < Max host group" )), i18n( "Host group error" )); return false; } if( minParallelismValue > maxParallelismValue ) - { KMessageBox::error( this, i18n( QString( "Min parallelism not < Max parallelism" )), i18n( "Parallelism error" )); + { KMessageBox::error( this, i18n( TQString( "Min parallelism not < Max parallelism" )), i18n( "Parallelism error" )); return false; } if( minRTTTimeoutValue > maxRTTTimeoutValue ) - { KMessageBox::error( this, i18n( QString( "Min RTT timeout not < Max RTT timeout" )), i18n( "RTT timeout error" )); + { KMessageBox::error( this, i18n( TQString( "Min RTT timeout not < Max RTT timeout" )), i18n( "RTT timeout error" )); return false; } if( scanDelayValue > maxScanDelayValue ) - { KMessageBox::error( this, i18n( QString( "Min scan delay not < Max scan delay" )), i18n( "Scan delay error" )); + { KMessageBox::error( this, i18n( TQString( "Min scan delay not < Max scan delay" )), i18n( "Scan delay error" )); return false; } @@ -299,7 +299,7 @@ bool TimingWidget::getOptions( ) // readProfile // =========== -void TimingWidget::readProfile( KConfig* config ) +void TimingWidget::readProfile( TDEConfig* config ) { m_hostTimeoutState = config->readBoolEntry( "hostTimeoutState" ); m_hostTimeoutValue = config->readNumEntry( "hostTimeoutValue" ); m_initialRTTTimeoutState = config->readBoolEntry( "initialRTTTimeoutState" ); @@ -327,7 +327,7 @@ void TimingWidget::readProfile( KConfig* config ) // saveProfile // =========== -void TimingWidget::saveProfile( KConfig* config ) +void TimingWidget::saveProfile( TDEConfig* config ) { config->writeEntry( "hostTimeoutState", m_hostTimeoutState ); config->writeEntry( "hostTimeoutValue", m_hostTimeoutValue ); config->writeEntry( "initialRTTTimeoutState", m_initialRTTTimeoutState ); @@ -357,34 +357,34 @@ void TimingWidget::saveProfile( KConfig* config ) void TimingWidget::setInitialValues( ) { m_hostTimeoutCheckBox->setChecked( m_hostTimeoutState ); m_hostTimeoutLineEdit->setEnabled( m_hostTimeoutState ); - m_hostTimeoutLineEdit->setText( QString::number( m_hostTimeoutValue )); + m_hostTimeoutLineEdit->setText( TQString::number( m_hostTimeoutValue )); m_initialRTTTimeoutCheckBox->setChecked( m_initialRTTTimeoutState ); m_initialRTTTimeoutLineEdit->setEnabled( m_initialRTTTimeoutState ); - m_initialRTTTimeoutLineEdit->setText( QString::number( m_initialRTTTimeoutValue )); + m_initialRTTTimeoutLineEdit->setText( TQString::number( m_initialRTTTimeoutValue )); m_maxHostGroupCheckBox->setChecked( m_maxHostGroupState ); m_maxHostGroupLineEdit->setEnabled( m_maxHostGroupState ); - m_maxHostGroupLineEdit->setText( QString::number( m_maxHostGroupValue )); + m_maxHostGroupLineEdit->setText( TQString::number( m_maxHostGroupValue )); m_maxParallelismCheckBox->setChecked( m_maxParallelismState ); m_maxParallelismLineEdit->setEnabled( m_maxParallelismState ); - m_maxParallelismLineEdit->setText( QString::number( m_maxParallelismValue )); + m_maxParallelismLineEdit->setText( TQString::number( m_maxParallelismValue )); m_maxRTTTimeoutCheckBox->setChecked( m_maxRTTTimeoutState ); m_maxRTTTimeoutLineEdit->setEnabled( m_maxRTTTimeoutState ); - m_maxRTTTimeoutLineEdit->setText( QString::number( m_maxRTTTimeoutValue )); + m_maxRTTTimeoutLineEdit->setText( TQString::number( m_maxRTTTimeoutValue )); m_maxScanDelayCheckBox->setChecked( m_maxScanDelayState ); m_maxScanDelayLineEdit->setEnabled( m_maxScanDelayState ); - m_maxScanDelayLineEdit->setText( QString::number( m_maxScanDelayValue )); + m_maxScanDelayLineEdit->setText( TQString::number( m_maxScanDelayValue )); m_minHostGroupCheckBox->setChecked( m_minHostGroupState ); m_minHostGroupLineEdit->setEnabled( m_minHostGroupState ); - m_minHostGroupLineEdit->setText( QString::number( m_minHostGroupValue )); + m_minHostGroupLineEdit->setText( TQString::number( m_minHostGroupValue )); m_minParallelismCheckBox->setChecked( m_minParallelismState ); m_minParallelismLineEdit->setEnabled( m_minParallelismState ); - m_minParallelismLineEdit->setText( QString::number( m_minParallelismValue )); + m_minParallelismLineEdit->setText( TQString::number( m_minParallelismValue )); m_minRTTTimeoutCheckBox->setChecked( m_minRTTTimeoutState ); m_minRTTTimeoutLineEdit->setEnabled( m_minRTTTimeoutState ); - m_minRTTTimeoutLineEdit->setText( QString::number( m_minRTTTimeoutValue )); + m_minRTTTimeoutLineEdit->setText( TQString::number( m_minRTTTimeoutValue )); m_scanDelayCheckBox->setChecked( m_scanDelayState ); m_scanDelayLineEdit->setEnabled( m_scanDelayState ); - m_scanDelayLineEdit->setText( QString::number( m_scanDelayValue )); + m_scanDelayLineEdit->setText( TQString::number( m_scanDelayValue )); switch( m_simpleTimingValue ) { case Aggressive_T4_Timing: m_aggressiveRadio->setChecked( true ); break; @@ -404,7 +404,7 @@ void TimingWidget::setInitialValues( ) // simpleTiming // ============ -QString TimingWidget::simpleTiming( ) const +TQString TimingWidget::simpleTiming( ) const { switch( m_simpleTimingValue ) { case Aggressive_T4_Timing: return "Aggressive"; case Default_Timing: return ""; @@ -417,7 +417,7 @@ QString TimingWidget::simpleTiming( ) const kdDebug( ) << "internal error - unknown simple timing value " << m_simpleTimingValue << endl; ASSERT( false ); - return QString::null; + return TQString::null; } // slotAggressiveRadioClicked |