@ -20,19 +20,19 @@
* *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
# include < qcheckbox.h>
# include < nt qcheckbox.h>
# include < qiconset.h>
# include < nt qiconset.h>
# include < qlabel.h>
# include < nt qlabel.h>
# include < qlayout.h>
# include < nt qlayout.h>
# include < qlineedit.h>
# include < nt qlineedit.h>
# include < qpushbutton.h>
# include < nt qpushbutton.h>
# include < qspinbox.h>
# include < nt qspinbox.h>
# include < k config.h>
# include < tde config.h>
# include <kdebug.h>
# include <kdebug.h>
# include < k global.h>
# include < tde global.h>
# include <kiconloader.h>
# include <kiconloader.h>
# include < k locale.h>
# include < tde locale.h>
# include <kmessagebox.h>
# include <kmessagebox.h>
# include "compoundwidget.h"
# include "compoundwidget.h"
@ -42,8 +42,8 @@
// constructor
// constructor
// ===========
// ===========
CompoundWidget : : CompoundWidget ( QWidget* parent , const char * name )
CompoundWidget : : CompoundWidget ( T QWidget* parent , const char * name )
: QWidget( parent , name )
: T QWidget( parent , name )
{ createLayout ( ) ;
{ createLayout ( ) ;
}
}
@ -51,122 +51,122 @@ CompoundWidget::CompoundWidget( QWidget* parent, const char* name )
// ============
// ============
void CompoundWidget : : createLayout ( )
void CompoundWidget : : createLayout ( )
{ QGridLayout* gridLayout = new QGridLayout( this ) ;
{ T QGridLayout* gridLayout = new T QGridLayout( this ) ;
KIconLoader* iconLoader = K Global: : iconLoader ( ) ;
TDEIconLoader* iconLoader = TDE Global: : iconLoader ( ) ;
QIconSet clearLeftIconSet = iconLoader - > loadIconSet ( " clear_left " , K Icon: : Small ) ;
T QIconSet clearLeftIconSet = iconLoader - > loadIconSet ( " clear_left " , TDE Icon: : Small ) ;
QIconSet fileOpenIconSet = iconLoader - > loadIconSet ( " fileopen " , K Icon: : Small ) ;
T QIconSet fileOpenIconSet = iconLoader - > loadIconSet ( " fileopen " , TDE Icon: : Small ) ;
m_decoyButton = new QPushButton( clearLeftIconSet , NULL , this , " target file button " ) ;
m_decoyButton = new T QPushButton( clearLeftIconSet , NULL , this , " target file button " ) ;
m_excludeButton = new QPushButton( clearLeftIconSet , NULL , this , " target file button " ) ;
m_excludeButton = new T QPushButton( clearLeftIconSet , NULL , this , " target file button " ) ;
m_interfaceButton = new QPushButton( clearLeftIconSet , NULL , this , " target file button " ) ;
m_interfaceButton = new T QPushButton( clearLeftIconSet , NULL , this , " target file button " ) ;
m_sourceIPButton = new QPushButton( clearLeftIconSet , NULL , this , " target file button " ) ;
m_sourceIPButton = new T QPushButton( clearLeftIconSet , NULL , this , " target file button " ) ;
m_spoofMacButton = new QPushButton( clearLeftIconSet , NULL , this , " target file button " ) ;
m_spoofMacButton = new T QPushButton( clearLeftIconSet , NULL , this , " target file button " ) ;
m_dataDirButton = new QPushButton( fileOpenIconSet , NULL , this , " datadir button " ) ;
m_dataDirButton = new T QPushButton( fileOpenIconSet , NULL , this , " datadir button " ) ;
m_excludeFileButton = new QPushButton( fileOpenIconSet , NULL , this , " exclude file button " ) ;
m_excludeFileButton = new T QPushButton( fileOpenIconSet , NULL , this , " exclude file button " ) ;
m_targetFileButton = new QPushButton( fileOpenIconSet , NULL , this , " target file button " ) ;
m_targetFileButton = new T QPushButton( fileOpenIconSet , NULL , this , " target file button " ) ;
m_dataDirCheckBox = new QCheckBox( i18n ( " Data directory (--datadir <name>) " ) , this , " datadir checkbox " ) ;
m_dataDirCheckBox = new T QCheckBox( i18n ( " Data directory (--datadir <name>) " ) , this , " datadir checkbox " ) ;
m_dataLengthCheckBox = new QCheckBox( i18n ( " Data length (--data_length <value> " ) , this , " data length checkbox " ) ;
m_dataLengthCheckBox = new T QCheckBox( i18n ( " Data length (--data_length <value> " ) , this , " data length checkbox " ) ;
m_debugLevelCheckBox = new QCheckBox( i18n ( " Debug level (-d) " ) , this , " debug checkbox " ) ;
m_debugLevelCheckBox = new T QCheckBox( i18n ( " Debug level (-d) " ) , this , " debug checkbox " ) ;
m_decoyCheckBox = new QCheckBox( i18n ( " Decoy hosts (-D <host list>) " ) , this , " decoy checkbox " ) ;
m_decoyCheckBox = new T QCheckBox( i18n ( " Decoy hosts (-D <host list>) " ) , this , " decoy checkbox " ) ;
m_excludeCheckBox = new QCheckBox( i18n ( " Exclude hosts (--exclude <hosts>) " ) , this , " exclude checkbox " ) ;
m_excludeCheckBox = new T QCheckBox( i18n ( " Exclude hosts (--exclude <hosts>) " ) , this , " exclude checkbox " ) ;
m_excludeFileCheckBox = new QCheckBox( i18n ( " Exclude file (--excludefile <path>) " ) , this , " exclude checkbox " ) ;
m_excludeFileCheckBox = new T QCheckBox( i18n ( " Exclude file (--excludefile <path>) " ) , this , " exclude checkbox " ) ;
m_fragmentLevelCheckBox = new QCheckBox( i18n ( " Fragment level (-f) " ) , this , " fragment checkbox " ) ;
m_fragmentLevelCheckBox = new T QCheckBox( i18n ( " Fragment level (-f) " ) , this , " fragment checkbox " ) ;
m_interfaceCheckBox = new QCheckBox( i18n ( " Interface (-e) " ) , this , " interface checkbox " ) ;
m_interfaceCheckBox = new T QCheckBox( i18n ( " Interface (-e) " ) , this , " interface checkbox " ) ;
m_maxSocketsCheckBox = new QCheckBox( i18n ( " Max sockets (-M <value>) " ) , this , " max sockets checkbox " ) ;
m_maxSocketsCheckBox = new T QCheckBox( i18n ( " Max sockets (-M <value>) " ) , this , " max sockets checkbox " ) ;
m_randomIPCheckBox = new QCheckBox( i18n ( " Random IP scan (-iR <value>) " ) , this , " random ip checkbox " ) ;
m_randomIPCheckBox = new T QCheckBox( i18n ( " Random IP scan (-iR <value>) " ) , this , " random ip checkbox " ) ;
m_sourceIPCheckBox = new QCheckBox( i18n ( " Source IP addr (-S <value>) " ) , this , " source ip checkbox " ) ;
m_sourceIPCheckBox = new T QCheckBox( i18n ( " Source IP addr (-S <value>) " ) , this , " source ip checkbox " ) ;
m_sourcePortCheckBox = new QCheckBox( i18n ( " Source port (-g <value>) " ) , this , " source port checkbox " ) ;
m_sourcePortCheckBox = new T QCheckBox( i18n ( " Source port (-g <value>) " ) , this , " source port checkbox " ) ;
m_spoofMacCheckBox = new QCheckBox( i18n ( " Spoof MAC addr (--spoof_mac <value>) " ) , this , " spoof mac checkbox " ) ;
m_spoofMacCheckBox = new T QCheckBox( i18n ( " Spoof MAC addr (--spoof_mac <value>) " ) , this , " spoof mac checkbox " ) ;
m_targetFileCheckBox = new QCheckBox( i18n ( " Target hosts file (-iL <path>) " ) , this , " target checkbox " ) ;
m_targetFileCheckBox = new T QCheckBox( i18n ( " Target hosts file (-iL <path>) " ) , this , " target checkbox " ) ;
m_ttlCheckBox = new QCheckBox( i18n ( " TTL (--ttl <value>) " ) , this , " ttl checkbox " ) ;
m_ttlCheckBox = new T QCheckBox( i18n ( " TTL (--ttl <value>) " ) , this , " ttl checkbox " ) ;
m_dataDirLineEdit = new QLineEdit( this , " datadir line edit " ) ;
m_dataDirLineEdit = new T QLineEdit( this , " datadir line edit " ) ;
m_decoyLineEdit = new QLineEdit( this , " decoy edit " ) ;
m_decoyLineEdit = new T QLineEdit( this , " decoy edit " ) ;
m_excludeLineEdit = new QLineEdit( this , " exclude line edit " ) ;
m_excludeLineEdit = new T QLineEdit( this , " exclude line edit " ) ;
m_excludeFileLineEdit = new QLineEdit( this , " exclude file line edit " ) ;
m_excludeFileLineEdit = new T QLineEdit( this , " exclude file line edit " ) ;
m_interfaceLineEdit = new QLineEdit( this , " interface edit " ) ;
m_interfaceLineEdit = new T QLineEdit( this , " interface edit " ) ;
m_sourceIPLineEdit = new QLineEdit( this , " source ip edit " ) ;
m_sourceIPLineEdit = new T QLineEdit( this , " source ip edit " ) ;
m_spoofMacLineEdit = new QLineEdit( this , " spoof mac edit " ) ;
m_spoofMacLineEdit = new T QLineEdit( this , " spoof mac edit " ) ;
m_targetFileLineEdit = new QLineEdit( this , " target file line edit " ) ;
m_targetFileLineEdit = new T QLineEdit( this , " target file line edit " ) ;
m_dataLengthSpinBox = new QSpinBox( 1 , 1460 , 128 , this , " data length spin box " ) ;
m_dataLengthSpinBox = new T QSpinBox( 1 , 1460 , 128 , this , " data length spin box " ) ;
m_debugLevelSpinBox = new QSpinBox( 1 , 5 , 1 , this , " debug spin box " ) ;
m_debugLevelSpinBox = new T QSpinBox( 1 , 5 , 1 , this , " debug spin box " ) ;
m_fragmentLevelSpinBox = new QSpinBox( 1 , 2 , 1 , this , " fragment spin box " ) ;
m_fragmentLevelSpinBox = new T QSpinBox( 1 , 2 , 1 , this , " fragment spin box " ) ;
m_maxSocketsSpinBox = new QSpinBox( 1 , 999 , 10 , this , " max sockets spin box " ) ;
m_maxSocketsSpinBox = new T QSpinBox( 1 , 999 , 10 , this , " max sockets spin box " ) ;
m_randomIPSpinBox = new QSpinBox( 1 , 999 , 10 , this , " random ip spin box " ) ;
m_randomIPSpinBox = new T QSpinBox( 1 , 999 , 10 , this , " random ip spin box " ) ;
m_sourcePortSpinBox = new QSpinBox( 1 , 65535 , 64 , this , " source port spin box " ) ;
m_sourcePortSpinBox = new T QSpinBox( 1 , 65535 , 64 , this , " source port spin box " ) ;
m_ttlSpinBox = new QSpinBox( 1 , 255 , 32 , this , " ttl spin box " ) ;
m_ttlSpinBox = new T QSpinBox( 1 , 255 , 32 , this , " ttl spin box " ) ;
byte row = 1 ;
byte row = 1 ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( m_dataLengthCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_dataLengthCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_dataLengthSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( m_dataLengthSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( m_debugLevelCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_debugLevelCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_debugLevelSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( m_debugLevelSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( new QLabel( " # " , this ) , row , 1 ) ;
gridLayout - > addWidget ( new T QLabel( " # " , this ) , row , 1 ) ;
gridLayout - > addWidget ( m_fragmentLevelCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_fragmentLevelCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_fragmentLevelSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( m_fragmentLevelSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( m_maxSocketsCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_maxSocketsCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_maxSocketsSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( m_maxSocketsSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( m_randomIPCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_randomIPCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_randomIPSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( m_randomIPSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( m_sourcePortCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_sourcePortCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_sourcePortSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( m_sourcePortSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 1 ) ;
gridLayout - > addWidget ( m_ttlCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_ttlCheckBox , row , 3 ) ;
gridLayout - > addWidget ( m_ttlSpinBox , row + + , 4 ) ;
gridLayout - > addWidget ( m_ttlSpinBox , row + + , 4 ) ;
byte rowBlock1 = row ;
byte rowBlock1 = row ;
row = 1 ;
row = 1 ;
gridLayout - > addWidget ( new QLabel( " # " , this ) , row , 6 ) ;
gridLayout - > addWidget ( new T QLabel( " # " , this ) , row , 6 ) ;
gridLayout - > addWidget ( m_decoyCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_decoyCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_decoyLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_decoyLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_decoyButton , row + + , 10 ) ;
gridLayout - > addWidget ( m_decoyButton , row + + , 10 ) ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( m_excludeCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_excludeCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_excludeLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_excludeLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_excludeButton , row + + , 10 ) ;
gridLayout - > addWidget ( m_excludeButton , row + + , 10 ) ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( m_interfaceCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_interfaceCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_interfaceLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_interfaceLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_interfaceButton , row + + , 10 ) ;
gridLayout - > addWidget ( m_interfaceButton , row + + , 10 ) ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( m_sourceIPCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_sourceIPCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_sourceIPLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_sourceIPLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_sourceIPButton , row + + , 10 ) ;
gridLayout - > addWidget ( m_sourceIPButton , row + + , 10 ) ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( m_spoofMacCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_spoofMacCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_spoofMacLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_spoofMacLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_spoofMacButton , row + + , 10 ) ;
gridLayout - > addWidget ( m_spoofMacButton , row + + , 10 ) ;
row + + ;
row + + ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( m_excludeFileCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_excludeFileCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_excludeFileLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_excludeFileLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_excludeFileButton , row + + , 10 ) ;
gridLayout - > addWidget ( m_excludeFileButton , row + + , 10 ) ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( m_dataDirCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_dataDirCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_dataDirLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_dataDirLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_dataDirButton , row + + , 10 ) ;
gridLayout - > addWidget ( m_dataDirButton , row + + , 10 ) ;
gridLayout - > addWidget ( new QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( new T QLabel( " " , this ) , row , 6 ) ;
gridLayout - > addWidget ( m_targetFileCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_targetFileCheckBox , row , 8 ) ;
gridLayout - > addWidget ( m_targetFileLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_targetFileLineEdit , row , 9 ) ;
gridLayout - > addWidget ( m_targetFileButton , row + + , 10 ) ;
gridLayout - > addWidget ( m_targetFileButton , row + + , 10 ) ;
@ -216,33 +216,33 @@ void CompoundWidget::finaliseInitialisation( )
connect ( whatsThis , SIGNAL ( clicked ( ) ) , SLOT ( slotWhatsThisClicked ( ) ) ) ;
connect ( whatsThis , SIGNAL ( clicked ( ) ) , SLOT ( slotWhatsThisClicked ( ) ) ) ;
connect ( m_dataDirCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_dataDirCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_dataDirLineEdit , SIGNAL ( textChanged ( const QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_dataDirLineEdit , SIGNAL ( textChanged ( const T QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_dataLengthCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_dataLengthCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_dataLengthSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_dataLengthSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_debugLevelCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_debugLevelCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_debugLevelSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_debugLevelSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_decoyCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_decoyCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_decoyLineEdit , SIGNAL ( textChanged ( const QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_decoyLineEdit , SIGNAL ( textChanged ( const T QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_excludeCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_excludeCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_excludeLineEdit , SIGNAL ( textChanged ( const QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_excludeLineEdit , SIGNAL ( textChanged ( const T QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_excludeFileCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_excludeFileCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_excludeFileLineEdit , SIGNAL ( textChanged ( const QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_excludeFileLineEdit , SIGNAL ( textChanged ( const T QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_fragmentLevelCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_fragmentLevelCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_fragmentLevelSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_fragmentLevelSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_interfaceCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_interfaceCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_interfaceLineEdit , SIGNAL ( textChanged ( const QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_interfaceLineEdit , SIGNAL ( textChanged ( const T QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_maxSocketsCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_maxSocketsCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_maxSocketsSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_maxSocketsSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_randomIPCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_randomIPCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_randomIPSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_randomIPSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_sourceIPCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_sourceIPCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_sourceIPLineEdit , SIGNAL ( textChanged ( const QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_sourceIPLineEdit , SIGNAL ( textChanged ( const T QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_sourcePortCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_sourcePortCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_sourcePortSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_sourcePortSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_spoofMacCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_spoofMacCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_spoofMacLineEdit , SIGNAL ( textChanged ( const QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_spoofMacLineEdit , SIGNAL ( textChanged ( const T QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_targetFileCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_targetFileCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_targetFileLineEdit , SIGNAL ( textChanged ( const QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_targetFileLineEdit , SIGNAL ( textChanged ( const T QString& ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_ttlCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_ttlCheckBox , SIGNAL ( clicked ( ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_ttlSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
connect ( m_ttlSpinBox , SIGNAL ( valueChanged ( int ) ) , SIGNAL ( optionsDirty ( ) ) ) ;
}
}
@ -252,59 +252,59 @@ void CompoundWidget::finaliseInitialisation( )
bool CompoundWidget : : getOptions ( bool & needRoot )
bool CompoundWidget : : getOptions ( bool & needRoot )
{ bool dataDirState = m_dataDirCheckBox - > isChecked ( ) ;
{ bool dataDirState = m_dataDirCheckBox - > isChecked ( ) ;
QString dataDirValue = m_dataDirLineEdit - > text ( ) ;
T QString dataDirValue = m_dataDirLineEdit - > text ( ) ;
bool decoyState = m_decoyCheckBox - > isChecked ( ) ;
bool decoyState = m_decoyCheckBox - > isChecked ( ) ;
QString decoyValue = m_decoyLineEdit - > text ( ) ;
T QString decoyValue = m_decoyLineEdit - > text ( ) ;
bool excludeState = m_excludeCheckBox - > isChecked ( ) ;
bool excludeState = m_excludeCheckBox - > isChecked ( ) ;
QString excludeValue = m_excludeLineEdit - > text ( ) ;
T QString excludeValue = m_excludeLineEdit - > text ( ) ;
bool excludeFileState = m_excludeFileCheckBox - > isChecked ( ) ;
bool excludeFileState = m_excludeFileCheckBox - > isChecked ( ) ;
QString excludeFileValue = m_excludeFileLineEdit - > text ( ) ;
T QString excludeFileValue = m_excludeFileLineEdit - > text ( ) ;
bool interfaceState = m_interfaceCheckBox - > isChecked ( ) ;
bool interfaceState = m_interfaceCheckBox - > isChecked ( ) ;
QString interfaceValue = m_interfaceLineEdit - > text ( ) ;
T QString interfaceValue = m_interfaceLineEdit - > text ( ) ;
bool sourceIPState = m_sourceIPCheckBox - > isChecked ( ) ;
bool sourceIPState = m_sourceIPCheckBox - > isChecked ( ) ;
QString sourceIPValue = m_sourceIPLineEdit - > text ( ) ;
T QString sourceIPValue = m_sourceIPLineEdit - > text ( ) ;
bool spoofMacState = m_spoofMacCheckBox - > isChecked ( ) ;
bool spoofMacState = m_spoofMacCheckBox - > isChecked ( ) ;
QString spoofMacValue = m_spoofMacLineEdit - > text ( ) ;
T QString spoofMacValue = m_spoofMacLineEdit - > text ( ) ;
bool targetFileState = m_targetFileCheckBox - > isChecked ( ) ;
bool targetFileState = m_targetFileCheckBox - > isChecked ( ) ;
QString targetFileValue = m_targetFileLineEdit - > text ( ) ;
T QString targetFileValue = m_targetFileLineEdit - > text ( ) ;
if ( dataDirState & & dataDirValue . isEmpty ( ) )
if ( dataDirState & & dataDirValue . isEmpty ( ) )
{ KMessageBox : : error ( this , i18n ( QString( " Data directory name not specified " ) ) , i18n ( " Data directory name error " ) ) ;
{ KMessageBox : : error ( this , i18n ( T QString( " Data directory name not specified " ) ) , i18n ( " Data directory name error " ) ) ;
return false ;
return false ;
}
}
if ( decoyState & & decoyValue . isEmpty ( ) )
if ( decoyState & & decoyValue . isEmpty ( ) )
{ KMessageBox : : error ( this , i18n ( QString( " Decoy host list not specified " ) ) , i18n ( " Decoy hosts error " ) ) ;
{ KMessageBox : : error ( this , i18n ( T QString( " Decoy host list not specified " ) ) , i18n ( " Decoy hosts error " ) ) ;
return false ;
return false ;
}
}
if ( excludeState & & excludeValue . isEmpty ( ) )
if ( excludeState & & excludeValue . isEmpty ( ) )
{ KMessageBox : : error ( this , i18n ( QString( " Exclude hosts not specified " ) ) , i18n ( " Exclude hosts error " ) ) ;
{ KMessageBox : : error ( this , i18n ( T QString( " Exclude hosts not specified " ) ) , i18n ( " Exclude hosts error " ) ) ;
return false ;
return false ;
}
}
if ( excludeFileState & & excludeFileValue . isEmpty ( ) )
if ( excludeFileState & & excludeFileValue . isEmpty ( ) )
{ KMessageBox : : error ( this , i18n ( QString( " Exclude hosts file name not specified " ) ) , i18n ( " Exclude hosts file name error " ) ) ;
{ KMessageBox : : error ( this , i18n ( T QString( " Exclude hosts file name not specified " ) ) , i18n ( " Exclude hosts file name error " ) ) ;
return false ;
return false ;
}
}
if ( interfaceState & & interfaceValue . isEmpty ( ) )
if ( interfaceState & & interfaceValue . isEmpty ( ) )
{ KMessageBox : : error ( this , i18n ( QString( " Interface name not specified " ) ) , i18n ( " Interface name error " ) ) ;
{ KMessageBox : : error ( this , i18n ( T QString( " Interface name not specified " ) ) , i18n ( " Interface name error " ) ) ;
return false ;
return false ;
}
}
if ( sourceIPState & & sourceIPValue . isEmpty ( ) )
if ( sourceIPState & & sourceIPValue . isEmpty ( ) )
{ KMessageBox : : error ( this , i18n ( QString( " Source IP address not specified " ) ) , i18n ( " Source IP address error " ) ) ;
{ KMessageBox : : error ( this , i18n ( T QString( " Source IP address not specified " ) ) , i18n ( " Source IP address error " ) ) ;
return false ;
return false ;
}
}
if ( spoofMacState & & spoofMacValue . isEmpty ( ) )
if ( spoofMacState & & spoofMacValue . isEmpty ( ) )
{ KMessageBox : : error ( this , i18n ( QString( " Spoof MAC address not specified " ) ) , i18n ( " Spoof MAC address error " ) ) ;
{ KMessageBox : : error ( this , i18n ( T QString( " Spoof MAC address not specified " ) ) , i18n ( " Spoof MAC address error " ) ) ;
return false ;
return false ;
}
}
if ( targetFileState & & targetFileValue . isEmpty ( ) )
if ( targetFileState & & targetFileValue . isEmpty ( ) )
{ KMessageBox : : error ( this , i18n ( QString( " Target hosts file name not specified " ) ) , i18n ( " Target hosts file name error " ) ) ;
{ KMessageBox : : error ( this , i18n ( T QString( " Target hosts file name not specified " ) ) , i18n ( " Target hosts file name error " ) ) ;
return false ;
return false ;
}
}
@ -346,7 +346,7 @@ bool CompoundWidget::getOptions( bool& needRoot )
// readProfile
// readProfile
// ===========
// ===========
void CompoundWidget : : readProfile ( K Config* config )
void CompoundWidget : : readProfile ( TDE Config* config )
{ m_dataDirState = config - > readBoolEntry ( " dataDirState " ) ;
{ m_dataDirState = config - > readBoolEntry ( " dataDirState " ) ;
m_dataDirValue = config - > readEntry ( " dataDirValue " ) ;
m_dataDirValue = config - > readEntry ( " dataDirValue " ) ;
m_dataLengthState = config - > readBoolEntry ( " dataLengthState " ) ;
m_dataLengthState = config - > readBoolEntry ( " dataLengthState " ) ;
@ -382,7 +382,7 @@ void CompoundWidget::readProfile( KConfig* config )
// saveProfile
// saveProfile
// ===========
// ===========
void CompoundWidget : : saveProfile ( K Config* config )
void CompoundWidget : : saveProfile ( TDE Config* config )
{ config - > writeEntry ( " dataDirState " , m_dataDirState ) ;
{ config - > writeEntry ( " dataDirState " , m_dataDirState ) ;
config - > writeEntry ( " dataDirValue " , m_dataDirValue ) ;
config - > writeEntry ( " dataDirValue " , m_dataDirValue ) ;
config - > writeEntry ( " dataLengthState " , m_dataLengthState ) ;
config - > writeEntry ( " dataLengthState " , m_dataLengthState ) ;