summaryrefslogtreecommitdiffstats
path: root/ksim/monitors/snmp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:52:55 +0000
commit5f5ee2367157176ed223b86343eb0a9e4022e020 (patch)
tree6a9c87f14ee38e90eff3c77c784f14e4f38fd5a1 /ksim/monitors/snmp
parent4facf42feec57b22dcf46badc115ad6c5b5cc512 (diff)
downloadtdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.tar.gz
tdeutils-5f5ee2367157176ed223b86343eb0a9e4022e020.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1157653 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksim/monitors/snmp')
-rw-r--r--ksim/monitors/snmp/browsedialog.cpp34
-rw-r--r--ksim/monitors/snmp/browsedialog.h12
-rw-r--r--ksim/monitors/snmp/chartmonitor.cpp4
-rw-r--r--ksim/monitors/snmp/chartmonitor.h2
-rw-r--r--ksim/monitors/snmp/configpage.cpp78
-rw-r--r--ksim/monitors/snmp/configpage.h24
-rw-r--r--ksim/monitors/snmp/hostconfig.cpp12
-rw-r--r--ksim/monitors/snmp/hostconfig.h22
-rw-r--r--ksim/monitors/snmp/hostdialog.cpp18
-rw-r--r--ksim/monitors/snmp/hostdialog.h8
-rw-r--r--ksim/monitors/snmp/identifier.cpp10
-rw-r--r--ksim/monitors/snmp/identifier.h14
-rw-r--r--ksim/monitors/snmp/labelmonitor.cpp6
-rw-r--r--ksim/monitors/snmp/labelmonitor.h2
-rw-r--r--ksim/monitors/snmp/monitor.cpp26
-rw-r--r--ksim/monitors/snmp/monitor.h10
-rw-r--r--ksim/monitors/snmp/monitorconfig.cpp34
-rw-r--r--ksim/monitors/snmp/monitorconfig.h26
-rw-r--r--ksim/monitors/snmp/monitordialog.cpp24
-rw-r--r--ksim/monitors/snmp/monitordialog.h4
-rw-r--r--ksim/monitors/snmp/probedialog.cpp20
-rw-r--r--ksim/monitors/snmp/probedialog.h8
-rw-r--r--ksim/monitors/snmp/proberesultdialog.cpp8
-rw-r--r--ksim/monitors/snmp/proberesultdialog.h2
-rw-r--r--ksim/monitors/snmp/session.cpp12
-rw-r--r--ksim/monitors/snmp/session.h2
-rw-r--r--ksim/monitors/snmp/snmp.cpp50
-rw-r--r--ksim/monitors/snmp/snmp.h30
-rw-r--r--ksim/monitors/snmp/snmplib.cpp4
-rw-r--r--ksim/monitors/snmp/snmplib.h12
-rw-r--r--ksim/monitors/snmp/value.cpp72
-rw-r--r--ksim/monitors/snmp/value.h14
-rw-r--r--ksim/monitors/snmp/value_p.h6
-rw-r--r--ksim/monitors/snmp/view.cpp10
-rw-r--r--ksim/monitors/snmp/view.h4
-rw-r--r--ksim/monitors/snmp/walker.cpp18
-rw-r--r--ksim/monitors/snmp/walker.h26
37 files changed, 334 insertions, 334 deletions
diff --git a/ksim/monitors/snmp/browsedialog.cpp b/ksim/monitors/snmp/browsedialog.cpp
index d196ec8..3085eca 100644
--- a/ksim/monitors/snmp/browsedialog.cpp
+++ b/ksim/monitors/snmp/browsedialog.cpp
@@ -19,7 +19,7 @@
#include "browsedialog.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <kguiitem.h>
@@ -29,7 +29,7 @@
using namespace KSim::Snmp;
-BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const QString &currentOid, QWidget *parent, const char *name )
+BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const TQString &currentOid, TQWidget *parent, const char *name )
: BrowseDialogBase( parent, name ), m_host( hostConfig )
{
stop->setGuiItem( KGuiItem( i18n( "&Stop" ), "stop" ) );
@@ -44,7 +44,7 @@ BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const QString &current
nextWalk();
}
-QString BrowseDialog::selectedObjectIdentifier() const
+TQString BrowseDialog::selectedObjectIdentifier() const
{
return selectedObject->text();
}
@@ -66,13 +66,13 @@ void BrowseDialog::insertBrowseItem( const Walker::Result &result )
return;
}
- QListViewItem *i = new QListViewItem( browserContents, browserContents->lastItem(), result.identifierString, result.dataString );
+ TQListViewItem *i = new TQListViewItem( browserContents, browserContents->lastItem(), result.identifierString, result.dataString );
applyFilter( i );
}
void BrowseDialog::applyFilter()
{
- for ( QListViewItem *i = browserContents->firstChild();
+ for ( TQListViewItem *i = browserContents->firstChild();
i; i = i->nextSibling() )
applyFilter( i );
}
@@ -84,7 +84,7 @@ void BrowseDialog::nextWalk()
if ( baseOids.isEmpty() )
return;
- QString baseOidString = baseOids.pop();
+ TQString baseOidString = baseOids.pop();
Identifier id = Identifier::fromString( baseOidString );
if ( id.isNull() )
return;
@@ -96,10 +96,10 @@ void BrowseDialog::startWalk( const Identifier &startOid )
stopWalker();
m_walker = new Walker( m_host, startOid, this );
- connect( m_walker, SIGNAL( resultReady( const Walker::Result & ) ),
- this, SLOT( insertBrowseItem( const Walker::Result & ) ) );
- connect( m_walker, SIGNAL( finished() ),
- this, SLOT( nextWalk() ) );
+ connect( m_walker, TQT_SIGNAL( resultReady( const Walker::Result & ) ),
+ this, TQT_SLOT( insertBrowseItem( const Walker::Result & ) ) );
+ connect( m_walker, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT( nextWalk() ) );
stop->setEnabled( true );
}
@@ -109,10 +109,10 @@ void BrowseDialog::stopWalker()
if ( !m_walker )
return;
- disconnect( m_walker, SIGNAL( resultReady( const Walker::Result & ) ),
- this, SLOT( insertBrowseItem( const Walker::Result & ) ) );
- disconnect( m_walker, SIGNAL( finished() ),
- this, SLOT( nextWalk() ) );
+ disconnect( m_walker, TQT_SIGNAL( resultReady( const Walker::Result & ) ),
+ this, TQT_SLOT( insertBrowseItem( const Walker::Result & ) ) );
+ disconnect( m_walker, TQT_SIGNAL( finished() ),
+ this, TQT_SLOT( nextWalk() ) );
m_walker->deleteLater();
m_walker = 0;
@@ -120,14 +120,14 @@ void BrowseDialog::stopWalker()
stop->setEnabled( false );
}
-void BrowseDialog::objectSelected( QListViewItem *item )
+void BrowseDialog::objectSelected( TQListViewItem *item )
{
selectedObject->setText( item->text( 0 ) );
}
-void BrowseDialog::applyFilter( QListViewItem *item )
+void BrowseDialog::applyFilter( TQListViewItem *item )
{
- QString filterText = filter->text();
+ TQString filterText = filter->text();
if ( filterText.isEmpty() ) {
item->setVisible( true );
diff --git a/ksim/monitors/snmp/browsedialog.h b/ksim/monitors/snmp/browsedialog.h
index cb6466a..a694881 100644
--- a/ksim/monitors/snmp/browsedialog.h
+++ b/ksim/monitors/snmp/browsedialog.h
@@ -28,7 +28,7 @@
#include "snmp.h"
#include "walker.h"
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
namespace KSim
{
@@ -40,27 +40,27 @@ class BrowseDialog : public BrowseDialogBase
{
Q_OBJECT
public:
- BrowseDialog( const HostConfig &hostConfig, const QString &currentOid, QWidget *parent, const char *name = 0 );
+ BrowseDialog( const HostConfig &hostConfig, const TQString &currentOid, TQWidget *parent, const char *name = 0 );
- QString selectedObjectIdentifier() const;
+ TQString selectedObjectIdentifier() const;
protected:
virtual void stopAllWalks();
virtual void applyFilter();
- virtual void objectSelected( QListViewItem *item );
+ virtual void objectSelected( TQListViewItem *item );
private slots:
void insertBrowseItem( const Walker::Result &browseResult );
void nextWalk();
private:
- void applyFilter( QListViewItem *item );
+ void applyFilter( TQListViewItem *item );
void startWalk( const Identifier &startOid );
void stopWalker();
HostConfig m_host;
Walker *m_walker;
- QValueStack<QString> baseOids;
+ TQValueStack<TQString> baseOids;
};
}
diff --git a/ksim/monitors/snmp/chartmonitor.cpp b/ksim/monitors/snmp/chartmonitor.cpp
index 1a32086..a5cfc6e 100644
--- a/ksim/monitors/snmp/chartmonitor.cpp
+++ b/ksim/monitors/snmp/chartmonitor.cpp
@@ -22,8 +22,8 @@
using namespace KSim::Snmp;
-ChartMonitor::ChartMonitor( const MonitorConfig &config, QWidget *parent, const char *name )
- : KSim::Chart( true /* displayMeter */, 0, QString::null, parent, name ),
+ChartMonitor::ChartMonitor( const MonitorConfig &config, TQWidget *parent, const char *name )
+ : KSim::Chart( true /* displayMeter */, 0, TQString::null, parent, name ),
m_lastValue( 0 ), m_config( config ), m_firstSampleReceived( false )
{
setTitle( m_config.name );
diff --git a/ksim/monitors/snmp/chartmonitor.h b/ksim/monitors/snmp/chartmonitor.h
index 30a58ad..3b064f8 100644
--- a/ksim/monitors/snmp/chartmonitor.h
+++ b/ksim/monitors/snmp/chartmonitor.h
@@ -32,7 +32,7 @@ class ChartMonitor : public KSim::Chart
{
Q_OBJECT
public:
- ChartMonitor( const MonitorConfig &config, QWidget *parent, const char *name = 0 );
+ ChartMonitor( const MonitorConfig &config, TQWidget *parent, const char *name = 0 );
public slots:
void setData( const Value &data );
diff --git a/ksim/monitors/snmp/configpage.cpp b/ksim/monitors/snmp/configpage.cpp
index d15d606..ee50054 100644
--- a/ksim/monitors/snmp/configpage.cpp
+++ b/ksim/monitors/snmp/configpage.cpp
@@ -24,9 +24,9 @@
#include "hostdialog.h"
#include "monitordialog.h"
-#include <qlayout.h>
-#include <qgroupbox.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqgroupbox.h>
+#include <tqpushbutton.h>
#include <kconfig.h>
#include <klistview.h>
@@ -35,9 +35,9 @@
using namespace KSim::Snmp;
-static bool listViewHasSelection( QListView *lv )
+static bool listViewHasSelection( TQListView *lv )
{
- for ( QListViewItem *i = lv->firstChild(); i; i = i->itemBelow() )
+ for ( TQListViewItem *i = lv->firstChild(); i; i = i->itemBelow() )
if ( i->isSelected() )
return true;
return false;
@@ -46,28 +46,28 @@ static bool listViewHasSelection( QListView *lv )
ConfigPage::ConfigPage( Plugin *parent, const char *name )
: KSim::PluginPage( parent, name )
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
m_page = new ConfigWidget( this );
- connect( m_page->addHost, SIGNAL( clicked() ),
- this, SLOT( addNewHost() ) );
- connect( m_page->modifyHost, SIGNAL( clicked() ),
- this, SLOT( modifyHost() ) );
- connect( m_page->removeHost, SIGNAL( clicked() ),
- this, SLOT( removeHost() ) );
-
- connect( m_page->addMonitor, SIGNAL( clicked() ),
- this, SLOT( addNewMonitor() ) );
- connect( m_page->modifyMonitor, SIGNAL( clicked() ),
- this, SLOT( modifyMonitor() ) );
- connect( m_page->removeMonitor, SIGNAL( clicked() ),
- this, SLOT( removeMonitor() ) );
-
- connect( m_page->hosts, SIGNAL( selectionChanged() ),
- this, SLOT( disableOrEnableSomeWidgets() ) );
- connect( m_page->monitors, SIGNAL( selectionChanged() ),
- this, SLOT( disableOrEnableSomeWidgets() ) );
+ connect( m_page->addHost, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addNewHost() ) );
+ connect( m_page->modifyHost, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( modifyHost() ) );
+ connect( m_page->removeHost, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( removeHost() ) );
+
+ connect( m_page->addMonitor, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( addNewMonitor() ) );
+ connect( m_page->modifyMonitor, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( modifyMonitor() ) );
+ connect( m_page->removeMonitor, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( removeMonitor() ) );
+
+ connect( m_page->hosts, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( disableOrEnableSomeWidgets() ) );
+ connect( m_page->monitors, TQT_SIGNAL( selectionChanged() ),
+ this, TQT_SLOT( disableOrEnableSomeWidgets() ) );
}
ConfigPage::~ConfigPage()
@@ -82,8 +82,8 @@ void ConfigPage::saveConfig()
removeAllHostGroups();
removeAllMonitorGroups();
- QStringList hosts = m_hosts.save( cfg );
- QStringList monitors = m_monitors.save( cfg );
+ TQStringList hosts = m_hosts.save( cfg );
+ TQStringList monitors = m_monitors.save( cfg );
cfg.setGroup( "General" );
cfg.writeEntry( "Hosts", hosts );
@@ -95,8 +95,8 @@ void ConfigPage::readConfig()
KConfig &cfg = *config();
cfg.setGroup( "General" );
- QStringList hosts = cfg.readListEntry( "Hosts" );
- QStringList monitors = cfg.readListEntry( "Monitors" );
+ TQStringList hosts = cfg.readListEntry( "Hosts" );
+ TQStringList monitors = cfg.readListEntry( "Monitors" );
m_hosts.load( cfg, hosts );
m_monitors.load( cfg, monitors, m_hosts );
@@ -151,7 +151,7 @@ void ConfigPage::removeHost()
if ( hostIt == m_hosts.end() )
return;
- QStringList monitors = monitorsForHost( *hostIt );
+ TQStringList monitors = monitorsForHost( *hostIt );
if ( !monitors.isEmpty() ) {
int answer = KMessageBox::warningContinueCancelList(
this,
@@ -237,17 +237,17 @@ void ConfigPage::disableOrEnableSomeWidgets()
m_page->monitorGroup->setEnabled( !m_hosts.isEmpty() );
}
-void ConfigPage::removeMonitors( QStringList monitors )
+void ConfigPage::removeMonitors( TQStringList monitors )
{
- for ( QStringList::ConstIterator it = monitors.begin();
+ for ( TQStringList::ConstIterator it = monitors.begin();
it != monitors.end(); ++it )
m_monitors.remove( *it );
- QListViewItem *item = m_page->monitors->firstChild();
+ TQListViewItem *item = m_page->monitors->firstChild();
while ( item ) {
- QListViewItem *nextItem = item->itemBelow();
+ TQListViewItem *nextItem = item->itemBelow();
- for ( QStringList::Iterator it = monitors.begin();
+ for ( TQStringList::Iterator it = monitors.begin();
it != monitors.end(); ++it )
if ( item->text( 0 ) == *it ) {
@@ -272,12 +272,12 @@ void ConfigPage::removeAllMonitorGroups()
removeConfigGroups( "Monitor " );
}
-void ConfigPage::removeConfigGroups( const QString &prefix )
+void ConfigPage::removeConfigGroups( const TQString &prefix )
{
KConfig &cfg = *config();
- QStringList groups = cfg.groupList();
- for ( QStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it )
+ TQStringList groups = cfg.groupList();
+ for ( TQStringList::ConstIterator it = groups.begin(); it != groups.end(); ++it )
if ( ( *it ).startsWith( prefix ) )
cfg.deleteGroup( *it, true /* deep */ );
}
@@ -296,9 +296,9 @@ void ConfigPage::fillGui()
disableOrEnableSomeWidgets();
}
-QStringList ConfigPage::monitorsForHost( const HostConfig &host ) const
+TQStringList ConfigPage::monitorsForHost( const HostConfig &host ) const
{
- QStringList monitors;
+ TQStringList monitors;
for ( MonitorConfigMap::ConstIterator it = m_monitors.begin();
it != m_monitors.end(); ++it )
diff --git a/ksim/monitors/snmp/configpage.h b/ksim/monitors/snmp/configpage.h
index 42c7579..66c941c 100644
--- a/ksim/monitors/snmp/configpage.h
+++ b/ksim/monitors/snmp/configpage.h
@@ -35,20 +35,20 @@ namespace Snmp
class HostItem : public QListViewItem
{
public:
- HostItem( QListView *parent, const KSim::Snmp::HostConfig &src )
- : QListViewItem( parent, QString::null, QString::null, QString::null )
+ HostItem( TQListView *parent, const KSim::Snmp::HostConfig &src )
+ : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
{
setFromHostConfig( src );
}
- HostItem( QListView *parent )
- : QListViewItem( parent, QString::null, QString::null, QString::null )
+ HostItem( TQListView *parent )
+ : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
{}
void setFromHostConfig( const KSim::Snmp::HostConfig &src )
{
setText( 0, src.name );
- setText( 1, QString::number( src.port ) );
+ setText( 1, TQString::number( src.port ) );
setText( 2, snmpVersionToString( src.version ) );
}
};
@@ -56,14 +56,14 @@ public:
class MonitorItem : public QListViewItem
{
public:
- MonitorItem( QListView *parent, const KSim::Snmp::MonitorConfig &monitor )
- : QListViewItem( parent, QString::null, QString::null, QString::null )
+ MonitorItem( TQListView *parent, const KSim::Snmp::MonitorConfig &monitor )
+ : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
{
setFromMonitor( monitor );
}
- MonitorItem( QListView *parent )
- : QListViewItem( parent, QString::null, QString::null, QString::null )
+ MonitorItem( TQListView *parent )
+ : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
{}
void setFromMonitor( const KSim::Snmp::MonitorConfig &monitor )
@@ -97,14 +97,14 @@ private slots:
void disableOrEnableSomeWidgets();
private:
- void removeMonitors( QStringList monitors );
+ void removeMonitors( TQStringList monitors );
void removeAllHostGroups();
void removeAllMonitorGroups();
- void removeConfigGroups( const QString &prefix );
+ void removeConfigGroups( const TQString &prefix );
void fillGui();
- QStringList monitorsForHost( const HostConfig &host ) const;
+ TQStringList monitorsForHost( const HostConfig &host ) const;
ConfigWidget *m_page;
KSim::Snmp::HostConfigMap m_hosts;
diff --git a/ksim/monitors/snmp/hostconfig.cpp b/ksim/monitors/snmp/hostconfig.cpp
index 1b96541..1188c12 100644
--- a/ksim/monitors/snmp/hostconfig.cpp
+++ b/ksim/monitors/snmp/hostconfig.cpp
@@ -109,7 +109,7 @@ void HostConfig::save( KConfigBase &config ) const
writeIfNotEmpty( config, "PrivPassphrase", KStringHandler::obscure( privacy.key ) );
}
-void HostConfig::writeIfNotEmpty( KConfigBase &config, const QString &name, const QString &value )
+void HostConfig::writeIfNotEmpty( KConfigBase &config, const TQString &name, const TQString &value )
{
if ( value.isEmpty() )
return;
@@ -117,11 +117,11 @@ void HostConfig::writeIfNotEmpty( KConfigBase &config, const QString &name, cons
config.writeEntry( name, value );
}
-void HostConfigMap::load( KConfigBase &config, const QStringList &hosts )
+void HostConfigMap::load( KConfigBase &config, const TQStringList &hosts )
{
clear();
- for ( QStringList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = hosts.begin(); it != hosts.end(); ++it ) {
config.setGroup( "Host " + *it );
HostConfig src;
@@ -132,12 +132,12 @@ void HostConfigMap::load( KConfigBase &config, const QStringList &hosts )
}
}
-QStringList HostConfigMap::save( KConfigBase &config ) const
+TQStringList HostConfigMap::save( KConfigBase &config ) const
{
- QStringList hostList;
+ TQStringList hostList;
for ( ConstIterator it = begin(); it != end(); ++it ) {
- QString host = it.key();
+ TQString host = it.key();
hostList << host;
diff --git a/ksim/monitors/snmp/hostconfig.h b/ksim/monitors/snmp/hostconfig.h
index d19de9b..af8a0fd 100644
--- a/ksim/monitors/snmp/hostconfig.h
+++ b/ksim/monitors/snmp/hostconfig.h
@@ -34,26 +34,26 @@ struct HostConfig
HostConfig( KConfigBase &config )
{ load( config ); }
- QString name; // hostname
+ TQString name; // hostname
ushort port;
SnmpVersion version;
- QString community;
+ TQString community;
- QString securityName;
+ TQString securityName;
SecurityLevel securityLevel;
struct
{
AuthenticationProtocol protocol;
- QString key;
+ TQString key;
} authentication;
struct
{
PrivacyProtocol protocol;
- QString key;
+ TQString key;
} privacy;
bool load( KConfigBase &config );
@@ -65,17 +65,17 @@ struct HostConfig
{ return name == rhs.name; }
private:
- static void writeIfNotEmpty( KConfigBase &config, const QString &name, const QString &value );
+ static void writeIfNotEmpty( KConfigBase &config, const TQString &name, const TQString &value );
};
-struct HostConfigMap : public QMap< QString, HostConfig >
+struct HostConfigMap : public TQMap< TQString, HostConfig >
{
HostConfigMap() {}
- HostConfigMap( const QMap< QString, HostConfig > &rhs )
- : QMap< QString, HostConfig >( rhs ) {}
+ HostConfigMap( const TQMap< TQString, HostConfig > &rhs )
+ : TQMap< TQString, HostConfig >( rhs ) {}
- void load( KConfigBase &config, const QStringList &hosts );
- QStringList save( KConfigBase &config ) const;
+ void load( KConfigBase &config, const TQStringList &hosts );
+ TQStringList save( KConfigBase &config ) const;
};
}
diff --git a/ksim/monitors/snmp/hostdialog.cpp b/ksim/monitors/snmp/hostdialog.cpp
index a1ccdc3..7d66a75 100644
--- a/ksim/monitors/snmp/hostdialog.cpp
+++ b/ksim/monitors/snmp/hostdialog.cpp
@@ -21,12 +21,12 @@
#include "probedialog.h"
#include "proberesultdialog.h"
-#include <qcombobox.h>
-#include <qwidgetstack.h>
+#include <tqcombobox.h>
+#include <tqwidgetstack.h>
#include <klineedit.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
#include <klocale.h>
#include <kmessagebox.h>
@@ -35,14 +35,14 @@
using namespace KSim::Snmp;
-HostDialog::HostDialog( QWidget *parent, const char *name )
+HostDialog::HostDialog( TQWidget *parent, const char *name )
: HostDialogBase( parent, name )
{
init();
port->setValue( 161 );
}
-HostDialog::HostDialog( const HostConfig &src, QWidget *parent, const char *name )
+HostDialog::HostDialog( const HostConfig &src, TQWidget *parent, const char *name )
: HostDialogBase( parent, name )
{
init( src );
@@ -79,7 +79,7 @@ HostConfig HostDialog::settings() const
return result;
}
-void HostDialog::showSnmpAuthenticationDetailsForVersion( const QString &versionStr )
+void HostDialog::showSnmpAuthenticationDetailsForVersion( const TQString &versionStr )
{
bool ok = false;
SnmpVersion version = stringToSnmpVersion( versionStr, &ok );
@@ -88,7 +88,7 @@ void HostDialog::showSnmpAuthenticationDetailsForVersion( const QString &version
authenticationDetails->raiseWidget( version == SnmpVersion3 ? snmpV3Page : snmpV1Page );
}
-void HostDialog::enableDisabledAuthenticationAndPrivacyElementsForSecurityLevel( const QString &levelStr )
+void HostDialog::enableDisabledAuthenticationAndPrivacyElementsForSecurityLevel( const TQString &levelStr )
{
bool ok = false;
SecurityLevel level = stringToSecurityLevel( levelStr, &ok );
diff --git a/ksim/monitors/snmp/hostdialog.h b/ksim/monitors/snmp/hostdialog.h
index e296b7b..68ddfe1 100644
--- a/ksim/monitors/snmp/hostdialog.h
+++ b/ksim/monitors/snmp/hostdialog.h
@@ -34,14 +34,14 @@ class HostDialog : public HostDialogBase
{
Q_OBJECT
public:
- HostDialog( QWidget *parent, const char *name = 0 );
- HostDialog( const HostConfig &src, QWidget *parent, const char *name = 0 );
+ HostDialog( TQWidget *parent, const char *name = 0 );
+ HostDialog( const HostConfig &src, TQWidget *parent, const char *name = 0 );
HostConfig settings() const;
private slots:
- void showSnmpAuthenticationDetailsForVersion( const QString &versionStr );
- void enableDisabledAuthenticationAndPrivacyElementsForSecurityLevel( const QString &levelStr );
+ void showSnmpAuthenticationDetailsForVersion( const TQString &versionStr );
+ void enableDisabledAuthenticationAndPrivacyElementsForSecurityLevel( const TQString &levelStr );
void checkValidity();
void testHost();
diff --git a/ksim/monitors/snmp/identifier.cpp b/ksim/monitors/snmp/identifier.cpp
index 25c188e..32d6d8b 100644
--- a/ksim/monitors/snmp/identifier.cpp
+++ b/ksim/monitors/snmp/identifier.cpp
@@ -62,7 +62,7 @@ Identifier::~Identifier()
delete d;
}
-Identifier Identifier::fromString( const QString &name, bool *ok )
+Identifier Identifier::fromString( const TQString &name, bool *ok )
{
Identifier res;
res.d->length = MAX_OID_LEN;
@@ -79,7 +79,7 @@ Identifier Identifier::fromString( const QString &name, bool *ok )
return res;
}
-QString Identifier::toString( PrintFlags flags ) const
+TQString Identifier::toString( PrintFlags flags ) const
{
size_t buflen = 256;
size_t outlen = 0;
@@ -87,7 +87,7 @@ QString Identifier::toString( PrintFlags flags ) const
u_char *buf = ( u_char* )calloc( buflen, 1 );
if ( !buf )
- return QString::null;
+ return TQString::null;
int oldOutpuFormat = SnmpLib::self()->netsnmp_ds_get_int( NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT );
SnmpLib::self()->netsnmp_ds_set_int( NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_OID_OUTPUT_FORMAT,
@@ -100,10 +100,10 @@ QString Identifier::toString( PrintFlags flags ) const
if ( overflow ) {
free( buf );
- return QString::null;
+ return TQString::null;
}
- QString result = QString::fromAscii( ( char* )buf );
+ TQString result = TQString::fromAscii( ( char* )buf );
free( buf );
diff --git a/ksim/monitors/snmp/identifier.h b/ksim/monitors/snmp/identifier.h
index 7da54dd..e14e58a 100644
--- a/ksim/monitors/snmp/identifier.h
+++ b/ksim/monitors/snmp/identifier.h
@@ -20,9 +20,9 @@
#ifndef IDENTIFIER_H
#define IDENTIFIER_H
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qmap.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqmap.h>
#include "value.h"
@@ -46,9 +46,9 @@ public:
Identifier &operator=( const Identifier &rhs );
~Identifier();
- static Identifier fromString( const QString &name, bool *ok = 0 );
+ static Identifier fromString( const TQString &name, bool *ok = 0 );
- QString toString( PrintFlags flags = PrintAscii ) const;
+ TQString toString( PrintFlags flags = PrintAscii ) const;
bool isNull() const;
@@ -61,8 +61,8 @@ private:
Data *d;
};
-typedef QValueList<Identifier> IdentifierList;
-typedef QMap<Identifier, Value> ValueMap;
+typedef TQValueList<Identifier> IdentifierList;
+typedef TQMap<Identifier, Value> ValueMap;
}
}
diff --git a/ksim/monitors/snmp/labelmonitor.cpp b/ksim/monitors/snmp/labelmonitor.cpp
index 24e48c7..2245a09 100644
--- a/ksim/monitors/snmp/labelmonitor.cpp
+++ b/ksim/monitors/snmp/labelmonitor.cpp
@@ -21,17 +21,17 @@
using namespace KSim::Snmp;
-LabelMonitor::LabelMonitor( const MonitorConfig &config, QWidget *parent, const char *name )
+LabelMonitor::LabelMonitor( const MonitorConfig &config, TQWidget *parent, const char *name )
: KSim::Label( parent, name ), m_config( config )
{
}
void LabelMonitor::setData( const Value &data )
{
- QString dataString = data.toString( m_config.refreshInterval.minutes == 0 ? Value::TimeTicksWithSeconds : 0 );
+ TQString dataString = data.toString( m_config.refreshInterval.minutes == 0 ? Value::TimeTicksWithSeconds : 0 );
if ( m_config.useCustomFormatString ) {
- QString text = m_config.customFormatString;
+ TQString text = m_config.customFormatString;
text.replace( "%n", m_config.name );
text.replace( "%s", dataString );
setText( text );
diff --git a/ksim/monitors/snmp/labelmonitor.h b/ksim/monitors/snmp/labelmonitor.h
index 3e92c69..606165b 100644
--- a/ksim/monitors/snmp/labelmonitor.h
+++ b/ksim/monitors/snmp/labelmonitor.h
@@ -34,7 +34,7 @@ class LabelMonitor : public KSim::Label
{
Q_OBJECT
public:
- LabelMonitor( const MonitorConfig &config, QWidget *parent, const char *name = 0 );
+ LabelMonitor( const MonitorConfig &config, TQWidget *parent, const char *name = 0 );
public slots:
void setData( const Value &data );
diff --git a/ksim/monitors/snmp/monitor.cpp b/ksim/monitors/snmp/monitor.cpp
index 7a97825..052d2c0 100644
--- a/ksim/monitors/snmp/monitor.cpp
+++ b/ksim/monitors/snmp/monitor.cpp
@@ -19,26 +19,26 @@
#include "monitor.h"
-#include <qtimer.h>
-#include <qapplication.h>
+#include <tqtimer.h>
+#include <tqapplication.h>
using namespace KSim::Snmp;
-Monitor::Monitor( const HostConfig &host, const Identifier &oid, int refresh, QObject *parent, const char *name )
- : QObject( parent, name ), m_oid( oid ), m_session( host )
+Monitor::Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *parent, const char *name )
+ : TQObject( parent, name ), m_oid( oid ), m_session( host )
{
if ( refresh > 0 )
m_timerId = startTimer( refresh );
else
m_timerId = -1;
- QTimer::singleShot( 0, this, SLOT( performSnmpRequest() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( performSnmpRequest() ) );
}
Monitor::~Monitor()
{
- if ( QThread::running() )
- QThread::wait();
+ if ( TQThread::running() )
+ TQThread::wait();
}
void Monitor::run()
@@ -48,13 +48,13 @@ void Monitor::run()
result->oid = m_oid;
result->success = performSyncSnmpRequest( result->data, &result->error );
- QCustomEvent *ev = new QCustomEvent( QEvent::User, result );
- QApplication::postEvent( this, ev );
+ TQCustomEvent *ev = new TQCustomEvent( TQEvent::User, result );
+ TQApplication::postEvent( this, ev );
}
-void Monitor::customEvent( QCustomEvent *ev )
+void Monitor::customEvent( TQCustomEvent *ev )
{
- if ( ev->type() != QEvent::User )
+ if ( ev->type() != TQEvent::User )
return;
AsyncSnmpQueryResult *result = reinterpret_cast<AsyncSnmpQueryResult *>( ev->data() );
@@ -69,7 +69,7 @@ void Monitor::customEvent( QCustomEvent *ev )
delete result;
}
-void Monitor::timerEvent( QTimerEvent *ev )
+void Monitor::timerEvent( TQTimerEvent *ev )
{
if ( ev->timerId() != m_timerId )
return;
@@ -79,7 +79,7 @@ void Monitor::timerEvent( QTimerEvent *ev )
void Monitor::performSnmpRequest()
{
- if ( QThread::running() )
+ if ( TQThread::running() )
return;
start();
diff --git a/ksim/monitors/snmp/monitor.h b/ksim/monitors/snmp/monitor.h
index cd3dedc..083e97f 100644
--- a/ksim/monitors/snmp/monitor.h
+++ b/ksim/monitors/snmp/monitor.h
@@ -23,7 +23,7 @@
#include "monitorconfig.h"
#include "session.h"
-#include <qthread.h>
+#include <tqthread.h>
namespace KSim
{
@@ -31,11 +31,11 @@ namespace KSim
namespace Snmp
{
-class Monitor : public QObject, public QThread
+class Monitor : public TQObject, public QThread
{
Q_OBJECT
public:
- Monitor( const HostConfig &host, const Identifier &oid, int refresh, QObject *parent = 0, const char *name = 0 );
+ Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *parent = 0, const char *name = 0 );
virtual ~Monitor();
signals:
@@ -46,8 +46,8 @@ signals:
protected:
virtual void run();
- virtual void customEvent( QCustomEvent *ev );
- virtual void timerEvent( QTimerEvent *ev );
+ virtual void customEvent( TQCustomEvent *ev );
+ virtual void timerEvent( TQTimerEvent *ev );
private slots:
void performSnmpRequest();
diff --git a/ksim/monitors/snmp/monitorconfig.cpp b/ksim/monitors/snmp/monitorconfig.cpp
index 6b3b27e..4b4b024 100644
--- a/ksim/monitors/snmp/monitorconfig.cpp
+++ b/ksim/monitors/snmp/monitorconfig.cpp
@@ -35,7 +35,7 @@ MonitorConfig::MonitorConfig()
bool MonitorConfig::load( KConfigBase &config, const HostConfigMap &hosts )
{
- QString hostName = config.readEntry( "Host" );
+ TQString hostName = config.readEntry( "Host" );
if ( hostName.isEmpty() )
return false;
@@ -93,9 +93,9 @@ void MonitorConfig::save( KConfigBase &config ) const
config.writeEntry( "DisplayCurrentValueInline", displayCurrentValueInline );
}
-QWidget *MonitorConfig::createMonitorWidget( QWidget *parent, const char *name )
+TQWidget *MonitorConfig::createMonitorWidget( TQWidget *parent, const char *name )
{
- QWidget *w;
+ TQWidget *w;
int refresh = refreshInterval.seconds * 1000 + refreshInterval.minutes * 60 * 1000;
Identifier id = Identifier::fromString( oid );
@@ -108,23 +108,23 @@ QWidget *MonitorConfig::createMonitorWidget( QWidget *parent, const char *name )
w = new ChartMonitor( *this, parent, name );
Monitor *monitor = new Monitor( host, id, refresh, w );
- QObject::connect( monitor, SIGNAL( newData( const Value & ) ),
- w, SLOT( setData( const Value & ) ) );
+ TQObject::connect( monitor, TQT_SIGNAL( newData( const Value & ) ),
+ w, TQT_SLOT( setData( const Value & ) ) );
return w;
}
-QString KSim::Snmp::monitorDisplayTypeToString( MonitorConfig::DisplayType type )
+TQString KSim::Snmp::monitorDisplayTypeToString( MonitorConfig::DisplayType type )
{
switch ( type )
{
- case MonitorConfig::Label: return QString::fromLatin1( "Label" );
- case MonitorConfig::Chart: return QString::fromLatin1( "Chart" );
+ case MonitorConfig::Label: return TQString::fromLatin1( "Label" );
+ case MonitorConfig::Chart: return TQString::fromLatin1( "Chart" );
default: assert( false );
};
- return QString::null;
+ return TQString::null;
}
-MonitorConfig::DisplayType KSim::Snmp::stringToMonitorDisplayType( QString string, bool *ok )
+MonitorConfig::DisplayType KSim::Snmp::stringToMonitorDisplayType( TQString string, bool *ok )
{
string = string.lower();
if ( string == "chart" ) {
@@ -142,17 +142,17 @@ MonitorConfig::DisplayType KSim::Snmp::stringToMonitorDisplayType( QString strin
return MonitorConfig::Chart;
}
-QStringList KSim::Snmp::allDisplayTypes()
+TQStringList KSim::Snmp::allDisplayTypes()
{
// !!! keep order with enum
- return QStringList() << "Label" << "Chart";
+ return TQStringList() << "Label" << "Chart";
}
-void MonitorConfigMap::load( KConfigBase &config, const QStringList &names, const HostConfigMap &hosts )
+void MonitorConfigMap::load( KConfigBase &config, const TQStringList &names, const HostConfigMap &hosts )
{
clear();
- for ( QStringList::ConstIterator it = names.begin(); it != names.end(); ++it ) {
+ for ( TQStringList::ConstIterator it = names.begin(); it != names.end(); ++it ) {
config.setGroup( "Monitor " + *it );
MonitorConfig monitor;
@@ -163,12 +163,12 @@ void MonitorConfigMap::load( KConfigBase &config, const QStringList &names, cons
}
}
-QStringList MonitorConfigMap::save( KConfigBase &config ) const
+TQStringList MonitorConfigMap::save( KConfigBase &config ) const
{
- QStringList names;
+ TQStringList names;
for ( ConstIterator it = begin(); it != end(); ++it ) {
- QString name = it.key();
+ TQString name = it.key();
names << name;
diff --git a/ksim/monitors/snmp/monitorconfig.h b/ksim/monitors/snmp/monitorconfig.h
index bbc8674..cf2d525 100644
--- a/ksim/monitors/snmp/monitorconfig.h
+++ b/ksim/monitors/snmp/monitorconfig.h
@@ -41,11 +41,11 @@ struct MonitorConfig
bool isNull() const { return name.isEmpty() || host.isNull(); }
- QWidget *createMonitorWidget( QWidget *parent, const char *name = 0 );
+ TQWidget *createMonitorWidget( TQWidget *parent, const char *name = 0 );
HostConfig host;
- QString name;
- QString oid;
+ TQString name;
+ TQString oid;
struct
{
uint minutes;
@@ -54,26 +54,26 @@ struct MonitorConfig
DisplayType display;
bool useCustomFormatString;
- QString customFormatString;
+ TQString customFormatString;
bool displayCurrentValueInline;
};
-struct MonitorConfigMap : public QMap< QString, MonitorConfig >
+struct MonitorConfigMap : public TQMap< TQString, MonitorConfig >
{
MonitorConfigMap() {}
- MonitorConfigMap( const QMap< QString, MonitorConfig > &rhs )
- : QMap< QString, MonitorConfig >( rhs ) {}
+ MonitorConfigMap( const TQMap< TQString, MonitorConfig > &rhs )
+ : TQMap< TQString, MonitorConfig >( rhs ) {}
- void load( KConfigBase &config, const QStringList &names, const HostConfigMap &hosts );
- QStringList save( KConfigBase &config ) const;
+ void load( KConfigBase &config, const TQStringList &names, const HostConfigMap &hosts );
+ TQStringList save( KConfigBase &config ) const;
};
-typedef QValueList<MonitorConfig> MonitorConfigList;
+typedef TQValueList<MonitorConfig> MonitorConfigList;
-QString monitorDisplayTypeToString( MonitorConfig::DisplayType type );
-MonitorConfig::DisplayType stringToMonitorDisplayType( QString string, bool *ok = 0 );
-QStringList allDisplayTypes();
+TQString monitorDisplayTypeToString( MonitorConfig::DisplayType type );
+MonitorConfig::DisplayType stringToMonitorDisplayType( TQString string, bool *ok = 0 );
+TQStringList allDisplayTypes();
}
diff --git a/ksim/monitors/snmp/monitordialog.cpp b/ksim/monitors/snmp/monitordialog.cpp
index 615a1aa..1bda0aa 100644
--- a/ksim/monitors/snmp/monitordialog.cpp
+++ b/ksim/monitors/snmp/monitordialog.cpp
@@ -21,14 +21,14 @@
#include "identifier.h"
#include "browsedialog.h"
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <kpushbutton.h>
@@ -37,13 +37,13 @@
using namespace KSim::Snmp;
-MonitorDialog::MonitorDialog( const HostConfigMap &hosts, QWidget *parent, const char *name )
+MonitorDialog::MonitorDialog( const HostConfigMap &hosts, TQWidget *parent, const char *name )
: MonitorDialogBase( parent, name ), m_hosts( hosts )
{
init();
}
-MonitorDialog::MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, QWidget *parent, const char *name )
+MonitorDialog::MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *parent, const char *name )
: MonitorDialogBase( parent, name ), m_hosts( hosts )
{
init( monitor );
@@ -86,7 +86,7 @@ void MonitorDialog::checkValues()
labelOptions->setEnabled( currentDisplayTypeIsLabel );
chartOptions->setEnabled( !currentDisplayTypeIsLabel );
- QString statusText;
+ TQString statusText;
if ( monitorName->text().isEmpty() )
statusText = i18n( "Please enter a name for this monitor" );
@@ -126,7 +126,7 @@ void MonitorDialog::init( const MonitorConfig &monitor )
host->clear();
- QStringList allHosts;
+ TQStringList allHosts;
for ( HostConfigMap::ConstIterator it = m_hosts.begin(); it != m_hosts.end(); ++it )
allHosts << it.key();
diff --git a/ksim/monitors/snmp/monitordialog.h b/ksim/monitors/snmp/monitordialog.h
index 0f22d33..b6d0b40 100644
--- a/ksim/monitors/snmp/monitordialog.h
+++ b/ksim/monitors/snmp/monitordialog.h
@@ -33,8 +33,8 @@ class MonitorDialog : public MonitorDialogBase
{
Q_OBJECT
public:
- MonitorDialog( const HostConfigMap &hosts, QWidget *parent, const char *name = 0 );
- MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, QWidget *parent, const char *name = 0 );
+ MonitorDialog( const HostConfigMap &hosts, TQWidget *parent, const char *name = 0 );
+ MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *parent, const char *name = 0 );
MonitorConfig monitorConfig() const;
diff --git a/ksim/monitors/snmp/probedialog.cpp b/ksim/monitors/snmp/probedialog.cpp
index d45db6b..4667fc3 100644
--- a/ksim/monitors/snmp/probedialog.cpp
+++ b/ksim/monitors/snmp/probedialog.cpp
@@ -20,7 +20,7 @@
#include "probedialog.h"
#include "monitor.h"
-#include <qtimer.h>
+#include <tqtimer.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,8 +38,8 @@ static const char * const probeIdentifiers[] =
0
};
-ProbeDialog::ProbeDialog( const HostConfig &hostConfig, QWidget *parent, const char *name )
- : KProgressDialog( parent, name, i18n( "SNMP Host Probe" ), QString::null, true /* modal */ ),
+ProbeDialog::ProbeDialog( const HostConfig &hostConfig, TQWidget *parent, const char *name )
+ : KProgressDialog( parent, name, i18n( "SNMP Host Probe" ), TQString::null, true /* modal */ ),
m_host( hostConfig ), m_currentMonitor( 0 ), m_canceled( false )
{
setLabel( i18n( "Probing for common object identifiers..." ) );
@@ -59,7 +59,7 @@ ProbeDialog::ProbeDialog( const HostConfig &hostConfig, QWidget *parent, const c
void ProbeDialog::done( int code )
{
- if ( code == QDialog::Rejected && m_currentMonitor ) {
+ if ( code == TQDialog::Rejected && m_currentMonitor ) {
setLabel( "Probe aborted. Waiting for job to finish..." );
m_canceled = true;
return;
@@ -79,10 +79,10 @@ void ProbeDialog::probeOne()
delete m_currentMonitor;
m_currentMonitor = new Monitor( m_host, oid, 0 /* no refresh */, this );
- connect( m_currentMonitor, SIGNAL( newData( const Identifier &, const Value & ) ),
- this, SLOT( probeResult( const Identifier &, const Value & ) ) );
- connect( m_currentMonitor, SIGNAL( error( const Identifier &, const ErrorInfo & ) ),
- this, SLOT( probeError( const Identifier &, const ErrorInfo & ) ) );
+ connect( m_currentMonitor, TQT_SIGNAL( newData( const Identifier &, const Value & ) ),
+ this, TQT_SLOT( probeResult( const Identifier &, const Value & ) ) );
+ connect( m_currentMonitor, TQT_SIGNAL( error( const Identifier &, const ErrorInfo & ) ),
+ this, TQT_SLOT( probeError( const Identifier &, const ErrorInfo & ) ) );
}
void ProbeDialog::probeResult( const Identifier &oid, const Value &value )
@@ -106,9 +106,9 @@ void ProbeDialog::nextProbe()
progressBar()->setProgress( progressBar()->totalSteps() - m_probeOIDs.count() );
if ( m_canceled )
- KProgressDialog::done( QDialog::Rejected );
+ KProgressDialog::done( TQDialog::Rejected );
else
- QTimer::singleShot( 0, this, SLOT( probeOne() ) );
+ TQTimer::singleShot( 0, this, TQT_SLOT( probeOne() ) );
}
#include "probedialog.moc"
diff --git a/ksim/monitors/snmp/probedialog.h b/ksim/monitors/snmp/probedialog.h
index 47a5fb0..9e88eda 100644
--- a/ksim/monitors/snmp/probedialog.h
+++ b/ksim/monitors/snmp/probedialog.h
@@ -20,7 +20,7 @@
#ifndef PROBEDIALOG_H
#define PROBEDIALOG_H
-#include <qvaluestack.h>
+#include <tqvaluestack.h>
#include <kprogress.h>
@@ -39,7 +39,7 @@ class ProbeDialog : public KProgressDialog
{
Q_OBJECT
public:
- ProbeDialog( const HostConfig &hostConfig, QWidget *parent, const char *name = 0 );
+ ProbeDialog( const HostConfig &hostConfig, TQWidget *parent, const char *name = 0 );
struct ProbeResult
{
@@ -56,7 +56,7 @@ public:
bool success;
ErrorInfo errorInfo;
};
- typedef QValueList<ProbeResult> ProbeResultList;
+ typedef TQValueList<ProbeResult> ProbeResultList;
ProbeResultList probeResults() const { return m_results; }
@@ -72,7 +72,7 @@ private:
void nextProbe();
HostConfig m_host;
- QValueStack<Identifier> m_probeOIDs;
+ TQValueStack<Identifier> m_probeOIDs;
Monitor *m_currentMonitor;
ProbeResultList m_results;
diff --git a/ksim/monitors/snmp/proberesultdialog.cpp b/ksim/monitors/snmp/proberesultdialog.cpp
index 641f12e..bed1e21 100644
--- a/ksim/monitors/snmp/proberesultdialog.cpp
+++ b/ksim/monitors/snmp/proberesultdialog.cpp
@@ -19,7 +19,7 @@
#include "proberesultdialog.h"
-#include <qlabel.h>
+#include <tqlabel.h>
#include <klocale.h>
#include <klistview.h>
@@ -27,7 +27,7 @@
using namespace KSim::Snmp;
ProbeResultDialog::ProbeResultDialog( const HostConfig &hostConfig, const ProbeDialog::ProbeResultList &probeResults,
- QWidget *parent, const char *name )
+ TQWidget *parent, const char *name )
: ProbeResultDialogBase( parent, name )
{
info->setText( i18n( "Results of scanning host %1:" ).arg( hostConfig.name ) );
@@ -39,14 +39,14 @@ ProbeResultDialog::ProbeResultDialog( const HostConfig &hostConfig, const ProbeD
void ProbeResultDialog::addResultItem( const ProbeDialog::ProbeResult &result )
{
- QListViewItem *item = new QListViewItem( probeResultView );
+ TQListViewItem *item = new TQListViewItem( probeResultView );
item->setText( 0, result.oid.toString() );
if ( result.success )
item->setText( 1, result.value.toString( Value::TimeTicksWithSeconds ) );
else
- item->setText( 1, QString( "ERROR: " ) + result.errorInfo.errorMessage() );
+ item->setText( 1, TQString( "ERROR: " ) + result.errorInfo.errorMessage() );
}
#include "proberesultdialog.moc"
diff --git a/ksim/monitors/snmp/proberesultdialog.h b/ksim/monitors/snmp/proberesultdialog.h
index 9ba3523..2166a69 100644
--- a/ksim/monitors/snmp/proberesultdialog.h
+++ b/ksim/monitors/snmp/proberesultdialog.h
@@ -35,7 +35,7 @@ class ProbeResultDialog : public ProbeResultDialogBase
Q_OBJECT
public:
ProbeResultDialog( const HostConfig &hostConfig, const ProbeDialog::ProbeResultList &probeResults,
- QWidget *parent, const char *name = 0 );
+ TQWidget *parent, const char *name = 0 );
private:
void addResultItem( const ProbeDialog::ProbeResult &result );
diff --git a/ksim/monitors/snmp/session.cpp b/ksim/monitors/snmp/session.cpp
index d7de283..6d63fab 100644
--- a/ksim/monitors/snmp/session.cpp
+++ b/ksim/monitors/snmp/session.cpp
@@ -40,11 +40,11 @@ struct Session::Data
HostConfig source;
- QCString host;
- QCString community;
- QCString securityName;
- QCString authPassPhrase;
- QCString privPassPhrase;
+ TQCString host;
+ TQCString community;
+ TQCString securityName;
+ TQCString authPassPhrase;
+ TQCString privPassPhrase;
};
Session::Session( const HostConfig &source )
@@ -212,7 +212,7 @@ bool Session::initialize( ErrorInfo *error )
return true;
}
-bool Session::snmpGet( const QString &identifier, Value &value, ErrorInfo *error )
+bool Session::snmpGet( const TQString &identifier, Value &value, ErrorInfo *error )
{
bool ok = false;
Identifier oid = Identifier::fromString( identifier, &ok );
diff --git a/ksim/monitors/snmp/session.h b/ksim/monitors/snmp/session.h
index 0d5cda3..b34bc68 100644
--- a/ksim/monitors/snmp/session.h
+++ b/ksim/monitors/snmp/session.h
@@ -38,7 +38,7 @@ public:
Session( const HostConfig &snmpHostConfig );
~Session();
- bool snmpGet( const QString &identifier, Value &value, ErrorInfo *error = 0 );
+ bool snmpGet( const TQString &identifier, Value &value, ErrorInfo *error = 0 );
bool snmpGet( const Identifier &identifier, Value &value, ErrorInfo *error = 0 );
bool snmpGet( const IdentifierList &identifiers, ValueMap &variables, ErrorInfo *error = 0 );
diff --git a/ksim/monitors/snmp/snmp.cpp b/ksim/monitors/snmp/snmp.cpp
index 80fb073..a050acb 100644
--- a/ksim/monitors/snmp/snmp.cpp
+++ b/ksim/monitors/snmp/snmp.cpp
@@ -23,7 +23,7 @@
#include "snmplib.h"
#include "value_p.h"
-#include <qmutex.h>
+#include <tqmutex.h>
#include <assert.h>
@@ -53,30 +53,30 @@ static const struct EnumStringMapInfo
{ 0, 0, 0 }
};
-static QStringList allStrings( const EnumStringMapInfo *array )
+static TQStringList allStrings( const EnumStringMapInfo *array )
{
- QStringList result;
+ TQStringList result;
for ( uint i = 0; array[ i ].stringValue; ++i )
- result << QString::fromLatin1( array[ i ].stringValue );
+ result << TQString::fromLatin1( array[ i ].stringValue );
return result;
}
-static QString enumToString( const EnumStringMapInfo *array, int value )
+static TQString enumToString( const EnumStringMapInfo *array, int value )
{
for ( uint i = 0; array[ i ].stringValue; ++i )
if ( array[ i ].enumValue == value )
- return QString::fromLatin1( array[ i ].stringValue );
+ return TQString::fromLatin1( array[ i ].stringValue );
assert( false );
- return QString::null;
+ return TQString::null;
}
-static int stringToEnum( const EnumStringMapInfo *array, QString string, bool *ok )
+static int stringToEnum( const EnumStringMapInfo *array, TQString string, bool *ok )
{
string = string.lower();
uint i;
for ( i = 0; array[ i ].stringValue; ++i )
- if ( QString::fromLatin1( array[ i ].stringValue ).lower() == string ) {
+ if ( TQString::fromLatin1( array[ i ].stringValue ).lower() == string ) {
if ( ok ) *ok = true;
return array[ i ].enumValue;
}
@@ -108,62 +108,62 @@ int KSim::Snmp::snmpSecurityLevelToSnmpLibConstant( SecurityLevel secLevel )
return extractSnmpLibConstant( securityLevelStrings, secLevel );
}
-QStringList KSim::Snmp::allSnmpVersions()
+TQStringList KSim::Snmp::allSnmpVersions()
{
return allStrings( snmpVersionStrings );
}
-QString KSim::Snmp::snmpVersionToString( SnmpVersion version )
+TQString KSim::Snmp::snmpVersionToString( SnmpVersion version )
{
return enumToString( snmpVersionStrings, version );
}
-SnmpVersion KSim::Snmp::stringToSnmpVersion( QString string, bool *ok )
+SnmpVersion KSim::Snmp::stringToSnmpVersion( TQString string, bool *ok )
{
return static_cast<SnmpVersion>( stringToEnum( snmpVersionStrings, string, ok ) );
}
-QStringList KSim::Snmp::allSecurityLevels()
+TQStringList KSim::Snmp::allSecurityLevels()
{
return allStrings( securityLevelStrings );
}
-QString KSim::Snmp::securityLevelToString( SecurityLevel level )
+TQString KSim::Snmp::securityLevelToString( SecurityLevel level )
{
return enumToString( securityLevelStrings, level );
}
-SecurityLevel KSim::Snmp::stringToSecurityLevel( QString string, bool *ok )
+SecurityLevel KSim::Snmp::stringToSecurityLevel( TQString string, bool *ok )
{
return static_cast<SecurityLevel>( stringToEnum( securityLevelStrings, string, ok ) );
}
-QStringList KSim::Snmp::allAuthenticationProtocols()
+TQStringList KSim::Snmp::allAuthenticationProtocols()
{
return allStrings( authenticationProtocolStrings );
}
-QString KSim::Snmp::authenticationProtocolToString( AuthenticationProtocol proto )
+TQString KSim::Snmp::authenticationProtocolToString( AuthenticationProtocol proto )
{
return enumToString( authenticationProtocolStrings, proto );
}
-AuthenticationProtocol KSim::Snmp::stringToAuthenticationProtocol( QString string, bool *ok )
+AuthenticationProtocol KSim::Snmp::stringToAuthenticationProtocol( TQString string, bool *ok )
{
return static_cast<AuthenticationProtocol>( stringToEnum( authenticationProtocolStrings, string, ok ) );
}
-QStringList KSim::Snmp::allPrivacyProtocols()
+TQStringList KSim::Snmp::allPrivacyProtocols()
{
return allStrings( privacyProtocolStrings );
}
-QString KSim::Snmp::privacyProtocolToString( PrivacyProtocol proto )
+TQString KSim::Snmp::privacyProtocolToString( PrivacyProtocol proto )
{
return enumToString( privacyProtocolStrings, proto );
}
-PrivacyProtocol KSim::Snmp::stringToPrivacyProtocol( QString string, bool *ok )
+PrivacyProtocol KSim::Snmp::stringToPrivacyProtocol( TQString string, bool *ok )
{
return static_cast<PrivacyProtocol>( stringToEnum( privacyProtocolStrings, string, ok ) );
}
@@ -288,14 +288,14 @@ int KSim::Snmp::sessionErrorCode( netsnmp_session &session )
return errorCode;
}
-static QString messageForErrorCode( int errorCode )
+static TQString messageForErrorCode( int errorCode )
{
if ( errorCode >= SNMPERR_MAX && errorCode <= SNMPERR_GENERR )
- return QString::fromLatin1( SnmpLib::self()->snmp_api_errstring( errorCode ) );
+ return TQString::fromLatin1( SnmpLib::self()->snmp_api_errstring( errorCode ) );
if ( errorCode >= SNMP_ERR_NOERROR && errorCode <= MAX_SNMP_ERR )
- return QString::fromLatin1( SnmpLib::self()->snmp_errstring( errorCode ) );
+ return TQString::fromLatin1( SnmpLib::self()->snmp_errstring( errorCode ) );
- return QString::null;
+ return TQString::null;
}
ErrorInfo::ErrorInfo()
diff --git a/ksim/monitors/snmp/snmp.h b/ksim/monitors/snmp/snmp.h
index 4710c2d..f7fa92c 100644
--- a/ksim/monitors/snmp/snmp.h
+++ b/ksim/monitors/snmp/snmp.h
@@ -22,7 +22,7 @@
#include <kconfigbase.h>
-#include <qmap.h>
+#include <tqmap.h>
namespace KSim
@@ -32,24 +32,24 @@ namespace Snmp
{
enum SnmpVersion { SnmpVersion1, SnmpVersion2c, SnmpVersion3, SnmpLastVersion };
-QStringList allSnmpVersions();
-QString snmpVersionToString( SnmpVersion version );
-SnmpVersion stringToSnmpVersion( QString string, bool *ok = 0 );
+TQStringList allSnmpVersions();
+TQString snmpVersionToString( SnmpVersion version );
+SnmpVersion stringToSnmpVersion( TQString string, bool *ok = 0 );
enum SecurityLevel { NoAuthPriv, AuthNoPriv, AuthPriv, LastSecurityLevel };
-QStringList allSecurityLevels();
-QString securityLevelToString( SecurityLevel level );
-SecurityLevel stringToSecurityLevel( QString string, bool *ok = 0 );
+TQStringList allSecurityLevels();
+TQString securityLevelToString( SecurityLevel level );
+SecurityLevel stringToSecurityLevel( TQString string, bool *ok = 0 );
enum AuthenticationProtocol { MD5Auth, SHA1Auth, LastAuthenticationProtocol };
-QStringList allAuthenticationProtocols();
-QString authenticationProtocolToString( AuthenticationProtocol proto );
-AuthenticationProtocol stringToAuthenticationProtocol( QString string, bool *ok = 0 );
+TQStringList allAuthenticationProtocols();
+TQString authenticationProtocolToString( AuthenticationProtocol proto );
+AuthenticationProtocol stringToAuthenticationProtocol( TQString string, bool *ok = 0 );
enum PrivacyProtocol { DESPrivacy };
-QStringList allPrivacyProtocols();
-QString privacyProtocolToString( PrivacyProtocol proto );
-PrivacyProtocol stringToPrivacyProtocol( QString string, bool *ok = 0 );
+TQStringList allPrivacyProtocols();
+TQString privacyProtocolToString( PrivacyProtocol proto );
+PrivacyProtocol stringToPrivacyProtocol( TQString string, bool *ok = 0 );
class ErrorInfo
{
@@ -149,11 +149,11 @@ public:
ErrorInfo( ErrorType error );
ErrorType errorCode() const { return m_errorCode; }
- QString errorMessage() const { return m_errorMessage; }
+ TQString errorMessage() const { return m_errorMessage; }
private:
ErrorType m_errorCode;
- QString m_errorMessage;
+ TQString m_errorMessage;
};
}
diff --git a/ksim/monitors/snmp/snmplib.cpp b/ksim/monitors/snmp/snmplib.cpp
index a063203..b042c7f 100644
--- a/ksim/monitors/snmp/snmplib.cpp
+++ b/ksim/monitors/snmp/snmplib.cpp
@@ -44,9 +44,9 @@ SnmpLib::~SnmpLib()
ClassLocker<SnmpLib> &SnmpLib::self()
{
if ( !s_self ) {
- static QMutex singletonGuard;
+ static TQMutex singletonGuard;
- QMutexLocker locker( &singletonGuard );
+ TQMutexLocker locker( &singletonGuard );
if ( !s_self )
sd.setObject( s_self, new SnmpLib );
}
diff --git a/ksim/monitors/snmp/snmplib.h b/ksim/monitors/snmp/snmplib.h
index e8b14a4..388c918 100644
--- a/ksim/monitors/snmp/snmplib.h
+++ b/ksim/monitors/snmp/snmplib.h
@@ -25,7 +25,7 @@
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
-#include <qmutex.h>
+#include <tqmutex.h>
template <class> class KStaticDeleter;
@@ -39,13 +39,13 @@ template <class T>
class ClassLocker
{
public:
- ClassLocker( QMutex *guard, T *obj )
+ ClassLocker( TQMutex *guard, T *obj )
: m_guard( guard ), m_obj( obj )
{}
struct ClassLockerHelper
{
- ClassLockerHelper( QMutex *guard, T *obj )
+ ClassLockerHelper( TQMutex *guard, T *obj )
: m_guard( guard ), m_obj( obj ), m_locked( false )
{}
@@ -63,7 +63,7 @@ public:
}
private:
- QMutex *m_guard;
+ TQMutex *m_guard;
T *m_obj;
bool m_locked;
};
@@ -77,7 +77,7 @@ private:
ClassLocker( const ClassLocker & );
ClassLocker &operator=( const ClassLocker & );
- QMutex *m_guard;
+ TQMutex *m_guard;
T *m_obj;
};
@@ -127,7 +127,7 @@ private:
SnmpLib();
~SnmpLib();
- QMutex m_guard;
+ TQMutex m_guard;
ClassLocker<SnmpLib> *m_lockHelper;
static SnmpLib *s_self;
diff --git a/ksim/monitors/snmp/value.cpp b/ksim/monitors/snmp/value.cpp
index fe42a08..a244c59 100644
--- a/ksim/monitors/snmp/value.cpp
+++ b/ksim/monitors/snmp/value.cpp
@@ -22,7 +22,7 @@
#include "value_p.h"
#include "snmp_p.h"
-#include <qvariant.h>
+#include <tqvariant.h>
#include <klocale.h>
@@ -35,22 +35,22 @@ ValueImpl::ValueImpl( variable_list *var )
switch ( var->type ) {
case ASN_INTEGER: {
type = Value::Int;
- data = QVariant( static_cast<int>( *var->val.integer ) );
+ data = TQVariant( static_cast<int>( *var->val.integer ) );
break;
}
case ASN_UINTEGER: {
type = Value::UInt;
- data = QVariant( static_cast<uint>( *var->val.integer ) );
+ data = TQVariant( static_cast<uint>( *var->val.integer ) );
break;
}
case ASN_OCTET_STR: {
type = Value::ByteArray;
- QByteArray d;
+ TQByteArray d;
d.setRawData( reinterpret_cast<char *>( var->val.string ), var->val_len );
- QByteArray copy = d;
+ TQByteArray copy = d;
copy.detach();
d.resetRawData( reinterpret_cast<char *>( var->val.string ), var->val_len );
- data = QVariant( copy );
+ data = TQVariant( copy );
break;
}
case ASN_NULL: {
@@ -64,17 +64,17 @@ ValueImpl::ValueImpl( variable_list *var )
}
case ASN_IPADDRESS: {
type = Value::IpAddress;
- addr = QHostAddress( static_cast<uint>( *var->val.integer ) );
+ addr = TQHostAddress( static_cast<uint>( *var->val.integer ) );
break;
}
case ASN_COUNTER: {
type = Value::Counter;
- data = QVariant( static_cast<uint>( *var->val.integer ) );
+ data = TQVariant( static_cast<uint>( *var->val.integer ) );
break;
}
case ASN_GAUGE: {
type = Value::Gauge;
- data = QVariant( static_cast<uint>( *var->val.integer ) );
+ data = TQVariant( static_cast<uint>( *var->val.integer ) );
break;
}
case ASN_COUNTER64: {
@@ -84,7 +84,7 @@ ValueImpl::ValueImpl( variable_list *var )
}
case ASN_TIMETICKS: {
type = Value::TimeTicks;
- data = QVariant( static_cast<int>( *var->val.integer ) );
+ data = TQVariant( static_cast<int>( *var->val.integer ) );
break;
}
case SNMP_NOSUCHOBJECT: {
@@ -102,12 +102,12 @@ ValueImpl::ValueImpl( variable_list *var )
#if defined( OPAQUE_SPECIAL_TYPES )
case ASN_OPAQUE_FLOAT: {
type = Value::Double;
- data = QVariant( static_cast<float>( *var->val.floatVal ) );
+ data = TQVariant( static_cast<float>( *var->val.floatVal ) );
break;
}
case ASN_OPAQUE_DOUBLE: {
type = Value::Double;
- data = QVariant( static_cast<float>( *var->val.doubleVal ) );
+ data = TQVariant( static_cast<float>( *var->val.doubleVal ) );
break;
}
#endif
@@ -135,7 +135,7 @@ Value::Value( int val, Type type )
assert( type == Int || type == TimeTicks );
d->type = type;
- d->data = QVariant( val );
+ d->data = TQVariant( val );
}
Value::Value( uint val, Type type )
@@ -145,21 +145,21 @@ Value::Value( uint val, Type type )
assert( type == UInt || type == Counter || type == Gauge );
d->type = type;
- d->data = QVariant( val );
+ d->data = TQVariant( val );
}
Value::Value( double val )
{
d = new ValueImpl;
d->type = Double;
- d->data = QVariant( val );
+ d->data = TQVariant( val );
}
-Value::Value( const QByteArray &data )
+Value::Value( const TQByteArray &data )
{
d = new ValueImpl;
d->type = ByteArray;
- d->data = QVariant( data );
+ d->data = TQVariant( data );
}
Value::Value( const KSim::Snmp::Identifier &oid )
@@ -169,7 +169,7 @@ Value::Value( const KSim::Snmp::Identifier &oid )
d->oid = oid;
}
-Value::Value( const QHostAddress &address )
+Value::Value( const TQHostAddress &address )
{
d = new ValueImpl;
d->type = IpAddress;
@@ -240,7 +240,7 @@ double Value::toDouble() const
return d->data.toDouble();
}
-const QByteArray Value::toByteArray() const
+const TQByteArray Value::toByteArray() const
{
assert( d->type == ByteArray );
return d->data.toByteArray();
@@ -252,7 +252,7 @@ const Identifier Value::toOID() const
return d->oid;
}
-const QHostAddress Value::toIpAddress() const
+const TQHostAddress Value::toIpAddress() const
{
assert( d->type == IpAddress );
return d->addr;
@@ -279,31 +279,31 @@ Q_UINT64 Value::toCounter64() const
return d->ctr64;
}
-QString Value::toString( int conversionFlags ) const
+TQString Value::toString( int conversionFlags ) const
{
switch ( type() ) {
- case Value::Int: return QString::number( toInt() );
+ case Value::Int: return TQString::number( toInt() );
case Value::Gauge:
case Value::Counter:
- case Value::UInt: return QString::number( toUInt() );
- case Value::Double: return QString::number( toDouble() );
- case Value::Counter64: return QString::number( toCounter64() );
- case Value::ByteArray: return QString::fromAscii( toByteArray().data(), toByteArray().size() );
+ case Value::UInt: return TQString::number( toUInt() );
+ case Value::Double: return TQString::number( toDouble() );
+ case Value::Counter64: return TQString::number( toCounter64() );
+ case Value::ByteArray: return TQString::fromAscii( toByteArray().data(), toByteArray().size() );
case Value::IpAddress: return toIpAddress().toString();
case Value::Oid: return toOID().toString();
case Value::TimeTicks: return formatTimeTicks( toTimeTicks(), conversionFlags );
// not using i18n here, because it may be called from within a worker thread, and I'm
// not sure it makes sense to translate it anyway
- case Value::NoSuchObject: return QString::fromLatin1( "No Such Object" );
- case Value::NoSuchInstance: return QString::fromLatin1( "No Such Instance" );
- case Value::EndOfMIBView: return QString::fromLatin1( "End Of MIB View" );
+ case Value::NoSuchObject: return TQString::fromLatin1( "No Such Object" );
+ case Value::NoSuchInstance: return TQString::fromLatin1( "No Such Instance" );
+ case Value::EndOfMIBView: return TQString::fromLatin1( "End Of MIB View" );
case Value::Invalid:
- case Value::Null: return QString::null;
+ case Value::Null: return TQString::null;
}
- return QString::null;
+ return TQString::null;
}
-QString Value::formatTimeTicks( int ticks, int conversionFlags )
+TQString Value::formatTimeTicks( int ticks, int conversionFlags )
{
ticks /= 100;
@@ -316,15 +316,15 @@ QString Value::formatTimeTicks( int ticks, int conversionFlags )
int minutes = ticks / 60;
int seconds = ticks % 60;
- QString result;
+ TQString result;
if ( days > 0 )
- result += QString::number( days ) + "d:";
+ result += TQString::number( days ) + "d:";
- result += QString::fromAscii( "%1h:%2m" ).arg( hours ).arg( minutes );
+ result += TQString::fromAscii( "%1h:%2m" ).arg( hours ).arg( minutes );
if ( conversionFlags & TimeTicksWithSeconds )
- result += ":" + QString::number( seconds ) + "s";
+ result += ":" + TQString::number( seconds ) + "s";
return result;
}
diff --git a/ksim/monitors/snmp/value.h b/ksim/monitors/snmp/value.h
index 4ffdcbb..5b2d6cd 100644
--- a/ksim/monitors/snmp/value.h
+++ b/ksim/monitors/snmp/value.h
@@ -20,7 +20,7 @@
#ifndef VALUE_H
#define VALUE_H
-#include <qhostaddress.h>
+#include <tqhostaddress.h>
namespace KSim
{
@@ -65,9 +65,9 @@ public:
Value( uint val, Type type );
Value( float val );
Value( double val );
- Value( const QByteArray &data );
+ Value( const TQByteArray &data );
Value( const Identifier &oid );
- Value( const QHostAddress &address );
+ Value( const TQHostAddress &address );
Value( Q_UINT64 counter );
Value( const Value &rhs );
@@ -81,18 +81,18 @@ public:
int toInt() const;
uint toUInt() const;
double toDouble() const;
- const QByteArray toByteArray() const;
+ const TQByteArray toByteArray() const;
const Identifier toOID() const;
- const QHostAddress toIpAddress() const;
+ const TQHostAddress toIpAddress() const;
uint toCounter() const;
uint toGauge() const;
int toTimeTicks() const;
Q_UINT64 toCounter64() const;
- QString toString( int conversionFlags = 0 ) const;
+ TQString toString( int conversionFlags = 0 ) const;
private:
- static QString formatTimeTicks( int ticks, int conversionFlags );
+ static TQString formatTimeTicks( int ticks, int conversionFlags );
ValueImpl *d;
};
diff --git a/ksim/monitors/snmp/value_p.h b/ksim/monitors/snmp/value_p.h
index 8d61f59..000c32d 100644
--- a/ksim/monitors/snmp/value_p.h
+++ b/ksim/monitors/snmp/value_p.h
@@ -24,7 +24,7 @@
#include <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
-#include <qvariant.h>
+#include <tqvariant.h>
#include "identifier.h"
@@ -48,9 +48,9 @@ struct ValueImpl
ValueImpl( variable_list *var );
Value::Type type;
- QVariant data;
+ TQVariant data;
Identifier oid;
- QHostAddress addr;
+ TQHostAddress addr;
Q_UINT64 ctr64;
};
diff --git a/ksim/monitors/snmp/view.cpp b/ksim/monitors/snmp/view.cpp
index 0a4b276..9515645 100644
--- a/ksim/monitors/snmp/view.cpp
+++ b/ksim/monitors/snmp/view.cpp
@@ -23,7 +23,7 @@
#include <label.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kconfig.h>
@@ -32,7 +32,7 @@ using namespace KSim::Snmp;
View::View( Plugin *parent, const char *name )
: KSim::PluginView( parent, name )
{
- m_layout = new QVBoxLayout( this );
+ m_layout = new TQVBoxLayout( this );
reparseConfig();
}
@@ -49,8 +49,8 @@ void View::reparseConfig()
KConfig &cfg = *config();
cfg.setGroup( "General" );
- QStringList allHosts = cfg.readListEntry( "Hosts" );
- QStringList monitors = cfg.readListEntry( "Monitors" );
+ TQStringList allHosts = cfg.readListEntry( "Hosts" );
+ TQStringList monitors = cfg.readListEntry( "Monitors" );
HostConfigMap hosts;
hosts.load( cfg, allHosts );
@@ -63,7 +63,7 @@ void View::reparseConfig()
MonitorConfig monitorConfig = *it;
- QWidget *w = monitorConfig.createMonitorWidget( this );
+ TQWidget *w = monitorConfig.createMonitorWidget( this );
if ( !w )
continue;
diff --git a/ksim/monitors/snmp/view.h b/ksim/monitors/snmp/view.h
index f03a59c..3793d30 100644
--- a/ksim/monitors/snmp/view.h
+++ b/ksim/monitors/snmp/view.h
@@ -42,8 +42,8 @@ public:
virtual void reparseConfig();
private:
- QPtrList<QWidget> m_widgets;
- QBoxLayout *m_layout;
+ TQPtrList<TQWidget> m_widgets;
+ TQBoxLayout *m_layout;
};
}
diff --git a/ksim/monitors/snmp/walker.cpp b/ksim/monitors/snmp/walker.cpp
index 593cd04..0aa6c0a 100644
--- a/ksim/monitors/snmp/walker.cpp
+++ b/ksim/monitors/snmp/walker.cpp
@@ -19,7 +19,7 @@
#include "walker.h"
-#include <qapplication.h>
+#include <tqapplication.h>
#include <functional>
#include <algorithm>
@@ -38,8 +38,8 @@ namespace
static const uint walkerRefresh = 0;
-Walker::Walker( const HostConfig &host, const Identifier &startOid, QObject *parent, const char *name )
- : QObject( parent, name ), m_stop( false ), m_oid( startOid ), m_session( host )
+Walker::Walker( const HostConfig &host, const Identifier &startOid, TQObject *parent, const char *name )
+ : TQObject( parent, name ), m_stop( false ), m_oid( startOid ), m_session( host )
{
m_timerId = startTimer( walkerRefresh );
start();
@@ -51,8 +51,8 @@ Walker::~Walker()
m_stop = true;
m_stopGuard.unlock();
- if ( QThread::running() )
- QThread::wait();
+ if ( TQThread::running() )
+ TQThread::wait();
std::for_each( m_results.begin(), m_results.end(), Deleter<Result *>() );
}
@@ -82,10 +82,10 @@ void Walker::run()
}
// cause finished signal to be emitted
- QApplication::postEvent( this, new QCustomEvent( QEvent::User ) );
+ TQApplication::postEvent( this, new TQCustomEvent( TQEvent::User ) );
}
-void Walker::timerEvent( QTimerEvent *ev )
+void Walker::timerEvent( TQTimerEvent *ev )
{
if ( ev->timerId() != m_timerId )
return;
@@ -105,13 +105,13 @@ void Walker::timerEvent( QTimerEvent *ev )
delete result;
}
- if ( !QThread::running() && !result ) {
+ if ( !TQThread::running() && !result ) {
killTimer( m_timerId );
m_timerId = 0;
}
}
-void Walker::customEvent( QCustomEvent * )
+void Walker::customEvent( TQCustomEvent * )
{
emit finished();
}
diff --git a/ksim/monitors/snmp/walker.h b/ksim/monitors/snmp/walker.h
index e1b1ace..3ff38b7 100644
--- a/ksim/monitors/snmp/walker.h
+++ b/ksim/monitors/snmp/walker.h
@@ -20,10 +20,10 @@
#ifndef WALKER_H
#define WALKER_H
-#include <qthread.h>
-#include <qobject.h>
-#include <qmutex.h>
-#include <qvaluelist.h>
+#include <tqthread.h>
+#include <tqobject.h>
+#include <tqmutex.h>
+#include <tqvaluelist.h>
#include "session.h"
@@ -33,11 +33,11 @@ namespace KSim
namespace Snmp
{
-class Walker : public QObject, public QThread
+class Walker : public TQObject, public QThread
{
Q_OBJECT
public:
- Walker( const HostConfig &host, const Identifier &startOid, QObject *parent, const char *name = 0 );
+ Walker( const HostConfig &host, const Identifier &startOid, TQObject *parent, const char *name = 0 );
virtual ~Walker();
struct Result
@@ -45,9 +45,9 @@ public:
Result() : success( false ) {}
bool success;
Identifier oid;
- QString identifierString;
+ TQString identifierString;
Value data;
- QString dataString;
+ TQString dataString;
ErrorInfo error;
};
@@ -57,17 +57,17 @@ signals:
protected:
virtual void run();
- virtual void timerEvent( QTimerEvent *ev );
- virtual void customEvent( QCustomEvent *ev );
+ virtual void timerEvent( TQTimerEvent *ev );
+ virtual void customEvent( TQCustomEvent *ev );
private:
- typedef QValueList<Result *> ResultList;
+ typedef TQValueList<Result *> ResultList;
ResultList m_results;
- QMutex m_resultGuard;
+ TQMutex m_resultGuard;
bool m_stop;
- QMutex m_stopGuard;
+ TQMutex m_stopGuard;
Identifier m_oid;
int m_timerId;