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