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_includes=""
x_libraries="" x_libraries=""
elif test "$kde_use_qt_mac" = "yes"; then 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 dnl be included to get the information) --Sam
CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp" CXXFLAGS="$CXXFLAGS -DQT_MAC -no-cpp-precomp"
CFLAGS="$CFLAGS -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]) AC_REQUIRE([KDE_USE_QT])
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#include "confdefs.h" #include "confdefs.h"
#include <qglobal.h> #include <ntqglobal.h>
#include <qapplication.h> #include <ntqapplication.h>
EOF EOF
if test "$kde_qtver" = "2"; then if test "$kde_qtver" = "2"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qevent.h> #include <ntqevent.h>
#include <qstring.h> #include <ntqstring.h>
#include <qstyle.h> #include <ntqstyle.h>
EOF EOF
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#if QT_VERSION < 210 #if TQT_VERSION < 210
#error 1 #error 1
#endif #endif
EOF EOF
@ -1086,8 +1086,8 @@ fi
if test "$kde_qtver" = "3"; then if test "$kde_qtver" = "3"; then
cat >> conftest.$ac_ext <<EOF cat >> conftest.$ac_ext <<EOF
#include <qcursor.h> #include <ntqcursor.h>
#include <qstylefactory.h> #include <ntqstylefactory.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
EOF EOF
fi fi
@ -1170,22 +1170,22 @@ fi
if test -z "$3"; then if test -z "$3"; then
if test $kde_qtver = 3; then if test $kde_qtver = 3; then
if test $kde_qtsubver -gt 0; 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,'` qtsubver=`echo "00$kde_qtsubver" | sed -e 's,.*\(..\)$,\1,'`
kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"` kde_qt_verstring=`echo $kde_qt_verstring | sed -e "s,@VER@,$qtsubver,"`
else else
kde_qt_verstring="QT_VERSION >= 300" kde_qt_verstring="TQT_VERSION >= 300"
fi fi
fi fi
if test $kde_qtver = 2; then if test $kde_qtver = 2; then
if test $kde_qtsubver -gt 0; then if test $kde_qtsubver -gt 0; then
kde_qt_verstring="QT_VERSION >= 222" kde_qt_verstring="TQT_VERSION >= 222"
else else
kde_qt_verstring="QT_VERSION >= 200" kde_qt_verstring="TQT_VERSION >= 200"
fi fi
fi fi
if test $kde_qtver = 1; then 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 fi
else else
kde_qt_verstring="$3" kde_qt_verstring="$3"
@ -1291,7 +1291,7 @@ AC_ARG_ENABLE(
USING_QT_MT="" USING_QT_MT=""
dnl ------------------------------------------------------------------------ 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 ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
KDE_MT_LDFLAGS= KDE_MT_LDFLAGS=
@ -1354,7 +1354,7 @@ dnl ------------------------------------------------------------
fi fi
dnl ------------------------------------------------------------------------ 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 ------------------------------------------------------------------------ dnl ------------------------------------------------------------------------
if test "x$kde_use_qt_mt" = "xyes"; then if test "x$kde_use_qt_mt" = "xyes"; then
@ -1425,9 +1425,9 @@ if test ! "$ac_qt_includes" = "NO"; then
fi fi
if test "$kde_qtver" != "1"; then if test "$kde_qtver" != "1"; then
kde_qt_header=qstyle.h kde_qt_header=ntqstyle.h
else else
kde_qt_header=qglobal.h kde_qt_header=ntqglobal.h
fi fi
AC_FIND_FILE($kde_qt_header, $qt_incdirs, qt_incdir) 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" LDFLAGS="$LDFLAGS $all_libraries $USER_LDFLAGS"
AC_TRY_LINK([ AC_TRY_LINK([
#include <qdom.h> #include <ntqdom.h>
], ],
[ [
QDomDocument doc; QDomDocument doc;
@ -2498,7 +2498,7 @@ LIBS=`echo $LIBS | sed "s/$LIBJPEG//"`
ac_save_CXXFLAGS="$CXXFLAGS" ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES" CXXFLAGS="$CXXFLAGS $all_includes $USER_INCLUDES"
AC_TRY_LINK( AC_TRY_LINK(
[#include <qapplication.h>], [#include <ntqapplication.h>],
[ [
int argc; int argc;
char** argv; char** argv;
@ -4205,7 +4205,7 @@ CXXFLAGS="$CXXFLAGS -I$qt_incdir $all_includes"
AC_TRY_RUN(dnl AC_TRY_RUN(dnl
[ [
#include <qimageio.h> #include <qimageio.h>
#include <qstring.h> #include <ntqstring.h>
int main() { int main() {
QString t = "hallo"; QString t = "hallo";
t.fill('t'); t.fill('t');
@ -4989,7 +4989,7 @@ if test "${with_qt_dir+set}" = set; then
kde_qtdir="$with_qt_dir" kde_qtdir="$with_qt_dir"
fi 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_MSG_RESULT($QTDOCDIR)
AC_SUBST(QTDOCDIR) AC_SUBST(QTDOCDIR)
@ -5010,7 +5010,7 @@ AC_SUBST(DOXYGEN_PROJECT_NAME)
AC_SUBST(DOXYGEN_PROJECT_NUMBER) AC_SUBST(DOXYGEN_PROJECT_NUMBER)
KDE_HAS_DOXYGEN=no 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 KDE_HAS_DOXYGEN=yes
fi fi
AC_SUBST(KDE_HAS_DOXYGEN) AC_SUBST(KDE_HAS_DOXYGEN)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -278,7 +278,7 @@
reporting by some operating systems. Systems vulnerable to this reporting by some operating systems. Systems vulnerable to this
include at least some versions of AIX, Amiga, BeOS, BSDI, Cray, include at least some versions of AIX, Amiga, BeOS, BSDI, Cray,
Tru64 UNIX, DG/UX, OpenVMS, Digital UNIX, FreeBSD, HP-UX, OS/2, 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 4.X, Ultrix, VAX, and VxWorks. See the nmap-hackers mailing
list archive for a full list. list archive for a full list.

@ -20,12 +20,12 @@
* * * *
***************************************************************************/ ***************************************************************************/
#include <qfile.h> #include <ntqfile.h>
#include <qtimer.h> #include <ntqtimer.h>
#include <kconfig.h> #include <tdeconfig.h>
#include <kdebug.h> #include <kdebug.h>
#include <klocale.h> #include <tdelocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include "knmap.h" #include "knmap.h"
@ -34,15 +34,15 @@
// constructor // constructor
// =========== // ===========
OutputWidget::OutputWidget( QWidget* parent, const char* name ) OutputWidget::OutputWidget( TQWidget* parent, const char* name )
: QTextEdit( parent, name ), : TQTextEdit( parent, name ),
m_append( false ), m_append( false ),
m_dataBytes( 0 ), m_dataBytes( 0 ),
m_firstSave( true ), m_firstSave( true ),
m_priorType( OutputType( -1 )) m_priorType( OutputType( -1 ))
{ setFamily( "monospace" ); { setFamily( "monospace" );
setReadOnly( true ); setReadOnly( true );
QTimer::singleShot( 0, this, SLOT( slotUpdateStatusBarText( ))); TQTimer::singleShot( 0, this, SLOT( slotUpdateStatusBarText( )));
} }
// addOutput // addOutput
@ -50,8 +50,8 @@ OutputWidget::OutputWidget( QWidget* parent, const char* name )
void OutputWidget::addOutput( const OutputType type, const char* buffer, const int buflen ) void OutputWidget::addOutput( const OutputType type, const char* buffer, const int buflen )
{ m_dataBytes += buflen; { m_dataBytes += buflen;
QString outputText = QString::fromLatin1( buffer, buflen ); TQString outputText = TQString::fromLatin1( buffer, buflen );
QString prependText; TQString prependText;
if( m_append && type == m_priorType && m_priorType != OutputType( -1 )) if( m_append && type == m_priorType && m_priorType != OutputType( -1 ))
{ uint paraNo = paragraphs( ) - 1; { uint paraNo = paragraphs( ) - 1;
@ -99,14 +99,14 @@ bool OutputWidget::fileSave( const bool saveAs )
return false; return false;
m_firstSave = false; m_firstSave = false;
QFile file( m_path ); TQFile file( m_path );
if( !file.open( IO_WriteOnly )) 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; return false;
} }
QTextStream stream( &file ); TQTextStream stream( &file );
uint noOfParagraphs = paragraphs( ); uint noOfParagraphs = paragraphs( );
uint paragraphNo; uint paragraphNo;
@ -127,14 +127,14 @@ bool OutputWidget::fileSaveAs( )
// readProfile // readProfile
// =========== // ===========
void OutputWidget::readProfile( KConfig* config ) void OutputWidget::readProfile( TDEConfig* config )
{ m_path = config->readPathEntry( "path" ); { m_path = config->readPathEntry( "path" );
} }
// saveProfile // saveProfile
// =========== // ===========
void OutputWidget::saveProfile( KConfig* config ) void OutputWidget::saveProfile( TDEConfig* config )
{ config->writeEntry( "path", m_path ); { config->writeEntry( "path", m_path );
} }
@ -142,10 +142,10 @@ void OutputWidget::saveProfile( KConfig* config )
// ======================= // =======================
void OutputWidget::slotUpdateStatusBarText( ) void OutputWidget::slotUpdateStatusBarText( )
{ QString dataBytes; { TQString dataBytes;
if( m_dataBytes < 1024 ) if( m_dataBytes < 1024 )
dataBytes = QString::number( m_dataBytes ) + " bytes"; dataBytes = TQString::number( m_dataBytes ) + " bytes";
else else
if( m_dataBytes < 1024 * 1024 ) if( m_dataBytes < 1024 * 1024 )
{ float kiloBytes = m_dataBytes / float( 1024 ); { float kiloBytes = m_dataBytes / float( 1024 );
@ -170,5 +170,5 @@ void OutputWidget::slotUpdateStatusBarText( )
dataBytes.sprintf( "%.1f MBytes", megaBytes ); 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> # include <config.h>
#endif #endif
#include <qtextedit.h> #include <ntqtextedit.h>
#include "global.h" #include "global.h"
// forward class definitions // forward class definitions
// ========================= // =========================
class KConfig; class TDEConfig;
// OutputWidget class definition // OutputWidget class definition
// ============================= // =============================
class OutputWidget : public QTextEdit class OutputWidget : public TQTextEdit
{ Q_OBJECT { Q_OBJECT
public: public:
OutputWidget( QWidget* parent = NULL, const char* name = NULL ); OutputWidget( TQWidget* parent = NULL, const char* name = NULL );
// output type definitions // output type definitions
// ======================= // =======================
@ -57,22 +57,22 @@ class OutputWidget : public QTextEdit
void clearOutput( ); void clearOutput( );
bool fileSave( const bool saveAs = false ); bool fileSave( const bool saveAs = false );
bool fileSaveAs( ); bool fileSaveAs( );
void readProfile( KConfig* config ); void readProfile( TDEConfig* config );
void saveProfile( KConfig* config ); void saveProfile( TDEConfig* config );
signals: signals:
void statusBarText( const QString& ); void statusBarText( const TQString& );
public slots: public slots:
void slotUpdateStatusBarText( ); void slotUpdateStatusBarText( );
private: private:
void appendLine( const OutputType type, const QString& text ); void appendLine( const OutputType type, const TQString& text );
bool m_append; bool m_append;
uint m_dataBytes; uint m_dataBytes;
bool m_firstSave; bool m_firstSave;
QString m_path; TQString m_path;
OutputType m_priorType; OutputType m_priorType;
}; };

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

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

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

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

@ -27,9 +27,9 @@
#include <sys/select.h> #include <sys/select.h>
#include <sys/time.h> #include <sys/time.h>
#include <qapplication.h> #include <ntqapplication.h>
#include <klocale.h> #include <tdelocale.h>
#include "nmapoutputbuffer.h" #include "nmapoutputbuffer.h"
#include "scanmonitor.h" #include "scanmonitor.h"
@ -40,7 +40,7 @@
// =========== // ===========
ScanMonitor::ScanMonitor( ScanWidget* parent ) ScanMonitor::ScanMonitor( ScanWidget* parent )
: QThread( ), : TQThread( ),
m_buffer( NULL ), m_buffer( NULL ),
m_nmapBufferSize( 16384 ), m_nmapBufferSize( 16384 ),
m_parent( parent ) m_parent( parent )
@ -77,7 +77,7 @@ void ScanMonitor::readNmapOutput( const int pipeFD, const ScanMonitorEventType t
if( bytesRead > 0 ) if( bytesRead > 0 )
{ m_buffer->length( bytesRead ); { 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; m_buffer = NULL;
continue; continue;
} }
@ -87,10 +87,10 @@ void ScanMonitor::readNmapOutput( const int pipeFD, const ScanMonitorEventType t
break; 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( )); strcpy( m_buffer->buffer( ), text.ascii( ));
m_buffer->length( text.length( )); 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; m_buffer = NULL;
break; break;
} }

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

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

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

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

@ -33,8 +33,8 @@
// forward class definitions // forward class definitions
// ========================= // =========================
class QCheckBox; class TQCheckBox;
class QLineEdit; class TQLineEdit;
class ScanWidget; class ScanWidget;
// ScanNameDialog class definition // ScanNameDialog class definition
@ -44,9 +44,9 @@ class ScanNameDialog : public KDialogBase
{ Q_OBJECT { Q_OBJECT
public: 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; } bool useHostName( ) const { return m_useHostName; }
private slots: private slots:
@ -56,10 +56,10 @@ class ScanNameDialog : public KDialogBase
private: private:
void createlayout( ); void createlayout( );
QString m_scanName; TQString m_scanName;
QLineEdit* m_scanNameEdit; TQLineEdit* m_scanNameEdit;
bool m_useHostName; bool m_useHostName;
QCheckBox* m_useHostNameCheckbox; TQCheckBox* m_useHostNameCheckbox;
}; };
#endif // _SCANNAMEDIALOG_H_ #endif // _SCANNAMEDIALOG_H_

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

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

@ -28,16 +28,16 @@
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <qfile.h> #include <ntqfile.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qstringlist.h> #include <ntqstringlist.h>
#include <qtimer.h> #include <ntqtimer.h>
#include <kapplication.h> #include <kapplication.h>
#include <kconfig.h> #include <tdeconfig.h>
#include <kdebug.h> #include <kdebug.h>
#include <klocale.h> #include <tdelocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kprocess.h> #include <kprocess.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
@ -64,11 +64,11 @@
// constructor // constructor
// =========== // ===========
ScanWidget::ScanWidget( const QString& scanName, ScanWidget::ScanWidget( const TQString& scanName,
const bool useTargetHost, const bool useTargetHost,
QWidget* parent, TQWidget* parent,
const char* name ) const char* name )
: QFrame( parent, name ), : TQFrame( parent, name ),
m_dirty (false ), m_dirty (false ),
m_hideOptions( true ), m_hideOptions( true ),
m_ignoreTabChanges( false ), m_ignoreTabChanges( false ),
@ -79,14 +79,14 @@ ScanWidget::ScanWidget( const QString& scanName,
m_scanName( scanName ), m_scanName( scanName ),
m_state( dormant ), m_state( dormant ),
m_useTargetHost( useTargetHost ) m_useTargetHost( useTargetHost )
{ setFrameStyle( QFrame::WinPanel | QFrame::Sunken ); { setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
createLayout( ); createLayout( );
m_clearOutputButton->setEnabled( false ); m_clearOutputButton->setEnabled( false );
m_stopButton->setEnabled( false ); m_stopButton->setEnabled( false );
m_startButton->setDefault( true ); m_startButton->setDefault( true );
srand( time( NULL )); srand( time( NULL ));
QTimer::singleShot( 0, this, SLOT( slotFinaliseInitialisation( ))); TQTimer::singleShot( 0, this, SLOT( slotFinaliseInitialisation( )));
} }
// destructor // destructor
@ -118,8 +118,8 @@ ScanWidget::~ScanWidget( )
// buildNmapOptionsList // buildNmapOptionsList
// ==================== // ====================
QStringList ScanWidget::buildNmapOptionsList( ) TQStringList ScanWidget::buildNmapOptionsList( )
{ QStringList nmapOptions; { TQStringList nmapOptions;
nmapOptions << KStandardDirs::findExe ( "nmap" ); nmapOptions << KStandardDirs::findExe ( "nmap" );
if( m_commonWidget->resovleAlwaysState( )) if( m_commonWidget->resovleAlwaysState( ))
@ -130,52 +130,52 @@ QStringList ScanWidget::buildNmapOptionsList( )
if( m_timingWidget->hostTimeoutState( )) if( m_timingWidget->hostTimeoutState( ))
{ nmapOptions << "--host_timeout"; { nmapOptions << "--host_timeout";
nmapOptions << QString::number( m_timingWidget->hostTimeoutValue( )); nmapOptions << TQString::number( m_timingWidget->hostTimeoutValue( ));
} }
if( m_timingWidget->initialRTTTimeoutState( )) if( m_timingWidget->initialRTTTimeoutState( ))
{ nmapOptions << "--initial_rtt_timeout"; { nmapOptions << "--initial_rtt_timeout";
nmapOptions << QString::number( m_timingWidget->initialRTTTimeoutValue( )); nmapOptions << TQString::number( m_timingWidget->initialRTTTimeoutValue( ));
} }
if( m_timingWidget->maxHostGroupState( )) if( m_timingWidget->maxHostGroupState( ))
{ nmapOptions << "--max_hostgroup"; { nmapOptions << "--max_hostgroup";
nmapOptions << QString::number( m_timingWidget->maxHostGroupValue( )); nmapOptions << TQString::number( m_timingWidget->maxHostGroupValue( ));
} }
if( m_timingWidget->minHostGroupState( )) if( m_timingWidget->minHostGroupState( ))
{ nmapOptions << "--min_hostgroup"; { nmapOptions << "--min_hostgroup";
nmapOptions << QString::number( m_timingWidget->minHostGroupValue( )); nmapOptions << TQString::number( m_timingWidget->minHostGroupValue( ));
} }
if( m_timingWidget->maxParallelismState( )) if( m_timingWidget->maxParallelismState( ))
{ nmapOptions << "--max_parallelism"; { nmapOptions << "--max_parallelism";
nmapOptions << QString::number( m_timingWidget->maxParallelismValue( )); nmapOptions << TQString::number( m_timingWidget->maxParallelismValue( ));
} }
if( m_timingWidget->minParallelismState( )) if( m_timingWidget->minParallelismState( ))
{ nmapOptions << "--min_parallelism"; { nmapOptions << "--min_parallelism";
nmapOptions << QString::number( m_timingWidget->minParallelismValue( )); nmapOptions << TQString::number( m_timingWidget->minParallelismValue( ));
} }
if( m_timingWidget->maxRTTTimeoutState( )) if( m_timingWidget->maxRTTTimeoutState( ))
{ nmapOptions << "--max_rtt_timeout"; { nmapOptions << "--max_rtt_timeout";
nmapOptions << QString::number( m_timingWidget->maxRTTTimeoutValue( )); nmapOptions << TQString::number( m_timingWidget->maxRTTTimeoutValue( ));
} }
if( m_timingWidget->minRTTTimeoutState( )) if( m_timingWidget->minRTTTimeoutState( ))
{ nmapOptions << "--min_rtt_timeout"; { nmapOptions << "--min_rtt_timeout";
nmapOptions << QString::number( m_timingWidget->minRTTTimeoutValue( )); nmapOptions << TQString::number( m_timingWidget->minRTTTimeoutValue( ));
} }
if( m_timingWidget->maxScanDelayState( )) if( m_timingWidget->maxScanDelayState( ))
{ nmapOptions << "--max_scan_delay"; { nmapOptions << "--max_scan_delay";
nmapOptions << QString::number( m_timingWidget->maxScanDelayValue( )); nmapOptions << TQString::number( m_timingWidget->maxScanDelayValue( ));
} }
if( m_timingWidget->scanDelayState( )) if( m_timingWidget->scanDelayState( ))
{ nmapOptions << "--scan_delay"; { nmapOptions << "--scan_delay";
nmapOptions << QString::number( m_timingWidget->scanDelayValue( )); nmapOptions << TQString::number( m_timingWidget->scanDelayValue( ));
} }
if( !m_timingWidget->simpleTiming( ).isEmpty( )) if( !m_timingWidget->simpleTiming( ).isEmpty( ))
@ -220,7 +220,7 @@ QStringList ScanWidget::buildNmapOptionsList( )
if( m_compoundWidget->dataLengthState( )) if( m_compoundWidget->dataLengthState( ))
{ nmapOptions << "--data_length"; { nmapOptions << "--data_length";
nmapOptions << QString::number( m_compoundWidget->dataLengthValue( )); nmapOptions << TQString::number( m_compoundWidget->dataLengthValue( ));
} }
if( m_compoundWidget->decoyState( )) if( m_compoundWidget->decoyState( ))
@ -249,17 +249,17 @@ QStringList ScanWidget::buildNmapOptionsList( )
if( m_compoundWidget->maxSocketsState( )) if( m_compoundWidget->maxSocketsState( ))
{ nmapOptions << "-M"; { nmapOptions << "-M";
nmapOptions << QString::number( m_compoundWidget->maxSocketsValue( )); nmapOptions << TQString::number( m_compoundWidget->maxSocketsValue( ));
} }
if( m_compoundWidget->randomIPState( )) if( m_compoundWidget->randomIPState( ))
{ nmapOptions << "-iR"; { nmapOptions << "-iR";
nmapOptions << QString::number( m_compoundWidget->randomIPValue( )); nmapOptions << TQString::number( m_compoundWidget->randomIPValue( ));
} }
if( m_compoundWidget->sourcePortState( )) if( m_compoundWidget->sourcePortState( ))
{ nmapOptions << "--source_port"; { nmapOptions << "--source_port";
nmapOptions << QString::number( m_compoundWidget->sourcePortValue( )); nmapOptions << TQString::number( m_compoundWidget->sourcePortValue( ));
} }
if( m_compoundWidget->sourceIPState( )) if( m_compoundWidget->sourceIPState( ))
@ -279,7 +279,7 @@ QStringList ScanWidget::buildNmapOptionsList( )
if( m_compoundWidget->ttlState( )) if( m_compoundWidget->ttlState( ))
{ nmapOptions << "--ttl"; { nmapOptions << "--ttl";
nmapOptions << QString::number( m_compoundWidget->ttlValue( )); nmapOptions << TQString::number( m_compoundWidget->ttlValue( ));
} }
if( m_simpleWidget->ipV6State( )) if( m_simpleWidget->ipV6State( ))
@ -415,7 +415,7 @@ QStringList ScanWidget::buildNmapOptionsList( )
// closePipe // closePipe
// ========= // =========
void ScanWidget::closePipe( QFile*& pipe, int& pipeFD ) void ScanWidget::closePipe( TQFile*& pipe, int& pipeFD )
{ if( pipe == NULL ) { if( pipe == NULL )
return; return;
@ -441,14 +441,14 @@ void ScanWidget::createLayout( )
m_tabWidget->setTabReorderingEnabled( true ); m_tabWidget->setTabReorderingEnabled( true );
byte row = 0; byte row = 0;
QVBoxLayout* layout = new QVBoxLayout( this ); TQVBoxLayout* layout = new TQVBoxLayout( this );
layout->addWidget( m_tabWidget, row++ ); layout->addWidget( m_tabWidget, row++ );
QHBoxLayout* buttonLayout = new QHBoxLayout( ); TQHBoxLayout* buttonLayout = new TQHBoxLayout( );
m_clearOutputButton = new QPushButton( i18n( "Clear output" ), this, "clear output button" ); m_clearOutputButton = new TQPushButton( i18n( "Clear output" ), this, "clear output button" );
m_hideOptionsButton = new QPushButton( i18n( "Hide options" ), this, "hide options button" ); m_hideOptionsButton = new TQPushButton( i18n( "Hide options" ), this, "hide options button" );
m_startButton = new QPushButton( i18n( "Start nmap" ), this, "start button" ); m_startButton = new TQPushButton( i18n( "Start nmap" ), this, "start button" );
m_stopButton = new QPushButton( i18n( "Stop nmap" ), this, "stop button" ); m_stopButton = new TQPushButton( i18n( "Stop nmap" ), this, "stop button" );
byte col = 0; byte col = 0;
buttonLayout->insertStretch( col++, 10 ); buttonLayout->insertStretch( col++, 10 );
@ -469,9 +469,9 @@ void ScanWidget::createLayout( )
// createPipe // 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 ) { 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( )) if( !pipe->exists( ))
break; break;
@ -480,7 +480,7 @@ bool ScanWidget::createPipe( const QString type, const QString& tempDir, QFile*&
} }
if( mkfifo( pipe->name( ), 0600 )) 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( )); m_outputWidget->addOutput( OutputWidget::Stderr, text, text.length( ));
delete pipe; delete pipe;
@ -493,7 +493,7 @@ bool ScanWidget::createPipe( const QString type, const QString& tempDir, QFile*&
if( pipeFD != -1 ) if( pipeFD != -1 )
return true; 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 )); .arg( strerror( errno ));
m_outputWidget->addOutput( OutputWidget::Stderr, text, text.length( )); m_outputWidget->addOutput( OutputWidget::Stderr, text, text.length( ));
@ -510,10 +510,10 @@ bool ScanWidget::createPipes( )
ASSERT( m_pipeStdout == NULL ); ASSERT( m_pipeStdout == NULL );
KStandardDirs standardDirs; KStandardDirs standardDirs;
QStringList tempDir = standardDirs.resourceDirs( "tmp" ); TQStringList tempDir = standardDirs.resourceDirs( "tmp" );
if( tempDir.isEmpty( )) 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( )); m_outputWidget->addOutput( OutputWidget::Stderr, text, text.length( ));
return false; return false;
} }
@ -527,7 +527,7 @@ bool ScanWidget::createPipes( )
// customEvent // customEvent
// =========== // ===========
void ScanWidget::customEvent( QCustomEvent* event ) void ScanWidget::customEvent( TQCustomEvent* event )
{ smePtr scanMonitorEvent = (ScanMonitorEvent*) event; { smePtr scanMonitorEvent = (ScanMonitorEvent*) event;
nobPtr buffer; nobPtr buffer;
@ -593,7 +593,7 @@ bool ScanWidget::getOptions( )
return false; return false;
if( m_commonWidget->host( ).isEmpty( ) && !m_compoundWidget->targetFileState( )) 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; return false;
} }
@ -638,7 +638,7 @@ void ScanWidget::profileLoad( )
{ profileAskAndSave( ); { profileAskAndSave( );
ProfileDialog dlg( ProfileDialog::Load, m_profileName, this, "profile dlg" ); ProfileDialog dlg( ProfileDialog::Load, m_profileName, this, "profile dlg" );
if( dlg.exec( ) != QDialog::Accepted ) if( dlg.exec( ) != TQDialog::Accepted )
return; return;
m_profileName = dlg.profileName( ); m_profileName = dlg.profileName( );
@ -651,7 +651,7 @@ void ScanWidget::profileLoad( )
// =========== // ===========
void ScanWidget::profileRead( ) void ScanWidget::profileRead( )
{ KConfig* config = kapp->config( ); { TDEConfig* config = kapp->config( );
kapp->config( )->setGroup( m_profileName ); kapp->config( )->setGroup( m_profileName );
m_commonWidget->readProfile( config ); 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" ))) 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; return;
KConfig* config = kapp->config( ); TDEConfig* config = kapp->config( );
config->setGroup( m_profileName ); config->setGroup( m_profileName );
m_commonWidget->saveProfile( config ); m_commonWidget->saveProfile( config );
@ -717,7 +717,7 @@ void ScanWidget::profileSave( )
void ScanWidget::profileSaveAs( ) void ScanWidget::profileSaveAs( )
{ ProfileDialog dlg( ProfileDialog::SaveAs, m_profileName, this, "profile dlg" ); { ProfileDialog dlg( ProfileDialog::SaveAs, m_profileName, this, "profile dlg" );
if( dlg.exec( ) != QDialog::Accepted ) if( dlg.exec( ) != TQDialog::Accepted )
return; return;
m_profileName = dlg.profileName( ); m_profileName = dlg.profileName( );
@ -729,7 +729,7 @@ void ScanWidget::profileSaveAs( )
// ============ // ============
void ScanWidget::readSettings( ) void ScanWidget::readSettings( )
{ KConfig* config = kapp->config( ); { TDEConfig* config = kapp->config( );
config->setGroup( m_scanName ); config->setGroup( m_scanName );
m_profileName = config->readEntry( "profileName", DEFAULT_PROFILE ); m_profileName = config->readEntry( "profileName", DEFAULT_PROFILE );
@ -739,7 +739,7 @@ void ScanWidget::readSettings( )
// renameScan // renameScan
// ========== // ==========
void ScanWidget::renameScan( const QString& newScanName ) void ScanWidget::renameScan( const TQString& newScanName )
{ kapp->config( )->deleteGroup( m_scanName ); { kapp->config( )->deleteGroup( m_scanName );
m_scanName = newScanName; m_scanName = newScanName;
} }
@ -748,7 +748,7 @@ void ScanWidget::renameScan( const QString& newScanName )
// =============== // ===============
void ScanWidget::saveProfileName( ) void ScanWidget::saveProfileName( )
{ KConfig* config = kapp->config( ); { TDEConfig* config = kapp->config( );
config->setGroup( m_scanName ); config->setGroup( m_scanName );
config->writeEntry( "profileName", m_profileName ); config->writeEntry( "profileName", m_profileName );
} }
@ -793,7 +793,7 @@ void ScanWidget::setInitialValues( )
// setProfileName // setProfileName
// ============== // ==============
void ScanWidget::setProfileName( const QString& profileName ) void ScanWidget::setProfileName( const TQString& profileName )
{ m_profileName = profileName; { m_profileName = profileName;
saveProfileName( ); saveProfileName( );
profileRead( ); profileRead( );
@ -811,11 +811,11 @@ void ScanWidget::slotClearOutput( )
// slotDisplayDocBook // slotDisplayDocBook
// ================== // ==================
void ScanWidget::slotDisplayDocBook( const QString& anchor ) void ScanWidget::slotDisplayDocBook( const TQString& anchor )
{ KProcess* process = new KProcess; { TDEProcess* process = new TDEProcess;
*process << "khelpcenter"; *process << "khelpcenter";
*process << "help:/knmap//index.html#" + anchor; *process << "help:/knmap//index.html#" + anchor;
process->start( KProcess::DontCare ); process->start( TDEProcess::DontCare );
} }
// slotDisplayUnknown // slotDisplayUnknown
@ -836,16 +836,16 @@ void ScanWidget::slotFinaliseInitialisation( )
m_simpleWidget->finaliseInitialisation( ); m_simpleWidget->finaliseInitialisation( );
m_timingWidget->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_clearOutputButton, SIGNAL( clicked( )), SLOT( slotClearOutput( )));
connect( m_commonWidget, SIGNAL( disableFastScan( )), m_simpleWidget, SLOT( slotDisableFastScan( ))); 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_hideOptionsButton, SIGNAL( clicked( )), SLOT( slotHideOptions( )));
connect( m_simpleWidget, SIGNAL( disablePortRanges( )), m_commonWidget, SLOT( slotDisablePortRanges( ))); connect( m_simpleWidget, SIGNAL( disablePortRanges( )), m_commonWidget, SLOT( slotDisablePortRanges( )));
connect( m_startButton, SIGNAL( clicked( )), SLOT( slotStartClicked( ))); connect( m_startButton, SIGNAL( clicked( )), SLOT( slotStartClicked( )));
connect( m_stopButton, SIGNAL( clicked( )), SLOT( slotStopClicked( ))); 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_commonWidget, SIGNAL( optionsDirty( )), SLOT( slotOptionsDirty( )));
connect( m_compoundWidget, 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_tabWidget, SIGNAL( movedTab( int, int )), SLOT( slotOptionsDirty( )));
connect( m_timingWidget, SIGNAL( optionsDirty( )), SLOT( slotOptionsDirty( ))); connect( m_timingWidget, SIGNAL( optionsDirty( )), SLOT( slotOptionsDirty( )));
connect( m_commonWidget, 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 QString& )), SIGNAL( displayHelp( const QString& ))); connect( m_compoundWidget, SIGNAL( displayHelp( const TQString& )), SIGNAL( displayHelp( const TQString& )));
connect( m_loggingWidget, SIGNAL( displayHelp( const QString& )), SIGNAL( displayHelp( const QString& ))); connect( m_loggingWidget, SIGNAL( displayHelp( const TQString& )), SIGNAL( displayHelp( const TQString& )));
connect( m_pAndSWidget, SIGNAL( displayHelp( const QString& )), SIGNAL( displayHelp( const QString& ))); connect( m_pAndSWidget, SIGNAL( displayHelp( const TQString& )), SIGNAL( displayHelp( const TQString& )));
connect( m_simpleWidget, SIGNAL( displayHelp( const QString& )), SIGNAL( displayHelp( const QString& ))); connect( m_simpleWidget, SIGNAL( displayHelp( const TQString& )), SIGNAL( displayHelp( const TQString& )));
connect( m_timingWidget, SIGNAL( displayHelp( const QString& )), SIGNAL( displayHelp( const QString& ))); connect( m_timingWidget, SIGNAL( displayHelp( const TQString& )), SIGNAL( displayHelp( const TQString& )));
connect( m_commonWidget, 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 QString& )), SLOT( slotDisplayDocBook( const QString&))); connect( m_compoundWidget, SIGNAL( displayDocBook( const TQString& )), SLOT( slotDisplayDocBook( const TQString&)));
connect( m_loggingWidget, SIGNAL( displayDocBook( const QString& )), SLOT( slotDisplayDocBook( const QString&))); connect( m_loggingWidget, SIGNAL( displayDocBook( const TQString& )), SLOT( slotDisplayDocBook( const TQString&)));
connect( m_pAndSWidget, SIGNAL( displayDocBook( const QString& )), SLOT( slotDisplayDocBook( const QString&))); connect( m_pAndSWidget, SIGNAL( displayDocBook( const TQString& )), SLOT( slotDisplayDocBook( const TQString&)));
connect( m_simpleWidget, SIGNAL( displayDocBook( const QString& )), SLOT( slotDisplayDocBook( const QString&))); connect( m_simpleWidget, SIGNAL( displayDocBook( const TQString& )), SLOT( slotDisplayDocBook( const TQString&)));
connect( m_timingWidget, SIGNAL( displayDocBook( const QString& )), SLOT( slotDisplayDocBook( const QString&))); connect( m_timingWidget, SIGNAL( displayDocBook( const TQString& )), SLOT( slotDisplayDocBook( const TQString&)));
connect( m_commonWidget, SIGNAL( displayUnknown( )), SLOT( slotDisplayUnknown( ))); connect( m_commonWidget, SIGNAL( displayUnknown( )), SLOT( slotDisplayUnknown( )));
connect( m_compoundWidget, SIGNAL( displayUnknown( )), SLOT( slotDisplayUnknown( ))); connect( m_compoundWidget, SIGNAL( displayUnknown( )), SLOT( slotDisplayUnknown( )));
@ -929,7 +929,7 @@ void ScanWidget::slotProcessExited( )
// slotReceivedStderr // slotReceivedStderr
// ================== // ==================
void ScanWidget::slotReceivedStderr( KProcess* /* process */, char* buffer, int buflen ) void ScanWidget::slotReceivedStderr( TDEProcess* /* process */, char* buffer, int buflen )
{ m_clearOutputButton->setEnabled( true ); { m_clearOutputButton->setEnabled( true );
m_outputWidget->addOutput( OutputWidget::Stderr, buffer, buflen ); m_outputWidget->addOutput( OutputWidget::Stderr, buffer, buflen );
emit( outputAvailable( true, true )); emit( outputAvailable( true, true ));
@ -938,7 +938,7 @@ void ScanWidget::slotReceivedStderr( KProcess* /* process */, char* buffer, int
// slotReceivedStdout // slotReceivedStdout
// ================== // ==================
void ScanWidget::slotReceivedStdout( KProcess* /* process */, char* buffer, int buflen ) void ScanWidget::slotReceivedStdout( TDEProcess* /* process */, char* buffer, int buflen )
{ m_clearOutputButton->setEnabled( true ); { m_clearOutputButton->setEnabled( true );
m_outputWidget->addOutput( OutputWidget::Stdout, buffer, buflen ); m_outputWidget->addOutput( OutputWidget::Stdout, buffer, buflen );
emit( outputAvailable( true, true )); emit( outputAvailable( true, true ));
@ -957,8 +957,8 @@ void ScanWidget::slotStartClicked( )
if( m_piping && !createPipes( )) if( m_piping && !createPipes( ))
return; return;
QStringList nmapOptions = buildNmapOptionsList( ); TQStringList nmapOptions = buildNmapOptionsList( );
m_nmapProcess = new KProcess; m_nmapProcess = new TDEProcess;
if( !m_piping ) if( !m_piping )
*m_nmapProcess << nmapOptions; *m_nmapProcess << nmapOptions;
@ -974,9 +974,9 @@ void ScanWidget::slotStartClicked( )
*m_nmapProcess << nmapOptions.join( " " ); *m_nmapProcess << nmapOptions.join( " " );
} }
QValueList<QCString> args = m_nmapProcess->args( ); TQValueList<TQCString> args = m_nmapProcess->args( );
QString cmd; TQString cmd;
QValueList<QCString>::iterator it; TQValueList<TQCString>::iterator it;
for( it = args.begin( ); it != args.end( ); ++it ) for( it = args.begin( ); it != args.end( ); ++it )
cmd += *it + " "; cmd += *it + " ";
@ -986,19 +986,19 @@ void ScanWidget::slotStartClicked( )
m_outputWidget->addOutput( OutputWidget::Stdin, cmd, cmd.length( )); m_outputWidget->addOutput( OutputWidget::Stdin, cmd, cmd.length( ));
emit( outputAvailable( true, true )); emit( outputAvailable( true, true ));
connect( m_nmapProcess, SIGNAL( processExited( KProcess* )), SLOT( slotProcessExited( ))); connect( m_nmapProcess, SIGNAL( processExited( TDEProcess* )), SLOT( slotProcessExited( )));
if( !m_piping ) if( !m_piping )
{ connect( m_nmapProcess, { connect( m_nmapProcess,
SIGNAL( receivedStderr( KProcess*, char*, int )), SIGNAL( receivedStderr( TDEProcess*, char*, int )),
SLOT( slotReceivedStderr( KProcess*, char*, int ))); SLOT( slotReceivedStderr( TDEProcess*, char*, int )));
connect( m_nmapProcess, connect( m_nmapProcess,
SIGNAL( receivedStdout( KProcess*, char*, int )), SIGNAL( receivedStdout( TDEProcess*, char*, int )),
SLOT( slotReceivedStdout( KProcess*, char*, int ))); SLOT( slotReceivedStdout( TDEProcess*, char*, int )));
} }
m_nmapProcess->start( KProcess::NotifyOnExit, KProcess::AllOutput ); m_nmapProcess->start( TDEProcess::NotifyOnExit, TDEProcess::AllOutput );
m_state = running; m_state = running;
emit( scanStarted( )); emit( scanStarted( ));
@ -1023,7 +1023,7 @@ void ScanWidget::slotStopClicked( )
// slotTabChanged // slotTabChanged
// ============== // ==============
void ScanWidget::slotTabChanged( QWidget* /* toWidget */) void ScanWidget::slotTabChanged( TQWidget* /* toWidget */)
{ if( !m_ignoreTabChanges ) { if( !m_ignoreTabChanges )
slotOptionsDirty( ); slotOptionsDirty( );
} }
@ -1031,7 +1031,7 @@ void ScanWidget::slotTabChanged( QWidget* /* toWidget */)
// slotTabChanged // slotTabChanged
// ============== // ==============
void ScanWidget::slotTargetChanged( const QString& target ) void ScanWidget::slotTargetChanged( const TQString& target )
{ if( m_useTargetHost ) { if( m_useTargetHost )
emit( scanRename( target )); emit( scanRename( target ));
} }
@ -1057,5 +1057,5 @@ void ScanWidget::useTargetHost( const bool b )
// ======== // ========
void ScanWidget::wrapText( const bool wrap ) 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> # include <config.h>
#endif #endif
#include <qframe.h> #include <ntqframe.h>
#include "global.h" #include "global.h"
// forward class definitions // forward class definitions
@ -36,16 +36,16 @@
class CommonWidget; class CommonWidget;
class CompoundWidget; class CompoundWidget;
class HTMLWidget; class HTMLWidget;
class KConfig; class TDEConfig;
class KProcess; class TDEProcess;
class KTabWidget; class KTabWidget;
class LoggingOptions; class LoggingOptions;
class OutputWidget; class OutputWidget;
class PAndSOptions; class PAndSOptions;
class QFile; class TQFile;
class QLineEdit; class TQLineEdit;
class QPushButton; class TQPushButton;
class QStringList; class TQStringList;
class ScanMonitor; class ScanMonitor;
class SimpleOptions; class SimpleOptions;
class TimingWidget; class TimingWidget;
@ -53,13 +53,13 @@ class TimingWidget;
// ScanWidget class definition // ScanWidget class definition
// =========================== // ===========================
class ScanWidget : public QFrame class ScanWidget : public TQFrame
{ Q_OBJECT { Q_OBJECT
public: public:
ScanWidget( const QString& scanName, ScanWidget( const TQString& scanName,
const bool useTargetHost, const bool useTargetHost,
QWidget* parent = NULL, TQWidget* parent = NULL,
const char* name = NULL ); const char* name = NULL );
virtual ~ScanWidget( ); virtual ~ScanWidget( );
@ -77,15 +77,15 @@ class ScanWidget : public QFrame
void profileCopy( ); void profileCopy( );
void profileDelete( ); void profileDelete( );
void profileLoad( ); void profileLoad( );
QString profileName( ) const { return m_profileName; } TQString profileName( ) const { return m_profileName; }
void profileRename( ); void profileRename( );
void profileSave( ); void profileSave( );
void profileSaveAs( ); void profileSaveAs( );
void readSettings( ); void readSettings( );
void renameScan( const QString& newScanName ); void renameScan( const TQString& newScanName );
void saveSettings( ); void saveSettings( );
QString scanName( ) const { return m_scanName; } TQString scanName( ) const { return m_scanName; }
void setProfileName( const QString& profileName ); void setProfileName( const TQString& profileName );
State state( ) const { return m_state; } State state( ) const { return m_state; }
void state( const State s ) { m_state = s; } void state( const State s ) { m_state = s; }
void updateStatusBarText( ); void updateStatusBarText( );
@ -94,46 +94,46 @@ class ScanWidget : public QFrame
void wrapText( const bool wrap ); void wrapText( const bool wrap );
signals: signals:
void displayHelp( const QString& ); void displayHelp( const TQString& );
void errorLoadingLocalManPage( const QString& ); void errorLoadingLocalManPage( const TQString& );
void optionsDirty( ); void optionsDirty( );
void outputAvailable( const bool, const bool ); void outputAvailable( const bool, const bool );
void scanRename( const QString& ); void scanRename( const TQString& );
void scanStarted( ); void scanStarted( );
void scanStopped( ScanWidget* ); void scanStopped( ScanWidget* );
void setManPageActionStuff( const bool ); void setManPageActionStuff( const bool );
void statusBarText( const QString& ); void statusBarText( const TQString& );
private slots: private slots:
void slotClearOutput( ); void slotClearOutput( );
void slotDisplayDocBook( const QString& anchor ); void slotDisplayDocBook( const TQString& anchor );
void slotDisplayUnknown( ); void slotDisplayUnknown( );
void slotFinaliseInitialisation( ); void slotFinaliseInitialisation( );
void slotHideOptions( ); void slotHideOptions( );
void slotOptionsDirty( const bool dirty = true ); void slotOptionsDirty( const bool dirty = true );
void slotProcessExited( ); void slotProcessExited( );
void slotReceivedStderr( KProcess* process, char* buffer, int buflen ); void slotReceivedStderr( TDEProcess* process, char* buffer, int buflen );
void slotReceivedStdout( KProcess* process, char* buffer, int buflen ); void slotReceivedStdout( TDEProcess* process, char* buffer, int buflen );
void slotStartClicked( ); void slotStartClicked( );
void slotStopClicked( ); void slotStopClicked( );
void slotTabChanged( QWidget* toWidget ); void slotTabChanged( TQWidget* toWidget );
void slotTargetChanged( const QString& target ); void slotTargetChanged( const TQString& target );
private: private:
QStringList buildNmapOptionsList( ); TQStringList buildNmapOptionsList( );
void closePipe( QFile*& pipe, int& pipeFD ); void closePipe( TQFile*& pipe, int& pipeFD );
void createLayout( ); 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( ); bool createPipes( );
void customEvent( QCustomEvent* event ); void customEvent( TQCustomEvent* event );
bool getOptions( ); bool getOptions( );
void getPortRanges( QStringList* portRanges ); void getPortRanges( TQStringList* portRanges );
void initialiseManPage( ); void initialiseManPage( );
void profileRead( ); void profileRead( );
void saveProfileName( ); void saveProfileName( );
void setInitialValues( ); void setInitialValues( );
QPushButton* m_clearOutputButton; TQPushButton* m_clearOutputButton;
int m_commonIndex; int m_commonIndex;
CommonWidget* m_commonWidget; CommonWidget* m_commonWidget;
int m_compoundIndex; int m_compoundIndex;
@ -141,28 +141,28 @@ class ScanWidget : public QFrame
int m_currentTab; int m_currentTab;
bool m_dirty; bool m_dirty;
bool m_hideOptions; bool m_hideOptions;
QPushButton* m_hideOptionsButton; TQPushButton* m_hideOptionsButton;
int m_htmlIndex; int m_htmlIndex;
bool m_ignoreTabChanges; bool m_ignoreTabChanges;
int m_loggingIndex; int m_loggingIndex;
LoggingOptions* m_loggingWidget; LoggingOptions* m_loggingWidget;
KProcess* m_nmapProcess; TDEProcess* m_nmapProcess;
OutputWidget* m_outputWidget; OutputWidget* m_outputWidget;
int m_pAndSIndex; int m_pAndSIndex;
PAndSOptions* m_pAndSWidget; PAndSOptions* m_pAndSWidget;
QFile* m_pipeStderr; TQFile* m_pipeStderr;
QFile* m_pipeStdout; TQFile* m_pipeStdout;
int m_pipeStderrFD; int m_pipeStderrFD;
int m_pipeStdoutFD; int m_pipeStdoutFD;
bool m_piping; bool m_piping;
QString m_profileName; TQString m_profileName;
ScanMonitor* m_scanMonitor; ScanMonitor* m_scanMonitor;
QString m_scanName; TQString m_scanName;
int m_simpleIndex; int m_simpleIndex;
SimpleOptions* m_simpleWidget; SimpleOptions* m_simpleWidget;
QPushButton* m_startButton; TQPushButton* m_startButton;
State m_state; State m_state;
QPushButton* m_stopButton; TQPushButton* m_stopButton;
KTabWidget* m_tabWidget; KTabWidget* m_tabWidget;
int m_timingIndex; int m_timingIndex;
TimingWidget* m_timingWidget; TimingWidget* m_timingWidget;

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

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

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

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

@ -20,18 +20,18 @@
* * * *
***************************************************************************/ ***************************************************************************/
#include <qstring.h> #include <ntqstring.h>
#include <qwidget.h> #include <ntqwidget.h>
#include <kdebug.h> #include <kdebug.h>
#include <klocale.h> #include <tdelocale.h>
#include "tabwidgetdata.h" #include "tabwidgetdata.h"
// constructor // 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_index( index ),
m_title( title ), m_title( title ),
m_widget( widget ) m_widget( widget )

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

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

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

@ -20,20 +20,20 @@
* * * *
***************************************************************************/ ***************************************************************************/
#include <qbuttongroup.h> #include <ntqbuttongroup.h>
#include <qcheckbox.h> #include <ntqcheckbox.h>
#include <qiconset.h> #include <ntqiconset.h>
#include <qlabel.h> #include <ntqlabel.h>
#include <qlayout.h> #include <ntqlayout.h>
#include <qlineedit.h> #include <ntqlineedit.h>
#include <qpushbutton.h> #include <ntqpushbutton.h>
#include <qradiobutton.h> #include <ntqradiobutton.h>
#include <kconfig.h> #include <tdeconfig.h>
#include <kdebug.h> #include <kdebug.h>
#include <kglobal.h> #include <tdeglobal.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <klocale.h> #include <tdelocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include "timingwidget.h" #include "timingwidget.h"
@ -42,8 +42,8 @@
// constructor // constructor
// =========== // ===========
TimingWidget::TimingWidget( QWidget* parent, const char* name ) TimingWidget::TimingWidget( TQWidget* parent, const char* name )
: QWidget( parent, name ) : TQWidget( parent, name )
{ createLayout( ); { createLayout( );
} }
@ -51,55 +51,55 @@ TimingWidget::TimingWidget( QWidget* parent, const char* name )
// ============ // ============
void TimingWidget::createLayout( ) void TimingWidget::createLayout( )
{ QGridLayout* gridLayout = new QGridLayout( this ); { TQGridLayout* gridLayout = new TQGridLayout( this );
KIconLoader* iconLoader = KGlobal::iconLoader( ); TDEIconLoader* iconLoader = TDEGlobal::iconLoader( );
QIconSet clearLeftIconSet = iconLoader->loadIconSet( "clear_left", KIcon::Small ); TQIconSet clearLeftIconSet = iconLoader->loadIconSet( "clear_left", TDEIcon::Small );
byte row = 1; byte row = 1;
QButtonGroup* timingGroupBox = new QButtonGroup( 7, Qt::Vertical, "Simple Timing", this, "timing group box" ); TQButtonGroup* timingGroupBox = new TQButtonGroup( 7, TQt::Vertical, "Simple Timing", this, "timing group box" );
m_defaultRadio = new QRadioButton( i18n( "Default" ), timingGroupBox, "default radio button" ); m_defaultRadio = new TQRadioButton( i18n( "Default" ), timingGroupBox, "default radio button" );
m_aggressiveRadio = new QRadioButton( i18n( "Aggressive (-T4)" ), timingGroupBox, "aggressive radio button" ); m_aggressiveRadio = new TQRadioButton( i18n( "Aggressive (-T4)" ), timingGroupBox, "aggressive radio button" );
m_insaneRadio = new QRadioButton( i18n( "Insane (-T5)" ), timingGroupBox, "insane radio button" ); m_insaneRadio = new TQRadioButton( i18n( "Insane (-T5)" ), timingGroupBox, "insane radio button" );
m_normalRadio = new QRadioButton( i18n( "Normal (-T3)" ), timingGroupBox, "normal radio button" ); m_normalRadio = new TQRadioButton( i18n( "Normal (-T3)" ), timingGroupBox, "normal radio button" );
m_paranoidRadio = new QRadioButton( i18n( "Paranoid (-T0)" ), timingGroupBox, "paranoid radio button" ); m_paranoidRadio = new TQRadioButton( i18n( "Paranoid (-T0)" ), timingGroupBox, "paranoid radio button" );
m_politeRadio = new QRadioButton( i18n( "Polite (-T2)" ), timingGroupBox, "polite radio button" ); m_politeRadio = new TQRadioButton( i18n( "Polite (-T2)" ), timingGroupBox, "polite radio button" );
m_sneakyRadio = new QRadioButton( i18n( "Sneaky (-T1)" ), timingGroupBox, "sneaky radio button" ); m_sneakyRadio = new TQRadioButton( i18n( "Sneaky (-T1)" ), timingGroupBox, "sneaky radio button" );
gridLayout->addMultiCellWidget( timingGroupBox, row, row + 7, 1, 1 ); gridLayout->addMultiCellWidget( timingGroupBox, row, row + 7, 1, 1 );
row += 7; row += 7;
byte rowBlock1 = row; byte rowBlock1 = row;
m_hostTimeoutButton = new QPushButton( clearLeftIconSet, NULL, this, "host timeout button" ); m_hostTimeoutButton = new TQPushButton( clearLeftIconSet, NULL, this, "host timeout button" );
m_initialRTTTimeoutButton = new QPushButton( clearLeftIconSet, NULL, this, "initial rtt timeout button" ); m_initialRTTTimeoutButton = new TQPushButton( clearLeftIconSet, NULL, this, "initial rtt timeout button" );
m_maxHostGroupButton = new QPushButton( clearLeftIconSet, NULL, this, "max host group button" ); m_maxHostGroupButton = new TQPushButton( clearLeftIconSet, NULL, this, "max host group button" );
m_maxParallelismButton = new QPushButton( clearLeftIconSet, NULL, this, "max parallelism button" ); m_maxParallelismButton = new TQPushButton( clearLeftIconSet, NULL, this, "max parallelism button" );
m_maxRTTTimeoutButton = new QPushButton( clearLeftIconSet, NULL, this, "max rtt timeout button" ); m_maxRTTTimeoutButton = new TQPushButton( clearLeftIconSet, NULL, this, "max rtt timeout button" );
m_maxScanDelayButton = new QPushButton( clearLeftIconSet, NULL, this, "max scan delay button" ); m_maxScanDelayButton = new TQPushButton( clearLeftIconSet, NULL, this, "max scan delay button" );
m_minHostGroupButton = new QPushButton( clearLeftIconSet, NULL, this, "min host group button" ); m_minHostGroupButton = new TQPushButton( clearLeftIconSet, NULL, this, "min host group button" );
m_minParallelismButton = new QPushButton( clearLeftIconSet, NULL, this, "min parallelism button" ); m_minParallelismButton = new TQPushButton( clearLeftIconSet, NULL, this, "min parallelism button" );
m_minRTTTimeoutButton = new QPushButton( clearLeftIconSet, NULL, this, "min rtt timeout button" ); m_minRTTTimeoutButton = new TQPushButton( clearLeftIconSet, NULL, this, "min rtt timeout button" );
m_scanDelayButton = new QPushButton( clearLeftIconSet, NULL, this, "min scan delay button" ); m_scanDelayButton = new TQPushButton( clearLeftIconSet, NULL, this, "min scan delay button" );
m_hostTimeoutCheckBox = new QCheckBox( i18n( "Host timeout (--host_timeout)" ), this, "host timeout checkbox" ); m_hostTimeoutCheckBox = new TQCheckBox( 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_initialRTTTimeoutCheckBox = new TQCheckBox( 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_maxHostGroupCheckBox = new TQCheckBox( 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_maxParallelismCheckBox = new TQCheckBox( 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_maxRTTTimeoutCheckBox = new TQCheckBox( 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_maxScanDelayCheckBox = new TQCheckBox( 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_minHostGroupCheckBox = new TQCheckBox( 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_minParallelismCheckBox = new TQCheckBox( 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_minRTTTimeoutCheckBox = new TQCheckBox( 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_scanDelayCheckBox = new TQCheckBox( i18n( "Min Scan delay (--scan_delay)" ), this, "min scan delay checkbox" );
m_hostTimeoutLineEdit = new QLineEdit( this, "host timeout line edit" ); m_hostTimeoutLineEdit = new TQLineEdit( this, "host timeout line edit" );
m_initialRTTTimeoutLineEdit = new QLineEdit( this, "initial rtt timeout line edit" ); m_initialRTTTimeoutLineEdit = new TQLineEdit( this, "initial rtt timeout line edit" );
m_maxHostGroupLineEdit = new QLineEdit( this, "max host group line edit" ); m_maxHostGroupLineEdit = new TQLineEdit( this, "max host group line edit" );
m_maxParallelismLineEdit = new QLineEdit( this, "max parallelism line edit" ); m_maxParallelismLineEdit = new TQLineEdit( this, "max parallelism line edit" );
m_maxRTTTimeoutLineEdit = new QLineEdit( this, "max rtt timeout line edit" ); m_maxRTTTimeoutLineEdit = new TQLineEdit( this, "max rtt timeout line edit" );
m_maxScanDelayLineEdit = new QLineEdit( this, "max scan delay line edit" ); m_maxScanDelayLineEdit = new TQLineEdit( this, "max scan delay line edit" );
m_minHostGroupLineEdit = new QLineEdit( this, "min host group line edit" ); m_minHostGroupLineEdit = new TQLineEdit( this, "min host group line edit" );
m_minParallelismLineEdit = new QLineEdit( this, "min parallelism line edit" ); m_minParallelismLineEdit = new TQLineEdit( this, "min parallelism line edit" );
m_minRTTTimeoutLineEdit = new QLineEdit( this, "min rtt timeout line edit" ); m_minRTTTimeoutLineEdit = new TQLineEdit( this, "min rtt timeout line edit" );
m_scanDelayLineEdit = new QLineEdit( this, "min scan delay line edit" ); m_scanDelayLineEdit = new TQLineEdit( this, "min scan delay line edit" );
m_hostTimeoutLineEdit->setInputMask( "999999" ); m_hostTimeoutLineEdit->setInputMask( "999999" );
m_initialRTTTimeoutLineEdit->setInputMask( "999999" ); m_initialRTTTimeoutLineEdit->setInputMask( "999999" );
@ -205,29 +205,29 @@ void TimingWidget::finaliseInitialisation( )
connect( m_aggressiveRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); connect( m_aggressiveRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_defaultRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); connect( m_defaultRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_hostTimeoutCheckBox, 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_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_insaneRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_maxHostGroupCheckBox, 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_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_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_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_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_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_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_normalRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_paranoidRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); connect( m_paranoidRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_politeRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( ))); connect( m_politeRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
connect( m_scanDelayCheckBox, 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( ))); connect( m_sneakyRadio, SIGNAL( clicked( )), SIGNAL( optionsDirty( )));
} }
@ -253,22 +253,22 @@ bool TimingWidget::getOptions( )
uint scanDelayValue = m_scanDelayLineEdit->text( ).toUInt( ); uint scanDelayValue = m_scanDelayLineEdit->text( ).toUInt( );
if( minHostGroupValue > maxHostGroupValue ) 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; return false;
} }
if( minParallelismValue > maxParallelismValue ) 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; return false;
} }
if( minRTTTimeoutValue > maxRTTTimeoutValue ) 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; return false;
} }
if( scanDelayValue > maxScanDelayValue ) 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; return false;
} }
@ -299,7 +299,7 @@ bool TimingWidget::getOptions( )
// readProfile // readProfile
// =========== // ===========
void TimingWidget::readProfile( KConfig* config ) void TimingWidget::readProfile( TDEConfig* config )
{ m_hostTimeoutState = config->readBoolEntry( "hostTimeoutState" ); { m_hostTimeoutState = config->readBoolEntry( "hostTimeoutState" );
m_hostTimeoutValue = config->readNumEntry( "hostTimeoutValue" ); m_hostTimeoutValue = config->readNumEntry( "hostTimeoutValue" );
m_initialRTTTimeoutState = config->readBoolEntry( "initialRTTTimeoutState" ); m_initialRTTTimeoutState = config->readBoolEntry( "initialRTTTimeoutState" );
@ -327,7 +327,7 @@ void TimingWidget::readProfile( KConfig* config )
// saveProfile // saveProfile
// =========== // ===========
void TimingWidget::saveProfile( KConfig* config ) void TimingWidget::saveProfile( TDEConfig* config )
{ config->writeEntry( "hostTimeoutState", m_hostTimeoutState ); { config->writeEntry( "hostTimeoutState", m_hostTimeoutState );
config->writeEntry( "hostTimeoutValue", m_hostTimeoutValue ); config->writeEntry( "hostTimeoutValue", m_hostTimeoutValue );
config->writeEntry( "initialRTTTimeoutState", m_initialRTTTimeoutState ); config->writeEntry( "initialRTTTimeoutState", m_initialRTTTimeoutState );
@ -357,34 +357,34 @@ void TimingWidget::saveProfile( KConfig* config )
void TimingWidget::setInitialValues( ) void TimingWidget::setInitialValues( )
{ m_hostTimeoutCheckBox->setChecked( m_hostTimeoutState ); { m_hostTimeoutCheckBox->setChecked( m_hostTimeoutState );
m_hostTimeoutLineEdit->setEnabled( 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_initialRTTTimeoutCheckBox->setChecked( m_initialRTTTimeoutState );
m_initialRTTTimeoutLineEdit->setEnabled( 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_maxHostGroupCheckBox->setChecked( m_maxHostGroupState );
m_maxHostGroupLineEdit->setEnabled( 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_maxParallelismCheckBox->setChecked( m_maxParallelismState );
m_maxParallelismLineEdit->setEnabled( 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_maxRTTTimeoutCheckBox->setChecked( m_maxRTTTimeoutState );
m_maxRTTTimeoutLineEdit->setEnabled( 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_maxScanDelayCheckBox->setChecked( m_maxScanDelayState );
m_maxScanDelayLineEdit->setEnabled( 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_minHostGroupCheckBox->setChecked( m_minHostGroupState );
m_minHostGroupLineEdit->setEnabled( 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_minParallelismCheckBox->setChecked( m_minParallelismState );
m_minParallelismLineEdit->setEnabled( 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_minRTTTimeoutCheckBox->setChecked( m_minRTTTimeoutState );
m_minRTTTimeoutLineEdit->setEnabled( 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_scanDelayCheckBox->setChecked( m_scanDelayState );
m_scanDelayLineEdit->setEnabled( m_scanDelayState ); m_scanDelayLineEdit->setEnabled( m_scanDelayState );
m_scanDelayLineEdit->setText( QString::number( m_scanDelayValue )); m_scanDelayLineEdit->setText( TQString::number( m_scanDelayValue ));
switch( m_simpleTimingValue ) switch( m_simpleTimingValue )
{ case Aggressive_T4_Timing: m_aggressiveRadio->setChecked( true ); break; { case Aggressive_T4_Timing: m_aggressiveRadio->setChecked( true ); break;
@ -404,7 +404,7 @@ void TimingWidget::setInitialValues( )
// simpleTiming // simpleTiming
// ============ // ============
QString TimingWidget::simpleTiming( ) const TQString TimingWidget::simpleTiming( ) const
{ switch( m_simpleTimingValue ) { switch( m_simpleTimingValue )
{ case Aggressive_T4_Timing: return "Aggressive"; { case Aggressive_T4_Timing: return "Aggressive";
case Default_Timing: return ""; case Default_Timing: return "";
@ -417,7 +417,7 @@ QString TimingWidget::simpleTiming( ) const
kdDebug( ) << "internal error - unknown simple timing value " << m_simpleTimingValue << endl; kdDebug( ) << "internal error - unknown simple timing value " << m_simpleTimingValue << endl;
ASSERT( false ); ASSERT( false );
return QString::null; return TQString::null;
} }
// slotAggressiveRadioClicked // slotAggressiveRadioClicked

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

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

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

Loading…
Cancel
Save