summaryrefslogtreecommitdiffstats
path: root/ksysguard/gui
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:33:34 +0000
commitc663b6440964f6ac48027143ac9e63298991f9d0 (patch)
tree6d8b0c5a5f9db1ee16acf98b1397cea9126b281d /ksysguard/gui
parenta061f7191beebb0e4a3b0c0a7c534ec5f22f2dc7 (diff)
downloadtdebase-c663b6440964f6ac48027143ac9e63298991f9d0.tar.gz
tdebase-c663b6440964f6ac48027143ac9e63298991f9d0.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksysguard/gui')
-rw-r--r--ksysguard/gui/KSGAppletSettings.cc28
-rw-r--r--ksysguard/gui/KSGAppletSettings.h8
-rw-r--r--ksysguard/gui/KSysGuardApplet.cc122
-rw-r--r--ksysguard/gui/KSysGuardApplet.h18
-rw-r--r--ksysguard/gui/SensorBrowser.cc126
-rw-r--r--ksysguard/gui/SensorBrowser.h70
-rw-r--r--ksysguard/gui/SensorDisplayLib/BarGraph.cc28
-rw-r--r--ksysguard/gui/SensorDisplayLib/BarGraph.h24
-rw-r--r--ksysguard/gui/SensorDisplayLib/DancingBars.cc68
-rw-r--r--ksysguard/gui/SensorDisplayLib/DancingBars.h26
-rw-r--r--ksysguard/gui/SensorDisplayLib/DancingBarsSettings.cc138
-rw-r--r--ksysguard/gui/SensorDisplayLib/DancingBarsSettings.h32
-rw-r--r--ksysguard/gui/SensorDisplayLib/DummyDisplay.cc18
-rw-r--r--ksysguard/gui/SensorDisplayLib/DummyDisplay.h8
-rw-r--r--ksysguard/gui/SensorDisplayLib/FancyPlotter.cc98
-rw-r--r--ksysguard/gui/SensorDisplayLib/FancyPlotter.h38
-rw-r--r--ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.cc252
-rw-r--r--ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.h54
-rw-r--r--ksysguard/gui/SensorDisplayLib/ListView.cc96
-rw-r--r--ksysguard/gui/SensorDisplayLib/ListView.h42
-rw-r--r--ksysguard/gui/SensorDisplayLib/ListViewSettings.cc18
-rw-r--r--ksysguard/gui/SensorDisplayLib/ListViewSettings.h22
-rw-r--r--ksysguard/gui/SensorDisplayLib/ListViewSettingsWidget.ui.h16
-rw-r--r--ksysguard/gui/SensorDisplayLib/LogFile.cc92
-rw-r--r--ksysguard/gui/SensorDisplayLib/LogFile.h28
-rw-r--r--ksysguard/gui/SensorDisplayLib/MultiMeter.cc52
-rw-r--r--ksysguard/gui/SensorDisplayLib/MultiMeter.h26
-rw-r--r--ksysguard/gui/SensorDisplayLib/MultiMeterSettings.cc18
-rw-r--r--ksysguard/gui/SensorDisplayLib/MultiMeterSettings.h22
-rw-r--r--ksysguard/gui/SensorDisplayLib/MultiMeterSettingsWidget.ui.h20
-rw-r--r--ksysguard/gui/SensorDisplayLib/ProcessController.cc122
-rw-r--r--ksysguard/gui/SensorDisplayLib/ProcessController.h32
-rw-r--r--ksysguard/gui/SensorDisplayLib/ProcessList.cc298
-rw-r--r--ksysguard/gui/SensorDisplayLib/ProcessList.h66
-rw-r--r--ksysguard/gui/SensorDisplayLib/ReniceDlg.cc10
-rw-r--r--ksysguard/gui/SensorDisplayLib/ReniceDlg.h20
-rw-r--r--ksysguard/gui/SensorDisplayLib/SensorDisplay.cc132
-rw-r--r--ksysguard/gui/SensorDisplayLib/SensorDisplay.h106
-rw-r--r--ksysguard/gui/SensorDisplayLib/SensorLogger.cc110
-rw-r--r--ksysguard/gui/SensorDisplayLib/SensorLogger.h88
-rw-r--r--ksysguard/gui/SensorDisplayLib/SensorLoggerDlg.cc12
-rw-r--r--ksysguard/gui/SensorDisplayLib/SensorLoggerDlg.h10
-rw-r--r--ksysguard/gui/SensorDisplayLib/SensorLoggerDlgWidget.ui.h8
-rw-r--r--ksysguard/gui/SensorDisplayLib/SensorLoggerSettings.cc18
-rw-r--r--ksysguard/gui/SensorDisplayLib/SensorLoggerSettings.h22
-rw-r--r--ksysguard/gui/SensorDisplayLib/SensorLoggerSettingsWidget.ui.h16
-rw-r--r--ksysguard/gui/SensorDisplayLib/SignalPlotter.cc72
-rw-r--r--ksysguard/gui/SensorDisplayLib/SignalPlotter.h50
-rw-r--r--ksysguard/gui/WorkSheet.cc138
-rw-r--r--ksysguard/gui/WorkSheet.h52
-rw-r--r--ksysguard/gui/WorkSheetSettings.cc48
-rw-r--r--ksysguard/gui/WorkSheetSettings.h6
-rw-r--r--ksysguard/gui/Workspace.cc90
-rw-r--r--ksysguard/gui/Workspace.h22
-rw-r--r--ksysguard/gui/ksgrd/HostConnector.cc96
-rw-r--r--ksysguard/gui/ksgrd/HostConnector.h30
-rw-r--r--ksysguard/gui/ksgrd/SensorAgent.cc22
-rw-r--r--ksysguard/gui/ksgrd/SensorAgent.h36
-rw-r--r--ksysguard/gui/ksgrd/SensorClient.h30
-rw-r--r--ksysguard/gui/ksgrd/SensorManager.cc238
-rw-r--r--ksysguard/gui/ksgrd/SensorManager.h54
-rw-r--r--ksysguard/gui/ksgrd/SensorShellAgent.cc28
-rw-r--r--ksysguard/gui/ksgrd/SensorShellAgent.h18
-rw-r--r--ksysguard/gui/ksgrd/SensorSocketAgent.cc22
-rw-r--r--ksysguard/gui/ksgrd/SensorSocketAgent.h8
-rw-r--r--ksysguard/gui/ksgrd/StyleEngine.cc48
-rw-r--r--ksysguard/gui/ksgrd/StyleEngine.h26
-rw-r--r--ksysguard/gui/ksgrd/StyleSettings.cc84
-rw-r--r--ksysguard/gui/ksgrd/StyleSettings.h32
-rw-r--r--ksysguard/gui/ksgrd/TimerSettings.cc28
-rw-r--r--ksysguard/gui/ksgrd/TimerSettings.h8
-rw-r--r--ksysguard/gui/ksysguard.cc124
-rw-r--r--ksysguard/gui/ksysguard.h28
73 files changed, 2058 insertions, 2058 deletions
diff --git a/ksysguard/gui/KSGAppletSettings.cc b/ksysguard/gui/KSGAppletSettings.cc
index df4748cb8..5160dbddb 100644
--- a/ksysguard/gui/KSGAppletSettings.cc
+++ b/ksysguard/gui/KSGAppletSettings.cc
@@ -18,54 +18,54 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
#include <kaccelmanager.h>
#include <klocale.h>
#include "KSGAppletSettings.h"
-KSGAppletSettings::KSGAppletSettings( QWidget *parent, const char *name )
- : KDialogBase( parent, name, false, QString::null, Ok|Apply|Cancel,
+KSGAppletSettings::KSGAppletSettings( TQWidget *parent, const char *name )
+ : KDialogBase( parent, name, false, TQString::null, Ok|Apply|Cancel,
Ok, true )
{
setCaption( i18n( "System Guard Settings" ) );
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget( page );
- QGridLayout *topLayout = new QGridLayout( page, 3, 2, KDialog::marginHint(),
+ TQGridLayout *topLayout = new TQGridLayout( page, 3, 2, KDialog::marginHint(),
KDialog::spacingHint() );
- QLabel *label = new QLabel( i18n( "Number of displays:" ), page );
+ TQLabel *label = new TQLabel( i18n( "Number of displays:" ), page );
topLayout->addWidget( label, 0, 0 );
- mNumDisplay = new QSpinBox( 1, 32, 1, page );
+ mNumDisplay = new TQSpinBox( 1, 32, 1, page );
mNumDisplay->setValue(2);
topLayout->addWidget( mNumDisplay, 0, 1 );
label->setBuddy( mNumDisplay );
- label = new QLabel( i18n( "Size ratio:" ), page );
+ label = new TQLabel( i18n( "Size ratio:" ), page );
topLayout->addWidget( label, 1, 0 );
- mSizeRatio = new QSpinBox( 50, 500, 50, page );
+ mSizeRatio = new TQSpinBox( 50, 500, 50, page );
mSizeRatio->setSuffix( i18n( "%" ) );
mSizeRatio->setValue(100);
topLayout->addWidget( mSizeRatio, 1, 1 );
label->setBuddy( mSizeRatio );
- label = new QLabel( i18n( "Update interval:" ), page );
+ label = new TQLabel( i18n( "Update interval:" ), page );
topLayout->addWidget( label, 2, 0 );
- mInterval = new QSpinBox( 1, 300, 1, page );
+ mInterval = new TQSpinBox( 1, 300, 1, page );
mInterval->setValue(2);
mInterval->setSuffix( i18n( " sec" ) );
topLayout->addWidget( mInterval, 2, 1 );
label->setBuddy( mInterval );
- resize( QSize( 250, 130 ).expandedTo( minimumSizeHint() ) );
+ resize( TQSize( 250, 130 ).expandedTo( minimumSizeHint() ) );
KAcceleratorManager::manage( page );
}
diff --git a/ksysguard/gui/KSGAppletSettings.h b/ksysguard/gui/KSGAppletSettings.h
index a825e2841..5fca4aa35 100644
--- a/ksysguard/gui/KSGAppletSettings.h
+++ b/ksysguard/gui/KSGAppletSettings.h
@@ -28,7 +28,7 @@ class QSpinBox;
class KSGAppletSettings : public KDialogBase
{
public:
- KSGAppletSettings( QWidget *parent = 0, const char *name = 0 );
+ KSGAppletSettings( TQWidget *parent = 0, const char *name = 0 );
~KSGAppletSettings();
void setNumDisplay( int );
@@ -41,9 +41,9 @@ class KSGAppletSettings : public KDialogBase
int updateInterval() const;
private:
- QSpinBox *mInterval;
- QSpinBox *mNumDisplay;
- QSpinBox *mSizeRatio;
+ TQSpinBox *mInterval;
+ TQSpinBox *mNumDisplay;
+ TQSpinBox *mSizeRatio;
};
#endif
diff --git a/ksysguard/gui/KSysGuardApplet.cc b/ksysguard/gui/KSysGuardApplet.cc
index 5240a068b..245600cb6 100644
--- a/ksysguard/gui/KSysGuardApplet.cc
+++ b/ksysguard/gui/KSysGuardApplet.cc
@@ -22,13 +22,13 @@
*/
-#include <qcursor.h>
-#include <qdom.h>
-#include <qdragobject.h>
-#include <qfile.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qtooltip.h>
+#include <tqcursor.h>
+#include <tqdom.h>
+#include <tqdragobject.h>
+#include <tqfile.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <klocale.h>
@@ -50,7 +50,7 @@
extern "C"
{
- KDE_EXPORT KPanelApplet* init( QWidget *parent, const QString& configFile )
+ KDE_EXPORT KPanelApplet* init( TQWidget *parent, const TQString& configFile )
{
KGlobal::locale()->insertCatalogue( "ksysguard" );
return new KSysGuardApplet( configFile, KPanelApplet::Normal,
@@ -59,8 +59,8 @@ extern "C"
}
}
-KSysGuardApplet::KSysGuardApplet( const QString& configFile, Type type,
- int actions, QWidget *parent,
+KSysGuardApplet::KSysGuardApplet( const TQString& configFile, Type type,
+ int actions, TQWidget *parent,
const char *name )
: KPanelApplet( configFile, type, actions, parent, name)
{
@@ -71,7 +71,7 @@ KSysGuardApplet::KSysGuardApplet( const QString& configFile, Type type,
KSGRD::Style = new KSGRD::StyleEngine();
mDockCount = 1;
- mDockList = new QWidget*[ mDockCount ];
+ mDockList = new TQWidget*[ mDockCount ];
mSizeRatio = 1.0;
addEmptyDisplay( mDockList, 0 );
@@ -108,7 +108,7 @@ int KSysGuardApplet::heightForWidth( int width ) const
return ( (int) ( width * mSizeRatio + 0.5 ) * mDockCount );
}
-void KSysGuardApplet::resizeEvent( QResizeEvent* )
+void KSysGuardApplet::resizeEvent( TQResizeEvent* )
{
layout();
}
@@ -120,9 +120,9 @@ void KSysGuardApplet::preferences()
}
mSettingsDlg = new KSGAppletSettings( this );
- connect( mSettingsDlg, SIGNAL( applyClicked() ), SLOT( applySettings() ) );
- connect( mSettingsDlg, SIGNAL( okClicked() ), SLOT( applySettings() ) );
- connect( mSettingsDlg, SIGNAL( finished() ), SLOT( preferencesFinished() ) );
+ connect( mSettingsDlg, TQT_SIGNAL( applyClicked() ), TQT_SLOT( applySettings() ) );
+ connect( mSettingsDlg, TQT_SIGNAL( okClicked() ), TQT_SLOT( applySettings() ) );
+ connect( mSettingsDlg, TQT_SIGNAL( finished() ), TQT_SLOT( preferencesFinished() ) );
mSettingsDlg->setNumDisplay( mDockCount );
mSettingsDlg->setSizeRatio( (int) ( mSizeRatio * 100.0 + 0.5 ) );
@@ -142,7 +142,7 @@ void KSysGuardApplet::applySettings()
resizeDocks( mSettingsDlg->numDisplay() );
for ( uint i = 0; i < mDockCount; ++i )
- if ( !mDockList[ i ]->isA( "QFrame" ) )
+ if ( !mDockList[ i ]->isA( "TQFrame" ) )
((KSGRD::SensorDisplay*)mDockList[ i ])->setUpdateInterval( updateInterval() );
save();
@@ -171,7 +171,7 @@ void KSysGuardApplet::layout()
}
}
-int KSysGuardApplet::findDock( const QPoint& point )
+int KSysGuardApplet::findDock( const TQPoint& point )
{
if ( orientation() == Horizontal )
return ( point.x() / (int) ( height() * mSizeRatio + 0.5 ) );
@@ -179,38 +179,38 @@ int KSysGuardApplet::findDock( const QPoint& point )
return ( point.y() / (int) ( width() * mSizeRatio + 0.5 ) );
}
-void KSysGuardApplet::dragEnterEvent( QDragEnterEvent *e )
+void KSysGuardApplet::dragEnterEvent( TQDragEnterEvent *e )
{
- e->accept( QTextDrag::canDecode( e ) );
+ e->accept( TQTextDrag::canDecode( e ) );
}
-void KSysGuardApplet::dropEvent( QDropEvent *e )
+void KSysGuardApplet::dropEvent( TQDropEvent *e )
{
- QString dragObject;
+ TQString dragObject;
- if ( QTextDrag::decode( e, dragObject ) ) {
+ if ( TQTextDrag::decode( e, dragObject ) ) {
// The host name, sensor name and type are seperated by a ' '.
- QStringList parts = QStringList::split( ' ', dragObject );
+ TQStringList parts = TQStringList::split( ' ', dragObject );
- QString hostName = parts[ 0 ];
- QString sensorName = parts[ 1 ];
- QString sensorType = parts[ 2 ];
- QString sensorDescr = parts[ 3 ];
+ TQString hostName = parts[ 0 ];
+ TQString sensorName = parts[ 1 ];
+ TQString sensorType = parts[ 2 ];
+ TQString sensorDescr = parts[ 3 ];
if ( hostName.isEmpty() || sensorName.isEmpty() || sensorType.isEmpty() )
return;
int dock = findDock( e->pos() );
- if ( mDockList[ dock ]->isA( "QFrame" ) ) {
+ if ( mDockList[ dock ]->isA( "TQFrame" ) ) {
if ( sensorType == "integer" || sensorType == "float" ) {
KPopupMenu popup;
- QWidget *wdg = 0;
+ TQWidget *wdg = 0;
popup.insertTitle( i18n( "Select Display Type" ) );
popup.insertItem( i18n( "&Signal Plotter" ), 1 );
popup.insertItem( i18n( "&Multimeter" ), 2 );
popup.insertItem( i18n( "&Dancing Bars" ), 3 );
- switch ( popup.exec( QCursor::pos() ) ) {
+ switch ( popup.exec( TQCursor::pos() ) ) {
case 1:
wdg = new FancyPlotter( this, "FancyPlotter", sensorDescr,
100.0, 100.0, true );
@@ -232,8 +232,8 @@ void KSysGuardApplet::dropEvent( QDropEvent *e )
mDockList[ dock ] = wdg;
layout();
- connect( wdg, SIGNAL( modified( bool ) ),
- SLOT( sensorDisplayModified( bool ) ) );
+ connect( wdg, TQT_SIGNAL( modified( bool ) ),
+ TQT_SLOT( sensorDisplayModified( bool ) ) );
mDockList[ dock ]->show();
}
@@ -246,7 +246,7 @@ void KSysGuardApplet::dropEvent( QDropEvent *e )
}
}
- if ( !mDockList[ dock ]->isA( "QFrame" ) )
+ if ( !mDockList[ dock ]->isA( "TQFrame" ) )
((KSGRD::SensorDisplay*)mDockList[ dock ])->
addSensor( hostName, sensorName, sensorType, sensorDescr );
}
@@ -254,9 +254,9 @@ void KSysGuardApplet::dropEvent( QDropEvent *e )
save();
}
-void KSysGuardApplet::customEvent( QCustomEvent *e )
+void KSysGuardApplet::customEvent( TQCustomEvent *e )
{
- if ( e->type() == QEvent::User ) {
+ if ( e->type() == TQEvent::User ) {
// SensorDisplays send out this event if they want to be removed.
removeDisplay( (KSGRD::SensorDisplay*)e->data() );
save();
@@ -286,7 +286,7 @@ void KSysGuardApplet::resizeDocks( uint newDockCount )
}
// Create and initialize new dock array.
- QWidget** tmp = new QWidget*[ newDockCount ];
+ TQWidget** tmp = new TQWidget*[ newDockCount ];
uint i;
for ( i = 0; ( i < newDockCount ) && ( i < mDockCount ); ++i )
@@ -311,16 +311,16 @@ bool KSysGuardApplet::load()
{
KStandardDirs* kstd = KGlobal::dirs();
kstd->addResourceType( "data", "share/apps/ksysguard" );
- QString fileName = kstd->findResource( "data", "KSysGuardApplet.xml" );
+ TQString fileName = kstd->findResource( "data", "KSysGuardApplet.xml" );
- QFile file( fileName );
+ TQFile file( fileName );
if ( !file.open( IO_ReadOnly ) ) {
KMessageBox::sorry( this, i18n( "Cannot open the file %1." ).arg( fileName ) );
return false;
}
// Parse the XML file.
- QDomDocument doc;
+ TQDomDocument doc;
// Read in file and check for a valid XML header.
if ( !doc.setContent( &file ) ) {
@@ -337,7 +337,7 @@ bool KSysGuardApplet::load()
return false;
}
- QDomElement element = doc.documentElement();
+ TQDomElement element = doc.documentElement();
bool ok;
uint count = element.attribute( "dockCnt" ).toUInt( &ok );
if ( !ok )
@@ -355,10 +355,10 @@ bool KSysGuardApplet::load()
/* Load lists of hosts that are needed for the work sheet and try
* to establish a connection. */
- QDomNodeList dnList = element.elementsByTagName( "host" );
+ TQDomNodeList dnList = element.elementsByTagName( "host" );
uint i;
for ( i = 0; i < dnList.count(); ++i ) {
- QDomElement element = dnList.item( i ).toElement();
+ TQDomElement element = dnList.item( i ).toElement();
int port = element.attribute( "port" ).toInt( &ok );
if ( !ok )
port = -1;
@@ -374,7 +374,7 @@ bool KSysGuardApplet::load()
// Load the displays and place them into the work sheet.
dnList = element.elementsByTagName( "display" );
for ( i = 0; i < dnList.count(); ++i ) {
- QDomElement element = dnList.item( i ).toElement();
+ TQDomElement element = dnList.item( i ).toElement();
uint dock = element.attribute( "dock" ).toUInt();
if ( i >= mDockCount ) {
kdDebug (1215) << "Dock number " << i << " out of range "
@@ -382,7 +382,7 @@ bool KSysGuardApplet::load()
return false;
}
- QString classType = element.attribute( "class" );
+ TQString classType = element.attribute( "class" );
KSGRD::SensorDisplay* newDisplay;
if ( classType == "FancyPlotter" )
newDisplay = new FancyPlotter( this, "FancyPlotter", "Dummy", 100.0, 100.0, true /*no frame*/, true /*run ksysguard menu*/);
@@ -405,8 +405,8 @@ bool KSysGuardApplet::load()
delete mDockList[ dock ];
mDockList[ dock ] = newDisplay;
- connect( newDisplay, SIGNAL( modified( bool ) ),
- SLOT( sensorDisplayModified( bool ) ) );
+ connect( newDisplay, TQT_SIGNAL( modified( bool ) ),
+ TQT_SLOT( sensorDisplayModified( bool ) ) );
}
return true;
@@ -415,31 +415,31 @@ bool KSysGuardApplet::load()
bool KSysGuardApplet::save()
{
// Parse the XML file.
- QDomDocument doc( "KSysGuardApplet" );
+ TQDomDocument doc( "KSysGuardApplet" );
doc.appendChild( doc.createProcessingInstruction(
"xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
// save work sheet information
- QDomElement ws = doc.createElement( "WorkSheet" );
+ TQDomElement ws = doc.createElement( "WorkSheet" );
doc.appendChild( ws );
ws.setAttribute( "dockCnt", mDockCount );
ws.setAttribute( "sizeRatio", mSizeRatio );
ws.setAttribute( "interval", updateInterval() );
- QStringList hosts;
+ TQStringList hosts;
uint i;
for ( i = 0; i < mDockCount; ++i )
- if ( !mDockList[ i ]->isA( "QFrame" ) )
+ if ( !mDockList[ i ]->isA( "TQFrame" ) )
((KSGRD::SensorDisplay*)mDockList[ i ])->hosts( hosts );
// save host information (name, shell, etc.)
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = hosts.begin(); it != hosts.end(); ++it ) {
- QString shell, command;
+ TQString shell, command;
int port;
if ( KSGRD::SensorMgr->hostInfo( *it, shell, command, port ) ) {
- QDomElement host = doc.createElement( "host" );
+ TQDomElement host = doc.createElement( "host" );
ws.appendChild( host );
host.setAttribute( "name", *it );
host.setAttribute( "shell", shell );
@@ -449,8 +449,8 @@ bool KSysGuardApplet::save()
}
for ( i = 0; i < mDockCount; ++i )
- if ( !mDockList[ i ]->isA( "QFrame" ) ) {
- QDomElement element = doc.createElement( "display" );
+ if ( !mDockList[ i ]->isA( "TQFrame" ) ) {
+ TQDomElement element = doc.createElement( "display" );
ws.appendChild( element );
element.setAttribute( "dock", i );
element.setAttribute( "class", mDockList[ i ]->className() );
@@ -460,14 +460,14 @@ bool KSysGuardApplet::save()
KStandardDirs* kstd = KGlobal::dirs();
kstd->addResourceType( "data", "share/apps/ksysguard" );
- QString fileName = kstd->saveLocation( "data", "ksysguard" );
+ TQString fileName = kstd->saveLocation( "data", "ksysguard" );
fileName += "/KSysGuardApplet.xml";
KSaveFile file( fileName, 0644 );
if ( file.status() == 0 )
{
- file.textStream()->setEncoding( QTextStream::UnicodeUTF8 );
+ file.textStream()->setEncoding( TQTextStream::UnicodeUTF8 );
*(file.textStream()) << doc;
file.close();
}
@@ -480,11 +480,11 @@ bool KSysGuardApplet::save()
return true;
}
-void KSysGuardApplet::addEmptyDisplay( QWidget **dock, uint pos )
+void KSysGuardApplet::addEmptyDisplay( TQWidget **dock, uint pos )
{
- dock[ pos ] = new QFrame( this );
- ((QFrame*)dock[ pos ])->setFrameStyle( QFrame::WinPanel | QFrame::Sunken );
- QToolTip::add( dock[ pos ],
+ dock[ pos ] = new TQFrame( this );
+ ((TQFrame*)dock[ pos ])->setFrameStyle( TQFrame::WinPanel | TQFrame::Sunken );
+ TQToolTip::add( dock[ pos ],
i18n( "Drag sensors from the KDE System Guard into this cell." ) );
layout();
diff --git a/ksysguard/gui/KSysGuardApplet.h b/ksysguard/gui/KSysGuardApplet.h
index b9d91091e..063df2154 100644
--- a/ksysguard/gui/KSysGuardApplet.h
+++ b/ksysguard/gui/KSysGuardApplet.h
@@ -43,8 +43,8 @@ class KSysGuardApplet : public KPanelApplet, public KSGRD::SensorBoard
Q_OBJECT
public:
- KSysGuardApplet( const QString& configFile, Type type = Normal,
- int actions = 0, QWidget *parent = 0,
+ KSysGuardApplet( const TQString& configFile, Type type = Normal,
+ int actions = 0, TQWidget *parent = 0,
const char *name = 0 );
virtual ~KSysGuardApplet();
@@ -54,10 +54,10 @@ class KSysGuardApplet : public KPanelApplet, public KSGRD::SensorBoard
virtual void preferences();
protected:
- void resizeEvent( QResizeEvent* );
- void dragEnterEvent( QDragEnterEvent* );
- void dropEvent( QDropEvent* );
- void customEvent( QCustomEvent* );
+ void resizeEvent( TQResizeEvent* );
+ void dragEnterEvent( TQDragEnterEvent* );
+ void dropEvent( TQDropEvent* );
+ void customEvent( TQCustomEvent* );
private slots:
@@ -68,18 +68,18 @@ class KSysGuardApplet : public KPanelApplet, public KSGRD::SensorBoard
private:
void layout();
void resizeDocks( uint newDockCount );
- void addEmptyDisplay( QWidget **dock, uint pos );
+ void addEmptyDisplay( TQWidget **dock, uint pos );
bool load();
bool save();
- int findDock( const QPoint& );
+ int findDock( const TQPoint& );
void removeDisplay( KSGRD::SensorDisplay* );
double mSizeRatio;
uint mDockCount;
KSGAppletSettings* mSettingsDlg;
- QWidget** mDockList;
+ TQWidget** mDockList;
};
#endif
diff --git a/ksysguard/gui/SensorBrowser.cc b/ksysguard/gui/SensorBrowser.cc
index 969978947..1e51a5631 100644
--- a/ksysguard/gui/SensorBrowser.cc
+++ b/ksysguard/gui/SensorBrowser.cc
@@ -21,9 +21,9 @@
*/
-#include <qdragobject.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqdragobject.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -36,9 +36,9 @@
class HostItem : public QListViewItem
{
public:
- HostItem( SensorBrowser *parent, const QString &text, int id,
+ HostItem( SensorBrowser *parent, const TQString &text, int id,
KSGRD::SensorAgent *host)
- : QListViewItem( parent, text ), mInited( false ), mId( id ),
+ : TQListViewItem( parent, text ), mInited( false ), mId( id ),
mHost( host ), mParent( parent )
{
setExpandable( true );
@@ -52,7 +52,7 @@ class HostItem : public QListViewItem
mHost->sendRequest( "monitors", mParent, mId );
}
- QListViewItem::setOpen( open );
+ TQListViewItem::setOpen( open );
}
private:
@@ -62,30 +62,30 @@ class HostItem : public QListViewItem
SensorBrowser* mParent;
};
-SensorBrowser::SensorBrowser( QWidget* parent, KSGRD::SensorManager* sm,
+SensorBrowser::SensorBrowser( TQWidget* parent, KSGRD::SensorManager* sm,
const char* name)
: KListView( parent, name ), mSensorManager( sm )
{
mHostInfoList.setAutoDelete(true);
- connect( mSensorManager, SIGNAL( update() ), SLOT( update() ) );
- connect( this, SIGNAL( clicked( QListViewItem* ) ),
- SLOT( newItemSelected( QListViewItem* ) ) );
- connect( this, SIGNAL( returnPressed( QListViewItem* ) ),
- SLOT( newItemSelected( QListViewItem* ) ) );
+ connect( mSensorManager, TQT_SIGNAL( update() ), TQT_SLOT( update() ) );
+ connect( this, TQT_SIGNAL( clicked( TQListViewItem* ) ),
+ TQT_SLOT( newItemSelected( TQListViewItem* ) ) );
+ connect( this, TQT_SIGNAL( returnPressed( TQListViewItem* ) ),
+ TQT_SLOT( newItemSelected( TQListViewItem* ) ) );
addColumn( i18n( "Sensor Browser" ) );
addColumn( i18n( "Sensor Type" ) );
setFullWidth( true );
- QToolTip::add( this, i18n( "Drag sensors to empty cells of a worksheet "
+ TQToolTip::add( this, i18n( "Drag sensors to empty cells of a worksheet "
"or the panel applet." ) );
setRootIsDecorated( true );
// The sensor browser can be completely hidden.
setMinimumWidth( 1 );
- QWhatsThis::add( this, i18n( "The sensor browser lists the connected hosts and the sensors "
+ TQWhatsThis::add( this, i18n( "The sensor browser lists the connected hosts and the sensors "
"that they provide. Click and drag sensors into drop zones "
"of a worksheet or the panel applet. A display will appear "
"that visualizes the "
@@ -100,7 +100,7 @@ SensorBrowser::~SensorBrowser()
void SensorBrowser::disconnect()
{
- QPtrListIterator<HostInfo> it( mHostInfoList );
+ TQPtrListIterator<HostInfo> it( mHostInfoList );
for ( ; it.current(); ++it )
if ( (*it)->listViewItem()->isSelected() ) {
@@ -109,7 +109,7 @@ void SensorBrowser::disconnect()
}
}
-void SensorBrowser::hostReconfigured( const QString& )
+void SensorBrowser::hostReconfigured( const TQString& )
{
// TODO: not yet implemented.
}
@@ -125,10 +125,10 @@ void SensorBrowser::update()
KSGRD::SensorAgent* host;
for ( int i = 0 ; ( host = it.current() ); ++it, ++i ) {
- QString hostName = mSensorManager->hostName( host );
+ TQString hostName = mSensorManager->hostName( host );
HostItem* lvi = new HostItem( this, hostName, id, host );
- QPixmap pix = KGlobal::iconLoader()->loadIcon( "computer", KIcon::Desktop, KIcon::SizeSmall );
+ TQPixmap pix = KGlobal::iconLoader()->loadIcon( "computer", KIcon::Desktop, KIcon::SizeSmall );
lvi->setPixmap( 0, pix );
HostInfo* hostInfo = new HostInfo( id, host, hostName, lvi );
@@ -139,18 +139,18 @@ void SensorBrowser::update()
setMouseTracking( false );
}
-void SensorBrowser::newItemSelected( QListViewItem *item )
+void SensorBrowser::newItemSelected( TQListViewItem *item )
{
static bool showAnnoyingPopup = true;
if ( item && item->pixmap( 0 ) && showAnnoyingPopup)
{
showAnnoyingPopup = false;
KMessageBox::information( this, i18n( "Drag sensors to empty fields in a worksheet." ),
- QString::null, "ShowSBUseInfo" );
+ TQString::null, "ShowSBUseInfo" );
}
}
-void SensorBrowser::answerReceived( int id, const QString &answer )
+void SensorBrowser::answerReceived( int id, const TQString &answer )
{
/* An answer has the following format:
@@ -161,7 +161,7 @@ void SensorBrowser::answerReceived( int id, const QString &answer )
ps table
*/
- QPtrListIterator<HostInfo> it( mHostInfoList );
+ TQPtrListIterator<HostInfo> it( mHostInfoList );
/* Check if id is still valid. It can get obsolete by rapid calls
* of update() or when the sensor died. */
@@ -179,8 +179,8 @@ void SensorBrowser::answerReceived( int id, const QString &answer )
break;
KSGRD::SensorTokenizer words( lines[ i ], '\t' );
- QString sensorName = words[ 0 ];
- QString sensorType = words[ 1 ];
+ TQString sensorName = words[ 0 ];
+ TQString sensorType = words[ 1 ];
/* Calling update() a rapid sequence will create pending
* requests that do not get erased by calling
@@ -197,13 +197,13 @@ void SensorBrowser::answerReceived( int id, const QString &answer )
* depth of nodes. */
KSGRD::SensorTokenizer absolutePath( sensorName, '/' );
- QListViewItem* parent = (*it)->listViewItem();
+ TQListViewItem* parent = (*it)->listViewItem();
for ( uint j = 0; j < absolutePath.count(); ++j ) {
// Localize the sensor name part by part.
- QString name = KSGRD::SensorMgr->translateSensorPath( absolutePath[ j ] );
+ TQString name = KSGRD::SensorMgr->translateSensorPath( absolutePath[ j ] );
bool found = false;
- QListViewItem* sibling = parent->firstChild();
+ TQListViewItem* sibling = parent->firstChild();
while ( sibling && !found ) {
if (sibling->text( 0 ) == name ) {
// The node or sensor is already known.
@@ -212,9 +212,9 @@ void SensorBrowser::answerReceived( int id, const QString &answer )
sibling = sibling->nextSibling();
}
if ( !found ) {
- QListViewItem* lvi = new QListViewItem( parent, name );
+ TQListViewItem* lvi = new TQListViewItem( parent, name );
if ( j == absolutePath.count() - 1 ) {
- QPixmap pix = KGlobal::iconLoader()->loadIcon( "ksysguardd", KIcon::Desktop,
+ TQPixmap pix = KGlobal::iconLoader()->loadIcon( "ksysguardd", KIcon::Desktop,
KIcon::SizeSmall );
lvi->setPixmap( 0, pix );
lvi->setText( 1, KSGRD::SensorMgr->translateSensorType( sensorType ) );
@@ -234,7 +234,7 @@ void SensorBrowser::answerReceived( int id, const QString &answer )
repaintItem( (*it)->listViewItem() );
}
-void SensorBrowser::viewportMouseMoveEvent( QMouseEvent *e )
+void SensorBrowser::viewportMouseMoveEvent( TQMouseEvent *e )
{
/* setMouseTracking(false) seems to be broken. With current Qt
* mouse tracking cannot be turned off. So we have to check each event
@@ -243,12 +243,12 @@ void SensorBrowser::viewportMouseMoveEvent( QMouseEvent *e )
if ( !( e->state() & LeftButton ) )
return;
- QListViewItem* item = itemAt( e->pos() );
+ TQListViewItem* item = itemAt( e->pos() );
if ( !item ) // no item under cursor
return;
// Make sure that a sensor and not a node or hostname has been picked.
- QPtrListIterator<HostInfo> it( mHostInfoList );
+ TQPtrListIterator<HostInfo> it( mHostInfoList );
for ( ; it.current() && !(*it)->isRegistered( item ); ++it );
if ( !it.current() )
return;
@@ -261,64 +261,64 @@ void SensorBrowser::viewportMouseMoveEvent( QMouseEvent *e )
(*it)->sensorType( item ) + " " +
(*it)->sensorDescription( item );
- QDragObject* dragObject = new QTextDrag( mDragText, this );
+ TQDragObject* dragObject = new TQTextDrag( mDragText, this );
dragObject->dragCopy();
}
-QStringList SensorBrowser::listHosts()
+TQStringList SensorBrowser::listHosts()
{
- QStringList hostList;
+ TQStringList hostList;
- QPtrListIterator<HostInfo> it( mHostInfoList );
+ TQPtrListIterator<HostInfo> it( mHostInfoList );
for ( ; it.current(); ++it )
hostList.append( (*it)->hostName() );
return hostList;
}
-QStringList SensorBrowser::listSensors( const QString &hostName )
+TQStringList SensorBrowser::listSensors( const TQString &hostName )
{
- QPtrListIterator<HostInfo> it( mHostInfoList );
+ TQPtrListIterator<HostInfo> it( mHostInfoList );
for ( ; it.current(); ++it ) {
if ( (*it)->hostName() == hostName ) {
return (*it)->allSensorNames();
}
}
- return QStringList();
+ return TQStringList();
}
/**
Helper classes
*/
-SensorInfo::SensorInfo( QListViewItem *lvi, const QString &name,
- const QString &desc, const QString &type )
+SensorInfo::SensorInfo( TQListViewItem *lvi, const TQString &name,
+ const TQString &desc, const TQString &type )
: mLvi( lvi ), mName( name ), mDesc( desc ), mType( type )
{
}
-QListViewItem* SensorInfo::listViewItem() const
+TQListViewItem* SensorInfo::listViewItem() const
{
return mLvi;
}
-const QString& SensorInfo::name() const
+const TQString& SensorInfo::name() const
{
return mName;
}
-const QString& SensorInfo::type() const
+const TQString& SensorInfo::type() const
{
return mType;
}
-const QString& SensorInfo::description() const
+const TQString& SensorInfo::description() const
{
return mDesc;
}
HostInfo::HostInfo( int id, const KSGRD::SensorAgent *agent,
- const QString &name, QListViewItem *lvi )
+ const TQString &name, TQListViewItem *lvi )
: mId( id ), mSensorAgent( agent ), mHostName( name ), mLvi( lvi )
{
mSensorList.setAutoDelete( true );
@@ -334,64 +334,64 @@ const KSGRD::SensorAgent* HostInfo::sensorAgent() const
return mSensorAgent;
}
-const QString& HostInfo::hostName() const
+const TQString& HostInfo::hostName() const
{
return mHostName;
}
-QListViewItem* HostInfo::listViewItem() const
+TQListViewItem* HostInfo::listViewItem() const
{
return mLvi;
}
-const QString& HostInfo::sensorName( const QListViewItem *lvi ) const
+const TQString& HostInfo::sensorName( const TQListViewItem *lvi ) const
{
- QPtrListIterator<SensorInfo> it( mSensorList );
+ TQPtrListIterator<SensorInfo> it( mSensorList );
for ( ; it.current() && (*it)->listViewItem() != lvi; ++it );
Q_ASSERT( it.current() );
return ( (*it)->name() );
}
-QStringList HostInfo::allSensorNames() const
+TQStringList HostInfo::allSensorNames() const
{
- QStringList list;
+ TQStringList list;
- QPtrListIterator<SensorInfo> it( mSensorList );
+ TQPtrListIterator<SensorInfo> it( mSensorList );
for ( ; it.current(); ++it )
list.append( it.current()->name() );
return list;
}
-const QString& HostInfo::sensorType( const QListViewItem *lvi ) const
+const TQString& HostInfo::sensorType( const TQListViewItem *lvi ) const
{
- QPtrListIterator<SensorInfo> it( mSensorList );
+ TQPtrListIterator<SensorInfo> it( mSensorList );
for ( ; it.current() && (*it)->listViewItem() != lvi; ++it );
Q_ASSERT( it.current() );
return ( (*it)->type() );
}
-const QString& HostInfo::sensorDescription( const QListViewItem *lvi ) const
+const TQString& HostInfo::sensorDescription( const TQListViewItem *lvi ) const
{
- QPtrListIterator<SensorInfo> it( mSensorList );
+ TQPtrListIterator<SensorInfo> it( mSensorList );
for ( ; it.current() && (*it)->listViewItem() != lvi; ++it );
Q_ASSERT( it.current() );
return ( (*it)->description() );
}
-void HostInfo::addSensor( QListViewItem *lvi, const QString& name,
- const QString& desc, const QString& type )
+void HostInfo::addSensor( TQListViewItem *lvi, const TQString& name,
+ const TQString& desc, const TQString& type )
{
SensorInfo* info = new SensorInfo( lvi, name, desc, type );
mSensorList.append( info );
}
-bool HostInfo::isRegistered( const QString& name ) const
+bool HostInfo::isRegistered( const TQString& name ) const
{
- QPtrListIterator<SensorInfo> it( mSensorList );
+ TQPtrListIterator<SensorInfo> it( mSensorList );
for ( ; it.current(); ++it )
if ( (*it)->name() == name )
return true;
@@ -399,9 +399,9 @@ bool HostInfo::isRegistered( const QString& name ) const
return false;
}
-bool HostInfo::isRegistered( QListViewItem *lvi ) const
+bool HostInfo::isRegistered( TQListViewItem *lvi ) const
{
- QPtrListIterator<SensorInfo> it( mSensorList );
+ TQPtrListIterator<SensorInfo> it( mSensorList );
for ( ; it.current(); ++it )
if ( (*it)->listViewItem() == lvi )
return true;
diff --git a/ksysguard/gui/SensorBrowser.h b/ksysguard/gui/SensorBrowser.h
index 9021166d9..996ffeb39 100644
--- a/ksysguard/gui/SensorBrowser.h
+++ b/ksysguard/gui/SensorBrowser.h
@@ -24,7 +24,7 @@
#ifndef KSG_SENSORBROWSER_H
#define KSG_SENSORBROWSER_H
-#include <qdict.h>
+#include <tqdict.h>
#include <klistview.h>
#include <ksgrd/SensorClient.h>
@@ -48,28 +48,28 @@ class SensorBrowser : public KListView, public KSGRD::SensorClient
Q_OBJECT
public:
- SensorBrowser( QWidget* parent, KSGRD::SensorManager* sm, const char* name = 0 );
+ SensorBrowser( TQWidget* parent, KSGRD::SensorManager* sm, const char* name = 0 );
~SensorBrowser();
- QStringList listHosts();
- QStringList listSensors( const QString &hostName );
+ TQStringList listHosts();
+ TQStringList listSensors( const TQString &hostName );
public slots:
void disconnect();
- void hostReconfigured( const QString &hostName );
+ void hostReconfigured( const TQString &hostName );
void update();
- void newItemSelected( QListViewItem *item );
+ void newItemSelected( TQListViewItem *item );
protected:
- virtual void viewportMouseMoveEvent( QMouseEvent* );
+ virtual void viewportMouseMoveEvent( TQMouseEvent* );
private:
- void answerReceived( int id, const QString& );
+ void answerReceived( int id, const TQString& );
KSGRD::SensorManager* mSensorManager;
- QPtrList<HostInfo> mHostInfoList;
- QString mDragText;
+ TQPtrList<HostInfo> mHostInfoList;
+ TQString mDragText;
};
@@ -79,42 +79,42 @@ class SensorBrowser : public KListView, public KSGRD::SensorClient
class SensorInfo
{
public:
- SensorInfo( QListViewItem *lvi, const QString &name, const QString &desc,
- const QString &type );
+ SensorInfo( TQListViewItem *lvi, const TQString &name, const TQString &desc,
+ const TQString &type );
~SensorInfo() {}
/**
Returns a pointer to the list view item of the sensor.
*/
- QListViewItem* listViewItem() const;
+ TQListViewItem* listViewItem() const;
/**
Returns the name of the sensor.
*/
- const QString& name() const;
+ const TQString& name() const;
/**
Returns the description of the sensor.
*/
- const QString& description() const;
+ const TQString& description() const;
/**
Returns the type of the sensor.
*/
- const QString& type() const;
+ const TQString& type() const;
private:
- QListViewItem* mLvi;
- QString mName;
- QString mDesc;
- QString mType;
+ TQListViewItem* mLvi;
+ TQString mName;
+ TQString mDesc;
+ TQString mType;
};
class HostInfo
{
public:
- HostInfo( int id, const KSGRD::SensorAgent *agent, const QString &name,
- QListViewItem *lvi );
+ HostInfo( int id, const KSGRD::SensorAgent *agent, const TQString &name,
+ TQListViewItem *lvi );
~HostInfo() { }
/**
@@ -130,32 +130,32 @@ class HostInfo
/**
Returns the name of the host.
*/
- const QString& hostName() const;
+ const TQString& hostName() const;
/**
Returns the a pointer to the list view item of the host.
*/
- QListViewItem* listViewItem() const;
+ TQListViewItem* listViewItem() const;
/**
Returns the sensor name of a special list view item.
*/
- const QString& sensorName( const QListViewItem *lvi ) const;
+ const TQString& sensorName( const TQListViewItem *lvi ) const;
/**
Returns all sensor names of the host.
*/
- QStringList allSensorNames() const;
+ TQStringList allSensorNames() const;
/**
Returns the type of a special list view item.
*/
- const QString& sensorType( const QListViewItem *lvi ) const;
+ const TQString& sensorType( const TQListViewItem *lvi ) const;
/**
Returns the description of a special list view item.
*/
- const QString& sensorDescription( const QListViewItem *lvi ) const;
+ const TQString& sensorDescription( const TQListViewItem *lvi ) const;
/**
Adds a new Sensor to the host.
@@ -165,29 +165,29 @@ class HostInfo
@param desc A description.
@param type The type of the sensor.
*/
- void addSensor( QListViewItem *lvi, const QString& name,
- const QString& desc, const QString& type );
+ void addSensor( TQListViewItem *lvi, const TQString& name,
+ const TQString& desc, const TQString& type );
/**
Returns whether the sensor with @ref name
is registered at the host.
*/
- bool isRegistered( const QString& name ) const;
+ bool isRegistered( const TQString& name ) const;
/**
Returns whether the sensor with @ref lvi
is registered at the host.
*/
- bool isRegistered( QListViewItem *lvi ) const;
+ bool isRegistered( TQListViewItem *lvi ) const;
private:
int mId;
const KSGRD::SensorAgent* mSensorAgent;
- const QString mHostName;
- QListViewItem* mLvi;
+ const TQString mHostName;
+ TQListViewItem* mLvi;
- QPtrList<SensorInfo> mSensorList;
+ TQPtrList<SensorInfo> mSensorList;
};
#endif
diff --git a/ksysguard/gui/SensorDisplayLib/BarGraph.cc b/ksysguard/gui/SensorDisplayLib/BarGraph.cc
index f6dc741cb..8d2b5e302 100644
--- a/ksysguard/gui/SensorDisplayLib/BarGraph.cc
+++ b/ksysguard/gui/SensorDisplayLib/BarGraph.cc
@@ -24,7 +24,7 @@
#include <assert.h>
#include <string.h>
-#include <qpainter.h>
+#include <tqpainter.h>
#include <kdebug.h>
#include <kiconloader.h>
@@ -33,8 +33,8 @@
#include "BarGraph.h"
-BarGraph::BarGraph( QWidget *parent, const char *name )
- : QWidget( parent, name )
+BarGraph::BarGraph( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
// paintEvent covers whole widget so we use no background to avoid flicker
setBackgroundMode( NoBackground );
@@ -52,15 +52,15 @@ BarGraph::BarGraph( QWidget *parent, const char *name )
// Anything smaller than this does not make sense.
setMinimumSize( 16, 16 );
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding,
- QSizePolicy::Expanding, false ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding,
+ TQSizePolicy::Expanding, false ) );
}
BarGraph::~BarGraph()
{
}
-bool BarGraph::addBar( const QString &footer )
+bool BarGraph::addBar( const TQString &footer )
{
samples.resize( bars + 1 );
samples[ bars++ ] = 0.0;
@@ -84,7 +84,7 @@ bool BarGraph::removeBar( uint idx )
return true;
}
-void BarGraph::updateSamples( const QMemArray<double> &newSamples )
+void BarGraph::updateSamples( const TQMemArray<double> &newSamples )
{
samples = newSamples;
update();
@@ -96,22 +96,22 @@ void BarGraph::changeRange( double min, double max )
maxValue = max;
}
-void BarGraph::paintEvent( QPaintEvent* )
+void BarGraph::paintEvent( TQPaintEvent* )
{
int w = width();
int h = height();
- QPixmap pm( w, h );
- QPainter p;
+ TQPixmap pm( w, h );
+ TQPainter p;
p.begin( &pm, this );
- p.setFont( QFont( p.font().family(), fontSize ) );
- QFontMetrics fm( p.font() );
+ p.setFont( TQFont( p.font().family(), fontSize ) );
+ TQFontMetrics fm( p.font() );
pm.fill( backgroundColor );
/* Draw white line along the bottom and the right side of the
* widget to create a 3D like look. */
- p.setPen( QColor( colorGroup().light() ) );
+ p.setPen( TQColor( colorGroup().light() ) );
p.drawLine( 0, h - 1, w - 1, h - 1 );
p.drawLine( w - 1, 0, w - 1, h - 1 );
@@ -165,7 +165,7 @@ void BarGraph::paintEvent( QPaintEvent* )
footers[ b ] );
p.drawText( b * barWidth + 3, h - fm.lineSpacing() - 2,
barWidth - 2 * 3, fm.lineSpacing(), Qt::AlignCenter,
- QString( "%1" ).arg( samples[ b ] ) );
+ TQString( "%1" ).arg( samples[ b ] ) );
}
}
}
diff --git a/ksysguard/gui/SensorDisplayLib/BarGraph.h b/ksysguard/gui/SensorDisplayLib/BarGraph.h
index aca20c629..744faf777 100644
--- a/ksysguard/gui/SensorDisplayLib/BarGraph.h
+++ b/ksysguard/gui/SensorDisplayLib/BarGraph.h
@@ -24,9 +24,9 @@
#ifndef KSG_BARGRAPH_H
#define KSG_BARGRAPH_H
-#include <qmemarray.h>
-#include <qptrvector.h>
-#include <qwidget.h>
+#include <tqmemarray.h>
+#include <tqptrvector.h>
+#include <tqwidget.h>
class BarGraph : public QWidget
{
@@ -35,13 +35,13 @@ class BarGraph : public QWidget
friend class DancingBars;
public:
- BarGraph( QWidget *parent, const char *name = 0 );
+ BarGraph( TQWidget *parent, const char *name = 0 );
~BarGraph();
- bool addBar( const QString &footer );
+ bool addBar( const TQString &footer );
bool removeBar( uint idx );
- void updateSamples( const QMemArray<double> &newSamples );
+ void updateSamples( const TQMemArray<double> &newSamples );
double getMin() const
{
@@ -72,7 +72,7 @@ class BarGraph : public QWidget
void changeRange( double min, double max );
protected:
- virtual void paintEvent( QPaintEvent* );
+ virtual void paintEvent( TQPaintEvent* );
private:
double minValue;
@@ -82,12 +82,12 @@ class BarGraph : public QWidget
double upperLimit;
bool upperLimitActive;
bool autoRange;
- QMemArray<double> samples;
- QStringList footers;
+ TQMemArray<double> samples;
+ TQStringList footers;
uint bars;
- QColor normalColor;
- QColor alarmColor;
- QColor backgroundColor;
+ TQColor normalColor;
+ TQColor alarmColor;
+ TQColor backgroundColor;
int fontSize;
};
diff --git a/ksysguard/gui/SensorDisplayLib/DancingBars.cc b/ksysguard/gui/SensorDisplayLib/DancingBars.cc
index 48c360713..3917fc86b 100644
--- a/ksysguard/gui/SensorDisplayLib/DancingBars.cc
+++ b/ksysguard/gui/SensorDisplayLib/DancingBars.cc
@@ -21,13 +21,13 @@
*/
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qtooltip.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <klocale.h>
@@ -40,12 +40,12 @@
#include "DancingBars.h"
-DancingBars::DancingBars( QWidget *parent, const char *name, const QString &title,
+DancingBars::DancingBars( TQWidget *parent, const char *name, const TQString &title,
int, int, bool noFrame_, bool isApplet )
: KSGRD::SensorDisplay( parent, name, title, noFrame_, isApplet )
{
mBars = 0;
- mFlags = QBitArray(100);
+ mFlags = TQBitArray(100);
mFlags.fill( false );
if ( noFrame() )
@@ -91,9 +91,9 @@ void DancingBars::configureSettings()
mSettingsDialog->setBackgroundColor( mPlotter->backgroundColor );
mSettingsDialog->setFontSize( mPlotter->fontSize );
- QValueList< QStringList > list;
+ TQValueList< TQStringList > list;
for ( uint i = mBars - 1; i < mBars; i-- ) {
- QStringList entry;
+ TQStringList entry;
entry << sensors().at( i )->hostName();
entry << KSGRD::SensorMgr->translateSensor( sensors().at( i )->name() );
entry << mPlotter->footers[ i ];
@@ -104,7 +104,7 @@ void DancingBars::configureSettings()
}
mSettingsDialog->setSensors( list );
- connect( mSettingsDialog, SIGNAL( applyClicked() ), SLOT( applySettings() ) );
+ connect( mSettingsDialog, TQT_SIGNAL( applyClicked() ), TQT_SLOT( applySettings() ) );
if ( mSettingsDialog->exec() )
applySettings();
@@ -129,8 +129,8 @@ void DancingBars::applySettings()
mPlotter->backgroundColor = mSettingsDialog->backgroundColor();
mPlotter->fontSize = mSettingsDialog->fontSize();
- QValueList< QStringList > list = mSettingsDialog->sensors();
- QValueList< QStringList >::Iterator it;
+ TQValueList< TQStringList > list = mSettingsDialog->sensors();
+ TQValueList< TQStringList >::Iterator it;
for ( uint i = 0; i < sensors().count(); i++ ) {
bool found = false;
@@ -162,8 +162,8 @@ void DancingBars::applyStyle()
setModified( true );
}
-bool DancingBars::addSensor( const QString &hostName, const QString &name,
- const QString &type, const QString &title )
+bool DancingBars::addSensor( const TQString &hostName, const TQString &name,
+ const TQString &type, const TQString &title )
{
if ( type != "integer" && type != "float" )
return false;
@@ -182,14 +182,14 @@ bool DancingBars::addSensor( const QString &hostName, const QString &name,
++mBars;
mSampleBuffer.resize( mBars );
- QString tooltip;
+ TQString tooltip;
for ( uint i = 0; i < mBars; ++i ) {
- tooltip += QString( "%1%2:%3" ).arg( i != 0 ? "\n" : "" )
+ tooltip += TQString( "%1%2:%3" ).arg( i != 0 ? "\n" : "" )
.arg( sensors().at( i )->hostName() )
.arg( sensors().at( i )->name() );
}
- QToolTip::remove( mPlotter );
- QToolTip::add( mPlotter, tooltip );
+ TQToolTip::remove( mPlotter );
+ TQToolTip::add( mPlotter, tooltip );
return true;
}
@@ -206,24 +206,24 @@ bool DancingBars::removeSensor( uint pos )
mBars--;
KSGRD::SensorDisplay::removeSensor( pos );
- QString tooltip;
+ TQString tooltip;
for ( uint i = 0; i < mBars; ++i ) {
- tooltip += QString( "%1%2:%3" ).arg( i != 0 ? "\n" : "" )
+ tooltip += TQString( "%1%2:%3" ).arg( i != 0 ? "\n" : "" )
.arg( sensors().at( i )->hostName() )
.arg( sensors().at( i )->name() );
}
- QToolTip::remove( mPlotter );
- QToolTip::add( mPlotter, tooltip );
+ TQToolTip::remove( mPlotter );
+ TQToolTip::add( mPlotter, tooltip );
return true;
}
-void DancingBars::updateSamples( const QMemArray<double> &samples )
+void DancingBars::updateSamples( const TQMemArray<double> &samples )
{
mPlotter->updateSamples( samples );
}
-void DancingBars::resizeEvent( QResizeEvent* )
+void DancingBars::resizeEvent( TQResizeEvent* )
{
if ( noFrame() )
mPlotter->setGeometry( 0, 0, width(), height() );
@@ -231,7 +231,7 @@ void DancingBars::resizeEvent( QResizeEvent* )
frame()->setGeometry( 0, 0, width(), height() );
}
-QSize DancingBars::sizeHint()
+TQSize DancingBars::sizeHint()
{
if ( noFrame() )
return ( mPlotter->sizeHint() );
@@ -239,7 +239,7 @@ QSize DancingBars::sizeHint()
return ( frame()->sizeHint() );
}
-void DancingBars::answerReceived( int id, const QString &answer )
+void DancingBars::answerReceived( int id, const TQString &answer )
{
/* We received something, so the sensor is probably ok. */
sensorError( id, false );
@@ -276,7 +276,7 @@ void DancingBars::answerReceived( int id, const QString &answer )
}
}
-bool DancingBars::restoreSettings( QDomElement &element )
+bool DancingBars::restoreSettings( TQDomElement &element )
{
SensorDisplay::restoreSettings( element );
@@ -294,12 +294,12 @@ bool DancingBars::restoreSettings( QDomElement &element )
KSGRD::Style->alarmColor() );
mPlotter->backgroundColor = restoreColor( element, "backgroundColor",
KSGRD::Style->backgroundColor() );
- mPlotter->fontSize = element.attribute( "fontSize", QString( "%1" ).arg(
+ mPlotter->fontSize = element.attribute( "fontSize", TQString( "%1" ).arg(
KSGRD::Style->fontSize() ) ).toInt();
- QDomNodeList dnList = element.elementsByTagName( "beam" );
+ TQDomNodeList dnList = element.elementsByTagName( "beam" );
for ( uint i = 0; i < dnList.count(); ++i ) {
- QDomElement el = dnList.item( i ).toElement();
+ TQDomElement el = dnList.item( i ).toElement();
addSensor( el.attribute( "hostName" ), el.attribute( "sensorName" ),
( el.attribute( "sensorType" ).isEmpty() ? "integer" :
el.attribute( "sensorType" ) ), el.attribute( "sensorDescr" ) );
@@ -310,7 +310,7 @@ bool DancingBars::restoreSettings( QDomElement &element )
return true;
}
-bool DancingBars::saveSettings( QDomDocument &doc, QDomElement &element,
+bool DancingBars::saveSettings( TQDomDocument &doc, TQDomElement &element,
bool save )
{
element.setAttribute( "min", mPlotter->getMin() );
@@ -329,7 +329,7 @@ bool DancingBars::saveSettings( QDomDocument &doc, QDomElement &element,
element.setAttribute( "fontSize", mPlotter->fontSize );
for ( uint i = 0; i < mBars; ++i ) {
- QDomElement beam = doc.createElement( "beam" );
+ TQDomElement beam = doc.createElement( "beam" );
element.appendChild( beam );
beam.setAttribute( "hostName", sensors().at( i )->hostName() );
beam.setAttribute( "sensorName", sensors().at( i )->name() );
diff --git a/ksysguard/gui/SensorDisplayLib/DancingBars.h b/ksysguard/gui/SensorDisplayLib/DancingBars.h
index ad671dfe7..7fa2c7456 100644
--- a/ksysguard/gui/SensorDisplayLib/DancingBars.h
+++ b/ksysguard/gui/SensorDisplayLib/DancingBars.h
@@ -25,7 +25,7 @@
#define KSG_DANCINGBARS_H
#include <SensorDisplay.h>
-#include <qbitarray.h>
+#include <tqbitarray.h>
class KIntNumInput;
@@ -41,25 +41,25 @@ class DancingBars : public KSGRD::SensorDisplay
Q_OBJECT
public:
- DancingBars( QWidget *parent = 0, const char *name = 0,
- const QString &title = QString::null, int min = 0,
+ DancingBars( TQWidget *parent = 0, const char *name = 0,
+ const TQString &title = TQString::null, int min = 0,
int max = 100, bool noFrame = false, bool isApplet = false );
virtual ~DancingBars();
void configureSettings();
- bool addSensor( const QString &hostName, const QString &name,
- const QString &type, const QString &title );
+ bool addSensor( const TQString &hostName, const TQString &name,
+ const TQString &type, const TQString &title );
bool removeSensor( uint pos );
- void updateSamples( const QMemArray<double> &samples );
+ void updateSamples( const TQMemArray<double> &samples );
- virtual QSize sizeHint();
+ virtual TQSize sizeHint();
- virtual void answerReceived( int id, const QString &answer );
+ virtual void answerReceived( int id, const TQString &answer );
- bool restoreSettings( QDomElement& );
- bool saveSettings( QDomDocument&, QDomElement&, bool save = true );
+ bool restoreSettings( TQDomElement& );
+ bool saveSettings( TQDomDocument&, TQDomElement&, bool save = true );
virtual bool hasSettingsDialog() const;
@@ -68,7 +68,7 @@ class DancingBars : public KSGRD::SensorDisplay
virtual void applyStyle();
protected:
- virtual void resizeEvent( QResizeEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
private:
uint mBars;
@@ -83,8 +83,8 @@ class DancingBars : public KSGRD::SensorDisplay
received. The flags variable is used to ensure that all samples have
been received.
*/
- QMemArray<double> mSampleBuffer;
- QBitArray mFlags;
+ TQMemArray<double> mSampleBuffer;
+ TQBitArray mFlags;
};
#endif
diff --git a/ksysguard/gui/SensorDisplayLib/DancingBarsSettings.cc b/ksysguard/gui/SensorDisplayLib/DancingBarsSettings.cc
index 15e6b6ec3..1b97cc25f 100644
--- a/ksysguard/gui/SensorDisplayLib/DancingBarsSettings.cc
+++ b/ksysguard/gui/SensorDisplayLib/DancingBarsSettings.cc
@@ -29,50 +29,50 @@
#include <klocale.h>
#include <knuminput.h>
-#include <qcheckbox.h>
-#include <qframe.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqframe.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqwhatsthis.h>
#include "DancingBarsSettings.h"
-DancingBarsSettings::DancingBarsSettings( QWidget* parent, const char* name )
+DancingBarsSettings::DancingBarsSettings( TQWidget* parent, const char* name )
: KDialogBase( Tabbed, i18n( "Edit BarGraph Preferences" ),
Ok | Apply | Cancel, Ok, parent, name, true, true )
{
// Range page
- QFrame *page = addPage( i18n( "Range" ) );
- QGridLayout *pageLayout = new QGridLayout( page, 3, 1, 0, spacingHint() );
+ TQFrame *page = addPage( i18n( "Range" ) );
+ TQGridLayout *pageLayout = new TQGridLayout( page, 3, 1, 0, spacingHint() );
- QGroupBox *groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Title" ), page );
- QGridLayout *boxLayout = new QGridLayout( groupBox->layout(), 1, 1 );
+ TQGroupBox *groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Title" ), page );
+ TQGridLayout *boxLayout = new TQGridLayout( groupBox->layout(), 1, 1 );
mTitle = new KLineEdit( groupBox );
- QWhatsThis::add( mTitle, i18n( "Enter the title of the display here." ) );
+ TQWhatsThis::add( mTitle, i18n( "Enter the title of the display here." ) );
boxLayout->addWidget( mTitle, 0, 0 );
pageLayout->addWidget( groupBox, 0, 0 );
- groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Display Range" ), page );
- boxLayout = new QGridLayout( groupBox->layout(), 1, 5 );
+ groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Display Range" ), page );
+ boxLayout = new TQGridLayout( groupBox->layout(), 1, 5 );
boxLayout->setColStretch( 2, 1 );
- QLabel *label = new QLabel( i18n( "Minimum value:" ), groupBox );
+ TQLabel *label = new TQLabel( i18n( "Minimum value:" ), groupBox );
boxLayout->addWidget( label, 0, 0 );
mMinValue = new KDoubleSpinBox( 0, 100, 0.5, 0, 2, groupBox );
- QWhatsThis::add( mMinValue, i18n( "Enter the minimum value for the display here. If both values are 0, automatic range detection is enabled." ) );
+ TQWhatsThis::add( mMinValue, i18n( "Enter the minimum value for the display here. If both values are 0, automatic range detection is enabled." ) );
boxLayout->addWidget( mMinValue, 0, 1 );
label->setBuddy( mMinValue );
- label = new QLabel( i18n( "Maximum value:" ), groupBox );
+ label = new TQLabel( i18n( "Maximum value:" ), groupBox );
boxLayout->addWidget( label, 0, 3 );
mMaxValue = new KDoubleSpinBox( 0, 10000, 0.5, 100, 2, groupBox );
- QWhatsThis::add( mMaxValue, i18n( "Enter the maximum value for the display here. If both values are 0, automatic range detection is enabled." ) );
+ TQWhatsThis::add( mMaxValue, i18n( "Enter the maximum value for the display here. If both values are 0, automatic range detection is enabled." ) );
boxLayout->addWidget( mMaxValue, 0, 4 );
label->setBuddy( mMaxValue );
@@ -82,17 +82,17 @@ DancingBarsSettings::DancingBarsSettings( QWidget* parent, const char* name )
// Alarm page
page = addPage( i18n( "Alarms" ) );
- pageLayout = new QGridLayout( page, 3, 1, 0, spacingHint() );
+ pageLayout = new TQGridLayout( page, 3, 1, 0, spacingHint() );
- groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Alarm for Minimum Value" ), page );
- boxLayout = new QGridLayout( groupBox->layout(), 1, 4 );
+ groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Alarm for Minimum Value" ), page );
+ boxLayout = new TQGridLayout( groupBox->layout(), 1, 4 );
boxLayout->setColStretch( 1, 1 );
- mUseLowerLimit = new QCheckBox( i18n( "Enable alarm" ), groupBox );
- QWhatsThis::add( mUseLowerLimit, i18n( "Enable the minimum value alarm." ) );
+ mUseLowerLimit = new TQCheckBox( i18n( "Enable alarm" ), groupBox );
+ TQWhatsThis::add( mUseLowerLimit, i18n( "Enable the minimum value alarm." ) );
boxLayout->addWidget( mUseLowerLimit, 0, 0 );
- label = new QLabel( i18n( "Lower limit:" ), groupBox );
+ label = new TQLabel( i18n( "Lower limit:" ), groupBox );
boxLayout->addWidget( label, 0, 2 );
mLowerLimit = new KDoubleSpinBox( 0, 100, 0.5, 0, 2, groupBox );
@@ -102,15 +102,15 @@ DancingBarsSettings::DancingBarsSettings( QWidget* parent, const char* name )
pageLayout->addWidget( groupBox, 0, 0 );
- groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Alarm for Maximum Value" ), page );
- boxLayout = new QGridLayout( groupBox->layout(), 1, 4 );
+ groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Alarm for Maximum Value" ), page );
+ boxLayout = new TQGridLayout( groupBox->layout(), 1, 4 );
boxLayout->setColStretch( 1, 1 );
- mUseUpperLimit = new QCheckBox( i18n( "Enable alarm" ), groupBox );
- QWhatsThis::add( mUseUpperLimit, i18n( "Enable the maximum value alarm." ) );
+ mUseUpperLimit = new TQCheckBox( i18n( "Enable alarm" ), groupBox );
+ TQWhatsThis::add( mUseUpperLimit, i18n( "Enable the maximum value alarm." ) );
boxLayout->addWidget( mUseUpperLimit, 0, 0 );
- label = new QLabel( i18n( "Upper limit:" ), groupBox );
+ label = new TQLabel( i18n( "Upper limit:" ), groupBox );
boxLayout->addWidget( label, 0, 2 );
mUpperLimit = new KDoubleSpinBox( 0, 100, 0.5, 0, 2, groupBox );
@@ -124,34 +124,34 @@ DancingBarsSettings::DancingBarsSettings( QWidget* parent, const char* name )
// Look page
page = addPage( i18n( "Look" ) );
- pageLayout = new QGridLayout( page, 5, 2, 0, spacingHint() );
+ pageLayout = new TQGridLayout( page, 5, 2, 0, spacingHint() );
- label = new QLabel( i18n( "Normal bar color:" ), page );
+ label = new TQLabel( i18n( "Normal bar color:" ), page );
pageLayout->addWidget( label, 0, 0 );
mForegroundColor = new KColorButton( page );
pageLayout->addWidget( mForegroundColor, 0, 1 );
label->setBuddy( mForegroundColor );
- label = new QLabel( i18n( "Out-of-range color:" ), page );
+ label = new TQLabel( i18n( "Out-of-range color:" ), page );
pageLayout->addWidget( label, 1, 0 );
mAlarmColor = new KColorButton( page );
pageLayout->addWidget( mAlarmColor, 1, 1 );
label->setBuddy( mAlarmColor );
- label = new QLabel( i18n( "Background color:" ), page );
+ label = new TQLabel( i18n( "Background color:" ), page );
pageLayout->addWidget( label, 2, 0 );
mBackgroundColor = new KColorButton( page );
pageLayout->addWidget( mBackgroundColor, 2, 1 );
label->setBuddy( mBackgroundColor );
- label = new QLabel( i18n( "Font size:" ), page );
+ label = new TQLabel( i18n( "Font size:" ), page );
pageLayout->addWidget( label, 3, 0 );
mFontSize = new KIntNumInput( 9, page );
- QWhatsThis::add( mFontSize, i18n( "This determines the size of the font used to print a label underneath the bars. Bars are automatically suppressed if text becomes too large, so it is advisable to use a small font size here." ) );
+ TQWhatsThis::add( mFontSize, i18n( "This determines the size of the font used to print a label underneath the bars. Bars are automatically suppressed if text becomes too large, so it is advisable to use a small font size here." ) );
pageLayout->addWidget( mFontSize, 3, 1 );
label->setBuddy( mFontSize );
@@ -159,7 +159,7 @@ DancingBarsSettings::DancingBarsSettings( QWidget* parent, const char* name )
// Sensor page
page = addPage( i18n( "Sensors" ) );
- pageLayout = new QGridLayout( page, 3, 2, 0, spacingHint() );
+ pageLayout = new TQGridLayout( page, 3, 2, 0, spacingHint() );
pageLayout->setRowStretch( 2, 1 );
mSensorView = new KListView( page );
@@ -171,25 +171,25 @@ DancingBarsSettings::DancingBarsSettings( QWidget* parent, const char* name )
mSensorView->setAllColumnsShowFocus( true );
pageLayout->addMultiCellWidget( mSensorView, 0, 2, 0, 0 );
- mEditButton = new QPushButton( i18n( "Edit..." ), page );
+ mEditButton = new TQPushButton( i18n( "Edit..." ), page );
mEditButton->setEnabled( false );
- QWhatsThis::add( mEditButton, i18n( "Push this button to configure the label." ) );
+ TQWhatsThis::add( mEditButton, i18n( "Push this button to configure the label." ) );
pageLayout->addWidget( mEditButton, 0, 1 );
- mRemoveButton = new QPushButton( i18n( "Delete" ), page );
+ mRemoveButton = new TQPushButton( i18n( "Delete" ), page );
mRemoveButton->setEnabled( false );
- QWhatsThis::add( mRemoveButton, i18n( "Push this button to delete the sensor." ) );
+ TQWhatsThis::add( mRemoveButton, i18n( "Push this button to delete the sensor." ) );
pageLayout->addWidget( mRemoveButton, 1, 1 );
- connect( mUseLowerLimit, SIGNAL( toggled( bool ) ),
- mLowerLimit, SLOT( setEnabled( bool ) ) );
- connect( mUseUpperLimit, SIGNAL( toggled( bool ) ),
- mUpperLimit, SLOT( setEnabled( bool ) ) );
+ connect( mUseLowerLimit, TQT_SIGNAL( toggled( bool ) ),
+ mLowerLimit, TQT_SLOT( setEnabled( bool ) ) );
+ connect( mUseUpperLimit, TQT_SIGNAL( toggled( bool ) ),
+ mUpperLimit, TQT_SLOT( setEnabled( bool ) ) );
- connect( mSensorView, SIGNAL( selectionChanged( QListViewItem* ) ),
- SLOT( selectionChanged( QListViewItem* ) ) );
- connect( mEditButton, SIGNAL( clicked() ), SLOT( editSensor() ) );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeSensor() ) );
+ connect( mSensorView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ TQT_SLOT( selectionChanged( TQListViewItem* ) ) );
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editSensor() ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeSensor() ) );
KAcceleratorManager::manage( this );
@@ -200,12 +200,12 @@ DancingBarsSettings::~DancingBarsSettings()
{
}
-void DancingBarsSettings::setTitle( const QString& title )
+void DancingBarsSettings::setTitle( const TQString& title )
{
mTitle->setText( title );
}
-QString DancingBarsSettings::title() const
+TQString DancingBarsSettings::title() const
{
return mTitle->text();
}
@@ -270,32 +270,32 @@ double DancingBarsSettings::upperLimit() const
return mUpperLimit->value();
}
-void DancingBarsSettings::setForegroundColor( const QColor &color )
+void DancingBarsSettings::setForegroundColor( const TQColor &color )
{
mForegroundColor->setColor( color );
}
-QColor DancingBarsSettings::foregroundColor() const
+TQColor DancingBarsSettings::foregroundColor() const
{
return mForegroundColor->color();
}
-void DancingBarsSettings::setAlarmColor( const QColor &color )
+void DancingBarsSettings::setAlarmColor( const TQColor &color )
{
mAlarmColor->setColor( color );
}
-QColor DancingBarsSettings::alarmColor() const
+TQColor DancingBarsSettings::alarmColor() const
{
return mAlarmColor->color();
}
-void DancingBarsSettings::setBackgroundColor( const QColor &color )
+void DancingBarsSettings::setBackgroundColor( const TQColor &color )
{
mBackgroundColor->setColor( color );
}
-QColor DancingBarsSettings::backgroundColor() const
+TQColor DancingBarsSettings::backgroundColor() const
{
return mBackgroundColor->color();
}
@@ -310,13 +310,13 @@ int DancingBarsSettings::fontSize() const
return mFontSize->value();
}
-void DancingBarsSettings::setSensors( const QValueList< QStringList > &list )
+void DancingBarsSettings::setSensors( const TQValueList< TQStringList > &list )
{
mSensorView->clear();
- QValueList< QStringList >::ConstIterator it;
+ TQValueList< TQStringList >::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
- new QListViewItem( mSensorView,
+ new TQListViewItem( mSensorView,
(*it)[ 0 ], // host name
(*it)[ 1 ], // sensor name
(*it)[ 2 ], // footer title
@@ -325,13 +325,13 @@ void DancingBarsSettings::setSensors( const QValueList< QStringList > &list )
}
}
-QValueList< QStringList > DancingBarsSettings::sensors() const
+TQValueList< TQStringList > DancingBarsSettings::sensors() const
{
- QValueList< QStringList > list;
+ TQValueList< TQStringList > list;
- QListViewItemIterator it( mSensorView );
+ TQListViewItemIterator it( mSensorView );
while ( it.current() && !it.current()->text( 0 ).isEmpty() ) {
- QStringList entry;
+ TQStringList entry;
entry << it.current()->text( 0 );
entry << it.current()->text( 1 );
entry << it.current()->text( 2 );
@@ -347,13 +347,13 @@ QValueList< QStringList > DancingBarsSettings::sensors() const
void DancingBarsSettings::editSensor()
{
- QListViewItem *lvi = mSensorView->currentItem();
+ TQListViewItem *lvi = mSensorView->currentItem();
if ( !lvi )
return;
bool ok;
- QString str = KInputDialog::getText( i18n( "Label of Bar Graph" ),
+ TQString str = KInputDialog::getText( i18n( "Label of Bar Graph" ),
i18n( "Enter new label:" ), lvi->text( 2 ), &ok, this );
if ( ok )
lvi->setText( 2, str );
@@ -361,7 +361,7 @@ void DancingBarsSettings::editSensor()
void DancingBarsSettings::removeSensor()
{
- QListViewItem *lvi = mSensorView->currentItem();
+ TQListViewItem *lvi = mSensorView->currentItem();
if ( lvi ) {
/* Before we delete the currently selected item, we determine a
@@ -369,7 +369,7 @@ void DancingBarsSettings::removeSensor()
* items can be deleted without forcing the user to select a new
* item between the deletes. If all items are deleted, the buttons
* are disabled again. */
- QListViewItem* newSelected = 0;
+ TQListViewItem* newSelected = 0;
if ( lvi->itemBelow() ) {
lvi->itemBelow()->setSelected( true );
newSelected = lvi->itemBelow();
@@ -386,7 +386,7 @@ void DancingBarsSettings::removeSensor()
}
}
-void DancingBarsSettings::selectionChanged( QListViewItem* lvi )
+void DancingBarsSettings::selectionChanged( TQListViewItem* lvi )
{
bool state = ( lvi != 0 );
diff --git a/ksysguard/gui/SensorDisplayLib/DancingBarsSettings.h b/ksysguard/gui/SensorDisplayLib/DancingBarsSettings.h
index 12e559dc0..996413535 100644
--- a/ksysguard/gui/SensorDisplayLib/DancingBarsSettings.h
+++ b/ksysguard/gui/SensorDisplayLib/DancingBarsSettings.h
@@ -41,11 +41,11 @@ class DancingBarsSettings : public KDialogBase
Q_OBJECT
public:
- DancingBarsSettings( QWidget* parent = 0, const char* name = 0 );
+ DancingBarsSettings( TQWidget* parent = 0, const char* name = 0 );
~DancingBarsSettings();
- void setTitle( const QString& title );
- QString title() const;
+ void setTitle( const TQString& title );
+ TQString title() const;
void setMinValue( double min );
double minValue() const;
@@ -65,25 +65,25 @@ class DancingBarsSettings : public KDialogBase
void setUpperLimit( double limit );
double upperLimit() const;
- void setForegroundColor( const QColor &color );
- QColor foregroundColor() const;
+ void setForegroundColor( const TQColor &color );
+ TQColor foregroundColor() const;
- void setAlarmColor( const QColor &color );
- QColor alarmColor() const;
+ void setAlarmColor( const TQColor &color );
+ TQColor alarmColor() const;
- void setBackgroundColor( const QColor &color );
- QColor backgroundColor() const;
+ void setBackgroundColor( const TQColor &color );
+ TQColor backgroundColor() const;
void setFontSize( int size );
int fontSize() const;
- void setSensors( const QValueList< QStringList > &list );
- QValueList< QStringList > sensors() const;
+ void setSensors( const TQValueList< TQStringList > &list );
+ TQValueList< TQStringList > sensors() const;
private slots:
void editSensor();
void removeSensor();
- void selectionChanged( QListViewItem* );
+ void selectionChanged( TQListViewItem* );
private:
KColorButton *mForegroundColor;
@@ -97,10 +97,10 @@ class DancingBarsSettings : public KDialogBase
KListView *mSensorView;
KIntNumInput *mFontSize;
- QCheckBox *mUseLowerLimit;
- QCheckBox *mUseUpperLimit;
- QPushButton *mEditButton;
- QPushButton *mRemoveButton;
+ TQCheckBox *mUseLowerLimit;
+ TQCheckBox *mUseUpperLimit;
+ TQPushButton *mEditButton;
+ TQPushButton *mRemoveButton;
};
#endif
diff --git a/ksysguard/gui/SensorDisplayLib/DummyDisplay.cc b/ksysguard/gui/SensorDisplayLib/DummyDisplay.cc
index a4ea6afb4..2e499e852 100644
--- a/ksysguard/gui/SensorDisplayLib/DummyDisplay.cc
+++ b/ksysguard/gui/SensorDisplayLib/DummyDisplay.cc
@@ -24,35 +24,35 @@
#include <klocale.h>
#include <ksgrd/SensorManager.h>
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include "DummyDisplay.h"
-DummyDisplay::DummyDisplay( QWidget* parent, const char* name,
- const QString&, double, double )
+DummyDisplay::DummyDisplay( TQWidget* parent, const char* name,
+ const TQString&, double, double )
: KSGRD::SensorDisplay( parent, name, i18n( "Drop Sensor Here" ) )
{
setMinimumSize( 16, 16 );
- QWhatsThis::add( this, i18n(
+ TQWhatsThis::add( this, i18n(
"This is an empty space in a worksheet. Drag a sensor from "
"the Sensor Browser and drop it here. A sensor display will "
"appear that allows you to monitor the values of the sensor "
"over time." ) );
}
-void DummyDisplay::resizeEvent( QResizeEvent* )
+void DummyDisplay::resizeEvent( TQResizeEvent* )
{
frame()->setGeometry( 0, 0, width(), height() );
}
-bool DummyDisplay::eventFilter( QObject* object, QEvent* event )
+bool DummyDisplay::eventFilter( TQObject* object, TQEvent* event )
{
- if ( event->type() == QEvent::MouseButtonRelease &&
- ( (QMouseEvent*)event)->button() == LeftButton )
+ if ( event->type() == TQEvent::MouseButtonRelease &&
+ ( (TQMouseEvent*)event)->button() == LeftButton )
setFocus();
- return QWidget::eventFilter( object, event );
+ return TQWidget::eventFilter( object, event );
}
#include "DummyDisplay.moc"
diff --git a/ksysguard/gui/SensorDisplayLib/DummyDisplay.h b/ksysguard/gui/SensorDisplayLib/DummyDisplay.h
index 53098fa0c..cd00a6fd6 100644
--- a/ksysguard/gui/SensorDisplayLib/DummyDisplay.h
+++ b/ksysguard/gui/SensorDisplayLib/DummyDisplay.h
@@ -31,14 +31,14 @@ class DummyDisplay : public KSGRD::SensorDisplay
Q_OBJECT
public:
- DummyDisplay( QWidget* parent = 0, const char* name = 0,
- const QString& = QString::null, double min = 0,
+ DummyDisplay( TQWidget* parent = 0, const char* name = 0,
+ const TQString& = TQString::null, double min = 0,
double max = 0 );
virtual ~DummyDisplay() {}
- void resizeEvent( QResizeEvent* );
+ void resizeEvent( TQResizeEvent* );
- virtual bool eventFilter( QObject*, QEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
};
#endif
diff --git a/ksysguard/gui/SensorDisplayLib/FancyPlotter.cc b/ksysguard/gui/SensorDisplayLib/FancyPlotter.cc
index 361ce16e7..0434877bb 100644
--- a/ksysguard/gui/SensorDisplayLib/FancyPlotter.cc
+++ b/ksysguard/gui/SensorDisplayLib/FancyPlotter.cc
@@ -21,9 +21,9 @@
*/
-#include <qdom.h>
-#include <qimage.h>
-#include <qtooltip.h>
+#include <tqdom.h>
+#include <tqimage.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <klocale.h>
@@ -36,8 +36,8 @@
#include "FancyPlotter.h"
-FancyPlotter::FancyPlotter( QWidget* parent, const char* name,
- const QString &title, double, double,
+FancyPlotter::FancyPlotter( TQWidget* parent, const char* name,
+ const TQString &title, double, double,
bool nf, bool isApplet)
: KSGRD::SensorDisplay( parent, name, title, nf, isApplet )
{
@@ -97,10 +97,10 @@ void FancyPlotter::configureSettings()
mSettingsDialog->setBackgroundColor( mPlotter->backgroundColor() );
- QValueList< QStringList > list;
+ TQValueList< TQStringList > list;
for ( uint i = 0; i < mBeams; ++i ) {
- QStringList entry;
- entry << QString::number(i);
+ TQStringList entry;
+ entry << TQString::number(i);
entry << sensors().at( i )->hostName();
entry << KSGRD::SensorMgr->translateSensor( sensors().at( i )->name() );
entry << KSGRD::SensorMgr->translateUnit( sensors().at( i )->unit() );
@@ -111,9 +111,9 @@ void FancyPlotter::configureSettings()
}
mSettingsDialog->setSensors( list );
- connect( mSettingsDialog, SIGNAL( applyClicked() ), SLOT( applySettings() ) );
- connect( mSettingsDialog, SIGNAL( okClicked() ), SLOT( applySettings() ) );
- connect( mSettingsDialog, SIGNAL( finished() ), SLOT( killDialog() ) );
+ connect( mSettingsDialog, TQT_SIGNAL( applyClicked() ), TQT_SLOT( applySettings() ) );
+ connect( mSettingsDialog, TQT_SIGNAL( okClicked() ), TQT_SLOT( applySettings() ) );
+ connect( mSettingsDialog, TQT_SIGNAL( finished() ), TQT_SLOT( killDialog() ) );
mSettingsDialog->show();
}
@@ -143,7 +143,7 @@ void FancyPlotter::applySettings()
if ( mPlotter->horizontalScale() != mSettingsDialog->horizontalScale() ) {
mPlotter->setHorizontalScale( mSettingsDialog->horizontalScale() );
- // Can someone think of a useful QResizeEvent to pass?
+ // Can someone think of a useful TQResizeEvent to pass?
// It doesn't really matter anyway because it's not used.
emit resizeEvent( 0 );
}
@@ -164,23 +164,23 @@ void FancyPlotter::applySettings()
mPlotter->setBackgroundColor( mSettingsDialog->backgroundColor() );
- QValueList<int> orderOfSensors = mSettingsDialog->order();
- QValueList<int> deletedSensors = mSettingsDialog->deleted();
+ TQValueList<int> orderOfSensors = mSettingsDialog->order();
+ TQValueList<int> deletedSensors = mSettingsDialog->deleted();
mSettingsDialog->clearDeleted();
mSettingsDialog->resetOrder();
- QValueList< int >::Iterator itDelete;
+ TQValueList< int >::Iterator itDelete;
for ( itDelete = deletedSensors.begin(); itDelete != deletedSensors.end(); ++itDelete )
removeSensor(*itDelete);
- QValueList< int >::Iterator itOrder;
+ TQValueList< int >::Iterator itOrder;
mPlotter->reorderBeams(orderOfSensors);
reorderSensors(orderOfSensors);
- QValueList< QStringList > list = mSettingsDialog->sensors();
- QValueList< QStringList >::Iterator it;
+ TQValueList< TQStringList > list = mSettingsDialog->sensors();
+ TQValueList< TQStringList >::Iterator it;
for ( uint i = 0; i < sensors().count(); ++i )
- mPlotter->beamColors()[ i ] = QColor( list[i][ 5 ] );
+ mPlotter->beamColors()[ i ] = TQColor( list[i][ 5 ] );
mPlotter->repaint();
setModified( true );
@@ -200,22 +200,22 @@ void FancyPlotter::applyStyle()
setModified( true );
}
-bool FancyPlotter::addSensor( const QString &hostName, const QString &name,
- const QString &type, const QString &title )
+bool FancyPlotter::addSensor( const TQString &hostName, const TQString &name,
+ const TQString &type, const TQString &title )
{
return addSensor( hostName, name, type, title,
KSGRD::Style->sensorColor( mBeams ) );
}
-bool FancyPlotter::addSensor( const QString &hostName, const QString &name,
- const QString &type, const QString &title,
- const QColor &color )
+bool FancyPlotter::addSensor( const TQString &hostName, const TQString &name,
+ const TQString &type, const TQString &title,
+ const TQColor &color )
{
if ( type != "integer" && type != "float" )
return false;
if ( mBeams > 0 && hostName != sensors().at( 0 )->hostName() ) {
- KMessageBox::sorry( this, QString( "All sensors of this display need "
+ KMessageBox::sorry( this, TQString( "All sensors of this display need "
"to be from the host %1!" )
.arg( sensors().at( 0 )->hostName() ) );
@@ -235,15 +235,15 @@ bool FancyPlotter::addSensor( const QString &hostName, const QString &name,
++mBeams;
- QString tooltip;
+ TQString tooltip;
for ( uint i = 0; i < mBeams; ++i ) {
- tooltip += QString( "%1%2:%3" ).arg( i != 0 ? "\n" : "" )
+ tooltip += TQString( "%1%2:%3" ).arg( i != 0 ? "\n" : "" )
.arg( sensors().at( mBeams - i - 1 )->hostName() )
.arg( sensors().at( mBeams - i - 1 )->name() );
}
- QToolTip::remove( mPlotter );
- QToolTip::add( mPlotter, tooltip );
+ TQToolTip::remove( mPlotter );
+ TQToolTip::add( mPlotter, tooltip );
return true;
}
@@ -260,20 +260,20 @@ bool FancyPlotter::removeSensor( uint pos )
mBeams--;
KSGRD::SensorDisplay::removeSensor( pos );
- QString tooltip;
+ TQString tooltip;
for ( uint i = 0; i < mBeams; ++i ) {
- tooltip += QString( "%1%2:%3" ).arg( i != 0 ? "\n" : "" )
+ tooltip += TQString( "%1%2:%3" ).arg( i != 0 ? "\n" : "" )
.arg( sensors().at( mBeams - i - 1 )->hostName() )
.arg( sensors().at( mBeams - i - 1 )->name() );
}
- QToolTip::remove( mPlotter );
- QToolTip::add( mPlotter, tooltip );
+ TQToolTip::remove( mPlotter );
+ TQToolTip::add( mPlotter, tooltip );
return true;
}
-void FancyPlotter::resizeEvent( QResizeEvent* )
+void FancyPlotter::resizeEvent( TQResizeEvent* )
{
if ( noFrame() )
mPlotter->setGeometry( 0, 0, width(), height() );
@@ -281,7 +281,7 @@ void FancyPlotter::resizeEvent( QResizeEvent* )
frame()->setGeometry( 0, 0, width(), height() );
}
-QSize FancyPlotter::sizeHint()
+TQSize FancyPlotter::sizeHint()
{
if ( noFrame() )
return mPlotter->sizeHint();
@@ -289,7 +289,7 @@ QSize FancyPlotter::sizeHint()
return frame()->sizeHint();
}
-void FancyPlotter::answerReceived( int id, const QString &answer )
+void FancyPlotter::answerReceived( int id, const TQString &answer )
{
if ( (uint)id < mBeams ) {
if ( id != (int)mSampleBuf.count() ) {
@@ -323,7 +323,7 @@ void FancyPlotter::answerReceived( int id, const QString &answer )
}
}
-bool FancyPlotter::restoreSettings( QDomElement &element )
+bool FancyPlotter::restoreSettings( TQDomElement &element )
{
/* autoRage was added after KDE 2.x and was brokenly emulated by
* min == 0.0 and max == 0.0. Since we have to be able to read old
@@ -354,14 +354,14 @@ bool FancyPlotter::restoreSettings( QDomElement &element )
mPlotter->setShowLabels( element.attribute( "labels", "1" ).toUInt() );
mPlotter->setShowTopBar( element.attribute( "topBar", "0" ).toUInt() );
mPlotter->setFontSize( element.attribute( "fontSize",
- QString( "%1" ).arg( KSGRD::Style->fontSize() ) ).toUInt() );
+ TQString( "%1" ).arg( KSGRD::Style->fontSize() ) ).toUInt() );
mPlotter->setBackgroundColor( restoreColor( element, "bColor",
KSGRD::Style->backgroundColor() ) );
- QDomNodeList dnList = element.elementsByTagName( "beam" );
+ TQDomNodeList dnList = element.elementsByTagName( "beam" );
for ( uint i = 0; i < dnList.count(); ++i ) {
- QDomElement el = dnList.item( i ).toElement();
+ TQDomElement el = dnList.item( i ).toElement();
addSensor( el.attribute( "hostName" ), el.attribute( "sensorName" ),
( el.attribute( "sensorType" ).isEmpty() ? "integer" :
el.attribute( "sensorType" ) ), "", restoreColor( el, "color",
@@ -378,7 +378,7 @@ bool FancyPlotter::restoreSettings( QDomElement &element )
return true;
}
-bool FancyPlotter::saveSettings( QDomDocument &doc, QDomElement &element,
+bool FancyPlotter::saveSettings( TQDomDocument &doc, TQDomElement &element,
bool save )
{
element.setAttribute( "min", mPlotter->minValue() );
@@ -403,7 +403,7 @@ bool FancyPlotter::saveSettings( QDomDocument &doc, QDomElement &element,
saveColor( element, "bColor", mPlotter->backgroundColor() );
for ( uint i = 0; i < mBeams; ++i ) {
- QDomElement beam = doc.createElement( "beam" );
+ TQDomElement beam = doc.createElement( "beam" );
element.appendChild( beam );
beam.setAttribute( "hostName", sensors().at( i )->hostName() );
beam.setAttribute( "sensorName", sensors().at( i )->name() );
@@ -430,11 +430,11 @@ FPSensorProperties::FPSensorProperties()
{
}
-FPSensorProperties::FPSensorProperties( const QString &hostName,
- const QString &name,
- const QString &type,
- const QString &description,
- const QColor &color )
+FPSensorProperties::FPSensorProperties( const TQString &hostName,
+ const TQString &name,
+ const TQString &type,
+ const TQString &description,
+ const TQColor &color )
: KSGRD::SensorProperties( hostName, name, type, description ),
mColor( color )
{
@@ -444,12 +444,12 @@ FPSensorProperties::~FPSensorProperties()
{
}
-void FPSensorProperties::setColor( const QColor &color )
+void FPSensorProperties::setColor( const TQColor &color )
{
mColor = color;
}
-QColor FPSensorProperties::color() const
+TQColor FPSensorProperties::color() const
{
return mColor;
}
diff --git a/ksysguard/gui/SensorDisplayLib/FancyPlotter.h b/ksysguard/gui/SensorDisplayLib/FancyPlotter.h
index d19c28760..ddb5f7328 100644
--- a/ksysguard/gui/SensorDisplayLib/FancyPlotter.h
+++ b/ksysguard/gui/SensorDisplayLib/FancyPlotter.h
@@ -34,16 +34,16 @@ class FPSensorProperties : public KSGRD::SensorProperties
{
public:
FPSensorProperties();
- FPSensorProperties( const QString &hostName, const QString &name,
- const QString &type, const QString &description,
- const QColor &color );
+ FPSensorProperties( const TQString &hostName, const TQString &name,
+ const TQString &type, const TQString &description,
+ const TQColor &color );
~FPSensorProperties();
- void setColor( const QColor &color );
- QColor color() const;
+ void setColor( const TQColor &color );
+ TQColor color() const;
private:
- QColor mColor;
+ TQColor mColor;
};
class FancyPlotter : public KSGRD::SensorDisplay
@@ -51,27 +51,27 @@ class FancyPlotter : public KSGRD::SensorDisplay
Q_OBJECT
public:
- FancyPlotter( QWidget* parent = 0, const char* name = 0,
- const QString& title = QString::null, double min = 0,
+ FancyPlotter( TQWidget* parent = 0, const char* name = 0,
+ const TQString& title = TQString::null, double min = 0,
double max = 100, bool noFrame = false, bool isApplet = false );
virtual ~FancyPlotter();
void configureSettings();
- bool addSensor( const QString &hostName, const QString &name,
- const QString &type, const QString &title );
- bool addSensor( const QString &hostName, const QString &name,
- const QString &type, const QString &title,
- const QColor &color );
+ bool addSensor( const TQString &hostName, const TQString &name,
+ const TQString &type, const TQString &title );
+ bool addSensor( const TQString &hostName, const TQString &name,
+ const TQString &type, const TQString &title,
+ const TQColor &color );
bool removeSensor( uint pos );
- virtual QSize sizeHint(void);
+ virtual TQSize sizeHint(void);
- virtual void answerReceived( int id, const QString &answer );
+ virtual void answerReceived( int id, const TQString &answer );
- virtual bool restoreSettings( QDomElement &element );
- virtual bool saveSettings( QDomDocument &doc, QDomElement &element,
+ virtual bool restoreSettings( TQDomElement &element );
+ virtual bool saveSettings( TQDomDocument &doc, TQDomElement &element,
bool save = true );
virtual bool hasSettingsDialog() const;
@@ -82,7 +82,7 @@ class FancyPlotter : public KSGRD::SensorDisplay
void killDialog();
protected:
- virtual void resizeEvent( QResizeEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
private:
uint mBeams;
@@ -97,7 +97,7 @@ class FancyPlotter : public KSGRD::SensorDisplay
received. The flags variable is used to ensure that all samples have
been received.
*/
- QValueList<double> mSampleBuf;
+ TQValueList<double> mSampleBuf;
};
#endif
diff --git a/ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.cc b/ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.cc
index 9d4114bd3..de345e7b8 100644
--- a/ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.cc
+++ b/ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.cc
@@ -29,87 +29,87 @@
#include <klocale.h>
#include <knuminput.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qgroupbox.h>
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qwhatsthis.h>
-#include <qheader.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqgroupbox.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqwhatsthis.h>
+#include <tqheader.h>
#include "FancyPlotterSettings.h"
-FancyPlotterSettings::FancyPlotterSettings( QWidget* parent, const char* name )
+FancyPlotterSettings::FancyPlotterSettings( TQWidget* parent, const char* name )
: KDialogBase( Tabbed, i18n( "Signal Plotter Settings" ), Ok | Apply | Cancel,
Ok, parent, name, false, true )
{
- QFrame *page = 0;
- QGridLayout *pageLayout = 0;
- QGridLayout *boxLayout = 0;
- QGroupBox *groupBox = 0;
- QLabel *label = 0;
+ TQFrame *page = 0;
+ TQGridLayout *pageLayout = 0;
+ TQGridLayout *boxLayout = 0;
+ TQGroupBox *groupBox = 0;
+ TQLabel *label = 0;
// Style page
page = addPage( i18n( "Style" ) );
- pageLayout = new QGridLayout( page, 3, 2, 0, spacingHint() );
+ pageLayout = new TQGridLayout( page, 3, 2, 0, spacingHint() );
- label = new QLabel( i18n( "Title:" ), page );
+ label = new TQLabel( i18n( "Title:" ), page );
pageLayout->addWidget( label, 0, 0 );
mTitle = new KLineEdit( page );
- QWhatsThis::add( mTitle, i18n( "Enter the title of the display here." ) );
+ TQWhatsThis::add( mTitle, i18n( "Enter the title of the display here." ) );
pageLayout->addWidget( mTitle, 0, 1 );
label->setBuddy( mTitle );
- QButtonGroup *buttonBox = new QButtonGroup( 2, Qt::Vertical,
+ TQButtonGroup *buttonBox = new TQButtonGroup( 2, Qt::Vertical,
i18n( "Graph Drawing Style" ), page );
- mUsePolygonStyle = new QRadioButton( i18n( "Basic polygons" ), buttonBox );
+ mUsePolygonStyle = new TQRadioButton( i18n( "Basic polygons" ), buttonBox );
mUsePolygonStyle->setChecked( true );
- mUseOriginalStyle = new QRadioButton( i18n( "Original - single line per data point" ), buttonBox );
+ mUseOriginalStyle = new TQRadioButton( i18n( "Original - single line per data point" ), buttonBox );
pageLayout->addMultiCellWidget( buttonBox, 1, 1, 0, 1 );
// Scales page
page = addPage( i18n( "Scales" ) );
- pageLayout = new QGridLayout( page, 2, 1, 0, spacingHint() );
+ pageLayout = new TQGridLayout( page, 2, 1, 0, spacingHint() );
- groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Vertical Scale" ), page );
- boxLayout = new QGridLayout( groupBox->layout(), 2, 5, spacingHint() );
+ groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Vertical Scale" ), page );
+ boxLayout = new TQGridLayout( groupBox->layout(), 2, 5, spacingHint() );
boxLayout->setColStretch( 2, 1 );
- mUseAutoRange = new QCheckBox( i18n( "Automatic range detection" ), groupBox );
- QWhatsThis::add( mUseAutoRange, i18n( "Check this box if you want the display range to adapt dynamically to the currently displayed values; if you do not check this, you have to specify the range you want in the fields below." ) );
+ mUseAutoRange = new TQCheckBox( i18n( "Automatic range detection" ), groupBox );
+ TQWhatsThis::add( mUseAutoRange, i18n( "Check this box if you want the display range to adapt dynamically to the currently displayed values; if you do not check this, you have to specify the range you want in the fields below." ) );
boxLayout->addMultiCellWidget( mUseAutoRange, 0, 0, 0, 4 );
- label = new QLabel( i18n( "Minimum value:" ), groupBox );
+ label = new TQLabel( i18n( "Minimum value:" ), groupBox );
boxLayout->addWidget( label, 1, 0 );
mMinValue = new KLineEdit( groupBox );
mMinValue->setAlignment( AlignRight );
mMinValue->setEnabled( false );
- QWhatsThis::add( mMinValue, i18n( "Enter the minimum value for the display here. If both values are 0, automatic range detection is enabled." ) );
+ TQWhatsThis::add( mMinValue, i18n( "Enter the minimum value for the display here. If both values are 0, automatic range detection is enabled." ) );
boxLayout->addWidget( mMinValue, 1, 1 );
label->setBuddy( mMinValue );
- label = new QLabel( i18n( "Maximum value:" ), groupBox );
+ label = new TQLabel( i18n( "Maximum value:" ), groupBox );
boxLayout->addWidget( label, 1, 3 );
mMaxValue = new KLineEdit( groupBox );
mMaxValue->setAlignment( AlignRight );
mMaxValue->setEnabled( false );
- QWhatsThis::add( mMaxValue, i18n( "Enter the maximum value for the display here. If both values are 0, automatic range detection is enabled." ) );
+ TQWhatsThis::add( mMaxValue, i18n( "Enter the maximum value for the display here. If both values are 0, automatic range detection is enabled." ) );
boxLayout->addWidget( mMaxValue, 1, 4 );
label->setBuddy( mMaxValue );
pageLayout->addWidget( groupBox, 0, 0 );
- groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Horizontal Scale" ), page );
- boxLayout = new QGridLayout( groupBox->layout(), 2, 2, spacingHint() );
+ groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Horizontal Scale" ), page );
+ boxLayout = new TQGridLayout( groupBox->layout(), 2, 2, spacingHint() );
boxLayout->setRowStretch( 1, 1 );
mHorizontalScale = new KIntNumInput( 1, groupBox );
@@ -117,47 +117,47 @@ FancyPlotterSettings::FancyPlotterSettings( QWidget* parent, const char* name )
mHorizontalScale->setMaxValue( 50 );
boxLayout->addWidget( mHorizontalScale, 0, 0 );
- label = new QLabel( i18n( "pixel(s) per time period" ), groupBox );
+ label = new TQLabel( i18n( "pixel(s) per time period" ), groupBox );
boxLayout->addWidget( label, 0, 1 );
pageLayout->addWidget( groupBox, 1, 0 );
// Grid page
page = addPage( i18n( "Grid" ) );
- pageLayout = new QGridLayout( page, 3, 2, 0, spacingHint() );
+ pageLayout = new TQGridLayout( page, 3, 2, 0, spacingHint() );
- groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Lines" ), page );
- boxLayout = new QGridLayout( groupBox->layout(), 2, 5, spacingHint() );
+ groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Lines" ), page );
+ boxLayout = new TQGridLayout( groupBox->layout(), 2, 5, spacingHint() );
boxLayout->setColStretch( 1, 1 );
- mShowVerticalLines = new QCheckBox( i18n( "Vertical lines" ), groupBox );
- QWhatsThis::add( mShowVerticalLines, i18n( "Check this to activate the vertical lines if display is large enough." ) );
+ mShowVerticalLines = new TQCheckBox( i18n( "Vertical lines" ), groupBox );
+ TQWhatsThis::add( mShowVerticalLines, i18n( "Check this to activate the vertical lines if display is large enough." ) );
boxLayout->addWidget( mShowVerticalLines, 0, 0 );
- label = new QLabel( i18n( "Distance:" ), groupBox );
+ label = new TQLabel( i18n( "Distance:" ), groupBox );
boxLayout->addWidget( label, 0, 2 );
mVerticalLinesDistance = new KIntNumInput( 0, groupBox );
mVerticalLinesDistance->setMinValue( 10 );
mVerticalLinesDistance->setMaxValue( 120 );
- QWhatsThis::add( mVerticalLinesDistance, i18n( "Enter the distance between two vertical lines here." ) );
+ TQWhatsThis::add( mVerticalLinesDistance, i18n( "Enter the distance between two vertical lines here." ) );
boxLayout->addWidget( mVerticalLinesDistance , 0, 3 );
label->setBuddy( mVerticalLinesDistance );
- mVerticalLinesScroll = new QCheckBox( i18n( "Vertical lines scroll" ), groupBox );
+ mVerticalLinesScroll = new TQCheckBox( i18n( "Vertical lines scroll" ), groupBox );
boxLayout->addWidget( mVerticalLinesScroll, 0, 4 );
- mShowHorizontalLines = new QCheckBox( i18n( "Horizontal lines" ), groupBox );
- QWhatsThis::add( mShowHorizontalLines, i18n( "Check this to enable horizontal lines if display is large enough." ) );
+ mShowHorizontalLines = new TQCheckBox( i18n( "Horizontal lines" ), groupBox );
+ TQWhatsThis::add( mShowHorizontalLines, i18n( "Check this to enable horizontal lines if display is large enough." ) );
boxLayout->addWidget( mShowHorizontalLines, 1, 0 );
- label = new QLabel( i18n( "Count:" ), groupBox );
+ label = new TQLabel( i18n( "Count:" ), groupBox );
boxLayout->addWidget( label, 1, 2 );
mHorizontalLinesCount = new KIntNumInput( 0, groupBox );
mHorizontalLinesCount->setMinValue( 1 );
mHorizontalLinesCount->setMaxValue( 100 );
- QWhatsThis::add( mHorizontalLinesCount, i18n( "Enter the number of horizontal lines here." ) );
+ TQWhatsThis::add( mHorizontalLinesCount, i18n( "Enter the number of horizontal lines here." ) );
boxLayout->addWidget( mHorizontalLinesCount , 1, 3 );
label->setBuddy( mHorizontalLinesCount );
@@ -165,15 +165,15 @@ FancyPlotterSettings::FancyPlotterSettings( QWidget* parent, const char* name )
pageLayout->addMultiCellWidget( groupBox, 0, 0, 0, 1 );
- groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Text" ), page );
- boxLayout = new QGridLayout( groupBox->layout(), 3, 4, spacingHint() );
+ groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Text" ), page );
+ boxLayout = new TQGridLayout( groupBox->layout(), 3, 4, spacingHint() );
boxLayout->setColStretch( 1, 1 );
- mShowLabels = new QCheckBox( i18n( "Labels" ), groupBox );
- QWhatsThis::add( mShowLabels, i18n( "Check this box if horizontal lines should be decorated with the values they mark." ) );
+ mShowLabels = new TQCheckBox( i18n( "Labels" ), groupBox );
+ TQWhatsThis::add( mShowLabels, i18n( "Check this box if horizontal lines should be decorated with the values they mark." ) );
boxLayout->addWidget( mShowLabels, 0, 0 );
- label = new QLabel( i18n( "Font size:" ), groupBox );
+ label = new TQLabel( i18n( "Font size:" ), groupBox );
boxLayout->addWidget( label, 0, 2 );
mFontSize = new KIntNumInput( 9, groupBox );
@@ -182,32 +182,32 @@ FancyPlotterSettings::FancyPlotterSettings( QWidget* parent, const char* name )
boxLayout->addWidget( mFontSize, 0, 3 );
label->setBuddy( mFontSize );
- mShowTopBar = new QCheckBox( i18n( "Top bar" ), groupBox );
- QWhatsThis::add( mShowTopBar, i18n( "Check this to active the display title bar. This is probably only useful for applet displays. The bar is only visible if the display is large enough." ) );
+ mShowTopBar = new TQCheckBox( i18n( "Top bar" ), groupBox );
+ TQWhatsThis::add( mShowTopBar, i18n( "Check this to active the display title bar. This is probably only useful for applet displays. The bar is only visible if the display is large enough." ) );
boxLayout->addWidget( mShowTopBar, 1, 0 );
boxLayout->setRowStretch( 2, 1 );
pageLayout->addWidget( groupBox, 1, 0 );
- groupBox = new QGroupBox( 0, Qt::Vertical, i18n( "Colors" ), page );
- boxLayout = new QGridLayout( groupBox->layout(), 4, 2, spacingHint() );
+ groupBox = new TQGroupBox( 0, Qt::Vertical, i18n( "Colors" ), page );
+ boxLayout = new TQGridLayout( groupBox->layout(), 4, 2, spacingHint() );
- label = new QLabel( i18n( "Vertical lines:" ), groupBox );
+ label = new TQLabel( i18n( "Vertical lines:" ), groupBox );
boxLayout->addWidget( label, 0, 0 );
mVerticalLinesColor = new KColorButton( groupBox );
boxLayout->addWidget( mVerticalLinesColor, 0, 1 );
label->setBuddy( mVerticalLinesColor );
- label = new QLabel( i18n( "Horizontal lines:" ), groupBox );
+ label = new TQLabel( i18n( "Horizontal lines:" ), groupBox );
boxLayout->addWidget( label, 1, 0 );
mHorizontalLinesColor = new KColorButton( groupBox );
boxLayout->addWidget( mHorizontalLinesColor, 1, 1 );
label->setBuddy( mHorizontalLinesColor );
- label = new QLabel( i18n( "Background:" ), groupBox );
+ label = new TQLabel( i18n( "Background:" ), groupBox );
boxLayout->addWidget( label, 2, 0 );
mBackgroundColor = new KColorButton( groupBox );
@@ -222,7 +222,7 @@ FancyPlotterSettings::FancyPlotterSettings( QWidget* parent, const char* name )
// Sensors page
page = addPage( i18n( "Sensors" ) );
- pageLayout = new QGridLayout( page, 6, 2, 0, spacingHint() );
+ pageLayout = new TQGridLayout( page, 6, 2, 0, spacingHint() );
pageLayout->setRowStretch( 2, 1 );
pageLayout->setRowStretch( 5, 1 );
@@ -232,55 +232,55 @@ FancyPlotterSettings::FancyPlotterSettings( QWidget* parent, const char* name )
mSensorView->addColumn( i18n( "Sensor" ) );
mSensorView->addColumn( i18n( "Unit" ) );
mSensorView->addColumn( i18n( "Status" ) );
- mSensorView->setResizeMode(QListView::LastColumn);
+ mSensorView->setResizeMode(TQListView::LastColumn);
mSensorView->header()->setResizeEnabled(false, 0);
mSensorView->hideColumn(0);
mSensorView->header()->resizeSection(0, 0);
mSensorView->setAllColumnsShowFocus( true );
pageLayout->addMultiCellWidget( mSensorView, 0, 5, 0, 0 );
mSensorView->setSortColumn ( -1 );
- mEditButton = new QPushButton( i18n( "Set Color..." ), page );
+ mEditButton = new TQPushButton( i18n( "Set Color..." ), page );
mEditButton->setEnabled( false );
- QWhatsThis::add( mEditButton, i18n( "Push this button to configure the color of the sensor in the diagram." ) );
+ TQWhatsThis::add( mEditButton, i18n( "Push this button to configure the color of the sensor in the diagram." ) );
pageLayout->addWidget( mEditButton, 0, 1 );
- mRemoveButton = new QPushButton( i18n( "Delete" ), page );
+ mRemoveButton = new TQPushButton( i18n( "Delete" ), page );
mRemoveButton->setEnabled( false );
- QWhatsThis::add( mRemoveButton, i18n( "Push this button to delete the sensor." ) );
+ TQWhatsThis::add( mRemoveButton, i18n( "Push this button to delete the sensor." ) );
pageLayout->addWidget( mRemoveButton, 1, 1 );
- mMoveUpButton = new QPushButton( i18n( "Move Up" ), page );
+ mMoveUpButton = new TQPushButton( i18n( "Move Up" ), page );
mMoveUpButton->setEnabled( false );
pageLayout->addWidget( mMoveUpButton, 3, 1 );
- mMoveDownButton = new QPushButton( i18n( "Move Down" ), page );
+ mMoveDownButton = new TQPushButton( i18n( "Move Down" ), page );
mMoveDownButton->setEnabled( false );
pageLayout->addWidget( mMoveDownButton, 4, 1 );
- connect( mUseAutoRange, SIGNAL( toggled( bool ) ), mMinValue,
- SLOT( setDisabled( bool ) ) );
- connect( mUseAutoRange, SIGNAL( toggled( bool ) ), mMaxValue,
- SLOT( setDisabled( bool ) ) );
- connect( mShowVerticalLines, SIGNAL( toggled( bool ) ), mVerticalLinesDistance,
- SLOT( setEnabled( bool ) ) );
- connect( mShowVerticalLines, SIGNAL( toggled( bool ) ), mVerticalLinesScroll,
- SLOT( setEnabled( bool ) ) );
- connect( mShowVerticalLines, SIGNAL( toggled( bool ) ), mVerticalLinesColor,
- SLOT( setEnabled( bool ) ) );
- connect( mShowHorizontalLines, SIGNAL( toggled( bool ) ), mHorizontalLinesCount,
- SLOT( setEnabled( bool ) ) );
- connect( mShowHorizontalLines, SIGNAL( toggled( bool ) ), mHorizontalLinesColor,
- SLOT( setEnabled( bool ) ) );
- connect( mShowHorizontalLines, SIGNAL( toggled( bool ) ), mShowLabels,
- SLOT( setEnabled( bool ) ) );
- connect( mSensorView, SIGNAL( selectionChanged( QListViewItem* ) ),
- SLOT( selectionChanged( QListViewItem* ) ) );
-
- connect( mEditButton, SIGNAL( clicked() ), SLOT( editSensor() ) );
- connect( mRemoveButton, SIGNAL( clicked() ), SLOT( removeSensor() ) );
- connect( mMoveUpButton, SIGNAL( clicked() ), SLOT( moveUpSensor() ) );
- connect( mMoveDownButton, SIGNAL( clicked() ), SLOT( moveDownSensor() ) );
- connect ( mSensorView, SIGNAL( doubleClicked( QListViewItem *, const QPoint &, int )), SLOT(editSensor()));
+ connect( mUseAutoRange, TQT_SIGNAL( toggled( bool ) ), mMinValue,
+ TQT_SLOT( setDisabled( bool ) ) );
+ connect( mUseAutoRange, TQT_SIGNAL( toggled( bool ) ), mMaxValue,
+ TQT_SLOT( setDisabled( bool ) ) );
+ connect( mShowVerticalLines, TQT_SIGNAL( toggled( bool ) ), mVerticalLinesDistance,
+ TQT_SLOT( setEnabled( bool ) ) );
+ connect( mShowVerticalLines, TQT_SIGNAL( toggled( bool ) ), mVerticalLinesScroll,
+ TQT_SLOT( setEnabled( bool ) ) );
+ connect( mShowVerticalLines, TQT_SIGNAL( toggled( bool ) ), mVerticalLinesColor,
+ TQT_SLOT( setEnabled( bool ) ) );
+ connect( mShowHorizontalLines, TQT_SIGNAL( toggled( bool ) ), mHorizontalLinesCount,
+ TQT_SLOT( setEnabled( bool ) ) );
+ connect( mShowHorizontalLines, TQT_SIGNAL( toggled( bool ) ), mHorizontalLinesColor,
+ TQT_SLOT( setEnabled( bool ) ) );
+ connect( mShowHorizontalLines, TQT_SIGNAL( toggled( bool ) ), mShowLabels,
+ TQT_SLOT( setEnabled( bool ) ) );
+ connect( mSensorView, TQT_SIGNAL( selectionChanged( TQListViewItem* ) ),
+ TQT_SLOT( selectionChanged( TQListViewItem* ) ) );
+
+ connect( mEditButton, TQT_SIGNAL( clicked() ), TQT_SLOT( editSensor() ) );
+ connect( mRemoveButton, TQT_SIGNAL( clicked() ), TQT_SLOT( removeSensor() ) );
+ connect( mMoveUpButton, TQT_SIGNAL( clicked() ), TQT_SLOT( moveUpSensor() ) );
+ connect( mMoveDownButton, TQT_SIGNAL( clicked() ), TQT_SLOT( moveDownSensor() ) );
+ connect ( mSensorView, TQT_SIGNAL( doubleClicked( TQListViewItem *, const TQPoint &, int )), TQT_SLOT(editSensor()));
KAcceleratorManager::manage( this );
}
@@ -289,12 +289,12 @@ FancyPlotterSettings::~FancyPlotterSettings()
{
}
-void FancyPlotterSettings::setTitle( const QString &title )
+void FancyPlotterSettings::setTitle( const TQString &title )
{
mTitle->setText( title );
}
-QString FancyPlotterSettings::title() const
+TQString FancyPlotterSettings::title() const
{
return mTitle->text();
}
@@ -313,7 +313,7 @@ bool FancyPlotterSettings::useAutoRange() const
void FancyPlotterSettings::setMinValue( double min )
{
- mMinValue->setText( QString::number( min ) );
+ mMinValue->setText( TQString::number( min ) );
}
double FancyPlotterSettings::minValue() const
@@ -323,7 +323,7 @@ double FancyPlotterSettings::minValue() const
void FancyPlotterSettings::setMaxValue( double max )
{
- mMaxValue->setText( QString::number( max ) );
+ mMaxValue->setText( TQString::number( max ) );
}
double FancyPlotterSettings::maxValue() const
@@ -367,12 +367,12 @@ bool FancyPlotterSettings::showVerticalLines() const
return mShowVerticalLines->isChecked();
}
-void FancyPlotterSettings::setVerticalLinesColor( const QColor &color )
+void FancyPlotterSettings::setVerticalLinesColor( const TQColor &color )
{
mVerticalLinesColor->setColor( color );
}
-QColor FancyPlotterSettings::verticalLinesColor() const
+TQColor FancyPlotterSettings::verticalLinesColor() const
{
return mVerticalLinesColor->color();
}
@@ -411,12 +411,12 @@ bool FancyPlotterSettings::showHorizontalLines() const
return mShowHorizontalLines->isChecked();
}
-void FancyPlotterSettings::setHorizontalLinesColor( const QColor &color )
+void FancyPlotterSettings::setHorizontalLinesColor( const TQColor &color )
{
mHorizontalLinesColor->setColor( color );
}
-QColor FancyPlotterSettings::horizontalLinesColor() const
+TQColor FancyPlotterSettings::horizontalLinesColor() const
{
return mHorizontalLinesColor->color();
}
@@ -461,12 +461,12 @@ int FancyPlotterSettings::fontSize() const
return mFontSize->value();
}
-void FancyPlotterSettings::setBackgroundColor( const QColor &color )
+void FancyPlotterSettings::setBackgroundColor( const TQColor &color )
{
mBackgroundColor->setColor( color );
}
-QColor FancyPlotterSettings::backgroundColor() const
+TQColor FancyPlotterSettings::backgroundColor() const
{
return mBackgroundColor->color();
}
@@ -474,16 +474,16 @@ void FancyPlotterSettings::clearDeleted()
{
mDeleted.clear();
}
-QValueList<int> FancyPlotterSettings::deleted() const
+TQValueList<int> FancyPlotterSettings::deleted() const
{
return mDeleted;
}
-QValueList<int> FancyPlotterSettings::order() const
+TQValueList<int> FancyPlotterSettings::order() const
{
- QValueList<int> newOrder;
+ TQValueList<int> newOrder;
- QListViewItemIterator it( mSensorView );
+ TQListViewItemIterator it( mSensorView );
for ( ; it.current(); ++it ) {
newOrder.prepend(it.current()->text(0).toInt());
}
@@ -493,46 +493,46 @@ QValueList<int> FancyPlotterSettings::order() const
void FancyPlotterSettings::resetOrder()
{
int i = mSensorView->childCount()-1;
- QListViewItemIterator it( mSensorView );
+ TQListViewItemIterator it( mSensorView );
for ( ; it.current(); ++it, --i) {
- it.current()->setText(0, QString::number(i));
+ it.current()->setText(0, TQString::number(i));
}
}
-void FancyPlotterSettings::setSensors( const QValueList< QStringList > &list )
+void FancyPlotterSettings::setSensors( const TQValueList< TQStringList > &list )
{
mSensorView->clear();
- QValueList< QStringList >::ConstIterator it;
+ TQValueList< TQStringList >::ConstIterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
- QListViewItem* lvi = new QListViewItem( mSensorView,
+ TQListViewItem* lvi = new TQListViewItem( mSensorView,
(*it)[ 0 ], // id
(*it)[ 1 ], // host name
(*it)[ 2 ], // sensor name
(*it)[ 3 ], // unit
(*it)[ 4 ] ); // status
- QPixmap pm( 12, 12 );
- pm.fill( QColor( (*it)[ 5 ] ) );
+ TQPixmap pm( 12, 12 );
+ pm.fill( TQColor( (*it)[ 5 ] ) );
lvi->setPixmap( 2, pm );
mSensorView->insertItem( lvi );
}
}
-QValueList< QStringList > FancyPlotterSettings::sensors() const
+TQValueList< TQStringList > FancyPlotterSettings::sensors() const
{
- QValueList< QStringList > list;
+ TQValueList< TQStringList > list;
- QListViewItemIterator it( mSensorView );
+ TQListViewItemIterator it( mSensorView );
for ( ; it.current(); ++it ) {
- QStringList entry;
+ TQStringList entry;
entry << it.current()->text( 0 );
entry << it.current()->text( 1 );
entry << it.current()->text( 2 );
entry << it.current()->text( 3 );
entry << it.current()->text( 4 );
QRgb rgb = it.current()->pixmap( 2 )->convertToImage().pixel( 1, 1 );
- QColor color( qRed( rgb ), qGreen( rgb ), qBlue( rgb ) );
+ TQColor color( qRed( rgb ), qGreen( rgb ), qBlue( rgb ) );
entry << ( color.name() );
list.prepend( entry );
@@ -543,15 +543,15 @@ QValueList< QStringList > FancyPlotterSettings::sensors() const
void FancyPlotterSettings::editSensor()
{
- QListViewItem* lvi = mSensorView->currentItem();
+ TQListViewItem* lvi = mSensorView->currentItem();
if ( !lvi )
return;
- QColor color = lvi->pixmap( 2 )->convertToImage().pixel( 1, 1 );
+ TQColor color = lvi->pixmap( 2 )->convertToImage().pixel( 1, 1 );
int result = KColorDialog::getColor( color, parentWidget() );
if ( result == KColorDialog::Accepted ) {
- QPixmap newPm( 12, 12 );
+ TQPixmap newPm( 12, 12 );
newPm.fill( color );
lvi->setPixmap( 2, newPm );
}
@@ -559,7 +559,7 @@ void FancyPlotterSettings::editSensor()
void FancyPlotterSettings::removeSensor()
{
- QListViewItem* lvi = mSensorView->currentItem();
+ TQListViewItem* lvi = mSensorView->currentItem();
if ( lvi ) {
//Note down the id of the one we are deleting
@@ -571,7 +571,7 @@ void FancyPlotterSettings::removeSensor()
* items can be deleted without forcing the user to select a new
* item between the deletes. If all items are deleted, the buttons
* are disabled again. */
- QListViewItem* newSelected = 0;
+ TQListViewItem* newSelected = 0;
if ( lvi->itemBelow() ) {
lvi->itemBelow()->setSelected( true );
newSelected = lvi->itemBelow();
@@ -583,10 +583,10 @@ void FancyPlotterSettings::removeSensor()
delete lvi;
- QListViewItemIterator it( mSensorView );
+ TQListViewItemIterator it( mSensorView );
for ( ; it.current(); ++it ) {
if(it.current()->text(0).toInt() > id)
- it.current()->setText(0, QString::number(it.current()->text(0).toInt() -1));
+ it.current()->setText(0, TQString::number(it.current()->text(0).toInt() -1));
}
@@ -598,7 +598,7 @@ void FancyPlotterSettings::removeSensor()
void FancyPlotterSettings::moveUpSensor()
{
if ( mSensorView->currentItem() != 0 ) {
- QListViewItem* item = mSensorView->currentItem()->itemAbove();
+ TQListViewItem* item = mSensorView->currentItem()->itemAbove();
if ( item ) {
if ( item->itemAbove() )
{
@@ -624,7 +624,7 @@ void FancyPlotterSettings::moveDownSensor()
}
}
-void FancyPlotterSettings::selectionChanged( QListViewItem *item )
+void FancyPlotterSettings::selectionChanged( TQListViewItem *item )
{
bool state = ( item != 0 );
diff --git a/ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.h b/ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.h
index b813bee34..08e73feca 100644
--- a/ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.h
+++ b/ksysguard/gui/SensorDisplayLib/FancyPlotterSettings.h
@@ -41,11 +41,11 @@ class FancyPlotterSettings : public KDialogBase
Q_OBJECT
public:
- FancyPlotterSettings( QWidget* parent = 0, const char* name = 0 );
+ FancyPlotterSettings( TQWidget* parent = 0, const char* name = 0 );
~FancyPlotterSettings();
- void setTitle( const QString &title );
- QString title() const;
+ void setTitle( const TQString &title );
+ TQString title() const;
void setUseAutoRange( bool value );
bool useAutoRange() const;
@@ -65,8 +65,8 @@ class FancyPlotterSettings : public KDialogBase
void setShowVerticalLines( bool value );
bool showVerticalLines() const;
- void setVerticalLinesColor( const QColor &color );
- QColor verticalLinesColor() const;
+ void setVerticalLinesColor( const TQColor &color );
+ TQColor verticalLinesColor() const;
void setVerticalLinesDistance( int distance );
int verticalLinesDistance() const;
@@ -77,8 +77,8 @@ class FancyPlotterSettings : public KDialogBase
void setShowHorizontalLines( bool value );
bool showHorizontalLines() const;
- void setHorizontalLinesColor( const QColor &color );
- QColor horizontalLinesColor() const;
+ void setHorizontalLinesColor( const TQColor &color );
+ TQColor horizontalLinesColor() const;
void setHorizontalLinesCount( int count );
int horizontalLinesCount() const;
@@ -92,13 +92,13 @@ class FancyPlotterSettings : public KDialogBase
void setFontSize( int size );
int fontSize() const;
- void setBackgroundColor( const QColor &color );
- QColor backgroundColor() const;
+ void setBackgroundColor( const TQColor &color );
+ TQColor backgroundColor() const;
- void setSensors( const QValueList< QStringList > &list );
- QValueList< QStringList > sensors() const;
- QValueList<int> order() const;
- QValueList<int> deleted() const;
+ void setSensors( const TQValueList< TQStringList > &list );
+ TQValueList< TQStringList > sensors() const;
+ TQValueList<int> order() const;
+ TQValueList<int> deleted() const;
void clearDeleted();
void resetOrder();
@@ -107,7 +107,7 @@ class FancyPlotterSettings : public KDialogBase
void removeSensor();
void moveUpSensor();
void moveDownSensor();
- void selectionChanged( QListViewItem* );
+ void selectionChanged( TQListViewItem* );
private:
@@ -123,21 +123,21 @@ class FancyPlotterSettings : public KDialogBase
KIntNumInput *mFontSize;
KListView *mSensorView;
- QCheckBox *mShowVerticalLines;
- QCheckBox *mShowHorizontalLines;
- QCheckBox *mVerticalLinesScroll;
- QCheckBox *mUseAutoRange;
- QCheckBox *mShowLabels;
- QCheckBox *mShowTopBar;
- QPushButton *mEditButton;
- QPushButton *mRemoveButton;
- QPushButton *mMoveUpButton;
- QPushButton *mMoveDownButton;
- QRadioButton *mUsePolygonStyle;
- QRadioButton *mUseOriginalStyle;
+ TQCheckBox *mShowVerticalLines;
+ TQCheckBox *mShowHorizontalLines;
+ TQCheckBox *mVerticalLinesScroll;
+ TQCheckBox *mUseAutoRange;
+ TQCheckBox *mShowLabels;
+ TQCheckBox *mShowTopBar;
+ TQPushButton *mEditButton;
+ TQPushButton *mRemoveButton;
+ TQPushButton *mMoveUpButton;
+ TQPushButton *mMoveDownButton;
+ TQRadioButton *mUsePolygonStyle;
+ TQRadioButton *mUseOriginalStyle;
/** The numbers of the sensors to be delete.*/
- QValueList<int> mDeleted;
+ TQValueList<int> mDeleted;
};
#endif
diff --git a/ksysguard/gui/SensorDisplayLib/ListView.cc b/ksysguard/gui/SensorDisplayLib/ListView.cc
index 885daded6..c980196e6 100644
--- a/ksysguard/gui/SensorDisplayLib/ListView.cc
+++ b/ksysguard/gui/SensorDisplayLib/ListView.cc
@@ -26,7 +26,7 @@
#include <stdlib.h>
#include <config.h>
-#include <qdom.h>
+#include <tqdom.h>
#include <kcolorbutton.h>
#include <kdebug.h>
@@ -41,12 +41,12 @@
#include "ListViewSettings.h"
PrivateListViewItem::PrivateListViewItem(PrivateListView *parent)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_parent = parent;
}
-int PrivateListViewItem::compare( QListViewItem *item, int col, bool ascending ) const
+int PrivateListViewItem::compare( TQListViewItem *item, int col, bool ascending ) const
{
int type = ((PrivateListView*)listView())->columnType( col );
@@ -79,9 +79,9 @@ int PrivateListViewItem::compare( QListViewItem *item, int col, bool ascending )
else
return 1;
} else if ( type == PrivateListView::DiskStat ) {
- QString prev = key( col, ascending );
- QString next = item->key( col, ascending );
- QString prevKey, nextKey;
+ TQString prev = key( col, ascending );
+ TQString next = item->key( col, ascending );
+ TQString prevKey, nextKey;
uint counter = prev.length();
for ( uint i = 0; i < counter; ++i )
@@ -102,19 +102,19 @@ int PrivateListViewItem::compare( QListViewItem *item, int col, bool ascending )
return key( col, ascending ).localeAwareCompare( item->key( col, ascending ) );
}
-PrivateListView::PrivateListView(QWidget *parent, const char *name)
- : QListView(parent, name)
+PrivateListView::PrivateListView(TQWidget *parent, const char *name)
+ : TQListView(parent, name)
{
- QColorGroup cg = colorGroup();
+ TQColorGroup cg = colorGroup();
- cg.setColor(QColorGroup::Link, KSGRD::Style->firstForegroundColor());
- cg.setColor(QColorGroup::Text, KSGRD::Style->secondForegroundColor());
- cg.setColor(QColorGroup::Base, KSGRD::Style->backgroundColor());
+ cg.setColor(TQColorGroup::Link, KSGRD::Style->firstForegroundColor());
+ cg.setColor(TQColorGroup::Text, KSGRD::Style->secondForegroundColor());
+ cg.setColor(TQColorGroup::Base, KSGRD::Style->backgroundColor());
- setPalette(QPalette(cg, cg, cg));
+ setPalette(TQPalette(cg, cg, cg));
}
-void PrivateListView::update(const QString& answer)
+void PrivateListView::update(const TQString& answer)
{
setUpdatesEnabled(false);
viewport()->setUpdatesEnabled(false);
@@ -172,9 +172,9 @@ void PrivateListView::removeColumns(void)
removeColumn(i);
}
-void PrivateListView::addColumn(const QString& label, const QString& type)
+void PrivateListView::addColumn(const TQString& label, const TQString& type)
{
- QListView::addColumn( label );
+ TQListView::addColumn( label );
int col = columns() - 1;
if (type == "s" || type == "S")
@@ -197,18 +197,18 @@ void PrivateListView::addColumn(const QString& label, const QString& type)
mColumnTypes.append( type );
/* Just use some sensible default values as initial setting. */
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
setColumnWidth(col, fm.width(label) + 10);
}
-ListView::ListView(QWidget* parent, const char* name, const QString& title, int, int)
+ListView::ListView(TQWidget* parent, const char* name, const TQString& title, int, int)
: KSGRD::SensorDisplay(parent, name, title)
{
setBackgroundColor(KSGRD::Style->backgroundColor());
monitor = new PrivateListView( frame() );
Q_CHECK_PTR(monitor);
- monitor->setSelectionMode(QListView::NoSelection);
+ monitor->setSelectionMode(TQListView::NoSelection);
monitor->setItemMargin(2);
setMinimumSize(50, 25);
@@ -219,7 +219,7 @@ ListView::ListView(QWidget* parent, const char* name, const QString& title, int,
}
bool
-ListView::addSensor(const QString& hostName, const QString& sensorName, const QString& sensorType, const QString& title)
+ListView::addSensor(const TQString& hostName, const TQString& sensorName, const TQString& sensorType, const TQString& title)
{
if (sensorType != "listview")
return (false);
@@ -243,7 +243,7 @@ ListView::updateList()
}
void
-ListView::answerReceived(int id, const QString& answer)
+ListView::answerReceived(int id, const TQString& answer)
{
/* We received something, so the sensor is probably ok. */
sensorError(id, false);
@@ -279,23 +279,23 @@ ListView::answerReceived(int id, const QString& answer)
}
void
-ListView::resizeEvent(QResizeEvent*)
+ListView::resizeEvent(TQResizeEvent*)
{
frame()->setGeometry(0, 0, width(), height());
monitor->setGeometry(10, 20, width() - 20, height() - 30);
}
bool
-ListView::restoreSettings(QDomElement& element)
+ListView::restoreSettings(TQDomElement& element)
{
addSensor(element.attribute("hostName"), element.attribute("sensorName"), (element.attribute("sensorType").isEmpty() ? "listview" : element.attribute("sensorType")), element.attribute("title"));
- QColorGroup colorGroup = monitor->colorGroup();
- colorGroup.setColor(QColorGroup::Link, restoreColor(element, "gridColor", KSGRD::Style->firstForegroundColor()));
- colorGroup.setColor(QColorGroup::Text, restoreColor(element, "textColor", KSGRD::Style->secondForegroundColor()));
- colorGroup.setColor(QColorGroup::Base, restoreColor(element, "backgroundColor", KSGRD::Style->backgroundColor()));
+ TQColorGroup colorGroup = monitor->colorGroup();
+ colorGroup.setColor(TQColorGroup::Link, restoreColor(element, "gridColor", KSGRD::Style->firstForegroundColor()));
+ colorGroup.setColor(TQColorGroup::Text, restoreColor(element, "textColor", KSGRD::Style->secondForegroundColor()));
+ colorGroup.setColor(TQColorGroup::Base, restoreColor(element, "backgroundColor", KSGRD::Style->backgroundColor()));
- monitor->setPalette(QPalette(colorGroup, colorGroup, colorGroup));
+ monitor->setPalette(TQPalette(colorGroup, colorGroup, colorGroup));
SensorDisplay::restoreSettings(element);
@@ -305,16 +305,16 @@ ListView::restoreSettings(QDomElement& element)
}
bool
-ListView::saveSettings(QDomDocument& doc, QDomElement& element, bool save)
+ListView::saveSettings(TQDomDocument& doc, TQDomElement& element, bool save)
{
element.setAttribute("hostName", sensors().at(0)->hostName());
element.setAttribute("sensorName", sensors().at(0)->name());
element.setAttribute("sensorType", sensors().at(0)->type());
- QColorGroup colorGroup = monitor->colorGroup();
- saveColor(element, "gridColor", colorGroup.color(QColorGroup::Link));
- saveColor(element, "textColor", colorGroup.color(QColorGroup::Text));
- saveColor(element, "backgroundColor", colorGroup.color(QColorGroup::Base));
+ TQColorGroup colorGroup = monitor->colorGroup();
+ saveColor(element, "gridColor", colorGroup.color(TQColorGroup::Link));
+ saveColor(element, "textColor", colorGroup.color(TQColorGroup::Text));
+ saveColor(element, "backgroundColor", colorGroup.color(TQColorGroup::Base));
SensorDisplay::saveSettings(doc, element);
@@ -329,12 +329,12 @@ ListView::configureSettings()
{
lvs = new ListViewSettings(this, "ListViewSettings");
Q_CHECK_PTR(lvs);
- connect(lvs, SIGNAL(applyClicked()), SLOT(applySettings()));
+ connect(lvs, TQT_SIGNAL(applyClicked()), TQT_SLOT(applySettings()));
- QColorGroup colorGroup = monitor->colorGroup();
- lvs->setGridColor(colorGroup.color(QColorGroup::Link));
- lvs->setTextColor(colorGroup.color(QColorGroup::Text));
- lvs->setBackgroundColor(colorGroup.color(QColorGroup::Base));
+ TQColorGroup colorGroup = monitor->colorGroup();
+ lvs->setGridColor(colorGroup.color(TQColorGroup::Link));
+ lvs->setTextColor(colorGroup.color(TQColorGroup::Text));
+ lvs->setBackgroundColor(colorGroup.color(TQColorGroup::Base));
lvs->setTitle(title());
if (lvs->exec())
@@ -347,11 +347,11 @@ ListView::configureSettings()
void
ListView::applySettings()
{
- QColorGroup colorGroup = monitor->colorGroup();
- colorGroup.setColor(QColorGroup::Link, lvs->gridColor());
- colorGroup.setColor(QColorGroup::Text, lvs->textColor());
- colorGroup.setColor(QColorGroup::Base, lvs->backgroundColor());
- monitor->setPalette(QPalette(colorGroup, colorGroup, colorGroup));
+ TQColorGroup colorGroup = monitor->colorGroup();
+ colorGroup.setColor(TQColorGroup::Link, lvs->gridColor());
+ colorGroup.setColor(TQColorGroup::Text, lvs->textColor());
+ colorGroup.setColor(TQColorGroup::Base, lvs->backgroundColor());
+ monitor->setPalette(TQPalette(colorGroup, colorGroup, colorGroup));
setTitle(lvs->title());
@@ -361,11 +361,11 @@ ListView::applySettings()
void
ListView::applyStyle()
{
- QColorGroup colorGroup = monitor->colorGroup();
- colorGroup.setColor(QColorGroup::Link, KSGRD::Style->firstForegroundColor());
- colorGroup.setColor(QColorGroup::Text, KSGRD::Style->secondForegroundColor());
- colorGroup.setColor(QColorGroup::Base, KSGRD::Style->backgroundColor());
- monitor->setPalette(QPalette(colorGroup, colorGroup, colorGroup));
+ TQColorGroup colorGroup = monitor->colorGroup();
+ colorGroup.setColor(TQColorGroup::Link, KSGRD::Style->firstForegroundColor());
+ colorGroup.setColor(TQColorGroup::Text, KSGRD::Style->secondForegroundColor());
+ colorGroup.setColor(TQColorGroup::Base, KSGRD::Style->backgroundColor());
+ monitor->setPalette(TQPalette(colorGroup, colorGroup, colorGroup));
setModified(true);
}
diff --git a/ksysguard/gui/SensorDisplayLib/ListView.h b/ksysguard/gui/SensorDisplayLib/ListView.h
index 4b96329c0..c5e0a550c 100644
--- a/ksysguard/gui/SensorDisplayLib/ListView.h
+++ b/ksysguard/gui/SensorDisplayLib/ListView.h
@@ -24,8 +24,8 @@
#ifndef _ListView_h_
#define _ListView_h_
-#include <qlistview.h>
-#include <qpainter.h>
+#include <tqlistview.h>
+#include <tqpainter.h>
#include <SensorDisplay.h>
@@ -41,15 +41,15 @@ class PrivateListView : public QListView
public:
enum ColumnType { Text, Int, Float, Time, DiskStat };
- PrivateListView(QWidget *parent = 0, const char *name = 0);
+ PrivateListView(TQWidget *parent = 0, const char *name = 0);
- void addColumn(const QString& label, const QString& type);
+ void addColumn(const TQString& label, const TQString& type);
void removeColumns(void);
- void update(const QString& answer);
+ void update(const TQString& answer);
int columnType( uint pos ) const;
private:
- QStringList mColumnTypes;
+ TQStringList mColumnTypes;
};
class PrivateListViewItem : public QListViewItem
@@ -57,43 +57,43 @@ class PrivateListViewItem : public QListViewItem
public:
PrivateListViewItem(PrivateListView *parent = 0);
- void paintCell(QPainter *p, const QColorGroup &, int column, int width, int alignment) {
- QColorGroup cgroup = _parent->colorGroup();
- QListViewItem::paintCell(p, cgroup, column, width, alignment);
- p->setPen(cgroup.color(QColorGroup::Link));
+ void paintCell(TQPainter *p, const TQColorGroup &, int column, int width, int alignment) {
+ TQColorGroup cgroup = _parent->colorGroup();
+ TQListViewItem::paintCell(p, cgroup, column, width, alignment);
+ p->setPen(cgroup.color(TQColorGroup::Link));
p->drawLine(0, height() - 1, width - 1, height() - 1);
}
- void paintFocus(QPainter *, const QColorGroup, const QRect) {}
+ void paintFocus(TQPainter *, const TQColorGroup, const TQRect) {}
- virtual int compare( QListViewItem*, int column, bool ascending ) const;
+ virtual int compare( TQListViewItem*, int column, bool ascending ) const;
private:
- QWidget *_parent;
+ TQWidget *_parent;
};
class ListView : public KSGRD::SensorDisplay
{
Q_OBJECT
public:
- ListView(QWidget* parent = 0, const char* name = 0,
- const QString& = QString::null, int min = 0, int max = 0);
+ ListView(TQWidget* parent = 0, const char* name = 0,
+ const TQString& = TQString::null, int min = 0, int max = 0);
~ListView() {}
- bool addSensor(const QString& hostName, const QString& sensorName, const QString& sensorType, const QString& sensorDescr);
- void answerReceived(int id, const QString& answer);
- void resizeEvent(QResizeEvent*);
+ bool addSensor(const TQString& hostName, const TQString& sensorName, const TQString& sensorType, const TQString& sensorDescr);
+ void answerReceived(int id, const TQString& answer);
+ void resizeEvent(TQResizeEvent*);
void updateList();
- bool restoreSettings(QDomElement& element);
- bool saveSettings(QDomDocument& doc, QDomElement& element, bool save = true);
+ bool restoreSettings(TQDomElement& element);
+ bool saveSettings(TQDomDocument& doc, TQDomElement& element, bool save = true);
virtual bool hasSettingsDialog() const
{
return (true);
}
- virtual void timerEvent(QTimerEvent*)
+ virtual void timerEvent(TQTimerEvent*)
{
updateList();
}
diff --git a/ksysguard/gui/SensorDisplayLib/ListViewSettings.cc b/ksysguard/gui/SensorDisplayLib/ListViewSettings.cc
index 15822206e..81a9b2d41 100644
--- a/ksysguard/gui/SensorDisplayLib/ListViewSettings.cc
+++ b/ksysguard/gui/SensorDisplayLib/ListViewSettings.cc
@@ -22,7 +22,7 @@
#include <klocale.h>
-ListViewSettings::ListViewSettings( QWidget *parent, const char *name )
+ListViewSettings::ListViewSettings( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "List View Settings" ),
Ok|Apply|Cancel, Ok, true )
{
@@ -30,42 +30,42 @@ ListViewSettings::ListViewSettings( QWidget *parent, const char *name )
setMainWidget( m_settingsWidget );
}
-QString ListViewSettings::title() const
+TQString ListViewSettings::title() const
{
return m_settingsWidget->title();
}
-QColor ListViewSettings::textColor() const
+TQColor ListViewSettings::textColor() const
{
return m_settingsWidget->textColor();
}
-QColor ListViewSettings::backgroundColor() const
+TQColor ListViewSettings::backgroundColor() const
{
return m_settingsWidget->backgroundColor();
}
-QColor ListViewSettings::gridColor() const
+TQColor ListViewSettings::gridColor() const
{
return m_settingsWidget->gridColor();
}
-void ListViewSettings::setTitle( const QString &title )
+void ListViewSettings::setTitle( const TQString &title )
{
m_settingsWidget->setTitle( title );
}
-void ListViewSettings::setBackgroundColor( const QColor &c )
+void ListViewSettings::setBackgroundColor( const TQColor &c )
{
m_settingsWidget->setBackgroundColor( c );
}
-void ListViewSettings::setTextColor( const QColor &c )
+void ListViewSettings::setTextColor( const TQColor &c )
{
m_settingsWidget->setTextColor( c );
}
-void ListViewSettings::setGridColor( const QColor &c )
+void ListViewSettings::setGridColor( const TQColor &c )
{
m_settingsWidget->setGridColor( c );
}
diff --git a/ksysguard/gui/SensorDisplayLib/ListViewSettings.h b/ksysguard/gui/SensorDisplayLib/ListViewSettings.h
index 9a9790791..06a0b4002 100644
--- a/ksysguard/gui/SensorDisplayLib/ListViewSettings.h
+++ b/ksysguard/gui/SensorDisplayLib/ListViewSettings.h
@@ -23,8 +23,8 @@
#include <kdialogbase.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
class ListViewSettingsWidget;
@@ -34,17 +34,17 @@ class ListViewSettings : public KDialogBase
public:
- ListViewSettings( QWidget *parent=0, const char *name=0 );
+ ListViewSettings( TQWidget *parent=0, const char *name=0 );
- QString title() const;
- QColor textColor() const;
- QColor backgroundColor() const;
- QColor gridColor() const;
+ TQString title() const;
+ TQColor textColor() const;
+ TQColor backgroundColor() const;
+ TQColor gridColor() const;
- void setTitle( const QString & );
- void setTextColor( const QColor & );
- void setBackgroundColor( const QColor & );
- void setGridColor( const QColor & );
+ void setTitle( const TQString & );
+ void setTextColor( const TQColor & );
+ void setBackgroundColor( const TQColor & );
+ void setGridColor( const TQColor & );
private:
diff --git a/ksysguard/gui/SensorDisplayLib/ListViewSettingsWidget.ui.h b/ksysguard/gui/SensorDisplayLib/ListViewSettingsWidget.ui.h
index 14ff5990d..e12bf2132 100644
--- a/ksysguard/gui/SensorDisplayLib/ListViewSettingsWidget.ui.h
+++ b/ksysguard/gui/SensorDisplayLib/ListViewSettingsWidget.ui.h
@@ -8,49 +8,49 @@
*****************************************************************************/
-QString ListViewSettingsWidget::title()
+TQString ListViewSettingsWidget::title()
{
return m_title->text();
}
-QColor ListViewSettingsWidget::gridColor()
+TQColor ListViewSettingsWidget::gridColor()
{
return m_gridColor->color();
}
-QColor ListViewSettingsWidget::backgroundColor()
+TQColor ListViewSettingsWidget::backgroundColor()
{
return m_backgroundColor->color();
}
-QColor ListViewSettingsWidget::textColor()
+TQColor ListViewSettingsWidget::textColor()
{
return m_textColor->color();
}
-void ListViewSettingsWidget::setTitle( const QString &t )
+void ListViewSettingsWidget::setTitle( const TQString &t )
{
m_title->setText(t);
}
-void ListViewSettingsWidget::setBackgroundColor( const QColor &c )
+void ListViewSettingsWidget::setBackgroundColor( const TQColor &c )
{
m_backgroundColor->setColor(c);
}
-void ListViewSettingsWidget::setTextColor( const QColor &c )
+void ListViewSettingsWidget::setTextColor( const TQColor &c )
{
m_textColor->setColor(c);
}
-void ListViewSettingsWidget::setGridColor( const QColor &c )
+void ListViewSettingsWidget::setGridColor( const TQColor &c )
{
m_gridColor->setColor(c);
}
diff --git a/ksysguard/gui/SensorDisplayLib/LogFile.cc b/ksysguard/gui/SensorDisplayLib/LogFile.cc
index 9db4c7116..7de7899ab 100644
--- a/ksysguard/gui/SensorDisplayLib/LogFile.cc
+++ b/ksysguard/gui/SensorDisplayLib/LogFile.cc
@@ -21,11 +21,11 @@
#include <stdio.h>
#include <sys/types.h>
-#include <qpushbutton.h>
-#include <qregexp.h>
+#include <tqpushbutton.h>
+#include <tqregexp.h>
-#include <qfile.h>
-#include <qlistbox.h>
+#include <tqfile.h>
+#include <tqlistbox.h>
#include <kfontdialog.h>
#include <kdebug.h>
@@ -36,10 +36,10 @@
#include "LogFile.moc"
-LogFile::LogFile(QWidget *parent, const char *name, const QString& title)
+LogFile::LogFile(TQWidget *parent, const char *name, const TQString& title)
: KSGRD::SensorDisplay(parent, name, title)
{
- monitor = new QListBox(this);
+ monitor = new TQListBox(this);
Q_CHECK_PTR(monitor);
setMinimumSize(50, 25);
@@ -51,20 +51,20 @@ LogFile::LogFile(QWidget *parent, const char *name, const QString& title)
LogFile::~LogFile(void)
{
- sendRequest(sensors().at(0)->hostName(), QString("logfile_unregister %1" ).arg(logFileID), 43);
+ sendRequest(sensors().at(0)->hostName(), TQString("logfile_unregister %1" ).arg(logFileID), 43);
}
bool
-LogFile::addSensor(const QString& hostName, const QString& sensorName, const QString& sensorType, const QString& title)
+LogFile::addSensor(const TQString& hostName, const TQString& sensorName, const TQString& sensorType, const TQString& title)
{
if (sensorType != "logfile")
return (false);
registerSensor(new KSGRD::SensorProperties(hostName, sensorName, sensorType, title));
- QString sensorID = sensorName.right(sensorName.length() - (sensorName.findRev("/") + 1));
+ TQString sensorID = sensorName.right(sensorName.length() - (sensorName.findRev("/") + 1));
- sendRequest(sensors().at(0)->hostName(), QString("logfile_register %1" ).arg(sensorID), 42);
+ sendRequest(sensors().at(0)->hostName(), TQString("logfile_register %1" ).arg(sensorID), 42);
if (title.isEmpty())
setTitle(sensors().at(0)->hostName() + ":" + sensorID);
@@ -79,7 +79,7 @@ LogFile::addSensor(const QString& hostName, const QString& sensorName, const QSt
void LogFile::configureSettings(void)
{
- QColorGroup cgroup = monitor->colorGroup();
+ TQColorGroup cgroup = monitor->colorGroup();
lfs = new LogFileSettings(this);
Q_CHECK_PTR(lfs);
@@ -92,16 +92,16 @@ void LogFile::configureSettings(void)
lfs->ruleList->insertStringList(filterRules);
lfs->title->setText(title());
- connect(lfs->okButton, SIGNAL(clicked()), lfs, SLOT(accept()));
- connect(lfs->applyButton, SIGNAL(clicked()), this, SLOT(applySettings()));
- connect(lfs->cancelButton, SIGNAL(clicked()), lfs, SLOT(reject()));
+ connect(lfs->okButton, TQT_SIGNAL(clicked()), lfs, TQT_SLOT(accept()));
+ connect(lfs->applyButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(applySettings()));
+ connect(lfs->cancelButton, TQT_SIGNAL(clicked()), lfs, TQT_SLOT(reject()));
- connect(lfs->fontButton, SIGNAL(clicked()), this, SLOT(settingsFontSelection()));
- connect(lfs->addButton, SIGNAL(clicked()), this, SLOT(settingsAddRule()));
- connect(lfs->deleteButton, SIGNAL(clicked()), this, SLOT(settingsDeleteRule()));
- connect(lfs->changeButton, SIGNAL(clicked()), this, SLOT(settingsChangeRule()));
- connect(lfs->ruleList, SIGNAL(selected(int)), this, SLOT(settingsRuleListSelected(int)));
- connect(lfs->ruleText, SIGNAL(returnPressed()), this, SLOT(settingsAddRule()));
+ connect(lfs->fontButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(settingsFontSelection()));
+ connect(lfs->addButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(settingsAddRule()));
+ connect(lfs->deleteButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(settingsDeleteRule()));
+ connect(lfs->changeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(settingsChangeRule()));
+ connect(lfs->ruleList, TQT_SIGNAL(selected(int)), this, TQT_SLOT(settingsRuleListSelected(int)));
+ connect(lfs->ruleText, TQT_SIGNAL(returnPressed()), this, TQT_SLOT(settingsAddRule()));
if (lfs->exec()) {
applySettings();
@@ -113,7 +113,7 @@ void LogFile::configureSettings(void)
void LogFile::settingsFontSelection()
{
- QFont tmpFont = lfs->fontButton->font();
+ TQFont tmpFont = lfs->fontButton->font();
if (KFontDialog::getFont(tmpFont) == KFontDialog::Accepted) {
lfs->fontButton->setFont(tmpFont);
@@ -147,11 +147,11 @@ void LogFile::settingsRuleListSelected(int index)
void LogFile::applySettings(void)
{
- QColorGroup cgroup = monitor->colorGroup();
+ TQColorGroup cgroup = monitor->colorGroup();
- cgroup.setColor(QColorGroup::Text, lfs->fgColor->color());
- cgroup.setColor(QColorGroup::Base, lfs->bgColor->color());
- monitor->setPalette(QPalette(cgroup, cgroup, cgroup));
+ cgroup.setColor(TQColorGroup::Text, lfs->fgColor->color());
+ cgroup.setColor(TQColorGroup::Base, lfs->bgColor->color());
+ monitor->setPalette(TQPalette(cgroup, cgroup, cgroup));
monitor->setFont(lfs->fontButton->font());
filterRules.clear();
@@ -166,33 +166,33 @@ void LogFile::applySettings(void)
void
LogFile::applyStyle()
{
- QColorGroup cgroup = monitor->colorGroup();
+ TQColorGroup cgroup = monitor->colorGroup();
- cgroup.setColor(QColorGroup::Text, KSGRD::Style->firstForegroundColor());
- cgroup.setColor(QColorGroup::Base, KSGRD::Style->backgroundColor());
- monitor->setPalette(QPalette(cgroup, cgroup, cgroup));
+ cgroup.setColor(TQColorGroup::Text, KSGRD::Style->firstForegroundColor());
+ cgroup.setColor(TQColorGroup::Base, KSGRD::Style->backgroundColor());
+ monitor->setPalette(TQPalette(cgroup, cgroup, cgroup));
setModified(true);
}
bool
-LogFile::restoreSettings(QDomElement& element)
+LogFile::restoreSettings(TQDomElement& element)
{
- QFont font;
- QColorGroup cgroup = monitor->colorGroup();
+ TQFont font;
+ TQColorGroup cgroup = monitor->colorGroup();
- cgroup.setColor(QColorGroup::Text, restoreColor(element, "textColor", Qt::green));
- cgroup.setColor(QColorGroup::Base, restoreColor(element, "backgroundColor", Qt::black));
- monitor->setPalette(QPalette(cgroup, cgroup, cgroup));
+ cgroup.setColor(TQColorGroup::Text, restoreColor(element, "textColor", Qt::green));
+ cgroup.setColor(TQColorGroup::Base, restoreColor(element, "backgroundColor", Qt::black));
+ monitor->setPalette(TQPalette(cgroup, cgroup, cgroup));
addSensor(element.attribute("hostName"), element.attribute("sensorName"), (element.attribute("sensorType").isEmpty() ? "logfile" : element.attribute("sensorType")), element.attribute("title"));
font.fromString( element.attribute( "font" ) );
monitor->setFont(font);
- QDomNodeList dnList = element.elementsByTagName("filter");
+ TQDomNodeList dnList = element.elementsByTagName("filter");
for (uint i = 0; i < dnList.count(); i++) {
- QDomElement element = dnList.item(i).toElement();
+ TQDomElement element = dnList.item(i).toElement();
filterRules.append(element.attribute("rule"));
}
@@ -204,7 +204,7 @@ LogFile::restoreSettings(QDomElement& element)
}
bool
-LogFile::saveSettings(QDomDocument& doc, QDomElement& element, bool save)
+LogFile::saveSettings(TQDomDocument& doc, TQDomElement& element, bool save)
{
element.setAttribute("hostName", sensors().at(0)->hostName());
element.setAttribute("sensorName", sensors().at(0)->name());
@@ -215,10 +215,10 @@ LogFile::saveSettings(QDomDocument& doc, QDomElement& element, bool save)
saveColor(element, "textColor", monitor->colorGroup().text());
saveColor(element, "backgroundColor", monitor->colorGroup().base());
- for (QStringList::Iterator it = filterRules.begin();
+ for (TQStringList::Iterator it = filterRules.begin();
it != filterRules.end(); it++)
{
- QDomElement filter = doc.createElement("filter");
+ TQDomElement filter = doc.createElement("filter");
filter.setAttribute("rule", (*it));
element.appendChild(filter);
}
@@ -235,11 +235,11 @@ void
LogFile::updateMonitor()
{
sendRequest(sensors().at(0)->hostName(),
- QString("%1 %2" ).arg(sensors().at(0)->name()).arg(logFileID), 19);
+ TQString("%1 %2" ).arg(sensors().at(0)->name()).arg(logFileID), 19);
}
void
-LogFile::answerReceived(int id, const QString& answer)
+LogFile::answerReceived(int id, const TQString& answer)
{
/* We received something, so the sensor is probably ok. */
sensorError(id, false);
@@ -255,10 +255,10 @@ LogFile::answerReceived(int id, const QString& answer)
monitor->insertItem(lines[i], -1);
- for (QStringList::Iterator it = filterRules.begin(); it != filterRules.end(); it++) {
- QRegExp *expr = new QRegExp((*it).latin1());
+ for (TQStringList::Iterator it = filterRules.begin(); it != filterRules.end(); it++) {
+ TQRegExp *expr = new TQRegExp((*it).latin1());
if (expr->search(lines[i].latin1()) != -1) {
- KNotifyClient::event(winId(), "pattern_match", QString("rule '%1' matched").arg((*it).latin1()));
+ KNotifyClient::event(winId(), "pattern_match", TQString("rule '%1' matched").arg((*it).latin1()));
}
delete expr;
}
@@ -278,7 +278,7 @@ LogFile::answerReceived(int id, const QString& answer)
}
void
-LogFile::resizeEvent(QResizeEvent*)
+LogFile::resizeEvent(TQResizeEvent*)
{
frame()->setGeometry(0, 0, this->width(), this->height());
monitor->setGeometry(10, 20, this->width() - 20, this->height() - 30);
diff --git a/ksysguard/gui/SensorDisplayLib/LogFile.h b/ksysguard/gui/SensorDisplayLib/LogFile.h
index 9428f934d..c17cc91eb 100644
--- a/ksysguard/gui/SensorDisplayLib/LogFile.h
+++ b/ksysguard/gui/SensorDisplayLib/LogFile.h
@@ -26,10 +26,10 @@
class QFile;
class QListBox;
-#include <qdom.h>
-#include <qpopupmenu.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqdom.h>
+#include <tqpopupmenu.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include <SensorDisplay.h>
@@ -39,22 +39,22 @@ class LogFile : public KSGRD::SensorDisplay
{
Q_OBJECT
public:
- LogFile(QWidget *parent = 0, const char *name = 0, const QString& title = 0);
+ LogFile(TQWidget *parent = 0, const char *name = 0, const TQString& title = 0);
~LogFile(void);
- bool addSensor(const QString& hostName, const QString& sensorName,
- const QString& sensorType, const QString& sensorDescr);
- void answerReceived(int id, const QString& answer);
- void resizeEvent(QResizeEvent*);
+ bool addSensor(const TQString& hostName, const TQString& sensorName,
+ const TQString& sensorType, const TQString& sensorDescr);
+ void answerReceived(int id, const TQString& answer);
+ void resizeEvent(TQResizeEvent*);
- bool restoreSettings(QDomElement& element);
- bool saveSettings(QDomDocument& doc, QDomElement& element, bool save = true);
+ bool restoreSettings(TQDomElement& element);
+ bool saveSettings(TQDomDocument& doc, TQDomElement& element, bool save = true);
void updateMonitor(void);
void configureSettings(void);
- virtual void timerEvent(QTimerEvent*)
+ virtual void timerEvent(TQTimerEvent*)
{
updateMonitor();
}
@@ -76,8 +76,8 @@ public slots:
private:
LogFileSettings* lfs;
- QListBox* monitor;
- QStringList filterRules;
+ TQListBox* monitor;
+ TQStringList filterRules;
unsigned long logFileID;
};
diff --git a/ksysguard/gui/SensorDisplayLib/MultiMeter.cc b/ksysguard/gui/SensorDisplayLib/MultiMeter.cc
index 14e805b9d..8a9cc9b60 100644
--- a/ksysguard/gui/SensorDisplayLib/MultiMeter.cc
+++ b/ksysguard/gui/SensorDisplayLib/MultiMeter.cc
@@ -24,9 +24,9 @@
#include <math.h>
#include <stdlib.h>
-#include <qdom.h>
-#include <qlcdnumber.h>
-#include <qtooltip.h>
+#include <tqdom.h>
+#include <tqlcdnumber.h>
+#include <tqtooltip.h>
#include <kdebug.h>
@@ -36,8 +36,8 @@
#include "MultiMeter.moc"
#include "MultiMeterSettings.h"
-MultiMeter::MultiMeter(QWidget* parent, const char* name,
- const QString& title, double, double, bool nf, bool isApplet)
+MultiMeter::MultiMeter(TQWidget* parent, const char* name,
+ const TQString& title, double, double, bool nf, bool isApplet)
: KSGRD::SensorDisplay(parent, name, title, nf, isApplet)
{
setShowUnit( true );
@@ -47,14 +47,14 @@ MultiMeter::MultiMeter(QWidget* parent, const char* name,
normalDigitColor = KSGRD::Style->firstForegroundColor();
alarmDigitColor = KSGRD::Style->alarmColor();
if (noFrame())
- lcd = new QLCDNumber(this, "meterLCD");
+ lcd = new TQLCDNumber(this, "meterLCD");
else
- lcd = new QLCDNumber(frame(), "meterLCD");
+ lcd = new TQLCDNumber(frame(), "meterLCD");
Q_CHECK_PTR(lcd);
- lcd->setSegmentStyle(QLCDNumber::Filled);
+ lcd->setSegmentStyle(TQLCDNumber::Filled);
setDigitColor(KSGRD::Style->backgroundColor());
- lcd->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,
- QSizePolicy::Expanding, false));
+ lcd->setSizePolicy(TQSizePolicy(TQSizePolicy::Expanding,
+ TQSizePolicy::Expanding, false));
setBackgroundColor(KSGRD::Style->backgroundColor());
/* All RMB clicks to the lcd widget will be handled by
@@ -68,8 +68,8 @@ MultiMeter::MultiMeter(QWidget* parent, const char* name,
}
bool
-MultiMeter::addSensor(const QString& hostName, const QString& sensorName,
- const QString& sensorType, const QString& title)
+MultiMeter::addSensor(const TQString& hostName, const TQString& sensorName,
+ const TQString& sensorType, const TQString& title)
{
if (sensorType != "integer" && sensorType != "float")
return (false);
@@ -80,15 +80,15 @@ MultiMeter::addSensor(const QString& hostName, const QString& sensorName,
* requests we use 100 for info requests. */
sendRequest(hostName, sensorName + "?", 100);
- QToolTip::remove(lcd);
- QToolTip::add(lcd, QString("%1:%2").arg(hostName).arg(sensorName));
+ TQToolTip::remove(lcd);
+ TQToolTip::add(lcd, TQString("%1:%2").arg(hostName).arg(sensorName));
setModified(true);
return (true);
}
void
-MultiMeter::answerReceived(int id, const QString& answer)
+MultiMeter::answerReceived(int id, const TQString& answer)
{
/* We received something, so the sensor is probably ok. */
sensorError(id, false);
@@ -131,7 +131,7 @@ MultiMeter::answerReceived(int id, const QString& answer)
}
void
-MultiMeter::resizeEvent(QResizeEvent*)
+MultiMeter::resizeEvent(TQResizeEvent*)
{
if (noFrame())
lcd->setGeometry(0, 0, width(), height());
@@ -140,7 +140,7 @@ MultiMeter::resizeEvent(QResizeEvent*)
}
bool
-MultiMeter::restoreSettings(QDomElement& element)
+MultiMeter::restoreSettings(TQDomElement& element)
{
lowerLimitActive = element.attribute("lowerLimitActive").toInt();
lowerLimit = element.attribute("lowerLimit").toLong();
@@ -164,7 +164,7 @@ MultiMeter::restoreSettings(QDomElement& element)
}
bool
-MultiMeter::saveSettings(QDomDocument& doc, QDomElement& element, bool save)
+MultiMeter::saveSettings(TQDomDocument& doc, TQDomElement& element, bool save)
{
element.setAttribute("hostName", sensors().at(0)->hostName());
element.setAttribute("sensorName", sensors().at(0)->name());
@@ -202,7 +202,7 @@ MultiMeter::configureSettings()
mms->setAlarmDigitColor(alarmDigitColor);
mms->setMeterBackgroundColor(lcd->backgroundColor());
- connect(mms, SIGNAL(applyClicked()), SLOT(applySettings()));
+ connect(mms, TQT_SIGNAL(applyClicked()), TQT_SLOT(applySettings()));
if (mms->exec())
applySettings();
@@ -239,20 +239,20 @@ MultiMeter::applyStyle()
}
void
-MultiMeter::setDigitColor(const QColor& col)
+MultiMeter::setDigitColor(const TQColor& col)
{
- QPalette p = lcd->palette();
- p.setColor(QColorGroup::Foreground, col);
+ TQPalette p = lcd->palette();
+ p.setColor(TQColorGroup::Foreground, col);
lcd->setPalette(p);
}
void
-MultiMeter::setBackgroundColor(const QColor& col)
+MultiMeter::setBackgroundColor(const TQColor& col)
{
lcd->setBackgroundColor(col);
- QPalette p = lcd->palette();
- p.setColor(QColorGroup::Light, col);
- p.setColor(QColorGroup::Dark, col);
+ TQPalette p = lcd->palette();
+ p.setColor(TQColorGroup::Light, col);
+ p.setColor(TQColorGroup::Dark, col);
lcd->setPalette(p);
}
diff --git a/ksysguard/gui/SensorDisplayLib/MultiMeter.h b/ksysguard/gui/SensorDisplayLib/MultiMeter.h
index 58d2477c1..43c85be24 100644
--- a/ksysguard/gui/SensorDisplayLib/MultiMeter.h
+++ b/ksysguard/gui/SensorDisplayLib/MultiMeter.h
@@ -36,19 +36,19 @@ class MultiMeter : public KSGRD::SensorDisplay
Q_OBJECT
public:
- MultiMeter(QWidget* parent = 0, const char* name = 0,
- const QString& = QString::null, double min = 0, double max = 0, bool nf = false, bool isApplet = false);
+ MultiMeter(TQWidget* parent = 0, const char* name = 0,
+ const TQString& = TQString::null, double min = 0, double max = 0, bool nf = false, bool isApplet = false);
virtual ~MultiMeter()
{
}
- bool addSensor(const QString& hostName, const QString& sensorName,
- const QString& sensorType, const QString& sensorDescr);
- void answerReceived(int id, const QString& answer);
- void resizeEvent(QResizeEvent*);
+ bool addSensor(const TQString& hostName, const TQString& sensorName,
+ const TQString& sensorType, const TQString& sensorDescr);
+ void answerReceived(int id, const TQString& answer);
+ void resizeEvent(TQResizeEvent*);
- bool restoreSettings(QDomElement& element);
- bool saveSettings(QDomDocument& doc, QDomElement& element, bool save = true);
+ bool restoreSettings(TQDomElement& element);
+ bool saveSettings(TQDomDocument& doc, TQDomElement& element, bool save = true);
virtual bool hasSettingsDialog() const
{
@@ -62,12 +62,12 @@ public slots:
void applyStyle();
private:
- void setDigitColor(const QColor& col);
- void setBackgroundColor(const QColor& col);
+ void setDigitColor(const TQColor& col);
+ void setBackgroundColor(const TQColor& col);
- QLCDNumber* lcd;
- QColor normalDigitColor;
- QColor alarmDigitColor;
+ TQLCDNumber* lcd;
+ TQColor normalDigitColor;
+ TQColor alarmDigitColor;
MultiMeterSettings* mms;
bool lowerLimitActive;
diff --git a/ksysguard/gui/SensorDisplayLib/MultiMeterSettings.cc b/ksysguard/gui/SensorDisplayLib/MultiMeterSettings.cc
index 9114c583b..436c8540f 100644
--- a/ksysguard/gui/SensorDisplayLib/MultiMeterSettings.cc
+++ b/ksysguard/gui/SensorDisplayLib/MultiMeterSettings.cc
@@ -22,7 +22,7 @@
#include <klocale.h>
-MultiMeterSettings::MultiMeterSettings( QWidget *parent, const char *name )
+MultiMeterSettings::MultiMeterSettings( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Multimeter Settings" ),
Ok|Apply|Cancel, Ok, true )
{
@@ -30,7 +30,7 @@ MultiMeterSettings::MultiMeterSettings( QWidget *parent, const char *name )
setMainWidget( m_settingsWidget );
}
-QString MultiMeterSettings::title()
+TQString MultiMeterSettings::title()
{
return m_settingsWidget->title();
}
@@ -60,22 +60,22 @@ double MultiMeterSettings::upperLimit()
return m_settingsWidget->upperLimit();
}
-QColor MultiMeterSettings::normalDigitColor()
+TQColor MultiMeterSettings::normalDigitColor()
{
return m_settingsWidget->normalDigitColor();
}
-QColor MultiMeterSettings::alarmDigitColor()
+TQColor MultiMeterSettings::alarmDigitColor()
{
return m_settingsWidget->alarmDigitColor();
}
-QColor MultiMeterSettings::meterBackgroundColor()
+TQColor MultiMeterSettings::meterBackgroundColor()
{
return m_settingsWidget->meterBackgroundColor();
}
-void MultiMeterSettings::setTitle( const QString &title )
+void MultiMeterSettings::setTitle( const TQString &title )
{
m_settingsWidget->setTitle( title );
}
@@ -105,17 +105,17 @@ void MultiMeterSettings::setUpperLimit( double limit )
m_settingsWidget->setUpperLimit( limit );
}
-void MultiMeterSettings::setNormalDigitColor( const QColor &c )
+void MultiMeterSettings::setNormalDigitColor( const TQColor &c )
{
m_settingsWidget->setNormalDigitColor( c );
}
-void MultiMeterSettings::setAlarmDigitColor( const QColor &c )
+void MultiMeterSettings::setAlarmDigitColor( const TQColor &c )
{
m_settingsWidget->setAlarmDigitColor( c );
}
-void MultiMeterSettings::setMeterBackgroundColor( const QColor &c )
+void MultiMeterSettings::setMeterBackgroundColor( const TQColor &c )
{
m_settingsWidget->setMeterBackgroundColor( c );
}
diff --git a/ksysguard/gui/SensorDisplayLib/MultiMeterSettings.h b/ksysguard/gui/SensorDisplayLib/MultiMeterSettings.h
index 516a02128..e05946a08 100644
--- a/ksysguard/gui/SensorDisplayLib/MultiMeterSettings.h
+++ b/ksysguard/gui/SensorDisplayLib/MultiMeterSettings.h
@@ -23,8 +23,8 @@
#include <kdialogbase.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
class MultiMeterSettingsWidget;
@@ -34,27 +34,27 @@ class MultiMeterSettings : public KDialogBase
public:
- MultiMeterSettings( QWidget *parent=0, const char *name=0 );
+ MultiMeterSettings( TQWidget *parent=0, const char *name=0 );
- QString title();
+ TQString title();
bool showUnit();
bool lowerLimitActive();
bool upperLimitActive();
double lowerLimit();
double upperLimit();
- QColor normalDigitColor();
- QColor alarmDigitColor();
- QColor meterBackgroundColor();
+ TQColor normalDigitColor();
+ TQColor alarmDigitColor();
+ TQColor meterBackgroundColor();
- void setTitle( const QString & );
+ void setTitle( const TQString & );
void setShowUnit( bool );
void setLowerLimitActive( bool );
void setUpperLimitActive( bool );
void setLowerLimit( double );
void setUpperLimit( double );
- void setNormalDigitColor( const QColor & );
- void setAlarmDigitColor( const QColor & );
- void setMeterBackgroundColor( const QColor & );
+ void setNormalDigitColor( const TQColor & );
+ void setAlarmDigitColor( const TQColor & );
+ void setMeterBackgroundColor( const TQColor & );
private:
diff --git a/ksysguard/gui/SensorDisplayLib/MultiMeterSettingsWidget.ui.h b/ksysguard/gui/SensorDisplayLib/MultiMeterSettingsWidget.ui.h
index 81d6e73f6..e97fabffc 100644
--- a/ksysguard/gui/SensorDisplayLib/MultiMeterSettingsWidget.ui.h
+++ b/ksysguard/gui/SensorDisplayLib/MultiMeterSettingsWidget.ui.h
@@ -15,7 +15,7 @@ void MultiMeterSettingsWidget::init()
m_title->setFocus();
}
-QString MultiMeterSettingsWidget::title()
+TQString MultiMeterSettingsWidget::title()
{
return m_title->text();
}
@@ -51,25 +51,25 @@ double MultiMeterSettingsWidget::upperLimit()
}
-QColor MultiMeterSettingsWidget::normalDigitColor()
+TQColor MultiMeterSettingsWidget::normalDigitColor()
{
return m_normalDigitColor->color();
}
-QColor MultiMeterSettingsWidget::alarmDigitColor()
+TQColor MultiMeterSettingsWidget::alarmDigitColor()
{
return m_alarmDigitColor->color();
}
-QColor MultiMeterSettingsWidget::meterBackgroundColor()
+TQColor MultiMeterSettingsWidget::meterBackgroundColor()
{
return m_backgroundColor->color();
}
-void MultiMeterSettingsWidget::setTitle( const QString &s )
+void MultiMeterSettingsWidget::setTitle( const TQString &s )
{
m_title->setText(s);
}
@@ -89,7 +89,7 @@ void MultiMeterSettingsWidget::setLowerLimitActive( bool b )
void MultiMeterSettingsWidget::setLowerLimit( double d )
{
- m_lowerLimit->setText(QString("%1").arg(d));
+ m_lowerLimit->setText(TQString("%1").arg(d));
}
@@ -101,23 +101,23 @@ void MultiMeterSettingsWidget::setUpperLimitActive( bool b )
void MultiMeterSettingsWidget::setUpperLimit( double d )
{
- m_upperLimit->setText(QString("%1").arg(d));
+ m_upperLimit->setText(TQString("%1").arg(d));
}
-void MultiMeterSettingsWidget::setNormalDigitColor( const QColor &c )
+void MultiMeterSettingsWidget::setNormalDigitColor( const TQColor &c )
{
m_normalDigitColor->setColor(c);
}
-void MultiMeterSettingsWidget::setAlarmDigitColor( const QColor &c )
+void MultiMeterSettingsWidget::setAlarmDigitColor( const TQColor &c )
{
m_alarmDigitColor->setColor(c);
}
-void MultiMeterSettingsWidget::setMeterBackgroundColor( const QColor &c )
+void MultiMeterSettingsWidget::setMeterBackgroundColor( const TQColor &c )
{
m_backgroundColor->setColor(c);
}
diff --git a/ksysguard/gui/SensorDisplayLib/ProcessController.cc b/ksysguard/gui/SensorDisplayLib/ProcessController.cc
index b9fcd4f06..f02b02af9 100644
--- a/ksysguard/gui/SensorDisplayLib/ProcessController.cc
+++ b/ksysguard/gui/SensorDisplayLib/ProcessController.cc
@@ -23,7 +23,7 @@
#include <assert.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -37,40 +37,40 @@
#include "ProcessController.moc"
#include "SignalIDs.h"
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqlayout.h>
#include <kapplication.h>
#include <kpushbutton.h>
-ProcessController::ProcessController(QWidget* parent, const char* name, const QString &title, bool nf)
+ProcessController::ProcessController(TQWidget* parent, const char* name, const TQString &title, bool nf)
: KSGRD::SensorDisplay(parent, name, title, nf)
{
dict.setAutoDelete(true);
- dict.insert("Name", new QString(i18n("Name")));
- dict.insert("PID", new QString(i18n("PID")));
- dict.insert("PPID", new QString(i18n("PPID")));
- dict.insert("UID", new QString(i18n("UID")));
- dict.insert("GID", new QString(i18n("GID")));
- dict.insert("Status", new QString(i18n("Status")));
- dict.insert("User%", new QString(i18n("User%")));
- dict.insert("System%", new QString(i18n("System%")));
- dict.insert("Nice", new QString(i18n("Nice")));
- dict.insert("VmSize", new QString(i18n("VmSize")));
- dict.insert("VmRss", new QString(i18n("VmRss")));
- dict.insert("Login", new QString(i18n("Login")));
- dict.insert("Command", new QString(i18n("Command")));
+ dict.insert("Name", new TQString(i18n("Name")));
+ dict.insert("PID", new TQString(i18n("PID")));
+ dict.insert("PPID", new TQString(i18n("PPID")));
+ dict.insert("UID", new TQString(i18n("UID")));
+ dict.insert("GID", new TQString(i18n("GID")));
+ dict.insert("Status", new TQString(i18n("Status")));
+ dict.insert("User%", new TQString(i18n("User%")));
+ dict.insert("System%", new TQString(i18n("System%")));
+ dict.insert("Nice", new TQString(i18n("Nice")));
+ dict.insert("VmSize", new TQString(i18n("VmSize")));
+ dict.insert("VmRss", new TQString(i18n("VmRss")));
+ dict.insert("Login", new TQString(i18n("Login")));
+ dict.insert("Command", new TQString(i18n("Command")));
// Setup the geometry management.
- gm = new QVBoxLayout(this, 10);
+ gm = new TQVBoxLayout(this, 10);
Q_CHECK_PTR(gm);
gm->addSpacing(15);
- gmSearch = new QHBoxLayout();
+ gmSearch = new TQHBoxLayout();
Q_CHECK_PTR(gmSearch);
gm->addLayout(gmSearch, 0);
@@ -81,17 +81,17 @@ ProcessController::ProcessController(QWidget* parent, const char* name, const QS
pListSearchLine = new KListViewSearchLineWidget(pList, this, "process_list_search_line");
gmSearch->addWidget(pListSearchLine, 1);
- connect(pList, SIGNAL(killProcess(int, int)),
- this, SLOT(killProcess(int, int)));
- connect(pList, SIGNAL(reniceProcess(const QValueList<int> &, int)),
- this, SLOT(reniceProcess(const QValueList<int> &, int)));
- connect(pList, SIGNAL(listModified(bool)),
- this, SLOT(setModified(bool)));
+ connect(pList, TQT_SIGNAL(killProcess(int, int)),
+ this, TQT_SLOT(killProcess(int, int)));
+ connect(pList, TQT_SIGNAL(reniceProcess(const TQValueList<int> &, int)),
+ this, TQT_SLOT(reniceProcess(const TQValueList<int> &, int)));
+ connect(pList, TQT_SIGNAL(listModified(bool)),
+ this, TQT_SLOT(setModified(bool)));
/* Create the combo box to configure the process filter. The
* cbFilter must be created prior to constructing pList as the
* pList constructor sets cbFilter to its start value. */
- cbFilter = new QComboBox(this, "pList_cbFilter");
+ cbFilter = new TQComboBox(this, "pList_cbFilter");
Q_CHECK_PTR(cbFilter);
gmSearch->addWidget(cbFilter,0);
cbFilter->insertItem(i18n("All Processes"), 0);
@@ -100,30 +100,30 @@ ProcessController::ProcessController(QWidget* parent, const char* name, const QS
cbFilter->insertItem(i18n("Own Processes"), 3);
cbFilter->setMinimumSize(cbFilter->sizeHint());
// Create the check box to switch between tree view and list view.
- xbTreeView = new QCheckBox(i18n("&Tree"), this, "xbTreeView");
+ xbTreeView = new TQCheckBox(i18n("&Tree"), this, "xbTreeView");
Q_CHECK_PTR(xbTreeView);
xbTreeView->setMinimumSize(xbTreeView->sizeHint());
- connect(xbTreeView, SIGNAL(toggled(bool)),
- this, SLOT(setTreeView(bool)));
+ connect(xbTreeView, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setTreeView(bool)));
/* When the both cbFilter and pList are constructed we can connect the
* missing link. */
- connect(cbFilter, SIGNAL(activated(int)),
- this, SLOT(filterModeChanged(int)));
+ connect(cbFilter, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(filterModeChanged(int)));
// Create the 'Refresh' button.
bRefresh = new KPushButton( KGuiItem( i18n( "&Refresh" ), "reload" ),
this, "bRefresh" );
Q_CHECK_PTR(bRefresh);
bRefresh->setMinimumSize(bRefresh->sizeHint());
- connect(bRefresh, SIGNAL(clicked()), this, SLOT(updateList()));
+ connect(bRefresh, TQT_SIGNAL(clicked()), this, TQT_SLOT(updateList()));
// Create the 'Kill' button.
bKill = new KPushButton(i18n("&Kill"), this, "bKill");
Q_CHECK_PTR(bKill);
bKill->setMinimumSize(bKill->sizeHint());
- connect(bKill, SIGNAL(clicked()), this, SLOT(killProcess()));
+ connect(bKill, TQT_SIGNAL(clicked()), this, TQT_SLOT(killProcess()));
/* Disable the kill button until we know that the daemon supports the
* kill command. */
bKill->setEnabled(false);
@@ -131,7 +131,7 @@ ProcessController::ProcessController(QWidget* parent, const char* name, const QS
gm->addWidget(pList, 1);
- gm1 = new QHBoxLayout();
+ gm1 = new TQHBoxLayout();
Q_CHECK_PTR(gm1);
gm->addLayout(gm1, 0);
gm1->addStretch();
@@ -154,7 +154,7 @@ ProcessController::ProcessController(QWidget* parent, const char* name, const QS
void ProcessController::setSearchFocus() {
//stupid search line widget. See rant in fixTabOrder
if(!pListSearchLine->searchLine())
- QTimer::singleShot(100, this, SLOT(setSearchFocus()));
+ TQTimer::singleShot(100, this, TQT_SLOT(setSearchFocus()));
else {
pListSearchLine->searchLine()->setFocus();
}
@@ -167,7 +167,7 @@ void ProcessController::fixTabOrder() {
//
//Did i mention I hate this?
if(!pListSearchLine->searchLine())
- QTimer::singleShot(100, this, SLOT(fixTabOrder()));
+ TQTimer::singleShot(100, this, TQT_SLOT(fixTabOrder()));
else {
setTabOrder(pListSearchLine->searchLine(), cbFilter);
setTabOrder(cbFilter, pList);
@@ -178,19 +178,19 @@ void ProcessController::fixTabOrder() {
}
void
-ProcessController::resizeEvent(QResizeEvent* ev)
+ProcessController::resizeEvent(TQResizeEvent* ev)
{
if(frame())
frame()->setGeometry(0, 0, width(), height());
- QWidget::resizeEvent(ev);
+ TQWidget::resizeEvent(ev);
}
bool
-ProcessController::addSensor(const QString& hostName,
- const QString& sensorName,
- const QString& sensorType,
- const QString& title)
+ProcessController::addSensor(const TQString& hostName,
+ const TQString& sensorName,
+ const TQString& sensorType,
+ const TQString& title)
{
if (sensorType != "table")
return (false);
@@ -220,11 +220,11 @@ void
ProcessController::killProcess(int pid, int sig)
{
sendRequest(sensors().at(0)->hostName(),
- QString("kill %1 %2" ).arg(pid).arg(sig), 3);
+ TQString("kill %1 %2" ).arg(pid).arg(sig), 3);
if ( !timerOn() )
// give ksysguardd time to update its proccess list
- QTimer::singleShot(3000, this, SLOT(updateList()));
+ TQTimer::singleShot(3000, this, TQT_SLOT(updateList()));
else
updateList();
}
@@ -232,7 +232,7 @@ ProcessController::killProcess(int pid, int sig)
void
ProcessController::killProcess()
{
- const QStringList& selectedAsStrings = pList->getSelectedAsStrings();
+ const TQStringList& selectedAsStrings = pList->getSelectedAsStrings();
if (selectedAsStrings.isEmpty())
{
KMessageBox::sorry(this,
@@ -241,7 +241,7 @@ ProcessController::killProcess()
}
else
{
- QString msg = i18n("Do you want to kill the selected process?",
+ TQString msg = i18n("Do you want to kill the selected process?",
"Do you want to kill the %n selected processes?",
selectedAsStrings.count());
@@ -253,7 +253,7 @@ ProcessController::killProcess()
bool dontAgain = false;
- int res = KMessageBox::createKMessageBox(dlg, QMessageBox::Question,
+ int res = KMessageBox::createKMessageBox(dlg, TQMessageBox::Question,
msg, selectedAsStrings,
i18n("Do not ask again"), &dontAgain,
KMessageBox::Notify);
@@ -264,32 +264,32 @@ ProcessController::killProcess()
}
}
- const QValueList<int>& selectedPIds = pList->getSelectedPIds();
+ const TQValueList<int>& selectedPIds = pList->getSelectedPIds();
// send kill signal to all seleted processes
- QValueListConstIterator<int> it;
+ TQValueListConstIterator<int> it;
for (it = selectedPIds.begin(); it != selectedPIds.end(); ++it)
- sendRequest(sensors().at(0)->hostName(), QString("kill %1 %2" ).arg(*it)
+ sendRequest(sensors().at(0)->hostName(), TQString("kill %1 %2" ).arg(*it)
.arg(MENU_ID_SIGKILL), 3);
if ( !timerOn())
// give ksysguardd time to update its proccess list
- QTimer::singleShot(3000, this, SLOT(updateList()));
+ TQTimer::singleShot(3000, this, TQT_SLOT(updateList()));
else
updateList();
}
void
-ProcessController::reniceProcess(const QValueList<int> &pids, int niceValue)
+ProcessController::reniceProcess(const TQValueList<int> &pids, int niceValue)
{
- for( QValueList<int>::ConstIterator it = pids.constBegin(), end = pids.constEnd(); it != end; ++it )
+ for( TQValueList<int>::ConstIterator it = pids.constBegin(), end = pids.constEnd(); it != end; ++it )
sendRequest(sensors().at(0)->hostName(),
- QString("setpriority %1 %2" ).arg(*it).arg(niceValue), 5);
+ TQString("setpriority %1 %2" ).arg(*it).arg(niceValue), 5);
sendRequest(sensors().at(0)->hostName(), "ps", 2); //update the display afterwards
}
void
-ProcessController::answerReceived(int id, const QString& answer)
+ProcessController::answerReceived(int id, const TQString& answer)
{
/* We received something, so the sensor is probably ok. */
sensorError(id, false);
@@ -314,7 +314,7 @@ ProcessController::answerReceived(int id, const QString& answer)
pList->removeColumns();
for (unsigned int i = 0; i < headers.count(); i++)
{
- QString header;
+ TQString header;
if (dict[headers[i]])
header = *dict[headers[i]];
else
@@ -421,11 +421,11 @@ ProcessController::sensorError(int, bool err)
}
bool
-ProcessController::restoreSettings(QDomElement& element)
+ProcessController::restoreSettings(TQDomElement& element)
{
bool result = addSensor(element.attribute("hostName"),
element.attribute("sensorName"), (element.attribute("sensorType").isEmpty() ? "table" : element.attribute("sensorType")),
- QString::null);
+ TQString::null);
xbTreeView->setChecked(element.attribute("tree").toInt());
setTreeView(element.attribute("tree").toInt());
@@ -450,7 +450,7 @@ ProcessController::restoreSettings(QDomElement& element)
}
bool
-ProcessController::saveSettings(QDomDocument& doc, QDomElement& element, bool save)
+ProcessController::saveSettings(TQDomDocument& doc, TQDomElement& element, bool save)
{
element.setAttribute("hostName", sensors().at(0)->hostName());
element.setAttribute("sensorName", sensors().at(0)->name());
diff --git a/ksysguard/gui/SensorDisplayLib/ProcessController.h b/ksysguard/gui/SensorDisplayLib/ProcessController.h
index f834efbb6..45b5e5df8 100644
--- a/ksysguard/gui/SensorDisplayLib/ProcessController.h
+++ b/ksysguard/gui/SensorDisplayLib/ProcessController.h
@@ -24,8 +24,8 @@
#ifndef _ProcessController_h_
#define _ProcessController_h_
-#include <qdict.h>
-#include <qwidget.h>
+#include <tqdict.h>
+#include <tqwidget.h>
#include <kapplication.h>
@@ -54,28 +54,28 @@ class ProcessController : public KSGRD::SensorDisplay
Q_OBJECT
public:
- ProcessController(QWidget* parent = 0, const char* name = 0, const QString &title = QString::null, bool nf = false);
+ ProcessController(TQWidget* parent = 0, const char* name = 0, const TQString &title = TQString::null, bool nf = false);
virtual ~ProcessController() { }
- void resizeEvent(QResizeEvent*);
+ void resizeEvent(TQResizeEvent*);
- bool restoreSettings(QDomElement& element);
+ bool restoreSettings(TQDomElement& element);
- bool saveSettings(QDomDocument& doc, QDomElement& element, bool save = true);
+ bool saveSettings(TQDomDocument& doc, TQDomElement& element, bool save = true);
void refreshList(void)
{
updateList();
}
- virtual void timerEvent(QTimerEvent*)
+ virtual void timerEvent(TQTimerEvent*)
{
updateList();
}
- virtual bool addSensor(const QString&, const QString&, const QString&, const QString&);
+ virtual bool addSensor(const TQString&, const TQString&, const TQString&, const TQString&);
- virtual void answerReceived(int id, const QString& answer);
+ virtual void answerReceived(int id, const TQString& answer);
virtual void sensorError(int, bool err);
@@ -117,7 +117,7 @@ public slots:
void killProcess();
void killProcess(int pid, int sig);
- void reniceProcess(const QValueList<int> &pids, int niceValue);
+ void reniceProcess(const TQValueList<int> &pids, int niceValue);
void updateList();
@@ -125,30 +125,30 @@ signals:
void setFilterMode(int);
private:
- QVBoxLayout* gm;
+ TQVBoxLayout* gm;
bool killSupported;
/// The process list.
ProcessList* pList;
///Layout for the search line and process filter combo box
- QHBoxLayout* gmSearch;
+ TQHBoxLayout* gmSearch;
KListViewSearchLineWidget *pListSearchLine;
- QHBoxLayout* gm1;
+ TQHBoxLayout* gm1;
/// Checkbox to switch between tree and list view
- QCheckBox* xbTreeView;
+ TQCheckBox* xbTreeView;
/// This combo boxes control the process filter.
- QComboBox* cbFilter;
+ TQComboBox* cbFilter;
/// These buttons force an immedeate refresh or kill a process.
KPushButton* bRefresh;
KPushButton* bKill;
/// Dictionary for header translations.
- QDict<QString> dict;
+ TQDict<TQString> dict;
};
#endif
diff --git a/ksysguard/gui/SensorDisplayLib/ProcessList.cc b/ksysguard/gui/SensorDisplayLib/ProcessList.cc
index 6d158c872..2f5b3fe51 100644
--- a/ksysguard/gui/SensorDisplayLib/ProcessList.cc
+++ b/ksysguard/gui/SensorDisplayLib/ProcessList.cc
@@ -35,10 +35,10 @@
#include <sys/types.h>
#include <unistd.h>
-#include <qbitmap.h>
-#include <qheader.h>
-#include <qimage.h>
-#include <qpopupmenu.h>
+#include <tqbitmap.h>
+#include <tqheader.h>
+#include <tqimage.h>
+#include <tqpopupmenu.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -57,9 +57,9 @@
//extern const char* timeKey(const char* text);
//extern const char* floatKey(const char* text);
-QDict<QString> ProcessList::aliases;
+TQDict<TQString> ProcessList::aliases;
-int ProcessLVI::compare( QListViewItem *item, int col, bool ascending ) const
+int ProcessLVI::compare( TQListViewItem *item, int col, bool ascending ) const
{
int type = ((ProcessList*)listView())->columnType( col );
@@ -100,133 +100,133 @@ int ProcessLVI::compare( QListViewItem *item, int col, bool ascending ) const
return key( col, ascending ).localeAwareCompare( item->key( col, ascending ) );
}
-ProcessList::ProcessList(QWidget *parent, const char* name)
+ProcessList::ProcessList(TQWidget *parent, const char* name)
: KListView(parent, name)
{
iconCache.setAutoDelete(true);
columnDict.setAutoDelete(true);
columnDict.insert("running",
- new QString(i18n("process status", "running")));
+ new TQString(i18n("process status", "running")));
columnDict.insert("sleeping",
- new QString(i18n("process status", "sleeping")));
+ new TQString(i18n("process status", "sleeping")));
columnDict.insert("disk sleep",
- new QString(i18n("process status", "disk sleep")));
- columnDict.insert("zombie", new QString(i18n("process status", "zombie")));
+ new TQString(i18n("process status", "disk sleep")));
+ columnDict.insert("zombie", new TQString(i18n("process status", "zombie")));
columnDict.insert("stopped",
- new QString(i18n("process status", "stopped")));
- columnDict.insert("paging", new QString(i18n("process status", "paging")));
- columnDict.insert("idle", new QString(i18n("process status", "idle")));
+ new TQString(i18n("process status", "stopped")));
+ columnDict.insert("paging", new TQString(i18n("process status", "paging")));
+ columnDict.insert("idle", new TQString(i18n("process status", "idle")));
if (aliases.isEmpty())
{
#ifdef Q_OS_LINUX
- aliases.insert("init", new QString("penguin"));
+ aliases.insert("init", new TQString("penguin"));
#else
- aliases.insert("init", new QString("system"));
+ aliases.insert("init", new TQString("system"));
#endif
/* kernel stuff */
- aliases.insert("bdflush", new QString("kernel"));
- aliases.insert("dhcpcd", new QString("kernel"));
- aliases.insert("kapm-idled", new QString("kernel"));
- aliases.insert("keventd", new QString("kernel"));
- aliases.insert("khubd", new QString("kernel"));
- aliases.insert("klogd", new QString("kernel"));
- aliases.insert("kreclaimd", new QString("kernel"));
- aliases.insert("kreiserfsd", new QString("kernel"));
- aliases.insert("ksoftirqd_CPU0", new QString("kernel"));
- aliases.insert("ksoftirqd_CPU1", new QString("kernel"));
- aliases.insert("ksoftirqd_CPU2", new QString("kernel"));
- aliases.insert("ksoftirqd_CPU3", new QString("kernel"));
- aliases.insert("ksoftirqd_CPU4", new QString("kernel"));
- aliases.insert("ksoftirqd_CPU5", new QString("kernel"));
- aliases.insert("ksoftirqd_CPU6", new QString("kernel"));
- aliases.insert("ksoftirqd_CPU7", new QString("kernel"));
- aliases.insert("kswapd", new QString("kernel"));
- aliases.insert("kupdated", new QString("kernel"));
- aliases.insert("mdrecoveryd", new QString("kernel"));
- aliases.insert("scsi_eh_0", new QString("kernel"));
- aliases.insert("scsi_eh_1", new QString("kernel"));
- aliases.insert("scsi_eh_2", new QString("kernel"));
- aliases.insert("scsi_eh_3", new QString("kernel"));
- aliases.insert("scsi_eh_4", new QString("kernel"));
- aliases.insert("scsi_eh_5", new QString("kernel"));
- aliases.insert("scsi_eh_6", new QString("kernel"));
- aliases.insert("scsi_eh_7", new QString("kernel"));
+ aliases.insert("bdflush", new TQString("kernel"));
+ aliases.insert("dhcpcd", new TQString("kernel"));
+ aliases.insert("kapm-idled", new TQString("kernel"));
+ aliases.insert("keventd", new TQString("kernel"));
+ aliases.insert("khubd", new TQString("kernel"));
+ aliases.insert("klogd", new TQString("kernel"));
+ aliases.insert("kreclaimd", new TQString("kernel"));
+ aliases.insert("kreiserfsd", new TQString("kernel"));
+ aliases.insert("ksoftirqd_CPU0", new TQString("kernel"));
+ aliases.insert("ksoftirqd_CPU1", new TQString("kernel"));
+ aliases.insert("ksoftirqd_CPU2", new TQString("kernel"));
+ aliases.insert("ksoftirqd_CPU3", new TQString("kernel"));
+ aliases.insert("ksoftirqd_CPU4", new TQString("kernel"));
+ aliases.insert("ksoftirqd_CPU5", new TQString("kernel"));
+ aliases.insert("ksoftirqd_CPU6", new TQString("kernel"));
+ aliases.insert("ksoftirqd_CPU7", new TQString("kernel"));
+ aliases.insert("kswapd", new TQString("kernel"));
+ aliases.insert("kupdated", new TQString("kernel"));
+ aliases.insert("mdrecoveryd", new TQString("kernel"));
+ aliases.insert("scsi_eh_0", new TQString("kernel"));
+ aliases.insert("scsi_eh_1", new TQString("kernel"));
+ aliases.insert("scsi_eh_2", new TQString("kernel"));
+ aliases.insert("scsi_eh_3", new TQString("kernel"));
+ aliases.insert("scsi_eh_4", new TQString("kernel"));
+ aliases.insert("scsi_eh_5", new TQString("kernel"));
+ aliases.insert("scsi_eh_6", new TQString("kernel"));
+ aliases.insert("scsi_eh_7", new TQString("kernel"));
/* daemon and other service providers */
- aliases.insert("artsd", new QString("daemon"));
- aliases.insert("atd", new QString("daemon"));
- aliases.insert("automount", new QString("daemon"));
- aliases.insert("cardmgr", new QString("daemon"));
- aliases.insert("cron", new QString("daemon"));
- aliases.insert("cupsd", new QString("daemon"));
- aliases.insert("in.identd", new QString("daemon"));
- aliases.insert("lpd", new QString("daemon"));
- aliases.insert("mingetty", new QString("daemon"));
- aliases.insert("nscd", new QString("daemon"));
- aliases.insert("portmap", new QString("daemon"));
- aliases.insert("rpc.statd", new QString("daemon"));
- aliases.insert("rpciod", new QString("daemon"));
- aliases.insert("sendmail", new QString("daemon"));
- aliases.insert("sshd", new QString("daemon"));
- aliases.insert("syslogd", new QString("daemon"));
- aliases.insert("usbmgr", new QString("daemon"));
- aliases.insert("wwwoffled", new QString("daemon"));
- aliases.insert("xntpd", new QString("daemon"));
- aliases.insert("ypbind", new QString("daemon"));
+ aliases.insert("artsd", new TQString("daemon"));
+ aliases.insert("atd", new TQString("daemon"));
+ aliases.insert("automount", new TQString("daemon"));
+ aliases.insert("cardmgr", new TQString("daemon"));
+ aliases.insert("cron", new TQString("daemon"));
+ aliases.insert("cupsd", new TQString("daemon"));
+ aliases.insert("in.identd", new TQString("daemon"));
+ aliases.insert("lpd", new TQString("daemon"));
+ aliases.insert("mingetty", new TQString("daemon"));
+ aliases.insert("nscd", new TQString("daemon"));
+ aliases.insert("portmap", new TQString("daemon"));
+ aliases.insert("rpc.statd", new TQString("daemon"));
+ aliases.insert("rpciod", new TQString("daemon"));
+ aliases.insert("sendmail", new TQString("daemon"));
+ aliases.insert("sshd", new TQString("daemon"));
+ aliases.insert("syslogd", new TQString("daemon"));
+ aliases.insert("usbmgr", new TQString("daemon"));
+ aliases.insert("wwwoffled", new TQString("daemon"));
+ aliases.insert("xntpd", new TQString("daemon"));
+ aliases.insert("ypbind", new TQString("daemon"));
/* kde applications */
- aliases.insert("appletproxy", new QString("kdeapp"));
- aliases.insert("dcopserver", new QString("kdeapp"));
- aliases.insert("kcookiejar", new QString("kdeapp"));
- aliases.insert("kde", new QString("kdeapp"));
- aliases.insert("kded", new QString("kdeapp"));
- aliases.insert("kdeinit", new QString("kdeapp"));
- aliases.insert("kdesktop", new QString("kdeapp"));
- aliases.insert("kdesud", new QString("kdeapp"));
- aliases.insert("kdm", new QString("kdeapp"));
- aliases.insert("khotkeys", new QString("kdeapp"));
- aliases.insert("kio_file", new QString("kdeapp"));
- aliases.insert("kio_uiserver", new QString("kdeapp"));
- aliases.insert("klauncher", new QString("kdeapp"));
- aliases.insert("ksmserver", new QString("kdeapp"));
- aliases.insert("kwrapper", new QString("kdeapp"));
- aliases.insert("kwrited", new QString("kdeapp"));
- aliases.insert("kxmlrpcd", new QString("kdeapp"));
- aliases.insert("startkde", new QString("kdeapp"));
+ aliases.insert("appletproxy", new TQString("kdeapp"));
+ aliases.insert("dcopserver", new TQString("kdeapp"));
+ aliases.insert("kcookiejar", new TQString("kdeapp"));
+ aliases.insert("kde", new TQString("kdeapp"));
+ aliases.insert("kded", new TQString("kdeapp"));
+ aliases.insert("kdeinit", new TQString("kdeapp"));
+ aliases.insert("kdesktop", new TQString("kdeapp"));
+ aliases.insert("kdesud", new TQString("kdeapp"));
+ aliases.insert("kdm", new TQString("kdeapp"));
+ aliases.insert("khotkeys", new TQString("kdeapp"));
+ aliases.insert("kio_file", new TQString("kdeapp"));
+ aliases.insert("kio_uiserver", new TQString("kdeapp"));
+ aliases.insert("klauncher", new TQString("kdeapp"));
+ aliases.insert("ksmserver", new TQString("kdeapp"));
+ aliases.insert("kwrapper", new TQString("kdeapp"));
+ aliases.insert("kwrited", new TQString("kdeapp"));
+ aliases.insert("kxmlrpcd", new TQString("kdeapp"));
+ aliases.insert("startkde", new TQString("kdeapp"));
/* other processes */
- aliases.insert("bash", new QString("shell"));
- aliases.insert("cat", new QString("tools"));
- aliases.insert("egrep", new QString("tools"));
- aliases.insert("emacs", new QString("wordprocessing"));
- aliases.insert("fgrep", new QString("tools"));
- aliases.insert("find", new QString("tools"));
- aliases.insert("grep", new QString("tools"));
- aliases.insert("ksh", new QString("shell"));
- aliases.insert("screen", new QString("openterm"));
- aliases.insert("sh", new QString("shell"));
- aliases.insert("sort", new QString("tools"));
- aliases.insert("ssh", new QString("shell"));
- aliases.insert("su", new QString("tools"));
- aliases.insert("tcsh", new QString("shell"));
- aliases.insert("tee", new QString("tools"));
- aliases.insert("vi", new QString("wordprocessing"));
+ aliases.insert("bash", new TQString("shell"));
+ aliases.insert("cat", new TQString("tools"));
+ aliases.insert("egrep", new TQString("tools"));
+ aliases.insert("emacs", new TQString("wordprocessing"));
+ aliases.insert("fgrep", new TQString("tools"));
+ aliases.insert("find", new TQString("tools"));
+ aliases.insert("grep", new TQString("tools"));
+ aliases.insert("ksh", new TQString("shell"));
+ aliases.insert("screen", new TQString("openterm"));
+ aliases.insert("sh", new TQString("shell"));
+ aliases.insert("sort", new TQString("tools"));
+ aliases.insert("ssh", new TQString("shell"));
+ aliases.insert("su", new TQString("tools"));
+ aliases.insert("tcsh", new TQString("shell"));
+ aliases.insert("tee", new TQString("tools"));
+ aliases.insert("vi", new TQString("wordprocessing"));
}
/* The filter mode is controlled by a combo box of the parent. If
* the mode is changed we get a signal. */
- connect(parent, SIGNAL(setFilterMode(int)),
- this, SLOT(setFilterMode(int)));
+ connect(parent, TQT_SIGNAL(setFilterMode(int)),
+ this, TQT_SLOT(setFilterMode(int)));
/* We need to catch this signal to show various popup menues. */
connect(this,
- SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)),
+ TQT_SIGNAL(rightButtonPressed(TQListViewItem*, const TQPoint&, int)),
this,
- SLOT(handleRMBPressed(QListViewItem*, const QPoint&, int)));
+ TQT_SLOT(handleRMBPressed(TQListViewItem*, const TQPoint&, int)));
/* Since Qt does not tell us the sorting details we have to do our
* own bookkeping, so we can save and restore the sorting
* settings. */
- connect(header(), SIGNAL(clicked(int)), this, SLOT(sortingChanged(int)));
+ connect(header(), TQT_SIGNAL(clicked(int)), this, TQT_SLOT(sortingChanged(int)));
treeViewEnabled = false;
openAll = true;
@@ -243,18 +243,18 @@ ProcessList::ProcessList(QWidget *parent, const char* name)
setAllColumnsShowFocus(true);
setTreeStepSize(17);
setSorting(sortColumn, increasing);
- setSelectionMode(QListView::Extended);
+ setSelectionMode(TQListView::Extended);
// Create popup menu for RMB clicks on table header
- headerPM = new QPopupMenu();
+ headerPM = new TQPopupMenu();
headerPM->insertItem(i18n("Remove Column"), HEADER_REMOVE);
headerPM->insertItem(i18n("Add Column"), HEADER_ADD);
headerPM->insertItem(i18n("Help on Column"), HEADER_HELP);
- connect(header(), SIGNAL(sizeChange(int, int, int)),
- this, SLOT(sizeChanged(int, int, int)));
- connect(header(), SIGNAL(indexChange(int, int, int)),
- this, SLOT(indexChanged(int, int, int)));
+ connect(header(), TQT_SIGNAL(sizeChange(int, int, int)),
+ this, TQT_SLOT(sizeChanged(int, int, int)));
+ connect(header(), TQT_SIGNAL(indexChange(int, int, int)),
+ this, TQT_SLOT(indexChanged(int, int, int)));
killSupported = false;
setModified(false);
@@ -265,34 +265,34 @@ ProcessList::~ProcessList()
delete(headerPM);
}
-const QValueList<int>&
+const TQValueList<int>&
ProcessList::getSelectedPIds()
{
selectedPIds.clear();
// iterate through all selected visible items of the listview
- QListViewItemIterator it(this, QListViewItemIterator::Visible | QListViewItemIterator::Selected );
+ TQListViewItemIterator it(this, TQListViewItemIterator::Visible | TQListViewItemIterator::Selected );
for ( ; it.current(); ++it )
selectedPIds.append(it.current()->text(1).toInt());
return (selectedPIds);
}
-const QStringList&
+const TQStringList&
ProcessList::getSelectedAsStrings()
{
selectedAsStrings.clear();
// iterate through all selected visible items of the listview
- QListViewItemIterator it(this, QListViewItemIterator::Visible | QListViewItemIterator::Selected );
- QString spaces;
+ TQListViewItemIterator it(this, TQListViewItemIterator::Visible | TQListViewItemIterator::Selected );
+ TQString spaces;
for ( ; it.current(); ++it ) {
- spaces.fill(QChar(' '), 7 - it.current()->text(1).length());
+ spaces.fill(TQChar(' '), 7 - it.current()->text(1).length());
selectedAsStrings.append("(PID: " + it.current()->text(1) + ")" + spaces + " " + it.current()->text(0));
}
return (selectedAsStrings);
}
bool
-ProcessList::update(const QString& list)
+ProcessList::update(const TQString& list)
{
/* Disable painting to avoid flickering effects,
* especially when in tree view mode.
@@ -312,7 +312,7 @@ ProcessList::update(const QString& list)
#if 0
// This is needed for debugging only.
kdDebug(1215) << list << endl;
- QString l;
+ TQString l;
for (uint j = 0; j < line->count(); j++)
l += (*line)[j] + "|";
kdDebug(1215) << "Incomplete ps line:" << l << endl;
@@ -336,7 +336,7 @@ ProcessList::update(const QString& list)
else
buildList();
- QListViewItemIterator it( this );
+ TQListViewItemIterator it( this );
while ( it.current() ) {
if ( itemPos( it.current() ) == currItemPos ) {
setCurrentItem( it.current() );
@@ -378,12 +378,12 @@ ProcessList::setTreeView(bool tv)
}
bool
-ProcessList::load(QDomElement& el)
+ProcessList::load(TQDomElement& el)
{
- QDomNodeList dnList = el.elementsByTagName("column");
+ TQDomNodeList dnList = el.elementsByTagName("column");
for (uint i = 0; i < dnList.count(); ++i)
{
- QDomElement lel = dnList.item(i).toElement();
+ TQDomElement lel = dnList.item(i).toElement();
if (savedWidth.count() <= i)
savedWidth.append(lel.attribute("savedWidth").toInt());
else
@@ -404,11 +404,11 @@ ProcessList::load(QDomElement& el)
}
bool
-ProcessList::save(QDomDocument& doc, QDomElement& display)
+ProcessList::save(TQDomDocument& doc, TQDomElement& display)
{
for (int i = 0; i < columns(); ++i)
{
- QDomElement col = doc.createElement("column");
+ TQDomElement col = doc.createElement("column");
display.appendChild(col);
col.setAttribute("currentWidth", columnWidth(i));
col.setAttribute("savedWidth", savedWidth[i]);
@@ -475,7 +475,7 @@ void
ProcessList::buildList()
{
/* Get the first process in the list, check whether it matches the
- * filter and append it to QListView widget if so. */
+ * filter and append it to TQListView widget if so. */
while (!pl.isEmpty())
{
KSGRD::SensorPSLine* p = pl.first();
@@ -553,7 +553,7 @@ ProcessList::isLeafProcess(int pid)
}
void
-ProcessList::extendTree(QPtrList<KSGRD::SensorPSLine>* pl, ProcessLVI* parent, int ppid)
+ProcessList::extendTree(TQPtrList<KSGRD::SensorPSLine>* pl, ProcessLVI* parent, int ppid)
{
KSGRD::SensorPSLine* ps;
@@ -599,13 +599,13 @@ ProcessList::extendTree(QPtrList<KSGRD::SensorPSLine>* pl, ProcessLVI* parent, i
void
ProcessList::addProcess(KSGRD::SensorPSLine* p, ProcessLVI* pli)
{
- QString name = p->name();
+ TQString name = p->name();
if (aliases[name])
name = *aliases[name];
/* Get icon from icon list that might be appropriate for a process
* with this name. */
- QPixmap pix;
+ TQPixmap pix;
if (!iconCache[name])
{
pix = KGlobal::iconLoader()->loadIcon(name, KIcon::Small,
@@ -621,7 +621,7 @@ ProcessList::addProcess(KSGRD::SensorPSLine* p, ProcessLVI* pli)
* scale the pixmaps already appropriately. Since I got a bug
* report claiming that it doesn't work with GNOME apps I've
* added this safeguard. */
- QImage img;
+ TQImage img;
img = pix;
img.smoothScale(16, 16);
pix = img;
@@ -629,17 +629,17 @@ ProcessList::addProcess(KSGRD::SensorPSLine* p, ProcessLVI* pli)
/* We copy the icon into a 24x16 pixmap to add a 4 pixel margin on
* the left and right side. In tree view mode we use the original
* icon. */
- QPixmap icon(24, 16, pix.depth());
+ TQPixmap icon(24, 16, pix.depth());
if (!treeViewEnabled)
{
icon.fill();
bitBlt(&icon, 4, 0, &pix, 0, 0, pix.width(), pix.height());
- QBitmap mask(24, 16, true);
+ TQBitmap mask(24, 16, true);
bitBlt(&mask, 4, 0, pix.mask(), 0, 0, pix.width(), pix.height());
icon.setMask(mask);
pix = icon;
}
- iconCache.insert(name, new QPixmap(pix));
+ iconCache.insert(name, new TQPixmap(pix));
}
else
pix = *(iconCache[name]);
@@ -668,7 +668,7 @@ ProcessList::updateMetaInfo(void)
selectedPIds.clear();
closedSubTrees.clear();
- QListViewItemIterator it(this);
+ TQListViewItemIterator it(this);
// iterate through all items of the listview
for ( ; it.current(); ++it )
@@ -679,7 +679,7 @@ ProcessList::updateMetaInfo(void)
closedSubTrees.append(it.current()->text(1).toInt());
}
- /* In list view mode all list items are set to closed by QListView.
+ /* In list view mode all list items are set to closed by TQListView.
* If the tree view is now selected, all item will be closed. This is
* annoying. So we use the openAll flag to force all trees to open when
* the treeViewEnbled flag was set to true. */
@@ -699,9 +699,9 @@ ProcessList::removeColumns(void)
}
void
-ProcessList::addColumn(const QString& label, const QString& type)
+ProcessList::addColumn(const TQString& label, const TQString& type)
{
- QListView::addColumn(label);
+ TQListView::addColumn(label);
uint col = columns() - 1;
if (type == "s" || type == "S")
setColumnAlignment(col, AlignLeft);
@@ -721,7 +721,7 @@ ProcessList::addColumn(const QString& label, const QString& type)
mColumnTypes.append(type);
/* Just use some sensible default values as initial setting. */
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
setColumnWidth(col, fm.width(label) + 10);
if (currentWidth.count() - 1 == col)
@@ -746,7 +746,7 @@ ProcessList::addColumn(const QString& label, const QString& type)
setColumnWidth(i, currentWidth[i]);
}
setColumnWidthMode(i, currentWidth[i] == 0 ?
- QListView::Manual : QListView::Maximum);
+ TQListView::Manual : TQListView::Maximum);
header()->moveSection(i, index[i]);
}
setSorting(sortColumn, increasing);
@@ -754,7 +754,7 @@ ProcessList::addColumn(const QString& label, const QString& type)
}
void
-ProcessList::handleRMBPressed(QListViewItem* lvi, const QPoint& p, int col)
+ProcessList::handleRMBPressed(TQListViewItem* lvi, const TQPoint& p, int col)
{
if (!lvi)
return;
@@ -768,13 +768,13 @@ ProcessList::handleRMBPressed(QListViewItem* lvi, const QPoint& p, int col)
int currentNiceValue = 0;
for (int i = 0; i < columns(); ++i)
- if (QString::compare(header()->label(i), i18n("Nice")) == 0)
+ if (TQString::compare(header()->label(i), i18n("Nice")) == 0)
currentNiceValue = lvi->text(i).toInt();
- QPopupMenu processPM;
+ TQPopupMenu processPM;
if (columnWidth(col) != 0)
processPM.insertItem(i18n("Hide Column"), 5);
- QPopupMenu* hiddenPM = new QPopupMenu(&processPM);
+ TQPopupMenu* hiddenPM = new TQPopupMenu(&processPM);
for (int i = 0; i < columns(); ++i)
if (columnWidth(i) == 0)
hiddenPM->insertItem(header()->label(i), i + 100);
@@ -786,7 +786,7 @@ ProcessList::handleRMBPressed(QListViewItem* lvi, const QPoint& p, int col)
processPM.insertItem(i18n("Select All Processes"), 1);
processPM.insertItem(i18n("Unselect All Processes"), 2);
- QPopupMenu* signalPM = new QPopupMenu(&processPM);
+ TQPopupMenu* signalPM = new TQPopupMenu(&processPM);
if (killSupported && lvi->isSelected())
{
processPM.insertSeparator();
@@ -839,7 +839,7 @@ ProcessList::handleRMBPressed(QListViewItem* lvi, const QPoint& p, int col)
selectAllChilds(currentPId, id & 1);
break;
case 5:
- setColumnWidthMode(col, QListView::Manual);
+ setColumnWidthMode(col, TQListView::Manual);
savedWidth[col] = columnWidth(col);
setColumnWidth(col, 0);
setModified(true);
@@ -861,7 +861,7 @@ ProcessList::handleRMBPressed(QListViewItem* lvi, const QPoint& p, int col)
/* we go through list to get all task also
when update interval is paused */
selectedPIds.clear();
- QListViewItemIterator it(this, QListViewItemIterator::Visible | QListViewItemIterator::Selected);
+ TQListViewItemIterator it(this, TQListViewItemIterator::Visible | TQListViewItemIterator::Selected);
// iterate through all selected visible items of the listview
for ( ; it.current(); ++it )
@@ -869,16 +869,16 @@ ProcessList::handleRMBPressed(QListViewItem* lvi, const QPoint& p, int col)
selectedPIds.append(it.current()->text(1).toInt());
}
- QString msg = i18n("Do you really want to send signal %1 to the selected process?",
+ TQString msg = i18n("Do you really want to send signal %1 to the selected process?",
"Do you really want to send signal %1 to the %n selected processes?",
selectedPIds.count())
.arg(signalPM->text(id));
int answ;
- switch(answ = KMessageBox::questionYesNo(this, msg, QString::null, i18n("Send"), KStdGuiItem::cancel()))
+ switch(answ = KMessageBox::questionYesNo(this, msg, TQString::null, i18n("Send"), KStdGuiItem::cancel()))
{
case KMessageBox::Yes:
{
- QValueList<int>::Iterator it;
+ TQValueList<int>::Iterator it;
for (it = selectedPIds.begin(); it != selectedPIds.end(); ++it)
emit (killProcess(*it, id));
break;
@@ -891,7 +891,7 @@ ProcessList::handleRMBPressed(QListViewItem* lvi, const QPoint& p, int col)
{
/* IDs >= 100 are used for hidden columns. */
int col = id - 100;
- setColumnWidthMode(col, QListView::Maximum);
+ setColumnWidthMode(col, TQListView::Maximum);
setColumnWidth(col, savedWidth[col]);
setModified(true);
}
@@ -903,7 +903,7 @@ ProcessList::selectAllItems(bool select)
{
selectedPIds.clear();
- QListViewItemIterator it(this, QListViewItemIterator::Visible);
+ TQListViewItemIterator it(this, TQListViewItemIterator::Visible);
// iterate through all items of the listview
for ( ; it.current(); ++it )
@@ -918,7 +918,7 @@ ProcessList::selectAllItems(bool select)
void
ProcessList::selectAllChilds(int pid, bool select)
{
- QListViewItemIterator it(this, QListViewItemIterator::Visible );
+ TQListViewItemIterator it(this, TQListViewItemIterator::Visible );
// iterate through all items of the listview
for ( ; it.current(); ++it )
diff --git a/ksysguard/gui/SensorDisplayLib/ProcessList.h b/ksysguard/gui/SensorDisplayLib/ProcessList.h
index b3f484484..aac28a227 100644
--- a/ksysguard/gui/SensorDisplayLib/ProcessList.h
+++ b/ksysguard/gui/SensorDisplayLib/ProcessList.h
@@ -25,11 +25,11 @@
#ifndef _ProcessList_h_
#define _ProcessList_h_
-#include <qdict.h>
-#include <qdom.h>
-#include <qstringlist.h>
-#include <qvaluelist.h>
-#include <qwidget.h>
+#include <tqdict.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
#include <kiconloader.h>
#include <klistview.h>
@@ -40,22 +40,22 @@ typedef const char* (*KeyFunc)(const char*);
/**
* To support bi-directional sorting, and sorting of text, integers etc. we
- * need a specialized version of QListViewItem.
+ * need a specialized version of TQListViewItem.
*/
class ProcessLVI : public KListViewItem
{
public:
- ProcessLVI(QListView* lv) : KListViewItem(lv) { }
- ProcessLVI(QListViewItem* lvi) : KListViewItem(lvi) { }
+ ProcessLVI(TQListView* lv) : KListViewItem(lv) { }
+ ProcessLVI(TQListViewItem* lvi) : KListViewItem(lvi) { }
- virtual int compare( QListViewItem *item, int column, bool ) const;
+ virtual int compare( TQListViewItem *item, int column, bool ) const;
};
class QPopupMenu;
/**
* This class implementes a table filled with information about the running
- * processes. The table is derived from QListView.
+ * processes. The table is derived from TQListView.
*/
class ProcessList : public KListView
{
@@ -74,14 +74,14 @@ public:
enum ColumnType { Text, Int, Float, Time };
/// The constructor.
- ProcessList(QWidget* parent = 0, const char* name = 0);
+ ProcessList(TQWidget* parent = 0, const char* name = 0);
/// The destructor.
~ProcessList();
void removeColumns();
- void addColumn(const QString& header, const QString& type);
+ void addColumn(const TQString& header, const TQString& type);
void setSortColumn(uint col, bool inc)
{
@@ -100,8 +100,8 @@ public:
return increasing;
}
- const QValueList<int>& getSelectedPIds();
- const QStringList& getSelectedAsStrings();
+ const TQValueList<int>& getSelectedPIds();
+ const TQStringList& getSelectedAsStrings();
/**
* The udpate function can be used to update the displayed process
@@ -109,7 +109,7 @@ public:
* case the list contains invalid or corrupted info, FALSE is
* returned.
*/
- bool update(const QString& list);
+ bool update(const TQString& list);
int columnType( uint col ) const;
@@ -120,8 +120,8 @@ public:
killSupported = supported;
}
- bool load(QDomElement& el);
- bool save(QDomDocument& doc, QDomElement& display);
+ bool load(TQDomElement& el);
+ bool save(TQDomDocument& doc, TQDomElement& display);
public slots:
void setTreeView(bool tv);
@@ -140,7 +140,7 @@ public slots:
void sortingChanged(int col);
- void handleRMBPressed(QListViewItem* lvi, const QPoint& p, int col);
+ void handleRMBPressed(TQListViewItem* lvi, const TQPoint& p, int col);
void sizeChanged(int, int, int)
{
@@ -166,7 +166,7 @@ signals:
void killProcess(int pid, int sig);
// This signal is emitted when process pid should be reniced.
- void reniceProcess(const QValueList<int> &pids, int niceValue);
+ void reniceProcess(const TQValueList<int> &pids, int niceValue);
void listModified(bool);
@@ -195,7 +195,7 @@ private:
/**
* This function constructs the list of processes for list
* mode. It's a straightforward appending operation to the
- * QListView widget.
+ * TQListView widget.
*/
void buildList();
@@ -224,7 +224,7 @@ private:
* removing processes from the process list an inserting them into
* the tree.
*/
- void extendTree(QPtrList<KSGRD::SensorPSLine>* pl, ProcessLVI* parent, int ppid);
+ void extendTree(TQPtrList<KSGRD::SensorPSLine>* pl, ProcessLVI* parent, int ppid);
/**
* This function adds a process to the list/tree.
@@ -247,24 +247,24 @@ private:
/* The following lists are primarily used to store table specs between
* load() and the actual table creation in addColumn(). */
- QValueList<int> savedWidth;
- QValueList<int> currentWidth;
- QValueList<int> index;
+ TQValueList<int> savedWidth;
+ TQValueList<int> currentWidth;
+ TQValueList<int> index;
- QPtrList<KSGRD::SensorPSLine> pl;
+ TQPtrList<KSGRD::SensorPSLine> pl;
- QStringList mColumnTypes;
- QDict<QString> columnDict;
+ TQStringList mColumnTypes;
+ TQDict<TQString> columnDict;
- QValueList<int> selectedPIds;
- QValueList<int> closedSubTrees;
- QStringList selectedAsStrings;
+ TQValueList<int> selectedPIds;
+ TQValueList<int> closedSubTrees;
+ TQStringList selectedAsStrings;
- static QDict<QString> aliases;
+ static TQDict<TQString> aliases;
- QDict<QPixmap> iconCache;
+ TQDict<TQPixmap> iconCache;
- QPopupMenu* headerPM;
+ TQPopupMenu* headerPM;
};
#endif
diff --git a/ksysguard/gui/SensorDisplayLib/ReniceDlg.cc b/ksysguard/gui/SensorDisplayLib/ReniceDlg.cc
index 39c05eecf..dfd535883 100644
--- a/ksysguard/gui/SensorDisplayLib/ReniceDlg.cc
+++ b/ksysguard/gui/SensorDisplayLib/ReniceDlg.cc
@@ -27,22 +27,22 @@
#include "ReniceDlg.moc"
-ReniceDlg::ReniceDlg(QWidget* parent, const char* name, int currentPPrio,
+ReniceDlg::ReniceDlg(TQWidget* parent, const char* name, int currentPPrio,
int pid)
: KDialogBase( parent, name, true, i18n("Renice Process"),
KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok, true )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- vLay = new QVBoxLayout(page, 20, -1, "ReniceLayout");
+ vLay = new TQVBoxLayout(page, 20, -1, "ReniceLayout");
- QString msg;
+ TQString msg;
msg = i18n("You are about to change the scheduling priority of\n"
"process %1. Be aware that only the Superuser (root)\n"
"can decrease the nice level of a process. The lower\n"
"the number is the higher the priority.\n\n"
"Please enter the desired nice level:").arg(pid);
- message = new QLabel(msg, page);
+ message = new TQLabel(msg, page);
message->setMinimumSize(message->sizeHint());
vLay->addWidget(message);
diff --git a/ksysguard/gui/SensorDisplayLib/ReniceDlg.h b/ksysguard/gui/SensorDisplayLib/ReniceDlg.h
index d8f0d2685..1d490973c 100644
--- a/ksysguard/gui/SensorDisplayLib/ReniceDlg.h
+++ b/ksysguard/gui/SensorDisplayLib/ReniceDlg.h
@@ -26,11 +26,11 @@
#define _ReniceDlg_h_
#include <kdialogbase.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlcdnumber.h>
-#include <qpushbutton.h>
-#include <qslider.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlcdnumber.h>
+#include <tqpushbutton.h>
+#include <tqslider.h>
class KIntNumInput;
@@ -43,18 +43,18 @@ class ReniceDlg : public KDialogBase
Q_OBJECT
public:
- ReniceDlg(QWidget* parent, const char* name, int currentPPrio, int pid);
+ ReniceDlg(TQWidget* parent, const char* name, int currentPPrio, int pid);
public slots:
void slotOk();
void slotCancel();
private:
- QBoxLayout* vLay;
- QBoxLayout* butLay;
- QBoxLayout* sldLay;
+ TQBoxLayout* vLay;
+ TQBoxLayout* butLay;
+ TQBoxLayout* sldLay;
- QLabel* message;
+ TQLabel* message;
KIntNumInput* input;
};
diff --git a/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc b/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc
index 805c9a492..c80ad65ee 100644
--- a/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc
+++ b/ksysguard/gui/SensorDisplayLib/SensorDisplay.cc
@@ -21,12 +21,12 @@
*/
-#include <qcheckbox.h>
-#include <qdom.h>
-#include <qpopupmenu.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
-#include <qbitmap.h>
+#include <tqcheckbox.h>
+#include <tqdom.h>
+#include <tqpopupmenu.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
+#include <tqbitmap.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -43,9 +43,9 @@
using namespace KSGRD;
-SensorDisplay::SensorDisplay( QWidget *parent, const char *name,
- const QString &title, bool nf, bool isApplet)
- : QWidget( parent, name )
+SensorDisplay::SensorDisplay( TQWidget *parent, const char *name,
+ const TQString &title, bool nf, bool isApplet)
+ : TQWidget( parent, name )
{
mIsApplet = isApplet;
mSensors.setAutoDelete( true );
@@ -61,10 +61,10 @@ SensorDisplay::SensorDisplay( QWidget *parent, const char *name,
mPlotterWdg = 0;
setTimerOn( true );
- QWhatsThis::add( this, "dummy" );
+ TQWhatsThis::add( this, "dummy" );
if(!nf) {
- mFrame = new QGroupBox( 2, Qt::Vertical, "", this, "displayFrame");
+ mFrame = new TQGroupBox( 2, Qt::Vertical, "", this, "displayFrame");
mFrame->setFlat(true);
mFrame->setAlignment(Qt::AlignHCenter);
mFrame->setInsideMargin(2);
@@ -101,7 +101,7 @@ void SensorDisplay::registerSensor( SensorProperties *sp )
* a case the user can re-enter the connect information and the
* connection will be established. */
if ( !SensorMgr->engageHost( sp->hostName() ) ) {
- QString msg = i18n( "It is impossible to connect to \'%1\'." ).arg( sp->hostName() );
+ TQString msg = i18n( "It is impossible to connect to \'%1\'." ).arg( sp->hostName() );
KMessageBox::error( this, msg );
}
@@ -140,24 +140,24 @@ void SensorDisplay::configureUpdateInterval()
}
}
-void SensorDisplay::timerEvent( QTimerEvent* )
+void SensorDisplay::timerEvent( TQTimerEvent* )
{
int i = 0;
for ( SensorProperties *s = mSensors.first(); s; s = mSensors.next(), ++i )
sendRequest( s->hostName(), s->name(), i );
}
-void SensorDisplay::resizeEvent( QResizeEvent* )
+void SensorDisplay::resizeEvent( TQResizeEvent* )
{
if(mFrame)
mFrame->setGeometry( rect() );
}
-bool SensorDisplay::eventFilter( QObject *object, QEvent *event )
+bool SensorDisplay::eventFilter( TQObject *object, TQEvent *event )
{
- if ( event->type() == QEvent::MouseButtonPress &&
- ( (QMouseEvent*)event)->button() == RightButton ) {
- QPopupMenu pm;
+ if ( event->type() == TQEvent::MouseButtonPress &&
+ ( (TQMouseEvent*)event)->button() == RightButton ) {
+ TQPopupMenu pm;
if ( mIsApplet ) {
pm.insertItem( i18n( "Launch &System Guard"), 1 );
pm.insertSeparator();
@@ -172,7 +172,7 @@ bool SensorDisplay::eventFilter( QObject *object, QEvent *event )
else
pm.insertItem( i18n( "P&ause Update" ), 6 );
- switch ( pm.exec( QCursor::pos() ) ) {
+ switch ( pm.exec( TQCursor::pos() ) ) {
case 1:
KRun::run(*KService::serviceByDesktopName("ksysguard"), KURL::List());
break;
@@ -180,7 +180,7 @@ bool SensorDisplay::eventFilter( QObject *object, QEvent *event )
configureSettings();
break;
case 3: {
- QCustomEvent *e = new QCustomEvent( QEvent::User );
+ TQCustomEvent *e = new TQCustomEvent( TQEvent::User );
e->setData( this );
kapp->postEvent( parent(), e );
}
@@ -199,16 +199,16 @@ bool SensorDisplay::eventFilter( QObject *object, QEvent *event )
}
return true;
- } else if ( event->type() == QEvent::MouseButtonRelease &&
- ( ( QMouseEvent*)event)->button() == LeftButton ) {
+ } else if ( event->type() == TQEvent::MouseButtonRelease &&
+ ( ( TQMouseEvent*)event)->button() == LeftButton ) {
setFocus();
}
- return QWidget::eventFilter( object, event );
+ return TQWidget::eventFilter( object, event );
}
-void SensorDisplay::sendRequest( const QString &hostName,
- const QString &command, int id )
+void SensorDisplay::sendRequest( const TQString &hostName,
+ const TQString &command, int id )
{
if ( !SensorMgr->sendRequest( hostName, command, (SensorClient*)this, id ) )
sensorError( id, true );
@@ -236,7 +236,7 @@ void SensorDisplay::sensorError( int sensorId, bool err )
void SensorDisplay::updateWhatsThis()
{
- QWhatsThis::add( this, i18n(
+ TQWhatsThis::add( this, i18n(
"<qt><p>This is a sensor display. To customize a sensor display click "
"and hold the right mouse button on either the frame or the "
"display box and select the <i>Properties</i> entry from the popup "
@@ -244,34 +244,34 @@ void SensorDisplay::updateWhatsThis()
"</p>%1</qt>" ).arg( additionalWhatsThis() ) );
}
-void SensorDisplay::hosts( QStringList& list )
+void SensorDisplay::hosts( TQStringList& list )
{
for ( SensorProperties *s = mSensors.first(); s; s = mSensors.next() )
if ( !list.contains( s->hostName() ) )
list.append( s->hostName() );
}
-QColor SensorDisplay::restoreColor( QDomElement &element, const QString &attr,
- const QColor& fallback )
+TQColor SensorDisplay::restoreColor( TQDomElement &element, const TQString &attr,
+ const TQColor& fallback )
{
bool ok;
uint c = element.attribute( attr ).toUInt( &ok );
if ( !ok )
return fallback;
else
- return QColor( (c >> 16) & 0xFF, (c >> 8) & 0xFF, c & 0xFF );
+ return TQColor( (c >> 16) & 0xFF, (c >> 8) & 0xFF, c & 0xFF );
}
-void SensorDisplay::saveColor( QDomElement &element, const QString &attr,
- const QColor &color )
+void SensorDisplay::saveColor( TQDomElement &element, const TQString &attr,
+ const TQColor &color )
{
int r, g, b;
color.rgb( &r, &g, &b );
element.setAttribute( attr, (r << 16) | (g << 8) | b );
}
-bool SensorDisplay::addSensor( const QString &hostName, const QString &name,
- const QString &type, const QString &description )
+bool SensorDisplay::addSensor( const TQString &hostName, const TQString &name,
+ const TQString &type, const TQString &description )
{
registerSensor( new SensorProperties( hostName, name, type, description ) );
return true;
@@ -315,9 +315,9 @@ bool SensorDisplay::useGlobalUpdateInterval() const
return mUseGlobalUpdateInterval;
}
-QString SensorDisplay::additionalWhatsThis()
+TQString SensorDisplay::additionalWhatsThis()
{
- return QString::null;
+ return TQString::null;
}
void SensorDisplay::sensorLost( int reqId )
@@ -325,20 +325,20 @@ void SensorDisplay::sensorLost( int reqId )
sensorError( reqId, true );
}
-bool SensorDisplay::restoreSettings( QDomElement &element )
+bool SensorDisplay::restoreSettings( TQDomElement &element )
{
- QString str = element.attribute( "showUnit", "X" );
+ TQString str = element.attribute( "showUnit", "X" );
if(!str.isEmpty() && str != "X") {
mShowUnit = str.toInt();
}
- str = element.attribute( "unit", QString::null );
+ str = element.attribute( "unit", TQString::null );
if(!str.isEmpty())
setUnit(str);
- str = element.attribute( "title", QString::null );
+ str = element.attribute( "title", TQString::null );
if(!str.isEmpty())
setTitle(str);
- if ( element.attribute( "updateInterval" ) != QString::null ) {
+ if ( element.attribute( "updateInterval" ) != TQString::null ) {
mUseGlobalUpdateInterval = false;
setUpdateInterval( element.attribute( "updateInterval", "2" ).toInt() );
} else {
@@ -360,7 +360,7 @@ bool SensorDisplay::restoreSettings( QDomElement &element )
return true;
}
-bool SensorDisplay::saveSettings( QDomDocument&, QDomElement &element, bool )
+bool SensorDisplay::saveSettings( TQDomDocument&, TQDomElement &element, bool )
{
element.setAttribute( "title", title() );
element.setAttribute( "unit", unit() );
@@ -404,7 +404,7 @@ bool SensorDisplay::modified() const
return mModified;
}
-QPtrList<SensorProperties> &SensorDisplay::sensors()
+TQPtrList<SensorProperties> &SensorDisplay::sensors()
{
return mSensors;
}
@@ -439,12 +439,12 @@ void SensorDisplay::setSensorOk( bool ok )
if ( mErrorIndicator )
return;
- QPixmap errorIcon = KGlobal::iconLoader()->loadIcon( "connect_creating", KIcon::Desktop,
+ TQPixmap errorIcon = KGlobal::iconLoader()->loadIcon( "connect_creating", KIcon::Desktop,
KIcon::SizeSmall );
if ( !mPlotterWdg )
return;
- mErrorIndicator = new QWidget( mPlotterWdg );
+ mErrorIndicator = new TQWidget( mPlotterWdg );
mErrorIndicator->setErasePixmap( errorIcon );
mErrorIndicator->resize( errorIcon.size() );
if ( errorIcon.mask() )
@@ -454,7 +454,7 @@ void SensorDisplay::setSensorOk( bool ok )
}
}
-void SensorDisplay::setTitle( const QString &title )
+void SensorDisplay::setTitle( const TQString &title )
{
mTitle = title;
@@ -465,7 +465,7 @@ void SensorDisplay::setTitle( const QString &title )
/* Changing the frame title may increase the width of the frame and
* hence breaks the layout. To avoid this, we save the original size
* and restore it after we have set the frame title. */
- QSize s = mFrame->size();
+ TQSize s = mFrame->size();
if ( mShowUnit && !mUnit.isEmpty() )
mFrame->setTitle( mTitle + " [" + mUnit + "]" );
@@ -474,17 +474,17 @@ void SensorDisplay::setTitle( const QString &title )
mFrame->setGeometry( 0, 0, s.width(), s.height() );
}
-QString SensorDisplay::title() const
+TQString SensorDisplay::title() const
{
return mTitle;
}
-void SensorDisplay::setUnit( const QString &unit )
+void SensorDisplay::setUnit( const TQString &unit )
{
mUnit = unit;
}
-QString SensorDisplay::unit() const
+TQString SensorDisplay::unit() const
{
return mUnit;
}
@@ -499,13 +499,13 @@ bool SensorDisplay::showUnit() const
return mShowUnit;
}
-void SensorDisplay::setPlotterWidget( QWidget *wdg )
+void SensorDisplay::setPlotterWidget( TQWidget *wdg )
{
mPlotterWdg = wdg;
}
-QWidget *SensorDisplay::frame()
+TQWidget *SensorDisplay::frame()
{
return mFrame;
}
@@ -520,9 +520,9 @@ bool SensorDisplay::noFrame() const
return !mFrame;
}
-void SensorDisplay::reorderSensors(const QValueList<int> &orderOfSensors)
+void SensorDisplay::reorderSensors(const TQValueList<int> &orderOfSensors)
{
- QPtrList<SensorProperties> newSensors;
+ TQPtrList<SensorProperties> newSensors;
for ( uint i = 0; i < orderOfSensors.count(); ++i ) {
newSensors.append( mSensors.at(orderOfSensors[i] ));
}
@@ -537,8 +537,8 @@ SensorProperties::SensorProperties()
{
}
-SensorProperties::SensorProperties( const QString &hostName, const QString &name,
- const QString &type, const QString &description )
+SensorProperties::SensorProperties( const TQString &hostName, const TQString &name,
+ const TQString &type, const TQString &description )
: mHostName( hostName ), mName( name ), mType( type ), mDescription( description )
{
mOk = false;
@@ -548,52 +548,52 @@ SensorProperties::~SensorProperties()
{
}
-void SensorProperties::setHostName( const QString &hostName )
+void SensorProperties::setHostName( const TQString &hostName )
{
mHostName = hostName;
}
-QString SensorProperties::hostName() const
+TQString SensorProperties::hostName() const
{
return mHostName;
}
-void SensorProperties::setName( const QString &name )
+void SensorProperties::setName( const TQString &name )
{
mName = name;
}
-QString SensorProperties::name() const
+TQString SensorProperties::name() const
{
return mName;
}
-void SensorProperties::setType( const QString &type )
+void SensorProperties::setType( const TQString &type )
{
mType = type;
}
-QString SensorProperties::type() const
+TQString SensorProperties::type() const
{
return mType;
}
-void SensorProperties::setDescription( const QString &description )
+void SensorProperties::setDescription( const TQString &description )
{
mDescription = description;
}
-QString SensorProperties::description() const
+TQString SensorProperties::description() const
{
return mDescription;
}
-void SensorProperties::setUnit( const QString &unit )
+void SensorProperties::setUnit( const TQString &unit )
{
mUnit = unit;
}
-QString SensorProperties::unit() const
+TQString SensorProperties::unit() const
{
return mUnit;
}
diff --git a/ksysguard/gui/SensorDisplayLib/SensorDisplay.h b/ksysguard/gui/SensorDisplayLib/SensorDisplay.h
index e5e867a01..72f1af543 100644
--- a/ksysguard/gui/SensorDisplayLib/SensorDisplay.h
+++ b/ksysguard/gui/SensorDisplayLib/SensorDisplay.h
@@ -24,10 +24,10 @@
#ifndef KSG_SENSORDISPLAY_H
#define KSG_SENSORDISPLAY_H
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qvaluelist.h>
-#include <qwidget.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
#include <knotifyclient.h>
@@ -48,7 +48,7 @@ class SensorProperties;
more sensors in any form. It must be inherited by all displays that
should be inserted into the work sheet.
*/
-class SensorDisplay : public QWidget, public SensorClient
+class SensorDisplay : public TQWidget, public SensorClient
{
Q_OBJECT
@@ -56,8 +56,8 @@ class SensorDisplay : public QWidget, public SensorClient
/**
Constructor.
*/
- SensorDisplay( QWidget *parent = 0, const char *name = 0,
- const QString& title = 0, bool nf = false, bool isApplet = false );
+ SensorDisplay( TQWidget *parent = 0, const char *name = 0,
+ const TQString& title = 0, bool nf = false, bool isApplet = false );
/**
Destructor.
@@ -67,22 +67,22 @@ class SensorDisplay : public QWidget, public SensorClient
/**
Sets the title of the display.
*/
- void setTitle( const QString &title );
+ void setTitle( const TQString &title );
/**
Returns the title of the display.
*/
- QString title() const;
+ TQString title() const;
/**
Sets the unit of the display.
*/
- void setUnit( const QString &unit );
+ void setUnit( const TQString &unit );
/**
Returns the unit of the display.
*/
- QString unit() const;
+ TQString unit() const;
/**
Sets whether the unit string should be displayed at the top
@@ -123,17 +123,17 @@ class SensorDisplay : public QWidget, public SensorClient
/**
This method appends all hosts of the display to @ref list.
*/
- void hosts( QStringList& list );
+ void hosts( TQStringList& list );
/**
Sets the widget on which the error icon can be drawn.
*/
- void setPlotterWidget( QWidget *plotter );
+ void setPlotterWidget( TQWidget *plotter );
/**
Returns the widget on which the error icon can be drawn.
*/
- QWidget *plotterWidget() const;
+ TQWidget *plotterWidget() const;
/**
Add a sensor to the display.
@@ -143,8 +143,8 @@ class SensorDisplay : public QWidget, public SensorClient
@param type The type of the sensor.
@param description A short description of the sensor.
*/
- virtual bool addSensor( const QString &hostName, const QString &name,
- const QString &type, const QString &description );
+ virtual bool addSensor( const TQString &hostName, const TQString &name,
+ const TQString &type, const TQString &description );
/**
Removes the sensor from the display, that is at the position
@@ -158,7 +158,7 @@ class SensorDisplay : public QWidget, public SensorClient
a request to a sensor since it performs an appropriate error
handling by removing the display of necessary.
*/
- void sendRequest( const QString &hostName, const QString &cmd, int id );
+ void sendRequest( const TQString &hostName, const TQString &cmd, int id );
/**
Raises the configure dialog to setup the update interval.
@@ -180,12 +180,12 @@ class SensorDisplay : public QWidget, public SensorClient
/**
Reimplement this method to setup the display from config data.
*/
- virtual bool restoreSettings( QDomElement& );
+ virtual bool restoreSettings( TQDomElement& );
/**
Reimplement this method to save the displays config data.
*/
- virtual bool saveSettings( QDomDocument&, QDomElement&, bool = true );
+ virtual bool saveSettings( TQDomDocument&, TQDomElement&, bool = true );
/**
Reimplement this method to catch error messages from the SensorManager.
@@ -237,32 +237,32 @@ class SensorDisplay : public QWidget, public SensorClient
void modified( bool modified );
protected:
- virtual bool eventFilter( QObject*, QEvent* );
- virtual void resizeEvent( QResizeEvent* );
- virtual void timerEvent( QTimerEvent* );
+ virtual bool eventFilter( TQObject*, TQEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual void timerEvent( TQTimerEvent* );
void registerSensor( SensorProperties *sp );
void unregisterSensor( uint pos );
- QColor restoreColor( QDomElement &element, const QString &attr,
- const QColor& fallback );
- void saveColor( QDomElement &element, const QString &attr,
- const QColor &color );
+ TQColor restoreColor( TQDomElement &element, const TQString &attr,
+ const TQColor& fallback );
+ void saveColor( TQDomElement &element, const TQString &attr,
+ const TQColor &color );
- virtual QString additionalWhatsThis();
+ virtual TQString additionalWhatsThis();
void setSensorOk( bool ok );
bool modified() const;
bool timerOn() const;
- QWidget *frame();
+ TQWidget *frame();
// void setNoFrame( bool value );
bool noFrame() const;
- void reorderSensors(const QValueList<int> &orderOfSensors);
- QPtrList<SensorProperties> &sensors();
+ void reorderSensors(const TQValueList<int> &orderOfSensors);
+ TQPtrList<SensorProperties> &sensors();
private:
void updateWhatsThis();
@@ -277,49 +277,49 @@ class SensorDisplay : public QWidget, public SensorClient
int mUpdateInterval;
// The frame around the other widgets.
- QGroupBox* mFrame;
+ TQGroupBox* mFrame;
- QPtrList<SensorProperties> mSensors;
+ TQPtrList<SensorProperties> mSensors;
- QString mTitle;
- QString mUnit;
+ TQString mTitle;
+ TQString mUnit;
- QWidget* mErrorIndicator;
- QWidget* mPlotterWdg;
+ TQWidget* mErrorIndicator;
+ TQWidget* mPlotterWdg;
};
class SensorProperties
{
public:
SensorProperties();
- SensorProperties( const QString &hostName, const QString &name,
- const QString &type, const QString &description );
+ SensorProperties( const TQString &hostName, const TQString &name,
+ const TQString &type, const TQString &description );
~SensorProperties();
- void setHostName( const QString &hostName );
- QString hostName() const;
+ void setHostName( const TQString &hostName );
+ TQString hostName() const;
- void setName( const QString &name );
- QString name() const;
+ void setName( const TQString &name );
+ TQString name() const;
- void setType( const QString &type );
- QString type() const;
+ void setType( const TQString &type );
+ TQString type() const;
- void setDescription( const QString &description );
- QString description() const;
+ void setDescription( const TQString &description );
+ TQString description() const;
- void setUnit( const QString &unit );
- QString unit() const;
+ void setUnit( const TQString &unit );
+ TQString unit() const;
void setIsOk( bool value );
bool isOk() const;
private:
- QString mHostName;
- QString mName;
- QString mType;
- QString mDescription;
- QString mUnit;
+ TQString mHostName;
+ TQString mName;
+ TQString mType;
+ TQString mDescription;
+ TQString mUnit;
/* This flag indicates whether the communication to the sensor is
* ok or not. */
diff --git a/ksysguard/gui/SensorDisplayLib/SensorLogger.cc b/ksysguard/gui/SensorDisplayLib/SensorLogger.cc
index b51ba67e0..383bf525e 100644
--- a/ksysguard/gui/SensorDisplayLib/SensorLogger.cc
+++ b/ksysguard/gui/SensorDisplayLib/SensorLogger.cc
@@ -25,17 +25,17 @@
#include <ksgrd/SensorManager.h>
#include <ksgrd/StyleEngine.h>
-#include <qfile.h>
+#include <tqfile.h>
#include "SensorLogger.moc"
#include "SensorLoggerSettings.h"
-SLListViewItem::SLListViewItem(QListView *parent)
- : QListViewItem(parent)
+SLListViewItem::SLListViewItem(TQListView *parent)
+ : TQListViewItem(parent)
{
}
-LogSensor::LogSensor(QListView *parent)
+LogSensor::LogSensor(TQListView *parent)
: timerID( NONE ), lowerLimitActive( 0 ), upperLimitActive( 0 ),
lowerLimit( 0 ), upperLimit( 0 )
{
@@ -78,15 +78,15 @@ LogSensor::stopLogging(void)
}
void
-LogSensor::timerEvent(QTimerEvent*)
+LogSensor::timerEvent(TQTimerEvent*)
{
KSGRD::SensorMgr->sendRequest(hostName, sensorName, (KSGRD::SensorClient*) this, 42);
}
void
-LogSensor::answerReceived(int id, const QString& answer)
+LogSensor::answerReceived(int id, const TQString& answer)
{
- QFile logFile(fileName);
+ TQFile logFile(fileName);
if (!logFile.open(IO_ReadWrite | IO_Append))
{
@@ -97,7 +97,7 @@ LogSensor::answerReceived(int id, const QString& answer)
switch (id)
{
case 42: {
- QTextStream stream(&logFile);
+ TQTextStream stream(&logFile);
double value = answer.toDouble();
if (lowerLimitActive && value < lowerLimit)
@@ -106,7 +106,7 @@ LogSensor::answerReceived(int id, const QString& answer)
lowerLimitActive = false;
lvi->setTextColor(monitor->colorGroup().foreground());
lvi->repaint();
- KNotifyClient::event(monitor->winId(), "sensor_alarm", QString("sensor '%1' at '%2' reached lower limit").arg(sensorName).arg(hostName));
+ KNotifyClient::event(monitor->winId(), "sensor_alarm", TQString("sensor '%1' at '%2' reached lower limit").arg(sensorName).arg(hostName));
timerOn();
} else if (upperLimitActive && value > upperLimit)
{
@@ -114,23 +114,23 @@ LogSensor::answerReceived(int id, const QString& answer)
upperLimitActive = false;
lvi->setTextColor(monitor->colorGroup().foreground());
lvi->repaint();
- KNotifyClient::event(monitor->winId(), "sensor_alarm", QString("sensor '%1' at '%2' reached upper limit").arg(sensorName).arg(hostName));
+ KNotifyClient::event(monitor->winId(), "sensor_alarm", TQString("sensor '%1' at '%2' reached upper limit").arg(sensorName).arg(hostName));
timerOn();
}
- QDate date = QDateTime::currentDateTime().date();
- QTime time = QDateTime::currentDateTime().time();
+ TQDate date = TQDateTime::currentDateTime().date();
+ TQTime time = TQDateTime::currentDateTime().time();
- stream << QString("%1 %2 %3 %4 %5: %6\n").arg(date.shortMonthName(date.month())).arg(date.day()).arg(time.toString()).arg(hostName).arg(sensorName).arg(value);
+ stream << TQString("%1 %2 %3 %4 %5: %6\n").arg(date.shortMonthName(date.month())).arg(date.day()).arg(time.toString()).arg(hostName).arg(sensorName).arg(value);
}
}
logFile.close();
}
-SensorLogger::SensorLogger(QWidget *parent, const char *name, const QString& title)
+SensorLogger::SensorLogger(TQWidget *parent, const char *name, const TQString& title)
: KSGRD::SensorDisplay(parent, name, title)
{
- monitor = new QListView(this, "monitor");
+ monitor = new TQListView(this, "monitor");
Q_CHECK_PTR(monitor);
monitor->addColumn(i18n("Logging"));
@@ -139,14 +139,14 @@ SensorLogger::SensorLogger(QWidget *parent, const char *name, const QString& tit
monitor->addColumn(i18n("Host Name"));
monitor->addColumn(i18n("Log File"));
- QColorGroup cgroup = monitor->colorGroup();
- cgroup.setColor(QColorGroup::Text, KSGRD::Style->firstForegroundColor());
- cgroup.setColor(QColorGroup::Base, KSGRD::Style->backgroundColor());
- cgroup.setColor(QColorGroup::Foreground, KSGRD::Style->alarmColor());
- monitor->setPalette(QPalette(cgroup, cgroup, cgroup));
- monitor->setSelectionMode(QListView::NoSelection);
+ TQColorGroup cgroup = monitor->colorGroup();
+ cgroup.setColor(TQColorGroup::Text, KSGRD::Style->firstForegroundColor());
+ cgroup.setColor(TQColorGroup::Base, KSGRD::Style->backgroundColor());
+ cgroup.setColor(TQColorGroup::Foreground, KSGRD::Style->alarmColor());
+ monitor->setPalette(TQPalette(cgroup, cgroup, cgroup));
+ monitor->setSelectionMode(TQListView::NoSelection);
- connect(monitor, SIGNAL(rightButtonClicked(QListViewItem*, const QPoint&, int)), this, SLOT(RMBClicked(QListViewItem*, const QPoint&, int)));
+ connect(monitor, TQT_SIGNAL(rightButtonClicked(TQListViewItem*, const TQPoint&, int)), this, TQT_SLOT(RMBClicked(TQListViewItem*, const TQPoint&, int)));
setTitle(i18n("Sensor Logger"));
@@ -163,7 +163,7 @@ SensorLogger::~SensorLogger(void)
}
bool
-SensorLogger::addSensor(const QString& hostName, const QString& sensorName, const QString& sensorType, const QString&)
+SensorLogger::addSensor(const TQString& hostName, const TQString& sensorName, const TQString& sensorType, const TQString&)
{
if (sensorType != "integer" && sensorType != "float")
return (false);
@@ -232,12 +232,12 @@ SensorLogger::editSensor(LogSensor* sensor)
void
SensorLogger::configureSettings()
{
- QColorGroup cgroup = monitor->colorGroup();
+ TQColorGroup cgroup = monitor->colorGroup();
sls = new SensorLoggerSettings(this, "SensorLoggerSettings");
Q_CHECK_PTR(sls);
- connect( sls, SIGNAL( applyClicked() ), SLOT( applySettings() ) );
+ connect( sls, TQT_SIGNAL( applyClicked() ), TQT_SLOT( applySettings() ) );
sls->setTitle(title());
sls->setForegroundColor(cgroup.text());
@@ -254,14 +254,14 @@ SensorLogger::configureSettings()
void
SensorLogger::applySettings()
{
- QColorGroup cgroup = monitor->colorGroup();
+ TQColorGroup cgroup = monitor->colorGroup();
setTitle(sls->title());
- cgroup.setColor(QColorGroup::Text, sls->foregroundColor());
- cgroup.setColor(QColorGroup::Base, sls->backgroundColor());
- cgroup.setColor(QColorGroup::Foreground, sls->alarmColor());
- monitor->setPalette(QPalette(cgroup, cgroup, cgroup));
+ cgroup.setColor(TQColorGroup::Text, sls->foregroundColor());
+ cgroup.setColor(TQColorGroup::Base, sls->backgroundColor());
+ cgroup.setColor(TQColorGroup::Foreground, sls->alarmColor());
+ monitor->setPalette(TQPalette(cgroup, cgroup, cgroup));
setModified(true);
}
@@ -269,31 +269,31 @@ SensorLogger::applySettings()
void
SensorLogger::applyStyle(void)
{
- QColorGroup cgroup = monitor->colorGroup();
+ TQColorGroup cgroup = monitor->colorGroup();
- cgroup.setColor(QColorGroup::Text, KSGRD::Style->firstForegroundColor());
- cgroup.setColor(QColorGroup::Base, KSGRD::Style->backgroundColor());
- cgroup.setColor(QColorGroup::Foreground, KSGRD::Style->alarmColor());
- monitor->setPalette(QPalette(cgroup, cgroup, cgroup));
+ cgroup.setColor(TQColorGroup::Text, KSGRD::Style->firstForegroundColor());
+ cgroup.setColor(TQColorGroup::Base, KSGRD::Style->backgroundColor());
+ cgroup.setColor(TQColorGroup::Foreground, KSGRD::Style->alarmColor());
+ monitor->setPalette(TQPalette(cgroup, cgroup, cgroup));
setModified(true);
}
bool
-SensorLogger::restoreSettings(QDomElement& element)
+SensorLogger::restoreSettings(TQDomElement& element)
{
- QColorGroup cgroup = monitor->colorGroup();
+ TQColorGroup cgroup = monitor->colorGroup();
- cgroup.setColor(QColorGroup::Text, restoreColor(element, "textColor", Qt::green));
- cgroup.setColor(QColorGroup::Base, restoreColor(element, "backgroundColor", Qt::black));
- cgroup.setColor(QColorGroup::Foreground, restoreColor(element, "alarmColor", Qt::red));
- monitor->setPalette(QPalette(cgroup, cgroup, cgroup));
+ cgroup.setColor(TQColorGroup::Text, restoreColor(element, "textColor", Qt::green));
+ cgroup.setColor(TQColorGroup::Base, restoreColor(element, "backgroundColor", Qt::black));
+ cgroup.setColor(TQColorGroup::Foreground, restoreColor(element, "alarmColor", Qt::red));
+ monitor->setPalette(TQPalette(cgroup, cgroup, cgroup));
logSensors.clear();
- QDomNodeList dnList = element.elementsByTagName("logsensors");
+ TQDomNodeList dnList = element.elementsByTagName("logsensors");
for (uint i = 0; i < dnList.count(); i++) {
- QDomElement element = dnList.item(i).toElement();
+ TQDomElement element = dnList.item(i).toElement();
LogSensor* sensor = new LogSensor(monitor);
Q_CHECK_PTR(sensor);
@@ -317,7 +317,7 @@ SensorLogger::restoreSettings(QDomElement& element)
}
bool
-SensorLogger::saveSettings(QDomDocument& doc, QDomElement& element, bool save)
+SensorLogger::saveSettings(TQDomDocument& doc, TQDomElement& element, bool save)
{
saveColor(element, "textColor", monitor->colorGroup().text());
saveColor(element, "backgroundColor", monitor->colorGroup().base());
@@ -325,15 +325,15 @@ SensorLogger::saveSettings(QDomDocument& doc, QDomElement& element, bool save)
for (LogSensor* sensor = logSensors.first(); sensor != 0; sensor = logSensors.next())
{
- QDomElement log = doc.createElement("logsensors");
+ TQDomElement log = doc.createElement("logsensors");
log.setAttribute("sensorName", sensor->getSensorName());
log.setAttribute("hostName", sensor->getHostName());
log.setAttribute("fileName", sensor->getFileName());
log.setAttribute("timerInterval", sensor->getTimerInterval());
- log.setAttribute("lowerLimitActive", QString("%1").arg(sensor->getLowerLimitActive()));
- log.setAttribute("lowerLimit", QString("%1").arg(sensor->getLowerLimit()));
- log.setAttribute("upperLimitActive", QString("%1").arg(sensor->getUpperLimitActive()));
- log.setAttribute("upperLimit", QString("%1").arg(sensor->getUpperLimit()));
+ log.setAttribute("lowerLimitActive", TQString("%1").arg(sensor->getLowerLimitActive()));
+ log.setAttribute("lowerLimit", TQString("%1").arg(sensor->getLowerLimit()));
+ log.setAttribute("upperLimitActive", TQString("%1").arg(sensor->getUpperLimitActive()));
+ log.setAttribute("upperLimit", TQString("%1").arg(sensor->getUpperLimit()));
element.appendChild(log);
}
@@ -347,20 +347,20 @@ SensorLogger::saveSettings(QDomDocument& doc, QDomElement& element, bool save)
}
void
-SensorLogger::answerReceived(int, const QString&)
+SensorLogger::answerReceived(int, const TQString&)
{
// we do not use this, since all answers are received by the LogSensors
}
void
-SensorLogger::resizeEvent(QResizeEvent*)
+SensorLogger::resizeEvent(TQResizeEvent*)
{
frame()->setGeometry(0, 0, this->width(), this->height());
monitor->setGeometry(10, 20, this->width() - 20, this->height() - 30);
}
LogSensor*
-SensorLogger::getLogSensor(QListViewItem* item)
+SensorLogger::getLogSensor(TQListViewItem* item)
{
for (LogSensor* sensor = logSensors.first(); sensor != 0; sensor = logSensors.next())
{
@@ -373,9 +373,9 @@ SensorLogger::getLogSensor(QListViewItem* item)
}
void
-SensorLogger::RMBClicked(QListViewItem* item, const QPoint& point, int)
+SensorLogger::RMBClicked(TQListViewItem* item, const TQPoint& point, int)
{
- QPopupMenu pm;
+ TQPopupMenu pm;
if (hasSettingsDialog())
pm.insertItem(i18n("&Properties"), 1);
pm.insertItem(i18n("&Remove Display"), 2);
@@ -404,7 +404,7 @@ SensorLogger::RMBClicked(QListViewItem* item, const QPoint& point, int)
configureSettings();
break;
case 2: {
- QCustomEvent* ev = new QCustomEvent(QEvent::User);
+ TQCustomEvent* ev = new TQCustomEvent(TQEvent::User);
ev->setData(this);
kapp->postEvent(parent(), ev);
break;
diff --git a/ksysguard/gui/SensorDisplayLib/SensorLogger.h b/ksysguard/gui/SensorDisplayLib/SensorLogger.h
index 835e62401..018e36bf9 100644
--- a/ksysguard/gui/SensorDisplayLib/SensorLogger.h
+++ b/ksysguard/gui/SensorDisplayLib/SensorLogger.h
@@ -21,13 +21,13 @@
#ifndef _SensorLogger_h
#define _SensorLogger_h
-#include <qdom.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qpopupmenu.h>
-#include <qspinbox.h>
-#include <qstring.h>
+#include <tqdom.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqpopupmenu.h>
+#include <tqspinbox.h>
+#include <tqstring.h>
#include <SensorDisplay.h>
@@ -40,35 +40,35 @@ class SensorLoggerSettings;
class SLListViewItem : public QListViewItem
{
public:
- SLListViewItem(QListView *parent = 0);
+ SLListViewItem(TQListView *parent = 0);
- void setTextColor(const QColor& color) { textColor = color; }
+ void setTextColor(const TQColor& color) { textColor = color; }
- void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment) {
- QColorGroup cgroup(cg);
- cgroup.setColor(QColorGroup::Text, textColor);
- QListViewItem::paintCell(p, cgroup, column, width, alignment);
+ void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int alignment) {
+ TQColorGroup cgroup(cg);
+ cgroup.setColor(TQColorGroup::Text, textColor);
+ TQListViewItem::paintCell(p, cgroup, column, width, alignment);
}
- void paintFocus(QPainter *, const QColorGroup, const QRect) {}
+ void paintFocus(TQPainter *, const TQColorGroup, const TQRect) {}
private:
- QColor textColor;
+ TQColor textColor;
};
-class LogSensor : public QObject, public KSGRD::SensorClient
+class LogSensor : public TQObject, public KSGRD::SensorClient
{
Q_OBJECT
public:
- LogSensor(QListView *parent);
+ LogSensor(TQListView *parent);
~LogSensor(void);
- void answerReceived(int id, const QString& answer);
+ void answerReceived(int id, const TQString& answer);
- void setHostName(const QString& name) { hostName = name; lvi->setText(3, name); }
- void setSensorName(const QString& name) { sensorName = name; lvi->setText(2, name); }
- void setFileName(const QString& name)
+ void setHostName(const TQString& name) { hostName = name; lvi->setText(3, name); }
+ void setSensorName(const TQString& name) { sensorName = name; lvi->setText(2, name); }
+ void setFileName(const TQString& name)
{
fileName = name;
lvi->setText(4, name);
@@ -87,18 +87,18 @@ public:
timerOn();
}
- lvi->setText(1, QString("%1").arg(interval));
+ lvi->setText(1, TQString("%1").arg(interval));
}
- QString getSensorName(void) { return sensorName; }
- QString getHostName(void) { return hostName; }
- QString getFileName(void) { return fileName; }
+ TQString getSensorName(void) { return sensorName; }
+ TQString getHostName(void) { return hostName; }
+ TQString getFileName(void) { return fileName; }
int getTimerInterval(void) { return timerInterval; }
bool getUpperLimitActive(void) { return upperLimitActive; }
bool getLowerLimitActive(void) { return lowerLimitActive; }
double getUpperLimit(void) { return upperLimit; }
double getLowerLimit(void) { return lowerLimit; }
- QListViewItem* getListViewItem(void) { return lvi; }
+ TQListViewItem* getListViewItem(void) { return lvi; }
public slots:
void timerOff()
@@ -118,16 +118,16 @@ public slots:
void stopLogging(void);
protected:
- virtual void timerEvent(QTimerEvent*);
+ virtual void timerEvent(TQTimerEvent*);
private:
- QListView* monitor;
+ TQListView* monitor;
SLListViewItem* lvi;
- QPixmap pixmap_running;
- QPixmap pixmap_waiting;
- QString sensorName;
- QString hostName;
- QString fileName;
+ TQPixmap pixmap_running;
+ TQPixmap pixmap_waiting;
+ TQString sensorName;
+ TQString hostName;
+ TQString fileName;
int timerInterval;
int timerID;
@@ -143,19 +143,19 @@ class SensorLogger : public KSGRD::SensorDisplay
{
Q_OBJECT
public:
- SensorLogger(QWidget *parent = 0, const char *name = 0, const QString& title = 0);
+ SensorLogger(TQWidget *parent = 0, const char *name = 0, const TQString& title = 0);
~SensorLogger(void);
- bool addSensor(const QString& hostName, const QString& sensorName, const QString& sensorType,
- const QString& sensorDescr);
+ bool addSensor(const TQString& hostName, const TQString& sensorName, const TQString& sensorType,
+ const TQString& sensorDescr);
bool editSensor(LogSensor*);
- void answerReceived(int id, const QString& answer);
- void resizeEvent(QResizeEvent*);
+ void answerReceived(int id, const TQString& answer);
+ void resizeEvent(TQResizeEvent*);
- bool restoreSettings(QDomElement& element);
- bool saveSettings(QDomDocument& doc, QDomElement& element, bool save = true);
+ bool restoreSettings(TQDomElement& element);
+ bool saveSettings(TQDomDocument& doc, TQDomElement& element, bool save = true);
void configureSettings(void);
@@ -167,15 +167,15 @@ public:
public slots:
void applySettings();
void applyStyle();
- void RMBClicked(QListViewItem*, const QPoint&, int);
+ void RMBClicked(TQListViewItem*, const TQPoint&, int);
protected:
- LogSensor* getLogSensor(QListViewItem*);
+ LogSensor* getLogSensor(TQListViewItem*);
private:
- QListView* monitor;
+ TQListView* monitor;
- QPtrList<LogSensor> logSensors;
+ TQPtrList<LogSensor> logSensors;
SensorLoggerDlg *sld;
SensorLoggerSettings *sls;
diff --git a/ksysguard/gui/SensorDisplayLib/SensorLoggerDlg.cc b/ksysguard/gui/SensorDisplayLib/SensorLoggerDlg.cc
index f07b55ae4..a6f686db3 100644
--- a/ksysguard/gui/SensorDisplayLib/SensorLoggerDlg.cc
+++ b/ksysguard/gui/SensorDisplayLib/SensorLoggerDlg.cc
@@ -20,17 +20,17 @@
#include "SensorLoggerDlg.h"
#include "SensorLoggerDlgWidget.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <klocale.h>
-SensorLoggerDlg::SensorLoggerDlg( QWidget *parent, const char *name )
+SensorLoggerDlg::SensorLoggerDlg( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Sensor Logger" ),
Ok|Cancel, Ok, true )
{
- QWidget *main = new QWidget( this );
+ TQWidget *main = new TQWidget( this );
- QVBoxLayout *topLayout = new QVBoxLayout( main, 0, KDialog::spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( main, 0, KDialog::spacingHint() );
m_loggerWidget = new SensorLoggerDlgWidget( main, "m_loggerWidget" );
topLayout->addWidget( m_loggerWidget );
@@ -39,7 +39,7 @@ SensorLoggerDlg::SensorLoggerDlg( QWidget *parent, const char *name )
setMainWidget( main );
}
-QString SensorLoggerDlg::fileName() const
+TQString SensorLoggerDlg::fileName() const
{
return m_loggerWidget->fileName();
}
@@ -69,7 +69,7 @@ double SensorLoggerDlg::upperLimit() const
return m_loggerWidget->upperLimit();
}
-void SensorLoggerDlg::setFileName( const QString &url )
+void SensorLoggerDlg::setFileName( const TQString &url )
{
m_loggerWidget->setFileName( url );
}
diff --git a/ksysguard/gui/SensorDisplayLib/SensorLoggerDlg.h b/ksysguard/gui/SensorDisplayLib/SensorLoggerDlg.h
index 3af8290c8..e5061c722 100644
--- a/ksysguard/gui/SensorDisplayLib/SensorLoggerDlg.h
+++ b/ksysguard/gui/SensorDisplayLib/SensorLoggerDlg.h
@@ -23,8 +23,8 @@
#include <kdialogbase.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
class SensorLoggerDlgWidget;
@@ -34,16 +34,16 @@ class SensorLoggerDlg : public KDialogBase
public:
- SensorLoggerDlg( QWidget *parent=0, const char *name=0 );
+ SensorLoggerDlg( TQWidget *parent=0, const char *name=0 );
- QString fileName() const;
+ TQString fileName() const;
int timerInterval() const;
bool lowerLimitActive() const;
bool upperLimitActive() const;
double lowerLimit() const;
double upperLimit() const;
- void setFileName( const QString & );
+ void setFileName( const TQString & );
void setTimerInterval( int );
void setLowerLimitActive( bool );
void setUpperLimitActive( bool );
diff --git a/ksysguard/gui/SensorDisplayLib/SensorLoggerDlgWidget.ui.h b/ksysguard/gui/SensorDisplayLib/SensorLoggerDlgWidget.ui.h
index afe0767e9..ad1f2687b 100644
--- a/ksysguard/gui/SensorDisplayLib/SensorLoggerDlgWidget.ui.h
+++ b/ksysguard/gui/SensorDisplayLib/SensorLoggerDlgWidget.ui.h
@@ -17,7 +17,7 @@ void SensorLoggerDlgWidget::init()
}
-QString SensorLoggerDlgWidget::fileName()
+TQString SensorLoggerDlgWidget::fileName()
{
return m_fileName->url();
}
@@ -53,7 +53,7 @@ double SensorLoggerDlgWidget::upperLimit()
}
-void SensorLoggerDlgWidget::setFileName( const QString &url )
+void SensorLoggerDlgWidget::setFileName( const TQString &url )
{
m_fileName->setURL(url);
}
@@ -73,7 +73,7 @@ void SensorLoggerDlgWidget::setLowerLimitActive( bool b )
void SensorLoggerDlgWidget::setLowerLimit( double d )
{
- m_lowerLimit->setText(QString("%1").arg(d));
+ m_lowerLimit->setText(TQString("%1").arg(d));
}
@@ -85,5 +85,5 @@ void SensorLoggerDlgWidget::setUpperLimitActive( bool b )
void SensorLoggerDlgWidget::setUpperLimit( double d )
{
- m_upperLimit->setText(QString("%1").arg(d));
+ m_upperLimit->setText(TQString("%1").arg(d));
}
diff --git a/ksysguard/gui/SensorDisplayLib/SensorLoggerSettings.cc b/ksysguard/gui/SensorDisplayLib/SensorLoggerSettings.cc
index 568108547..2935242fd 100644
--- a/ksysguard/gui/SensorDisplayLib/SensorLoggerSettings.cc
+++ b/ksysguard/gui/SensorDisplayLib/SensorLoggerSettings.cc
@@ -22,7 +22,7 @@
#include <klocale.h>
-SensorLoggerSettings::SensorLoggerSettings( QWidget *parent, const char *name )
+SensorLoggerSettings::SensorLoggerSettings( TQWidget *parent, const char *name )
: KDialogBase( parent, name, true, i18n( "Sensor Logger Settings" ),
Ok|Apply|Cancel, Ok, true )
{
@@ -30,42 +30,42 @@ SensorLoggerSettings::SensorLoggerSettings( QWidget *parent, const char *name )
setMainWidget( m_settingsWidget );
}
-QString SensorLoggerSettings::title()
+TQString SensorLoggerSettings::title()
{
return m_settingsWidget->title();
}
-QColor SensorLoggerSettings::foregroundColor()
+TQColor SensorLoggerSettings::foregroundColor()
{
return m_settingsWidget->foregroundColor();
}
-QColor SensorLoggerSettings::backgroundColor()
+TQColor SensorLoggerSettings::backgroundColor()
{
return m_settingsWidget->backgroundColor();
}
-QColor SensorLoggerSettings::alarmColor()
+TQColor SensorLoggerSettings::alarmColor()
{
return m_settingsWidget->alarmColor();
}
-void SensorLoggerSettings::setTitle( const QString &title )
+void SensorLoggerSettings::setTitle( const TQString &title )
{
m_settingsWidget->setTitle( title );
}
-void SensorLoggerSettings::setBackgroundColor( const QColor &c )
+void SensorLoggerSettings::setBackgroundColor( const TQColor &c )
{
m_settingsWidget->setBackgroundColor( c );
}
-void SensorLoggerSettings::setForegroundColor( const QColor &c )
+void SensorLoggerSettings::setForegroundColor( const TQColor &c )
{
m_settingsWidget->setForegroundColor( c );
}
-void SensorLoggerSettings::setAlarmColor( const QColor &c )
+void SensorLoggerSettings::setAlarmColor( const TQColor &c )
{
m_settingsWidget->setAlarmColor( c );
}
diff --git a/ksysguard/gui/SensorDisplayLib/SensorLoggerSettings.h b/ksysguard/gui/SensorDisplayLib/SensorLoggerSettings.h
index 639f55944..e3f937166 100644
--- a/ksysguard/gui/SensorDisplayLib/SensorLoggerSettings.h
+++ b/ksysguard/gui/SensorDisplayLib/SensorLoggerSettings.h
@@ -23,8 +23,8 @@
#include <kdialogbase.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqcolor.h>
class SensorLoggerSettingsWidget;
@@ -34,17 +34,17 @@ class SensorLoggerSettings : public KDialogBase
public:
- SensorLoggerSettings( QWidget *parent=0, const char *name=0 );
+ SensorLoggerSettings( TQWidget *parent=0, const char *name=0 );
- QString title();
- QColor foregroundColor();
- QColor backgroundColor();
- QColor alarmColor();
+ TQString title();
+ TQColor foregroundColor();
+ TQColor backgroundColor();
+ TQColor alarmColor();
- void setTitle( const QString & );
- void setForegroundColor( const QColor & );
- void setBackgroundColor( const QColor & );
- void setAlarmColor( const QColor & );
+ void setTitle( const TQString & );
+ void setForegroundColor( const TQColor & );
+ void setBackgroundColor( const TQColor & );
+ void setAlarmColor( const TQColor & );
private:
diff --git a/ksysguard/gui/SensorDisplayLib/SensorLoggerSettingsWidget.ui.h b/ksysguard/gui/SensorDisplayLib/SensorLoggerSettingsWidget.ui.h
index 751366466..a655a1751 100644
--- a/ksysguard/gui/SensorDisplayLib/SensorLoggerSettingsWidget.ui.h
+++ b/ksysguard/gui/SensorDisplayLib/SensorLoggerSettingsWidget.ui.h
@@ -8,49 +8,49 @@
*****************************************************************************/
-QString SensorLoggerSettingsWidget::title()
+TQString SensorLoggerSettingsWidget::title()
{
return m_title->text();
}
-QColor SensorLoggerSettingsWidget::foregroundColor()
+TQColor SensorLoggerSettingsWidget::foregroundColor()
{
return m_foregroundColor->color();
}
-QColor SensorLoggerSettingsWidget::backgroundColor()
+TQColor SensorLoggerSettingsWidget::backgroundColor()
{
return m_backgroundColor->color();
}
-QColor SensorLoggerSettingsWidget::alarmColor()
+TQColor SensorLoggerSettingsWidget::alarmColor()
{
return m_alarmColor->color();
}
-void SensorLoggerSettingsWidget::setTitle( const QString &t )
+void SensorLoggerSettingsWidget::setTitle( const TQString &t )
{
m_title->setText(t);
}
-void SensorLoggerSettingsWidget::setForegroundColor( const QColor &c )
+void SensorLoggerSettingsWidget::setForegroundColor( const TQColor &c )
{
m_foregroundColor->setColor(c);
}
-void SensorLoggerSettingsWidget::setBackgroundColor( const QColor &c )
+void SensorLoggerSettingsWidget::setBackgroundColor( const TQColor &c )
{
m_backgroundColor->setColor(c);
}
-void SensorLoggerSettingsWidget::setAlarmColor( const QColor &c )
+void SensorLoggerSettingsWidget::setAlarmColor( const TQColor &c )
{
m_alarmColor->setColor(c);
}
diff --git a/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc b/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc
index f8ad121f1..3d4d9c6f6 100644
--- a/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc
+++ b/ksysguard/gui/SensorDisplayLib/SignalPlotter.cc
@@ -24,8 +24,8 @@
#include <math.h>
#include <string.h>
-#include <qpainter.h>
-#include <qpixmap.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
#include <kdebug.h>
#include <kglobal.h>
@@ -34,8 +34,8 @@
#include "SignalPlotter.h"
-SignalPlotter::SignalPlotter( QWidget *parent, const char *name )
- : QWidget( parent, name )
+SignalPlotter::SignalPlotter( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
// Auto deletion does not work for pointer to arrays.
mBeamData.setAutoDelete( false );
@@ -50,8 +50,8 @@ SignalPlotter::SignalPlotter( QWidget *parent, const char *name )
// Anything smaller than this does not make sense.
setMinimumSize( 16, 16 );
- setSizePolicy( QSizePolicy( QSizePolicy::Expanding,
- QSizePolicy::Expanding, false ) );
+ setSizePolicy( TQSizePolicy( TQSizePolicy::Expanding,
+ TQSizePolicy::Expanding, false ) );
mShowVerticalLines = true;
mVerticalLinesColor = KSGRD::Style->firstForegroundColor();
@@ -77,7 +77,7 @@ SignalPlotter::~SignalPlotter()
delete [] p;
}
-bool SignalPlotter::addBeam( const QColor &color )
+bool SignalPlotter::addBeam( const TQColor &color )
{
double* d = new double[ mSamples ];
memset( d, 0, sizeof(double) * mSamples );
@@ -87,7 +87,7 @@ bool SignalPlotter::addBeam( const QColor &color )
return true;
}
-void SignalPlotter::addSample( const QValueList<double>& sampleBuf )
+void SignalPlotter::addSample( const TQValueList<double>& sampleBuf )
{
if ( mBeamData.count() != sampleBuf.count() )
return;
@@ -114,7 +114,7 @@ void SignalPlotter::addSample( const QValueList<double>& sampleBuf )
}
// Shift data buffers one sample down and insert new samples.
- QValueList<double>::ConstIterator s;
+ TQValueList<double>::ConstIterator s;
for ( d = mBeamData.first(), s = sampleBuf.begin(); d; d = mBeamData.next(), ++s ) {
memmove( d, d + 1, ( mSamples - 1 ) * sizeof( double ) );
d[ mSamples - 1 ] = *s;
@@ -123,14 +123,14 @@ void SignalPlotter::addSample( const QValueList<double>& sampleBuf )
update();
}
-void SignalPlotter::reorderBeams( const QValueList<int>& newOrder )
+void SignalPlotter::reorderBeams( const TQValueList<int>& newOrder )
{
if(newOrder.count() != mBeamData.count()) {
kdDebug() << "Serious problem in move sample" << endl;
return;
}
- QPtrList<double> newBeamData;
- QValueList<QColor> newBeamColor;
+ TQPtrList<double> newBeamData;
+ TQValueList<TQColor> newBeamColor;
for(uint i = 0; i < newOrder.count(); i++) {
int newIndex = newOrder[i];
@@ -152,7 +152,7 @@ void SignalPlotter::changeRange( int beam, double min, double max )
mMaxValue = max;
}
-QValueList<QColor> &SignalPlotter::beamColors()
+TQValueList<TQColor> &SignalPlotter::beamColors()
{
return mBeamColor;
}
@@ -164,12 +164,12 @@ void SignalPlotter::removeBeam( uint pos )
delete [] p;
}
-void SignalPlotter::setTitle( const QString &title )
+void SignalPlotter::setTitle( const TQString &title )
{
mTitle = title;
}
-QString SignalPlotter::title() const
+TQString SignalPlotter::title() const
{
return mTitle;
}
@@ -239,12 +239,12 @@ bool SignalPlotter::showVerticalLines() const
return mShowVerticalLines;
}
-void SignalPlotter::setVerticalLinesColor( const QColor &color )
+void SignalPlotter::setVerticalLinesColor( const TQColor &color )
{
mVerticalLinesColor = color;
}
-QColor SignalPlotter::verticalLinesColor() const
+TQColor SignalPlotter::verticalLinesColor() const
{
return mVerticalLinesColor;
}
@@ -279,12 +279,12 @@ bool SignalPlotter::showHorizontalLines() const
return mShowHorizontalLines;
}
-void SignalPlotter::setHorizontalLinesColor( const QColor &color )
+void SignalPlotter::setHorizontalLinesColor( const TQColor &color )
{
mHorizontalLinesColor = color;
}
-QColor SignalPlotter::horizontalLinesColor() const
+TQColor SignalPlotter::horizontalLinesColor() const
{
return mHorizontalLinesColor;
}
@@ -329,17 +329,17 @@ int SignalPlotter::fontSize() const
return mFontSize;
}
-void SignalPlotter::setBackgroundColor( const QColor &color )
+void SignalPlotter::setBackgroundColor( const TQColor &color )
{
mBackgroundColor = color;
}
-QColor SignalPlotter::backgroundColor() const
+TQColor SignalPlotter::backgroundColor() const
{
return mBackgroundColor;
}
-void SignalPlotter::resizeEvent( QResizeEvent* )
+void SignalPlotter::resizeEvent( TQResizeEvent* )
{
Q_ASSERT( width() > 2 );
@@ -385,7 +385,7 @@ void SignalPlotter::updateDataBuffers()
mSamples = newSampleNum;
}
-void SignalPlotter::paintEvent( QPaintEvent* )
+void SignalPlotter::paintEvent( TQPaintEvent* )
{
uint w = width();
uint h = height();
@@ -394,14 +394,14 @@ void SignalPlotter::paintEvent( QPaintEvent* )
if ( w <= 2 )
return;
- QPixmap pm( w, h );
- QPainter p;
+ TQPixmap pm( w, h );
+ TQPainter p;
p.begin( &pm, this );
pm.fill( mBackgroundColor );
/* Draw white line along the bottom and the right side of the
* widget to create a 3D like look. */
- p.setPen( QColor( colorGroup().light() ) );
+ p.setPen( TQColor( colorGroup().light() ) );
if(mShowThinFrame) {
p.drawLine( 0, h - 1, w - 1, h - 1 );
p.drawLine( w - 1, 0, w - 1, h - 1 );
@@ -441,7 +441,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
/* Draw horizontal bar with current sensor values at top of display. */
p.setPen( mHorizontalLinesColor );
int x0 = w / 2;
- p.setFont( QFont( p.font().family(), mFontSize ) );
+ p.setFont( TQFont( p.font().family(), mFontSize ) );
top = p.fontMetrics().height();
h -= top;
int h0 = top - 2; // h0 is our new top. It's at least 5 pixels high
@@ -452,7 +452,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
double bias = -minValue;
double scaleFac = ( w - x0 - 2 ) / range;
- QValueList<QColor>::Iterator col;
+ TQValueList<TQColor>::Iterator col;
col = mBeamColor.begin();
for ( double* d = mBeamData.first(); d; d = mBeamData.next(), ++col ) {
int start = x0 + (int)( bias * scaleFac );
@@ -502,7 +502,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
int xPos = 0;
for ( int i = 0; i < mSamples; i++, xPos += mHorizontalScale ) {
double bias = -minValue;
- QValueList<QColor>::Iterator col;
+ TQValueList<TQColor>::Iterator col;
col = mBeamColor.begin();
double sum = 0.0;
for ( double* d = mBeamData.first(); d; d = mBeamData.next(), ++col ) {
@@ -537,7 +537,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
int x1 = w - ( ( mSamples + 1 ) * mHorizontalScale );
for ( int i = 0; i < mSamples; i++ ) {
- QValueList<QColor>::Iterator col;
+ TQValueList<TQColor>::Iterator col;
col = mBeamColor.begin();
double sum = 0.0;
int y = top + h - 2;
@@ -563,10 +563,10 @@ void SignalPlotter::paintEvent( QPaintEvent* )
/* If the line is longer than 2 pixels we draw only the last
* 2 pixels with the bright color. The rest is painted with
* a 50% darker color. */
- QPen lastPen = QPen( p.pen() );
+ TQPen lastPen = TQPen( p.pen() );
p.setPen( (*col).dark( 150 ) );
p.setBrush( (*col).dark( 150 ) );
- QPointArray pa( 4 );
+ TQPointArray pa( 4 );
int prevY = ( i == 0 ) ? y : prevVals[ j ];
pa.putPoints( 0, 1, x1, prevY );
pa.putPoints( 1, 1, x2, y );
@@ -612,8 +612,8 @@ void SignalPlotter::paintEvent( QPaintEvent* )
* Values are only draw when width is greater than 60 */
if ( mShowHorizontalLines ) {
p.setPen( mHorizontalLinesColor );
- p.setFont( QFont( p.font().family(), mFontSize ) );
- QString val;
+ p.setFont( TQFont( p.font().family(), mFontSize ) );
+ TQString val;
/* top = 0 or font.height depending on whether there's a topbar or not
* h = graphing area.height - i.e. the actual space we have to draw inside
@@ -628,7 +628,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
if ( mShowLabels && h > ( mFontSize + 1 ) * ( mHorizontalLinesCount + 1 )
&& w > 60 ) {
- val = QString::number(maxValue - (y * range) / (mHorizontalLinesCount+1 ) );
+ val = TQString::number(maxValue - (y * range) / (mHorizontalLinesCount+1 ) );
p.drawText( 6, y_coord - 1, val ); //draw the text one pixel raised above the line
}
}
@@ -636,7 +636,7 @@ void SignalPlotter::paintEvent( QPaintEvent* )
//Draw the bottom most (minimum) number as well
if ( mShowLabels && h > ( mFontSize + 1 ) * ( mHorizontalLinesCount + 1 )
&& w > 60 ) {
- val = QString::number( minValue );
+ val = TQString::number( minValue );
p.drawText( 6, top + h - 2, val );
}
}
diff --git a/ksysguard/gui/SensorDisplayLib/SignalPlotter.h b/ksysguard/gui/SensorDisplayLib/SignalPlotter.h
index 9a9544b3c..1ac227212 100644
--- a/ksysguard/gui/SensorDisplayLib/SignalPlotter.h
+++ b/ksysguard/gui/SensorDisplayLib/SignalPlotter.h
@@ -24,10 +24,10 @@
#ifndef KSG_SIGNALPLOTTER_H
#define KSG_SIGNALPLOTTER_H
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qvaluelist.h>
-#include <qwidget.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqvaluelist.h>
+#include <tqwidget.h>
#define GRAPH_POLYGON 0
#define GRAPH_ORIGINAL 1
@@ -39,20 +39,20 @@ class SignalPlotter : public QWidget
Q_OBJECT
public:
- SignalPlotter( QWidget *parent = 0, const char *name = 0 );
+ SignalPlotter( TQWidget *parent = 0, const char *name = 0 );
~SignalPlotter();
- bool addBeam( const QColor &color );
- void addSample( const QValueList<double> &samples );
+ bool addBeam( const TQColor &color );
+ void addSample( const TQValueList<double> &samples );
void removeBeam( uint pos );
void changeRange( int beam, double min, double max );
- QValueList<QColor> &beamColors();
+ TQValueList<TQColor> &beamColors();
- void setTitle( const QString &title );
- QString title() const;
+ void setTitle( const TQString &title );
+ TQString title() const;
void setUseAutoRange( bool value );
bool useAutoRange() const;
@@ -72,8 +72,8 @@ class SignalPlotter : public QWidget
void setShowVerticalLines( bool value );
bool showVerticalLines() const;
- void setVerticalLinesColor( const QColor &color );
- QColor verticalLinesColor() const;
+ void setVerticalLinesColor( const TQColor &color );
+ TQColor verticalLinesColor() const;
void setVerticalLinesDistance( int distance );
int verticalLinesDistance() const;
@@ -84,8 +84,8 @@ class SignalPlotter : public QWidget
void setShowHorizontalLines( bool value );
bool showHorizontalLines() const;
- void setHorizontalLinesColor( const QColor &color );
- QColor horizontalLinesColor() const;
+ void setHorizontalLinesColor( const TQColor &color );
+ TQColor horizontalLinesColor() const;
void setHorizontalLinesCount( int count );
int horizontalLinesCount() const;
@@ -99,17 +99,17 @@ class SignalPlotter : public QWidget
void setFontSize( int size );
int fontSize() const;
- void setBackgroundColor( const QColor &color );
- QColor backgroundColor() const;
- void reorderBeams( const QValueList<int>& newOrder );
+ void setBackgroundColor( const TQColor &color );
+ TQColor backgroundColor() const;
+ void reorderBeams( const TQValueList<int>& newOrder );
void setThinFrame(bool set) { mShowThinFrame = set; }
protected:
void updateDataBuffers();
- virtual void resizeEvent( QResizeEvent* );
- virtual void paintEvent( QPaintEvent* );
+ virtual void resizeEvent( TQResizeEvent* );
+ virtual void paintEvent( TQPaintEvent* );
private:
double mMinValue;
@@ -120,28 +120,28 @@ class SignalPlotter : public QWidget
uint mGraphStyle;
bool mShowVerticalLines;
- QColor mVerticalLinesColor;
+ TQColor mVerticalLinesColor;
uint mVerticalLinesDistance;
bool mVerticalLinesScroll;
uint mVerticalLinesOffset;
uint mHorizontalScale;
bool mShowHorizontalLines;
- QColor mHorizontalLinesColor;
+ TQColor mHorizontalLinesColor;
uint mHorizontalLinesCount;
bool mShowLabels;
bool mShowTopBar;
uint mFontSize;
- QColor mBackgroundColor;
+ TQColor mBackgroundColor;
- QPtrList<double> mBeamData;
- QValueList<QColor> mBeamColor;
+ TQPtrList<double> mBeamData;
+ TQValueList<TQColor> mBeamColor;
unsigned int mSamples;
- QString mTitle;
+ TQString mTitle;
};
#endif
diff --git a/ksysguard/gui/WorkSheet.cc b/ksysguard/gui/WorkSheet.cc
index f6555a1c6..8d53edb6b 100644
--- a/ksysguard/gui/WorkSheet.cc
+++ b/ksysguard/gui/WorkSheet.cc
@@ -21,11 +21,11 @@
*/
-#include <qclipboard.h>
-#include <qcursor.h>
-#include <qdragobject.h>
-#include <qfile.h>
-#include <qlayout.h>
+#include <tqclipboard.h>
+#include <tqcursor.h>
+#include <tqdragobject.h>
+#include <tqfile.h>
+#include <tqlayout.h>
#include <kdebug.h>
#include <klocale.h>
@@ -45,8 +45,8 @@
#include "WorkSheet.h"
#include "WorkSheetSettings.h"
-WorkSheet::WorkSheet( QWidget *parent, const char *name )
- : QWidget( parent, name )
+WorkSheet::WorkSheet( TQWidget *parent, const char *name )
+ : TQWidget( parent, name )
{
mGridLayout = 0;
mRows = mColumns = 0;
@@ -57,9 +57,9 @@ WorkSheet::WorkSheet( QWidget *parent, const char *name )
setAcceptDrops( true );
}
-WorkSheet::WorkSheet( uint rows, uint columns, uint interval, QWidget* parent,
+WorkSheet::WorkSheet( uint rows, uint columns, uint interval, TQWidget* parent,
const char *name )
- : QWidget( parent, name )
+ : TQWidget( parent, name )
{
mRows = mColumns = 0;
mGridLayout = 0;
@@ -84,18 +84,18 @@ WorkSheet::~WorkSheet()
{
}
-bool WorkSheet::load( const QString &fileName )
+bool WorkSheet::load( const TQString &fileName )
{
setModified( false );
mFileName = fileName;
- QFile file( mFileName );
+ TQFile file( mFileName );
if ( !file.open( IO_ReadOnly ) ) {
KMessageBox::sorry( this, i18n( "Cannot open the file %1." ).arg( mFileName ) );
return false;
}
- QDomDocument doc;
+ TQDomDocument doc;
// Read in file and check for a valid XML header.
if ( !doc.setContent( &file) ) {
@@ -113,7 +113,7 @@ bool WorkSheet::load( const QString &fileName )
}
// Check for proper size.
- QDomElement element = doc.documentElement();
+ TQDomElement element = doc.documentElement();
updateInterval( element.attribute( "interval" ).toUInt() );
if ( updateInterval() < 1 || updateInterval() > 300 )
updateInterval( 2 );
@@ -132,9 +132,9 @@ bool WorkSheet::load( const QString &fileName )
uint i;
/* Load lists of hosts that are needed for the work sheet and try
* to establish a connection. */
- QDomNodeList dnList = element.elementsByTagName( "host" );
+ TQDomNodeList dnList = element.elementsByTagName( "host" );
for ( i = 0; i < dnList.count(); ++i ) {
- QDomElement element = dnList.item( i ).toElement();
+ TQDomElement element = dnList.item( i ).toElement();
bool ok;
int port = element.attribute( "port" ).toInt( &ok );
if ( !ok )
@@ -150,7 +150,7 @@ bool WorkSheet::load( const QString &fileName )
// Load the displays and place them into the work sheet.
dnList = element.elementsByTagName( "display" );
for ( i = 0; i < dnList.count(); ++i ) {
- QDomElement element = dnList.item( i ).toElement();
+ TQDomElement element = dnList.item( i ).toElement();
uint row = element.attribute( "row" ).toUInt();
uint column = element.attribute( "column" ).toUInt();
if ( row >= mRows || column >= mColumns) {
@@ -173,32 +173,32 @@ bool WorkSheet::load( const QString &fileName )
return true;
}
-bool WorkSheet::save( const QString &fileName )
+bool WorkSheet::save( const TQString &fileName )
{
mFileName = fileName;
- QDomDocument doc( "KSysGuardWorkSheet" );
+ TQDomDocument doc( "KSysGuardWorkSheet" );
doc.appendChild( doc.createProcessingInstruction(
"xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
// save work sheet information
- QDomElement ws = doc.createElement( "WorkSheet" );
+ TQDomElement ws = doc.createElement( "WorkSheet" );
doc.appendChild( ws );
ws.setAttribute( "interval", updateInterval() );
ws.setAttribute( "rows", mRows );
ws.setAttribute( "columns", mColumns );
- QStringList hosts;
+ TQStringList hosts;
collectHosts( hosts );
// save host information (name, shell, etc.)
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = hosts.begin(); it != hosts.end(); ++it ) {
- QString shell, command;
+ TQString shell, command;
int port;
if ( KSGRD::SensorMgr->hostInfo( *it, shell, command, port ) ) {
- QDomElement host = doc.createElement( "host" );
+ TQDomElement host = doc.createElement( "host" );
ws.appendChild( host );
host.setAttribute( "name", *it );
host.setAttribute( "shell", shell );
@@ -211,7 +211,7 @@ bool WorkSheet::save( const QString &fileName )
for (uint c = 0; c < mColumns; ++c )
if ( !mDisplayList[ r ][ c ]->isA( "DummyDisplay" ) ) {
KSGRD::SensorDisplay* display = (KSGRD::SensorDisplay*)mDisplayList[ r ][ c ];
- QDomElement element = doc.createElement( "display" );
+ TQDomElement element = doc.createElement( "display" );
ws.appendChild( element );
element.setAttribute( "row", r );
element.setAttribute( "column", c );
@@ -220,14 +220,14 @@ bool WorkSheet::save( const QString &fileName )
display->saveSettings( doc, element );
}
- QFile file( mFileName );
+ TQFile file( mFileName );
if ( !file.open( IO_WriteOnly ) ) {
KMessageBox::sorry( this, i18n( "Cannot save file %1" ).arg( mFileName ) );
return false;
}
- QTextStream s( &file );
- s.setEncoding( QTextStream::UnicodeUTF8 );
+ TQTextStream s( &file );
+ s.setEncoding( TQTextStream::UnicodeUTF8 );
s << doc;
file.close();
@@ -241,7 +241,7 @@ void WorkSheet::cut()
if ( !currentDisplay() || currentDisplay()->isA( "DummyDisplay" ) )
return;
- QClipboard* clip = QApplication::clipboard();
+ QClipboard* clip = TQApplication::clipboard();
clip->setText( currentDisplayAsXML() );
@@ -253,7 +253,7 @@ void WorkSheet::copy()
if ( !currentDisplay() || currentDisplay()->isA( "DummyDisplay" ) )
return;
- QClipboard* clip = QApplication::clipboard();
+ QClipboard* clip = TQApplication::clipboard();
clip->setText( currentDisplayAsXML() );
}
@@ -264,9 +264,9 @@ void WorkSheet::paste()
if ( !currentDisplay( &row, &column ) )
return;
- QClipboard* clip = QApplication::clipboard();
+ QClipboard* clip = TQApplication::clipboard();
- QDomDocument doc;
+ TQDomDocument doc;
/* Get text from clipboard and check for a valid XML header and
* proper document type. */
if ( !doc.setContent( clip->text() ) || doc.doctype().name() != "KSysGuardDisplay" ) {
@@ -275,17 +275,17 @@ void WorkSheet::paste()
return;
}
- QDomElement element = doc.documentElement();
+ TQDomElement element = doc.documentElement();
replaceDisplay( row, column, element );
}
-void WorkSheet::setFileName( const QString &fileName )
+void WorkSheet::setFileName( const TQString &fileName )
{
mFileName = fileName;
setModified( true );
}
-const QString& WorkSheet::fileName() const
+const TQString& WorkSheet::fileName() const
{
return mFileName;
}
@@ -295,30 +295,30 @@ bool WorkSheet::modified() const
return mModified;
}
-void WorkSheet::setTitle( const QString &title )
+void WorkSheet::setTitle( const TQString &title )
{
mTitle = title;
}
-QString WorkSheet::title() const
+TQString WorkSheet::title() const
{
return mTitle;
}
-KSGRD::SensorDisplay *WorkSheet::addDisplay( const QString &hostName,
- const QString &sensorName,
- const QString &sensorType,
- const QString& sensorDescr,
+KSGRD::SensorDisplay *WorkSheet::addDisplay( const TQString &hostName,
+ const TQString &sensorName,
+ const TQString &sensorType,
+ const TQString& sensorDescr,
uint row, uint column )
{
if ( !KSGRD::SensorMgr->engageHost( hostName ) ) {
- QString msg = i18n( "It is impossible to connect to \'%1\'." ).arg( hostName );
+ TQString msg = i18n( "It is impossible to connect to \'%1\'." ).arg( hostName );
KMessageBox::error( this, msg );
return 0;
}
- /* If the by 'row' and 'column' specified display is a QGroupBox dummy
+ /* If the by 'row' and 'column' specified display is a TQGroupBox dummy
* display we replace the widget. Otherwise we just try to add
* the new sensor to an existing display. */
if ( mDisplayList[ row ][ column ]->isA( "DummyDisplay" ) ) {
@@ -333,7 +333,7 @@ KSGRD::SensorDisplay *WorkSheet::addDisplay( const QString &hostName,
pm.insertItem( i18n( "&Multimeter" ), 2 );
pm.insertItem( i18n( "&BarGraph" ), 3 );
pm.insertItem( i18n( "S&ensorLogger" ), 4 );
- switch ( pm.exec( QCursor::pos() ) ) {
+ switch ( pm.exec( TQCursor::pos() ) ) {
case 1:
newDisplay = new FancyPlotter( this, "FancyPlotter", sensorDescr );
break;
@@ -424,23 +424,23 @@ void WorkSheet::applyStyle()
mDisplayList[ r ][ c ]->applyStyle();
}
-void WorkSheet::dragEnterEvent( QDragEnterEvent *e )
+void WorkSheet::dragEnterEvent( TQDragEnterEvent *e )
{
- e->accept( QTextDrag::canDecode( e ) );
+ e->accept( TQTextDrag::canDecode( e ) );
}
-void WorkSheet::dropEvent( QDropEvent *e )
+void WorkSheet::dropEvent( TQDropEvent *e )
{
- QString dragObject;
+ TQString dragObject;
- if ( QTextDrag::decode( e, dragObject) ) {
+ if ( TQTextDrag::decode( e, dragObject) ) {
// The host name, sensor name and type are seperated by a ' '.
- QStringList parts = QStringList::split( ' ', dragObject );
+ TQStringList parts = TQStringList::split( ' ', dragObject );
- QString hostName = parts[ 0 ];
- QString sensorName = parts[ 1 ];
- QString sensorType = parts[ 2 ];
- QString sensorDescr = parts[ 3 ];
+ TQString hostName = parts[ 0 ];
+ TQString sensorName = parts[ 1 ];
+ TQString sensorType = parts[ 2 ];
+ TQString sensorDescr = parts[ 3 ];
if ( hostName.isEmpty() || sensorName.isEmpty() || sensorType.isEmpty() ) {
return;
@@ -457,23 +457,23 @@ void WorkSheet::dropEvent( QDropEvent *e )
}
}
-QSize WorkSheet::sizeHint() const
+TQSize WorkSheet::sizeHint() const
{
- return QSize( 200,150 );
+ return TQSize( 200,150 );
}
-void WorkSheet::customEvent( QCustomEvent *e )
+void WorkSheet::customEvent( TQCustomEvent *e )
{
- if ( e->type() == QEvent::User ) {
+ if ( e->type() == TQEvent::User ) {
// SensorDisplays send out this event if they want to be removed.
removeDisplay( (KSGRD::SensorDisplay*)e->data() );
}
}
-bool WorkSheet::replaceDisplay( uint row, uint column, QDomElement& element )
+bool WorkSheet::replaceDisplay( uint row, uint column, TQDomElement& element )
{
- QString classType = element.attribute( "class" );
+ TQString classType = element.attribute( "class" );
KSGRD::SensorDisplay* newDisplay;
if ( classType == "FancyPlotter" )
newDisplay = new FancyPlotter( this );
@@ -518,10 +518,10 @@ void WorkSheet::replaceDisplay( uint row, uint column, KSGRD::SensorDisplay* new
mDisplayList[ row ][ column ] = newDisplay;
if ( mDisplayList[ row ][ column ]->useGlobalUpdateInterval() )
mDisplayList[ row ][ column ]->setUpdateInterval( updateInterval() );
- connect( newDisplay, SIGNAL( showPopupMenu( KSGRD::SensorDisplay* ) ),
- SLOT( showPopupMenu( KSGRD::SensorDisplay* ) ) );
- connect( newDisplay, SIGNAL( modified( bool ) ),
- SLOT( setModified( bool ) ) );
+ connect( newDisplay, TQT_SIGNAL( showPopupMenu( KSGRD::SensorDisplay* ) ),
+ TQT_SLOT( showPopupMenu( KSGRD::SensorDisplay* ) ) );
+ connect( newDisplay, TQT_SIGNAL( modified( bool ) ),
+ TQT_SLOT( setModified( bool ) ) );
}
@@ -550,7 +550,7 @@ void WorkSheet::removeDisplay( KSGRD::SensorDisplay *display )
}
}
-void WorkSheet::collectHosts( QStringList &list )
+void WorkSheet::collectHosts( TQStringList &list )
{
for ( uint r = 0; r < mRows; ++r )
for ( uint c = 0; c < mColumns; ++c )
@@ -564,7 +564,7 @@ void WorkSheet::createGrid( uint rows, uint columns )
mColumns = columns;
// create grid layout with specified dimentions
- mGridLayout = new QGridLayout( this, mRows, mColumns, 5 );
+ mGridLayout = new TQGridLayout( this, mRows, mColumns, 5 );
mDisplayList = new KSGRD::SensorDisplay**[ mRows ];
for ( uint r = 0; r < mRows; ++r ) {
@@ -667,18 +667,18 @@ void WorkSheet::fixTabOrder()
}
}
-QString WorkSheet::currentDisplayAsXML()
+TQString WorkSheet::currentDisplayAsXML()
{
KSGRD::SensorDisplay* display = currentDisplay();
if ( !display )
- return QString::null;
+ return TQString::null;
/* We create an XML description of the current display. */
- QDomDocument doc( "KSysGuardDisplay" );
+ TQDomDocument doc( "KSysGuardDisplay" );
doc.appendChild( doc.createProcessingInstruction(
"xml", "version=\"1.0\" encoding=\"UTF-8\"" ) );
- QDomElement element = doc.createElement( "display" );
+ TQDomElement element = doc.createElement( "display" );
doc.appendChild( element );
element.setAttribute( "class", display->className() );
display->saveSettings( doc, element );
diff --git a/ksysguard/gui/WorkSheet.h b/ksysguard/gui/WorkSheet.h
index f706f36dc..7715276fd 100644
--- a/ksysguard/gui/WorkSheet.h
+++ b/ksysguard/gui/WorkSheet.h
@@ -24,7 +24,7 @@
#ifndef KSG_WORKSHEET_H
#define KSG_WORKSHEET_H
-#include <qwidget.h>
+#include <tqwidget.h>
#include <SensorDisplay.h>
@@ -42,35 +42,35 @@ class QStringList;
layout. The number of columns can not be changed. Displays are added by
dragging a sensor from the sensor browser over the WorkSheet.
*/
-class WorkSheet : public QWidget, public KSGRD::SensorBoard
+class WorkSheet : public TQWidget, public KSGRD::SensorBoard
{
Q_OBJECT
public:
- WorkSheet( QWidget* parent, const char *name = 0 );
- WorkSheet( uint rows, uint columns, uint interval, QWidget* parent,
+ WorkSheet( TQWidget* parent, const char *name = 0 );
+ WorkSheet( uint rows, uint columns, uint interval, TQWidget* parent,
const char *name = 0 );
~WorkSheet();
- bool load( const QString &fileName );
- bool save( const QString &fileName );
+ bool load( const TQString &fileName );
+ bool save( const TQString &fileName );
void cut();
void copy();
void paste();
- void setFileName( const QString &fileName );
- const QString& fileName() const;
+ void setFileName( const TQString &fileName );
+ const TQString& fileName() const;
bool modified() const;
- void setTitle( const QString &title );
- QString title() const;
+ void setTitle( const TQString &title );
+ TQString title() const;
- KSGRD::SensorDisplay* addDisplay( const QString &hostname,
- const QString &monitor,
- const QString &sensorType,
- const QString &sensorDescr,
+ KSGRD::SensorDisplay* addDisplay( const TQString &hostname,
+ const TQString &monitor,
+ const TQString &sensorType,
+ const TQString &sensorDescr,
uint rows, uint columns );
//Returns the sensor at position row,column.
//Return NULL if invalid row or column
@@ -86,24 +86,24 @@ class WorkSheet : public QWidget, public KSGRD::SensorBoard
void applyStyle();
signals:
- void sheetModified( QWidget *sheet );
- void titleChanged( QWidget *sheet );
+ void sheetModified( TQWidget *sheet );
+ void titleChanged( TQWidget *sheet );
protected:
- virtual QSize sizeHint() const;
- void dragEnterEvent( QDragEnterEvent* );
- void dropEvent( QDropEvent* );
- void customEvent( QCustomEvent* );
+ virtual TQSize sizeHint() const;
+ void dragEnterEvent( TQDragEnterEvent* );
+ void dropEvent( TQDropEvent* );
+ void customEvent( TQCustomEvent* );
private:
void removeDisplay( KSGRD::SensorDisplay *display );
- bool replaceDisplay( uint row, uint column, QDomElement& element );
+ bool replaceDisplay( uint row, uint column, TQDomElement& element );
void replaceDisplay( uint row, uint column,
KSGRD::SensorDisplay* display = 0 );
- void collectHosts( QStringList &list );
+ void collectHosts( TQStringList &list );
void createGrid( uint rows, uint columns );
@@ -113,16 +113,16 @@ class WorkSheet : public QWidget, public KSGRD::SensorBoard
void fixTabOrder();
- QString currentDisplayAsXML();
+ TQString currentDisplayAsXML();
bool mModified;
uint mRows;
uint mColumns;
- QGridLayout* mGridLayout;
- QString mFileName;
- QString mTitle;
+ TQGridLayout* mGridLayout;
+ TQString mFileName;
+ TQString mTitle;
/**
This two dimensional array stores the pointers to the sensor displays
diff --git a/ksysguard/gui/WorkSheetSettings.cc b/ksysguard/gui/WorkSheetSettings.cc
index e9ba0da08..3e4c28e50 100644
--- a/ksysguard/gui/WorkSheetSettings.cc
+++ b/ksysguard/gui/WorkSheetSettings.cc
@@ -26,30 +26,30 @@
#include <knuminput.h>
#include <klocale.h>
-#include <qgroupbox.h>
-#include <qlabel.h>
-#include <qspinbox.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqgroupbox.h>
+#include <tqlabel.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include "WorkSheetSettings.h"
-WorkSheetSettings::WorkSheetSettings( QWidget* parent, const char* name )
- : KDialogBase( parent, name, true, QString::null, Ok|Cancel, Ok, true )
+WorkSheetSettings::WorkSheetSettings( TQWidget* parent, const char* name )
+ : KDialogBase( parent, name, true, TQString::null, Ok|Cancel, Ok, true )
{
setCaption( i18n( "Worksheet Properties" ) );
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget( page );
- QVBoxLayout *topLayout = new QVBoxLayout( page, 0, spacingHint() );
+ TQVBoxLayout *topLayout = new TQVBoxLayout( page, 0, spacingHint() );
- QGroupBox *group = new QGroupBox( 0, Qt::Vertical, i18n( "Title" ), page );
+ TQGroupBox *group = new TQGroupBox( 0, Qt::Vertical, i18n( "Title" ), page );
group->layout()->setMargin( marginHint() );
group->layout()->setSpacing( spacingHint() );
- QGridLayout *groupLayout = new QGridLayout( group->layout(), 1, 1 );
+ TQGridLayout *groupLayout = new TQGridLayout( group->layout(), 1, 1 );
groupLayout->setAlignment( Qt::AlignTop );
mSheetTitle = new KLineEdit( group );
@@ -57,14 +57,14 @@ WorkSheetSettings::WorkSheetSettings( QWidget* parent, const char* name )
topLayout->addWidget( group );
- group = new QGroupBox( 0, Qt::Vertical, i18n( "Properties" ), page );
+ group = new TQGroupBox( 0, Qt::Vertical, i18n( "Properties" ), page );
group->layout()->setMargin( marginHint() );
group->layout()->setSpacing( spacingHint() );
- groupLayout = new QGridLayout( group->layout(), 3, 2 );
+ groupLayout = new TQGridLayout( group->layout(), 3, 2 );
groupLayout->setAlignment( Qt::AlignTop );
- QLabel *label = new QLabel( i18n( "Rows:" ), group );
+ TQLabel *label = new TQLabel( i18n( "Rows:" ), group );
groupLayout->addWidget( label, 0, 0 );
mRows = new KIntNumInput( 1, group );
@@ -73,7 +73,7 @@ WorkSheetSettings::WorkSheetSettings( QWidget* parent, const char* name )
groupLayout->addWidget( mRows, 0, 1 );
label->setBuddy( mRows );
- label = new QLabel( i18n( "Columns:" ), group );
+ label = new TQLabel( i18n( "Columns:" ), group );
groupLayout->addWidget( label, 1, 0 );
mColumns = new KIntNumInput( 1, group );
@@ -82,7 +82,7 @@ WorkSheetSettings::WorkSheetSettings( QWidget* parent, const char* name )
groupLayout->addWidget( mColumns, 1, 1 );
label->setBuddy( mColumns );
- label = new QLabel( i18n( "Update interval:" ), group );
+ label = new TQLabel( i18n( "Update interval:" ), group );
groupLayout->addWidget( label, 2, 0 );
mInterval = new KIntNumInput( 2, group );
@@ -94,16 +94,16 @@ WorkSheetSettings::WorkSheetSettings( QWidget* parent, const char* name )
topLayout->addWidget( group );
- QWhatsThis::add( mRows, i18n( "Enter the number of rows the sheet should have." ) );
- QWhatsThis::add( mColumns, i18n( "Enter the number of columns the sheet should have." ) );
- QWhatsThis::add( mInterval, i18n( "All displays of the sheet are updated at the rate specified here." ) );
- QToolTip::add( mSheetTitle, i18n( "Enter the title of the worksheet here." ) );
+ TQWhatsThis::add( mRows, i18n( "Enter the number of rows the sheet should have." ) );
+ TQWhatsThis::add( mColumns, i18n( "Enter the number of columns the sheet should have." ) );
+ TQWhatsThis::add( mInterval, i18n( "All displays of the sheet are updated at the rate specified here." ) );
+ TQToolTip::add( mSheetTitle, i18n( "Enter the title of the worksheet here." ) );
KAcceleratorManager::manage( page );
mSheetTitle->setFocus();
- resize( QSize( 250, 230 ).expandedTo( minimumSizeHint() ) );
+ resize( TQSize( 250, 230 ).expandedTo( minimumSizeHint() ) );
}
WorkSheetSettings::~WorkSheetSettings()
@@ -140,12 +140,12 @@ int WorkSheetSettings::interval() const
return mInterval->value();
}
-void WorkSheetSettings::setSheetTitle( const QString &title )
+void WorkSheetSettings::setSheetTitle( const TQString &title )
{
mSheetTitle->setText( title );
}
-QString WorkSheetSettings::sheetTitle() const
+TQString WorkSheetSettings::sheetTitle() const
{
return mSheetTitle->text();
}
diff --git a/ksysguard/gui/WorkSheetSettings.h b/ksysguard/gui/WorkSheetSettings.h
index 8fe5641a5..5f7d8da0c 100644
--- a/ksysguard/gui/WorkSheetSettings.h
+++ b/ksysguard/gui/WorkSheetSettings.h
@@ -34,7 +34,7 @@ class WorkSheetSettings : public KDialogBase
Q_OBJECT
public:
- WorkSheetSettings( QWidget* parent = 0, const char* name = 0 );
+ WorkSheetSettings( TQWidget* parent = 0, const char* name = 0 );
~WorkSheetSettings();
void setRows( int rows );
@@ -46,8 +46,8 @@ class WorkSheetSettings : public KDialogBase
void setInterval( int interval );
int interval() const;
- void setSheetTitle( const QString &title );
- QString sheetTitle() const;
+ void setSheetTitle( const TQString &title );
+ TQString sheetTitle() const;
private:
KLineEdit* mSheetTitle;
diff --git a/ksysguard/gui/Workspace.cc b/ksysguard/gui/Workspace.cc
index c179317c0..3c1a92a56 100644
--- a/ksysguard/gui/Workspace.cc
+++ b/ksysguard/gui/Workspace.cc
@@ -21,9 +21,9 @@
*/
-#include <qlineedit.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
#include <kdebug.h>
#include <kfiledialog.h>
@@ -39,18 +39,18 @@
#include "Workspace.h"
-Workspace::Workspace( QWidget* parent, const char* name )
- : QTabWidget( parent, name )
+Workspace::Workspace( TQWidget* parent, const char* name )
+ : TQTabWidget( parent, name )
{
KAcceleratorManager::setNoAccel(this);
mSheetList.setAutoDelete( true );
mAutoSave = true;
- connect( this, SIGNAL( currentChanged( QWidget* ) ),
- SLOT( updateCaption( QWidget* ) ) );
+ connect( this, TQT_SIGNAL( currentChanged( TQWidget* ) ),
+ TQT_SLOT( updateCaption( TQWidget* ) ) );
- QWhatsThis::add( this, i18n( "This is your work space. It holds your worksheets. You need "
+ TQWhatsThis::add( this, i18n( "This is your work space. It holds your worksheets. You need "
"to create a new worksheet (Menu File->New) before "
"you can drag sensors here." ) );
}
@@ -62,8 +62,8 @@ Workspace::~Workspace()
* administration data is already deleted but slots are still
* being triggered. TODO: I need to ask the Trolls about this. */
- disconnect( this, SIGNAL( currentChanged( QWidget* ) ), this,
- SLOT( updateCaption( QWidget* ) ) );
+ disconnect( this, TQT_SIGNAL( currentChanged( TQWidget* ) ), this,
+ TQT_SLOT( updateCaption( TQWidget* ) ) );
}
void Workspace::saveProperties( KConfig *cfg )
@@ -71,9 +71,9 @@ void Workspace::saveProperties( KConfig *cfg )
cfg->writePathEntry( "WorkDir", mWorkDir );
cfg->writeEntry( "CurrentSheet", tabLabel( currentPage() ) );
- QPtrListIterator<WorkSheet> it( mSheetList);
+ TQPtrListIterator<WorkSheet> it( mSheetList);
- QStringList list;
+ TQStringList list;
for ( int i = 0; it.current(); ++it, ++i )
if ( !(*it)->fileName().isEmpty() )
list.append( (*it)->fileName() );
@@ -83,7 +83,7 @@ void Workspace::saveProperties( KConfig *cfg )
void Workspace::readProperties( KConfig *cfg )
{
- QString currentSheet;
+ TQString currentSheet;
mWorkDir = cfg->readPathEntry( "WorkDir" );
@@ -96,8 +96,8 @@ void Workspace::readProperties( KConfig *cfg )
mWorkDir = kstd->saveLocation( "data", "ksysguard" );
- QString origFile = kstd->findResource( "data", "SystemLoad.sgrd" );
- QString newFile = mWorkDir + "/" + i18n( "System Load" ) + ".sgrd";
+ TQString origFile = kstd->findResource( "data", "SystemLoad.sgrd" );
+ TQString newFile = mWorkDir + "/" + i18n( "System Load" ) + ".sgrd";
if ( !origFile.isEmpty() )
restoreWorkSheet( origFile, newFile );
@@ -109,13 +109,13 @@ void Workspace::readProperties( KConfig *cfg )
currentSheet = i18n( "System Load" );
} else {
currentSheet = cfg->readEntry( "CurrentSheet" );
- QStringList list = cfg->readPathListEntry( "Sheets" );
- for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it )
+ TQStringList list = cfg->readPathListEntry( "Sheets" );
+ for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
restoreWorkSheet( *it );
}
// Determine visible sheet.
- QPtrListIterator<WorkSheet> it( mSheetList );
+ TQPtrListIterator<WorkSheet> it( mSheetList );
for ( ; it.current(); ++it )
if ( currentSheet == tabLabel(*it) ) {
showPage( *it );
@@ -127,13 +127,13 @@ void Workspace::newWorkSheet()
{
/* Find a name of the form "Sheet %d" that is not yet used by any
* of the existing worksheets. */
- QString sheetName;
+ TQString sheetName;
bool found;
int i = 1;
do {
sheetName = i18n( "Sheet %1" ).arg( i++ );
- QPtrListIterator<WorkSheet> it( mSheetList );
+ TQPtrListIterator<WorkSheet> it( mSheetList );
found = false;
for ( ; it.current() && !found; ++it )
if ( tabLabel(*it) == sheetName )
@@ -148,23 +148,23 @@ void Workspace::newWorkSheet()
insertTab( sheet, dlg.sheetTitle() );
mSheetList.append( sheet );
showPage( sheet );
- connect( sheet, SIGNAL( sheetModified( QWidget* ) ),
- SLOT( updateCaption( QWidget* ) ) );
- connect( sheet, SIGNAL( titleChanged( QWidget* ) ),
- SLOT( updateSheetTitle( QWidget* ) ) );
+ connect( sheet, TQT_SIGNAL( sheetModified( TQWidget* ) ),
+ TQT_SLOT( updateCaption( TQWidget* ) ) );
+ connect( sheet, TQT_SIGNAL( titleChanged( TQWidget* ) ),
+ TQT_SLOT( updateSheetTitle( TQWidget* ) ) );
}
}
bool Workspace::saveOnQuit()
{
- QPtrListIterator<WorkSheet> it( mSheetList );
+ TQPtrListIterator<WorkSheet> it( mSheetList );
for ( ; it.current(); ++it )
if ( (*it)->modified() ) {
if ( !mAutoSave || (*it)->fileName().isEmpty() ) {
int res = KMessageBox::warningYesNoCancel( this,
i18n( "The worksheet '%1' contains unsaved data.\n"
"Do you want to save the worksheet?")
- .arg( tabLabel( *it ) ), QString::null, KStdGuiItem::save(), KStdGuiItem::discard() );
+ .arg( tabLabel( *it ) ), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() );
if ( res == KMessageBox::Yes )
saveWorkSheet( *it );
else if ( res == KMessageBox::Cancel )
@@ -194,7 +194,7 @@ void Workspace::loadWorkSheet( const KURL &url )
/* It's probably not worth the effort to make this really network
* transparent. Unless s/o beats me up I use this pseudo transparent
* code. */
- QString tmpFile;
+ TQString tmpFile;
KIO::NetAccess::download( url, tmpFile, this );
mWorkDir = tmpFile.left( tmpFile.findRev( '/' ) );
@@ -207,7 +207,7 @@ void Workspace::loadWorkSheet( const KURL &url )
KURL tmpFileUrl;
tmpFileUrl.setPath( tmpFile );
if ( tmpFileUrl != url.url() )
- mSheetList.last()->setFileName( QString::null );
+ mSheetList.last()->setFileName( TQString::null );
KIO::NetAccess::removeTempFile( tmpFile );
emit announceRecentURL( KURL( url ) );
@@ -230,7 +230,7 @@ void Workspace::saveWorkSheet( WorkSheet *sheet )
return;
}
- QString fileName = sheet->fileName();
+ TQString fileName = sheet->fileName();
if ( fileName.isEmpty() ) {
KFileDialog dlg( 0, i18n( "*.sgrd|Sensor Files" ), this,
"LoadFileDialog", true );
@@ -243,7 +243,7 @@ void Workspace::saveWorkSheet( WorkSheet *sheet )
mWorkDir = fileName.left( fileName.findRev( '/' ) );
// extract filename without path
- QString baseName = fileName.right( fileName.length() - fileName.findRev( '/' ) - 1 );
+ TQString baseName = fileName.right( fileName.length() - fileName.findRev( '/' ) - 1 );
// chop off extension (usually '.sgrd')
baseName = baseName.left( baseName.findRev( '.' ) );
@@ -270,7 +270,7 @@ void Workspace::saveWorkSheetAs( WorkSheet *sheet )
return;
}
- QString fileName;
+ TQString fileName;
do {
KFileDialog dlg( 0, "*.sgrd", this, "LoadFileDialog", true );
fileName = dlg.getSaveFileName( mWorkDir + "/" + tabLabel( currentPage() ) +
@@ -281,7 +281,7 @@ void Workspace::saveWorkSheetAs( WorkSheet *sheet )
mWorkDir = fileName.left( fileName.findRev( '/' ) );
// extract filename without path
- QString baseName = fileName.right( fileName.length() - fileName.findRev( '/' ) - 1 );
+ TQString baseName = fileName.right( fileName.length() - fileName.findRev( '/' ) - 1 );
// chop off extension (usually '.sgrd')
baseName = baseName.left( baseName.findRev( '.' ) );
@@ -304,7 +304,7 @@ void Workspace::deleteWorkSheet()
int res = KMessageBox::warningYesNoCancel( this,
i18n( "The worksheet '%1' contains unsaved data.\n"
"Do you want to save the worksheet?" )
- .arg( tabLabel( current ) ), QString::null, KStdGuiItem::save(), KStdGuiItem::discard() );
+ .arg( tabLabel( current ) ), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard() );
if ( res == KMessageBox::Cancel )
return;
@@ -317,7 +317,7 @@ void Workspace::deleteWorkSheet()
removePage( current );
mSheetList.remove( current );
} else {
- QString msg = i18n( "There are no worksheets that could be deleted." );
+ TQString msg = i18n( "There are no worksheets that could be deleted." );
KMessageBox::error( this, msg );
}
}
@@ -331,9 +331,9 @@ void Workspace::removeAllWorkSheets()
}
}
-void Workspace::deleteWorkSheet( const QString &fileName )
+void Workspace::deleteWorkSheet( const TQString &fileName )
{
- QPtrListIterator<WorkSheet> it( mSheetList );
+ TQPtrListIterator<WorkSheet> it( mSheetList );
for ( ; it.current(); ++it )
if ( (*it)->fileName() == fileName ) {
removePage( *it );
@@ -342,19 +342,19 @@ void Workspace::deleteWorkSheet( const QString &fileName )
}
}
-WorkSheet *Workspace::restoreWorkSheet( const QString &fileName, const QString &newName )
+WorkSheet *Workspace::restoreWorkSheet( const TQString &fileName, const TQString &newName )
{
/* We might want to save the worksheet under a different name later. This
* name can be specified by newName. If newName is empty we use the
* original name to save the work sheet. */
- QString tmpStr;
+ TQString tmpStr;
if ( newName.isEmpty() )
tmpStr = fileName;
else
tmpStr = newName;
// extract filename without path
- QString baseName = tmpStr.right( tmpStr.length() - tmpStr.findRev( '/' ) - 1 );
+ TQString baseName = tmpStr.right( tmpStr.length() - tmpStr.findRev( '/' ) - 1 );
// chop off extension (usually '.sgrd')
baseName = baseName.left( baseName.findRev( '.' ) );
@@ -370,8 +370,8 @@ WorkSheet *Workspace::restoreWorkSheet( const QString &fileName, const QString &
}
mSheetList.append( sheet );
- connect( sheet, SIGNAL( sheetModified( QWidget* ) ),
- SLOT( updateCaption( QWidget* ) ) );
+ connect( sheet, TQT_SIGNAL( sheetModified( TQWidget* ) ),
+ TQT_SLOT( updateCaption( TQWidget* ) ) );
/* Force the file name to be the new name. This also sets the modified
* flag, so that the file will get saved on exit. */
@@ -415,18 +415,18 @@ void Workspace::configure()
current->settings();
}
-void Workspace::updateCaption( QWidget* wdg )
+void Workspace::updateCaption( TQWidget* wdg )
{
if ( wdg )
emit setCaption( tabLabel( wdg ), ((WorkSheet*)wdg)->modified() );
else
- emit setCaption( QString::null, false );
+ emit setCaption( TQString::null, false );
for ( WorkSheet* s = mSheetList.first(); s != 0; s = mSheetList.next() )
((WorkSheet*)s)->setIsOnTop( s == wdg );
}
-void Workspace::updateSheetTitle( QWidget* wdg )
+void Workspace::updateSheetTitle( TQWidget* wdg )
{
if ( wdg )
changeTab( wdg, static_cast<WorkSheet*>( wdg )->title() );
@@ -443,7 +443,7 @@ void Workspace::showProcesses()
KStandardDirs* kstd = KGlobal::dirs();
kstd->addResourceType( "data", "share/apps/ksysguard" );
- QString file = kstd->findResource( "data", "ProcessTable.sgrd" );
+ TQString file = kstd->findResource( "data", "ProcessTable.sgrd" );
if ( file.isEmpty() ) {
KMessageBox::error( this, i18n( "Cannot find file ProcessTable.sgrd." ) );
return;
diff --git a/ksysguard/gui/Workspace.h b/ksysguard/gui/Workspace.h
index af27f6303..3c0f8c523 100644
--- a/ksysguard/gui/Workspace.h
+++ b/ksysguard/gui/Workspace.h
@@ -24,8 +24,8 @@
#ifndef KSG_WORKSPACE_H
#define KSG_WORKSPACE_H
-#include <qptrlist.h>
-#include <qtabwidget.h>
+#include <tqptrlist.h>
+#include <tqtabwidget.h>
class KConfig;
class KURL;
@@ -37,7 +37,7 @@ class Workspace : public QTabWidget
Q_OBJECT
public:
- Workspace( QWidget* parent, const char* name = 0 );
+ Workspace( TQWidget* parent, const char* name = 0 );
~Workspace();
void saveProperties( KConfig* );
@@ -47,9 +47,9 @@ class Workspace : public QTabWidget
void showProcesses();
- WorkSheet *restoreWorkSheet( const QString &fileName,
- const QString &newName = QString::null );
- void deleteWorkSheet( const QString &fileName );
+ WorkSheet *restoreWorkSheet( const TQString &fileName,
+ const TQString &newName = TQString::null );
+ void deleteWorkSheet( const TQString &fileName );
public slots:
void newWorkSheet();
@@ -65,19 +65,19 @@ class Workspace : public QTabWidget
void copy();
void paste();
void configure();
- void updateCaption( QWidget* );
- void updateSheetTitle( QWidget* );
+ void updateCaption( TQWidget* );
+ void updateSheetTitle( TQWidget* );
void applyStyle();
signals:
void announceRecentURL( const KURL &url );
- void setCaption( const QString &text, bool modified );
+ void setCaption( const TQString &text, bool modified );
private:
- QPtrList<WorkSheet> mSheetList;
+ TQPtrList<WorkSheet> mSheetList;
// Directory that was used for the last load/save.
- QString mWorkDir;
+ TQString mWorkDir;
bool mAutoSave;
};
diff --git a/ksysguard/gui/ksgrd/HostConnector.cc b/ksysguard/gui/ksgrd/HostConnector.cc
index 5762d08b3..3885a9518 100644
--- a/ksysguard/gui/ksgrd/HostConnector.cc
+++ b/ksysguard/gui/ksgrd/HostConnector.cc
@@ -23,100 +23,100 @@
#include <kcombobox.h>
#include <klocale.h>
-#include <qbuttongroup.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
-#include <qtooltip.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
+#include <tqtooltip.h>
+#include <tqwhatsthis.h>
#include "HostConnector.h"
-HostConnector::HostConnector( QWidget *parent, const char *name )
+HostConnector::HostConnector( TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Connect Host" ), Help | Ok | Cancel, Ok,
parent, name, true, true )
{
- QFrame *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 2, 2, 0, spacingHint() );
+ TQFrame *page = plainPage();
+ TQGridLayout *layout = new TQGridLayout( page, 2, 2, 0, spacingHint() );
layout->setColStretch( 1, 1 );
- QLabel *label = new QLabel( i18n( "Host:" ), page );
+ TQLabel *label = new TQLabel( i18n( "Host:" ), page );
layout->addWidget( label, 0, 0 );
mHostNames = new KComboBox( true, page );
mHostNames->setMaxCount( 20 );
- mHostNames->setInsertionPolicy( QComboBox::AtTop );
+ mHostNames->setInsertionPolicy( TQComboBox::AtTop );
mHostNames->setAutoCompletion( true );
mHostNames->setDuplicatesEnabled( false );
layout->addWidget( mHostNames, 0, 1 );
label->setBuddy( mHostNames );
- QWhatsThis::add( mHostNames, i18n( "Enter the name of the host you want to connect to." ) );
+ TQWhatsThis::add( mHostNames, i18n( "Enter the name of the host you want to connect to." ) );
- mHostNameLabel = new QLabel( page );
+ mHostNameLabel = new TQLabel( page );
mHostNameLabel->hide();
layout->addWidget( mHostNameLabel, 0, 1 );
- QButtonGroup *group = new QButtonGroup( 0, Qt::Vertical,
+ TQButtonGroup *group = new TQButtonGroup( 0, Qt::Vertical,
i18n( "Connection Type" ), page );
- QGridLayout *groupLayout = new QGridLayout( group->layout(), 4, 4,
+ TQGridLayout *groupLayout = new TQGridLayout( group->layout(), 4, 4,
spacingHint() );
groupLayout->setAlignment( Qt::AlignTop );
- mUseSsh = new QRadioButton( i18n( "ssh" ), group );
+ mUseSsh = new TQRadioButton( i18n( "ssh" ), group );
mUseSsh->setEnabled( true );
mUseSsh->setChecked( true );
- QWhatsThis::add( mUseSsh, i18n( "Select this to use the secure shell to login to the remote host." ) );
+ TQWhatsThis::add( mUseSsh, i18n( "Select this to use the secure shell to login to the remote host." ) );
groupLayout->addWidget( mUseSsh, 0, 0 );
- mUseRsh = new QRadioButton( i18n( "rsh" ), group );
- QWhatsThis::add( mUseRsh, i18n( "Select this to use the remote shell to login to the remote host." ) );
+ mUseRsh = new TQRadioButton( i18n( "rsh" ), group );
+ TQWhatsThis::add( mUseRsh, i18n( "Select this to use the remote shell to login to the remote host." ) );
groupLayout->addWidget( mUseRsh, 0, 1 );
- mUseDaemon = new QRadioButton( i18n( "Daemon" ), group );
- QWhatsThis::add( mUseDaemon, i18n( "Select this if you want to connect to a ksysguard daemon that is running on the machine you want to connect to, and is listening for client requests." ) );
+ mUseDaemon = new TQRadioButton( i18n( "Daemon" ), group );
+ TQWhatsThis::add( mUseDaemon, i18n( "Select this if you want to connect to a ksysguard daemon that is running on the machine you want to connect to, and is listening for client requests." ) );
groupLayout->addWidget( mUseDaemon, 0, 2 );
- mUseCustom = new QRadioButton( i18n( "Custom command" ), group );
- QWhatsThis::add( mUseCustom, i18n( "Select this to use the command you entered below to start ksysguardd on the remote host." ) );
+ mUseCustom = new TQRadioButton( i18n( "Custom command" ), group );
+ TQWhatsThis::add( mUseCustom, i18n( "Select this to use the command you entered below to start ksysguardd on the remote host." ) );
groupLayout->addWidget( mUseCustom, 0, 3 );
- label = new QLabel( i18n( "Port:" ), group );
+ label = new TQLabel( i18n( "Port:" ), group );
groupLayout->addWidget( label, 1, 0 );
- mPort = new QSpinBox( 1, 65535, 1, group );
+ mPort = new TQSpinBox( 1, 65535, 1, group );
mPort->setEnabled( false );
mPort->setValue( 3112 );
- QToolTip::add( mPort, i18n( "Enter the port number on which the ksysguard daemon is listening for connections." ) );
+ TQToolTip::add( mPort, i18n( "Enter the port number on which the ksysguard daemon is listening for connections." ) );
groupLayout->addWidget( mPort, 1, 2 );
- label = new QLabel( i18n( "e.g. 3112" ), group );
+ label = new TQLabel( i18n( "e.g. 3112" ), group );
groupLayout->addWidget( label, 1, 3 );
- label = new QLabel( i18n( "Command:" ), group );
+ label = new TQLabel( i18n( "Command:" ), group );
groupLayout->addWidget( label, 2, 0 );
mCommands = new KComboBox( true, group );
mCommands->setEnabled( false );
mCommands->setMaxCount( 20 );
- mCommands->setInsertionPolicy( QComboBox::AtTop );
+ mCommands->setInsertionPolicy( TQComboBox::AtTop );
mCommands->setAutoCompletion( true );
mCommands->setDuplicatesEnabled( false );
- QWhatsThis::add( mCommands, i18n( "Enter the command that runs ksysguardd on the host you want to monitor." ) );
+ TQWhatsThis::add( mCommands, i18n( "Enter the command that runs ksysguardd on the host you want to monitor." ) );
groupLayout->addMultiCellWidget( mCommands, 2, 2, 2, 3 );
label->setBuddy( mCommands );
- label = new QLabel( i18n( "e.g. ssh -l root remote.host.org ksysguardd" ), group );
+ label = new TQLabel( i18n( "e.g. ssh -l root remote.host.org ksysguardd" ), group );
groupLayout->addMultiCellWidget( label, 3, 3, 2, 3 );
layout->addMultiCellWidget( group, 1, 1, 0, 1 );
- connect( mUseCustom, SIGNAL( toggled( bool ) ),
- mCommands, SLOT( setEnabled( bool ) ) );
- connect( mUseDaemon, SIGNAL( toggled( bool ) ),
- mPort, SLOT( setEnabled( bool ) ) );
- connect( mHostNames->lineEdit(), SIGNAL( textChanged ( const QString & ) ),
- this, SLOT( slotHostNameChanged( const QString & ) ) );
+ connect( mUseCustom, TQT_SIGNAL( toggled( bool ) ),
+ mCommands, TQT_SLOT( setEnabled( bool ) ) );
+ connect( mUseDaemon, TQT_SIGNAL( toggled( bool ) ),
+ mPort, TQT_SLOT( setEnabled( bool ) ) );
+ connect( mHostNames->lineEdit(), TQT_SIGNAL( textChanged ( const TQString & ) ),
+ this, TQT_SLOT( slotHostNameChanged( const TQString & ) ) );
enableButtonOK( !mHostNames->lineEdit()->text().isEmpty() );
KAcceleratorManager::manage( this );
}
@@ -125,19 +125,19 @@ HostConnector::~HostConnector()
{
}
-void HostConnector::slotHostNameChanged( const QString &_text )
+void HostConnector::slotHostNameChanged( const TQString &_text )
{
enableButtonOK( !_text.isEmpty() );
}
-void HostConnector::setHostNames( const QStringList &list )
+void HostConnector::setHostNames( const TQStringList &list )
{
mHostNames->insertStringList( list );
}
-QStringList HostConnector::hostNames() const
+TQStringList HostConnector::hostNames() const
{
- QStringList list;
+ TQStringList list;
for ( int i = 0; i < mHostNames->count(); ++i )
list.append( mHostNames->text( i ) );
@@ -145,14 +145,14 @@ QStringList HostConnector::hostNames() const
return list;
}
-void HostConnector::setCommands( const QStringList &list )
+void HostConnector::setCommands( const TQStringList &list )
{
mCommands->insertStringList( list );
}
-QStringList HostConnector::commands() const
+TQStringList HostConnector::commands() const
{
- QStringList list;
+ TQStringList list;
for ( int i = 0; i < mCommands->count(); ++i )
list.append( mCommands->text( i ) );
@@ -160,7 +160,7 @@ QStringList HostConnector::commands() const
return list;
}
-void HostConnector::setCurrentHostName( const QString &hostName )
+void HostConnector::setCurrentHostName( const TQString &hostName )
{
if ( !hostName.isEmpty() ) {
mHostNames->hide();
@@ -174,12 +174,12 @@ void HostConnector::setCurrentHostName( const QString &hostName )
}
}
-QString HostConnector::currentHostName() const
+TQString HostConnector::currentHostName() const
{
return mHostNames->currentText();
}
-QString HostConnector::currentCommand() const
+TQString HostConnector::currentCommand() const
{
return mCommands->currentText();
}
diff --git a/ksysguard/gui/ksgrd/HostConnector.h b/ksysguard/gui/ksgrd/HostConnector.h
index eadf728cd..12893ff08 100644
--- a/ksysguard/gui/ksgrd/HostConnector.h
+++ b/ksysguard/gui/ksgrd/HostConnector.h
@@ -34,19 +34,19 @@ class HostConnector : public KDialogBase
Q_OBJECT
public:
- HostConnector( QWidget *parent, const char *name = 0 );
+ HostConnector( TQWidget *parent, const char *name = 0 );
~HostConnector();
- void setHostNames( const QStringList &list );
- QStringList hostNames() const;
+ void setHostNames( const TQStringList &list );
+ TQStringList hostNames() const;
- void setCommands( const QStringList &list );
- QStringList commands() const;
+ void setCommands( const TQStringList &list );
+ TQStringList commands() const;
- void setCurrentHostName( const QString &hostName );
+ void setCurrentHostName( const TQString &hostName );
- QString currentHostName() const;
- QString currentCommand() const;
+ TQString currentHostName() const;
+ TQString currentCommand() const;
int port() const;
bool useSsh() const;
@@ -56,19 +56,19 @@ class HostConnector : public KDialogBase
protected slots:
virtual void slotHelp();
- void slotHostNameChanged( const QString &_text );
+ void slotHostNameChanged( const TQString &_text );
private:
KComboBox *mCommands;
KComboBox *mHostNames;
- QLabel *mHostNameLabel;
+ TQLabel *mHostNameLabel;
- QRadioButton *mUseSsh;
- QRadioButton *mUseRsh;
- QRadioButton *mUseDaemon;
- QRadioButton *mUseCustom;
+ TQRadioButton *mUseSsh;
+ TQRadioButton *mUseRsh;
+ TQRadioButton *mUseDaemon;
+ TQRadioButton *mUseCustom;
- QSpinBox *mPort;
+ TQSpinBox *mPort;
};
#endif
diff --git a/ksysguard/gui/ksgrd/SensorAgent.cc b/ksysguard/gui/ksgrd/SensorAgent.cc
index a24bf5594..5fcb14a9c 100644
--- a/ksysguard/gui/ksgrd/SensorAgent.cc
+++ b/ksysguard/gui/ksgrd/SensorAgent.cc
@@ -55,7 +55,7 @@ SensorAgent::~SensorAgent()
{
}
-bool SensorAgent::sendRequest( const QString &req, SensorClient *client, int id )
+bool SensorAgent::sendRequest( const TQString &req, SensorClient *client, int id )
{
/* The request is registered with the FIFO so that the answer can be
* routed back to the requesting client. */
@@ -70,7 +70,7 @@ bool SensorAgent::sendRequest( const QString &req, SensorClient *client, int id
return false;
}
-void SensorAgent::processAnswer( const QString &buffer )
+void SensorAgent::processAnswer( const TQString &buffer )
{
#if SA_TRACE
kdDebug(1215) << "<- " << buffer << endl;
@@ -89,7 +89,7 @@ void SensorAgent::processAnswer( const QString &buffer )
.arg( mHostName )
.arg( mErrorBuffer ) );
}
- mErrorBuffer = QString::null;
+ mErrorBuffer = TQString::null;
}
} else if ( mState == 0 ) // receiving to answerBuffer
mAnswerBuffer += buffer[ i ];
@@ -112,7 +112,7 @@ void SensorAgent::processAnswer( const QString &buffer )
#if SA_TRACE
kdDebug(1215) << "Daemon now online!" << endl;
#endif
- mAnswerBuffer = QString::null;
+ mAnswerBuffer = TQString::null;
break;
}
@@ -121,7 +121,7 @@ void SensorAgent::processAnswer( const QString &buffer )
if ( !req ) {
kdDebug(1215) << "ERROR: Received answer but have no pending "
<< "request! : " << mAnswerBuffer.left( end ) << endl;
- mAnswerBuffer = QString::null;
+ mAnswerBuffer = TQString::null;
} else {
if ( !req->client() ) {
/* The client has disappeared before receiving the answer
@@ -161,7 +161,7 @@ void SensorAgent::executeCommand()
<< "/" << mProcessingFIFO.count() << ")" << endl;
#endif
// send request to daemon
- QString cmdWithNL = req->request() + "\n";
+ TQString cmdWithNL = req->request() + "\n";
if ( writeMsg( cmdWithNL.ascii(), cmdWithNL.length() ) )
mTransmitting = true;
else
@@ -207,18 +207,18 @@ bool SensorAgent::transmitting() const
return mTransmitting;
}
-void SensorAgent::setHostName( const QString &hostName )
+void SensorAgent::setHostName( const TQString &hostName )
{
mHostName = hostName;
}
-const QString &SensorAgent::hostName() const
+const TQString &SensorAgent::hostName() const
{
return mHostName;
}
-SensorRequest::SensorRequest( const QString &request, SensorClient *client, int id )
+SensorRequest::SensorRequest( const TQString &request, SensorClient *client, int id )
: mRequest( request ), mClient( client ), mId( id )
{
}
@@ -227,12 +227,12 @@ SensorRequest::~SensorRequest()
{
}
-void SensorRequest::setRequest( const QString &request )
+void SensorRequest::setRequest( const TQString &request )
{
mRequest = request;
}
-QString SensorRequest::request() const
+TQString SensorRequest::request() const
{
return mRequest;
}
diff --git a/ksysguard/gui/ksgrd/SensorAgent.h b/ksysguard/gui/ksgrd/SensorAgent.h
index e30deb510..0bf776547 100644
--- a/ksysguard/gui/ksgrd/SensorAgent.h
+++ b/ksysguard/gui/ksgrd/SensorAgent.h
@@ -21,8 +21,8 @@
#ifndef KSG_SENSORAGENT_H
#define KSG_SENSORAGENT_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
class KProcess;
class KShellProcess;
@@ -51,8 +51,8 @@ class KDE_EXPORT SensorAgent : public QObject
SensorAgent( SensorManager *sm );
virtual ~SensorAgent();
- virtual bool start( const QString &host, const QString &shell,
- const QString &command = "", int port = -1 ) = 0;
+ virtual bool start( const TQString &host, const TQString &shell,
+ const TQString &command = "", int port = -1 ) = 0;
/**
This function should only be used by the the SensorManager and
@@ -66,19 +66,19 @@ class KDE_EXPORT SensorAgent : public QObject
used by the SensorAgent. So it can be any value the client suits to
use.
*/
- bool sendRequest( const QString &req, SensorClient *client, int id = 0 );
+ bool sendRequest( const TQString &req, SensorClient *client, int id = 0 );
- virtual void hostInfo( QString &sh, QString &cmd, int &port ) const = 0;
+ virtual void hostInfo( TQString &sh, TQString &cmd, int &port ) const = 0;
void disconnectClient( SensorClient *client );
- const QString &hostName() const;
+ const TQString &hostName() const;
signals:
void reconfigure( const SensorAgent* );
protected:
- void processAnswer( const QString &buffer );
+ void processAnswer( const TQString &buffer );
void executeCommand();
SensorManager *sensorManager();
@@ -89,23 +89,23 @@ class KDE_EXPORT SensorAgent : public QObject
void setTransmitting( bool value );
bool transmitting() const;
- void setHostName( const QString &hostName );
+ void setHostName( const TQString &hostName );
private:
virtual bool writeMsg( const char *msg, int len ) = 0;
virtual bool txReady() = 0;
int mState;
- QPtrList<SensorRequest> mInputFIFO;
- QPtrList<SensorRequest> mProcessingFIFO;
- QString mAnswerBuffer;
- QString mErrorBuffer;
+ TQPtrList<SensorRequest> mInputFIFO;
+ TQPtrList<SensorRequest> mProcessingFIFO;
+ TQString mAnswerBuffer;
+ TQString mErrorBuffer;
SensorManager *mSensorManager;
bool mDaemonOnLine;
bool mTransmitting;
- QString mHostName;
+ TQString mHostName;
};
/**
@@ -114,11 +114,11 @@ class KDE_EXPORT SensorAgent : public QObject
class SensorRequest
{
public:
- SensorRequest( const QString &request, SensorClient *client, int id );
+ SensorRequest( const TQString &request, SensorClient *client, int id );
~SensorRequest();
- void setRequest( const QString& );
- QString request() const;
+ void setRequest( const TQString& );
+ TQString request() const;
void setClient( SensorClient* );
SensorClient *client();
@@ -127,7 +127,7 @@ class SensorRequest
int id();
private:
- QString mRequest;
+ TQString mRequest;
SensorClient *mClient;
int mId;
};
diff --git a/ksysguard/gui/ksgrd/SensorClient.h b/ksysguard/gui/ksgrd/SensorClient.h
index 30586a8a2..d4e286cb1 100644
--- a/ksysguard/gui/ksgrd/SensorClient.h
+++ b/ksysguard/gui/ksgrd/SensorClient.h
@@ -24,8 +24,8 @@
#ifndef KSG_SENSORCLIENT_H
#define KSG_SENSORCLIENT_H
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
namespace KSGRD {
@@ -46,7 +46,7 @@ class SensorClient
been received by the sensor agent. This function must be reimplemented
by the sensor client to receive and process this information.
*/
- virtual void answerReceived( int, const QString& ) { }
+ virtual void answerReceived( int, const TQString& ) { }
/**
In case of an unexpected fatal problem with the sensor the sensor
@@ -81,14 +81,14 @@ class SensorBoard
class SensorTokenizer
{
public:
- SensorTokenizer( const QString &info, QChar separator )
+ SensorTokenizer( const TQString &info, TQChar separator )
{
- mTokens = QStringList::split( separator, info );
+ mTokens = TQStringList::split( separator, info );
}
~SensorTokenizer() { }
- const QString& operator[]( unsigned idx )
+ const TQString& operator[]( unsigned idx )
{
return mTokens[ idx ];
}
@@ -99,7 +99,7 @@ class SensorTokenizer
}
private:
- QStringList mTokens;
+ TQStringList mTokens;
};
/**
@@ -110,12 +110,12 @@ class SensorTokenizer
class SensorIntegerInfo : public SensorTokenizer
{
public:
- SensorIntegerInfo( const QString &info )
+ SensorIntegerInfo( const TQString &info )
: SensorTokenizer( info, '\t' ) { }
~SensorIntegerInfo() { }
- const QString &name()
+ const TQString &name()
{
return (*this)[ 0 ];
}
@@ -130,7 +130,7 @@ class SensorIntegerInfo : public SensorTokenizer
return (*this)[ 2 ].toLong();
}
- const QString &unit()
+ const TQString &unit()
{
return (*this)[ 3 ];
}
@@ -144,12 +144,12 @@ class SensorIntegerInfo : public SensorTokenizer
class SensorFloatInfo : public SensorTokenizer
{
public:
- SensorFloatInfo( const QString &info )
+ SensorFloatInfo( const TQString &info )
: SensorTokenizer( info, '\t' ) { }
~SensorFloatInfo() { }
- const QString &name()
+ const TQString &name()
{
return (*this)[ 0 ];
}
@@ -164,7 +164,7 @@ class SensorFloatInfo : public SensorTokenizer
return (*this)[ 2 ].toDouble();
}
- const QString &unit()
+ const TQString &unit()
{
return (*this)[ 3 ];
}
@@ -178,12 +178,12 @@ class SensorFloatInfo : public SensorTokenizer
class SensorPSLine : public SensorTokenizer
{
public:
- SensorPSLine( const QString &line )
+ SensorPSLine( const TQString &line )
: SensorTokenizer( line, '\t' ) { }
~SensorPSLine() { }
- const QString& name()
+ const TQString& name()
{
return (*this)[ 0 ];
}
diff --git a/ksysguard/gui/ksgrd/SensorManager.cc b/ksysguard/gui/ksgrd/SensorManager.cc
index 065da717a..43f878cda 100644
--- a/ksysguard/gui/ksgrd/SensorManager.cc
+++ b/ksysguard/gui/ksgrd/SensorManager.cc
@@ -21,11 +21,11 @@
*/
-#include <qcombobox.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qspinbox.h>
+#include <tqcombobox.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqradiobutton.h>
+#include <tqspinbox.h>
#include <kapplication.h>
#include <kdebug.h>
@@ -47,106 +47,106 @@ SensorManager::SensorManager()
mDict.setAutoDelete( true );
// Fill the sensor description dictionary.
- mDict.insert( "cpu", new QString( i18n( "CPU Load" ) ) );
- mDict.insert( "idle", new QString( i18n( "Idle Load" ) ) );
- mDict.insert( "sys", new QString( i18n( "System Load" ) ) );
- mDict.insert( "nice", new QString( i18n( "Nice Load" ) ) );
- mDict.insert( "user", new QString( i18n( "User Load" ) ) );
- mDict.insert( "mem", new QString( i18n( "Memory" ) ) );
- mDict.insert( "physical", new QString( i18n( "Physical Memory" ) ) );
- mDict.insert( "swap", new QString( i18n( "Swap Memory" ) ) );
- mDict.insert( "cached", new QString( i18n( "Cached Memory" ) ) );
- mDict.insert( "buf", new QString( i18n( "Buffered Memory" ) ) );
- mDict.insert( "used", new QString( i18n( "Used Memory" ) ) );
- mDict.insert( "application", new QString( i18n( "Application Memory" ) ) );
- mDict.insert( "free", new QString( i18n( "Free Memory" ) ) );
- mDict.insert( "pscount", new QString( i18n( "Process Count" ) ) );
- mDict.insert( "ps", new QString( i18n( "Process Controller" ) ) );
- mDict.insert( "disk", new QString( i18n( "Disk Throughput" ) ) );
- mDict.insert( "load", new QString( i18n( "CPU Load", "Load" ) ) );
- mDict.insert( "total", new QString( i18n( "Total Accesses" ) ) );
- mDict.insert( "rio", new QString( i18n( "Read Accesses" ) ) );
- mDict.insert( "wio", new QString( i18n( "Write Accesses" ) ) );
- mDict.insert( "rblk", new QString( i18n( "Read Data" ) ) );
- mDict.insert( "wblk", new QString( i18n( "Write Data" ) ) );
- mDict.insert( "pageIn", new QString( i18n( "Pages In" ) ) );
- mDict.insert( "pageOut", new QString( i18n( "Pages Out" ) ) );
- mDict.insert( "context", new QString( i18n( "Context Switches" ) ) );
- mDict.insert( "network", new QString( i18n( "Network" ) ) );
- mDict.insert( "interfaces", new QString( i18n( "Interfaces" ) ) );
- mDict.insert( "receiver", new QString( i18n( "Receiver" ) ) );
- mDict.insert( "transmitter", new QString( i18n( "Transmitter" ) ) );
- mDict.insert( "data", new QString( i18n( "Data" ) ) );
- mDict.insert( "compressed", new QString( i18n( "Compressed Packets" ) ) );
- mDict.insert( "drops", new QString( i18n( "Dropped Packets" ) ) );
- mDict.insert( "errors", new QString( i18n( "Errors" ) ) );
- mDict.insert( "fifo", new QString( i18n( "FIFO Overruns" ) ) );
- mDict.insert( "frame", new QString( i18n( "Frame Errors" ) ) );
- mDict.insert( "multicast", new QString( i18n( "Multicast" ) ) );
- mDict.insert( "packets", new QString( i18n( "Packets" ) ) );
- mDict.insert( "carrier", new QString( i18n( "Carrier" ) ) );
- mDict.insert( "collisions", new QString( i18n( "Collisions" ) ) );
- mDict.insert( "sockets", new QString( i18n( "Sockets" ) ) );
- mDict.insert( "count", new QString( i18n( "Total Number" ) ) );
- mDict.insert( "list", new QString( i18n( "Table" ) ) );
- mDict.insert( "apm", new QString( i18n( "Advanced Power Management" ) ) );
- mDict.insert( "acpi", new QString( i18n( "ACPI" ) ) );
- mDict.insert( "thermal_zone", new QString( i18n( "Thermal Zone" ) ) );
- mDict.insert( "temperature", new QString( i18n( "Temperature" ) ) );
- mDict.insert( "fan", new QString( i18n( "Fan" ) ) );
- mDict.insert( "state", new QString( i18n( "State" ) ) );
- mDict.insert( "battery", new QString( i18n( "Battery" ) ) );
- mDict.insert( "batterycharge", new QString( i18n( "Battery Charge" ) ) );
- mDict.insert( "batteryusage", new QString( i18n( "Battery Usage" ) ) );
- mDict.insert( "remainingtime", new QString( i18n( "Remaining Time" ) ) );
- mDict.insert( "interrupts", new QString( i18n( "Interrupts" ) ) );
- mDict.insert( "loadavg1", new QString( i18n( "Load Average (1 min)" ) ) );
- mDict.insert( "loadavg5", new QString( i18n( "Load Average (5 min)" ) ) );
- mDict.insert( "loadavg15", new QString( i18n( "Load Average (15 min)" ) ) );
- mDict.insert( "clock", new QString( i18n( "Clock Frequency" ) ) );
- mDict.insert( "lmsensors", new QString( i18n( "Hardware Sensors" ) ) );
- mDict.insert( "partitions", new QString( i18n( "Partition Usage" ) ) );
- mDict.insert( "usedspace", new QString( i18n( "Used Space" ) ) );
- mDict.insert( "freespace", new QString( i18n( "Free Space" ) ) );
- mDict.insert( "filllevel", new QString( i18n( "Fill Level" ) ) );
+ mDict.insert( "cpu", new TQString( i18n( "CPU Load" ) ) );
+ mDict.insert( "idle", new TQString( i18n( "Idle Load" ) ) );
+ mDict.insert( "sys", new TQString( i18n( "System Load" ) ) );
+ mDict.insert( "nice", new TQString( i18n( "Nice Load" ) ) );
+ mDict.insert( "user", new TQString( i18n( "User Load" ) ) );
+ mDict.insert( "mem", new TQString( i18n( "Memory" ) ) );
+ mDict.insert( "physical", new TQString( i18n( "Physical Memory" ) ) );
+ mDict.insert( "swap", new TQString( i18n( "Swap Memory" ) ) );
+ mDict.insert( "cached", new TQString( i18n( "Cached Memory" ) ) );
+ mDict.insert( "buf", new TQString( i18n( "Buffered Memory" ) ) );
+ mDict.insert( "used", new TQString( i18n( "Used Memory" ) ) );
+ mDict.insert( "application", new TQString( i18n( "Application Memory" ) ) );
+ mDict.insert( "free", new TQString( i18n( "Free Memory" ) ) );
+ mDict.insert( "pscount", new TQString( i18n( "Process Count" ) ) );
+ mDict.insert( "ps", new TQString( i18n( "Process Controller" ) ) );
+ mDict.insert( "disk", new TQString( i18n( "Disk Throughput" ) ) );
+ mDict.insert( "load", new TQString( i18n( "CPU Load", "Load" ) ) );
+ mDict.insert( "total", new TQString( i18n( "Total Accesses" ) ) );
+ mDict.insert( "rio", new TQString( i18n( "Read Accesses" ) ) );
+ mDict.insert( "wio", new TQString( i18n( "Write Accesses" ) ) );
+ mDict.insert( "rblk", new TQString( i18n( "Read Data" ) ) );
+ mDict.insert( "wblk", new TQString( i18n( "Write Data" ) ) );
+ mDict.insert( "pageIn", new TQString( i18n( "Pages In" ) ) );
+ mDict.insert( "pageOut", new TQString( i18n( "Pages Out" ) ) );
+ mDict.insert( "context", new TQString( i18n( "Context Switches" ) ) );
+ mDict.insert( "network", new TQString( i18n( "Network" ) ) );
+ mDict.insert( "interfaces", new TQString( i18n( "Interfaces" ) ) );
+ mDict.insert( "receiver", new TQString( i18n( "Receiver" ) ) );
+ mDict.insert( "transmitter", new TQString( i18n( "Transmitter" ) ) );
+ mDict.insert( "data", new TQString( i18n( "Data" ) ) );
+ mDict.insert( "compressed", new TQString( i18n( "Compressed Packets" ) ) );
+ mDict.insert( "drops", new TQString( i18n( "Dropped Packets" ) ) );
+ mDict.insert( "errors", new TQString( i18n( "Errors" ) ) );
+ mDict.insert( "fifo", new TQString( i18n( "FIFO Overruns" ) ) );
+ mDict.insert( "frame", new TQString( i18n( "Frame Errors" ) ) );
+ mDict.insert( "multicast", new TQString( i18n( "Multicast" ) ) );
+ mDict.insert( "packets", new TQString( i18n( "Packets" ) ) );
+ mDict.insert( "carrier", new TQString( i18n( "Carrier" ) ) );
+ mDict.insert( "collisions", new TQString( i18n( "Collisions" ) ) );
+ mDict.insert( "sockets", new TQString( i18n( "Sockets" ) ) );
+ mDict.insert( "count", new TQString( i18n( "Total Number" ) ) );
+ mDict.insert( "list", new TQString( i18n( "Table" ) ) );
+ mDict.insert( "apm", new TQString( i18n( "Advanced Power Management" ) ) );
+ mDict.insert( "acpi", new TQString( i18n( "ACPI" ) ) );
+ mDict.insert( "thermal_zone", new TQString( i18n( "Thermal Zone" ) ) );
+ mDict.insert( "temperature", new TQString( i18n( "Temperature" ) ) );
+ mDict.insert( "fan", new TQString( i18n( "Fan" ) ) );
+ mDict.insert( "state", new TQString( i18n( "State" ) ) );
+ mDict.insert( "battery", new TQString( i18n( "Battery" ) ) );
+ mDict.insert( "batterycharge", new TQString( i18n( "Battery Charge" ) ) );
+ mDict.insert( "batteryusage", new TQString( i18n( "Battery Usage" ) ) );
+ mDict.insert( "remainingtime", new TQString( i18n( "Remaining Time" ) ) );
+ mDict.insert( "interrupts", new TQString( i18n( "Interrupts" ) ) );
+ mDict.insert( "loadavg1", new TQString( i18n( "Load Average (1 min)" ) ) );
+ mDict.insert( "loadavg5", new TQString( i18n( "Load Average (5 min)" ) ) );
+ mDict.insert( "loadavg15", new TQString( i18n( "Load Average (15 min)" ) ) );
+ mDict.insert( "clock", new TQString( i18n( "Clock Frequency" ) ) );
+ mDict.insert( "lmsensors", new TQString( i18n( "Hardware Sensors" ) ) );
+ mDict.insert( "partitions", new TQString( i18n( "Partition Usage" ) ) );
+ mDict.insert( "usedspace", new TQString( i18n( "Used Space" ) ) );
+ mDict.insert( "freespace", new TQString( i18n( "Free Space" ) ) );
+ mDict.insert( "filllevel", new TQString( i18n( "Fill Level" ) ) );
for ( int i = 0; i < 32; i++ ) {
- mDict.insert( "cpu" + QString::number( i ),
- new QString( QString( i18n( "CPU%1" ) ).arg( i ) ) );
- mDict.insert( "disk" + QString::number( i ),
- new QString( QString( i18n( "Disk%1" ) ).arg( i ) ) );
+ mDict.insert( "cpu" + TQString::number( i ),
+ new TQString( TQString( i18n( "CPU%1" ) ).arg( i ) ) );
+ mDict.insert( "disk" + TQString::number( i ),
+ new TQString( TQString( i18n( "Disk%1" ) ).arg( i ) ) );
}
for ( int i = 0; i < 6; i++) {
- mDict.insert( "fan" + QString::number( i ),
- new QString( QString( i18n( "Fan%1" ) ).arg( i ) ) );
- mDict.insert( "temp" + QString::number( i ),
- new QString( QString( i18n( "Temperature%1" ) ).arg( i ) ) );
+ mDict.insert( "fan" + TQString::number( i ),
+ new TQString( TQString( i18n( "Fan%1" ) ).arg( i ) ) );
+ mDict.insert( "temp" + TQString::number( i ),
+ new TQString( TQString( i18n( "Temperature%1" ) ).arg( i ) ) );
}
- mDict.insert( "int00", new QString( i18n( "Total" ) ) );
+ mDict.insert( "int00", new TQString( i18n( "Total" ) ) );
- QString num;
+ TQString num;
for ( int i = 1; i < 25; i++ ) {
num.sprintf( "%.2d", i );
mDict.insert( "int" + num,
- new QString( QString( i18n( "Int%1" ) ).arg( i - 1, 3 ) ) );
+ new TQString( TQString( i18n( "Int%1" ) ).arg( i - 1, 3 ) ) );
}
mDescriptions.setAutoDelete( true );
// TODO: translated descriptions not yet implemented.
mUnits.setAutoDelete( true );
- mUnits.insert( "1/s", new QString( i18n( "the unit 1 per second", "1/s" ) ) );
- mUnits.insert( "kBytes", new QString( i18n( "kBytes" ) ) );
- mUnits.insert( "min", new QString( i18n( "the unit minutes", "min" ) ) );
- mUnits.insert( "MHz", new QString( i18n( "the frequency unit", "MHz" ) ) );
+ mUnits.insert( "1/s", new TQString( i18n( "the unit 1 per second", "1/s" ) ) );
+ mUnits.insert( "kBytes", new TQString( i18n( "kBytes" ) ) );
+ mUnits.insert( "min", new TQString( i18n( "the unit minutes", "min" ) ) );
+ mUnits.insert( "MHz", new TQString( i18n( "the frequency unit", "MHz" ) ) );
mTypes.setAutoDelete( true );
- mTypes.insert( "integer", new QString( i18n( "Integer Value" ) ) );
- mTypes.insert( "float", new QString( i18n( "Floating Point Value" ) ) );
- mTypes.insert( "table", new QString( i18n( "Process Controller" ) ) );
- mTypes.insert( "listview", new QString( i18n( "Table" ) ) );
+ mTypes.insert( "integer", new TQString( i18n( "Integer Value" ) ) );
+ mTypes.insert( "float", new TQString( i18n( "Floating Point Value" ) ) );
+ mTypes.insert( "table", new TQString( i18n( "Process Controller" ) ) );
+ mTypes.insert( "listview", new TQString( i18n( "Table" ) ) );
mBroadcaster = 0;
@@ -158,7 +158,7 @@ SensorManager::~SensorManager()
delete mHostConnector;
}
-bool SensorManager::engageHost( const QString &hostName )
+bool SensorManager::engageHost( const TQString &hostName )
{
bool retVal = true;
@@ -171,8 +171,8 @@ bool SensorManager::engageHost( const QString &hostName )
mHostConnector->setCurrentHostName( hostName );
if ( mHostConnector->exec() ) {
- QString shell = "";
- QString command = "";
+ TQString shell = "";
+ TQString command = "";
int port = -1;
/* Check which radio button is selected and set parameters
@@ -197,8 +197,8 @@ bool SensorManager::engageHost( const QString &hostName )
return retVal;
}
-bool SensorManager::engage( const QString &hostName, const QString &shell,
- const QString &command, int port )
+bool SensorManager::engage( const TQString &hostName, const TQString &shell,
+ const TQString &command, int port )
{
SensorAgent *agent;
@@ -214,8 +214,8 @@ bool SensorManager::engage( const QString &hostName, const QString &shell,
}
mAgents.insert( hostName, agent );
- connect( agent, SIGNAL( reconfigure( const SensorAgent* ) ),
- SLOT( reconfigure( const SensorAgent* ) ) );
+ connect( agent, TQT_SIGNAL( reconfigure( const SensorAgent* ) ),
+ TQT_SLOT( reconfigure( const SensorAgent* ) ) );
emit update();
return true;
@@ -232,13 +232,13 @@ void SensorManager::requestDisengage( const SensorAgent *agent )
* while we are still in a SensorAgent member function.
* So we have to post an event which is later caught by
* SensorManger::customEvent(). */
- QCustomEvent* event = new QCustomEvent( QEvent::User, (void*)agent );
+ TQCustomEvent* event = new TQCustomEvent( TQEvent::User, (void*)agent );
kapp->postEvent( this, event );
}
bool SensorManager::disengage( const SensorAgent *agent )
{
- QDictIterator<SensorAgent> it( mAgents );
+ TQDictIterator<SensorAgent> it( mAgents );
for ( ; it.current(); ++it )
if ( it.current() == agent ) {
@@ -250,7 +250,7 @@ bool SensorManager::disengage( const SensorAgent *agent )
return false;
}
-bool SensorManager::disengage( const QString &hostName )
+bool SensorManager::disengage( const TQString &hostName )
{
SensorAgent *agent;
if ( ( agent = mAgents.find( hostName ) ) != 0 ) {
@@ -262,14 +262,14 @@ bool SensorManager::disengage( const QString &hostName )
return false;
}
-bool SensorManager::resynchronize( const QString &hostName )
+bool SensorManager::resynchronize( const TQString &hostName )
{
SensorAgent *agent;
if ( ( agent = mAgents.find( hostName ) ) == 0 )
return false;
- QString shell, command;
+ TQString shell, command;
int port;
hostInfo( hostName, shell, command, port );
@@ -285,26 +285,26 @@ void SensorManager::hostLost( const SensorAgent *agent )
emit hostConnectionLost( agent->hostName() );
if ( mBroadcaster ) {
- QCustomEvent *event = new QCustomEvent( QEvent::User );
- event->setData( new QString( i18n( "Connection to %1 has been lost." )
+ TQCustomEvent *event = new TQCustomEvent( TQEvent::User );
+ event->setData( new TQString( i18n( "Connection to %1 has been lost." )
.arg( agent->hostName() ) ) );
kapp->postEvent( mBroadcaster, event );
}
}
-void SensorManager::notify( const QString &msg ) const
+void SensorManager::notify( const TQString &msg ) const
{
/* This function relays text messages to the toplevel widget that
* displays the message in a pop-up box. It must be used for objects
* that might have been deleted before the pop-up box is closed. */
if ( mBroadcaster ) {
- QCustomEvent *event = new QCustomEvent( QEvent::User );
- event->setData( new QString( msg ) );
+ TQCustomEvent *event = new TQCustomEvent( TQEvent::User );
+ event->setData( new TQString( msg ) );
kapp->postEvent( mBroadcaster, event );
}
}
-void SensorManager::setBroadcaster( QWidget *wdg )
+void SensorManager::setBroadcaster( TQWidget *wdg )
{
mBroadcaster = wdg;
}
@@ -314,17 +314,17 @@ void SensorManager::reconfigure( const SensorAgent* )
emit update();
}
-bool SensorManager::event( QEvent *event )
+bool SensorManager::event( TQEvent *event )
{
- if ( event->type() == QEvent::User ) {
- disengage( (const SensorAgent*)((QCustomEvent*)event)->data() );
+ if ( event->type() == TQEvent::User ) {
+ disengage( (const SensorAgent*)((TQCustomEvent*)event)->data() );
return true;
}
return false;
}
-bool SensorManager::sendRequest( const QString &hostName, const QString &req,
+bool SensorManager::sendRequest( const TQString &hostName, const TQString &req,
SensorClient *client, int id )
{
SensorAgent *agent = mAgents.find( hostName );
@@ -341,9 +341,9 @@ bool SensorManager::sendRequest( const QString &hostName, const QString &req,
return false;
}
-const QString SensorManager::hostName( const SensorAgent *agent) const
+const TQString SensorManager::hostName( const SensorAgent *agent) const
{
- QDictIterator<SensorAgent> it( mAgents );
+ TQDictIterator<SensorAgent> it( mAgents );
while ( it.current() ) {
if ( it.current() == agent )
@@ -351,11 +351,11 @@ const QString SensorManager::hostName( const SensorAgent *agent) const
++it;
}
- return QString::null;
+ return TQString::null;
}
-bool SensorManager::hostInfo( const QString &hostName, QString &shell,
- QString &command, int &port )
+bool SensorManager::hostInfo( const TQString &hostName, TQString &shell,
+ TQString &command, int &port )
{
SensorAgent *agent;
if ( ( agent = mAgents.find( hostName ) ) != 0 ) {
@@ -366,7 +366,7 @@ bool SensorManager::hostInfo( const QString &hostName, QString &shell,
return false;
}
-const QString &SensorManager::translateUnit( const QString &unit ) const
+const TQString &SensorManager::translateUnit( const TQString &unit ) const
{
if ( !unit.isEmpty() && mUnits[ unit ] )
return *mUnits[ unit ];
@@ -374,7 +374,7 @@ const QString &SensorManager::translateUnit( const QString &unit ) const
return unit;
}
-const QString &SensorManager::translateSensorPath( const QString &path ) const
+const TQString &SensorManager::translateSensorPath( const TQString &path ) const
{
if ( !path.isEmpty() && mDict[ path ] )
return *mDict[ path ];
@@ -382,7 +382,7 @@ const QString &SensorManager::translateSensorPath( const QString &path ) const
return path;
}
-const QString &SensorManager::translateSensorType( const QString &type ) const
+const TQString &SensorManager::translateSensorType( const TQString &type ) const
{
if ( !type.isEmpty() && mTypes[ type ] )
return *mTypes[ type ];
@@ -390,9 +390,9 @@ const QString &SensorManager::translateSensorType( const QString &type ) const
return type;
}
-QString SensorManager::translateSensor( const QString &sensor ) const
+TQString SensorManager::translateSensor( const TQString &sensor ) const
{
- QString token, out;
+ TQString token, out;
int start = 0, end = 0;
for ( ; ; ) {
end = sensor.find( '/', start );
@@ -423,7 +423,7 @@ SensorManager::saveProperties( KConfig *cfg )
void SensorManager::disconnectClient( SensorClient *client )
{
- QDictIterator<SensorAgent> it( mAgents );
+ TQDictIterator<SensorAgent> it( mAgents );
for ( ; it.current(); ++it)
it.current()->disconnectClient( client );
diff --git a/ksysguard/gui/ksgrd/SensorManager.h b/ksysguard/gui/ksgrd/SensorManager.h
index 8eb778009..7f4e85da7 100644
--- a/ksysguard/gui/ksgrd/SensorManager.h
+++ b/ksysguard/gui/ksgrd/SensorManager.h
@@ -23,8 +23,8 @@
#include <kconfig.h>
-#include <qdict.h>
-#include <qobject.h>
+#include <tqdict.h>
+#include <tqobject.h>
#include <SensorAgent.h>
@@ -53,32 +53,32 @@ class KDE_EXPORT SensorManager : public QObject
SensorManager();
~SensorManager();
- bool engageHost( const QString &hostName );
- bool engage( const QString &hostName, const QString &shell = "ssh",
- const QString &command = "", int port = -1 );
+ bool engageHost( const TQString &hostName );
+ bool engage( const TQString &hostName, const TQString &shell = "ssh",
+ const TQString &command = "", int port = -1 );
void requestDisengage( const SensorAgent *agent );
bool disengage( const SensorAgent *agent );
- bool disengage( const QString &hostName );
- bool resynchronize( const QString &hostName );
+ bool disengage( const TQString &hostName );
+ bool resynchronize( const TQString &hostName );
void hostLost( const SensorAgent *agent );
- void notify( const QString &msg ) const;
+ void notify( const TQString &msg ) const;
- void setBroadcaster( QWidget *wdg );
+ void setBroadcaster( TQWidget *wdg );
- virtual bool event( QEvent *event );
+ virtual bool event( TQEvent *event );
- bool sendRequest( const QString &hostName, const QString &request,
+ bool sendRequest( const TQString &hostName, const TQString &request,
SensorClient *client, int id = 0 );
- const QString hostName( const SensorAgent *sensor ) const;
- bool hostInfo( const QString &host, QString &shell,
- QString &command, int &port );
+ const TQString hostName( const SensorAgent *sensor ) const;
+ bool hostInfo( const TQString &host, TQString &shell,
+ TQString &command, int &port );
- const QString& translateUnit( const QString &unit ) const;
- const QString& translateSensorPath( const QString &path ) const;
- const QString& translateSensorType( const QString &type ) const;
- QString translateSensor(const QString& u) const;
+ const TQString& translateUnit( const TQString &unit ) const;
+ const TQString& translateSensorPath( const TQString &path ) const;
+ const TQString& translateSensorType( const TQString &type ) const;
+ TQString translateSensor(const TQString& u) const;
void readProperties( KConfig *cfg );
void saveProperties( KConfig *cfg );
@@ -90,33 +90,33 @@ class KDE_EXPORT SensorManager : public QObject
signals:
void update();
- void hostConnectionLost( const QString &hostName );
+ void hostConnectionLost( const TQString &hostName );
protected:
- QDict<SensorAgent> mAgents;
+ TQDict<SensorAgent> mAgents;
private:
/**
These dictionary stores the localized versions of the sensor
descriptions and units.
*/
- QDict<QString> mDescriptions;
- QDict<QString> mUnits;
- QDict<QString> mDict;
- QDict<QString> mTypes;
+ TQDict<TQString> mDescriptions;
+ TQDict<TQString> mUnits;
+ TQDict<TQString> mDict;
+ TQDict<TQString> mTypes;
- QWidget* mBroadcaster;
+ TQWidget* mBroadcaster;
HostConnector* mHostConnector;
};
KDE_EXPORT extern SensorManager* SensorMgr;
-class KDE_EXPORT SensorManagerIterator : public QDictIterator<SensorAgent>
+class KDE_EXPORT SensorManagerIterator : public TQDictIterator<SensorAgent>
{
public:
SensorManagerIterator( const SensorManager *sm )
- : QDictIterator<SensorAgent>( sm->mAgents ) { }
+ : TQDictIterator<SensorAgent>( sm->mAgents ) { }
~SensorManagerIterator() { }
};
diff --git a/ksysguard/gui/ksgrd/SensorShellAgent.cc b/ksysguard/gui/ksgrd/SensorShellAgent.cc
index 0f06e88fe..8081aa49d 100644
--- a/ksysguard/gui/ksgrd/SensorShellAgent.cc
+++ b/ksysguard/gui/ksgrd/SensorShellAgent.cc
@@ -45,8 +45,8 @@ SensorShellAgent::~SensorShellAgent()
}
}
-bool SensorShellAgent::start( const QString &host, const QString &shell,
- const QString &command, int )
+bool SensorShellAgent::start( const TQString &host, const TQString &shell,
+ const TQString &command, int )
{
mRetryCount = 3;
mDaemon = new KProcess;
@@ -55,16 +55,16 @@ bool SensorShellAgent::start( const QString &host, const QString &shell,
mShell = shell;
mCommand = command;
- connect( mDaemon, SIGNAL( processExited( KProcess* ) ),
- SLOT( daemonExited( KProcess* ) ) );
- connect( mDaemon, SIGNAL( receivedStdout( KProcess*, char*, int ) ),
- SLOT( msgRcvd( KProcess*, char*, int ) ) );
- connect( mDaemon, SIGNAL( receivedStderr( KProcess*, char*, int ) ),
- SLOT( errMsgRcvd( KProcess*, char*, int ) ) );
- connect( mDaemon, SIGNAL( wroteStdin( KProcess* ) ),
- SLOT( msgSent( KProcess* ) ) );
+ connect( mDaemon, TQT_SIGNAL( processExited( KProcess* ) ),
+ TQT_SLOT( daemonExited( KProcess* ) ) );
+ connect( mDaemon, TQT_SIGNAL( receivedStdout( KProcess*, char*, int ) ),
+ TQT_SLOT( msgRcvd( KProcess*, char*, int ) ) );
+ connect( mDaemon, TQT_SIGNAL( receivedStderr( KProcess*, char*, int ) ),
+ TQT_SLOT( errMsgRcvd( KProcess*, char*, int ) ) );
+ connect( mDaemon, TQT_SIGNAL( wroteStdin( KProcess* ) ),
+ TQT_SLOT( msgSent( KProcess* ) ) );
- QString cmd;
+ TQString cmd;
if ( !command.isEmpty() )
cmd = command;
else
@@ -80,7 +80,7 @@ bool SensorShellAgent::start( const QString &host, const QString &shell,
return true;
}
-void SensorShellAgent::hostInfo( QString &shell, QString &command,
+void SensorShellAgent::hostInfo( TQString &shell, TQString &command,
int &port) const
{
shell = mShell;
@@ -101,7 +101,7 @@ void SensorShellAgent::msgRcvd( KProcess*, char *buffer, int buflen )
if ( !buffer || buflen == 0 )
return;
mRetryCount = 3; //we recieved an answer, so reset our retry count back to 3
- QString aux = QString::fromLocal8Bit( buffer, buflen );
+ TQString aux = TQString::fromLocal8Bit( buffer, buflen );
processAnswer( aux );
}
@@ -111,7 +111,7 @@ void SensorShellAgent::errMsgRcvd( KProcess*, char *buffer, int buflen )
if ( !buffer || buflen == 0 )
return;
- QString buf = QString::fromLocal8Bit( buffer, buflen );
+ TQString buf = TQString::fromLocal8Bit( buffer, buflen );
kdDebug(1215) << "SensorShellAgent: Warning, received text over stderr!"
<< endl << buf << endl;
diff --git a/ksysguard/gui/ksgrd/SensorShellAgent.h b/ksysguard/gui/ksgrd/SensorShellAgent.h
index e13413d55..7b588c7e1 100644
--- a/ksysguard/gui/ksgrd/SensorShellAgent.h
+++ b/ksysguard/gui/ksgrd/SensorShellAgent.h
@@ -21,9 +21,9 @@
#ifndef KSG_SENSORSHELLAGENT_H
#define KSG_SENSORSHELLAGENT_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qguardedptr.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqguardedptr.h>
#include <SensorAgent.h>
@@ -51,10 +51,10 @@ class SensorShellAgent : public SensorAgent
SensorShellAgent( SensorManager *sm );
~SensorShellAgent();
- bool start( const QString &host, const QString &shell,
- const QString &command = "", int port = -1 );
+ bool start( const TQString &host, const TQString &shell,
+ const TQString &command = "", int port = -1 );
- void hostInfo( QString &shell, QString &command, int &port) const;
+ void hostInfo( TQString &shell, TQString &command, int &port) const;
private slots:
void msgSent( KProcess* );
@@ -66,9 +66,9 @@ class SensorShellAgent : public SensorAgent
bool writeMsg( const char *msg, int len );
bool txReady();
- QGuardedPtr<KProcess> mDaemon;
- QString mShell;
- QString mCommand;
+ TQGuardedPtr<KProcess> mDaemon;
+ TQString mShell;
+ TQString mCommand;
int mRetryCount;
};
diff --git a/ksysguard/gui/ksgrd/SensorSocketAgent.cc b/ksysguard/gui/ksgrd/SensorSocketAgent.cc
index dcb5b7f3b..0fee27c95 100644
--- a/ksysguard/gui/ksgrd/SensorSocketAgent.cc
+++ b/ksysguard/gui/ksgrd/SensorSocketAgent.cc
@@ -34,10 +34,10 @@ using namespace KSGRD;
SensorSocketAgent::SensorSocketAgent( SensorManager *sm )
: SensorAgent( sm )
{
- connect( &mSocket, SIGNAL( gotError( int ) ), SLOT( error( int ) ) );
- connect( &mSocket, SIGNAL( bytesWritten( int ) ), SLOT( msgSent( int ) ) );
- connect( &mSocket, SIGNAL( readyRead() ), SLOT( msgRcvd() ) );
- connect( &mSocket, SIGNAL( closed() ), SLOT( connectionClosed() ) );
+ connect( &mSocket, TQT_SIGNAL( gotError( int ) ), TQT_SLOT( error( int ) ) );
+ connect( &mSocket, TQT_SIGNAL( bytesWritten( int ) ), TQT_SLOT( msgSent( int ) ) );
+ connect( &mSocket, TQT_SIGNAL( readyRead() ), TQT_SLOT( msgRcvd() ) );
+ connect( &mSocket, TQT_SIGNAL( closed() ), TQT_SLOT( connectionClosed() ) );
}
SensorSocketAgent::~SensorSocketAgent()
@@ -46,8 +46,8 @@ SensorSocketAgent::~SensorSocketAgent()
mSocket.flush();
}
-bool SensorSocketAgent::start( const QString &host, const QString&,
- const QString&, int port )
+bool SensorSocketAgent::start( const TQString &host, const TQString&,
+ const TQString&, int port )
{
if ( port <= 0 )
kdDebug(1215) << "SensorSocketAgent::start: Illegal port " << port << endl;
@@ -55,15 +55,15 @@ bool SensorSocketAgent::start( const QString &host, const QString&,
setHostName( host );
mPort = port;
- mSocket.connect( hostName(), QString::number(mPort) );
+ mSocket.connect( hostName(), TQString::number(mPort) );
return true;
}
-void SensorSocketAgent::hostInfo( QString &shell, QString &command, int &port ) const
+void SensorSocketAgent::hostInfo( TQString &shell, TQString &command, int &port ) const
{
- shell = QString::null;
- command = QString::null;
+ shell = TQString::null;
+ command = TQString::null;
port = mPort;
}
@@ -84,7 +84,7 @@ void SensorSocketAgent::msgRcvd()
char* buffer = new char[ buflen ];
mSocket.readBlock( buffer, buflen );
- QString buf = QString::fromLocal8Bit( buffer, buflen );
+ TQString buf = TQString::fromLocal8Bit( buffer, buflen );
delete [] buffer;
processAnswer( buf );
diff --git a/ksysguard/gui/ksgrd/SensorSocketAgent.h b/ksysguard/gui/ksgrd/SensorSocketAgent.h
index b422d3a9b..183b6d122 100644
--- a/ksysguard/gui/ksgrd/SensorSocketAgent.h
+++ b/ksysguard/gui/ksgrd/SensorSocketAgent.h
@@ -21,7 +21,7 @@
#ifndef KSG_SENSORSOCKETAGENT_H
#define KSG_SENSORSOCKETAGENT_H
-#include <qptrlist.h>
+#include <tqptrlist.h>
#include <kbufferedsocket.h>
#include <SensorAgent.h>
@@ -47,10 +47,10 @@ class SensorSocketAgent : public SensorAgent
SensorSocketAgent( SensorManager *sm );
~SensorSocketAgent();
- bool start( const QString &host, const QString &shell,
- const QString &command = "", int port = -1 );
+ bool start( const TQString &host, const TQString &shell,
+ const TQString &command = "", int port = -1 );
- void hostInfo( QString &shell, QString &command, int &port ) const;
+ void hostInfo( TQString &shell, TQString &command, int &port ) const;
private slots:
void connectionClosed();
diff --git a/ksysguard/gui/ksgrd/StyleEngine.cc b/ksysguard/gui/ksgrd/StyleEngine.cc
index ccea0a7c2..d05af4ec8 100644
--- a/ksysguard/gui/ksgrd/StyleEngine.cc
+++ b/ksysguard/gui/ksgrd/StyleEngine.cc
@@ -21,9 +21,9 @@
*/
-#include <qimage.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
+#include <tqimage.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
#include <kconfig.h>
#include <klocale.h>
@@ -38,20 +38,20 @@ StyleEngine* KSGRD::Style;
StyleEngine::StyleEngine()
{
- mFirstForegroundColor = QColor( 0x6894c9 ); // light blue
- mSecondForegroundColor = QColor( 0x6894c9 ); // light blue
- mAlarmColor = QColor( 255, 0, 0 );
- mBackgroundColor = QColor( 0x313031 ); // almost black
+ mFirstForegroundColor = TQColor( 0x6894c9 ); // light blue
+ mSecondForegroundColor = TQColor( 0x6894c9 ); // light blue
+ mAlarmColor = TQColor( 255, 0, 0 );
+ mBackgroundColor = TQColor( 0x313031 ); // almost black
mFontSize = 9;
- mSensorColors.append( QColor( 0x1889ff ) ); // soft blue
- mSensorColors.append( QColor( 0xff7f08 ) ); // reddish
- mSensorColors.append( QColor( 0xffeb14 ) ); // bright yellow
+ mSensorColors.append( TQColor( 0x1889ff ) ); // soft blue
+ mSensorColors.append( TQColor( 0xff7f08 ) ); // reddish
+ mSensorColors.append( TQColor( 0xffeb14 ) ); // bright yellow
uint v = 0x00ff00;
for ( uint i = mSensorColors.count(); i < 32; ++i ) {
v = ( ( ( v + 82 ) & 0xff ) << 23 ) | ( v >> 8 );
- mSensorColors.append( QColor( v & 0xff, ( v >> 16 ) & 0xff, ( v >> 8 ) & 0xff ) );
+ mSensorColors.append( TQColor( v & 0xff, ( v >> 16 ) & 0xff, ( v >> 8 ) & 0xff ) );
}
}
@@ -67,12 +67,12 @@ void StyleEngine::readProperties( KConfig *cfg )
mBackgroundColor = cfg->readColorEntry( "backgroundColor", &mBackgroundColor );
mFontSize = cfg->readNumEntry( "fontSize", mFontSize );
- QStringList list = cfg->readListEntry( "sensorColors" );
+ TQStringList list = cfg->readListEntry( "sensorColors" );
if ( !list.isEmpty() ) {
mSensorColors.clear();
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it )
- mSensorColors.append( QColor( *it ) );
+ mSensorColors.append( TQColor( *it ) );
}
}
@@ -84,30 +84,30 @@ void StyleEngine::saveProperties( KConfig *cfg )
cfg->writeEntry( "backgroundColor", mBackgroundColor );
cfg->writeEntry( "fontSize", mFontSize );
- QStringList list;
- QValueList<QColor>::Iterator it;
+ TQStringList list;
+ TQValueList<TQColor>::Iterator it;
for ( it = mSensorColors.begin(); it != mSensorColors.end(); ++it )
list.append( (*it).name() );
cfg->writeEntry( "sensorColors", list );
}
-const QColor &StyleEngine::firstForegroundColor() const
+const TQColor &StyleEngine::firstForegroundColor() const
{
return mFirstForegroundColor;
}
-const QColor &StyleEngine::secondForegroundColor() const
+const TQColor &StyleEngine::secondForegroundColor() const
{
return mSecondForegroundColor;
}
-const QColor &StyleEngine::alarmColor() const
+const TQColor &StyleEngine::alarmColor() const
{
return mAlarmColor;
}
-const QColor &StyleEngine::backgroundColor() const
+const TQColor &StyleEngine::backgroundColor() const
{
return mBackgroundColor;
}
@@ -117,9 +117,9 @@ uint StyleEngine::fontSize() const
return mFontSize;
}
-const QColor& StyleEngine::sensorColor( uint pos )
+const TQColor& StyleEngine::sensorColor( uint pos )
{
- static QColor dummy;
+ static TQColor dummy;
if ( pos < mSensorColors.count() )
return *mSensorColors.at( pos );
@@ -143,8 +143,8 @@ void StyleEngine::configure()
mSettingsDialog->setFontSize( mFontSize );
mSettingsDialog->setSensorColors( mSensorColors );
- connect( mSettingsDialog, SIGNAL( applyClicked() ),
- this, SLOT( applyToWorksheet() ) );
+ connect( mSettingsDialog, TQT_SIGNAL( applyClicked() ),
+ this, TQT_SLOT( applyToWorksheet() ) );
if ( mSettingsDialog->exec() )
apply();
diff --git a/ksysguard/gui/ksgrd/StyleEngine.h b/ksysguard/gui/ksgrd/StyleEngine.h
index d896a2422..8056bd52f 100644
--- a/ksysguard/gui/ksgrd/StyleEngine.h
+++ b/ksysguard/gui/ksgrd/StyleEngine.h
@@ -24,9 +24,9 @@
#ifndef KSG_STYLEENGINE_H
#define KSG_STYLEENGINE_H
-#include <qcolor.h>
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqcolor.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include <kdemacros.h>
@@ -49,14 +49,14 @@ class KDE_EXPORT StyleEngine : public QObject
void readProperties( KConfig* );
void saveProperties( KConfig* );
- const QColor& firstForegroundColor() const;
- const QColor& secondForegroundColor() const;
- const QColor& alarmColor() const;
- const QColor& backgroundColor() const;
+ const TQColor& firstForegroundColor() const;
+ const TQColor& secondForegroundColor() const;
+ const TQColor& alarmColor() const;
+ const TQColor& backgroundColor() const;
uint fontSize() const;
- const QColor& sensorColor( uint pos );
+ const TQColor& sensorColor( uint pos );
uint numSensorColors() const;
public slots:
@@ -69,12 +69,12 @@ class KDE_EXPORT StyleEngine : public QObject
private:
void apply();
- QColor mFirstForegroundColor;
- QColor mSecondForegroundColor;
- QColor mAlarmColor;
- QColor mBackgroundColor;
+ TQColor mFirstForegroundColor;
+ TQColor mSecondForegroundColor;
+ TQColor mAlarmColor;
+ TQColor mBackgroundColor;
uint mFontSize;
- QValueList<QColor> mSensorColors;
+ TQValueList<TQColor> mSensorColors;
StyleSettings *mSettingsDialog;
};
diff --git a/ksysguard/gui/ksgrd/StyleSettings.cc b/ksysguard/gui/ksgrd/StyleSettings.cc
index 19a924cbe..6c7faf771 100644
--- a/ksysguard/gui/ksgrd/StyleSettings.cc
+++ b/ksysguard/gui/ksgrd/StyleSettings.cc
@@ -21,14 +21,14 @@
*/
-#include <qimage.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qspinbox.h>
-#include <qtabwidget.h>
+#include <tqimage.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqspinbox.h>
+#include <tqtabwidget.h>
#include <kaccelmanager.h>
#include <kcolorbutton.h>
@@ -37,45 +37,45 @@
#include "StyleSettings.h"
-StyleSettings::StyleSettings( QWidget *parent, const char *name )
+StyleSettings::StyleSettings( TQWidget *parent, const char *name )
: KDialogBase( Tabbed, i18n( "Global Style Settings" ), Help | Ok | Apply |
Cancel, Ok, parent, name, true, true )
{
- QFrame *page = addPage( i18n( "Display Style" ) );
- QGridLayout *layout = new QGridLayout( page, 6, 2, 0, spacingHint() );
+ TQFrame *page = addPage( i18n( "Display Style" ) );
+ TQGridLayout *layout = new TQGridLayout( page, 6, 2, 0, spacingHint() );
- QLabel *label = new QLabel( i18n( "First foreground color:" ), page );
+ TQLabel *label = new TQLabel( i18n( "First foreground color:" ), page );
layout->addWidget( label, 0, 0 );
mFirstForegroundColor = new KColorButton( page );
layout->addWidget( mFirstForegroundColor, 0, 1 );
label->setBuddy( mFirstForegroundColor );
- label = new QLabel( i18n( "Second foreground color:" ), page );
+ label = new TQLabel( i18n( "Second foreground color:" ), page );
layout->addWidget( label, 1, 0 );
mSecondForegroundColor = new KColorButton( page );
layout->addWidget( mSecondForegroundColor, 1, 1 );
label->setBuddy( mSecondForegroundColor );
- label = new QLabel( i18n( "Alarm color:" ), page );
+ label = new TQLabel( i18n( "Alarm color:" ), page );
layout->addWidget( label, 2, 0 );
mAlarmColor = new KColorButton( page );
layout->addWidget( mAlarmColor, 2, 1 );
label->setBuddy( mAlarmColor );
- label = new QLabel( i18n( "Background color:" ), page );
+ label = new TQLabel( i18n( "Background color:" ), page );
layout->addWidget( label, 3, 0 );
mBackgroundColor = new KColorButton( page );
layout->addWidget( mBackgroundColor, 3, 1 );
label->setBuddy( mBackgroundColor );
- label = new QLabel( i18n( "Font size:" ), page );
+ label = new TQLabel( i18n( "Font size:" ), page );
layout->addWidget( label, 4, 0 );
- mFontSize = new QSpinBox( 7, 48, 1, page );
+ mFontSize = new TQSpinBox( 7, 48, 1, page );
mFontSize->setValue( 8 );
layout->addWidget( mFontSize, 4, 1 );
label->setBuddy( mFontSize );
@@ -83,21 +83,21 @@ StyleSettings::StyleSettings( QWidget *parent, const char *name )
layout->setRowStretch( 5, 1 );
page = addPage( i18n( "Sensor Colors" ) );
- layout = new QGridLayout( page, 1, 2, 0, spacingHint() );
+ layout = new TQGridLayout( page, 1, 2, 0, spacingHint() );
- mColorListBox = new QListBox( page );
+ mColorListBox = new TQListBox( page );
layout->addWidget( mColorListBox, 0, 0 );
- mEditColorButton = new QPushButton( i18n( "Change Color..." ), page );
+ mEditColorButton = new TQPushButton( i18n( "Change Color..." ), page );
mEditColorButton->setEnabled( false );
layout->addWidget( mEditColorButton, 0, 1, Qt::AlignTop );
- connect( mColorListBox, SIGNAL( selectionChanged( QListBoxItem* ) ),
- SLOT( selectionChanged( QListBoxItem* ) ) );
- connect( mColorListBox, SIGNAL( doubleClicked( QListBoxItem* ) ),
- SLOT( editSensorColor() ) );
- connect( mEditColorButton, SIGNAL( clicked() ),
- SLOT( editSensorColor() ) );
+ connect( mColorListBox, TQT_SIGNAL( selectionChanged( TQListBoxItem* ) ),
+ TQT_SLOT( selectionChanged( TQListBoxItem* ) ) );
+ connect( mColorListBox, TQT_SIGNAL( doubleClicked( TQListBoxItem* ) ),
+ TQT_SLOT( editSensorColor() ) );
+ connect( mEditColorButton, TQT_SIGNAL( clicked() ),
+ TQT_SLOT( editSensorColor() ) );
KAcceleratorManager::manage( this );
}
@@ -106,42 +106,42 @@ StyleSettings::~StyleSettings()
{
}
-void StyleSettings::setFirstForegroundColor( const QColor &color )
+void StyleSettings::setFirstForegroundColor( const TQColor &color )
{
mFirstForegroundColor->setColor( color );
}
-QColor StyleSettings::firstForegroundColor() const
+TQColor StyleSettings::firstForegroundColor() const
{
return mFirstForegroundColor->color();
}
-void StyleSettings::setSecondForegroundColor( const QColor &color )
+void StyleSettings::setSecondForegroundColor( const TQColor &color )
{
mSecondForegroundColor->setColor( color );
}
-QColor StyleSettings::secondForegroundColor() const
+TQColor StyleSettings::secondForegroundColor() const
{
return mSecondForegroundColor->color();
}
-void StyleSettings::setAlarmColor( const QColor &color )
+void StyleSettings::setAlarmColor( const TQColor &color )
{
mAlarmColor->setColor( color );
}
-QColor StyleSettings::alarmColor() const
+TQColor StyleSettings::alarmColor() const
{
return mAlarmColor->color();
}
-void StyleSettings::setBackgroundColor( const QColor &color )
+void StyleSettings::setBackgroundColor( const TQColor &color )
{
mBackgroundColor->setColor( color );
}
-QColor StyleSettings::backgroundColor() const
+TQColor StyleSettings::backgroundColor() const
{
return mBackgroundColor->color();
}
@@ -156,23 +156,23 @@ uint StyleSettings::fontSize() const
return mFontSize->value();
}
-void StyleSettings::setSensorColors( const QValueList<QColor> &list )
+void StyleSettings::setSensorColors( const TQValueList<TQColor> &list )
{
mColorListBox->clear();
for ( uint i = 0; i < list.count(); ++i ) {
- QPixmap pm( 12, 12 );
+ TQPixmap pm( 12, 12 );
pm.fill( *list.at( i ) );
mColorListBox->insertItem( pm, i18n( "Color %1" ).arg( i ) );
}
}
-QValueList<QColor> StyleSettings::sensorColors()
+TQValueList<TQColor> StyleSettings::sensorColors()
{
- QValueList<QColor> list;
+ TQValueList<TQColor> list;
for ( uint i = 0; i < mColorListBox->count(); ++i )
- list.append( QColor( mColorListBox->pixmap( i )->convertToImage().pixel( 1, 1 ) ) );
+ list.append( TQColor( mColorListBox->pixmap( i )->convertToImage().pixel( 1, 1 ) ) );
return list;
}
@@ -184,16 +184,16 @@ void StyleSettings::editSensorColor()
if ( pos < 0 )
return;
- QColor color = mColorListBox->pixmap( pos )->convertToImage().pixel( 1, 1 );
+ TQColor color = mColorListBox->pixmap( pos )->convertToImage().pixel( 1, 1 );
if ( KColorDialog::getColor( color ) == KColorDialog::Accepted ) {
- QPixmap pm( 12, 12 );
+ TQPixmap pm( 12, 12 );
pm.fill( color );
mColorListBox->changeItem( pm, mColorListBox->text( pos ), pos );
}
}
-void StyleSettings::selectionChanged( QListBoxItem *item )
+void StyleSettings::selectionChanged( TQListBoxItem *item )
{
mEditColorButton->setEnabled( item != 0 );
}
diff --git a/ksysguard/gui/ksgrd/StyleSettings.h b/ksysguard/gui/ksgrd/StyleSettings.h
index d16b5e723..0f662f20f 100644
--- a/ksysguard/gui/ksgrd/StyleSettings.h
+++ b/ksysguard/gui/ksgrd/StyleSettings.h
@@ -26,7 +26,7 @@
#include <kdialogbase.h>
-#include <qcolor.h>
+#include <tqcolor.h>
class KColorButton;
@@ -38,30 +38,30 @@ class StyleSettings : public KDialogBase
Q_OBJECT
public:
- StyleSettings( QWidget *parent = 0, const char *name = 0 );
+ StyleSettings( TQWidget *parent = 0, const char *name = 0 );
~StyleSettings();
- void setFirstForegroundColor( const QColor &color );
- QColor firstForegroundColor() const;
+ void setFirstForegroundColor( const TQColor &color );
+ TQColor firstForegroundColor() const;
- void setSecondForegroundColor( const QColor &color );
- QColor secondForegroundColor() const;
+ void setSecondForegroundColor( const TQColor &color );
+ TQColor secondForegroundColor() const;
- void setAlarmColor( const QColor &color );
- QColor alarmColor() const;
+ void setAlarmColor( const TQColor &color );
+ TQColor alarmColor() const;
- void setBackgroundColor( const QColor &color );
- QColor backgroundColor() const;
+ void setBackgroundColor( const TQColor &color );
+ TQColor backgroundColor() const;
void setFontSize( uint size );
uint fontSize() const;
- void setSensorColors( const QValueList<QColor> &list );
- QValueList<QColor> sensorColors();
+ void setSensorColors( const TQValueList<TQColor> &list );
+ TQValueList<TQColor> sensorColors();
private slots:
void editSensorColor();
- void selectionChanged( QListBoxItem* );
+ void selectionChanged( TQListBoxItem* );
private:
KColorButton *mFirstForegroundColor;
@@ -69,10 +69,10 @@ class StyleSettings : public KDialogBase
KColorButton *mAlarmColor;
KColorButton *mBackgroundColor;
- QSpinBox *mFontSize;
+ TQSpinBox *mFontSize;
- QListBox *mColorListBox;
- QPushButton *mEditColorButton;
+ TQListBox *mColorListBox;
+ TQPushButton *mEditColorButton;
};
#endif
diff --git a/ksysguard/gui/ksgrd/TimerSettings.cc b/ksysguard/gui/ksgrd/TimerSettings.cc
index 4806f7d8a..5e1d8d8b2 100644
--- a/ksysguard/gui/ksgrd/TimerSettings.cc
+++ b/ksysguard/gui/ksgrd/TimerSettings.cc
@@ -24,37 +24,37 @@
#include <kaccelmanager.h>
#include <klocale.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
#include "TimerSettings.h"
-TimerSettings::TimerSettings( QWidget *parent, const char *name )
+TimerSettings::TimerSettings( TQWidget *parent, const char *name )
: KDialogBase( Plain, i18n( "Timer Settings" ), Ok | Cancel,
Ok, parent, name, true, true )
{
- QFrame *page = plainPage();
+ TQFrame *page = plainPage();
- QGridLayout *layout = new QGridLayout( page, 2, 2, 0, spacingHint() );
+ TQGridLayout *layout = new TQGridLayout( page, 2, 2, 0, spacingHint() );
- mUseGlobalUpdate = new QCheckBox( i18n( "Use update interval of worksheet" ), page );
+ mUseGlobalUpdate = new TQCheckBox( i18n( "Use update interval of worksheet" ), page );
layout->addMultiCellWidget( mUseGlobalUpdate, 0, 0, 0, 1 );
- mLabel = new QLabel( i18n( "Update interval:" ), page );
+ mLabel = new TQLabel( i18n( "Update interval:" ), page );
layout->addWidget( mLabel, 1, 0 );
- mInterval = new QSpinBox( 1, 300, 1, page );
+ mInterval = new TQSpinBox( 1, 300, 1, page );
mInterval->setValue( 2 );
mInterval->setSuffix( i18n( " sec" ) );
layout->addWidget( mInterval, 1, 1 );
mLabel->setBuddy( mInterval );
- QWhatsThis::add( mInterval, i18n( "All displays of the sheet are updated at the rate specified here." ) );
+ TQWhatsThis::add( mInterval, i18n( "All displays of the sheet are updated at the rate specified here." ) );
- connect( mUseGlobalUpdate, SIGNAL( toggled( bool ) ),
- SLOT( globalUpdateChanged( bool ) ) );
+ connect( mUseGlobalUpdate, TQT_SIGNAL( toggled( bool ) ),
+ TQT_SLOT( globalUpdateChanged( bool ) ) );
mUseGlobalUpdate->setChecked( true );
diff --git a/ksysguard/gui/ksgrd/TimerSettings.h b/ksysguard/gui/ksgrd/TimerSettings.h
index daf2eda6f..73c43c8b4 100644
--- a/ksysguard/gui/ksgrd/TimerSettings.h
+++ b/ksysguard/gui/ksgrd/TimerSettings.h
@@ -35,7 +35,7 @@ class KDE_EXPORT TimerSettings : public KDialogBase
Q_OBJECT
public:
- TimerSettings( QWidget *parent, const char *name = 0 );
+ TimerSettings( TQWidget *parent, const char *name = 0 );
~TimerSettings();
void setUseGlobalUpdate( bool value );
@@ -48,9 +48,9 @@ class KDE_EXPORT TimerSettings : public KDialogBase
void globalUpdateChanged( bool );
private:
- QCheckBox* mUseGlobalUpdate;
- QLabel* mLabel;
- QSpinBox* mInterval;
+ TQCheckBox* mUseGlobalUpdate;
+ TQLabel* mLabel;
+ TQSpinBox* mInterval;
};
#endif
diff --git a/ksysguard/gui/ksysguard.cc b/ksysguard/gui/ksysguard.cc
index 4750a380f..2be851232 100644
--- a/ksysguard/gui/ksysguard.cc
+++ b/ksysguard/gui/ksysguard.cc
@@ -75,7 +75,7 @@ TopLevel::TopLevel( const char *name )
mDontSaveSession = false;
mTimerId = -1;
- mSplitter = new QSplitter( this );
+ mSplitter = new TQSplitter( this );
mSplitter->setOrientation( Horizontal );
mSplitter->setOpaqueResize( KGlobalSettings::opaqueResize() );
setCentralWidget( mSplitter );
@@ -83,16 +83,16 @@ TopLevel::TopLevel( const char *name )
mSensorBrowser = new SensorBrowser( mSplitter, KSGRD::SensorMgr );
mServiceBrowser = new DNSSD::ServiceBrowser("_ksysguard._tcp", 0, true);
- connect(mServiceBrowser,SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),this,
- SLOT(serviceAdded(DNSSD::RemoteService::Ptr)));
+ connect(mServiceBrowser,TQT_SIGNAL(serviceAdded(DNSSD::RemoteService::Ptr)),this,
+ TQT_SLOT(serviceAdded(DNSSD::RemoteService::Ptr)));
mWorkSpace = new Workspace( mSplitter );
- connect( mWorkSpace, SIGNAL( announceRecentURL( const KURL& ) ),
- SLOT( registerRecentURL( const KURL& ) ) );
- connect( mWorkSpace, SIGNAL( setCaption( const QString&, bool ) ),
- SLOT( setCaption( const QString&, bool ) ) );
- connect( KSGRD::Style, SIGNAL( applyStyleToWorksheet() ), mWorkSpace,
- SLOT( applyStyle() ) );
+ connect( mWorkSpace, TQT_SIGNAL( announceRecentURL( const KURL& ) ),
+ TQT_SLOT( registerRecentURL( const KURL& ) ) );
+ connect( mWorkSpace, TQT_SIGNAL( setCaption( const TQString&, bool ) ),
+ TQT_SLOT( setCaption( const TQString&, bool ) ) );
+ connect( KSGRD::Style, TQT_SIGNAL( applyStyleToWorksheet() ), mWorkSpace,
+ TQT_SLOT( applyStyle() ) );
/* Create the status bar. It displays some information about the
* number of processes and the memory consumption of the local
@@ -106,39 +106,39 @@ TopLevel::TopLevel( const char *name )
// create actions for menue entries
new KAction( i18n( "&New Worksheet..." ), "tab_new", 0, mWorkSpace,
- SLOT( newWorkSheet() ), actionCollection(), "new_worksheet" );
+ TQT_SLOT( newWorkSheet() ), actionCollection(), "new_worksheet" );
new KAction( i18n( "Import Worksheet..." ), "fileopen", 0, mWorkSpace,
- SLOT( loadWorkSheet() ), actionCollection(), "import_worksheet" );
+ TQT_SLOT( loadWorkSheet() ), actionCollection(), "import_worksheet" );
mActionOpenRecent = new KRecentFilesAction( i18n( "&Import Recent Worksheet" ),"fileopen", 0,
- mWorkSpace, SLOT( loadWorkSheet( const KURL& ) ), actionCollection(), "recent_import_worksheet" );
+ mWorkSpace, TQT_SLOT( loadWorkSheet( const KURL& ) ), actionCollection(), "recent_import_worksheet" );
new KAction( i18n( "&Remove Worksheet" ), "tab_remove", 0, mWorkSpace,
- SLOT( deleteWorkSheet() ), actionCollection(), "remove_worksheet" );
+ TQT_SLOT( deleteWorkSheet() ), actionCollection(), "remove_worksheet" );
new KAction( i18n( "&Export Worksheet..." ), "filesaveas", 0, mWorkSpace,
- SLOT( saveWorkSheetAs() ), actionCollection(), "export_worksheet" );
+ TQT_SLOT( saveWorkSheetAs() ), actionCollection(), "export_worksheet" );
- KStdAction::quit( this, SLOT( close() ), actionCollection() );
+ KStdAction::quit( this, TQT_SLOT( close() ), actionCollection() );
new KAction( i18n( "C&onnect Host..." ), "connect_established", 0, this,
- SLOT( connectHost() ), actionCollection(), "connect_host" );
+ TQT_SLOT( connectHost() ), actionCollection(), "connect_host" );
new KAction( i18n( "D&isconnect Host" ), "connect_no", 0, this,
- SLOT( disconnectHost() ), actionCollection(), "disconnect_host" );
+ TQT_SLOT( disconnectHost() ), actionCollection(), "disconnect_host" );
-// KStdAction::cut( mWorkSpace, SLOT( cut() ), actionCollection() );
-// KStdAction::copy( mWorkSpace, SLOT( copy() ), actionCollection() );
-// KStdAction::paste( mWorkSpace, SLOT( paste() ), actionCollection() );
+// KStdAction::cut( mWorkSpace, TQT_SLOT( cut() ), actionCollection() );
+// KStdAction::copy( mWorkSpace, TQT_SLOT( copy() ), actionCollection() );
+// KStdAction::paste( mWorkSpace, TQT_SLOT( paste() ), actionCollection() );
new KAction( i18n( "&Worksheet Properties" ), "configure", 0, mWorkSpace,
- SLOT( configure() ), actionCollection(), "configure_sheet" );
+ TQT_SLOT( configure() ), actionCollection(), "configure_sheet" );
new KAction( i18n( "Load Standard Sheets" ), "revert",
- 0, this, SLOT( resetWorkSheets() ),
+ 0, this, TQT_SLOT( resetWorkSheets() ),
actionCollection(), "revert_all_worksheets" );
new KAction( i18n( "Configure &Style..." ), "colorize", 0, this,
- SLOT( editStyle() ), actionCollection(), "configure_style" );
+ TQT_SLOT( editStyle() ), actionCollection(), "configure_style" );
// TODO remove resize and fix so sizeHints() determines default size.
if (!initialGeometrySet())
@@ -165,10 +165,10 @@ void TopLevel::resetWorkSheets()
KStandardDirs* kstd = KGlobal::dirs();
kstd->addResourceType( "data", "share/apps/ksysguard" );
- QString workDir = kstd->saveLocation( "data", "ksysguard" );
+ TQString workDir = kstd->saveLocation( "data", "ksysguard" );
- QString file = kstd->findResource( "data", "SystemLoad.sgrd" );
- QString newFile = workDir + "/" + i18n( "System Load" ) + ".sgrd";
+ TQString file = kstd->findResource( "data", "SystemLoad.sgrd" );
+ TQString newFile = workDir + "/" + i18n( "System Load" ) + ".sgrd";
if ( !file.isEmpty() )
mWorkSpace->restoreWorkSheet( file, newFile );
@@ -190,30 +190,30 @@ void TopLevel::showOnCurrentDesktop()
KWin::forceActiveWindow( winId() );
}
-void TopLevel::loadWorkSheet( const QString &fileName )
+void TopLevel::loadWorkSheet( const TQString &fileName )
{
mWorkSpace->loadWorkSheet( KURL( fileName ) );
}
-void TopLevel::removeWorkSheet( const QString &fileName )
+void TopLevel::removeWorkSheet( const TQString &fileName )
{
mWorkSpace->deleteWorkSheet( fileName );
}
-QStringList TopLevel::listSensors( const QString &hostName )
+TQStringList TopLevel::listSensors( const TQString &hostName )
{
return mSensorBrowser->listSensors( hostName );
}
-QStringList TopLevel::listHosts()
+TQStringList TopLevel::listHosts()
{
return mSensorBrowser->listHosts();
}
-QString TopLevel::readIntegerSensor( const QString &sensorLocator )
+TQString TopLevel::readIntegerSensor( const TQString &sensorLocator )
{
- QString host = sensorLocator.left( sensorLocator.find( ':' ) );
- QString sensor = sensorLocator.right( sensorLocator.length() -
+ TQString host = sensorLocator.left( sensorLocator.find( ':' ) );
+ TQString sensor = sensorLocator.right( sensorLocator.length() -
sensorLocator.find( ':' ) - 1 );
DCOPClientTransaction *dcopTransaction = kapp->dcopClient()->beginTransaction();
@@ -222,15 +222,15 @@ QString TopLevel::readIntegerSensor( const QString &sensorLocator )
KSGRD::SensorMgr->engage( host, "", "ksysguardd" );
KSGRD::SensorMgr->sendRequest( host, sensor, (KSGRD::SensorClient*)this, 133 );
- return QString::null;
+ return TQString::null;
}
-QStringList TopLevel::readListSensor( const QString& sensorLocator )
+TQStringList TopLevel::readListSensor( const TQString& sensorLocator )
{
- QStringList retval;
+ TQStringList retval;
- QString host = sensorLocator.left( sensorLocator.find( ':' ) );
- QString sensor = sensorLocator.right( sensorLocator.length() -
+ TQString host = sensorLocator.left( sensorLocator.find( ':' ) );
+ TQString sensor = sensorLocator.right( sensorLocator.length() -
sensorLocator.find( ':' ) - 1 );
DCOPClientTransaction *dcopTransaction = kapp->dcopClient()->beginTransaction();
@@ -274,7 +274,7 @@ void TopLevel::showRequestedSheets()
{
toolBar( "mainToolBar" )->hide();
- QValueList<int> sizes;
+ TQValueList<int> sizes;
sizes.append( 0 );
sizes.append( 100 );
mSplitter->setSizes( sizes );
@@ -293,7 +293,7 @@ void TopLevel::initStatusBar()
KToggleAction *sb = dynamic_cast<KToggleAction*>(action("options_show_statusbar"));
if (sb)
- connect(sb, SIGNAL(toggled(bool)), this, SLOT(updateStatusBar()));
+ connect(sb, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateStatusBar()));
}
void TopLevel::updateStatusBar()
@@ -319,8 +319,8 @@ void TopLevel::editToolbars()
{
saveMainWindowSettings( kapp->config() );
KEditToolbar dlg( actionCollection() );
- connect( &dlg, SIGNAL( newToolbarConfig() ), this,
- SLOT( slotNewToolbarConfig() ) );
+ connect( &dlg, TQT_SIGNAL( newToolbarConfig() ), this,
+ TQT_SLOT( slotNewToolbarConfig() ) );
dlg.exec();
}
@@ -336,18 +336,18 @@ void TopLevel::editStyle()
KSGRD::Style->configure();
}
-void TopLevel::customEvent( QCustomEvent *e )
+void TopLevel::customEvent( TQCustomEvent *e )
{
- if ( e->type() == QEvent::User ) {
+ if ( e->type() == TQEvent::User ) {
/* Due to the asynchronous communication between ksysguard and its
* back-ends, we sometimes need to show message boxes that were
* triggered by objects that have died already. */
- KMessageBox::error( this, *((QString*)e->data()) );
- delete (QString*)e->data();
+ KMessageBox::error( this, *((TQString*)e->data()) );
+ delete (TQString*)e->data();
}
}
-void TopLevel::timerEvent( QTimerEvent* )
+void TopLevel::timerEvent( TQTimerEvent* )
{
if ( statusBar()->isVisibleTo( this ) ) {
/* Request some info about the memory status. The requested
@@ -385,7 +385,7 @@ void TopLevel::readProperties( KConfig *cfg )
if ( cfg->readBoolEntry( "isMinimized" ) == true )
showMinimized();
- QValueList<int> sizes = cfg->readIntListEntry( "SplitterSizeList" );
+ TQValueList<int> sizes = cfg->readIntListEntry( "SplitterSizeList" );
if ( sizes.isEmpty() ) {
// start with a 30/70 ratio
sizes.append( 30 );
@@ -417,10 +417,10 @@ void TopLevel::saveProperties( KConfig *cfg )
mWorkSpace->saveProperties( cfg );
}
-void TopLevel::answerReceived( int id, const QString &answer )
+void TopLevel::answerReceived( int id, const TQString &answer )
{
- QString s;
- static QString unit;
+ TQString s;
+ static TQString unit;
static long mUsed = 0;
static long mFree = 0;
static long sUsed = 0;
@@ -432,7 +432,7 @@ void TopLevel::answerReceived( int id, const QString &answer )
// singular vs. plural works :/
//
// To use pluralForms, though, you need to convert to
- // an integer, not use the QString straight.
+ // an integer, not use the TQString straight.
s = i18n( "1 Process", "%n Processes", answer.toInt() );
statusBar()->changeItem( s, 0 );
break;
@@ -465,9 +465,9 @@ void TopLevel::answerReceived( int id, const QString &answer )
}
case 133: {
- QCString replyType = "QString";
- QByteArray replyData;
- QDataStream reply( replyData, IO_WriteOnly );
+ TQCString replyType = "TQString";
+ TQByteArray replyData;
+ TQDataStream reply( replyData, IO_WriteOnly );
reply << answer;
DCOPClientTransaction *dcopTransaction = mDCopFIFO.last();
@@ -477,10 +477,10 @@ void TopLevel::answerReceived( int id, const QString &answer )
}
case 134: {
- QStringList resultList;
- QCString replyType = "QStringList";
- QByteArray replyData;
- QDataStream reply( replyData, IO_WriteOnly );
+ TQStringList resultList;
+ TQCString replyType = "TQStringList";
+ TQByteArray replyData;
+ TQDataStream reply( replyData, IO_WriteOnly );
KSGRD::SensorTokenizer lines( answer, '\n' );
@@ -497,9 +497,9 @@ void TopLevel::answerReceived( int id, const QString &answer )
}
}
-void TopLevel::setSwapInfo( long used, long free, const QString &unit )
+void TopLevel::setSwapInfo( long used, long free, const TQString &unit )
{
- QString msg;
+ TQString msg;
if ( used == 0 && free == 0 ) // no swap available
msg = i18n( "No swap space available" );
else {
@@ -602,7 +602,7 @@ int main( int argc, char** argv )
// run the application
result = app->exec();
} else {
- QByteArray data;
+ TQByteArray data;
app->dcopClient()->send( "ksysguard_taskmanager", "KSysGuardIface",
"showOnCurrentDesktop()", data );
}
diff --git a/ksysguard/gui/ksysguard.h b/ksysguard/gui/ksysguard.h
index 8d2ef15d9..64dc73ef9 100644
--- a/ksysguard/gui/ksysguard.h
+++ b/ksysguard/gui/ksysguard.h
@@ -24,7 +24,7 @@
#ifndef KSG_KSYSGUARD_H
#define KSG_KSYSGUARD_H
-#include <qevent.h>
+#include <tqevent.h>
#include <dcopclient.h>
#include <dcopobject.h>
@@ -52,7 +52,7 @@ class TopLevel : public KMainWindow, public KSGRD::SensorClient, public DCOPObje
virtual void saveProperties( KConfig* );
virtual void readProperties( KConfig* );
- virtual void answerReceived( int id, const QString& );
+ virtual void answerReceived( int id, const TQString& );
void beATaskManager();
void showRequestedSheets();
@@ -62,20 +62,20 @@ class TopLevel : public KMainWindow, public KSGRD::SensorClient, public DCOPObje
// calling ksysguard with kwin/kicker hot-key
ASYNC showProcesses();
ASYNC showOnCurrentDesktop();
- ASYNC loadWorkSheet( const QString &fileName );
- ASYNC removeWorkSheet( const QString &fileName );
- QStringList listHosts();
- QStringList listSensors( const QString &hostName );
- QString readIntegerSensor( const QString &sensorLocator );
- QStringList readListSensor( const QString &sensorLocator );
+ ASYNC loadWorkSheet( const TQString &fileName );
+ ASYNC removeWorkSheet( const TQString &fileName );
+ TQStringList listHosts();
+ TQStringList listSensors( const TQString &hostName );
+ TQString readIntegerSensor( const TQString &sensorLocator );
+ TQStringList readListSensor( const TQString &sensorLocator );
public slots:
void registerRecentURL( const KURL &url );
void resetWorkSheets();
protected:
- virtual void customEvent( QCustomEvent* );
- virtual void timerEvent( QTimerEvent* );
+ virtual void customEvent( TQCustomEvent* );
+ virtual void timerEvent( TQTimerEvent* );
virtual bool queryClose();
protected slots:
@@ -88,11 +88,11 @@ class TopLevel : public KMainWindow, public KSGRD::SensorClient, public DCOPObje
void serviceAdded(DNSSD::RemoteService::Ptr srv);
private:
- void setSwapInfo( long, long, const QString& );
+ void setSwapInfo( long, long, const TQString& );
- QPtrList<DCOPClientTransaction> mDCopFIFO;
+ TQPtrList<DCOPClientTransaction> mDCopFIFO;
- QSplitter* mSplitter;
+ TQSplitter* mSplitter;
KRecentFilesAction* mActionOpenRecent;
SensorBrowser* mSensorBrowser;
@@ -118,7 +118,7 @@ class DCOPClientTransaction
public:
Q_INT32 id;
CARD32 key;
- QCString senderId;
+ TQCString senderId;
};
#endif