Convert to TDE R14 API

pull/1/head
Timothy Pearson 11 years ago
parent 56ffa61b35
commit d598a49a3e

@ -1033,7 +1033,7 @@ elif test "$kde_use_qt_emb" = "yes"; then
x_includes=""
x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then
dnl We're using QT/Mac (I use QT_MAC so that qglobal.h doesn't *have* to
dnl We're using QT/Mac (I use QT_MAC so that ntqglobal.h doesn't *have* to
dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -DQT_MAC -no-cpp-precomp"
@ -1065,19 +1065,19 @@ AC_DEFUN([KDE_PRINT_QT_PROGRAM],
AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
#include <qglobal.h>
#include <qapplication.h>
#include <ntqglobal.h>
#include <ntqapplication.h>
EOF
if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF
#include <qevent.h>
#include <qstring.h>
#include <qstyle.h>
#include <ntqevent.h>
#include <ntqstring.h>
#include <ntqstyle.h>
EOF
if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210
#if TQT_VERSION < 210
#error 1
#endif
EOF
@ -1086,8 +1086,8 @@ fi
if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF
#include <qcursor.h>
#include <qstylefactory.h>
#include <ntqcursor.h>
#include <ntqstylefactory.h>
#include <private/qucomextra_p.h>
EOF
fi
@ -1170,22 +1170,22 @@ fi
if test -z "$3"; then
if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 0x03@VER@00"
kde_qt_verstring="TQT_VERSION >= 0x03@VER@00"
qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else
kde_qt_verstring="QT_VERSION >= 300"
kde_qt_verstring="TQT_VERSION >= 300"
fi
fi
if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222"
kde_qt_verstring="TQT_VERSION >= 222"
else
kde_qt_verstring="QT_VERSION >= 200"
kde_qt_verstring="TQT_VERSION >= 200"
fi
fi
if test $kde_qtver = 1; then
kde_qt_verstring="QT_VERSION >= 142 && QT_VERSION < 200"
kde_qt_verstring="TQT_VERSION >= 142 && TQT_VERSION < 200"
fi
else
kde_qt_verstring="$3"
@ -1291,7 +1291,7 @@ AC_ARG_ENABLE(
USING_QT_MT=""
dnl ------------------------------------------------------------------------
dnl If we not get --disable-qt-mt then adjust some vars for the host.
dnl If we not get --disable-tqt-mt then adjust some vars for the host.
dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS=
@ -1354,7 +1354,7 @@ dnl ------------------------------------------------------------
fi
dnl ------------------------------------------------------------------------
dnl If we got --enable-qt-mt then adjust the Qt library name for the host.
dnl If we got --enable-tqt-mt then adjust the Qt library name for the host.
dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then
@ -1425,9 +1425,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi
if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h
kde_qt_header=ntqstyle.h
else
kde_qt_header=qglobal.h
kde_qt_header=ntqglobal.h
fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir)
@ -1979,7 +1979,7 @@ AC_CACHE_VAL(kde_cv_have_kdeqtaddon,
LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([
#include <qdom.h>
#include <ntqdom.h>
],
[
QDomDocument doc;
@ -2498,7 +2498,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK(
[#include <qapplication.h>],
[#include <ntqapplication.h>],
[
int argc;
char** argv;
@ -4205,7 +4205,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl
[
#include <qimageio.h>
#include <qstring.h>
#include <ntqstring.h>
int main() {
QString t = "hallo";
t.fill('t');
@ -4989,7 +4989,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir"
fi
AC_FIND_FILE(qsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_FIND_FILE(ntqsql.html, [ $kde_qtdir/doc/html $QTDIR/doc/html /usr/share/doc/packages/qt3/html /usr/lib/qt/doc /usr/lib/qt3/doc /usr/lib/qt3/doc/html /usr/doc/qt3/html /usr/doc/qt3 /usr/share/doc/qt3-doc /usr/share/qt3/doc/html /usr/X11R6/share/doc/qt/html ], QTDOCDIR)
AC_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR)
@ -5010,7 +5010,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/qsql.html; then
if test -n "$DOXYGEN" && test -x "$DOXYGEN" && test -f $QTDOCDIR/ntqsql.html; then
KDE_HAS_DOXYGEN=yes
fi
AC_SUBST(KDE_HAS_DOXYGEN)

@ -15,7 +15,7 @@ messages: rc.cpp
$(EXTRACTRC) `find . -name \*.ui -o -name \*.rc` > rc.cpp
$(XGETTEXT) *.cpp -o $(podir)/knmap.pot
KDE_ICON = AUTO
TDE_ICON = AUTO
#########################################################################
# APPLICATION SECTION
@ -30,8 +30,8 @@ knmap_SOURCES = main.cpp knmap.cpp mainwidget.cpp outputwidget.cpp \
profiledialog.cpp loggingoptions.cpp simpleoptions.cpp pandsoptions.cpp whatsthis.cpp \
tabwidgetptrlist.cpp tabwidgetdata.cpp scanwidget.cpp indexwidget.cpp scannamedialog.cpp \
scanstack.cpp scanmonitor.cpp scanmonitorevent.cpp nmapoutputbuffer.cpp
knmap_LDFLAGS = $(KDE_RPATH) $(all_libraries)
knmap_LDADD = $(LIB_KIO) $(LIB_KHTML) $(LIB_KDEUI) $(LIB_KDECORE) $(LIB_QT)
knmap_LDFLAGS = $(TDE_RPATH) $(all_libraries)
knmap_LDADD = $(LIB_KIO) $(LIB_KHTML) $(LIB_TDEUI) $(LIB_TDECORE) $(LIB_TQT)
# this is where the desktop file will go
shelldesktopdir = $(kde_appsdir)/Utilities
@ -41,6 +41,6 @@ shelldesktop_DATA = knmap.desktop
shellrcdir = $(kde_datadir)/knmap
shellrc_DATA = knmapui.rc nmap_manpage.html nmap_manpage.html.diff
kde_icon_KDEICON = hi16-app-scanclose.png hi32-app-scanclose.png \
kde_icon_TDEICON = hi16-app-scanclose.png hi32-app-scanclose.png \
hi16-app-scannew.png hi32-app-scannew.png hi16-app-scanrename.png hi32-app-scanrename.png \
hi16-app-scanduplicate.png hi32-app-scanduplicate.png hi16-app-manpage.png hi32-app-manpage.png

@ -20,23 +20,23 @@
* *
***************************************************************************/
#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qstringlist.h>
#include <qvalidator.h>
#include <kconfig.h>
#include <ntqbuttongroup.h>
#include <ntqcheckbox.h>
#include <ntqcombobox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqlineedit.h>
#include <ntqlistbox.h>
#include <ntqpushbutton.h>
#include <ntqradiobutton.h>
#include <ntqstringlist.h>
#include <ntqvalidator.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 "commonwidget.h"
@ -45,8 +45,8 @@
// constructor
// ===========
CommonWidget::CommonWidget( QWidget* parent, const char* name )
: QWidget( parent, name ),
CommonWidget::CommonWidget( TQWidget* parent, const char* name )
: TQWidget( parent, name ),
m_hosts( NULL ),
m_portRangeIgnoreChange( false ),
m_portRanges( NULL )
@ -73,11 +73,11 @@ bool CommonWidget::buildPortRangesTables( const boolPtr tcpPorts, const boolPtr
{ memset( tcpPorts, 0, 64 * 1024 );
memset( udpPorts, 0, 64 * 1024 );
QStringList portRanges;
TQStringList portRanges;
getPortRanges( &portRanges );
for( QStringList::Iterator it = portRanges.begin( ); it != portRanges.end( ); ++it )
{ QString portRange = *it;
for( TQStringList::Iterator it = portRanges.begin( ); it != portRanges.end( ); ++it )
{ TQString portRange = *it;
bool tcp = false;
bool udp = false;
@ -96,11 +96,11 @@ bool CommonWidget::buildPortRangesTables( const boolPtr tcpPorts, const boolPtr
portRange = portRange.right( portRange.length( ) - 2 );
}
else
{ KMessageBox::error( this, i18n( QString( "Internal error - Unknown Port Range protocol '%1'" ).arg( portRange[ 0 ])), i18n( "Internal error" ));
{ KMessageBox::error( this, i18n( TQString( "Internal error - Unknown Port Range protocol '%1'" ).arg( portRange[ 0 ])), i18n( "Internal error" ));
return false;
}
QStringList ports = QStringList::split( "-", portRange );
TQStringList ports = TQStringList::split( "-", portRange );
if( ports.count( ) > 2 )
{ KMessageBox::error( this, i18n( "Internal error - Illegal Port Range encountered" ), i18n( "Internal error" ));
@ -129,18 +129,18 @@ bool CommonWidget::buildPortRangesTables( const boolPtr tcpPorts, const boolPtr
// ============
void CommonWidget::createLayout( )
{ QGridLayout* gridLayout = new QGridLayout( this );
KIconLoader* iconLoader = KGlobal::iconLoader( );
QIconSet clearRightIconSet = iconLoader->loadIconSet( "locationbar_erase", KIcon::Small );
{ TQGridLayout* gridLayout = new TQGridLayout( this );
TDEIconLoader* iconLoader = TDEGlobal::iconLoader( );
TQIconSet clearRightIconSet = iconLoader->loadIconSet( "locationbar_erase", TDEIcon::Small );
byte row = 1;
m_hostButton = new QPushButton( clearRightIconSet, NULL, this, "host button" );
m_hostComboBox = new QComboBox( true, this, "target hosts combobox" );
QHBoxLayout* hostLayout = new QHBoxLayout( );
m_hostButton = new TQPushButton( clearRightIconSet, NULL, this, "host button" );
m_hostComboBox = new TQComboBox( true, this, "target hosts combobox" );
TQHBoxLayout* hostLayout = new TQHBoxLayout( );
byte col = 0;
hostLayout->insertStretch( col++, 0 );
hostLayout->insertWidget( col++, new QLabel( i18n( "Target host(s)" ), this, "target hosts label" ), 0 );
hostLayout->insertWidget( col++, new TQLabel( i18n( "Target host(s)" ), this, "target hosts label" ), 0 );
hostLayout->insertStretch( col++, 1 );
hostLayout->insertWidget( col++, m_hostButton, 0 );
hostLayout->insertStretch( col++, 1 );
@ -148,38 +148,38 @@ void CommonWidget::createLayout( )
hostLayout->insertStretch( col++, 0 );
gridLayout->addMultiCellLayout( hostLayout, row, row, 1, 5 );
QButtonGroup* resloveGroup = new QButtonGroup( 3, Qt::Vertical, i18n( "Resolve names" ), this, "resolve names group" );
m_resovleDefaultRadio = new QRadioButton( i18n( "Default" ), resloveGroup, "default resolve radio" );
m_resovleAlwaysRadio = new QRadioButton( i18n( "Always (-R)" ), resloveGroup, "always resolve radio" );
m_resovleNeverRadio = new QRadioButton( i18n( "Never (-n)" ), resloveGroup, "never resolve radio" );
TQButtonGroup* resloveGroup = new TQButtonGroup( 3, TQt::Vertical, i18n( "Resolve names" ), this, "resolve names group" );
m_resovleDefaultRadio = new TQRadioButton( i18n( "Default" ), resloveGroup, "default resolve radio" );
m_resovleAlwaysRadio = new TQRadioButton( i18n( "Always (-R)" ), resloveGroup, "always resolve radio" );
m_resovleNeverRadio = new TQRadioButton( i18n( "Never (-n)" ), resloveGroup, "never resolve radio" );
row = 4;
gridLayout->addMultiCellWidget( resloveGroup, row, row + 3, 1, 1 );
byte rowBlock1 = ++row;
m_portRangeAddButton = new QPushButton( i18n( "Add" ), this, "add port range button" );
m_portRangeDeleteButton = new QPushButton( i18n( "Delete" ), this, "delete port range button" );
m_portRangeComboBox = new QComboBox( this, "port range combobox" );
m_portRangeLineEdit = new QLineEdit( this, "port range line edit" );
m_portRangeListBox = new QListBox( this, "port range listbox" );
m_portRangesCheckBox = new QCheckBox( i18n( "Port ranges (-p <port ranges>)" ), this, "port ranges checkbox" );
m_portRangeAddButton = new TQPushButton( i18n( "Add" ), this, "add port range button" );
m_portRangeDeleteButton = new TQPushButton( i18n( "Delete" ), this, "delete port range button" );
m_portRangeComboBox = new TQComboBox( this, "port range combobox" );
m_portRangeLineEdit = new TQLineEdit( this, "port range line edit" );
m_portRangeListBox = new TQListBox( this, "port range listbox" );
m_portRangesCheckBox = new TQCheckBox( i18n( "Port ranges (-p <port ranges>)" ), this, "port ranges checkbox" );
m_portRangeComboBox->insertItem( i18n( "Both" ), BothProtocol );
m_portRangeComboBox->insertItem( i18n( "TCP" ), TCPProtocol );
m_portRangeComboBox->insertItem( i18n( "UDP" ), UDPProtocol );
m_portRangeLineEdit->setValidator( new QRegExpValidator( QRegExp( "^\\d{1,5}-{1}\\d{1,5}$" ), this, "port range regx" ));
m_portRangeLineEdit->setValidator( new TQRegExpValidator( TQRegExp( "^\\d{1,5}-{1}\\d{1,5}$" ), this, "port range regx" ));
row = 3;
gridLayout->addMultiCellWidget( m_portRangesCheckBox, row, row, 3, 5, Qt::AlignCenter );
gridLayout->addMultiCellWidget( m_portRangesCheckBox, row, row, 3, 5, TQt::AlignCenter );
row++;
m_portRangeButton = new QPushButton( clearRightIconSet, NULL, this, "host button" );
QHBoxLayout* portRangeLayout = new QHBoxLayout( );
m_portRangeButton = new TQPushButton( clearRightIconSet, NULL, this, "host button" );
TQHBoxLayout* portRangeLayout = new TQHBoxLayout( );
col = 0;
portRangeLayout->insertStretch( col++, 0 );
portRangeLayout->insertWidget( col++, new QLabel( i18n( "New range data: " ), this, "new range data label" ), 0 );
portRangeLayout->insertWidget( col++, new TQLabel( i18n( "New range data: " ), this, "new range data label" ), 0 );
portRangeLayout->insertStretch( col++, 1 );
portRangeLayout->insertWidget( col++, m_portRangeButton, 0 );
portRangeLayout->insertStretch( col++, 1 );
@ -187,7 +187,7 @@ void CommonWidget::createLayout( )
portRangeLayout->insertStretch( col++, 0 );
gridLayout->addMultiCellLayout( portRangeLayout, row, row, 3, 5 );
gridLayout->addWidget( new QLabel( i18n( "Protocol" ), this, "protocol label" ), row + 1, 3 );
gridLayout->addWidget( new TQLabel( i18n( "Protocol" ), this, "protocol label" ), row + 1, 3 );
gridLayout->addWidget( m_portRangeComboBox, row + 2, 3 );
gridLayout->addWidget( m_portRangeAddButton, row + 4, 3 );
gridLayout->addWidget( m_portRangeDeleteButton, row + 5, 3 );
@ -230,26 +230,26 @@ void CommonWidget::finaliseInitialisation( )
connect( m_hostButton, SIGNAL( clicked( )), SLOT( slotHostButtonClicked( )));
connect( m_hostComboBox, SIGNAL( activated( int )), SLOT( slotHostActivated( int )));
connect( m_hostComboBox, SIGNAL( textChanged( const QString& )), SLOT( slotHostTextChanged( const QString& )));
connect( m_hostComboBox, SIGNAL( textChanged( const TQString& )), SLOT( slotHostTextChanged( const TQString& )));
connect( m_portRangeAddButton, SIGNAL( clicked( )), SLOT( slotPortRangeAddClicked( )));
connect( m_portRangeButton, SIGNAL( clicked( )), SLOT( slotPortRangeButtonClicked( )));
connect( m_portRangeDeleteButton, SIGNAL( clicked( )), SLOT( slotPortRangeDeleteClicked( )));
connect( m_portRangeComboBox, SIGNAL( activated( int )), SLOT( slotPortRangeActivated( int )));
connect( m_portRangeLineEdit, SIGNAL( textChanged( const QString& )), SLOT( slotPortRangeTextChanged( const QString& )));
connect( m_portRangeListBox, SIGNAL( doubleClicked( QListBoxItem* )), SLOT( slotPortRangeDoubleClicked( QListBoxItem* )));
connect( m_portRangeLineEdit, SIGNAL( textChanged( const TQString& )), SLOT( slotPortRangeTextChanged( const TQString& )));
connect( m_portRangeListBox, SIGNAL( doubleClicked( TQListBoxItem* )), SLOT( slotPortRangeDoubleClicked( TQListBoxItem* )));
connect( m_portRangeListBox, SIGNAL( highlighted( int )), SLOT( slotPortRangeHighlighted( )));
connect( m_portRangesCheckBox, SIGNAL( clicked( )), SLOT( slotPortRangesClicked( )));
connect( whatsThis, SIGNAL( clicked( )), SLOT( slotWhatsThisClicked( )));
connect( m_hostButton, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_hostComboBox, SIGNAL( activated ( int )), SIGNAL( optionsDirty( )));
connect( m_hostComboBox, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
connect( m_hostComboBox, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( )));
connect( m_portRangeAddButton, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_portRangeButton, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_portRangeComboBox, SIGNAL( activated( int )), SIGNAL( optionsDirty( )));
connect( m_portRangeDeleteButton, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_portRangeLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
connect( m_portRangeListBox, SIGNAL( doubleClicked( QListBoxItem* )), SIGNAL( optionsDirty( )));
connect( m_portRangeLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( )));
connect( m_portRangeListBox, SIGNAL( doubleClicked( TQListBoxItem* )), SIGNAL( optionsDirty( )));
connect( m_portRangeListBox, SIGNAL( highlighted ( int )), SIGNAL( optionsDirty( )));
connect( m_portRangesCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_resovleAlwaysRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
@ -258,14 +258,14 @@ void CommonWidget::finaliseInitialisation( )
emit( targetChanged( m_hostComboBox->currentText( )));
}
QString CommonWidget::getHostName( ) const
TQString CommonWidget::getHostName( ) const
{ return m_hostComboBox->currentText( );
}
// getHosts
// ========
void CommonWidget::getHosts( QStringList* hosts )
void CommonWidget::getHosts( TQStringList* hosts )
{ hosts->clear( );
for( ushort i = 0; i < m_hostComboBox->count( ); i++ )
@ -276,13 +276,13 @@ void CommonWidget::getHosts( QStringList* hosts )
// ==========
bool CommonWidget::getOptions( )
{ QStringList portRanges;
{ TQStringList portRanges;
getPortRanges( &portRanges );
bool portRangesState = m_portRangesCheckBox->isChecked( );
if( portRangesState && portRanges.isEmpty( ))
{ KMessageBox::error( this, i18n( QString( "Port ranges not specified" )), i18n( "Port ranges error" ));
{ KMessageBox::error( this, i18n( TQString( "Port ranges not specified" )), i18n( "Port ranges error" ));
return false;
}
@ -297,17 +297,17 @@ bool CommonWidget::getOptions( )
if( m_portRanges != NULL )
delete m_portRanges;
m_portRanges = new QStringList( portRanges );
m_portRanges = new TQStringList( portRanges );
getHosts( m_hosts );
disconnect( m_hostComboBox, SIGNAL( activated( int )), this, SLOT( slotHostActivated( int )));
disconnect( m_hostComboBox, SIGNAL( textChanged( const QString& )), this, SLOT( slotHostTextChanged( const QString& )));
disconnect( m_hostComboBox, SIGNAL( textChanged( const TQString& )), this, SLOT( slotHostTextChanged( const TQString& )));
disconnect( m_hostComboBox, SIGNAL( activated ( int )), this, SIGNAL( optionsDirty( )));
disconnect( m_hostComboBox, SIGNAL( textChanged( const QString& )), this, SIGNAL( optionsDirty( )));
disconnect( m_hostComboBox, SIGNAL( textChanged( const TQString& )), this, SIGNAL( optionsDirty( )));
byte i;
QStringList::Iterator it;
TQStringList::Iterator it;
for( i = 0, it = m_hosts->begin( ); it != m_hosts->end( ); i++, ++it )
if( *it == m_host )
@ -328,10 +328,10 @@ bool CommonWidget::getOptions( )
m_hosts->prepend( m_host );
connect( m_hostComboBox, SIGNAL( activated( int )), SLOT( slotHostActivated( int )));
connect( m_hostComboBox, SIGNAL( textChanged( const QString& )), SLOT( slotHostTextChanged( const QString& )));
connect( m_hostComboBox, SIGNAL( textChanged( const TQString& )), SLOT( slotHostTextChanged( const TQString& )));
connect( m_hostComboBox, SIGNAL( activated ( int )), SIGNAL( optionsDirty( )));
connect( m_hostComboBox, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
connect( m_hostComboBox, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( )));
return true;
}
@ -339,7 +339,7 @@ bool CommonWidget::getOptions( )
// getPortRanges
// =============
void CommonWidget::getPortRanges( QStringList* portRanges )
void CommonWidget::getPortRanges( TQStringList* portRanges )
{ portRanges->clear( );
for( ushort i = 0; i < m_portRangeListBox->count( ); i++ )
@ -376,7 +376,7 @@ bool CommonWidget::portRangesOverlapping( const ushort portFirst, const ushort p
}
uint port;
QString protocol;
TQString protocol;
for( port = portFirst; port <= portLast; port++ )
{ if( tcp && tcpPorts[ port ])
@ -391,7 +391,7 @@ bool CommonWidget::portRangesOverlapping( const ushort portFirst, const ushort p
}
if( port <= portLast )
{ KMessageBox::sorry( this, i18n( "Overlapping Port Range - %1 port %2" ).arg( protocol ).arg( QString::number( port )), i18n( "Overlapping Port Range" ));
{ KMessageBox::sorry( this, i18n( "Overlapping Port Range - %1 port %2" ).arg( protocol ).arg( TQString::number( port )), i18n( "Overlapping Port Range" ));
delete [] tcpPorts;
delete [] udpPorts;
return false;
@ -405,7 +405,7 @@ bool CommonWidget::portRangesOverlapping( const ushort portFirst, const ushort p
// readProfile
// ===========
void CommonWidget::readProfile( KConfig* config )
void CommonWidget::readProfile( TDEConfig* config )
{ m_hostCurrentItem = config->readNumEntry( "hostCurrentItem" );
m_portRangeCurrentItem = config->readNumEntry( "portRangeCurrentItem" );
m_portRangesState = config->readBoolEntry( "portRangesState" );
@ -413,14 +413,14 @@ void CommonWidget::readProfile( KConfig* config )
m_resovleDefaultState = config->readBoolEntry( "resovleDefaultState" );
m_resovleNeverState = config->readBoolEntry( "resovleNeverState" );
m_hosts = new QStringList( config->readListEntry( "hosts" ));
m_portRanges = new QStringList( config->readListEntry( "portRanges" ));
m_hosts = new TQStringList( config->readListEntry( "hosts" ));
m_portRanges = new TQStringList( config->readListEntry( "portRanges" ));
}
// saveProfile
// ===========
void CommonWidget::saveProfile( KConfig* config )
void CommonWidget::saveProfile( TDEConfig* config )
{ config->writeEntry( "hostCurrentItem", m_hostCurrentItem );
config->writeEntry( "hosts", *m_hosts );
config->writeEntry( "portRanges", *m_portRanges );
@ -475,7 +475,7 @@ void CommonWidget::slotHostButtonClicked( )
// slotHostTextChanged
// ===================
void CommonWidget::slotHostTextChanged( const QString& text )
void CommonWidget::slotHostTextChanged( const TQString& text )
{ emit( targetChanged( text ));
}
@ -483,7 +483,7 @@ void CommonWidget::slotHostTextChanged( const QString& text )
// =======================
void CommonWidget::slotPortRangeAddClicked( )
{ QString text;
{ TQString text;
if( !validatePortRange( text ))
return;
@ -534,11 +534,11 @@ void CommonWidget::slotPortRangeButtonClicked( )
// slotPortRangeDoubleClicked
// ==========================
void CommonWidget::slotPortRangeDoubleClicked( QListBoxItem* item )
void CommonWidget::slotPortRangeDoubleClicked( TQListBoxItem* item )
{ if( item == NULL )
return;
QString text = item->text( );
TQString text = item->text( );
if( text[ 0 ].isDigit( ))
m_portRangeComboBox->setCurrentItem( BothProtocol );
@ -584,7 +584,7 @@ void CommonWidget::slotPortRangesClicked( )
// slotPortRangeTextChanged
// ========================
void CommonWidget::slotPortRangeTextChanged( const QString& /* text */)
void CommonWidget::slotPortRangeTextChanged( const TQString& /* text */)
{ if( m_portRangeIgnoreChange )
m_portRangeIgnoreChange = false;
else
@ -613,7 +613,7 @@ void CommonWidget::slotWhatsThisClicked( )
// validatePortRange
// =================
bool CommonWidget::validatePortRange( QString& text )
bool CommonWidget::validatePortRange( TQString& text )
{ uint portFirst;
uint portLast;
@ -629,9 +629,9 @@ bool CommonWidget::validatePortRange( QString& text )
// validatePortRangeText
// =====================
bool CommonWidget::validatePortRangeText( QString& text, uint& portFirst, uint& portLast )
bool CommonWidget::validatePortRangeText( TQString& text, uint& portFirst, uint& portLast )
{ text = m_portRangeLineEdit->text( );
QStringList ports = QStringList::split( "-", text );
TQStringList ports = TQStringList::split( "-", text );
if( ports.count( ) > 2 )
{ KMessageBox::error( this, i18n( "Internal error - you seem to have been allowed to entered an illegal Port Range" ), i18n( "Internal error" ));

@ -27,43 +27,43 @@
# include <config.h>
#endif
#include <qwidget.h>
#include <ntqwidget.h>
#include "global.h"
// forward class definitions
// =========================
class KConfig;
class QCheckBox;
class QComboBox;
class QLineEdit;
class QListBox;
class QListBoxItem;
class QPushButton;
class QRadioButton;
class QStringList;
class TDEConfig;
class TQCheckBox;
class TQComboBox;
class TQLineEdit;
class TQListBox;
class TQListBoxItem;
class TQPushButton;
class TQRadioButton;
class TQStringList;
// CommonWidget class definition
// =============================
class CommonWidget : public QWidget
class CommonWidget : public TQWidget
{ Q_OBJECT
public:
CommonWidget( QWidget* parent, const char* name = NULL );
CommonWidget( TQWidget* parent, const char* name = NULL );
virtual ~CommonWidget( );
void finaliseInitialisation( );
bool getOptions( );
void readProfile( KConfig* config );
void saveProfile( KConfig* config );
void readProfile( TDEConfig* config );
void saveProfile( TDEConfig* config );
void setInitialValues( );
QString getHostName( ) const;
TQString getHostName( ) const;
int hostCurrentItem( ) const { return m_hostCurrentItem; }
QString host( ) const { return m_host; }
TQString host( ) const { return m_host; }
int portRangeCurrentItem( ) const { return m_portRangeCurrentItem; }
QStringList* portRanges( ) const { return m_portRanges; }
TQStringList* portRanges( ) const { return m_portRanges; }
bool portRangesState( ) const { return m_portRangesState; }
bool resovleAlwaysState( ) const { return m_resovleAlwaysState; }
bool resovleDefaultState( ) const { return m_resovleDefaultState; }
@ -71,11 +71,11 @@ class CommonWidget : public QWidget
signals:
void disableFastScan( );
void displayDocBook( const QString& );
void displayHelp( const QString& );
void displayDocBook( const TQString& );
void displayHelp( const TQString& );
void displayUnknown( );
void optionsDirty( );
void targetChanged( const QString& );
void targetChanged( const TQString& );
public slots:
void slotDisablePortRanges( );
@ -83,26 +83,26 @@ class CommonWidget : public QWidget
private slots:
void slotHostActivated( int index );
void slotHostButtonClicked( );
void slotHostTextChanged( const QString& text );
void slotHostTextChanged( const TQString& text );
void slotPortRangeActivated( int index );
void slotPortRangeAddClicked( );
void slotPortRangeDeleteClicked( );
void slotPortRangeButtonClicked( );
void slotPortRangeDoubleClicked( QListBoxItem* item );
void slotPortRangeDoubleClicked( TQListBoxItem* item );
void slotPortRangeHighlighted( );
void slotPortRangesClicked( );
void slotPortRangeTextChanged( const QString& text );
void slotPortRangeTextChanged( const TQString& text );
void slotWhatsThisClicked( );
private:
bool buildPortRangesTables( const boolPtr tcpPorts, const boolPtr udpPorts );
void createLayout( );
void enablePortRangeWidgets( );
void getHosts( QStringList* hosts );
void getPortRanges( QStringList* portRanges );
void getHosts( TQStringList* hosts );
void getPortRanges( TQStringList* portRanges );
bool portRangesOverlapping( const ushort portFirst, const ushort portLast );
bool validatePortRange( QString& text );
bool validatePortRangeText( QString& text, uint& portFirst, uint& portLast );
bool validatePortRange( TQString& text );
bool validatePortRangeText( TQString& text, uint& portFirst, uint& portLast );
// protocol indices
// ================
@ -113,27 +113,27 @@ class CommonWidget : public QWidget
UDPProtocol
};
QString m_host;
QPushButton* m_hostButton;
QComboBox* m_hostComboBox;
TQString m_host;
TQPushButton* m_hostButton;
TQComboBox* m_hostComboBox;
int m_hostCurrentItem;
QStringList* m_hosts;
QPushButton* m_portRangeAddButton;
QPushButton* m_portRangeButton;
QComboBox* m_portRangeComboBox;
TQStringList* m_hosts;
TQPushButton* m_portRangeAddButton;
TQPushButton* m_portRangeButton;
TQComboBox* m_portRangeComboBox;
int m_portRangeCurrentItem;
QPushButton* m_portRangeDeleteButton;
TQPushButton* m_portRangeDeleteButton;
bool m_portRangeIgnoreChange;
QLineEdit* m_portRangeLineEdit;
QListBox* m_portRangeListBox;
QStringList* m_portRanges;
QCheckBox* m_portRangesCheckBox;
TQLineEdit* m_portRangeLineEdit;
TQListBox* m_portRangeListBox;
TQStringList* m_portRanges;
TQCheckBox* m_portRangesCheckBox;
bool m_portRangesState;
QRadioButton* m_resovleAlwaysRadio;
TQRadioButton* m_resovleAlwaysRadio;
bool m_resovleAlwaysState;
QRadioButton* m_resovleDefaultRadio;
TQRadioButton* m_resovleDefaultRadio;
bool m_resovleDefaultState;
QRadioButton* m_resovleNeverRadio;
TQRadioButton* m_resovleNeverRadio;
bool m_resovleNeverState;
};

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

@ -26,67 +26,67 @@
# include <config.h>
#endif
#include <qwidget.h>
#include <ntqwidget.h>
#include "global.h"
// forward class definitions
// =========================
class KConfig;
class QCheckBox;
class QLineEdit;
class QPushButton;
class QSpinBox;
class TDEConfig;
class TQCheckBox;
class TQLineEdit;
class TQPushButton;
class TQSpinBox;
// CompountWidget class definition
// ===============================
class CompoundWidget : public QWidget
class CompoundWidget : public TQWidget
{ Q_OBJECT
public:
CompoundWidget( QWidget* parent, const char* name = NULL );
CompoundWidget( TQWidget* parent, const char* name = NULL );
void finaliseInitialisation( );
bool getOptions( bool& needRoot );
void readProfile( KConfig* config );
void saveProfile( KConfig* config );
void readProfile( TDEConfig* config );
void saveProfile( TDEConfig* config );
void setInitialValues( );
bool dataDirState( ) const { return m_dataDirState; }
QString dataDirValue( ) const { return m_dataDirValue; }
TQString dataDirValue( ) const { return m_dataDirValue; }
bool dataLengthState( ) const { return m_dataLengthState; }
int dataLengthValue( ) const { return m_dataLengthValue; }
bool decoyState( ) const { return m_decoyState; }
QString decoyValue( ) const { return m_decoyValue; }
TQString decoyValue( ) const { return m_decoyValue; }
bool debugLevelState( ) const { return m_debugLevelState; }
int debugLevelValue( ) const { return m_debugLevelValue; }
bool excludeState( ) const { return m_excludeState; }
QString excludeValue( ) const { return m_excludeValue; }
TQString excludeValue( ) const { return m_excludeValue; }
bool excludeFileState( ) const { return m_excludeFileState; }
QString excludeFileValue( ) const { return m_excludeFileValue; }
TQString excludeFileValue( ) const { return m_excludeFileValue; }
bool fragmentLevelState( ) const { return m_fragmentLevelState; }
int fragmentLevelValue( ) const { return m_fragmentLevelValue; }
bool interfaceState( ) const { return m_interfaceState; }
QString interfaceValue( ) const { return m_interfaceValue; }
TQString interfaceValue( ) const { return m_interfaceValue; }
bool maxSocketsState( ) const { return m_maxSocketsState; }
int maxSocketsValue( ) const { return m_maxSocketsValue; }
bool randomIPState( ) const { return m_randomIPState; }
int randomIPValue( ) const { return m_randomIPValue; }
bool sourceIPState( ) const { return m_sourceIPState; }
QString sourceIPValue( ) const { return m_sourceIPValue; }
TQString sourceIPValue( ) const { return m_sourceIPValue; }
bool sourcePortState( ) const { return m_sourcePortState; }
int sourcePortValue( ) const { return m_sourcePortValue; }
bool spoofMacState( ) const { return m_spoofMacState; }
QString spoofMacValue( ) const { return m_spoofMacValue; }
TQString spoofMacValue( ) const { return m_spoofMacValue; }
bool targetFileState( ) const { return m_targetFileState; }
QString targetFileValue( ) const { return m_targetFileValue; }
TQString targetFileValue( ) const { return m_targetFileValue; }
bool ttlState( ) const { return m_ttlState; }
int ttlValue( ) const { return m_ttlValue; }
signals:
void displayDocBook( const QString& );
void displayHelp( const QString& );
void displayDocBook( const TQString& );
void displayHelp( const TQString& );
void displayUnknown( );
void optionsDirty( );
@ -119,72 +119,72 @@ class CompoundWidget : public QWidget
private:
void createLayout( );
QPushButton* m_dataDirButton;
QCheckBox* m_dataDirCheckBox;
QLineEdit* m_dataDirLineEdit;
TQPushButton* m_dataDirButton;
TQCheckBox* m_dataDirCheckBox;
TQLineEdit* m_dataDirLineEdit;
bool m_dataDirState;
QString m_dataDirValue;
QCheckBox* m_dataLengthCheckBox;
QSpinBox* m_dataLengthSpinBox;
TQString m_dataDirValue;
TQCheckBox* m_dataLengthCheckBox;
TQSpinBox* m_dataLengthSpinBox;
bool m_dataLengthState;
int m_dataLengthValue;
QPushButton* m_decoyButton;
QCheckBox* m_decoyCheckBox;
QLineEdit* m_decoyLineEdit;
TQPushButton* m_decoyButton;
TQCheckBox* m_decoyCheckBox;
TQLineEdit* m_decoyLineEdit;
bool m_decoyState;
QString m_decoyValue;
QCheckBox* m_debugLevelCheckBox;
QSpinBox* m_debugLevelSpinBox;
TQString m_decoyValue;
TQCheckBox* m_debugLevelCheckBox;
TQSpinBox* m_debugLevelSpinBox;
bool m_debugLevelState;
int m_debugLevelValue;
QPushButton* m_excludeButton;
QCheckBox* m_excludeCheckBox;
QLineEdit* m_excludeLineEdit;
TQPushButton* m_excludeButton;
TQCheckBox* m_excludeCheckBox;
TQLineEdit* m_excludeLineEdit;
bool m_excludeState;
QString m_excludeValue;
QPushButton* m_excludeFileButton;
QCheckBox* m_excludeFileCheckBox;
QLineEdit* m_excludeFileLineEdit;
TQString m_excludeValue;
TQPushButton* m_excludeFileButton;
TQCheckBox* m_excludeFileCheckBox;
TQLineEdit* m_excludeFileLineEdit;
bool m_excludeFileState;
QString m_excludeFileValue;
QCheckBox* m_fragmentLevelCheckBox;
QSpinBox* m_fragmentLevelSpinBox;
TQString m_excludeFileValue;
TQCheckBox* m_fragmentLevelCheckBox;
TQSpinBox* m_fragmentLevelSpinBox;
bool m_fragmentLevelState;
int m_fragmentLevelValue;
QPushButton* m_interfaceButton;
QCheckBox* m_interfaceCheckBox;
QLineEdit* m_interfaceLineEdit;
TQPushButton* m_interfaceButton;
TQCheckBox* m_interfaceCheckBox;
TQLineEdit* m_interfaceLineEdit;
bool m_interfaceState;
QString m_interfaceValue;
QCheckBox* m_maxSocketsCheckBox;
QSpinBox* m_maxSocketsSpinBox;
TQString m_interfaceValue;
TQCheckBox* m_maxSocketsCheckBox;
TQSpinBox* m_maxSocketsSpinBox;
bool m_maxSocketsState;
int m_maxSocketsValue;
QCheckBox* m_randomIPCheckBox;
QSpinBox* m_randomIPSpinBox;
TQCheckBox* m_randomIPCheckBox;
TQSpinBox* m_randomIPSpinBox;
bool m_randomIPState;
int m_randomIPValue;
QPushButton* m_sourceIPButton;
QCheckBox* m_sourceIPCheckBox;
QLineEdit* m_sourceIPLineEdit;
TQPushButton* m_sourceIPButton;
TQCheckBox* m_sourceIPCheckBox;
TQLineEdit* m_sourceIPLineEdit;
bool m_sourceIPState;
QString m_sourceIPValue;
QCheckBox* m_sourcePortCheckBox;
QSpinBox* m_sourcePortSpinBox;
TQString m_sourceIPValue;
TQCheckBox* m_sourcePortCheckBox;
TQSpinBox* m_sourcePortSpinBox;
bool m_sourcePortState;
int m_sourcePortValue;
QPushButton* m_spoofMacButton;
QCheckBox* m_spoofMacCheckBox;
QLineEdit* m_spoofMacLineEdit;
TQPushButton* m_spoofMacButton;
TQCheckBox* m_spoofMacCheckBox;
TQLineEdit* m_spoofMacLineEdit;
bool m_spoofMacState;
QString m_spoofMacValue;
QPushButton* m_targetFileButton;
QCheckBox* m_targetFileCheckBox;
QLineEdit* m_targetFileLineEdit;
TQString m_spoofMacValue;
TQPushButton* m_targetFileButton;
TQCheckBox* m_targetFileCheckBox;
TQLineEdit* m_targetFileLineEdit;
bool m_targetFileState;
QString m_targetFileValue;
QCheckBox* m_ttlCheckBox;
QSpinBox* m_ttlSpinBox;
TQString m_targetFileValue;
TQCheckBox* m_ttlCheckBox;
TQSpinBox* m_ttlSpinBox;
bool m_ttlState;
int m_ttlValue;
};

@ -20,15 +20,15 @@
* *
***************************************************************************/
#include <qfile.h>
#include <qtextstream.h>
#include <ntqfile.h>
#include <ntqtextstream.h>
#include <kapplication.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <khtml_part.h>
#include <khtmlview.h>
#include <klocale.h>
#include <tdelocale.h>
#include <kmessagebox.h>
#include <kprocess.h>
#include <kstandarddirs.h>
@ -42,8 +42,8 @@ const float HTMLWidget::m_zoomIncrement = 25;
// constructor
// ===========
HTMLWidget::HTMLWidget( QStringList* stylesheetURLs, QWidget* parent, const char* name )
: QWidget( parent, name ),
HTMLWidget::HTMLWidget( TQStringList* stylesheetURLs, TQWidget* parent, const char* name )
: TQWidget( parent, name ),
m_dlg( NULL ),
m_process( NULL ),
m_stylesheetURLs( stylesheetURLs ),
@ -66,7 +66,7 @@ HTMLWidget::~HTMLWidget( )
// gotoAnchor
// ==========
void HTMLWidget::gotoAnchor( const QString& anchor )
void HTMLWidget::gotoAnchor( const TQString& anchor )
{ if( !m_htmlPart->gotoAnchor( anchor ))
KMessageBox::sorry( this, i18n( "There does not appear to be ANY help available for the item you requested.\nSorry! Now piss off and stop bothering me.\nYou stink.\nYou've got bad breath.\nYour ugly.\nNobody loves you.\nNow for your bad points..." ), i18n( "No help available in Knmap page" ));
}
@ -92,16 +92,16 @@ void HTMLWidget::loadKnmapManPage( )
// ================
void HTMLWidget::loadLocalManPage( )
{ m_process = new KProcess( );
{ m_process = new TDEProcess( );
*m_process << "man";
*m_process << "-w";
*m_process << "nmap";
connect( m_process, SIGNAL( processExited( KProcess* )), SLOT( slotManProcessExited( )));
connect( m_process, SIGNAL( receivedStdout( KProcess*, char*, int )), SLOT( slotManReceivedStdout( KProcess*, char*, int )));
connect( m_process, SIGNAL( processExited( TDEProcess* )), SLOT( slotManProcessExited( )));
connect( m_process, SIGNAL( receivedStdout( TDEProcess*, char*, int )), SLOT( slotManReceivedStdout( TDEProcess*, char*, int )));
m_manPagePath = QString::null;
m_process->start( KProcess::NotifyOnExit, KProcess::Stdout );
m_manPagePath = TQString::null;
m_process->start( TDEProcess::NotifyOnExit, TDEProcess::Stdout );
}
// loadManPage
@ -118,7 +118,7 @@ void HTMLWidget::loadManPage( const bool localManPage )
// ============
void HTMLWidget::readSettings( )
{ KConfig* config = kapp->config( );
{ TDEConfig* config = kapp->config( );
config->setGroup( "General" );
m_zoomFactor = config->readDoubleNumEntry( "zoomFactor", 100.0 );
m_stylesheetURL.setPath( config->readPathEntry( "stylesheetURL" ));
@ -127,8 +127,8 @@ void HTMLWidget::readSettings( )
// resizeEvent
// ===========
void HTMLWidget::resizeEvent( QResizeEvent* event )
{ QWidget::resizeEvent( event );
void HTMLWidget::resizeEvent( TQResizeEvent* event )
{ TQWidget::resizeEvent( event );
m_htmlPart->view( )->resize( width( ), height( ));
}
@ -136,7 +136,7 @@ void HTMLWidget::resizeEvent( QResizeEvent* event )
// ============
void HTMLWidget::saveSettings( )
{ KConfig* config = kapp->config( );
{ TDEConfig* config = kapp->config( );
config->setGroup( "General" );
config->writeEntry( "stylesheetURL", m_stylesheetURL.path( ));
config->writeEntry( "zoomFactor", m_zoomFactor );
@ -157,7 +157,7 @@ void HTMLWidget::setStylesheet( )
{ m_dlg = new StylesheetDialog( m_stylesheetURL.path( ), *m_stylesheetURLs, this, "man stylesheet dlg" );
connect( m_dlg, SIGNAL( stylesheetRemoved( )), SLOT( slotStylesheetRemoved( )));
if( m_dlg->exec( ) != QDialog::Accepted )
if( m_dlg->exec( ) != TQDialog::Accepted )
{ delete m_dlg;
m_dlg = NULL;
return;
@ -185,15 +185,15 @@ void HTMLWidget::slotGunzipProcessExited( )
delete m_process;
m_process = new KProcess( );
m_process = new TDEProcess( );
*m_process << "man2html";
*m_process << "-";
connect( m_process, SIGNAL( processExited( KProcess* )), SLOT( slotMan2HTMLProcessExited( )));
connect( m_process, SIGNAL( receivedStdout( KProcess*, char*, int )), SLOT( slotMan2HTMLReceivedStdout( KProcess*, char*, int )));
connect( m_process, SIGNAL( processExited( TDEProcess* )), SLOT( slotMan2HTMLProcessExited( )));
connect( m_process, SIGNAL( receivedStdout( TDEProcess*, char*, int )), SLOT( slotMan2HTMLReceivedStdout( TDEProcess*, char*, int )));
m_htmlData = QString::null;
m_process->start( KProcess::NotifyOnExit, KProcess::Communication( KProcess::Stdin | KProcess::Stdout ));
m_htmlData = TQString::null;
m_process->start( TDEProcess::NotifyOnExit, TDEProcess::Communication( TDEProcess::Stdin | TDEProcess::Stdout ));
m_process->writeStdin( m_manPageData, m_manPageData.length( ));
m_process->closeStdin( );
}
@ -201,15 +201,15 @@ void HTMLWidget::slotGunzipProcessExited( )
// slotGunzipReceivedStdout
// ========================
void HTMLWidget::slotGunzipReceivedStdout( KProcess* /* process */, char* buffer, int buflen )
{ m_manPageData += QString::fromLatin1( buffer, buflen );
void HTMLWidget::slotGunzipReceivedStdout( TDEProcess* /* process */, char* buffer, int buflen )
{ m_manPageData += TQString::fromLatin1( buffer, buflen );
}
// slotMan2HTMLReceivedStdout
// ==========================
void HTMLWidget::slotMan2HTMLReceivedStdout( KProcess* /* process */, char* buffer, int buflen )
{ m_htmlData += QString::fromLatin1( buffer, buflen );
void HTMLWidget::slotMan2HTMLReceivedStdout( TDEProcess* /* process */, char* buffer, int buflen )
{ m_htmlData += TQString::fromLatin1( buffer, buflen );
}
// slotMan2HTMLProcessExited
@ -223,24 +223,24 @@ void HTMLWidget::slotMan2HTMLProcessExited( )
m_process = NULL;
m_htmlPart->begin( );
QTextStream textStream( &m_htmlData, IO_ReadOnly );
TQTextStream textStream( &m_htmlData, IO_ReadOnly );
while( !textStream.atEnd( ))
{ QString htmlLine = textStream.readLine( );
{ TQString htmlLine = textStream.readLine( );
if( htmlLine.startsWith( "<H2>TARGET SPECIFICATION</H2>" ))
m_htmlPart->write( "<a id='target'>" );
else
if( htmlLine.startsWith( "<DT><B>-" ))
{ QStringList nmapOptions = QStringList::split( " ", htmlLine.right( htmlLine.length( ) - 7 ));
QString anchors;
{ TQStringList nmapOptions = TQStringList::split( " ", htmlLine.right( htmlLine.length( ) - 7 ));
TQString anchors;
for( QStringList::Iterator it = nmapOptions.begin( ); it != nmapOptions.end( ); ++it )
for( TQStringList::Iterator it = nmapOptions.begin( ); it != nmapOptions.end( ); ++it )
{ if( (*it)[ 0 ] != '-' )
break;
QStringList nmapOption = QStringList::split( "<", *it );
anchors += QString( "<a id='%1'>" ).arg( nmapOption.front( ));
TQStringList nmapOption = TQStringList::split( "<", *it );
anchors += TQString( "<a id='%1'>" ).arg( nmapOption.front( ));
}
m_htmlPart->write( anchors );
@ -279,23 +279,23 @@ void HTMLWidget::slotManProcessExited( )
return;
}
m_process = new KProcess( );
m_process = new TDEProcess( );
*m_process << "gunzip";
*m_process << "-c";
*m_process << m_manPagePath;
connect( m_process, SIGNAL( processExited( KProcess* )), SLOT( slotGunzipProcessExited( )));
connect( m_process, SIGNAL( receivedStdout( KProcess*, char*, int )), SLOT( slotGunzipReceivedStdout( KProcess*, char*, int )));
connect( m_process, SIGNAL( processExited( TDEProcess* )), SLOT( slotGunzipProcessExited( )));
connect( m_process, SIGNAL( receivedStdout( TDEProcess*, char*, int )), SLOT( slotGunzipReceivedStdout( TDEProcess*, char*, int )));
m_manPageData = QString::null;
m_process->start( KProcess::NotifyOnExit, KProcess::Stdout );
m_manPageData = TQString::null;
m_process->start( TDEProcess::NotifyOnExit, TDEProcess::Stdout );
}
// slotManReceivedStdout
// =====================
void HTMLWidget::slotManReceivedStdout( KProcess* /* process */, char* buffer, int buflen )
{ m_manPagePath += QString::fromLatin1( buffer, buflen );
void HTMLWidget::slotManReceivedStdout( TDEProcess* /* process */, char* buffer, int buflen )
{ m_manPagePath += TQString::fromLatin1( buffer, buflen );
}
// slotStylesheetRemoved
@ -312,24 +312,24 @@ void HTMLWidget::slotStylesheetRemoved( )
bool HTMLWidget::tryKnmapFile( )
{
#ifdef _DEBUG
QString path = "/home/c/knmap/src/nmap_manpage.html";
TQString path = "/home/c/knmap/src/nmap_manpage.html";
#else
QString path = locate( "data", "knmap/nmap_manpage.html" );
TQString path = locate( "data", "knmap/nmap_manpage.html" );
#endif
if( !QFile::exists( path ))
if( !TQFile::exists( path ))
return false;
QFile manPageFile( path );
TQFile manPageFile( path );
if( !manPageFile.open( IO_ReadOnly ))
return false;
QTextStream manPageStream( &manPageFile );
TQTextStream manPageStream( &manPageFile );
m_htmlPart->begin( );
while ( !manPageStream.atEnd( ))
{ QString line = manPageStream.read( );
{ TQString line = manPageStream.read( );
m_htmlPart->write( line );
}

@ -27,8 +27,8 @@
# include <config.h>
#endif
#include <qstringlist.h>
#include <qwidget.h>
#include <ntqstringlist.h>
#include <ntqwidget.h>
#include <kurl.h>
#include "global.h"
@ -36,21 +36,21 @@
// =========================
class KHTMLPart;
class KProcess;
class TDEProcess;
class StylesheetDialog;
// HTMLWidget class definition
// ===========================
class HTMLWidget : public QWidget
class HTMLWidget : public TQWidget
{ Q_OBJECT
public:
HTMLWidget( QStringList* stylesheetURLs, QWidget* parent = NULL, const char* name = NULL );
HTMLWidget( TQStringList* stylesheetURLs, TQWidget* parent = NULL, const char* name = NULL );
virtual ~HTMLWidget( );
void gotoAnchor( const QString& anchor );
void gotoAnchor( const TQString& anchor );
void loadManPage( const bool localManPage );
void readSettings( );
void saveSettings( );
@ -62,32 +62,32 @@ class HTMLWidget : public QWidget
void zoomOut( );
signals:
void errorLoadingLocalManPage( const QString& );
void errorLoadingLocalManPage( const TQString& );
void optionsDirty( );
private slots:
void slotGunzipProcessExited( );
void slotGunzipReceivedStdout( KProcess* process, char* buffer, int buflen );
void slotGunzipReceivedStdout( TDEProcess* process, char* buffer, int buflen );
void slotMan2HTMLProcessExited( );
void slotMan2HTMLReceivedStdout( KProcess* process, char* buffer, int buflen );
void slotMan2HTMLReceivedStdout( TDEProcess* process, char* buffer, int buflen );
void slotManProcessExited( );
void slotManReceivedStdout( KProcess* process, char* buffer, int buflen );
void slotManReceivedStdout( TDEProcess* process, char* buffer, int buflen );
void slotStylesheetRemoved( );
private:
void loadKnmapManPage( );
void loadLocalManPage( );
void resizeEvent( QResizeEvent* event );
void resizeEvent( TQResizeEvent* event );
bool tryKnmapFile( );
StylesheetDialog* m_dlg;
QString m_htmlData;
TQString m_htmlData;
KHTMLPart* m_htmlPart;
QString m_manPageData;
QString m_manPagePath;
KProcess* m_process;
TQString m_manPageData;
TQString m_manPagePath;
TDEProcess* m_process;
KURL m_stylesheetURL;
QStringList* m_stylesheetURLs;
TQStringList* m_stylesheetURLs;
float m_zoomFactor;
static const float m_zoomIncrement;
};

@ -20,19 +20,19 @@
* *
***************************************************************************/
#include <qdragobject.h>
#include <qfontmetrics.h>
#include <qpainter.h>
#include <qpopupmenu.h>
#include <qtimer.h>
#include <ntqdragobject.h>
#include <ntqfontmetrics.h>
#include <ntqpainter.h>
#include <ntqpopupmenu.h>
#include <ntqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <kglobal.h>
#include <tdeglobal.h>
#include <kglobalsettings.h>
#include <kiconloader.h>
#include <klocale.h>
#include <tdelocale.h>
#include "global.h"
#include "indexwidget.h"
@ -44,7 +44,7 @@
// ===========
IndexWidget::IndexWidget( ScanStack* scanStack, MainWidget* parent, const char* name )
: QScrollView( parent, name ),
: TQScrollView( parent, name ),
m_blinkTimer( NULL ),
m_scanCount( 0 ),
m_scanStack( scanStack )
@ -56,7 +56,7 @@ IndexWidget::IndexWidget( ScanStack* scanStack, MainWidget* parent, const char*
// ==============
short IndexWidget::calculateIndex( const ushort y )
{ QFontMetrics metrics = fontMetrics( );
{ TQFontMetrics metrics = fontMetrics( );
byte height = metrics.height( );
ushort index = y / height;
@ -66,7 +66,7 @@ short IndexWidget::calculateIndex( const ushort y )
// contentsContextMenuEvent
// ========================
void IndexWidget::contentsContextMenuEvent( QContextMenuEvent* event )
void IndexWidget::contentsContextMenuEvent( TQContextMenuEvent* event )
{ short index = calculateIndex( event->y( ));
if( index < 0 )
@ -75,15 +75,15 @@ void IndexWidget::contentsContextMenuEvent( QContextMenuEvent* event )
ScanWidget* scanWidget = m_scanStack->makeScanWidgetVisible( index );
emit( visibleScanWidgetChanged( scanWidget ));
QPopupMenu* contextMenu = new QPopupMenu( this, "context menu" );
KIconLoader* iconLoader = KGlobal::iconLoader( );
QIconSet profileLoad = iconLoader->loadIconSet( "profileload", KIcon::Small );
QIconSet profileSave = iconLoader->loadIconSet( "profilesave", KIcon::Small );
QIconSet profileSaveAs = iconLoader->loadIconSet( "profilesaveas", KIcon::Small );
QIconSet scanClose = iconLoader->loadIconSet( "scanclose", KIcon::Small );
QIconSet scanDuplicate = iconLoader->loadIconSet( "scanduplicate", KIcon::Small );
QIconSet scanNew = iconLoader->loadIconSet( "scannew", KIcon::Small );
QIconSet scanRename = iconLoader->loadIconSet( "scanrename", KIcon::Small );
TQPopupMenu* contextMenu = new TQPopupMenu( this, "context menu" );
TDEIconLoader* iconLoader = TDEGlobal::iconLoader( );
TQIconSet profileLoad = iconLoader->loadIconSet( "profileload", TDEIcon::Small );
TQIconSet profileSave = iconLoader->loadIconSet( "profilesave", TDEIcon::Small );
TQIconSet profileSaveAs = iconLoader->loadIconSet( "profilesaveas", TDEIcon::Small );
TQIconSet scanClose = iconLoader->loadIconSet( "scanclose", TDEIcon::Small );
TQIconSet scanDuplicate = iconLoader->loadIconSet( "scanduplicate", TDEIcon::Small );
TQIconSet scanNew = iconLoader->loadIconSet( "scannew", TDEIcon::Small );
TQIconSet scanRename = iconLoader->loadIconSet( "scanrename", TDEIcon::Small );
contextMenu->insertItem( scanClose, i18n( "&Close scan" ), parent( ), SLOT( slotScanClose( )), CTRL+Key_W );
contextMenu->insertItem( scanDuplicate, i18n( "&Duplicate scan" ), parent( ), SLOT( slotScanDuplicate( )), CTRL+Key_C );
@ -101,7 +101,7 @@ void IndexWidget::contentsContextMenuEvent( QContextMenuEvent* event )
// contentsDragMoveEvent
// =====================
void IndexWidget::contentsDragMoveEvent( QDragMoveEvent* event )
void IndexWidget::contentsDragMoveEvent( TQDragMoveEvent* event )
{ short index = calculateIndex( event->pos( ).y( ));
index = index < 0 ? m_scanStack->count( ) - 1 : index;
@ -112,8 +112,8 @@ void IndexWidget::contentsDragMoveEvent( QDragMoveEvent* event )
// contentsMouseMoveEvent
// ======================
void IndexWidget::contentsMouseMoveEvent( QMouseEvent* event )
{ if( event->stateAfter( ) != Qt::LeftButton )
void IndexWidget::contentsMouseMoveEvent( TQMouseEvent* event )
{ if( event->stateAfter( ) != TQt::LeftButton )
return;
short index = calculateIndex( event->y( ));
@ -121,7 +121,7 @@ void IndexWidget::contentsMouseMoveEvent( QMouseEvent* event )
if( index < 0 )
return;
QStoredDrag* drag = new QStoredDrag( "application/octet-stream", this );
TQStoredDrag* drag = new TQStoredDrag( "application/octet-stream", this );
drag->dragMove( );
ScanWidget* scanWidget = m_scanStack->moveScanWidget( index );
@ -135,8 +135,8 @@ void IndexWidget::contentsMouseMoveEvent( QMouseEvent* event )
// contentsMousePressEvent
// =======================
void IndexWidget::contentsMousePressEvent( QMouseEvent* event )
{ if( event->stateAfter( ) != Qt::LeftButton )
void IndexWidget::contentsMousePressEvent( TQMouseEvent* event )
{ if( event->stateAfter( ) != TQt::LeftButton )
return;
short index = calculateIndex( event->y( ));
@ -154,11 +154,11 @@ void IndexWidget::contentsMousePressEvent( QMouseEvent* event )
// drawContents
// ============
void IndexWidget::drawContents( QPainter* painter, int clipx, int clipy, int clipw, int cliph )
{ painter->fillRect( clipx, clipy, clipw, cliph, KGlobalSettings::baseColor( ));
painter->setBackgroundMode( Qt::OpaqueMode );
void IndexWidget::drawContents( TQPainter* painter, int clipx, int clipy, int clipw, int cliph )
{ painter->fillRect( clipx, clipy, clipw, cliph, TDEGlobalSettings::baseColor( ));
painter->setBackgroundMode( TQt::OpaqueMode );
QFontMetrics metrics = fontMetrics( );
TQFontMetrics metrics = fontMetrics( );
byte height = metrics.height( );
byte aWidth2 = 2 * metrics.width( "*" );
ushort x = height / 2;
@ -172,40 +172,40 @@ void IndexWidget::drawContents( QPainter* painter, int clipx, int clipy, int cli
switch( scanWidget->state( ))
{ case ScanWidget::dormant:
if( m_scanStack->isVisibleWidget( scanWidget ))
{ painter->fillRect( 0, y, visibleWidth( ), height, KGlobalSettings::alternateBackgroundColor( ));
painter->setBackgroundColor( KGlobalSettings::alternateBackgroundColor( ));
painter->setPen( KGlobalSettings::buttonTextColor( ));
{ painter->fillRect( 0, y, visibleWidth( ), height, TDEGlobalSettings::alternateBackgroundColor( ));
painter->setBackgroundColor( TDEGlobalSettings::alternateBackgroundColor( ));
painter->setPen( TDEGlobalSettings::buttonTextColor( ));
break;
}
painter->setBackgroundColor( KGlobalSettings::baseColor( ));
painter->setPen( KGlobalSettings::buttonTextColor( ));
painter->setBackgroundColor( TDEGlobalSettings::baseColor( ));
painter->setPen( TDEGlobalSettings::buttonTextColor( ));
break;
case ScanWidget::finished:
painter->fillRect( 0, y, visibleWidth( ), height, KGlobalSettings::highlightColor( ));
painter->setBackgroundColor( KGlobalSettings::highlightColor( ));
painter->setPen( KGlobalSettings::activeTextColor( ));
painter->fillRect( 0, y, visibleWidth( ), height, TDEGlobalSettings::highlightColor( ));
painter->setBackgroundColor( TDEGlobalSettings::highlightColor( ));
painter->setPen( TDEGlobalSettings::activeTextColor( ));
break;
case ScanWidget::running:
if( m_highlight )
{ painter->fillRect( 0, y, visibleWidth( ), height, KGlobalSettings::highlightColor( ));
painter->setBackgroundColor( KGlobalSettings::highlightColor( ));
painter->setPen( KGlobalSettings::activeTextColor( ));
{ painter->fillRect( 0, y, visibleWidth( ), height, TDEGlobalSettings::highlightColor( ));
painter->setBackgroundColor( TDEGlobalSettings::highlightColor( ));
painter->setPen( TDEGlobalSettings::activeTextColor( ));
break;
}
if( m_scanStack->isVisibleWidget( scanWidget ))
{ painter->fillRect( 0, y, visibleWidth( ), height, KGlobalSettings::alternateBackgroundColor( ));
painter->setBackgroundColor( KGlobalSettings::alternateBackgroundColor( ));
painter->setPen( KGlobalSettings::buttonTextColor( ));
{ painter->fillRect( 0, y, visibleWidth( ), height, TDEGlobalSettings::alternateBackgroundColor( ));
painter->setBackgroundColor( TDEGlobalSettings::alternateBackgroundColor( ));
painter->setPen( TDEGlobalSettings::buttonTextColor( ));
break;
}
painter->fillRect( 0, y, visibleWidth( ), height, KGlobalSettings::baseColor( ));
painter->setBackgroundColor( KGlobalSettings::baseColor( ));
painter->setPen( KGlobalSettings::buttonTextColor( ));
painter->fillRect( 0, y, visibleWidth( ), height, TDEGlobalSettings::baseColor( ));
painter->setBackgroundColor( TDEGlobalSettings::baseColor( ));
painter->setPen( TDEGlobalSettings::buttonTextColor( ));
break;
}
@ -231,7 +231,7 @@ void IndexWidget::ensureCurrentVisible( )
if( index < 0 )
return;
QFontMetrics metrics = fontMetrics( );
TQFontMetrics metrics = fontMetrics( );
short y = index * metrics.height( ) - height( ) / 2;
setContentsPos( 0, y );
updateContents( );
@ -252,7 +252,7 @@ void IndexWidget::slotScanStarted( )
return;
ASSERT( m_blinkTimer == NULL );
m_blinkTimer = new QTimer( this );
m_blinkTimer = new TQTimer( this );
connect( m_blinkTimer, SIGNAL( timeout( )), SLOT( slotRepaint( )));
m_blinkTimer->start( 500 );
m_highlight = true;

@ -27,22 +27,22 @@
# include <config.h>
#endif
#include <qscrollview.h>
#include <ntqscrollview.h>
// forward class definitions
// =========================
class KConfig;
class TDEConfig;
class MainWidget;
class QPainter;
class QTimer;
class TQPainter;
class TQTimer;
class ScanStack;
class ScanWidget;
// IndexWidget class definition
// ============================
class IndexWidget : public QScrollView
class IndexWidget : public TQScrollView
{ Q_OBJECT
public:
@ -60,13 +60,13 @@ class IndexWidget : public QScrollView
private:
short calculateIndex( const ushort y );
void contentsContextMenuEvent( QContextMenuEvent* event );
void contentsDragMoveEvent( QDragMoveEvent* event );
void contentsMouseMoveEvent( QMouseEvent* event );
void contentsMousePressEvent( QMouseEvent* event );
void drawContents( QPainter* painter, int clipx, int clipy, int clipw, int cliph );
void contentsContextMenuEvent( TQContextMenuEvent* event );
void contentsDragMoveEvent( TQDragMoveEvent* event );
void contentsMouseMoveEvent( TQMouseEvent* event );
void contentsMousePressEvent( TQMouseEvent* event );
void drawContents( TQPainter* painter, int clipx, int clipy, int clipw, int cliph );
QTimer* m_blinkTimer;
TQTimer* m_blinkTimer;
bool m_highlight;
ushort m_scanCount;
ScanStack* m_scanStack;

@ -20,20 +20,20 @@
* *
***************************************************************************/
#include <qdir.h>
#include <qlineedit.h>
#include <ntqdir.h>
#include <ntqlineedit.h>
#include <kaction.h>
#include <kapplication.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <kedittoolbar.h>
#include <kfiledialog.h>
#include <kglobalsettings.h>
#include <kinputdialog.h>
#include <kkeydialog.h>
#include <klocale.h>
#include <kmainwindow.h>
#include <tdelocale.h>
#include <tdemainwindow.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
#include <kstatusbar.h>
@ -48,7 +48,7 @@
// ===========
Knmap::Knmap( )
: KMainWindow( NULL, "knmap" ),
: TDEMainWindow( NULL, "knmap" ),
m_mainWidget( new MainWidget( this, "main widget" ))
{ findNmap( );
setCentralWidget( m_mainWidget );
@ -65,12 +65,12 @@ Knmap::Knmap( )
SLOT( slotSetManPageActionStuff( const bool )));
connect( m_mainWidget,
SIGNAL( setCaption( const QString& )),
SLOT( slotSetCaption( const QString& )));
SIGNAL( setCaption( const TQString& )),
SLOT( slotSetCaption( const TQString& )));
connect( m_mainWidget,
SIGNAL( statusBarText( const QString& )), statusBar( ),
SLOT( message( const QString& )));
SIGNAL( statusBarText( const TQString& )), statusBar( ),
SLOT( message( const TQString& )));
connect( m_mainWidget,
SIGNAL( visibleScanWidgetChanged( ScanWidget* )),
@ -245,7 +245,7 @@ void Knmap::createMenu( )
setStandardToolBarMenuEnabled( true );
#ifdef _DEBUG
createGUI( QDir::homeDirPath( ) + "/.kde/share/apps/knmap/knmapui.rc" );
createGUI( TQDir::homeDirPath( ) + "/.kde/share/apps/knmap/knmapui.rc" );
#else
createGUI( );
#endif
@ -255,7 +255,7 @@ void Knmap::createMenu( )
// ========
void Knmap::findNmap( )
{ QString nmapPath = KStandardDirs::findExe( "nmap" );
{ TQString nmapPath = KStandardDirs::findExe( "nmap" );
if( nmapPath.isEmpty( ))
{ KMessageBox::error( this,
@ -268,9 +268,9 @@ void Knmap::findNmap( )
// getDirPath
// ==========
bool Knmap::getDirPath( const QString& caption, QString& path )
{ QString startDir = (path.isEmpty( )) ? KGlobalSettings::documentPath( ) : path;
QString tempPath = KFileDialog::getExistingDirectory( startDir, NULL, caption );
bool Knmap::getDirPath( const TQString& caption, TQString& path )
{ TQString startDir = (path.isEmpty( )) ? TDEGlobalSettings::documentPath( ) : path;
TQString tempPath = KFileDialog::getExistingDirectory( startDir, NULL, caption );
if( tempPath.isEmpty( ))
return false;
@ -282,7 +282,7 @@ bool Knmap::getDirPath( const QString& caption, QString& path )
// getDirPath
// ==========
void Knmap::getDirPath( const QString& caption, QString& path, QLineEdit* lineEdit )
void Knmap::getDirPath( const TQString& caption, TQString& path, TQLineEdit* lineEdit )
{ if( getDirPath( caption, path ))
lineEdit->setText( path );
}
@ -290,16 +290,16 @@ void Knmap::getDirPath( const QString& caption, QString& path, QLineEdit* lineEd
// getFilePath
// ===========
bool Knmap::getFilePath( const QString& caption, QString& path, const bool save )
{ QString filter = "*.txt|Text files\n*.*|All files";
QString startDir = (path.isEmpty( )) ? KGlobalSettings::documentPath( ) : path;
QString tempPath = KFileDialog::getSaveFileName( startDir, filter, NULL, caption );
bool Knmap::getFilePath( const TQString& caption, TQString& path, const bool save )
{ TQString filter = "*.txt|Text files\n*.*|All files";
TQString startDir = (path.isEmpty( )) ? TDEGlobalSettings::documentPath( ) : path;
TQString tempPath = KFileDialog::getSaveFileName( startDir, filter, NULL, caption );
if( tempPath.isEmpty( ))
return false;
if( save && QFile::exists( tempPath ))
{ if( KMessageBox::Yes != KMessageBox::questionYesNo( NULL, QString( i18n( "File \"%1\" exists.\nOverwrite?" )).arg( tempPath ), i18n( "File exists" )))
if( save && TQFile::exists( tempPath ))
{ if( KMessageBox::Yes != KMessageBox::questionYesNo( NULL, TQString( i18n( "File \"%1\" exists.\nOverwrite?" )).arg( tempPath ), i18n( "File exists" )))
return false;
}
@ -310,7 +310,7 @@ bool Knmap::getFilePath( const QString& caption, QString& path, const bool save
// getFilePath
// ===========
void Knmap::getFilePath( const QString& caption, QString& path, QLineEdit* lineEdit, const bool save )
void Knmap::getFilePath( const TQString& caption, TQString& path, TQLineEdit* lineEdit, const bool save )
{ if( getFilePath( caption, path, save ))
lineEdit->setText( path );
}
@ -351,7 +351,7 @@ void Knmap::slotConfigureShortcuts( )
// =====================
void Knmap::slotConfigureToolbars( )
{ saveMainWindowSettings( KGlobal::config( ), autoSaveGroup( ));
{ saveMainWindowSettings( TDEGlobal::config( ), autoSaveGroup( ));
KEditToolbar dlg( actionCollection( ));
connect( &dlg, SIGNAL( newToolbarConfig( )),this, SLOT( slotNewToolbarConfig( )));
@ -364,12 +364,12 @@ void Knmap::slotConfigureToolbars( )
void Knmap::slotNewToolbarConfig( )
{
#ifdef _DEBUG
createGUI( QDir::homeDirPath( ) + "/.kde/share/apps/knmap/knmapui.rc" );
createGUI( TQDir::homeDirPath( ) + "/.kde/share/apps/knmap/knmapui.rc" );
#else
createGUI( );
#endif
applyMainWindowSettings( KGlobal::config( ), autoSaveGroup( ));
applyMainWindowSettings( TDEGlobal::config( ), autoSaveGroup( ));
}
// slotOutputAvailable
@ -383,7 +383,7 @@ void Knmap::slotOutputAvailable( const bool saveState, const bool saveAsState )
// slotSetCaption
// ==============
void Knmap::slotSetCaption( const QString& caption )
void Knmap::slotSetCaption( const TQString& caption )
{ setCaption( caption );
}

@ -27,8 +27,8 @@
# include <config.h>
#endif
#include <qstringlist.h>
#include <kmainwindow.h>
#include <ntqstringlist.h>
#include <tdemainwindow.h>
#include "global.h"
// forward class definitions
@ -42,21 +42,21 @@ class ScanWidget;
// Knmap class definition
// ======================
class Knmap : public KMainWindow
class Knmap : public TDEMainWindow
{ Q_OBJECT
public:
Knmap( );
static bool getDirPath( const QString& caption, QString& path );
static void getDirPath( const QString& caption, QString& path, QLineEdit* lineEdit );
static bool getFilePath( const QString& caption, QString& path, const bool save );
static void getFilePath( const QString& caption, QString& path, QLineEdit* lineEdit, const bool save );
static bool getDirPath( const TQString& caption, TQString& path );
static void getDirPath( const TQString& caption, TQString& path, TQLineEdit* lineEdit );
static bool getFilePath( const TQString& caption, TQString& path, const bool save );
static void getFilePath( const TQString& caption, TQString& path, TQLineEdit* lineEdit, const bool save );
private slots:
void slotConfigureShortcuts( );
void slotConfigureToolbars( );
void slotSetCaption( const QString& caption );
void slotSetCaption( const TQString& caption );
void slotNewToolbarConfig( );
void slotOutputAvailable( const bool saveState, const bool saveAsState );
void slotSetManPageActionStuff( const bool useLocalManPage );

@ -20,18 +20,18 @@
* *
***************************************************************************/
#include <qbuttongroup.h>
#include <qcheckbox.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <ntqbuttongroup.h>
#include <ntqcheckbox.h>
#include <ntqlayout.h>
#include <ntqlineedit.h>
#include <ntqpushbutton.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <kglobal.h>
#include <tdeglobal.h>
#include <kiconloader.h>
#include <kinputdialog.h>
#include <klocale.h>
#include <tdelocale.h>
#include <kmessagebox.h>
#include "knmap.h"
@ -41,8 +41,8 @@
// constructor
// ===========
LoggingOptions::LoggingOptions( QWidget* parent, const char* name )
: QWidget( parent, name )
LoggingOptions::LoggingOptions( TQWidget* parent, const char* name )
: TQWidget( parent, name )
{ createLayout( );
}
@ -50,35 +50,35 @@ LoggingOptions::LoggingOptions( QWidget* parent, const char* name )
// ============
void LoggingOptions::createLayout( )
{ QGridLayout* gridLayout = new QGridLayout( this );
KIconLoader* iconLoader = KGlobal::iconLoader( );
QIconSet fileOpenIconSet = iconLoader->loadIconSet( "fileopen", KIcon::Small );
m_baseFileNameButton = new QPushButton( fileOpenIconSet, NULL, this, "base file name button" );
m_grepableLogButton = new QPushButton( fileOpenIconSet, NULL, this, "grepable log button" );
m_normalLogButton = new QPushButton( fileOpenIconSet, NULL, this, "normal log button" );
m_resumeButton = new QPushButton( fileOpenIconSet, NULL, this, "resume button" );
m_scriptKiddieButton = new QPushButton( fileOpenIconSet, NULL, this, "script kiddie button" );
m_stylesheetButton = new QPushButton( fileOpenIconSet, NULL, this, "stylesheet button" );
m_xmlLogButton = new QPushButton( fileOpenIconSet, NULL, this, "xml log button" );
m_appendOutputCheckBox = new QCheckBox( i18n( "Append output (--append_output)" ), this, "append output checkbox" );
m_baseFileNameCheckBox = new QCheckBox( i18n( "Base file name (-oA <name>) " ), this, "base name checkbox" );
m_grepableLogCheckBox = new QCheckBox( i18n( "grep'able log file (-oG <file>) " ), this, "grepable log checkbox" );
m_normalLogCheckBox = new QCheckBox( i18n( "Normal log file (-oN <file>) " ), this, "normal log checkbox" );
m_noStylesheetCheckBox = new QCheckBox( i18n( "No XSL stylesheet (--no_stylesheet)" ), this, "no stylesheet checkbox" );
m_resumeCheckBox = new QCheckBox( i18n( "Resume file (--resume <file>) " ), this, "resume checkbox" );
m_scriptKiddieCheckBox = new QCheckBox( i18n( "Script kiddie log file (-oS <file>) " ), this, "script kiddie checkbox" );
m_stylesheetCheckBox = new QCheckBox( i18n( "XSL stylesheet (--stylesheet <file>) " ), this, "stylesheet checkbox" );
m_xmlLogCheckBox = new QCheckBox( i18n( "XML log file (-oX <file>) " ), this, "xml log checkbox" );
m_baseFileNameLineEdit = new QLineEdit( this, "base file name line edit" );
m_grepableLogLineEdit = new QLineEdit( this, "grepable log line edit" );
m_normalLogLineEdit = new QLineEdit( this, "normal log line edit" );
m_resumeLineEdit = new QLineEdit( this, "resume line edit" );
m_scriptKiddieLineEdit = new QLineEdit( this, "script kiddie line edit" );
m_stylesheetLineEdit = new QLineEdit( this, "stylesheet line edit" );
m_xmlLogLineEdit = new QLineEdit( this, "xml log line edit" );
{ TQGridLayout* gridLayout = new TQGridLayout( this );
TDEIconLoader* iconLoader = TDEGlobal::iconLoader( );
TQIconSet fileOpenIconSet = iconLoader->loadIconSet( "fileopen", TDEIcon::Small );
m_baseFileNameButton = new TQPushButton( fileOpenIconSet, NULL, this, "base file name button" );
m_grepableLogButton = new TQPushButton( fileOpenIconSet, NULL, this, "grepable log button" );
m_normalLogButton = new TQPushButton( fileOpenIconSet, NULL, this, "normal log button" );
m_resumeButton = new TQPushButton( fileOpenIconSet, NULL, this, "resume button" );
m_scriptKiddieButton = new TQPushButton( fileOpenIconSet, NULL, this, "script kiddie button" );
m_stylesheetButton = new TQPushButton( fileOpenIconSet, NULL, this, "stylesheet button" );
m_xmlLogButton = new TQPushButton( fileOpenIconSet, NULL, this, "xml log button" );
m_appendOutputCheckBox = new TQCheckBox( i18n( "Append output (--append_output)" ), this, "append output checkbox" );
m_baseFileNameCheckBox = new TQCheckBox( i18n( "Base file name (-oA <name>) " ), this, "base name checkbox" );
m_grepableLogCheckBox = new TQCheckBox( i18n( "grep'able log file (-oG <file>) " ), this, "grepable log checkbox" );
m_normalLogCheckBox = new TQCheckBox( i18n( "Normal log file (-oN <file>) " ), this, "normal log checkbox" );
m_noStylesheetCheckBox = new TQCheckBox( i18n( "No XSL stylesheet (--no_stylesheet)" ), this, "no stylesheet checkbox" );
m_resumeCheckBox = new TQCheckBox( i18n( "Resume file (--resume <file>) " ), this, "resume checkbox" );
m_scriptKiddieCheckBox = new TQCheckBox( i18n( "Script kiddie log file (-oS <file>) " ), this, "script kiddie checkbox" );
m_stylesheetCheckBox = new TQCheckBox( i18n( "XSL stylesheet (--stylesheet <file>) " ), this, "stylesheet checkbox" );
m_xmlLogCheckBox = new TQCheckBox( i18n( "XML log file (-oX <file>) " ), this, "xml log checkbox" );
m_baseFileNameLineEdit = new TQLineEdit( this, "base file name line edit" );
m_grepableLogLineEdit = new TQLineEdit( this, "grepable log line edit" );
m_normalLogLineEdit = new TQLineEdit( this, "normal log line edit" );
m_resumeLineEdit = new TQLineEdit( this, "resume line edit" );
m_scriptKiddieLineEdit = new TQLineEdit( this, "script kiddie line edit" );
m_stylesheetLineEdit = new TQLineEdit( this, "stylesheet line edit" );
m_xmlLogLineEdit = new TQLineEdit( this, "xml log line edit" );
byte row = 1;
gridLayout->addWidget( m_appendOutputCheckBox, row++, 1 );
@ -149,19 +149,19 @@ void LoggingOptions::finaliseInitialisation( )
connect( m_appendOutputCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_baseFileNameCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_baseFileNameLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
connect( m_baseFileNameLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( )));
connect( m_grepableLogCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_grepableLogLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
connect( m_grepableLogLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( )));
connect( m_normalLogCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_normalLogLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
connect( m_normalLogLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( )));
connect( m_resumeCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_resumeLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
connect( m_resumeLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( )));
connect( m_scriptKiddieCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_scriptKiddieLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
connect( m_scriptKiddieLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( )));
connect( m_stylesheetCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_stylesheetLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
connect( m_stylesheetLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( )));
connect( m_xmlLogCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_xmlLogLineEdit, SIGNAL( textChanged( const QString& )), SIGNAL( optionsDirty( )));
connect( m_xmlLogLineEdit, SIGNAL( textChanged( const TQString& )), SIGNAL( optionsDirty( )));
}
// getOptions
@ -169,52 +169,52 @@ void LoggingOptions::finaliseInitialisation( )
bool LoggingOptions::getOptions( )
{ bool baseFileNameState = m_baseFileNameCheckBox->isChecked( );
QString baseFileNameValue = m_baseFileNameLineEdit->text( );
TQString baseFileNameValue = m_baseFileNameLineEdit->text( );
bool grepableLogState = m_grepableLogCheckBox->isChecked( );
QString grepableLogValue = m_grepableLogLineEdit->text( );
TQString grepableLogValue = m_grepableLogLineEdit->text( );
bool normalLogState = m_normalLogCheckBox->isChecked( );
QString normalLogValue = m_normalLogLineEdit->text( );
TQString normalLogValue = m_normalLogLineEdit->text( );
bool resumeState = m_resumeCheckBox->isChecked( );
QString resumeValue = m_resumeLineEdit->text( );
TQString resumeValue = m_resumeLineEdit->text( );
bool scriptKiddieState = m_scriptKiddieCheckBox->isChecked( );
QString scriptKiddieValue = m_scriptKiddieLineEdit->text( );
TQString scriptKiddieValue = m_scriptKiddieLineEdit->text( );
bool stylesheetState = m_stylesheetCheckBox->isChecked( );
QString stylesheetValue = m_stylesheetLineEdit->text( );
TQString stylesheetValue = m_stylesheetLineEdit->text( );
bool xmlLogState = m_xmlLogCheckBox->isChecked( );
QString xmlLogValue = m_xmlLogLineEdit->text( );
TQString xmlLogValue = m_xmlLogLineEdit->text( );
if( baseFileNameState && baseFileNameValue.isEmpty( ))
{ KMessageBox::error( this, i18n( QString( "Base file name not specified" )), i18n( "Base file name error" ));
{ KMessageBox::error( this, i18n( TQString( "Base file name not specified" )), i18n( "Base file name error" ));
return false;
}
if( grepableLogState && grepableLogValue.isEmpty( ))
{ KMessageBox::error( this, i18n( QString( "grep'able log file name not specified" )), i18n( "grep'able log file name error" ));
{ KMessageBox::error( this, i18n( TQString( "grep'able log file name not specified" )), i18n( "grep'able log file name error" ));
return false;
}
if( normalLogState && normalLogValue.isEmpty( ))
{ KMessageBox::error( this, i18n( QString( "Normal log file name not specified" )), i18n( "Normal log file name error" ));
{ KMessageBox::error( this, i18n( TQString( "Normal log file name not specified" )), i18n( "Normal log file name error" ));
return false;
}
if( resumeState && scriptKiddieValue.isEmpty( ))
{ KMessageBox::error( this, i18n( QString( "Resume file name not specified" )), i18n( "Resume file name error" ));
{ KMessageBox::error( this, i18n( TQString( "Resume file name not specified" )), i18n( "Resume file name error" ));
return false;
}
if( scriptKiddieState && scriptKiddieValue.isEmpty( ))
{ KMessageBox::error( this, i18n( QString( "Script kiddie log file name not specified" )), i18n( "Script kiddie log file name error" ));
{ KMessageBox::error( this, i18n( TQString( "Script kiddie log file name not specified" )), i18n( "Script kiddie log file name error" ));
return false;
}
if( stylesheetState && stylesheetValue.isEmpty( ))
{ KMessageBox::error( this, i18n( QString( "XSL stylesheet file name not specified" )), i18n( "XSL stylesheet file name error" ));
{ KMessageBox::error( this, i18n( TQString( "XSL stylesheet file name not specified" )), i18n( "XSL stylesheet file name error" ));
return false;
}
if( xmlLogState && xmlLogValue.isEmpty( ))
{ KMessageBox::error( this, i18n( QString( "XML log file name not specified" )), i18n( "XML log file name error" ));
{ KMessageBox::error( this, i18n( TQString( "XML log file name not specified" )), i18n( "XML log file name error" ));
return false;
}
@ -240,7 +240,7 @@ bool LoggingOptions::getOptions( )
// readProfile
// ===========
void LoggingOptions::readProfile( KConfig* config )
void LoggingOptions::readProfile( TDEConfig* config )
{ m_appendOutputState = config->readBoolEntry( "appendOutputState" );
m_baseFileNameState = config->readBoolEntry( "baseFileNameState" );
m_baseFileNameValue = config->readEntry( "baseFileNameValue" );
@ -262,7 +262,7 @@ void LoggingOptions::readProfile( KConfig* config )
// saveProfile
// ===========
void LoggingOptions::saveProfile( KConfig* config )
void LoggingOptions::saveProfile( TDEConfig* config )
{ config->writeEntry( "appendOutputState", m_appendOutputState );
config->writeEntry( "baseFileNameState", m_baseFileNameState );
config->writeEntry( "baseFileNameValue", m_baseFileNameValue );

@ -27,52 +27,52 @@
# include <config.h>
#endif
#include <qwidget.h>
#include <ntqwidget.h>
#include "global.h"
// forward class definitions
// =========================
class QCheckBox;
class QLineEdit;
class QPushButton;
class KConfig;
class TQCheckBox;
class TQLineEdit;
class TQPushButton;
class TDEConfig;
// LoggingOptions class definition
// ===============================
class LoggingOptions : public QWidget
class LoggingOptions : public TQWidget
{ Q_OBJECT
public:
LoggingOptions( QWidget* parent, const char* name = NULL );
LoggingOptions( TQWidget* parent, const char* name = NULL );
void finaliseInitialisation( );
bool getOptions( );
void readProfile( KConfig* config );
void saveProfile( KConfig* config );
void readProfile( TDEConfig* config );
void saveProfile( TDEConfig* config );
void setInitialValues( );
bool appendOutputState( ) const { return m_appendOutputState; }
bool baseFileNameState( ) const { return m_baseFileNameState; }
QString baseFileNameValue( ) const { return m_baseFileNameValue; }
TQString baseFileNameValue( ) const { return m_baseFileNameValue; }
bool grepableLogState( ) const { return m_grepableLogState; }
QString grepableLogValue( ) const { return m_grepableLogValue; }
TQString grepableLogValue( ) const { return m_grepableLogValue; }
bool normalLogState( ) const { return m_normalLogState; }
QString normalLogValue( ) const { return m_normalLogValue; }
TQString normalLogValue( ) const { return m_normalLogValue; }
bool noStylesheetState( ) const { return m_noStylesheetState; }
bool resumeState( ) const { return m_resumeState; }
QString resumeValue( ) const { return m_resumeValue; }
TQString resumeValue( ) const { return m_resumeValue; }
bool scriptKiddieState( ) const { return m_scriptKiddieState; }
QString scriptKiddieValue( ) const { return m_scriptKiddieValue; }
TQString scriptKiddieValue( ) const { return m_scriptKiddieValue; }
bool stylesheetState( ) const { return m_stylesheetState; }
QString stylesheetValue( ) const { return m_stylesheetValue; }
TQString stylesheetValue( ) const { return m_stylesheetValue; }
bool xmlLogState( ) const { return m_xmlLogState; }
QString xmlLogValue( ) const { return m_xmlLogValue; }
TQString xmlLogValue( ) const { return m_xmlLogValue; }
signals:
void displayDocBook( const QString& );
void displayHelp( const QString& );
void displayDocBook( const TQString& );
void displayHelp( const TQString& );
void displayUnknown( );
void optionsDirty( );
@ -97,45 +97,45 @@ class LoggingOptions : public QWidget
private:
void createLayout( );
QCheckBox* m_appendOutputCheckBox;
TQCheckBox* m_appendOutputCheckBox;
bool m_appendOutputState;
QPushButton* m_baseFileNameButton;
QCheckBox* m_baseFileNameCheckBox;
QLineEdit* m_baseFileNameLineEdit;
TQPushButton* m_baseFileNameButton;
TQCheckBox* m_baseFileNameCheckBox;
TQLineEdit* m_baseFileNameLineEdit;
bool m_baseFileNameState;
QString m_baseFileNameValue;
QPushButton* m_grepableLogButton;
QCheckBox* m_grepableLogCheckBox;
QLineEdit* m_grepableLogLineEdit;
TQString m_baseFileNameValue;
TQPushButton* m_grepableLogButton;
TQCheckBox* m_grepableLogCheckBox;
TQLineEdit* m_grepableLogLineEdit;
bool m_grepableLogState;
QString m_grepableLogValue;
QPushButton* m_normalLogButton;
QCheckBox* m_normalLogCheckBox;
QLineEdit* m_normalLogLineEdit;
TQString m_grepableLogValue;
TQPushButton* m_normalLogButton;
TQCheckBox* m_normalLogCheckBox;
TQLineEdit* m_normalLogLineEdit;
bool m_normalLogState;
QString m_normalLogValue;
QCheckBox* m_noStylesheetCheckBox;
TQString m_normalLogValue;
TQCheckBox* m_noStylesheetCheckBox;
bool m_noStylesheetState;
QPushButton* m_resumeButton;
QCheckBox* m_resumeCheckBox;
QLineEdit* m_resumeLineEdit;
TQPushButton* m_resumeButton;
TQCheckBox* m_resumeCheckBox;
TQLineEdit* m_resumeLineEdit;
bool m_resumeState;
QString m_resumeValue;
QPushButton* m_scriptKiddieButton;
QCheckBox* m_scriptKiddieCheckBox;
QLineEdit* m_scriptKiddieLineEdit;
TQString m_resumeValue;
TQPushButton* m_scriptKiddieButton;
TQCheckBox* m_scriptKiddieCheckBox;
TQLineEdit* m_scriptKiddieLineEdit;
bool m_scriptKiddieState;
QString m_scriptKiddieValue;
QPushButton* m_stylesheetButton;
QCheckBox* m_stylesheetCheckBox;
QLineEdit* m_stylesheetLineEdit;
TQString m_scriptKiddieValue;
TQPushButton* m_stylesheetButton;
TQCheckBox* m_stylesheetCheckBox;
TQLineEdit* m_stylesheetLineEdit;
bool m_stylesheetState;
QString m_stylesheetValue;
QPushButton* m_xmlLogButton;
QCheckBox* m_xmlLogCheckBox;
QLineEdit* m_xmlLogLineEdit;
TQString m_stylesheetValue;
TQPushButton* m_xmlLogButton;
TQCheckBox* m_xmlLogCheckBox;
TQLineEdit* m_xmlLogLineEdit;
bool m_xmlLogState;
QString m_xmlLogValue;
TQString m_xmlLogValue;
};
#endif // _LOGGINGOPTIONS_

@ -20,28 +20,28 @@
* *
***************************************************************************/
#include <kaboutdata.h>
#include <tdeaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <tdecmdlineargs.h>
#include <kdebug.h>
#include <klocale.h>
#include <tdelocale.h>
#include "global.h"
#include "knmap.h"
static const char description[] = I18N_NOOP( "A KDE frontend for nmap" );
static KCmdLineOptions options[] = { KCmdLineLastOption };
static TDECmdLineOptions options[] = { KCmdLineLastOption };
// main
// ====
int main( int argc, string argv[])
{ QString version = QString( "Version 2.1, %1 %2" ).arg( __TIME__ ).arg( __DATE__ );
KAboutData about( "knmap",
{ TQString version = TQString( "Version 2.1, %1 %2" ).arg( __TIME__ ).arg( __DATE__ );
TDEAboutData about( "knmap",
I18N_NOOP( "Knmap" ),
version,
description,
KAboutData::License_GPL,
TDEAboutData::License_GPL,
"(C) 2005, 2006 Kevin Gilbert",
I18N_NOOP( "This program is a complete re-write of one by the same name written by Alexandre\n"
"Sagala. The last version of that program was 0.9 which was released on 2003-03-09\n"
@ -59,15 +59,15 @@ int main( int argc, string argv[])
"Initial rewrite released as version 1.0\nVersions 2.0, 2.1",
"kev.gilbert@cdu.edu.au",
"http://informatics.cdu.edu.au/staff/kgilbert" );
KCmdLineArgs::init( argc, argv, &about );
KCmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs::init( argc, argv, &about );
TDECmdLineArgs::addCmdLineOptions( options );
KApplication app;
if( app.isRestored( ))
{ RESTORE( Knmap );
}
else
{ KCmdLineArgs* args = KCmdLineArgs::parsedArgs( );
{ TDECmdLineArgs* args = TDECmdLineArgs::parsedArgs( );
Knmap* mainWin = new Knmap;
app.setMainWidget( mainWin );
mainWin->show( );

@ -20,13 +20,13 @@
* *
***************************************************************************/
#include <qtimer.h>
#include <ntqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <kinputdialog.h>
#include <klocale.h>
#include <tdelocale.h>
#include <kmessagebox.h>
#include "htmlwidget.h"
@ -40,8 +40,8 @@
// constructor
// ===========
MainWidget::MainWidget( QWidget* parent, const char* name )
: QSplitter( parent, name ),
MainWidget::MainWidget( TQWidget* parent, const char* name )
: TQSplitter( parent, name ),
m_dirty( false ),
m_wrapText( false )
{ m_scanStack = new ScanStack( this, "scan stack" );
@ -51,11 +51,11 @@ MainWidget::MainWidget( QWidget* parent, const char* name )
moveToFirst( m_indexWidget );
m_scanStack->appendHTMLWidget( m_htmlWidget );
setOpaqueResize( true );
QTimer::singleShot( 0, this, SLOT( slotFinaliseInitialisation( )));
TQTimer::singleShot( 0, this, SLOT( slotFinaliseInitialisation( )));
connect( m_htmlWidget,
SIGNAL( errorLoadingLocalManPage( const QString& )),
SLOT( slotErrorLoadingLocalManPage( const QString& )));
SIGNAL( errorLoadingLocalManPage( const TQString& )),
SLOT( slotErrorLoadingLocalManPage( const TQString& )));
connect( m_indexWidget,
SIGNAL( visibleScanWidgetChanged( ScanWidget* )),
@ -65,20 +65,20 @@ MainWidget::MainWidget( QWidget* parent, const char* name )
// createScan
// ==========
ScanWidget* MainWidget::createScan( const QString& scanName, const bool useTargetHost, const QString& profileName )
ScanWidget* MainWidget::createScan( const TQString& scanName, const bool useTargetHost, const TQString& profileName )
{ ScanWidget* scanWidget = new ScanWidget( scanName, useTargetHost, this, "scan widget" );
m_scanStack->appendAndRaiseWidget( scanWidget );
m_scanStack->wrapText( m_wrapText );
if( profileName == QString::null )
if( profileName == TQString::null )
scanWidget->readSettings( );
else
scanWidget->setProfileName( profileName );
connect( scanWidget,
SIGNAL( displayHelp( const QString& )),
SLOT( slotDisplayHelp( const QString& )));
SIGNAL( displayHelp( const TQString& )),
SLOT( slotDisplayHelp( const TQString& )));
connect( scanWidget,
SIGNAL( optionsDirty( )),
@ -89,8 +89,8 @@ ScanWidget* MainWidget::createScan( const QString& scanName, const bool useTarge
SIGNAL( outputAvailable( const bool, const bool )));
connect( scanWidget,
SIGNAL( scanRename( const QString& )),
SLOT( slotScanRename( const QString& )));
SIGNAL( scanRename( const TQString& )),
SLOT( slotScanRename( const TQString& )));
connect( scanWidget,
SIGNAL( scanStarted( )),
@ -103,8 +103,8 @@ ScanWidget* MainWidget::createScan( const QString& scanName, const bool useTarge
SLOT( slotScanStopped( ScanWidget* )));
connect( scanWidget,
SIGNAL( statusBarText( const QString& )),
SIGNAL( statusBarText( const QString& )));
SIGNAL( statusBarText( const TQString& )),
SIGNAL( statusBarText( const TQString& )));
return scanWidget;
}
@ -122,25 +122,25 @@ void MainWidget::loadManPage( )
void MainWidget::readSettings( )
{ m_htmlWidget->readSettings( );
KConfig* config = kapp->config( );
TDEConfig* config = kapp->config( );
config->setGroup( "General" );
m_stylesheetURLs = config->readListEntry( "stylesheetURLs" );
m_useLocalManPage = config->readBoolEntry( "useLocalManPage", false );
m_wrapText = config->readBoolEntry( "wrapText", false );
QValueList<int> splitterSizes = config->readIntListEntry( "splitterSizes" );
TQValueList<int> splitterSizes = config->readIntListEntry( "splitterSizes" );
setSizes( splitterSizes );
QStringList scanNames = config->readListEntry( "scanNames" );
TQStringList scanNames = config->readListEntry( "scanNames" );
if( !scanNames.count( ))
scanNames.append( "default" );
QString visibleScanName = config->readEntry( "visibleScan", QString::null );
TQString visibleScanName = config->readEntry( "visibleScan", TQString::null );
ScanWidget* visibleScanWidget = NULL;
for( QStringList::Iterator it = scanNames.begin( ); it != scanNames.end(); ++it )
{ ScanWidget* scanWidget = createScan( *it, false, QString::null );
for( TQStringList::Iterator it = scanNames.begin( ); it != scanNames.end(); ++it )
{ ScanWidget* scanWidget = createScan( *it, false, TQString::null );
if( visibleScanName == scanWidget->scanName( ))
visibleScanWidget = scanWidget;
@ -179,7 +179,7 @@ void MainWidget::saveSettings( )
{ m_htmlWidget->saveSettings( );
ushort i;
QStringList scanNames;
TQStringList scanNames;
for( m_scanStack->resetScanWidgets( i ); m_scanStack->moreScanWidgets( i ); m_scanStack->nextScanWidget( i ))
{ ScanWidget* scanWidget = m_scanStack->currentScanWidget( i );
@ -187,8 +187,8 @@ void MainWidget::saveSettings( )
scanWidget->saveSettings( );
}
QValueList<int> splitterSizes = sizes( );
KConfig* config = kapp->config( );
TQValueList<int> splitterSizes = sizes( );
TDEConfig* config = kapp->config( );
config->setGroup( "General" );
config->writeEntry( "scanNames", scanNames );
@ -203,7 +203,7 @@ void MainWidget::saveSettings( )
// ==========
void MainWidget::setCaption( ScanWidget* scanWidget )
{ QString profileName = scanWidget->profileName( );
{ TQString profileName = scanWidget->profileName( );
profileName = profileName.right( profileName.length( ) - strlen( PROFILE_PREFIX ));
emit( setCaption( scanWidget->scanName( ) + " : " + profileName ));
}
@ -211,7 +211,7 @@ void MainWidget::setCaption( ScanWidget* scanWidget )
// slotDisplayHelp
// ===============
void MainWidget::slotDisplayHelp( const QString& anchor )
void MainWidget::slotDisplayHelp( const TQString& anchor )
{ slotShowManPage( );
m_htmlWidget->gotoAnchor( anchor );
}
@ -219,7 +219,7 @@ void MainWidget::slotDisplayHelp( const QString& anchor )
// slotErrorLoadingLocalManPage
// ============================
void MainWidget::slotErrorLoadingLocalManPage( const QString& errorText )
void MainWidget::slotErrorLoadingLocalManPage( const TQString& errorText )
{ KMessageBox::sorry( this, errorText + "\nLoading the Knmap version.", "Couldn't load local nmap 'man' page" );
slotSwitchManPages( );
}
@ -331,10 +331,10 @@ void MainWidget::slotScanDuplicate( )
void MainWidget::slotScanNew( )
{ ScanNameDialog dlg( NULL, this, "scan name dlg" );
if( dlg.exec( ) != QDialog::Accepted )
if( dlg.exec( ) != TQDialog::Accepted )
return;
QString scanName;
TQString scanName;
bool useTargetHost;
if( dlg.useHostName( ))
@ -357,7 +357,7 @@ void MainWidget::slotScanRename( )
{ ScanWidget* scanWidget = m_scanStack->visibleWidget( );
ScanNameDialog dlg( scanWidget, this, "scan name dlg" );
if( dlg.exec( ) != QDialog::Accepted )
if( dlg.exec( ) != TQDialog::Accepted )
return;
if( dlg.useHostName( ))
@ -373,7 +373,7 @@ void MainWidget::slotScanRename( )
// slotScanRename
// ==============
void MainWidget::slotScanRename( const QString& scanName )
void MainWidget::slotScanRename( const TQString& scanName )
{ ScanWidget* scanWidget = m_scanStack->visibleWidget( );
scanWidget->renameScan( scanName );
@ -435,7 +435,7 @@ void MainWidget::slotWrapText( )
void MainWidget::slotZoomCustom( )
{ bool ok;
int zoom = KInputDialog::getInteger( i18n( "Zoom percentage" ),
i18n( QString( "Enter zoom %'age (%1% - %2%)").arg( ZOOM_MIN_FACTOR ).arg( ZOOM_MAX_FACTOR)),
i18n( TQString( "Enter zoom %'age (%1% - %2%)").arg( ZOOM_MIN_FACTOR ).arg( ZOOM_MAX_FACTOR)),
int( m_htmlWidget->zoomFactor( )),
ZOOM_MIN_FACTOR,
ZOOM_MAX_FACTOR,

@ -27,8 +27,8 @@
# include <config.h>
#endif
#include <qsplitter.h>
#include <qstringlist.h>
#include <ntqsplitter.h>
#include <ntqstringlist.h>
#include "global.h"
@ -37,18 +37,18 @@
class HTMLWidget;
class IndexWidget;
class KConfig;
class TDEConfig;
class ScanStack;
class ScanWidget;
// MainWidget class definition
// ===========================
class MainWidget : public QSplitter
class MainWidget : public TQSplitter
{ Q_OBJECT
public:
MainWidget( QWidget* parent = NULL, const char* name = NULL );
MainWidget( TQWidget* parent = NULL, const char* name = NULL );
bool isDirty( ) const { return m_dirty; }
void readSettings( );
@ -57,11 +57,11 @@ class MainWidget : public QSplitter
bool wrapText( ) const { return m_wrapText; }
signals:
void displayHelp( const QString& );
void displayHelp( const TQString& );
void outputAvailable( const bool, const bool );
void setManPageActionStuff( const bool );
void setCaption( const QString& );
void statusBarText( const QString& );
void setCaption( const TQString& );
void statusBarText( const TQString& );
void visibleScanWidgetChanged( ScanWidget* );
public slots:
@ -77,7 +77,7 @@ class MainWidget : public QSplitter
void slotScanDuplicate( );
void slotScanNew( );
void slotScanRename( );
void slotScanRename( const QString& scanName );
void slotScanRename( const TQString& scanName );
void slotShowManPage( );
void slotSwitchManPages( );
void slotSetStylesheet( );
@ -88,14 +88,14 @@ class MainWidget : public QSplitter
void slotZoomOut( );
private slots:
void slotDisplayHelp( const QString& anchor );
void slotErrorLoadingLocalManPage( const QString& errorText );
void slotDisplayHelp( const TQString& anchor );
void slotErrorLoadingLocalManPage( const TQString& errorText );
void slotFinaliseInitialisation( );
void slotOptionsDirty( );
void slotVisibleScanWidgetChanged( ScanWidget* scanWidget );
private:
ScanWidget* createScan( const QString& scanName, const bool useTargetHost, const QString& profileName );
ScanWidget* createScan( const TQString& scanName, const bool useTargetHost, const TQString& profileName );
void loadManPage( );
void setCaption( ScanWidget* scanWidget );
@ -103,7 +103,7 @@ class MainWidget : public QSplitter
HTMLWidget* m_htmlWidget;
IndexWidget* m_indexWidget;
ScanStack* m_scanStack;
QStringList m_stylesheetURLs;
TQStringList m_stylesheetURLs;
bool m_useLocalManPage;
bool m_wrapText;
};

@ -278,7 +278,7 @@
reporting by some operating systems. Systems vulnerable to this
include at least some versions of AIX, Amiga, BeOS, BSDI, Cray,
Tru64 UNIX, DG/UX, OpenVMS, Digital UNIX, FreeBSD, HP-UX, OS/2,
IRIX, MacOS, NetBSD, OpenBSD, OpenStep, QNX, Rhapsody, SunOS
IRIX, MacOS, NetBSD, OpenBSD, OpenStep, TQNX, Rhapsody, SunOS
4.X, Ultrix, VAX, and VxWorks. See the nmap-hackers mailing
list archive for a full list.

@ -20,12 +20,12 @@
* *
***************************************************************************/
#include <qfile.h>
#include <qtimer.h>
#include <ntqfile.h>
#include <ntqtimer.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <klocale.h>
#include <tdelocale.h>
#include <kmessagebox.h>
#include "knmap.h"
@ -34,15 +34,15 @@
// constructor
// ===========
OutputWidget::OutputWidget( QWidget* parent, const char* name )
: QTextEdit( parent, name ),
OutputWidget::OutputWidget( TQWidget* parent, const char* name )
: TQTextEdit( parent, name ),
m_append( false ),
m_dataBytes( 0 ),
m_firstSave( true ),
m_priorType( OutputType( -1 ))
{ setFamily( "monospace" );
setReadOnly( true );
QTimer::singleShot( 0, this, SLOT( slotUpdateStatusBarText( )));
TQTimer::singleShot( 0, this, SLOT( slotUpdateStatusBarText( )));
}
// addOutput
@ -50,8 +50,8 @@ OutputWidget::OutputWidget( QWidget* parent, const char* name )
void OutputWidget::addOutput( const OutputType type, const char* buffer, const int buflen )
{ m_dataBytes += buflen;
QString outputText = QString::fromLatin1( buffer, buflen );
QString prependText;
TQString outputText = TQString::fromLatin1( buffer, buflen );
TQString prependText;
if( m_append && type == m_priorType && m_priorType != OutputType( -1 ))
{ uint paraNo = paragraphs( ) - 1;
@ -99,14 +99,14 @@ bool OutputWidget::fileSave( const bool saveAs )
return false;
m_firstSave = false;
QFile file( m_path );
TQFile file( m_path );
if( !file.open( IO_WriteOnly ))
{ KMessageBox::error( this, QString( i18n( "Could not open \"%1\"\n%2" )).arg( m_path ).arg( file.errorString( )));
{ KMessageBox::error( this, TQString( i18n( "Could not open \"%1\"\n%2" )).arg( m_path ).arg( file.errorString( )));
return false;
}
QTextStream stream( &file );
TQTextStream stream( &file );
uint noOfParagraphs = paragraphs( );
uint paragraphNo;
@ -127,14 +127,14 @@ bool OutputWidget::fileSaveAs( )
// readProfile
// ===========
void OutputWidget::readProfile( KConfig* config )
void OutputWidget::readProfile( TDEConfig* config )
{ m_path = config->readPathEntry( "path" );
}
// saveProfile
// ===========
void OutputWidget::saveProfile( KConfig* config )
void OutputWidget::saveProfile( TDEConfig* config )
{ config->writeEntry( "path", m_path );
}
@ -142,10 +142,10 @@ void OutputWidget::saveProfile( KConfig* config )
// =======================
void OutputWidget::slotUpdateStatusBarText( )
{ QString dataBytes;
{ TQString dataBytes;
if( m_dataBytes < 1024 )
dataBytes = QString::number( m_dataBytes ) + " bytes";
dataBytes = TQString::number( m_dataBytes ) + " bytes";
else
if( m_dataBytes < 1024 * 1024 )
{ float kiloBytes = m_dataBytes / float( 1024 );
@ -170,5 +170,5 @@ void OutputWidget::slotUpdateStatusBarText( )
dataBytes.sprintf( "%.1f MBytes", megaBytes );
}
emit( statusBarText( QString( "Output: %1 lines (%2)" ).arg( QString::number( paragraphs( ) - 1 )).arg( dataBytes )));
emit( statusBarText( TQString( "Output: %1 lines (%2)" ).arg( TQString::number( paragraphs( ) - 1 )).arg( dataBytes )));
}

@ -27,22 +27,22 @@
# include <config.h>
#endif
#include <qtextedit.h>
#include <ntqtextedit.h>
#include "global.h"
// forward class definitions
// =========================
class KConfig;
class TDEConfig;
// OutputWidget class definition
// =============================
class OutputWidget : public QTextEdit
class OutputWidget : public TQTextEdit
{ Q_OBJECT
public:
OutputWidget( QWidget* parent = NULL, const char* name = NULL );
OutputWidget( TQWidget* parent = NULL, const char* name = NULL );
// output type definitions
// =======================
@ -57,22 +57,22 @@ class OutputWidget : public QTextEdit
void clearOutput( );
bool fileSave( const bool saveAs = false );
bool fileSaveAs( );
void readProfile( KConfig* config );
void saveProfile( KConfig* config );
void readProfile( TDEConfig* config );
void saveProfile( TDEConfig* config );
signals:
void statusBarText( const QString& );
void statusBarText( const TQString& );
public slots:
void slotUpdateStatusBarText( );
private:
void appendLine( const OutputType type, const QString& text );
void appendLine( const OutputType type, const TQString& text );
bool m_append;
uint m_dataBytes;
bool m_firstSave;
QString m_path;
TQString m_path;
OutputType m_priorType;
};

@ -20,15 +20,15 @@
* *
***************************************************************************/
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqlineedit.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <tdeglobal.h>
#include <tdelocale.h>
#include <kmessagebox.h>
#include "pandsoptions.h"
@ -37,8 +37,8 @@
// constructor
// ===========
PAndSOptions::PAndSOptions( QWidget* parent, const char* name )
: QWidget( parent, name )
PAndSOptions::PAndSOptions( TQWidget* parent, const char* name )
: TQWidget( parent, name )
{ createLayout( );
}
@ -46,100 +46,100 @@ PAndSOptions::PAndSOptions( QWidget* parent, const char* name )
// ============
void PAndSOptions::createLayout( )
{ QGridLayout* gridLayout = new QGridLayout( this );
m_ackCheckBox = new QCheckBox( i18n( "TCP ACK (-PA)" ), this, "ack check" );
m_ackLineEdit = new QLineEdit( this, "ack edit" );
m_arpCheckBox = new QCheckBox( i18n( "ARP (-PR)" ), this, "arp check" );
m_dontPingCheckBox = new QCheckBox( i18n( "Don't ping (-P0)" ), this, "dont ping check" );
m_echoCheckBox = new QCheckBox( i18n( "ICMP echo (-PE)" ), this, "icmp echo check" );
m_netmaskCheckBox = new QCheckBox( i18n( "ICMP netmask (-PM)" ), this, "icmp netmask check" );
m_synCheckBox = new QCheckBox( i18n( "TCP SYN (-PS)" ), this, "syn check" );
m_synLineEdit = new QLineEdit( this, "syn edit" );
m_timestampCheckBox = new QCheckBox( i18n( "ICMP timestamp (-PP)" ), this, "icmp timestamp check" );
{ TQGridLayout* gridLayout = new TQGridLayout( this );
m_ackCheckBox = new TQCheckBox( i18n( "TCP ACK (-PA)" ), this, "ack check" );
m_ackLineEdit = new TQLineEdit( this, "ack edit" );
m_arpCheckBox = new TQCheckBox( i18n( "ARP (-PR)" ), this, "arp check" );
m_dontPingCheckBox = new TQCheckBox( i18n( "Don't ping (-P0)" ), this, "dont ping check" );
m_echoCheckBox = new TQCheckBox( i18n( "ICMP echo (-PE)" ), this, "icmp echo check" );
m_netmaskCheckBox = new TQCheckBox( i18n( "ICMP netmask (-PM)" ), this, "icmp netmask check" );
m_synCheckBox = new TQCheckBox( i18n( "TCP SYN (-PS)" ), this, "syn check" );
m_synLineEdit = new TQLineEdit( this, "syn edit" );
m_timestampCheckBox = new TQCheckBox( i18n( "ICMP timestamp (-PP)" ), this, "icmp timestamp check" );
byte row = 1;
gridLayout->addWidget( new QLabel( " ", this ), row, 1 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 1 );
gridLayout->addWidget( m_ackCheckBox, row++, 3 );
gridLayout->addWidget( new QLabel( " ", this ), row, 1 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 1 );
gridLayout->addWidget( m_ackLineEdit, row++, 3 );
gridLayout->addWidget( new QLabel( "#", this ), row, 1 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 1 );
gridLayout->addWidget( m_arpCheckBox, row++, 3 );
gridLayout->addWidget( new QLabel( " ", this ), row, 1 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 1 );
gridLayout->addWidget( m_dontPingCheckBox, row++, 3 );
gridLayout->addWidget( new QLabel( "#", this ), row, 1 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 1 );
gridLayout->addWidget( m_echoCheckBox, row++, 3 );
byte rowBlock1 = row;
row = 1;
gridLayout->addWidget( new QLabel( " ", this ), row, 5 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 5 );
gridLayout->addWidget( m_netmaskCheckBox, row++, 7 );
gridLayout->addWidget( new QLabel( " ", this ), row, 5 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 5 );
gridLayout->addWidget( m_synCheckBox, row++, 7 );
gridLayout->addWidget( new QLabel( " ", this ), row, 5 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 5 );
gridLayout->addWidget( m_synLineEdit, row++, 7 );
gridLayout->addWidget( new QLabel( "#", this ), row, 5 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 5 );
gridLayout->addWidget( m_timestampCheckBox, row++, 7 );
byte rowBlock2 = row;
m_scanFTPBounceCheckBox = new QCheckBox( i18n( "FTP Bounce (-b)" ), this, "ftp bounce scan check" );
m_scanFTPRelayLineEdit = new QLineEdit( this, "ftp relay edit" );
m_scanIdleCheckBox = new QCheckBox( i18n( "Idle (-sI)" ), this, "idle scan check" );
m_scanListCheckBox = new QCheckBox( i18n( "List Scan (-sL)" ), this, "list scan check" );
m_scanNullCheckBox = new QCheckBox( i18n( "Null Scan (-sN)" ), this, "null scan check" );
m_scanPingCheckBox = new QCheckBox( i18n( "Ping Scan (-sP)" ), this, "ping scan check" );
m_scanProtocolCheckBox = new QCheckBox( i18n( "Protocol Scan (-sO)" ), this, "protocol scan check" );
m_scanRPCCheckBox = new QCheckBox( i18n( "RPC (-sR)" ), this, "rpc scan check" );
m_scanFINCheckBox = new QCheckBox( i18n( "Stealth FIN (-sF)" ), this, "fin scan check" );
m_scanAckCheckBox = new QCheckBox( i18n( "TCP Ack Scan (-sA)" ), this, "ack scan check" );
m_scanSYNCheckBox = new QCheckBox( i18n( "TCP SYN (-sS)" ), this, "syn scan check" );
m_scanTCPConnectCheckBox = new QCheckBox( i18n( "TCP Connect (-sT)" ), this, "connect scan check" );
m_scanUDPCheckBox = new QCheckBox( i18n( "UDP Scan (-sU)" ), this, "udp scan check" );
m_scanVersionCheckBox = new QCheckBox( i18n( "Version Detection (-sV)" ), this, "version scan check" );
m_scanWindowCheckBox = new QCheckBox( i18n( "Window Scan (-sW)" ), this, "window scan check" );
m_scanXmasCheckBox = new QCheckBox( i18n( "Xmas Tree (-sX)" ), this, "xmas scan check" );
m_zombieLineEdit = new QLineEdit( this, "zombie edit" );
m_scanFTPBounceCheckBox = new TQCheckBox( i18n( "FTP Bounce (-b)" ), this, "ftp bounce scan check" );
m_scanFTPRelayLineEdit = new TQLineEdit( this, "ftp relay edit" );
m_scanIdleCheckBox = new TQCheckBox( i18n( "Idle (-sI)" ), this, "idle scan check" );
m_scanListCheckBox = new TQCheckBox( i18n( "List Scan (-sL)" ), this, "list scan check" );
m_scanNullCheckBox = new TQCheckBox( i18n( "Null Scan (-sN)" ), this, "null scan check" );
m_scanPingCheckBox = new TQCheckBox( i18n( "Ping Scan (-sP)" ), this, "ping scan check" );
m_scanProtocolCheckBox = new TQCheckBox( i18n( "Protocol Scan (-sO)" ), this, "protocol scan check" );
m_scanRPCCheckBox = new TQCheckBox( i18n( "RPC (-sR)" ), this, "rpc scan check" );
m_scanFINCheckBox = new TQCheckBox( i18n( "Stealth FIN (-sF)" ), this, "fin scan check" );
m_scanAckCheckBox = new TQCheckBox( i18n( "TCP Ack Scan (-sA)" ), this, "ack scan check" );
m_scanSYNCheckBox = new TQCheckBox( i18n( "TCP SYN (-sS)" ), this, "syn scan check" );
m_scanTCPConnectCheckBox = new TQCheckBox( i18n( "TCP Connect (-sT)" ), this, "connect scan check" );
m_scanUDPCheckBox = new TQCheckBox( i18n( "UDP Scan (-sU)" ), this, "udp scan check" );
m_scanVersionCheckBox = new TQCheckBox( i18n( "Version Detection (-sV)" ), this, "version scan check" );
m_scanWindowCheckBox = new TQCheckBox( i18n( "Window Scan (-sW)" ), this, "window scan check" );
m_scanXmasCheckBox = new TQCheckBox( i18n( "Xmas Tree (-sX)" ), this, "xmas scan check" );
m_zombieLineEdit = new TQLineEdit( this, "zombie edit" );
row = 1;
gridLayout->addWidget( new QLabel( " ", this ), row, 9 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 9 );
gridLayout->addWidget( m_scanFTPBounceCheckBox, row++, 11 );
gridLayout->addWidget( new QLabel( " ", this ), row, 9 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 9 );
gridLayout->addWidget( m_scanFTPRelayLineEdit, row++, 11 );
gridLayout->addWidget( new QLabel( "#", this ), row, 9 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 9 );
gridLayout->addWidget( m_scanIdleCheckBox, row++, 11 );
gridLayout->addWidget( new QLabel( " ", this ), row, 9 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 9 );
gridLayout->addWidget( m_zombieLineEdit, row++, 11 );
gridLayout->addWidget( new QLabel( " ", this ), row, 9 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 9 );
gridLayout->addWidget( m_scanListCheckBox, row++, 11 );
gridLayout->addWidget( new QLabel( "#", this ), row, 9 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 9 );
gridLayout->addWidget( m_scanNullCheckBox, row++, 11 );
byte rowBlock3 = row;
row = 1;
gridLayout->addWidget( new QLabel( " ", this ), row, 13 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 13 );
gridLayout->addWidget( m_scanPingCheckBox, row++, 15 );
gridLayout->addWidget( new QLabel( "#", this ), row, 13 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 13 );
gridLayout->addWidget( m_scanProtocolCheckBox, row++, 15 );
gridLayout->addWidget( new QLabel( " ", this ), row, 13 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 13 );
gridLayout->addWidget( m_scanRPCCheckBox, row++, 15 );
gridLayout->addWidget( new QLabel( "#", this ), row, 13 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 13 );
gridLayout->addWidget( m_scanFINCheckBox, row++, 15 );
gridLayout->addWidget( new QLabel( "#", this ), row, 13 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 13 );
gridLayout->addWidget( m_scanAckCheckBox, row++, 15 );
gridLayout->addWidget( new QLabel( "#", this ), row, 13 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 13 );
gridLayout->addWidget( m_scanSYNCheckBox, row++, 15 );
byte rowBlock4 = row;
row = 1;
gridLayout->addWidget( new QLabel( " ", this ), row, 17 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 17 );
gridLayout->addWidget( m_scanTCPConnectCheckBox, row++, 19 );
gridLayout->addWidget( new QLabel( "#", this ), row, 17 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 17 );
gridLayout->addWidget( m_scanUDPCheckBox, row++, 19 );
gridLayout->addWidget( new QLabel( " ", this ), row, 17 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 17 );
gridLayout->addWidget( m_scanVersionCheckBox, row++, 19 );
gridLayout->addWidget( new QLabel( "#", this ), row, 17 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 17 );
gridLayout->addWidget( m_scanWindowCheckBox, row++, 19 );
gridLayout->addWidget( new QLabel( "#", this ), row, 17 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 17 );
gridLayout->addWidget( m_scanXmasCheckBox, row++, 19 );
byte rowBlock5 = row;
@ -177,7 +177,7 @@ void PAndSOptions::finaliseInitialisation( )
connect( whatsThis, SIGNAL( clicked( )), SLOT( slotWhatsThisClicked( )));
connect( m_ackCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_ackLineEdit, SIGNAL( textChanged ( const QString& )), SIGNAL( optionsDirty( )));
connect( m_ackLineEdit, SIGNAL( textChanged ( const TQString& )), SIGNAL( optionsDirty( )));
connect( m_arpCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_dontPingCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_echoCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
@ -185,7 +185,7 @@ void PAndSOptions::finaliseInitialisation( )
connect( m_scanAckCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_scanFINCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_scanFTPBounceCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_scanFTPRelayLineEdit, SIGNAL( textChanged ( const QString& )), SIGNAL( optionsDirty( )));
connect( m_scanFTPRelayLineEdit, SIGNAL( textChanged ( const TQString& )), SIGNAL( optionsDirty( )));
connect( m_scanIdleCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_scanListCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_scanNullCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
@ -199,9 +199,9 @@ void PAndSOptions::finaliseInitialisation( )
connect( m_scanWindowCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_scanXmasCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_synCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_synLineEdit, SIGNAL( textChanged ( const QString& )), SIGNAL( optionsDirty( )));
connect( m_synLineEdit, SIGNAL( textChanged ( const TQString& )), SIGNAL( optionsDirty( )));
connect( m_timestampCheckBox, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_zombieLineEdit, SIGNAL( textChanged ( const QString& )), SIGNAL( optionsDirty( )));
connect( m_zombieLineEdit, SIGNAL( textChanged ( const TQString& )), SIGNAL( optionsDirty( )));
}
// getOptions
@ -255,7 +255,7 @@ bool PAndSOptions::getOptions( bool& needRoot )
// readProfile
// ===========
void PAndSOptions::readProfile( KConfig* config )
void PAndSOptions::readProfile( TDEConfig* config )
{ m_ackState = config->readBoolEntry( "ackState" );
m_ackValue = config->readEntry( "ackValue" );
m_arpState = config->readBoolEntry( "arpState" );
@ -287,7 +287,7 @@ void PAndSOptions::readProfile( KConfig* config )
// saveProfile
// ===========
void PAndSOptions::saveProfile( KConfig* config )
void PAndSOptions::saveProfile( TDEConfig* config )
{ config->writeEntry( "ackState", m_ackState );
config->writeEntry( "ackValue", m_ackValue );
config->writeEntry( "arpState", m_arpState );

@ -27,33 +27,33 @@
# include <config.h>
#endif
#include <qwidget.h>
#include <ntqwidget.h>
#include "global.h"
// forward class definitions
// =========================
class QCheckBox;
class QLineEdit;
class KConfig;
class TQCheckBox;
class TQLineEdit;
class TDEConfig;
// SimpleOptions class definition
// ==============================
class PAndSOptions : public QWidget
class PAndSOptions : public TQWidget
{ Q_OBJECT
public:
PAndSOptions( QWidget* parent, const char* name = NULL );
PAndSOptions( TQWidget* parent, const char* name = NULL );
void finaliseInitialisation( );
bool getOptions( bool& needRoot );
void readProfile( KConfig* config );
void saveProfile( KConfig* config );
void readProfile( TDEConfig* config );
void saveProfile( TDEConfig* config );
void setInitialValues( );
bool ackState( ) const { return m_ackState; }
QString ackValue( ) const { return m_ackValue; }
TQString ackValue( ) const { return m_ackValue; }
bool arpState( ) const { return m_arpState; }
bool dontPingState( ) const { return m_dontPingState; }
bool echoState( ) const { return m_echoState; }
@ -61,7 +61,7 @@ class PAndSOptions : public QWidget
bool scanAckState( ) const { return m_scanAckState; }
bool scanFINState( ) const { return m_scanFINState; }
bool scanFTPBounceState( ) const { return m_scanFTPBounceState; }
QString scanFTPRelayHost( ) const { return m_scanFTPRelayHost; }
TQString scanFTPRelayHost( ) const { return m_scanFTPRelayHost; }
bool scanIdleState( ) const { return m_scanIdleState; }
bool scanListState( ) const { return m_scanListState; }
bool scanNullState( ) const { return m_scanNullState; }
@ -75,14 +75,14 @@ class PAndSOptions : public QWidget
bool scanWindowState( ) const { return m_scanWindowState; }
bool scanXmasState( ) const { return m_scanXmasState; }
bool synState( ) const { return m_synState; }
QString synValue( ) const { return m_synValue; }
TQString synValue( ) const { return m_synValue; }
bool timestampState( ) const { return m_timestampState; }
QString zombieDetails( ) const { return m_zombieDetails; }
TQString zombieDetails( ) const { return m_zombieDetails; }
signals:
void disableFastScan( );
void displayDocBook( const QString& );
void displayHelp( const QString& );
void displayDocBook( const TQString& );
void displayHelp( const TQString& );
void displayUnknown( );
void optionsDirty( );
@ -96,58 +96,58 @@ class PAndSOptions : public QWidget
private:
void createLayout( );
QCheckBox* m_ackCheckBox;
QLineEdit* m_ackLineEdit;
TQCheckBox* m_ackCheckBox;
TQLineEdit* m_ackLineEdit;
bool m_ackState;
QString m_ackValue;
QCheckBox* m_arpCheckBox;
TQString m_ackValue;
TQCheckBox* m_arpCheckBox;
bool m_arpState;
QCheckBox* m_dontPingCheckBox;
TQCheckBox* m_dontPingCheckBox;
bool m_dontPingState;
QCheckBox* m_echoCheckBox;
TQCheckBox* m_echoCheckBox;
bool m_echoState;
QCheckBox* m_netmaskCheckBox;
TQCheckBox* m_netmaskCheckBox;
bool m_netmaskState;
QCheckBox* m_scanAckCheckBox;
TQCheckBox* m_scanAckCheckBox;
bool m_scanAckState;
QCheckBox* m_scanFINCheckBox;
TQCheckBox* m_scanFINCheckBox;
bool m_scanFINState;
QCheckBox* m_scanFTPBounceCheckBox;
TQCheckBox* m_scanFTPBounceCheckBox;
bool m_scanFTPBounceState;
QString m_scanFTPRelayHost;
QLineEdit* m_scanFTPRelayLineEdit;
QCheckBox* m_scanIdleCheckBox;
TQString m_scanFTPRelayHost;
TQLineEdit* m_scanFTPRelayLineEdit;
TQCheckBox* m_scanIdleCheckBox;
bool m_scanIdleState;
QCheckBox* m_scanListCheckBox;
TQCheckBox* m_scanListCheckBox;
bool m_scanListState;
QCheckBox* m_scanNullCheckBox;
TQCheckBox* m_scanNullCheckBox;
bool m_scanNullState;
QCheckBox* m_scanPingCheckBox;
TQCheckBox* m_scanPingCheckBox;
bool m_scanPingState;
QCheckBox* m_scanProtocolCheckBox;
TQCheckBox* m_scanProtocolCheckBox;
bool m_scanProtocolState;
QCheckBox* m_scanRPCCheckBox;
TQCheckBox* m_scanRPCCheckBox;
bool m_scanRPCState;
QCheckBox* m_scanTCPConnectCheckBox;
TQCheckBox* m_scanTCPConnectCheckBox;
bool m_scanTCPConnectState;
QCheckBox* m_scanUDPCheckBox;
TQCheckBox* m_scanUDPCheckBox;
bool m_scanUDPState;
QCheckBox* m_scanVersionCheckBox;
TQCheckBox* m_scanVersionCheckBox;
bool m_scanVersionState;
QCheckBox* m_scanWindowCheckBox;
TQCheckBox* m_scanWindowCheckBox;
bool m_scanWindowState;
QCheckBox* m_scanSYNCheckBox;
TQCheckBox* m_scanSYNCheckBox;
bool m_scanSYNState;
QCheckBox* m_scanXmasCheckBox;
TQCheckBox* m_scanXmasCheckBox;
bool m_scanXmasState;
QCheckBox* m_synCheckBox;
QLineEdit* m_synLineEdit;
TQCheckBox* m_synCheckBox;
TQLineEdit* m_synLineEdit;
bool m_synState;
QString m_synValue;
QCheckBox* m_timestampCheckBox;
TQString m_synValue;
TQCheckBox* m_timestampCheckBox;
bool m_timestampState;
QString m_zombieDetails;
QLineEdit* m_zombieLineEdit;
TQString m_zombieDetails;
TQLineEdit* m_zombieLineEdit;
};
#endif // _PANDSOPTIONS_H_

@ -20,18 +20,18 @@
* *
***************************************************************************/
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qmap.h>
#include <qpopupmenu.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqlineedit.h>
#include <ntqlistbox.h>
#include <ntqmap.h>
#include <ntqpopupmenu.h>
#include <kapplication.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <kinputdialog.h>
#include <klocale.h>
#include <tdelocale.h>
#include <kmessagebox.h>
#include "profiledialog.h"
@ -40,8 +40,8 @@
// ===========
ProfileDialog::ProfileDialog( Action action,
const QString& currentProfile,
QWidget* parent,
const TQString& currentProfile,
TQWidget* parent,
const char* name )
: KDialogBase( Plain, "", Ok | Cancel, Ok, parent, name ),
m_action( action )
@ -56,27 +56,27 @@ ProfileDialog::ProfileDialog( Action action,
createlayout( );
setInitialValues( currentProfile );
connect( m_profileListBox, SIGNAL( contextMenuRequested( QListBoxItem*, const QPoint& )), SLOT( slotProfileListContextMenu( QListBoxItem*, const QPoint& )));
connect( m_profileListBox, SIGNAL( doubleClicked( QListBoxItem* )), SLOT( slotOk( )));
connect( m_profileListBox, SIGNAL( contextMenuRequested( TQListBoxItem*, const TQPoint& )), SLOT( slotProfileListContextMenu( TQListBoxItem*, const TQPoint& )));
connect( m_profileListBox, SIGNAL( doubleClicked( TQListBoxItem* )), SLOT( slotOk( )));
connect( m_profileListBox, SIGNAL( selectionChanged( )), SLOT( slotProfileListBoxChanged( )));
}
// checkForDuplicateName
// =====================
bool ProfileDialog::checkForDuplicateName( const QString& profileName )
bool ProfileDialog::checkForDuplicateName( const TQString& profileName )
{ if( !kapp->config( )->hasGroup( PROFILE_PREFIX + profileName ))
return true;
KMessageBox::sorry( this, QString( i18n( "Profile \"%1\" already exists, please choose another name or press 'Cancel'" )).arg( profileName ), i18n( "Duplicate profile name" ));
KMessageBox::sorry( this, TQString( i18n( "Profile \"%1\" already exists, please choose another name or press 'Cancel'" )).arg( profileName ), i18n( "Duplicate profile name" ));
return false;
}
// constructNewProfileName
// =======================
QString ProfileDialog::constructNewProfileName( const QString& initialProfileName ) const
{ QString profileName = PROFILE_PREFIX + initialProfileName + "_copy";
TQString ProfileDialog::constructNewProfileName( const TQString& initialProfileName ) const
{ TQString profileName = PROFILE_PREFIX + initialProfileName + "_copy";
while( kapp->config( )->hasGroup( profileName ))
profileName += "_copy";
@ -87,11 +87,11 @@ QString ProfileDialog::constructNewProfileName( const QString& initialProfileNam
// copy
// ====
void ProfileDialog::copy( const QString& fromProfileName, const QString& toProfileName )
{ QMap<QString, QString> map = kapp->config( )->entryMap( PROFILE_PREFIX + fromProfileName );
void ProfileDialog::copy( const TQString& fromProfileName, const TQString& toProfileName )
{ TQMap<TQString, TQString> map = kapp->config( )->entryMap( PROFILE_PREFIX + fromProfileName );
kapp->config( )->setGroup( PROFILE_PREFIX + toProfileName );
for( QMap<QString, QString>::Iterator it = map.begin( ); it != map.end( ); ++it )
for( TQMap<TQString, TQString>::Iterator it = map.begin( ); it != map.end( ); ++it )
kapp->config( )->writeEntry( it.key( ), it.data( ));
m_profileListBox->insertItem( toProfileName );
@ -102,13 +102,13 @@ void ProfileDialog::copy( const QString& fromProfileName, const QString& toProfi
// ============
void ProfileDialog::createlayout( )
{ QGridLayout* layout = new QGridLayout( plainPage( ));
m_profileListBox = new QListBox( plainPage( ), "profiles list box" );
m_profileLineEdit = new QLineEdit( plainPage( ), "profiles line edit" );
{ TQGridLayout* layout = new TQGridLayout( plainPage( ));
m_profileListBox = new TQListBox( plainPage( ), "profiles list box" );
m_profileLineEdit = new TQLineEdit( plainPage( ), "profiles line edit" );
layout->addWidget( new QLabel( "Profile name: ", plainPage( ), "name label" ), 1, 1, Qt::AlignRight );
layout->addWidget( new TQLabel( "Profile name: ", plainPage( ), "name label" ), 1, 1, TQt::AlignRight );
layout->addWidget( m_profileLineEdit, 1, 2 );
layout->addWidget( new QLabel( "Known profiles: ", plainPage( ), "name label" ), 3, 1, Qt::AlignRight | Qt::AlignTop );
layout->addWidget( new TQLabel( "Known profiles: ", plainPage( ), "name label" ), 3, 1, TQt::AlignRight | TQt::AlignTop );
layout->addWidget( m_profileListBox, 3, 2 );
layout->setColStretch( 0, 1 );
@ -134,13 +134,13 @@ void ProfileDialog::createlayout( )
// deelete
// =======
void ProfileDialog::deelete( const QString& profileName, const bool ask )
void ProfileDialog::deelete( const TQString& profileName, const bool ask )
{ if( !kapp->config( )->hasGroup( PROFILE_PREFIX + profileName ))
{ ASSERT( false );
return ;
}
QListBoxItem* item = m_profileListBox->findItem( profileName, Qt::ExactMatch );
TQListBoxItem* item = m_profileListBox->findItem( profileName, TQt::ExactMatch );
ASSERT( item != NULL );
if( item != NULL )
@ -150,9 +150,9 @@ void ProfileDialog::deelete( const QString& profileName, const bool ask )
// deelete
// =======
void ProfileDialog::deelete( QListBoxItem* item, const bool ask )
void ProfileDialog::deelete( TQListBoxItem* item, const bool ask )
{ if( ask && KMessageBox::Yes != KMessageBox::questionYesNo( this,
QString( i18n( "Delete profile \"%1\"?" )).arg( item->text( )),
TQString( i18n( "Delete profile \"%1\"?" )).arg( item->text( )),
i18n( "Confirm profile deletion" )))
return;
@ -164,7 +164,7 @@ void ProfileDialog::deelete( QListBoxItem* item, const bool ask )
// getNewProfileName
// =================
bool ProfileDialog::getNewProfileName( QString& profileName )
bool ProfileDialog::getNewProfileName( TQString& profileName )
{ while( true )
{ bool ok;
profileName = KInputDialog::getText( i18n( "Profile name" ), i18n( "New profile name" ), profileName, &ok, this, "profile name" );
@ -182,11 +182,11 @@ bool ProfileDialog::getNewProfileName( QString& profileName )
// setInitialValues
// ================
void ProfileDialog::setInitialValues( const QString& currentProfile )
void ProfileDialog::setInitialValues( const TQString& currentProfile )
{ ushort currentItem = ushort( -1 );
QStringList profileList = kapp->config( )->groupList( );
TQStringList profileList = kapp->config( )->groupList( );
ushort i;
QStringList::Iterator it;
TQStringList::Iterator it;
for( i = 0, it = profileList.begin( ); it != profileList.end( ); ++it )
if( (*it).startsWith( PROFILE_PREFIX ))
@ -214,8 +214,8 @@ void ProfileDialog::setInitialValues( const QString& currentProfile )
// ========
void ProfileDialog::slotCopy( )
{ QString fromProfileName = m_contextItem->text( );
QString toProfileName = constructNewProfileName( fromProfileName );
{ TQString fromProfileName = m_contextItem->text( );
TQString toProfileName = constructNewProfileName( fromProfileName );
if( getNewProfileName( toProfileName ))
copy( fromProfileName, toProfileName );
@ -232,9 +232,9 @@ void ProfileDialog::slotDelete( )
// ======
void ProfileDialog::slotOk( )
{ QString fromProfileName;
QListBoxItem* item;
QString toProfileName;
{ TQString fromProfileName;
TQListBoxItem* item;
TQString toProfileName;
switch( m_action )
{ case Copy:
@ -268,10 +268,10 @@ void ProfileDialog::slotOk( )
case SaveAs:
m_profileName = m_profileLineEdit->text( );
item = m_profileListBox->findItem( m_profileName, Qt::ExactMatch );
item = m_profileListBox->findItem( m_profileName, TQt::ExactMatch );
if( item != NULL )
if( KMessageBox::Yes != KMessageBox::questionYesNo( this, QString( i18n( "Profile \"%1\" already exists - overwrite it?" )).arg( m_profileName ), i18n( "Profile exists" )))
if( KMessageBox::Yes != KMessageBox::questionYesNo( this, TQString( i18n( "Profile \"%1\" already exists - overwrite it?" )).arg( m_profileName ), i18n( "Profile exists" )))
return;
m_profileName = PROFILE_PREFIX + m_profileName;
@ -294,9 +294,9 @@ void ProfileDialog::slotProfileListBoxChanged( )
// slotProfileListContextMenu
// ==========================
void ProfileDialog::slotProfileListContextMenu( QListBoxItem* item, const QPoint& pos )
void ProfileDialog::slotProfileListContextMenu( TQListBoxItem* item, const TQPoint& pos )
{ m_contextItem = item;
QPopupMenu* contextMenu = new QPopupMenu( this, "context menu" );
TQPopupMenu* contextMenu = new TQPopupMenu( this, "context menu" );
contextMenu->insertItem( i18n( "&Copy" ), this, SLOT( slotCopy( )));
contextMenu->insertItem( i18n( "&Delete" ), this, SLOT( slotDelete( )));
@ -309,7 +309,7 @@ void ProfileDialog::slotProfileListContextMenu( QListBoxItem* item, const QPoint
// ==========
void ProfileDialog::slotRename( )
{ QString profileName = m_contextItem->text( );
{ TQString profileName = m_contextItem->text( );
if( getNewProfileName( profileName ))
{ copy( m_contextItem->text( ), profileName );
@ -320,6 +320,6 @@ void ProfileDialog::slotRename( )
// stripPrefix
// ===========
QString ProfileDialog::stripPrefix( const QString& profileName ) const
TQString ProfileDialog::stripPrefix( const TQString& profileName ) const
{ return profileName.right( profileName.length( ) - strlen( PROFILE_PREFIX ));
}

@ -33,11 +33,11 @@
// forward class definitions
// =========================
class KConfig;
class QLineEdit;
class QListBox;
class QListBoxItem;
class QString;
class TDEConfig;
class TQLineEdit;
class TQListBox;
class TQListBoxItem;
class TQString;
// ProfileDialog class definition
// ==============================
@ -55,36 +55,36 @@ class ProfileDialog : public KDialogBase
};
ProfileDialog( Action action,
const QString& currentProfile,
QWidget* parent = NULL,
const TQString& currentProfile,
TQWidget* parent = NULL,
const char* name = NULL );
QString profileName( ) const { return m_profileName; }
TQString profileName( ) const { return m_profileName; }
private slots:
void slotOk( );
void slotCopy( );
void slotDelete( );
void slotProfileListBoxChanged( );
void slotProfileListContextMenu( QListBoxItem* item, const QPoint& pos );
void slotProfileListContextMenu( TQListBoxItem* item, const TQPoint& pos );
void slotRename( );
private:
bool checkForDuplicateName( const QString& profileName );
QString constructNewProfileName( const QString& initialProfileName ) const;
void copy( const QString& fromProfileName, const QString& toProfileName );
bool checkForDuplicateName( const TQString& profileName );
TQString constructNewProfileName( const TQString& initialProfileName ) const;
void copy( const TQString& fromProfileName, const TQString& toProfileName );
void createlayout( );
void deelete( const QString& profileName, const bool ask );
void deelete( QListBoxItem* item, const bool ask );
bool getNewProfileName( QString& profileName );
void setInitialValues( const QString& currentProfile );
QString stripPrefix( const QString& profileName ) const;
void deelete( const TQString& profileName, const bool ask );
void deelete( TQListBoxItem* item, const bool ask );
bool getNewProfileName( TQString& profileName );
void setInitialValues( const TQString& currentProfile );
TQString stripPrefix( const TQString& profileName ) const;
Action m_action;
QListBoxItem* m_contextItem;
QString m_profileName;
QLineEdit* m_profileLineEdit;
QListBox* m_profileListBox;
TQListBoxItem* m_contextItem;
TQString m_profileName;
TQLineEdit* m_profileLineEdit;
TQListBox* m_profileListBox;
};
#endif // _GETPROFILEDIALOG_H_

@ -27,9 +27,9 @@
#include <sys/select.h>
#include <sys/time.h>
#include <qapplication.h>
#include <ntqapplication.h>
#include <klocale.h>
#include <tdelocale.h>
#include "nmapoutputbuffer.h"
#include "scanmonitor.h"
@ -40,7 +40,7 @@
// ===========
ScanMonitor::ScanMonitor( ScanWidget* parent )
: QThread( ),
: TQThread( ),
m_buffer( NULL ),
m_nmapBufferSize( 16384 ),
m_parent( parent )
@ -77,7 +77,7 @@ void ScanMonitor::readNmapOutput( const int pipeFD, const ScanMonitorEventType t
if( bytesRead > 0 )
{ m_buffer->length( bytesRead );
QApplication::postEvent( m_parent, new ScanMonitorEvent( type, m_buffer ));
TQApplication::postEvent( m_parent, new ScanMonitorEvent( type, m_buffer ));
m_buffer = NULL;
continue;
}
@ -87,10 +87,10 @@ void ScanMonitor::readNmapOutput( const int pipeFD, const ScanMonitorEventType t
break;
}
QString text = QString( i18n( "error reading nmap output from pipe: %2\n" )).arg( strerror( errno ));
TQString text = TQString( i18n( "error reading nmap output from pipe: %2\n" )).arg( strerror( errno ));
strcpy( m_buffer->buffer( ), text.ascii( ));
m_buffer->length( text.length( ));
QApplication::postEvent( m_parent, new ScanMonitorEvent( StderrType, m_buffer ));
TQApplication::postEvent( m_parent, new ScanMonitorEvent( StderrType, m_buffer ));
m_buffer = NULL;
break;
}

@ -27,8 +27,8 @@
# include <config.h>
#endif
#include <qptrlist.h>
#include <qthread.h>
#include <ntqptrlist.h>
#include <ntqthread.h>
#include "global.h"
@ -41,10 +41,10 @@ class ScanWidget;
// ScanMonitor class definition
// ============================
class ScanMonitor : public QThread
class ScanMonitor : public TQThread
{ public:
enum ScanMonitorEventType
{ StderrType = QEvent::User,
{ StderrType = TQEvent::User,
StdoutType
};
@ -62,7 +62,7 @@ class ScanMonitor : public QThread
int m_pipeStderrFD;
int m_pipeStdoutFD;
QPtrList<NmapOutputBuffer> m_buffers;
TQPtrList<NmapOutputBuffer> m_buffers;
};
#endif // _SCANMONITOR_H_

@ -26,7 +26,7 @@
// ===========
ScanMonitorEvent::ScanMonitorEvent( const int type, const nobPtr buffer )
: QCustomEvent( type ),
: TQCustomEvent( type ),
m_buffer( buffer )
{
}

@ -27,10 +27,10 @@
# include <config.h>
#endif
#include <qevent.h>
#include <ntqevent.h>
#include "global.h"
class ScanMonitorEvent : public QCustomEvent
class ScanMonitorEvent : public TQCustomEvent
{ public:
ScanMonitorEvent( const int type, const nobPtr buffer );
nobPtr buffer( ) const { return m_buffer; }

@ -20,13 +20,13 @@
* *
***************************************************************************/
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqlineedit.h>
#include <kdebug.h>
#include <klocale.h>
#include <tdelocale.h>
#include <kmessagebox.h>
#include "scannamedialog.h"
@ -35,7 +35,7 @@
// constructor
// ===========
ScanNameDialog::ScanNameDialog( ScanWidget* scanWidget, QWidget* parent, const char* name )
ScanNameDialog::ScanNameDialog( ScanWidget* scanWidget, TQWidget* parent, const char* name )
: KDialogBase( Plain, "Scan name", Ok | Cancel, Ok, parent, name )
{ createlayout( );
@ -52,15 +52,15 @@ ScanNameDialog::ScanNameDialog( ScanWidget* scanWidget, QWidget* parent, const c
// ============
void ScanNameDialog::createlayout( )
{ QGridLayout* gridLayout = new QGridLayout( plainPage( ));
{ TQGridLayout* gridLayout = new TQGridLayout( plainPage( ));
byte row = 1;
m_useHostNameCheckbox = new QCheckBox( "Use Target Host name", plainPage( ), "use target checkbox" );
m_useHostNameCheckbox = new TQCheckBox( "Use Target Host name", plainPage( ), "use target checkbox" );
gridLayout->addWidget( m_useHostNameCheckbox, row++, 1 );
byte editRowTop = row++;
m_scanNameEdit = new QLineEdit( plainPage( ), "name edit" );
gridLayout->addWidget( new QLabel( "Scan name", plainPage( ), "name label" ), row++, 1 );
m_scanNameEdit = new TQLineEdit( plainPage( ), "name edit" );
gridLayout->addWidget( new TQLabel( "Scan name", plainPage( ), "name label" ), row++, 1 );
gridLayout->addWidget( m_scanNameEdit, row++, 1 );
gridLayout->setColStretch( 0, 1 );

@ -33,8 +33,8 @@
// forward class definitions
// =========================
class QCheckBox;
class QLineEdit;
class TQCheckBox;
class TQLineEdit;
class ScanWidget;
// ScanNameDialog class definition
@ -44,9 +44,9 @@ class ScanNameDialog : public KDialogBase
{ Q_OBJECT
public:
ScanNameDialog( ScanWidget* scanWidget, QWidget* parent = NULL, const char* name = NULL );
ScanNameDialog( ScanWidget* scanWidget, TQWidget* parent = NULL, const char* name = NULL );
QString scanName( ) const { return m_scanName; }
TQString scanName( ) const { return m_scanName; }
bool useHostName( ) const { return m_useHostName; }
private slots:
@ -56,10 +56,10 @@ class ScanNameDialog : public KDialogBase
private:
void createlayout( );
QString m_scanName;
QLineEdit* m_scanNameEdit;
TQString m_scanName;
TQLineEdit* m_scanNameEdit;
bool m_useHostName;
QCheckBox* m_useHostNameCheckbox;
TQCheckBox* m_useHostNameCheckbox;
};
#endif // _SCANNAMEDIALOG_H_

@ -20,10 +20,10 @@
* *
***************************************************************************/
#include <qdict.h>
#include <ntqdict.h>
#include <kdebug.h>
#include <klocale.h>
#include <tdelocale.h>
#include "htmlwidget.h"
#include "scanstack.h"
@ -32,12 +32,12 @@
// constructor
// ===========
ScanStack::ScanStack( QWidget* parent, const char* name )
: QWidgetStack( parent, name ),
ScanStack::ScanStack( TQWidget* parent, const char* name )
: TQWidgetStack( parent, name ),
m_dictSize( 29 ),
m_firstScanWidget( NULL ),
m_widgetId( 1 )
{ m_scanWidgetDict = new QDict<ScanWidget>( m_dictSize );
{ m_scanWidgetDict = new TQDict<ScanWidget>( m_dictSize );
m_scanWidgetDict->setAutoDelete( true );
}
@ -59,7 +59,7 @@ void ScanStack::appendAndRaiseWidget( ScanWidget* scanWidget )
m_scanWidgetDict->resize( m_dictSize );
}
m_scanWidgetDict->insert( QString::number( index ), scanWidget );
m_scanWidgetDict->insert( TQString::number( index ), scanWidget );
}
// appendHTMLWidget
@ -67,7 +67,7 @@ void ScanStack::appendAndRaiseWidget( ScanWidget* scanWidget )
void ScanStack::appendHTMLWidget( HTMLWidget* htmlWidget )
{ ASSERT( m_widgetId == 1 );
addWidget( (QWidget*) htmlWidget, m_widgetId++ );
addWidget( (TQWidget*) htmlWidget, m_widgetId++ );
}
// findScanWidget
@ -127,20 +127,20 @@ ScanWidget* ScanStack::moveScanWidget( const ushort fromIndex )
if( toIndex < 0 )
return NULL;
ScanWidget* scanWidget = m_scanWidgetDict->take( QString::number( fromIndex ));
ScanWidget* scanWidget = m_scanWidgetDict->take( TQString::number( fromIndex ));
if( fromIndex < toIndex )
for( ushort index = fromIndex + 1; index <= toIndex; index++ )
{ ScanWidget* scanWidget = m_scanWidgetDict->take( QString::number( index ));
m_scanWidgetDict->insert( QString::number( index - 1 ), scanWidget );
{ ScanWidget* scanWidget = m_scanWidgetDict->take( TQString::number( index ));
m_scanWidgetDict->insert( TQString::number( index - 1 ), scanWidget );
}
else
for( short index = fromIndex - 1; index >= toIndex; index-- )
{ ScanWidget* scanWidget = m_scanWidgetDict->take( QString::number( index ));
m_scanWidgetDict->insert( QString::number( index + 1 ), scanWidget );
{ ScanWidget* scanWidget = m_scanWidgetDict->take( TQString::number( index ));
m_scanWidgetDict->insert( TQString::number( index + 1 ), scanWidget );
}
m_scanWidgetDict->insert( QString::number( toIndex ), scanWidget );
m_scanWidgetDict->insert( TQString::number( toIndex ), scanWidget );
return scanWidget;
}
@ -160,11 +160,11 @@ void ScanStack::removeScanWidget( ScanWidget* scanWidgetToRemove )
return;
}
m_scanWidgetDict->remove( QString::number( index ));
m_scanWidgetDict->remove( TQString::number( index ));
for( ushort i = index + 1; i < n; i++ )
{ ScanWidget* scanWidget = m_scanWidgetDict->take( QString::number( i ));
m_scanWidgetDict->insert( QString::number( i - 1 ), scanWidget );
{ ScanWidget* scanWidget = m_scanWidgetDict->take( TQString::number( i ));
m_scanWidgetDict->insert( TQString::number( i - 1 ), scanWidget );
}
if( index >=short( m_scanWidgetDict->count( )))
@ -180,7 +180,7 @@ void ScanStack::removeScanWidget( ScanWidget* scanWidgetToRemove )
// =============
ScanWidget* ScanStack::visibleWidget( )
{ return (ScanWidget*) QWidgetStack::visibleWidget( );
{ return (ScanWidget*) TQWidgetStack::visibleWidget( );
}
// wrapText

@ -27,8 +27,8 @@
# include <config.h>
#endif
#include <qdict.h>
#include <qwidgetstack.h>
#include <ntqdict.h>
#include <ntqwidgetstack.h>
#include "global.h"
// forward class definitions
@ -40,11 +40,11 @@ class ScanWidget;
// ScanStack class definition
// ==========================
class ScanStack : public QWidgetStack
class ScanStack : public TQWidgetStack
{ Q_OBJECT
public:
ScanStack( QWidget* parent, const char* name = NULL );
ScanStack( TQWidget* parent, const char* name = NULL );
void appendAndRaiseWidget( ScanWidget* scanWidget );
void appendHTMLWidget( HTMLWidget* htmlWidget );
@ -64,13 +64,13 @@ class ScanStack : public QWidgetStack
void wrapText( const bool wrap );
private:
ScanWidget* scanWidget( const ushort index ) { return (*m_scanWidgetDict)[ QString::number( index )]; }
ScanWidget* scanWidget( const ushort index ) { return (*m_scanWidgetDict)[ TQString::number( index )]; }
ushort m_dictSize;
ScanWidget* m_firstScanWidget;
ushort m_widgetId;
QDict<ScanWidget>* m_scanWidgetDict;
TQDict<ScanWidget>* m_scanWidgetDict;
};
#endif // _SCANSTACK_H_

@ -28,16 +28,16 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <qfile.h>
#include <qlayout.h>
#include <qpushbutton.h>
#include <qstringlist.h>
#include <qtimer.h>
#include <ntqfile.h>
#include <ntqlayout.h>
#include <ntqpushbutton.h>
#include <ntqstringlist.h>
#include <ntqtimer.h>
#include <kapplication.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <klocale.h>
#include <tdelocale.h>
#include <kmessagebox.h>
#include <kprocess.h>
#include <kstandarddirs.h>
@ -64,11 +64,11 @@
// constructor
// ===========
ScanWidget::ScanWidget( const QString& scanName,
ScanWidget::ScanWidget( const TQString& scanName,
const bool useTargetHost,
QWidget* parent,
TQWidget* parent,
const char* name )
: QFrame( parent, name ),
: TQFrame( parent, name ),
m_dirty (false ),
m_hideOptions( true ),
m_ignoreTabChanges( false ),
@ -79,14 +79,14 @@ ScanWidget::ScanWidget( const QString& scanName,
m_scanName( scanName ),
m_state( dormant ),
m_useTargetHost( useTargetHost )
{ setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
{ setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
createLayout( );
m_clearOutputButton->setEnabled( false );
m_stopButton->setEnabled( false );
m_startButton->setDefault( true );
srand( time( NULL ));
QTimer::singleShot( 0, this, SLOT( slotFinaliseInitialisation( )));
TQTimer::singleShot( 0, this, SLOT( slotFinaliseInitialisation( )));
}
// destructor
@ -118,8 +118,8 @@ ScanWidget::~ScanWidget( )
// buildNmapOptionsList
// ====================
QStringList ScanWidget::buildNmapOptionsList( )
{ QStringList nmapOptions;
TQStringList ScanWidget::buildNmapOptionsList( )
{ TQStringList nmapOptions;
nmapOptions << KStandardDirs::findExe ( "nmap" );
if( m_commonWidget->resovleAlwaysState( ))
@ -130,52 +130,52 @@ QStringList ScanWidget::buildNmapOptionsList( )
if( m_timingWidget->hostTimeoutState( ))
{ nmapOptions << "--host_timeout";
nmapOptions << QString::number( m_timingWidget->hostTimeoutValue( ));
nmapOptions << TQString::number( m_timingWidget->hostTimeoutValue( ));
}
if( m_timingWidget->initialRTTTimeoutState( ))
{ nmapOptions << "--initial_rtt_timeout";
nmapOptions << QString::number( m_timingWidget->initialRTTTimeoutValue( ));
nmapOptions << TQString::number( m_timingWidget->initialRTTTimeoutValue( ));
}
if( m_timingWidget->maxHostGroupState( ))
{ nmapOptions << "--max_hostgroup";
nmapOptions << QString::number( m_timingWidget->maxHostGroupValue( ));
nmapOptions << TQString::number( m_timingWidget->maxHostGroupValue( ));
}
if( m_timingWidget->minHostGroupState( ))
{ nmapOptions << "--min_hostgroup";
nmapOptions << QString::number( m_timingWidget->minHostGroupValue( ));
nmapOptions << TQString::number( m_timingWidget->minHostGroupValue( ));
}
if( m_timingWidget->maxParallelismState( ))
{ nmapOptions << "--max_parallelism";
nmapOptions << QString::number( m_timingWidget->maxParallelismValue( ));
nmapOptions << TQString::number( m_timingWidget->maxParallelismValue( ));
}
if( m_timingWidget->minParallelismState( ))
{ nmapOptions << "--min_parallelism";
nmapOptions << QString::number( m_timingWidget->minParallelismValue( ));
nmapOptions << TQString::number( m_timingWidget->minParallelismValue( ));
}
if( m_timingWidget->maxRTTTimeoutState( ))
{ nmapOptions << "--max_rtt_timeout";
nmapOptions << QString::number( m_timingWidget->maxRTTTimeoutValue( ));
nmapOptions << TQString::number( m_timingWidget->maxRTTTimeoutValue( ));
}
if( m_timingWidget->minRTTTimeoutState( ))
{ nmapOptions << "--min_rtt_timeout";
nmapOptions << QString::number( m_timingWidget->minRTTTimeoutValue( ));
nmapOptions << TQString::number( m_timingWidget->minRTTTimeoutValue( ));
}
if( m_timingWidget->maxScanDelayState( ))
{ nmapOptions << "--max_scan_delay";
nmapOptions << QString::number( m_timingWidget->maxScanDelayValue( ));
nmapOptions << TQString::number( m_timingWidget->maxScanDelayValue( ));
}
if( m_timingWidget->scanDelayState( ))
{ nmapOptions << "--scan_delay";
nmapOptions << QString::number( m_timingWidget->scanDelayValue( ));
nmapOptions << TQString::number( m_timingWidget->scanDelayValue( ));
}
if( !m_timingWidget->simpleTiming( ).isEmpty( ))
@ -220,7 +220,7 @@ QStringList ScanWidget::buildNmapOptionsList( )
if( m_compoundWidget->dataLengthState( ))
{ nmapOptions << "--data_length";
nmapOptions << QString::number( m_compoundWidget->dataLengthValue( ));
nmapOptions << TQString::number( m_compoundWidget->dataLengthValue( ));
}
if( m_compoundWidget->decoyState( ))
@ -249,17 +249,17 @@ QStringList ScanWidget::buildNmapOptionsList( )
if( m_compoundWidget->maxSocketsState( ))
{ nmapOptions << "-M";
nmapOptions << QString::number( m_compoundWidget->maxSocketsValue( ));
nmapOptions << TQString::number( m_compoundWidget->maxSocketsValue( ));
}
if( m_compoundWidget->randomIPState( ))
{ nmapOptions << "-iR";
nmapOptions << QString::number( m_compoundWidget->randomIPValue( ));
nmapOptions << TQString::number( m_compoundWidget->randomIPValue( ));
}
if( m_compoundWidget->sourcePortState( ))
{ nmapOptions << "--source_port";
nmapOptions << QString::number( m_compoundWidget->sourcePortValue( ));
nmapOptions << TQString::number( m_compoundWidget->sourcePortValue( ));
}
if( m_compoundWidget->sourceIPState( ))
@ -279,7 +279,7 @@ QStringList ScanWidget::buildNmapOptionsList( )
if( m_compoundWidget->ttlState( ))
{ nmapOptions << "--ttl";
nmapOptions << QString::number( m_compoundWidget->ttlValue( ));
nmapOptions << TQString::number( m_compoundWidget->ttlValue( ));
}
if( m_simpleWidget->ipV6State( ))
@ -415,7 +415,7 @@ QStringList ScanWidget::buildNmapOptionsList( )
// closePipe
// =========
void ScanWidget::closePipe( QFile*& pipe, int& pipeFD )
void ScanWidget::closePipe( TQFile*& pipe, int& pipeFD )
{ if( pipe == NULL )
return;
@ -441,14 +441,14 @@ void ScanWidget::createLayout( )
m_tabWidget->setTabReorderingEnabled( true );
byte row = 0;
QVBoxLayout* layout = new QVBoxLayout( this );
TQVBoxLayout* layout = new TQVBoxLayout( this );
layout->addWidget( m_tabWidget, row++ );
QHBoxLayout* buttonLayout = new QHBoxLayout( );
m_clearOutputButton = new QPushButton( i18n( "Clear output" ), this, "clear output button" );
m_hideOptionsButton = new QPushButton( i18n( "Hide options" ), this, "hide options button" );
m_startButton = new QPushButton( i18n( "Start nmap" ), this, "start button" );
m_stopButton = new QPushButton( i18n( "Stop nmap" ), this, "stop button" );
TQHBoxLayout* buttonLayout = new TQHBoxLayout( );
m_clearOutputButton = new TQPushButton( i18n( "Clear output" ), this, "clear output button" );
m_hideOptionsButton = new TQPushButton( i18n( "Hide options" ), this, "hide options button" );
m_startButton = new TQPushButton( i18n( "Start nmap" ), this, "start button" );
m_stopButton = new TQPushButton( i18n( "Stop nmap" ), this, "stop button" );
byte col = 0;
buttonLayout->insertStretch( col++, 10 );
@ -469,9 +469,9 @@ void ScanWidget::createLayout( )
// createPipe
// ==========
bool ScanWidget::createPipe( const QString type, const QString& tempDir, QFile*& pipe, int& pipeFD )
bool ScanWidget::createPipe( const TQString type, const TQString& tempDir, TQFile*& pipe, int& pipeFD )
{ while( true )
{ pipe = new QFile( QString( "%1knmap_%2_%3" ).arg( tempDir ).arg( type ).arg( rand( )));
{ pipe = new TQFile( TQString( "%1knmap_%2_%3" ).arg( tempDir ).arg( type ).arg( rand( )));
if( !pipe->exists( ))
break;
@ -480,7 +480,7 @@ bool ScanWidget::createPipe( const QString type, const QString& tempDir, QFile*&
}
if( mkfifo( pipe->name( ), 0600 ))
{ QString text = QString( i18n( "Couldn't create the named pipe \"%1\" for nmap output: %2\n" )).arg( pipe->name( )).arg( strerror( errno ));
{ TQString text = TQString( i18n( "Couldn't create the named pipe \"%1\" for nmap output: %2\n" )).arg( pipe->name( )).arg( strerror( errno ));
m_outputWidget->addOutput( OutputWidget::Stderr, text, text.length( ));
delete pipe;
@ -493,7 +493,7 @@ bool ScanWidget::createPipe( const QString type, const QString& tempDir, QFile*&
if( pipeFD != -1 )
return true;
QString text = QString( i18n( "Couldn't open the named pipe \"%1\" for nmap output: %2\n" )).arg( pipe->name( ))
TQString text = TQString( i18n( "Couldn't open the named pipe \"%1\" for nmap output: %2\n" )).arg( pipe->name( ))
.arg( strerror( errno ));
m_outputWidget->addOutput( OutputWidget::Stderr, text, text.length( ));
@ -510,10 +510,10 @@ bool ScanWidget::createPipes( )
ASSERT( m_pipeStdout == NULL );
KStandardDirs standardDirs;
QStringList tempDir = standardDirs.resourceDirs( "tmp" );
TQStringList tempDir = standardDirs.resourceDirs( "tmp" );
if( tempDir.isEmpty( ))
{ QString text = QString( i18n( "Couldn't create the named pipe for nmap output: no temp file dir\n" ));
{ TQString text = TQString( i18n( "Couldn't create the named pipe for nmap output: no temp file dir\n" ));
m_outputWidget->addOutput( OutputWidget::Stderr, text, text.length( ));
return false;
}
@ -527,7 +527,7 @@ bool ScanWidget::createPipes( )
// customEvent
// ===========
void ScanWidget::customEvent( QCustomEvent* event )
void ScanWidget::customEvent( TQCustomEvent* event )
{ smePtr scanMonitorEvent = (ScanMonitorEvent*) event;
nobPtr buffer;
@ -593,7 +593,7 @@ bool ScanWidget::getOptions( )
return false;
if( m_commonWidget->host( ).isEmpty( ) && !m_compoundWidget->targetFileState( ))
{ KMessageBox::error( this, i18n( QString( "Target host(s) not specified by \"Target host(s)\" or \"Target hosts file\" options" )), i18n( "Target host(s) error" ));
{ KMessageBox::error( this, i18n( TQString( "Target host(s) not specified by \"Target host(s)\" or \"Target hosts file\" options" )), i18n( "Target host(s) error" ));
return false;
}
@ -638,7 +638,7 @@ void ScanWidget::profileLoad( )
{ profileAskAndSave( );
ProfileDialog dlg( ProfileDialog::Load, m_profileName, this, "profile dlg" );
if( dlg.exec( ) != QDialog::Accepted )
if( dlg.exec( ) != TQDialog::Accepted )
return;
m_profileName = dlg.profileName( );
@ -651,7 +651,7 @@ void ScanWidget::profileLoad( )
// ===========
void ScanWidget::profileRead( )
{ KConfig* config = kapp->config( );
{ TDEConfig* config = kapp->config( );
kapp->config( )->setGroup( m_profileName );
m_commonWidget->readProfile( config );
@ -688,7 +688,7 @@ void ScanWidget::profileSave( )
if( KMessageBox::Yes != KMessageBox::questionYesNo( this, i18n( "Do you still want to save the profile? (It may be in an inconsistent state." ), i18n( "Save inconsistent profile" )))
return;
KConfig* config = kapp->config( );
TDEConfig* config = kapp->config( );
config->setGroup( m_profileName );
m_commonWidget->saveProfile( config );
@ -717,7 +717,7 @@ void ScanWidget::profileSave( )
void ScanWidget::profileSaveAs( )
{ ProfileDialog dlg( ProfileDialog::SaveAs, m_profileName, this, "profile dlg" );
if( dlg.exec( ) != QDialog::Accepted )
if( dlg.exec( ) != TQDialog::Accepted )
return;
m_profileName = dlg.profileName( );
@ -729,7 +729,7 @@ void ScanWidget::profileSaveAs( )
// ============
void ScanWidget::readSettings( )
{ KConfig* config = kapp->config( );
{ TDEConfig* config = kapp->config( );
config->setGroup( m_scanName );
m_profileName = config->readEntry( "profileName", DEFAULT_PROFILE );
@ -739,7 +739,7 @@ void ScanWidget::readSettings( )
// renameScan
// ==========
void ScanWidget::renameScan( const QString& newScanName )
void ScanWidget::renameScan( const TQString& newScanName )
{ kapp->config( )->deleteGroup( m_scanName );
m_scanName = newScanName;
}
@ -748,7 +748,7 @@ void ScanWidget::renameScan( const QString& newScanName )
// ===============
void ScanWidget::saveProfileName( )
{ KConfig* config = kapp->config( );
{ TDEConfig* config = kapp->config( );
config->setGroup( m_scanName );
config->writeEntry( "profileName", m_profileName );
}
@ -793,7 +793,7 @@ void ScanWidget::setInitialValues( )
// setProfileName
// ==============
void ScanWidget::setProfileName( const QString& profileName )
void ScanWidget::setProfileName( const TQString& profileName )
{ m_profileName = profileName;
saveProfileName( );
profileRead( );
@ -811,11 +811,11 @@ void ScanWidget::slotClearOutput( )
// slotDisplayDocBook
// ==================
void ScanWidget::slotDisplayDocBook( const QString& anchor )
{ KProcess* process = new KProcess;
void ScanWidget::slotDisplayDocBook( const TQString& anchor )
{ TDEProcess* process = new TDEProcess;
*process << "khelpcenter";
*process << "help:/knmap//index.html#" + anchor;
process->start( KProcess::DontCare );
process->start( TDEProcess::DontCare );
}
// slotDisplayUnknown
@ -836,16 +836,16 @@ void ScanWidget::slotFinaliseInitialisation( )
m_simpleWidget->finaliseInitialisation( );
m_timingWidget->finaliseInitialisation( );
connect( m_outputWidget, SIGNAL( statusBarText( const QString& )), SIGNAL( statusBarText( const QString& )));
connect( m_outputWidget, SIGNAL( statusBarText( const TQString& )), SIGNAL( statusBarText( const TQString& )));
connect( m_clearOutputButton, SIGNAL( clicked( )), SLOT( slotClearOutput( )));
connect( m_commonWidget, SIGNAL( disableFastScan( )), m_simpleWidget, SLOT( slotDisableFastScan( )));
connect( m_commonWidget, SIGNAL( targetChanged( const QString& )), SLOT( slotTargetChanged( const QString& )));
connect( m_commonWidget, SIGNAL( targetChanged( const TQString& )), SLOT( slotTargetChanged( const TQString& )));
connect( m_hideOptionsButton, SIGNAL( clicked( )), SLOT( slotHideOptions( )));
connect( m_simpleWidget, SIGNAL( disablePortRanges( )), m_commonWidget, SLOT( slotDisablePortRanges( )));
connect( m_startButton, SIGNAL( clicked( )), SLOT( slotStartClicked( )));
connect( m_stopButton, SIGNAL( clicked( )), SLOT( slotStopClicked( )));
connect( m_tabWidget, SIGNAL( currentChanged( QWidget* )), SLOT( slotTabChanged( QWidget* )));
connect( m_tabWidget, SIGNAL( currentChanged( TQWidget* )), SLOT( slotTabChanged( TQWidget* )));
connect( m_commonWidget, SIGNAL( optionsDirty( )), SLOT( slotOptionsDirty( )));
connect( m_compoundWidget, SIGNAL( optionsDirty( )), SLOT( slotOptionsDirty( )));
@ -855,19 +855,19 @@ void ScanWidget::slotFinaliseInitialisation( )
connect( m_tabWidget, SIGNAL( movedTab( int, int )), SLOT( slotOptionsDirty( )));
connect( m_timingWidget, SIGNAL( optionsDirty( )), SLOT( slotOptionsDirty( )));
connect( m_commonWidget, SIGNAL( displayHelp( const QString& )), SIGNAL( displayHelp( const QString& )));
connect( m_compoundWidget, SIGNAL( displayHelp( const QString& )), SIGNAL( displayHelp( const QString& )));
connect( m_loggingWidget, SIGNAL( displayHelp( const QString& )), SIGNAL( displayHelp( const QString& )));
connect( m_pAndSWidget, SIGNAL( displayHelp( const QString& )), SIGNAL( displayHelp( const QString& )));
connect( m_simpleWidget, SIGNAL( displayHelp( const QString& )), SIGNAL( displayHelp( const QString& )));
connect( m_timingWidget, SIGNAL( displayHelp( const QString& )), SIGNAL( displayHelp( const QString& )));
connect( m_commonWidget, SIGNAL( displayHelp( const TQString& )), SIGNAL( displayHelp( const TQString& )));
connect( m_compoundWidget, SIGNAL( displayHelp( const TQString& )), SIGNAL( displayHelp( const TQString& )));
connect( m_loggingWidget, SIGNAL( displayHelp( const TQString& )), SIGNAL( displayHelp( const TQString& )));
connect( m_pAndSWidget, SIGNAL( displayHelp( const TQString& )), SIGNAL( displayHelp( const TQString& )));
connect( m_simpleWidget, SIGNAL( displayHelp( const TQString& )), SIGNAL( displayHelp( const TQString& )));
connect( m_timingWidget, SIGNAL( displayHelp( const TQString& )), SIGNAL( displayHelp( const TQString& )));
connect( m_commonWidget, SIGNAL( displayDocBook( const QString& )), SLOT( slotDisplayDocBook( const QString&)));
connect( m_compoundWidget, SIGNAL( displayDocBook( const QString& )), SLOT( slotDisplayDocBook( const QString&)));
connect( m_loggingWidget, SIGNAL( displayDocBook( const QString& )), SLOT( slotDisplayDocBook( const QString&)));
connect( m_pAndSWidget, SIGNAL( displayDocBook( const QString& )), SLOT( slotDisplayDocBook( const QString&)));
connect( m_simpleWidget, SIGNAL( displayDocBook( const QString& )), SLOT( slotDisplayDocBook( const QString&)));
connect( m_timingWidget, SIGNAL( displayDocBook( const QString& )), SLOT( slotDisplayDocBook( const QString&)));
connect( m_commonWidget, SIGNAL( displayDocBook( const TQString& )), SLOT( slotDisplayDocBook( const TQString&)));
connect( m_compoundWidget, SIGNAL( displayDocBook( const TQString& )), SLOT( slotDisplayDocBook( const TQString&)));
connect( m_loggingWidget, SIGNAL( displayDocBook( const TQString& )), SLOT( slotDisplayDocBook( const TQString&)));
connect( m_pAndSWidget, SIGNAL( displayDocBook( const TQString& )), SLOT( slotDisplayDocBook( const TQString&)));
connect( m_simpleWidget, SIGNAL( displayDocBook( const TQString& )), SLOT( slotDisplayDocBook( const TQString&)));
connect( m_timingWidget, SIGNAL( displayDocBook( const TQString& )), SLOT( slotDisplayDocBook( const TQString&)));
connect( m_commonWidget, SIGNAL( displayUnknown( )), SLOT( slotDisplayUnknown( )));
connect( m_compoundWidget, SIGNAL( displayUnknown( )), SLOT( slotDisplayUnknown( )));
@ -929,7 +929,7 @@ void ScanWidget::slotProcessExited( )
// slotReceivedStderr
// ==================
void ScanWidget::slotReceivedStderr( KProcess* /* process */, char* buffer, int buflen )
void ScanWidget::slotReceivedStderr( TDEProcess* /* process */, char* buffer, int buflen )
{ m_clearOutputButton->setEnabled( true );
m_outputWidget->addOutput( OutputWidget::Stderr, buffer, buflen );
emit( outputAvailable( true, true ));
@ -938,7 +938,7 @@ void ScanWidget::slotReceivedStderr( KProcess* /* process */, char* buffer, int
// slotReceivedStdout
// ==================
void ScanWidget::slotReceivedStdout( KProcess* /* process */, char* buffer, int buflen )
void ScanWidget::slotReceivedStdout( TDEProcess* /* process */, char* buffer, int buflen )
{ m_clearOutputButton->setEnabled( true );
m_outputWidget->addOutput( OutputWidget::Stdout, buffer, buflen );
emit( outputAvailable( true, true ));
@ -957,8 +957,8 @@ void ScanWidget::slotStartClicked( )
if( m_piping && !createPipes( ))
return;
QStringList nmapOptions = buildNmapOptionsList( );
m_nmapProcess = new KProcess;
TQStringList nmapOptions = buildNmapOptionsList( );
m_nmapProcess = new TDEProcess;
if( !m_piping )
*m_nmapProcess << nmapOptions;
@ -974,9 +974,9 @@ void ScanWidget::slotStartClicked( )
*m_nmapProcess << nmapOptions.join( " " );
}
QValueList<QCString> args = m_nmapProcess->args( );
QString cmd;
QValueList<QCString>::iterator it;
TQValueList<TQCString> args = m_nmapProcess->args( );
TQString cmd;
TQValueList<TQCString>::iterator it;
for( it = args.begin( ); it != args.end( ); ++it )
cmd += *it + " ";
@ -986,19 +986,19 @@ void ScanWidget::slotStartClicked( )
m_outputWidget->addOutput( OutputWidget::Stdin, cmd, cmd.length( ));
emit( outputAvailable( true, true ));
connect( m_nmapProcess, SIGNAL( processExited( KProcess* )), SLOT( slotProcessExited( )));
connect( m_nmapProcess, SIGNAL( processExited( TDEProcess* )), SLOT( slotProcessExited( )));
if( !m_piping )
{ connect( m_nmapProcess,
SIGNAL( receivedStderr( KProcess*, char*, int )),
SLOT( slotReceivedStderr( KProcess*, char*, int )));
SIGNAL( receivedStderr( TDEProcess*, char*, int )),
SLOT( slotReceivedStderr( TDEProcess*, char*, int )));
connect( m_nmapProcess,
SIGNAL( receivedStdout( KProcess*, char*, int )),
SLOT( slotReceivedStdout( KProcess*, char*, int )));
SIGNAL( receivedStdout( TDEProcess*, char*, int )),
SLOT( slotReceivedStdout( TDEProcess*, char*, int )));
}
m_nmapProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput );
m_nmapProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
m_state = running;
emit( scanStarted( ));
@ -1023,7 +1023,7 @@ void ScanWidget::slotStopClicked( )
// slotTabChanged
// ==============
void ScanWidget::slotTabChanged( QWidget* /* toWidget */)
void ScanWidget::slotTabChanged( TQWidget* /* toWidget */)
{ if( !m_ignoreTabChanges )
slotOptionsDirty( );
}
@ -1031,7 +1031,7 @@ void ScanWidget::slotTabChanged( QWidget* /* toWidget */)
// slotTabChanged
// ==============
void ScanWidget::slotTargetChanged( const QString& target )
void ScanWidget::slotTargetChanged( const TQString& target )
{ if( m_useTargetHost )
emit( scanRename( target ));
}
@ -1057,5 +1057,5 @@ void ScanWidget::useTargetHost( const bool b )
// ========
void ScanWidget::wrapText( const bool wrap )
{ m_outputWidget->setWordWrap( wrap ? QTextEdit::WidgetWidth : QTextEdit::NoWrap );
{ m_outputWidget->setWordWrap( wrap ? TQTextEdit::WidgetWidth : TQTextEdit::NoWrap );
}

@ -27,7 +27,7 @@
# include <config.h>
#endif
#include <qframe.h>
#include <ntqframe.h>
#include "global.h"
// forward class definitions
@ -36,16 +36,16 @@
class CommonWidget;
class CompoundWidget;
class HTMLWidget;
class KConfig;
class KProcess;
class TDEConfig;
class TDEProcess;
class KTabWidget;
class LoggingOptions;
class OutputWidget;
class PAndSOptions;
class QFile;
class QLineEdit;
class QPushButton;
class QStringList;
class TQFile;
class TQLineEdit;
class TQPushButton;
class TQStringList;
class ScanMonitor;
class SimpleOptions;
class TimingWidget;
@ -53,13 +53,13 @@ class TimingWidget;
// ScanWidget class definition
// ===========================
class ScanWidget : public QFrame
class ScanWidget : public TQFrame
{ Q_OBJECT
public:
ScanWidget( const QString& scanName,
ScanWidget( const TQString& scanName,
const bool useTargetHost,
QWidget* parent = NULL,
TQWidget* parent = NULL,
const char* name = NULL );
virtual ~ScanWidget( );
@ -77,15 +77,15 @@ class ScanWidget : public QFrame
void profileCopy( );
void profileDelete( );
void profileLoad( );
QString profileName( ) const { return m_profileName; }
TQString profileName( ) const { return m_profileName; }
void profileRename( );
void profileSave( );
void profileSaveAs( );
void readSettings( );
void renameScan( const QString& newScanName );
void renameScan( const TQString& newScanName );
void saveSettings( );
QString scanName( ) const { return m_scanName; }
void setProfileName( const QString& profileName );
TQString scanName( ) const { return m_scanName; }
void setProfileName( const TQString& profileName );
State state( ) const { return m_state; }
void state( const State s ) { m_state = s; }
void updateStatusBarText( );
@ -94,46 +94,46 @@ class ScanWidget : public QFrame
void wrapText( const bool wrap );
signals:
void displayHelp( const QString& );
void errorLoadingLocalManPage( const QString& );
void displayHelp( const TQString& );
void errorLoadingLocalManPage( const TQString& );
void optionsDirty( );
void outputAvailable( const bool, const bool );
void scanRename( const QString& );
void scanRename( const TQString& );
void scanStarted( );
void scanStopped( ScanWidget* );
void setManPageActionStuff( const bool );
void statusBarText( const QString& );
void statusBarText( const TQString& );
private slots:
void slotClearOutput( );
void slotDisplayDocBook( const QString& anchor );
void slotDisplayDocBook( const TQString& anchor );
void slotDisplayUnknown( );
void slotFinaliseInitialisation( );
void slotHideOptions( );
void slotOptionsDirty( const bool dirty = true );
void slotProcessExited( );
void slotReceivedStderr( KProcess* process, char* buffer, int buflen );
void slotReceivedStdout( KProcess* process, char* buffer, int buflen );
void slotReceivedStderr( TDEProcess* process, char* buffer, int buflen );
void slotReceivedStdout( TDEProcess* process, char* buffer, int buflen );
void slotStartClicked( );
void slotStopClicked( );
void slotTabChanged( QWidget* toWidget );
void slotTargetChanged( const QString& target );
void slotTabChanged( TQWidget* toWidget );
void slotTargetChanged( const TQString& target );
private:
QStringList buildNmapOptionsList( );
void closePipe( QFile*& pipe, int& pipeFD );
TQStringList buildNmapOptionsList( );
void closePipe( TQFile*& pipe, int& pipeFD );
void createLayout( );
bool createPipe( const QString type, const QString& tempDir, QFile*& pipe, int& pipeFD );
bool createPipe( const TQString type, const TQString& tempDir, TQFile*& pipe, int& pipeFD );
bool createPipes( );
void customEvent( QCustomEvent* event );
void customEvent( TQCustomEvent* event );
bool getOptions( );
void getPortRanges( QStringList* portRanges );
void getPortRanges( TQStringList* portRanges );
void initialiseManPage( );
void profileRead( );
void saveProfileName( );
void setInitialValues( );
QPushButton* m_clearOutputButton;
TQPushButton* m_clearOutputButton;
int m_commonIndex;
CommonWidget* m_commonWidget;
int m_compoundIndex;
@ -141,28 +141,28 @@ class ScanWidget : public QFrame
int m_currentTab;
bool m_dirty;
bool m_hideOptions;
QPushButton* m_hideOptionsButton;
TQPushButton* m_hideOptionsButton;
int m_htmlIndex;
bool m_ignoreTabChanges;
int m_loggingIndex;
LoggingOptions* m_loggingWidget;
KProcess* m_nmapProcess;
TDEProcess* m_nmapProcess;
OutputWidget* m_outputWidget;
int m_pAndSIndex;
PAndSOptions* m_pAndSWidget;
QFile* m_pipeStderr;
QFile* m_pipeStdout;
TQFile* m_pipeStderr;
TQFile* m_pipeStdout;
int m_pipeStderrFD;
int m_pipeStdoutFD;
bool m_piping;
QString m_profileName;
TQString m_profileName;
ScanMonitor* m_scanMonitor;
QString m_scanName;
TQString m_scanName;
int m_simpleIndex;
SimpleOptions* m_simpleWidget;
QPushButton* m_startButton;
TQPushButton* m_startButton;
State m_state;
QPushButton* m_stopButton;
TQPushButton* m_stopButton;
KTabWidget* m_tabWidget;
int m_timingIndex;
TimingWidget* m_timingWidget;

@ -20,14 +20,14 @@
* *
***************************************************************************/
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlayout.h>
#include <ntqcheckbox.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <kconfig.h>
#include <tdeconfig.h>
#include <kdebug.h>
#include <kglobal.h>
#include <klocale.h>
#include <tdeglobal.h>
#include <tdelocale.h>
#include "simpleoptions.h"
#include "whatsthis.h"
@ -35,8 +35,8 @@
// constructor
// ===========
SimpleOptions::SimpleOptions( QWidget* parent, const char* name )
: QWidget( parent, name )
SimpleOptions::SimpleOptions( TQWidget* parent, const char* name )
: TQWidget( parent, name )
{ createLayout( );
}
@ -44,55 +44,55 @@ SimpleOptions::SimpleOptions( QWidget* parent, const char* name )
// ============
void SimpleOptions::createLayout( )
{ QGridLayout* gridLayout = new QGridLayout( this );
{ TQGridLayout* gridLayout = new TQGridLayout( this );
byte row = 1;
m_allPortsCheckBox = new QCheckBox( i18n( "All ports (--allports)" ), this, "all ports check" );
m_fastScanCheckBox = new QCheckBox( i18n( "Fast Scan (-F)" ), this, "fast scan check" );
m_ipV6CheckBox = new QCheckBox( i18n( "IPV6 support (-6)" ), this, "ipv6 check" );
m_privilegedCheckBox = new QCheckBox( i18n( "Assume privileged (--privileged)" ), this, "privileged check" );
m_noRandomPortsCheckBox = new QCheckBox( i18n( "No Random Ports (-r)" ), this, "no random ports check" );
m_osDetectionCheckBox = new QCheckBox( i18n( "OS Detection (-O)" ), this, "os detection check" );
m_osScanLimitCheckBox = new QCheckBox( i18n( "OS scan limit (--osscan_limit)" ), this, "os scan limit check" );
m_packetTraceCheckBox = new QCheckBox( i18n( "Packet trace (--packet_trace)" ), this, "packet trace check" );
m_prepackagedCheckBox = new QCheckBox( i18n( "Prepackaged options (-A)" ), this, "prepackaged check" );
m_randomizeHostsCheckBox = new QCheckBox( i18n( "Randomize hosts (--randomize_hosts)" ), this, "randomize check" );
m_sendEthCheckBox = new QCheckBox( i18n( "Send raw eth. packets (--send_eth)" ), this, "send eth check" );
m_sendIPCheckBox = new QCheckBox( i18n( "Send raw IP packets (--send_ip)" ), this, "send ip check" );
m_verboseCheckBox = new QCheckBox( i18n( "Verbose (-v)" ), this, "verbose check" );
m_allPortsCheckBox = new TQCheckBox( i18n( "All ports (--allports)" ), this, "all ports check" );
m_fastScanCheckBox = new TQCheckBox( i18n( "Fast Scan (-F)" ), this, "fast scan check" );
m_ipV6CheckBox = new TQCheckBox( i18n( "IPV6 support (-6)" ), this, "ipv6 check" );
m_privilegedCheckBox = new TQCheckBox( i18n( "Assume privileged (--privileged)" ), this, "privileged check" );
m_noRandomPortsCheckBox = new TQCheckBox( i18n( "No Random Ports (-r)" ), this, "no random ports check" );
m_osDetectionCheckBox = new TQCheckBox( i18n( "OS Detection (-O)" ), this, "os detection check" );
m_osScanLimitCheckBox = new TQCheckBox( i18n( "OS scan limit (--osscan_limit)" ), this, "os scan limit check" );
m_packetTraceCheckBox = new TQCheckBox( i18n( "Packet trace (--packet_trace)" ), this, "packet trace check" );
m_prepackagedCheckBox = new TQCheckBox( i18n( "Prepackaged options (-A)" ), this, "prepackaged check" );
m_randomizeHostsCheckBox = new TQCheckBox( i18n( "Randomize hosts (--randomize_hosts)" ), this, "randomize check" );
m_sendEthCheckBox = new TQCheckBox( i18n( "Send raw eth. packets (--send_eth)" ), this, "send eth check" );
m_sendIPCheckBox = new TQCheckBox( i18n( "Send raw IP packets (--send_ip)" ), this, "send ip check" );
m_verboseCheckBox = new TQCheckBox( i18n( "Verbose (-v)" ), this, "verbose check" );
row = 1;
gridLayout->addWidget( new QLabel( " ", this ), row, 1 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 1 );
gridLayout->addWidget( m_allPortsCheckBox, row++, 3 );
gridLayout->addWidget( new QLabel( " ", this ), row, 1 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 1 );
gridLayout->addWidget( m_privilegedCheckBox, row++, 3 );
gridLayout->addWidget( new QLabel( " ", this ), row, 1 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 1 );
gridLayout->addWidget( m_fastScanCheckBox, row++, 3 );
gridLayout->addWidget( new QLabel( " ", this ), row, 1 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 1 );
gridLayout->addWidget( m_ipV6CheckBox, row++, 3 );
gridLayout->addWidget( new QLabel( " ", this ), row, 1 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 1 );
gridLayout->addWidget( m_noRandomPortsCheckBox, row++, 3 );
byte rowBlock1 = row;
row = 1;
gridLayout->addWidget( new QLabel( "#", this ), row, 5 );
gridLayout->addWidget( new TQLabel( "#", this ), row, 5 );
gridLayout->addWidget( m_osDetectionCheckBox, row++, 7 );
gridLayout->addWidget( new QLabel( " ", this ), row, 5 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 5 );
gridLayout->addWidget( m_osScanLimitCheckBox, row++, 7 );
gridLayout->addWidget( new QLabel( " ", this ), row, 5 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 5 );
gridLayout->addWidget( m_packetTraceCheckBox, row++, 7 );
gridLayout->addWidget( new QLabel( " ", this ), row, 5 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 5 );
gridLayout->addWidget( m_prepackagedCheckBox, row++, 7 );
byte rowBlock2 = row;
row = 1;
gridLayout->addWidget( new QLabel( " ", this ), row, 9 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 9 );
gridLayout->addWidget( m_randomizeHostsCheckBox, row++, 11 );
gridLayout->addWidget( new QLabel( " ", this ), row, 9 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 9 );
gridLayout->addWidget( m_sendEthCheckBox, row++, 11 );
gridLayout->addWidget( new QLabel( " ", this ), row, 9 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 9 );
gridLayout->addWidget( m_sendIPCheckBox, row++, 11 );
gridLayout->addWidget( new QLabel( " ", this ), row, 9 );
gridLayout->addWidget( new TQLabel( " ", this ), row, 9 );
gridLayout->addWidget( m_verboseCheckBox, row++, 11 );
byte rowBlock3 = row;
@ -157,7 +157,7 @@ bool SimpleOptions::getOptions( bool& needRoot )
// readProfile
// ===========
void SimpleOptions::readProfile( KConfig* config )
void SimpleOptions::readProfile( TDEConfig* config )
{ m_allPortsState = config->readBoolEntry( "allPortsState" );
m_fastScanState = config->readBoolEntry( "fastScanState" );
m_ipV6State = config->readBoolEntry( "ipV6State" );
@ -176,7 +176,7 @@ void SimpleOptions::readProfile( KConfig* config )
// saveProfile
// ===========
void SimpleOptions::saveProfile( KConfig* config )
void SimpleOptions::saveProfile( TDEConfig* config )
{ config->writeEntry( "allPortsState", m_allPortsState );
config->writeEntry( "fastScanState", m_fastScanState );
config->writeEntry( "ipV6State", m_ipV6State );

@ -27,28 +27,28 @@
# include <config.h>
#endif
#include <qwidget.h>
#include <ntqwidget.h>
#include "global.h"
// forward class definitions
// =========================
class QCheckBox;
class KConfig;
class TQCheckBox;
class TDEConfig;
// SimpleOptions class definition
// ==============================
class SimpleOptions : public QWidget
class SimpleOptions : public TQWidget
{ Q_OBJECT
public:
SimpleOptions( QWidget* parent, const char* name = NULL );
SimpleOptions( TQWidget* parent, const char* name = NULL );
void finaliseInitialisation( );
bool getOptions( bool& needRoot );
void readProfile( KConfig* config );
void saveProfile( KConfig* config );
void readProfile( TDEConfig* config );
void saveProfile( TDEConfig* config );
void setInitialValues( );
bool allPortsState( ) const { return m_allPortsState; }
@ -67,8 +67,8 @@ class SimpleOptions : public QWidget
signals:
void disablePortRanges( );
void displayDocBook( const QString& );
void displayHelp( const QString& );
void displayDocBook( const TQString& );
void displayHelp( const TQString& );
void displayUnknown( );
void optionsDirty( );
@ -82,31 +82,31 @@ class SimpleOptions : public QWidget
private:
void createLayout( );
QCheckBox* m_allPortsCheckBox;
TQCheckBox* m_allPortsCheckBox;
bool m_allPortsState;
QCheckBox* m_fastScanCheckBox;
TQCheckBox* m_fastScanCheckBox;
bool m_fastScanState;
QCheckBox* m_ipV6CheckBox;
TQCheckBox* m_ipV6CheckBox;
bool m_ipV6State;
QCheckBox* m_noRandomPortsCheckBox;
TQCheckBox* m_noRandomPortsCheckBox;
bool m_noRandomPortsState;
QCheckBox* m_osDetectionCheckBox;
TQCheckBox* m_osDetectionCheckBox;
bool m_osDetectionState;
QCheckBox* m_osScanLimitCheckBox;
TQCheckBox* m_osScanLimitCheckBox;
bool m_osScanLimitState;
QCheckBox* m_packetTraceCheckBox;
TQCheckBox* m_packetTraceCheckBox;
bool m_packetTraceState;
QCheckBox* m_prepackagedCheckBox;
TQCheckBox* m_prepackagedCheckBox;
bool m_prepackagedState;
QCheckBox* m_privilegedCheckBox;
TQCheckBox* m_privilegedCheckBox;
bool m_privilegedState;
QCheckBox* m_randomizeHostsCheckBox;
TQCheckBox* m_randomizeHostsCheckBox;
bool m_randomizeHostsState;
QCheckBox* m_sendEthCheckBox;
TQCheckBox* m_sendEthCheckBox;
bool m_sendEthState;
QCheckBox* m_sendIPCheckBox;
TQCheckBox* m_sendIPCheckBox;
bool m_sendIPState;
QCheckBox* m_verboseCheckBox;
TQCheckBox* m_verboseCheckBox;
bool m_verboseState;
};

@ -20,20 +20,20 @@
* *
***************************************************************************/
#include <qiconset.h>
#include <qlabel.h>
#include <qlayout.h>
#include <qlineedit.h>
#include <qlistbox.h>
#include <qpushbutton.h>
#include <qstring.h>
#include <qstringlist.h>
#include <ntqiconset.h>
#include <ntqlabel.h>
#include <ntqlayout.h>
#include <ntqlineedit.h>
#include <ntqlistbox.h>
#include <ntqpushbutton.h>
#include <ntqstring.h>
#include <ntqstringlist.h>
#include <kdebug.h>
#include <kfiledialog.h>
#include <kglobalsettings.h>
#include <kiconloader.h>
#include <klocale.h>
#include <tdelocale.h>
#include <kmessagebox.h>
#include "stylesheetdialog.h"
@ -41,28 +41,28 @@
// constructor
// ===========
StylesheetDialog::StylesheetDialog( const QString& currentStylesheetURL,
const QStringList& stylesheetURLs,
QWidget* parent,
StylesheetDialog::StylesheetDialog( const TQString& currentStylesheetURL,
const TQStringList& stylesheetURLs,
TQWidget* parent,
const char* name )
: KDialogBase( Plain, "'man' stylesheet location", Ok | Cancel, Ok, parent, name ),
m_currentStylesheetURL( currentStylesheetURL ),
m_stylesheetURLs( stylesheetURLs )
{ QGridLayout* layout = new QGridLayout( plainPage( ));
KIconLoader* iconLoader = KGlobal::iconLoader( );
QIconSet fileOpenIconSet = iconLoader->loadIconSet( "fileopen", KIcon::Small );
QPushButton* urlButton = new QPushButton( fileOpenIconSet, NULL, plainPage( ), "stylesheet url button" );
m_urlLineEdit = new QLineEdit( plainPage( ), "stylesheet url line edit" );
m_urlListBox = new QListBox( plainPage( ), "stylesheet url list box" );
{ TQGridLayout* layout = new TQGridLayout( plainPage( ));
TDEIconLoader* iconLoader = TDEGlobal::iconLoader( );
TQIconSet fileOpenIconSet = iconLoader->loadIconSet( "fileopen", TDEIcon::Small );
TQPushButton* urlButton = new TQPushButton( fileOpenIconSet, NULL, plainPage( ), "stylesheet url button" );
m_urlLineEdit = new TQLineEdit( plainPage( ), "stylesheet url line edit" );
m_urlListBox = new TQListBox( plainPage( ), "stylesheet url list box" );
m_urlListBox->insertStringList( stylesheetURLs );
m_urlLineEdit->setMinimumWidth( int( 1.1 * m_urlListBox->maxItemWidth( )));
m_urlLineEdit->setText( currentStylesheetURL );
layout->addWidget( new QLabel( "Stylesheet URL: ", plainPage( ), "url label" ), 1, 1, Qt::AlignRight );
layout->addWidget( new TQLabel( "Stylesheet URL: ", plainPage( ), "url label" ), 1, 1, TQt::AlignRight );
layout->addWidget( m_urlLineEdit, 1, 2 );
layout->addWidget( urlButton, 1, 3 );
layout->addWidget( new QLabel( "Known URLs: ", plainPage( ), "url label" ), 3, 1, Qt::AlignRight | Qt::AlignTop );
layout->addWidget( new TQLabel( "Known URLs: ", plainPage( ), "url label" ), 3, 1, TQt::AlignRight | TQt::AlignTop );
layout->addWidget( m_urlListBox, 3, 2 );
layout->setColStretch( 0, 1 );
@ -75,22 +75,22 @@ StylesheetDialog::StylesheetDialog( const QString& currentStylesheetURL,
layout->setRowStretch( 4, 2 );
connect( urlButton, SIGNAL( clicked( )), SLOT( slotURLButtonClicked( )));
connect( m_urlListBox, SIGNAL( doubleClicked( QListBoxItem* )), SLOT( slotURLListBoxDoubleClicked( QListBoxItem* )));
connect( m_urlListBox, SIGNAL( doubleClicked( TQListBoxItem* )), SLOT( slotURLListBoxDoubleClicked( TQListBoxItem* )));
}
// slotOk
// ======
void StylesheetDialog::slotOk( )
{ QString currentStylesheetURL = m_urlLineEdit->text( );
QStringList::Iterator it = m_stylesheetURLs.find( currentStylesheetURL );
{ TQString currentStylesheetURL = m_urlLineEdit->text( );
TQStringList::Iterator it = m_stylesheetURLs.find( currentStylesheetURL );
if( it != m_stylesheetURLs.end( ))
m_stylesheetURLs.remove( it );
if( !QFile::exists( currentStylesheetURL ))
{ KMessageBox::sorry( this, QString( i18n( "The stylesheet \"%1\" does not exist" )).arg( currentStylesheetURL ), i18n( "Nonexistant stylesheet" ));
QListBoxItem* item = m_urlListBox->findItem( currentStylesheetURL, Qt::ExactMatch );
if( !TQFile::exists( currentStylesheetURL ))
{ KMessageBox::sorry( this, TQString( i18n( "The stylesheet \"%1\" does not exist" )).arg( currentStylesheetURL ), i18n( "Nonexistant stylesheet" ));
TQListBoxItem* item = m_urlListBox->findItem( currentStylesheetURL, TQt::ExactMatch );
if( item != NULL )
{ m_urlListBox->removeItem( m_urlListBox->index( item ));
@ -109,9 +109,9 @@ void StylesheetDialog::slotOk( )
// ====================
void StylesheetDialog::slotURLButtonClicked( )
{ QString filter = "*.css|CSS files\n*.*|All files";
QString startDir = (m_currentStylesheetURL.isEmpty( )) ? KGlobalSettings::documentPath( ) : m_currentStylesheetURL;
QString stylesheetURL = KFileDialog::getOpenFileName( startDir, filter, this, "url path dlg" );
{ TQString filter = "*.css|CSS files\n*.*|All files";
TQString startDir = (m_currentStylesheetURL.isEmpty( )) ? TDEGlobalSettings::documentPath( ) : m_currentStylesheetURL;
TQString stylesheetURL = KFileDialog::getOpenFileName( startDir, filter, this, "url path dlg" );
if( stylesheetURL.isEmpty( ))
return;
@ -122,7 +122,7 @@ void StylesheetDialog::slotURLButtonClicked( )
// slotURLListBoxDoubleClicked
// ===========================
void StylesheetDialog::slotURLListBoxDoubleClicked( QListBoxItem* item )
void StylesheetDialog::slotURLListBoxDoubleClicked( TQListBoxItem* item )
{ m_urlLineEdit->setText( item->text( ));
slotOk( );
}

@ -33,10 +33,10 @@
// forward class definitions
// =========================
class QListBox;
class QLineEdit;
class QString;
class QStringList;
class TQListBox;
class TQLineEdit;
class TQString;
class TQStringList;
// StylesheetDialog class definition
// =================================
@ -45,12 +45,12 @@ class StylesheetDialog : public KDialogBase
{ Q_OBJECT
public:
StylesheetDialog( const QString& currentStylesheetURL,
const QStringList& stylesheetURLs,
QWidget* parent = NULL,
StylesheetDialog( const TQString& currentStylesheetURL,
const TQStringList& stylesheetURLs,
TQWidget* parent = NULL,
const char* name = NULL );
QStringList stylesheetURLs( ) const { return m_stylesheetURLs; }
TQStringList stylesheetURLs( ) const { return m_stylesheetURLs; }
signals:
void stylesheetRemoved( );
@ -58,13 +58,13 @@ class StylesheetDialog : public KDialogBase
private slots:
void slotOk( );
void slotURLButtonClicked( );
void slotURLListBoxDoubleClicked( QListBoxItem* item );
void slotURLListBoxDoubleClicked( TQListBoxItem* item );
private:
QString m_currentStylesheetURL;
QStringList m_stylesheetURLs;
QListBox* m_urlListBox;
QLineEdit* m_urlLineEdit;
TQString m_currentStylesheetURL;
TQStringList m_stylesheetURLs;
TQListBox* m_urlListBox;
TQLineEdit* m_urlLineEdit;
};
#endif // _STYLESHEETDIALOG_H_

@ -20,18 +20,18 @@
* *
***************************************************************************/
#include <qstring.h>
#include <qwidget.h>
#include <ntqstring.h>
#include <ntqwidget.h>
#include <kdebug.h>
#include <klocale.h>
#include <tdelocale.h>
#include "tabwidgetdata.h"
// constructor
// ===========
TabWidgetData::TabWidgetData( const int index, const QString& title, QWidget* widget )
TabWidgetData::TabWidgetData( const int index, const TQString& title, TQWidget* widget )
: m_index( index ),
m_title( title ),
m_widget( widget )

@ -26,24 +26,24 @@
// forward class definitions
// =========================
class QString;
class QWidget;
class TQString;
class TQWidget;
// TabWidgetData class definition
// ==============================
class TabWidgetData
{ public:
TabWidgetData( const int index, const QString& title, QWidget* widget );
TabWidgetData( const int index, const TQString& title, TQWidget* widget );
int index( ) const { return m_index; }
QString title( ) const { return m_title; }
QWidget* widget( ) const { return m_widget; }
TQString title( ) const { return m_title; }
TQWidget* widget( ) const { return m_widget; }
private:
int m_index;
QString m_title;
QWidget* m_widget;
TQString m_title;
TQWidget* m_widget;
};
#endif // _TABWIDGETDATA_H_

@ -20,10 +20,10 @@
* *
***************************************************************************/
#include <qptrcollection.h>
#include <ntqptrcollection.h>
#include <kdebug.h>
#include <klocale.h>
#include <tdelocale.h>
#include "tabwidgetptrlist.h"
@ -37,7 +37,7 @@ TabWidgetPtrList::TabWidgetPtrList( )
// compareItems
// ============
int TabWidgetPtrList::compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 )
int TabWidgetPtrList::compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 )
{ typedef TabWidgetData* DataPtr;
if( DataPtr( item1 )->index( ) < DataPtr( item2 )->index( ))

@ -27,23 +27,23 @@
# include <config.h>
#endif
#include <qptrlist.h>
#include <ntqptrlist.h>
#include "global.h"
#include "tabwidgetdata.h"
// forward class definitions
// =========================
class QPtrCollection;
class TQPtrCollection;
// TabWidgetPtrList class definition
// =================================
class TabWidgetPtrList : public QPtrList<TabWidgetData>
class TabWidgetPtrList : public TQPtrList<TabWidgetData>
{ public:
TabWidgetPtrList( );
int compareItems( QPtrCollection::Item item1, QPtrCollection::Item item2 );
int compareItems( TQPtrCollection::Item item1, TQPtrCollection::Item item2 );
};
#endif // _TABWIDGETPTRLIST_H_

@ -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

@ -26,33 +26,33 @@
# include <config.h>
#endif
#include <qwidget.h>
#include <ntqwidget.h>
#include "global.h"
// forward class definitions
// =========================
class KConfig;
class QCheckBox;
class QLineEdit;
class QPushButton;
class QRadioButton;
class TDEConfig;
class TQCheckBox;
class TQLineEdit;
class TQPushButton;
class TQRadioButton;
// TimingWidget class definition
// =============================
class TimingWidget : public QWidget
class TimingWidget : public TQWidget
{ Q_OBJECT
public:
TimingWidget( QWidget* parent, const char* name = NULL );
TimingWidget( TQWidget* parent, const char* name = NULL );
void finaliseInitialisation( );
bool getOptions( );
void readProfile( KConfig* config );
void saveProfile( KConfig* config );
void readProfile( TDEConfig* config );
void saveProfile( TDEConfig* config );
void setInitialValues( );
QString simpleTiming( ) const;
TQString simpleTiming( ) const;
bool hostTimeoutState( ) const { return m_hostTimeoutState; }
uint hostTimeoutValue( ) const { return m_hostTimeoutValue; }
@ -76,8 +76,8 @@ class TimingWidget : public QWidget
uint scanDelayValue( ) const { return m_scanDelayValue; }
signals:
void displayDocBook( const QString& );
void displayHelp( const QString& );
void displayDocBook( const TQString& );
void displayHelp( const TQString& );
void displayUnknown( );
void optionsDirty( );
@ -127,64 +127,64 @@ class TimingWidget : public QWidget
Sneaky_T1_Timing
};
QRadioButton* m_aggressiveRadio;
QRadioButton* m_defaultRadio;
QPushButton* m_hostTimeoutButton;
QCheckBox* m_hostTimeoutCheckBox;
QLineEdit* m_hostTimeoutLineEdit;
TQRadioButton* m_aggressiveRadio;
TQRadioButton* m_defaultRadio;
TQPushButton* m_hostTimeoutButton;
TQCheckBox* m_hostTimeoutCheckBox;
TQLineEdit* m_hostTimeoutLineEdit;
bool m_hostTimeoutState;
uint m_hostTimeoutValue;
QPushButton* m_initialRTTTimeoutButton;
QCheckBox* m_initialRTTTimeoutCheckBox;
QLineEdit* m_initialRTTTimeoutLineEdit;
TQPushButton* m_initialRTTTimeoutButton;
TQCheckBox* m_initialRTTTimeoutCheckBox;
TQLineEdit* m_initialRTTTimeoutLineEdit;
bool m_initialRTTTimeoutState;
uint m_initialRTTTimeoutValue;
QRadioButton* m_insaneRadio;
QPushButton* m_maxHostGroupButton;
QCheckBox* m_maxHostGroupCheckBox;
QLineEdit* m_maxHostGroupLineEdit;
TQRadioButton* m_insaneRadio;
TQPushButton* m_maxHostGroupButton;
TQCheckBox* m_maxHostGroupCheckBox;
TQLineEdit* m_maxHostGroupLineEdit;
bool m_maxHostGroupState;
uint m_maxHostGroupValue;
QPushButton* m_maxParallelismButton;
QCheckBox* m_maxParallelismCheckBox;
QLineEdit* m_maxParallelismLineEdit;
TQPushButton* m_maxParallelismButton;
TQCheckBox* m_maxParallelismCheckBox;
TQLineEdit* m_maxParallelismLineEdit;
bool m_maxParallelismState;
uint m_maxParallelismValue;
QPushButton* m_maxRTTTimeoutButton;
QCheckBox* m_maxRTTTimeoutCheckBox;
QLineEdit* m_maxRTTTimeoutLineEdit;
TQPushButton* m_maxRTTTimeoutButton;
TQCheckBox* m_maxRTTTimeoutCheckBox;
TQLineEdit* m_maxRTTTimeoutLineEdit;
bool m_maxRTTTimeoutState;
uint m_maxRTTTimeoutValue;
QPushButton* m_maxScanDelayButton;
QCheckBox* m_maxScanDelayCheckBox;
QLineEdit* m_maxScanDelayLineEdit;
TQPushButton* m_maxScanDelayButton;
TQCheckBox* m_maxScanDelayCheckBox;
TQLineEdit* m_maxScanDelayLineEdit;
bool m_maxScanDelayState;
uint m_maxScanDelayValue;
QPushButton* m_minHostGroupButton;
QCheckBox* m_minHostGroupCheckBox;
QLineEdit* m_minHostGroupLineEdit;
TQPushButton* m_minHostGroupButton;
TQCheckBox* m_minHostGroupCheckBox;
TQLineEdit* m_minHostGroupLineEdit;
bool m_minHostGroupState;
uint m_minHostGroupValue;
QPushButton* m_minParallelismButton;
QCheckBox* m_minParallelismCheckBox;
QLineEdit* m_minParallelismLineEdit;
TQPushButton* m_minParallelismButton;
TQCheckBox* m_minParallelismCheckBox;
TQLineEdit* m_minParallelismLineEdit;
bool m_minParallelismState;
uint m_minParallelismValue;
QPushButton* m_minRTTTimeoutButton;
QCheckBox* m_minRTTTimeoutCheckBox;
QLineEdit* m_minRTTTimeoutLineEdit;
TQPushButton* m_minRTTTimeoutButton;
TQCheckBox* m_minRTTTimeoutCheckBox;
TQLineEdit* m_minRTTTimeoutLineEdit;
bool m_minRTTTimeoutState;
uint m_minRTTTimeoutValue;
QRadioButton* m_normalRadio;
QRadioButton* m_paranoidRadio;
QRadioButton* m_politeRadio;
QPushButton* m_scanDelayButton;
QCheckBox* m_scanDelayCheckBox;
QLineEdit* m_scanDelayLineEdit;
TQRadioButton* m_normalRadio;
TQRadioButton* m_paranoidRadio;
TQRadioButton* m_politeRadio;
TQPushButton* m_scanDelayButton;
TQCheckBox* m_scanDelayCheckBox;
TQLineEdit* m_scanDelayLineEdit;
bool m_scanDelayState;
uint m_scanDelayValue;
Timing m_simpleTimingValue;
QRadioButton* m_sneakyRadio;
TQRadioButton* m_sneakyRadio;
};
#endif // _TIMINGWIDGET_H_

@ -21,22 +21,22 @@
***************************************************************************/
#include <kdebug.h>
#include <klocale.h>
#include <tdelocale.h>
#include "whatsthis.h"
// constructor
// ===========
WhatsThis::WhatsThis( QWidget* widget )
: QWhatsThis( widget )
WhatsThis::WhatsThis( TQWidget* widget )
: TQWhatsThis( widget )
{
}
// text
// ====
QString WhatsThis::text( const QPoint& /*pos */)
TQString WhatsThis::text( const TQPoint& /*pos */)
{ emit( clicked( ));
return "";
}

@ -27,24 +27,24 @@
# include <config.h>
#endif
#include <qobject.h>
#include <qwhatsthis.h>
#include <ntqobject.h>
#include <ntqwhatsthis.h>
#include "global.h"
// forward class definitions
// =========================
class QPoint;
class TQPoint;
// WhatsThis class definition
// ==========================
class WhatsThis : public QObject, public QWhatsThis
class WhatsThis : public TQObject, public TQWhatsThis
{ Q_OBJECT
public:
WhatsThis( QWidget* widget );
QString text( const QPoint& pos );
WhatsThis( TQWidget* widget );
TQString text( const TQPoint& pos );
signals:
void clicked( );

Loading…
Cancel
Save