summaryrefslogtreecommitdiffstats
path: root/ksim/monitors/snmp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-23 01:42:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-23 01:42:07 +0000
commita2277b6bc715464e83882b90c2a058139b8a6b54 (patch)
treeab09b14014f59b4d8e2ddd12226aa0b22e4dfc5d /ksim/monitors/snmp
parentd3f79e04b34bd1f70a458b81b28fc8799498c8dc (diff)
downloadtdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.tar.gz
tdeutils-a2277b6bc715464e83882b90c2a058139b8a6b54.zip
TQt4 port kdeutils
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1238125 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksim/monitors/snmp')
-rw-r--r--ksim/monitors/snmp/browsedialog.cpp8
-rw-r--r--ksim/monitors/snmp/browsedialog.h3
-rw-r--r--ksim/monitors/snmp/browsedialogbase.ui38
-rw-r--r--ksim/monitors/snmp/chartmonitor.cpp10
-rw-r--r--ksim/monitors/snmp/chartmonitor.h7
-rw-r--r--ksim/monitors/snmp/configpage.cpp12
-rw-r--r--ksim/monitors/snmp/configpage.h23
-rw-r--r--ksim/monitors/snmp/configwidget.ui24
-rw-r--r--ksim/monitors/snmp/hostdialog.cpp18
-rw-r--r--ksim/monitors/snmp/hostdialog.h5
-rw-r--r--ksim/monitors/snmp/hostdialogbase.ui68
-rw-r--r--ksim/monitors/snmp/identifier.cpp4
-rw-r--r--ksim/monitors/snmp/labelmonitor.cpp8
-rw-r--r--ksim/monitors/snmp/labelmonitor.h3
-rw-r--r--ksim/monitors/snmp/monitor.cpp4
-rw-r--r--ksim/monitors/snmp/monitor.h5
-rw-r--r--ksim/monitors/snmp/monitorconfig.cpp16
-rw-r--r--ksim/monitors/snmp/monitorconfig.h2
-rw-r--r--ksim/monitors/snmp/monitordialog.cpp14
-rw-r--r--ksim/monitors/snmp/monitordialog.h5
-rw-r--r--ksim/monitors/snmp/monitordialogbase.ui74
-rw-r--r--ksim/monitors/snmp/probedialog.cpp6
-rw-r--r--ksim/monitors/snmp/probedialog.h3
-rw-r--r--ksim/monitors/snmp/proberesultdialog.cpp6
-rw-r--r--ksim/monitors/snmp/proberesultdialog.h3
-rw-r--r--ksim/monitors/snmp/proberesultdialogbase.ui12
-rw-r--r--ksim/monitors/snmp/session.cpp4
-rw-r--r--ksim/monitors/snmp/snmp.cpp14
-rw-r--r--ksim/monitors/snmp/value.cpp18
-rw-r--r--ksim/monitors/snmp/value.h4
-rw-r--r--ksim/monitors/snmp/value_p.h2
-rw-r--r--ksim/monitors/snmp/view.cpp4
-rw-r--r--ksim/monitors/snmp/view.h3
-rw-r--r--ksim/monitors/snmp/walker.cpp4
-rw-r--r--ksim/monitors/snmp/walker.h5
35 files changed, 225 insertions, 214 deletions
diff --git a/ksim/monitors/snmp/browsedialog.cpp b/ksim/monitors/snmp/browsedialog.cpp
index 3085eca..3b571ef 100644
--- a/ksim/monitors/snmp/browsedialog.cpp
+++ b/ksim/monitors/snmp/browsedialog.cpp
@@ -29,8 +29,8 @@
using namespace KSim::Snmp;
-BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const TQString &currentOid, TQWidget *parent, const char *name )
- : BrowseDialogBase( parent, name ), m_host( hostConfig )
+BrowseDialog::BrowseDialog( const HostConfig &hostConfig, const TQString &currentOid, TQWidget *tqparent, const char *name )
+ : BrowseDialogBase( tqparent, name ), m_host( hostConfig )
{
stop->setGuiItem( KGuiItem( i18n( "&Stop" ), "stop" ) );
@@ -95,7 +95,7 @@ void BrowseDialog::startWalk( const Identifier &startOid )
{
stopWalker();
- m_walker = new Walker( m_host, startOid, this );
+ m_walker = new Walker( m_host, startOid, TQT_TQOBJECT(this) );
connect( m_walker, TQT_SIGNAL( resultReady( const Walker::Result & ) ),
this, TQT_SLOT( insertBrowseItem( const Walker::Result & ) ) );
connect( m_walker, TQT_SIGNAL( finished() ),
@@ -134,7 +134,7 @@ void BrowseDialog::applyFilter( TQListViewItem *item )
return;
}
- if ( item->text( 0 ).find( filterText, 0 /*index*/, false /*case sensitive*/ ) == -1 ) {
+ if ( item->text( 0 ).tqfind( filterText, 0 /*index*/, false /*case sensitive*/ ) == -1 ) {
item->setVisible( false );
return;
}
diff --git a/ksim/monitors/snmp/browsedialog.h b/ksim/monitors/snmp/browsedialog.h
index a694881..7dfb4f7 100644
--- a/ksim/monitors/snmp/browsedialog.h
+++ b/ksim/monitors/snmp/browsedialog.h
@@ -39,8 +39,9 @@ namespace Snmp
class BrowseDialog : public BrowseDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- BrowseDialog( const HostConfig &hostConfig, const TQString &currentOid, TQWidget *parent, const char *name = 0 );
+ BrowseDialog( const HostConfig &hostConfig, const TQString &currentOid, TQWidget *tqparent, const char *name = 0 );
TQString selectedObjectIdentifier() const;
diff --git a/ksim/monitors/snmp/browsedialogbase.ui b/ksim/monitors/snmp/browsedialogbase.ui
index 17459f8..c3efab1 100644
--- a/ksim/monitors/snmp/browsedialogbase.ui
+++ b/ksim/monitors/snmp/browsedialogbase.ui
@@ -22,15 +22,15 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLayoutWidget" row="0" column="0">
+ <widget class="TQLayoutWidget" row="0" column="0">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -38,7 +38,7 @@
<string>Filter:</string>
</property>
</widget>
- <widget class="QLineEdit">
+ <widget class="TQLineEdit">
<property name="name">
<cstring>filter</cstring>
</property>
@@ -97,7 +97,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLayoutWidget" row="3" column="0">
+ <widget class="TQLayoutWidget" row="3" column="0">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -121,14 +121,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -142,7 +142,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -155,15 +155,15 @@
</widget>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="2" column="0">
+ <widget class="TQLayoutWidget" row="2" column="0">
<property name="name">
- <cstring>layout4</cstring>
+ <cstring>tqlayout4</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>blah</cstring>
</property>
@@ -179,7 +179,7 @@
<string>Selected object:</string>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>selectedObject</cstring>
</property>
@@ -205,7 +205,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>71</width>
<height>20</height>
@@ -243,17 +243,17 @@
</connection>
<connection>
<sender>browserContents</sender>
- <signal>executed(QListViewItem*)</signal>
+ <signal>executed(TQListViewItem*)</signal>
<receiver>MyDialog</receiver>
- <slot>objectSelected(QListViewItem*)</slot>
+ <slot>objectSelected(TQListViewItem*)</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot access="protected">stopAllWalks()</slot>
<slot access="protected">applyFilter()</slot>
- <slot access="protected">objectSelected(QListViewItem *)</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+ <slot access="protected">objectSelected(TQListViewItem *)</slot>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kdialog.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/ksim/monitors/snmp/chartmonitor.cpp b/ksim/monitors/snmp/chartmonitor.cpp
index a5cfc6e..4682c3b 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, TQWidget *parent, const char *name )
- : KSim::Chart( true /* displayMeter */, 0, TQString::null, parent, name ),
+ChartMonitor::ChartMonitor( const MonitorConfig &config, TQWidget *tqparent, const char *name )
+ : KSim::Chart( true /* displayMeter */, 0, TQString(), tqparent, name ),
m_lastValue( 0 ), m_config( config ), m_firstSampleReceived( false )
{
setTitle( m_config.name );
@@ -32,7 +32,7 @@ ChartMonitor::ChartMonitor( const MonitorConfig &config, TQWidget *parent, const
void ChartMonitor::setData( const Value &data )
{
- Q_UINT64 currentValue = convertToInt( data );
+ TQ_UINT64 currentValue = convertToInt( data );
if ( data.isCounterType() ) {
int diff = currentValue - m_lastValue;
@@ -50,12 +50,12 @@ void ChartMonitor::setData( const Value &data )
updateDisplay();
setValue( currentValue );
if ( m_config.displayCurrentValueInline ) {
- Q_UINT64 bytesPerSec = currentValue / ( m_config.refreshInterval.seconds + m_config.refreshInterval.minutes * 60 );
+ TQ_UINT64 bytesPerSec = currentValue / ( m_config.refreshInterval.seconds + m_config.refreshInterval.minutes * 60 );
setText( KIO::convertSize( bytesPerSec ), 0 );
}
}
-Q_UINT64 ChartMonitor::convertToInt( const Value &data )
+TQ_UINT64 ChartMonitor::convertToInt( const Value &data )
{
switch ( data.type() ) {
case Value::TimeTicks:
diff --git a/ksim/monitors/snmp/chartmonitor.h b/ksim/monitors/snmp/chartmonitor.h
index 3b064f8..6713238 100644
--- a/ksim/monitors/snmp/chartmonitor.h
+++ b/ksim/monitors/snmp/chartmonitor.h
@@ -31,18 +31,19 @@ namespace Snmp
class ChartMonitor : public KSim::Chart
{
Q_OBJECT
+ TQ_OBJECT
public:
- ChartMonitor( const MonitorConfig &config, TQWidget *parent, const char *name = 0 );
+ ChartMonitor( const MonitorConfig &config, TQWidget *tqparent, const char *name = 0 );
public slots:
void setData( const Value &data );
private:
- Q_UINT64 m_lastValue;
+ TQ_UINT64 m_lastValue;
MonitorConfig m_config;
bool m_firstSampleReceived;
- static Q_UINT64 convertToInt( const Value &data );
+ static TQ_UINT64 convertToInt( const Value &data );
};
}
diff --git a/ksim/monitors/snmp/configpage.cpp b/ksim/monitors/snmp/configpage.cpp
index ee50054..ede7a52 100644
--- a/ksim/monitors/snmp/configpage.cpp
+++ b/ksim/monitors/snmp/configpage.cpp
@@ -43,8 +43,8 @@ static bool listViewHasSelection( TQListView *lv )
return false;
}
-ConfigPage::ConfigPage( Plugin *parent, const char *name )
- : KSim::PluginPage( parent, name )
+ConfigPage::ConfigPage( Plugin *tqparent, const char *name )
+ : KSim::PluginPage( tqparent, name )
{
( new TQVBoxLayout( this ) )->setAutoAdd( true );
@@ -123,7 +123,7 @@ void ConfigPage::modifyHost()
if ( !currentItem )
return;
- HostConfigMap::Iterator hostIt = m_hosts.find( currentItem->text( 0 ) );
+ HostConfigMap::Iterator hostIt = m_hosts.tqfind( currentItem->text( 0 ) );
if ( hostIt == m_hosts.end() )
return;
@@ -147,7 +147,7 @@ void ConfigPage::removeHost()
if ( !currentItem )
return;
- HostConfigMap::Iterator hostIt = m_hosts.find( currentItem->text( 0 ) );
+ HostConfigMap::Iterator hostIt = m_hosts.tqfind( currentItem->text( 0 ) );
if ( hostIt == m_hosts.end() )
return;
@@ -191,7 +191,7 @@ void ConfigPage::modifyMonitor()
if ( !currentItem )
return;
- MonitorConfigMap::Iterator monitorIt = m_monitors.find( currentItem->text( 0 ) );
+ MonitorConfigMap::Iterator monitorIt = m_monitors.tqfind( currentItem->text( 0 ) );
if ( monitorIt == m_monitors.end() )
return;
@@ -215,7 +215,7 @@ void ConfigPage::removeMonitor()
if ( !currentItem )
return;
- MonitorConfigMap::Iterator monitorIt = m_monitors.find( currentItem->text( 0 ) );
+ MonitorConfigMap::Iterator monitorIt = m_monitors.tqfind( currentItem->text( 0 ) );
if ( monitorIt == m_monitors.end() )
return;
diff --git a/ksim/monitors/snmp/configpage.h b/ksim/monitors/snmp/configpage.h
index 66c941c..f8b811c 100644
--- a/ksim/monitors/snmp/configpage.h
+++ b/ksim/monitors/snmp/configpage.h
@@ -32,17 +32,17 @@ namespace KSim
namespace Snmp
{
-class HostItem : public QListViewItem
+class HostItem : public TQListViewItem
{
public:
- HostItem( TQListView *parent, const KSim::Snmp::HostConfig &src )
- : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
+ HostItem( TQListView *tqparent, const KSim::Snmp::HostConfig &src )
+ : TQListViewItem( tqparent, TQString(), TQString(), TQString() )
{
setFromHostConfig( src );
}
- HostItem( TQListView *parent )
- : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
+ HostItem( TQListView *tqparent )
+ : TQListViewItem( tqparent, TQString(), TQString(), TQString() )
{}
void setFromHostConfig( const KSim::Snmp::HostConfig &src )
@@ -53,17 +53,17 @@ public:
}
};
-class MonitorItem : public QListViewItem
+class MonitorItem : public TQListViewItem
{
public:
- MonitorItem( TQListView *parent, const KSim::Snmp::MonitorConfig &monitor )
- : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
+ MonitorItem( TQListView *tqparent, const KSim::Snmp::MonitorConfig &monitor )
+ : TQListViewItem( tqparent, TQString(), TQString(), TQString() )
{
setFromMonitor( monitor );
}
- MonitorItem( TQListView *parent )
- : TQListViewItem( parent, TQString::null, TQString::null, TQString::null )
+ MonitorItem( TQListView *tqparent )
+ : TQListViewItem( tqparent, TQString(), TQString(), TQString() )
{}
void setFromMonitor( const KSim::Snmp::MonitorConfig &monitor )
@@ -79,8 +79,9 @@ class Plugin;
class ConfigPage : public KSim::PluginPage
{
Q_OBJECT
+ TQ_OBJECT
public:
- ConfigPage( Plugin *parent, const char *name );
+ ConfigPage( Plugin *tqparent, const char *name );
~ConfigPage();
virtual void saveConfig();
diff --git a/ksim/monitors/snmp/configwidget.ui b/ksim/monitors/snmp/configwidget.ui
index c121184..2d6134f 100644
--- a/ksim/monitors/snmp/configwidget.ui
+++ b/ksim/monitors/snmp/configwidget.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>KSim::Snmp::ConfigWidget</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>ConfigWidget</cstring>
</property>
@@ -16,7 +16,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>hostGroup</cstring>
</property>
@@ -27,7 +27,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="1" column="3">
+ <widget class="TQPushButton" row="1" column="3">
<property name="name">
<cstring>removeHost</cstring>
</property>
@@ -35,7 +35,7 @@
<string>Remove</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="2">
+ <widget class="TQPushButton" row="1" column="2">
<property name="name">
<cstring>modifyHost</cstring>
</property>
@@ -43,7 +43,7 @@
<string>Modify...</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>addHost</cstring>
</property>
@@ -102,7 +102,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>141</width>
<height>20</height>
@@ -111,7 +111,7 @@
</spacer>
</grid>
</widget>
- <widget class="QGroupBox">
+ <widget class="TQGroupBox">
<property name="name">
<cstring>monitorGroup</cstring>
</property>
@@ -122,7 +122,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>addMonitor</cstring>
</property>
@@ -130,7 +130,7 @@
<string>Add...</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="2">
+ <widget class="TQPushButton" row="1" column="2">
<property name="name">
<cstring>modifyMonitor</cstring>
</property>
@@ -138,7 +138,7 @@
<string>Modify...</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="3">
+ <widget class="TQPushButton" row="1" column="3">
<property name="name">
<cstring>removeMonitor</cstring>
</property>
@@ -156,7 +156,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>121</width>
<height>20</height>
@@ -207,7 +207,7 @@
<tabstop>modifyMonitor</tabstop>
<tabstop>removeMonitor</tabstop>
</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
<includehint>klistview.h</includehint>
diff --git a/ksim/monitors/snmp/hostdialog.cpp b/ksim/monitors/snmp/hostdialog.cpp
index 7d66a75..b237bfe 100644
--- a/ksim/monitors/snmp/hostdialog.cpp
+++ b/ksim/monitors/snmp/hostdialog.cpp
@@ -35,15 +35,15 @@
using namespace KSim::Snmp;
-HostDialog::HostDialog( TQWidget *parent, const char *name )
- : HostDialogBase( parent, name )
+HostDialog::HostDialog( TQWidget *tqparent, const char *name )
+ : HostDialogBase( tqparent, name )
{
init();
port->setValue( 161 );
}
-HostDialog::HostDialog( const HostConfig &src, TQWidget *parent, const char *name )
- : HostDialogBase( parent, name )
+HostDialog::HostDialog( const HostConfig &src, TQWidget *tqparent, const char *name )
+ : HostDialogBase( tqparent, name )
{
init( src );
}
@@ -141,7 +141,7 @@ void HostDialog::init( const HostConfig &src )
{
// hide these, there's nothing to choose right now. might be that
// net-snmp will support different privacy types in the future, but
- // apparently not now.
+ // aptqparently not now.
privacyTypeLabel->hide();
privacyType->hide();
@@ -163,7 +163,7 @@ void HostDialog::loadSettingsFromHostConfig( const HostConfig &src )
hostName->setText( src.name );
port->setValue( src.port );
- snmpVersion->setCurrentItem( allSnmpVersions().findIndex( snmpVersionToString( src.version ) ) );
+ snmpVersion->setCurrentItem( allSnmpVersions().tqfindIndex( snmpVersionToString( src.version ) ) );
if ( src.version != SnmpVersion3 ) {
communityString->setText( src.community );
@@ -172,18 +172,18 @@ void HostDialog::loadSettingsFromHostConfig( const HostConfig &src )
securityName->setText( src.securityName );
- securityLevel->setCurrentItem( allSecurityLevels().findIndex( securityLevelToString( src.securityLevel ) ) );
+ securityLevel->setCurrentItem( allSecurityLevels().tqfindIndex( securityLevelToString( src.securityLevel ) ) );
if ( src.securityLevel == NoAuthPriv )
return;
- authenticationType->setCurrentItem( allAuthenticationProtocols().findIndex( authenticationProtocolToString( src.authentication.protocol ) ) );
+ authenticationType->setCurrentItem( allAuthenticationProtocols().tqfindIndex( authenticationProtocolToString( src.authentication.protocol ) ) );
authenticationPassphrase->setText( src.authentication.key );
if ( src.securityLevel == AuthNoPriv )
return;
- privacyType->setCurrentItem( allPrivacyProtocols().findIndex( privacyProtocolToString( src.privacy.protocol ) ) );
+ privacyType->setCurrentItem( allPrivacyProtocols().tqfindIndex( privacyProtocolToString( src.privacy.protocol ) ) );
privacyPassphrase->setText( src.privacy.key );
}
diff --git a/ksim/monitors/snmp/hostdialog.h b/ksim/monitors/snmp/hostdialog.h
index 68ddfe1..d384881 100644
--- a/ksim/monitors/snmp/hostdialog.h
+++ b/ksim/monitors/snmp/hostdialog.h
@@ -33,9 +33,10 @@ namespace Snmp
class HostDialog : public HostDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- HostDialog( TQWidget *parent, const char *name = 0 );
- HostDialog( const HostConfig &src, TQWidget *parent, const char *name = 0 );
+ HostDialog( TQWidget *tqparent, const char *name = 0 );
+ HostDialog( const HostConfig &src, TQWidget *tqparent, const char *name = 0 );
HostConfig settings() const;
diff --git a/ksim/monitors/snmp/hostdialogbase.ui b/ksim/monitors/snmp/hostdialogbase.ui
index 1ee9ee4..935d013 100644
--- a/ksim/monitors/snmp/hostdialogbase.ui
+++ b/ksim/monitors/snmp/hostdialogbase.ui
@@ -24,7 +24,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -46,7 +46,7 @@
<cstring>hostName</cstring>
</property>
</widget>
- <widget class="QLabel" row="0" column="2">
+ <widget class="TQLabel" row="0" column="2">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -57,7 +57,7 @@
<cstring>port</cstring>
</property>
</widget>
- <widget class="QSpinBox" row="0" column="3">
+ <widget class="TQSpinBox" row="0" column="3">
<property name="name">
<cstring>port</cstring>
</property>
@@ -78,14 +78,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>91</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QButtonGroup" row="1" column="0" rowspan="1" colspan="5">
+ <widget class="TQButtonGroup" row="1" column="0" rowspan="1" colspan="5">
<property name="name">
<cstring>buttonGroup2</cstring>
</property>
@@ -96,11 +96,11 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QWidgetStack" row="2" column="0" rowspan="1" colspan="3">
+ <widget class="TQWidgetStack" row="2" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>authenticationDetails</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>snmpV1Page</cstring>
</property>
@@ -111,7 +111,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -132,7 +132,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>41</height>
@@ -149,7 +149,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>160</width>
<height>20</height>
@@ -166,7 +166,7 @@
</widget>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>snmpV3Page</cstring>
</property>
@@ -177,7 +177,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel6</cstring>
</property>
@@ -188,7 +188,7 @@
<cstring>securityName</cstring>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel7</cstring>
</property>
@@ -199,7 +199,7 @@
<cstring>securityLevel</cstring>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>authenticationTypeLabel</cstring>
</property>
@@ -210,7 +210,7 @@
<cstring>authenticationType</cstring>
</property>
</widget>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>privacyTypeLabel</cstring>
</property>
@@ -221,7 +221,7 @@
<cstring>privacyType</cstring>
</property>
</widget>
- <widget class="QLabel" row="5" column="0">
+ <widget class="TQLabel" row="5" column="0">
<property name="name">
<cstring>privacyPassphraseLabel</cstring>
</property>
@@ -232,7 +232,7 @@
<cstring>privacyPassphrase</cstring>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>authenticationPassphraseLabel</cstring>
</property>
@@ -253,7 +253,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>71</width>
<height>20</height>
@@ -265,7 +265,7 @@
<cstring>securityName</cstring>
</property>
</widget>
- <widget class="QComboBox" row="4" column="1">
+ <widget class="TQComboBox" row="4" column="1">
<property name="name">
<cstring>privacyType</cstring>
</property>
@@ -281,12 +281,12 @@
<enum>Password</enum>
</property>
</widget>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<property name="name">
<cstring>securityLevel</cstring>
</property>
</widget>
- <widget class="QComboBox" row="2" column="1">
+ <widget class="TQComboBox" row="2" column="1">
<property name="name">
<cstring>authenticationType</cstring>
</property>
@@ -309,7 +309,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
@@ -333,7 +333,7 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2_2</cstring>
</property>
@@ -344,7 +344,7 @@
<cstring>snmpVersion</cstring>
</property>
</widget>
- <widget class="QComboBox" row="0" column="1">
+ <widget class="TQComboBox" row="0" column="1">
<property name="name">
<cstring>snmpVersion</cstring>
</property>
@@ -359,7 +359,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>351</width>
<height>20</height>
@@ -382,15 +382,15 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLayoutWidget" row="3" column="0" rowspan="1" colspan="5">
+ <widget class="TQLayoutWidget" row="3" column="0" rowspan="1" colspan="5">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>testHostButton</cstring>
</property>
@@ -408,14 +408,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>220</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -429,7 +429,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -508,13 +508,13 @@
<tabstop>buttonCancel</tabstop>
<tabstop>communityString</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot access="private">showSnmpAuthenticationDetailsForVersion(const QString &amp;)</slot>
<slot>enableDisabledAuthenticationAndPrivacyElementsForSecurityLevel(const QString &amp;)</slot>
<slot>checkValidity()</slot>
<slot access="protected">testHost()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kdialog.h</includehint>
<includehint>klineedit.h</includehint>
diff --git a/ksim/monitors/snmp/identifier.cpp b/ksim/monitors/snmp/identifier.cpp
index 32d6d8b..355f019 100644
--- a/ksim/monitors/snmp/identifier.cpp
+++ b/ksim/monitors/snmp/identifier.cpp
@@ -87,7 +87,7 @@ TQString Identifier::toString( PrintFlags flags ) const
u_char *buf = ( u_char* )calloc( buflen, 1 );
if ( !buf )
- return TQString::null;
+ return TQString();
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,7 +100,7 @@ TQString Identifier::toString( PrintFlags flags ) const
if ( overflow ) {
free( buf );
- return TQString::null;
+ return TQString();
}
TQString result = TQString::fromAscii( ( char* )buf );
diff --git a/ksim/monitors/snmp/labelmonitor.cpp b/ksim/monitors/snmp/labelmonitor.cpp
index 2245a09..e8ae261 100644
--- a/ksim/monitors/snmp/labelmonitor.cpp
+++ b/ksim/monitors/snmp/labelmonitor.cpp
@@ -21,8 +21,8 @@
using namespace KSim::Snmp;
-LabelMonitor::LabelMonitor( const MonitorConfig &config, TQWidget *parent, const char *name )
- : KSim::Label( parent, name ), m_config( config )
+LabelMonitor::LabelMonitor( const MonitorConfig &config, TQWidget *tqparent, const char *name )
+ : KSim::Label( tqparent, name ), m_config( config )
{
}
@@ -32,8 +32,8 @@ void LabelMonitor::setData( const Value &data )
if ( m_config.useCustomFormatString ) {
TQString text = m_config.customFormatString;
- text.replace( "%n", m_config.name );
- text.replace( "%s", dataString );
+ text.tqreplace( "%n", m_config.name );
+ text.tqreplace( "%s", dataString );
setText( text );
} else
setText( m_config.name + ": " + dataString );
diff --git a/ksim/monitors/snmp/labelmonitor.h b/ksim/monitors/snmp/labelmonitor.h
index 606165b..6ff8404 100644
--- a/ksim/monitors/snmp/labelmonitor.h
+++ b/ksim/monitors/snmp/labelmonitor.h
@@ -33,8 +33,9 @@ namespace Snmp
class LabelMonitor : public KSim::Label
{
Q_OBJECT
+ TQ_OBJECT
public:
- LabelMonitor( const MonitorConfig &config, TQWidget *parent, const char *name = 0 );
+ LabelMonitor( const MonitorConfig &config, TQWidget *tqparent, 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 052d2c0..414f4d9 100644
--- a/ksim/monitors/snmp/monitor.cpp
+++ b/ksim/monitors/snmp/monitor.cpp
@@ -24,8 +24,8 @@
using namespace KSim::Snmp;
-Monitor::Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *parent, const char *name )
- : TQObject( parent, name ), m_oid( oid ), m_session( host )
+Monitor::Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *tqparent, const char *name )
+ : TQObject( tqparent, name ), m_oid( oid ), m_session( host )
{
if ( refresh > 0 )
m_timerId = startTimer( refresh );
diff --git a/ksim/monitors/snmp/monitor.h b/ksim/monitors/snmp/monitor.h
index 083e97f..5b88b46 100644
--- a/ksim/monitors/snmp/monitor.h
+++ b/ksim/monitors/snmp/monitor.h
@@ -31,11 +31,12 @@ namespace KSim
namespace Snmp
{
-class Monitor : public TQObject, public QThread
+class Monitor : public TQObject, public TQThread
{
Q_OBJECT
+ TQ_OBJECT
public:
- Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *parent = 0, const char *name = 0 );
+ Monitor( const HostConfig &host, const Identifier &oid, int refresh, TQObject *tqparent = 0, const char *name = 0 );
virtual ~Monitor();
signals:
diff --git a/ksim/monitors/snmp/monitorconfig.cpp b/ksim/monitors/snmp/monitorconfig.cpp
index 4b4b024..6a77813 100644
--- a/ksim/monitors/snmp/monitorconfig.cpp
+++ b/ksim/monitors/snmp/monitorconfig.cpp
@@ -39,7 +39,7 @@ bool MonitorConfig::load( KConfigBase &config, const HostConfigMap &hosts )
if ( hostName.isEmpty() )
return false;
- HostConfigMap::ConstIterator hostIt = hosts.find( hostName );
+ HostConfigMap::ConstIterator hostIt = hosts.tqfind( hostName );
if ( hostIt == hosts.end() )
return false;
@@ -93,7 +93,7 @@ void MonitorConfig::save( KConfigBase &config ) const
config.writeEntry( "DisplayCurrentValueInline", displayCurrentValueInline );
}
-TQWidget *MonitorConfig::createMonitorWidget( TQWidget *parent, const char *name )
+TQWidget *MonitorConfig::createMonitorWidget( TQWidget *tqparent, const char *name )
{
TQWidget *w;
@@ -103,11 +103,11 @@ TQWidget *MonitorConfig::createMonitorWidget( TQWidget *parent, const char *name
return 0;
if ( display == Label )
- w = new LabelMonitor( *this, parent, name );
+ w = new LabelMonitor( *this, tqparent, name );
else
- w = new ChartMonitor( *this, parent, name );
+ w = new ChartMonitor( *this, tqparent, name );
- Monitor *monitor = new Monitor( host, id, refresh, w );
+ Monitor *monitor = new Monitor( host, id, refresh, TQT_TQOBJECT(w) );
TQObject::connect( monitor, TQT_SIGNAL( newData( const Value & ) ),
w, TQT_SLOT( setData( const Value & ) ) );
return w;
@@ -117,11 +117,11 @@ TQString KSim::Snmp::monitorDisplayTypeToString( MonitorConfig::DisplayType type
{
switch ( type )
{
- case MonitorConfig::Label: return TQString::fromLatin1( "Label" );
- case MonitorConfig::Chart: return TQString::fromLatin1( "Chart" );
+ case MonitorConfig::Label: return TQString::tqfromLatin1( "Label" );
+ case MonitorConfig::Chart: return TQString::tqfromLatin1( "Chart" );
default: assert( false );
};
- return TQString::null;
+ return TQString();
}
MonitorConfig::DisplayType KSim::Snmp::stringToMonitorDisplayType( TQString string, bool *ok )
diff --git a/ksim/monitors/snmp/monitorconfig.h b/ksim/monitors/snmp/monitorconfig.h
index cf2d525..00554d7 100644
--- a/ksim/monitors/snmp/monitorconfig.h
+++ b/ksim/monitors/snmp/monitorconfig.h
@@ -41,7 +41,7 @@ struct MonitorConfig
bool isNull() const { return name.isEmpty() || host.isNull(); }
- TQWidget *createMonitorWidget( TQWidget *parent, const char *name = 0 );
+ TQWidget *createMonitorWidget( TQWidget *tqparent, const char *name = 0 );
HostConfig host;
TQString name;
diff --git a/ksim/monitors/snmp/monitordialog.cpp b/ksim/monitors/snmp/monitordialog.cpp
index 1bda0aa..297a818 100644
--- a/ksim/monitors/snmp/monitordialog.cpp
+++ b/ksim/monitors/snmp/monitordialog.cpp
@@ -37,14 +37,14 @@
using namespace KSim::Snmp;
-MonitorDialog::MonitorDialog( const HostConfigMap &hosts, TQWidget *parent, const char *name )
- : MonitorDialogBase( parent, name ), m_hosts( hosts )
+MonitorDialog::MonitorDialog( const HostConfigMap &hosts, TQWidget *tqparent, const char *name )
+ : MonitorDialogBase( tqparent, name ), m_hosts( hosts )
{
init();
}
-MonitorDialog::MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *parent, const char *name )
- : MonitorDialogBase( parent, name ), m_hosts( hosts )
+MonitorDialog::MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *tqparent, const char *name )
+ : MonitorDialogBase( tqparent, name ), m_hosts( hosts )
{
init( monitor );
}
@@ -144,14 +144,14 @@ void MonitorDialog::init( const MonitorConfig &monitor )
assert( allHosts.findIndex( monitor.host.name ) != -1 );
- host->setCurrentItem( allHosts.findIndex( monitor.host.name ) );
+ host->setCurrentItem( allHosts.tqfindIndex( monitor.host.name ) );
oid->setText( monitor.oid );
updateIntervalMinutes->setValue( monitor.refreshInterval.minutes );
updateIntervalSeconds->setValue( monitor.refreshInterval.seconds );
- displayType->setCurrentItem( allDisplayTypes().findIndex( monitorDisplayTypeToString( monitor.display ) ) );
+ displayType->setCurrentItem( allDisplayTypes().tqfindIndex( monitorDisplayTypeToString( monitor.display ) ) );
customFormatStringCheckBox->setChecked( monitor.useCustomFormatString );
customFormatString->setEnabled( monitor.useCustomFormatString );
@@ -166,7 +166,7 @@ void MonitorDialog::init( const MonitorConfig &monitor )
HostConfig MonitorDialog::currentHost() const
{
- HostConfigMap::ConstIterator hostIt = m_hosts.find( host->currentText() );
+ HostConfigMap::ConstIterator hostIt = m_hosts.tqfind( host->currentText() );
if ( hostIt == m_hosts.end() )
return HostConfig();
diff --git a/ksim/monitors/snmp/monitordialog.h b/ksim/monitors/snmp/monitordialog.h
index b6d0b40..62ab5e2 100644
--- a/ksim/monitors/snmp/monitordialog.h
+++ b/ksim/monitors/snmp/monitordialog.h
@@ -32,9 +32,10 @@ namespace Snmp
class MonitorDialog : public MonitorDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- MonitorDialog( const HostConfigMap &hosts, TQWidget *parent, const char *name = 0 );
- MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *parent, const char *name = 0 );
+ MonitorDialog( const HostConfigMap &hosts, TQWidget *tqparent, const char *name = 0 );
+ MonitorDialog( const MonitorConfig &monitor, const HostConfigMap &hosts, TQWidget *tqparent, const char *name = 0 );
MonitorConfig monitorConfig() const;
diff --git a/ksim/monitors/snmp/monitordialogbase.ui b/ksim/monitors/snmp/monitordialogbase.ui
index 13d6b06..bb6a059 100644
--- a/ksim/monitors/snmp/monitordialogbase.ui
+++ b/ksim/monitors/snmp/monitordialogbase.ui
@@ -22,7 +22,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="4" column="0">
+ <widget class="TQLabel" row="4" column="0">
<property name="name">
<cstring>textLabel5</cstring>
</property>
@@ -30,7 +30,7 @@
<string>Display type:</string>
</property>
</widget>
- <widget class="QLabel" row="3" column="0">
+ <widget class="TQLabel" row="3" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -38,7 +38,7 @@
<string>Update interval:</string>
</property>
</widget>
- <widget class="QLabel" row="2" column="0">
+ <widget class="TQLabel" row="2" column="0">
<property name="name">
<cstring>textLabel1</cstring>
</property>
@@ -46,7 +46,7 @@
<string>Object identifier:</string>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel1_2</cstring>
</property>
@@ -54,7 +54,7 @@
<string>Name:</string>
</property>
</widget>
- <widget class="QLabel" row="1" column="0">
+ <widget class="TQLabel" row="1" column="0">
<property name="name">
<cstring>textLabel1_3</cstring>
</property>
@@ -62,7 +62,7 @@
<string>Host:</string>
</property>
</widget>
- <widget class="QGroupBox" row="5" column="0" rowspan="1" colspan="4">
+ <widget class="TQGroupBox" row="5" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>labelOptions</cstring>
</property>
@@ -73,7 +73,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox" row="0" column="0">
+ <widget class="TQCheckBox" row="0" column="0">
<property name="name">
<cstring>customFormatStringCheckBox</cstring>
</property>
@@ -81,7 +81,7 @@
<string>Use custom format string:</string>
</property>
</widget>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>customFormatString</cstring>
</property>
@@ -89,7 +89,7 @@
<bool>false</bool>
</property>
</widget>
- <widget class="QLabel" row="1" column="0" rowspan="1" colspan="2">
+ <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="2">
<property name="name">
<cstring>textLabel1_4</cstring>
</property>
@@ -104,21 +104,21 @@
<property name="text">
<string>The text in the edit box is what is displayed except that any occurrence of &lt;b&gt;%s&lt;/b&gt; will be replaced with the snmp object value and any occurrence of &lt;b&gt;%n&lt;/b&gt; will be replaced with the name of this monitor (see Name input field) .</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
</grid>
</widget>
- <widget class="QLayoutWidget" row="3" column="1" rowspan="1" colspan="3">
+ <widget class="TQLayoutWidget" row="3" column="1" rowspan="1" colspan="3">
<property name="name">
- <cstring>layout2</cstring>
+ <cstring>tqlayout2</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>updateIntervalMinutes</cstring>
</property>
@@ -126,7 +126,7 @@
<number>60</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel4</cstring>
</property>
@@ -134,7 +134,7 @@
<string>minutes</string>
</property>
</widget>
- <widget class="QSpinBox">
+ <widget class="TQSpinBox">
<property name="name">
<cstring>updateIntervalSeconds</cstring>
</property>
@@ -145,7 +145,7 @@
<number>1</number>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>textLabel3</cstring>
</property>
@@ -163,7 +163,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>141</width>
<height>20</height>
@@ -172,15 +172,15 @@
</spacer>
</hbox>
</widget>
- <widget class="QLayoutWidget" row="4" column="1" rowspan="1" colspan="3">
+ <widget class="TQLayoutWidget" row="4" column="1" rowspan="1" colspan="3">
<property name="name">
- <cstring>layout3</cstring>
+ <cstring>tqlayout3</cstring>
</property>
<hbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QComboBox">
+ <widget class="TQComboBox">
<item>
<property name="text">
<string>Chart</string>
@@ -205,7 +205,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>271</width>
<height>20</height>
@@ -224,14 +224,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>244</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QLineEdit" row="0" column="1">
+ <widget class="TQLineEdit" row="0" column="1">
<property name="name">
<cstring>monitorName</cstring>
</property>
@@ -246,19 +246,19 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>210</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QComboBox" row="1" column="1">
+ <widget class="TQComboBox" row="1" column="1">
<property name="name">
<cstring>host</cstring>
</property>
</widget>
- <widget class="QLayoutWidget" row="9" column="0" rowspan="1" colspan="4">
+ <widget class="TQLayoutWidget" row="9" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -282,14 +282,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -303,7 +303,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonCancel</cstring>
</property>
@@ -330,15 +330,15 @@
<enum>Horizontal</enum>
</property>
</widget>
- <widget class="QLabel" row="7" column="0" rowspan="1" colspan="4">
+ <widget class="TQLabel" row="7" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>status</cstring>
</property>
<property name="text">
- <string>blehStatus</string>
+ <string>blehtqStatus</string>
</property>
</widget>
- <widget class="QGroupBox" row="6" column="0" rowspan="1" colspan="4">
+ <widget class="TQGroupBox" row="6" column="0" rowspan="1" colspan="4">
<property name="name">
<cstring>chartOptions</cstring>
</property>
@@ -349,7 +349,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QCheckBox">
+ <widget class="TQCheckBox">
<property name="name">
<cstring>displayCurrentValueInline</cstring>
</property>
@@ -367,7 +367,7 @@
<string>Browse...</string>
</property>
</widget>
- <widget class="QLineEdit" row="2" column="1" rowspan="1" colspan="2">
+ <widget class="TQLineEdit" row="2" column="1" rowspan="1" colspan="2">
<property name="name">
<cstring>oid</cstring>
</property>
@@ -428,11 +428,11 @@
<tabstop>buttonOk</tabstop>
<tabstop>buttonCancel</tabstop>
</tabstops>
-<slots>
+<Q_SLOTS>
<slot access="protected">checkValues()</slot>
<slot access="protected">browse()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kdialog.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/ksim/monitors/snmp/probedialog.cpp b/ksim/monitors/snmp/probedialog.cpp
index 4667fc3..8edfe69 100644
--- a/ksim/monitors/snmp/probedialog.cpp
+++ b/ksim/monitors/snmp/probedialog.cpp
@@ -38,8 +38,8 @@ static const char * const probeIdentifiers[] =
0
};
-ProbeDialog::ProbeDialog( const HostConfig &hostConfig, TQWidget *parent, const char *name )
- : KProgressDialog( parent, name, i18n( "SNMP Host Probe" ), TQString::null, true /* modal */ ),
+ProbeDialog::ProbeDialog( const HostConfig &hostConfig, TQWidget *tqparent, const char *name )
+ : KProgressDialog( tqparent, name, i18n( "SNMP Host Probe" ), TQString(), true /* modal */ ),
m_host( hostConfig ), m_currentMonitor( 0 ), m_canceled( false )
{
setLabel( i18n( "Probing for common object identifiers..." ) );
@@ -77,7 +77,7 @@ void ProbeDialog::probeOne()
Identifier oid = m_probeOIDs.pop();
delete m_currentMonitor;
- m_currentMonitor = new Monitor( m_host, oid, 0 /* no refresh */, this );
+ m_currentMonitor = new Monitor( m_host, oid, 0 /* no refresh */, TQT_TQOBJECT(this) );
connect( m_currentMonitor, TQT_SIGNAL( newData( const Identifier &, const Value & ) ),
this, TQT_SLOT( probeResult( const Identifier &, const Value & ) ) );
diff --git a/ksim/monitors/snmp/probedialog.h b/ksim/monitors/snmp/probedialog.h
index 9e88eda..9ce949f 100644
--- a/ksim/monitors/snmp/probedialog.h
+++ b/ksim/monitors/snmp/probedialog.h
@@ -38,8 +38,9 @@ class Monitor;
class ProbeDialog : public KProgressDialog
{
Q_OBJECT
+ TQ_OBJECT
public:
- ProbeDialog( const HostConfig &hostConfig, TQWidget *parent, const char *name = 0 );
+ ProbeDialog( const HostConfig &hostConfig, TQWidget *tqparent, const char *name = 0 );
struct ProbeResult
{
diff --git a/ksim/monitors/snmp/proberesultdialog.cpp b/ksim/monitors/snmp/proberesultdialog.cpp
index bed1e21..fbdd4e6 100644
--- a/ksim/monitors/snmp/proberesultdialog.cpp
+++ b/ksim/monitors/snmp/proberesultdialog.cpp
@@ -27,10 +27,10 @@
using namespace KSim::Snmp;
ProbeResultDialog::ProbeResultDialog( const HostConfig &hostConfig, const ProbeDialog::ProbeResultList &probeResults,
- TQWidget *parent, const char *name )
- : ProbeResultDialogBase( parent, name )
+ TQWidget *tqparent, const char *name )
+ : ProbeResultDialogBase( tqparent, name )
{
- info->setText( i18n( "Results of scanning host %1:" ).arg( hostConfig.name ) );
+ info->setText( i18n( "Results of scanning host %1:" ).tqarg( hostConfig.name ) );
for ( ProbeDialog::ProbeResultList::ConstIterator it = probeResults.begin();
it != probeResults.end(); ++it )
diff --git a/ksim/monitors/snmp/proberesultdialog.h b/ksim/monitors/snmp/proberesultdialog.h
index 2166a69..47e012a 100644
--- a/ksim/monitors/snmp/proberesultdialog.h
+++ b/ksim/monitors/snmp/proberesultdialog.h
@@ -33,9 +33,10 @@ namespace Snmp
class ProbeResultDialog : public ProbeResultDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
ProbeResultDialog( const HostConfig &hostConfig, const ProbeDialog::ProbeResultList &probeResults,
- TQWidget *parent, const char *name = 0 );
+ TQWidget *tqparent, const char *name = 0 );
private:
void addResultItem( const ProbeDialog::ProbeResult &result );
diff --git a/ksim/monitors/snmp/proberesultdialogbase.ui b/ksim/monitors/snmp/proberesultdialogbase.ui
index 01b0c70..be32c72 100644
--- a/ksim/monitors/snmp/proberesultdialogbase.ui
+++ b/ksim/monitors/snmp/proberesultdialogbase.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
<class>KSim::Snmp::ProbeResultDialogBase</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>ProbeResultDialogBase</cstring>
</property>
@@ -22,7 +22,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>info</cstring>
</property>
@@ -60,7 +60,7 @@
<bool>true</bool>
</property>
</widget>
- <widget class="QLayoutWidget">
+ <widget class="TQLayoutWidget">
<property name="name">
<cstring>Layout1</cstring>
</property>
@@ -84,14 +84,14 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
- <widget class="QPushButton">
+ <widget class="TQPushButton">
<property name="name">
<cstring>buttonOk</cstring>
</property>
@@ -117,7 +117,7 @@
<slot>accept()</slot>
</connection>
</connections>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>klistview.h</includehint>
</includehints>
diff --git a/ksim/monitors/snmp/session.cpp b/ksim/monitors/snmp/session.cpp
index 6d63fab..07dc77e 100644
--- a/ksim/monitors/snmp/session.cpp
+++ b/ksim/monitors/snmp/session.cpp
@@ -54,7 +54,7 @@ Session::Session( const HostConfig &source )
d->source = source;
- // unicode madness
+ // tqunicode madness
d->host = source.name.ascii();
d->community = source.community.ascii();
d->securityName = source.securityName.ascii();
@@ -235,7 +235,7 @@ bool Session::snmpGet( const Identifier &identifier, Value &value, ErrorInfo *er
if ( !snmpGet( ids, vars, error ) )
return false;
- ValueMap::ConstIterator it = vars.find( identifier );
+ ValueMap::ConstIterator it = vars.tqfind( identifier );
if ( it == vars.end() ) {
if ( error )
*error = ErrorInfo( ErrorInfo::ErrMissingVariables );
diff --git a/ksim/monitors/snmp/snmp.cpp b/ksim/monitors/snmp/snmp.cpp
index a050acb..d79c596 100644
--- a/ksim/monitors/snmp/snmp.cpp
+++ b/ksim/monitors/snmp/snmp.cpp
@@ -57,7 +57,7 @@ static TQStringList allStrings( const EnumStringMapInfo *array )
{
TQStringList result;
for ( uint i = 0; array[ i ].stringValue; ++i )
- result << TQString::fromLatin1( array[ i ].stringValue );
+ result << TQString::tqfromLatin1( array[ i ].stringValue );
return result;
}
@@ -65,10 +65,10 @@ static TQString enumToString( const EnumStringMapInfo *array, int value )
{
for ( uint i = 0; array[ i ].stringValue; ++i )
if ( array[ i ].enumValue == value )
- return TQString::fromLatin1( array[ i ].stringValue );
+ return TQString::tqfromLatin1( array[ i ].stringValue );
assert( false );
- return TQString::null;
+ return TQString();
}
static int stringToEnum( const EnumStringMapInfo *array, TQString string, bool *ok )
@@ -76,7 +76,7 @@ static int stringToEnum( const EnumStringMapInfo *array, TQString string, bool *
string = string.lower();
uint i;
for ( i = 0; array[ i ].stringValue; ++i )
- if ( TQString::fromLatin1( array[ i ].stringValue ).lower() == string ) {
+ if ( TQString::tqfromLatin1( array[ i ].stringValue ).lower() == string ) {
if ( ok ) *ok = true;
return array[ i ].enumValue;
}
@@ -291,11 +291,11 @@ int KSim::Snmp::sessionErrorCode( netsnmp_session &session )
static TQString messageForErrorCode( int errorCode )
{
if ( errorCode >= SNMPERR_MAX && errorCode <= SNMPERR_GENERR )
- return TQString::fromLatin1( SnmpLib::self()->snmp_api_errstring( errorCode ) );
+ return TQString::tqfromLatin1( SnmpLib::self()->snmp_api_errstring( errorCode ) );
if ( errorCode >= SNMP_ERR_NOERROR && errorCode <= MAX_SNMP_ERR )
- return TQString::fromLatin1( SnmpLib::self()->snmp_errstring( errorCode ) );
+ return TQString::tqfromLatin1( SnmpLib::self()->snmp_errstring( errorCode ) );
- return TQString::null;
+ return TQString();
}
ErrorInfo::ErrorInfo()
diff --git a/ksim/monitors/snmp/value.cpp b/ksim/monitors/snmp/value.cpp
index a244c59..2803aec 100644
--- a/ksim/monitors/snmp/value.cpp
+++ b/ksim/monitors/snmp/value.cpp
@@ -79,7 +79,7 @@ ValueImpl::ValueImpl( variable_list *var )
}
case ASN_COUNTER64: {
type = Value::Counter64;
- ctr64 = ( ( ( Q_UINT64 )var->val.counter64->high ) << 32 ) | ( var->val.counter64->low );
+ ctr64 = ( ( ( TQ_UINT64 )var->val.counter64->high ) << 32 ) | ( var->val.counter64->low );
break;
}
case ASN_TIMETICKS: {
@@ -176,7 +176,7 @@ Value::Value( const TQHostAddress &address )
d->addr = address;
}
-Value::Value( Q_UINT64 counter )
+Value::Value( TQ_UINT64 counter )
{
d = new ValueImpl;
d->type = Counter64;
@@ -273,7 +273,7 @@ int Value::toTimeTicks() const
return toInt();
}
-Q_UINT64 Value::toCounter64() const
+TQ_UINT64 Value::toCounter64() const
{
assert( d->type == Counter64 );
return d->ctr64;
@@ -294,13 +294,13 @@ TQString Value::toString( int conversionFlags ) const
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 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::NoSuchObject: return TQString::tqfromLatin1( "No Such Object" );
+ case Value::NoSuchInstance: return TQString::tqfromLatin1( "No Such Instance" );
+ case Value::EndOfMIBView: return TQString::tqfromLatin1( "End Of MIB View" );
case Value::Invalid:
- case Value::Null: return TQString::null;
+ case Value::Null: return TQString();
}
- return TQString::null;
+ return TQString();
}
TQString Value::formatTimeTicks( int ticks, int conversionFlags )
@@ -321,7 +321,7 @@ TQString Value::formatTimeTicks( int ticks, int conversionFlags )
if ( days > 0 )
result += TQString::number( days ) + "d:";
- result += TQString::fromAscii( "%1h:%2m" ).arg( hours ).arg( minutes );
+ result += TQString(TQString::fromAscii( "%1h:%2m" )).tqarg( hours ).tqarg( minutes );
if ( conversionFlags & TimeTicksWithSeconds )
result += ":" + TQString::number( seconds ) + "s";
diff --git a/ksim/monitors/snmp/value.h b/ksim/monitors/snmp/value.h
index 5b2d6cd..d1461d8 100644
--- a/ksim/monitors/snmp/value.h
+++ b/ksim/monitors/snmp/value.h
@@ -68,7 +68,7 @@ public:
Value( const TQByteArray &data );
Value( const Identifier &oid );
Value( const TQHostAddress &address );
- Value( Q_UINT64 counter );
+ Value( TQ_UINT64 counter );
Value( const Value &rhs );
Value &operator=( const Value &rhs );
@@ -87,7 +87,7 @@ public:
uint toCounter() const;
uint toGauge() const;
int toTimeTicks() const;
- Q_UINT64 toCounter64() const;
+ TQ_UINT64 toCounter64() const;
TQString toString( int conversionFlags = 0 ) const;
diff --git a/ksim/monitors/snmp/value_p.h b/ksim/monitors/snmp/value_p.h
index 000c32d..4ff2d8f 100644
--- a/ksim/monitors/snmp/value_p.h
+++ b/ksim/monitors/snmp/value_p.h
@@ -51,7 +51,7 @@ struct ValueImpl
TQVariant data;
Identifier oid;
TQHostAddress addr;
- Q_UINT64 ctr64;
+ TQ_UINT64 ctr64;
};
}
diff --git a/ksim/monitors/snmp/view.cpp b/ksim/monitors/snmp/view.cpp
index 9515645..c6482ab 100644
--- a/ksim/monitors/snmp/view.cpp
+++ b/ksim/monitors/snmp/view.cpp
@@ -29,8 +29,8 @@
using namespace KSim::Snmp;
-View::View( Plugin *parent, const char *name )
- : KSim::PluginView( parent, name )
+View::View( Plugin *tqparent, const char *name )
+ : KSim::PluginView( tqparent, name )
{
m_layout = new TQVBoxLayout( this );
diff --git a/ksim/monitors/snmp/view.h b/ksim/monitors/snmp/view.h
index 01e29e3..af27e23 100644
--- a/ksim/monitors/snmp/view.h
+++ b/ksim/monitors/snmp/view.h
@@ -35,8 +35,9 @@ class Plugin;
class View : public KSim::PluginView
{
Q_OBJECT
+ TQ_OBJECT
public:
- View( Plugin *parent, const char *name );
+ View( Plugin *tqparent, const char *name );
~View();
virtual void reparseConfig();
diff --git a/ksim/monitors/snmp/walker.cpp b/ksim/monitors/snmp/walker.cpp
index 0aa6c0a..70af99d 100644
--- a/ksim/monitors/snmp/walker.cpp
+++ b/ksim/monitors/snmp/walker.cpp
@@ -38,8 +38,8 @@ namespace
static const uint walkerRefresh = 0;
-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 )
+Walker::Walker( const HostConfig &host, const Identifier &startOid, TQObject *tqparent, const char *name )
+ : TQObject( tqparent, name ), m_stop( false ), m_oid( startOid ), m_session( host )
{
m_timerId = startTimer( walkerRefresh );
start();
diff --git a/ksim/monitors/snmp/walker.h b/ksim/monitors/snmp/walker.h
index 3ff38b7..c9f8e52 100644
--- a/ksim/monitors/snmp/walker.h
+++ b/ksim/monitors/snmp/walker.h
@@ -33,11 +33,12 @@ namespace KSim
namespace Snmp
{
-class Walker : public TQObject, public QThread
+class Walker : public TQObject, public TQThread
{
Q_OBJECT
+ TQ_OBJECT
public:
- Walker( const HostConfig &host, const Identifier &startOid, TQObject *parent, const char *name = 0 );
+ Walker( const HostConfig &host, const Identifier &startOid, TQObject *tqparent, const char *name = 0 );
virtual ~Walker();
struct Result