From 2f87d2f9155285d853b66bb08e43b275f6284226 Mon Sep 17 00:00:00 2001 From: drw Date: Sun, 17 Nov 2002 21:36:55 +0000 Subject: Finish What's This and some additional code clean-up --- (limited to 'noncore/settings/sysinfo') diff --git a/noncore/settings/sysinfo/modulesdetail.cpp b/noncore/settings/sysinfo/modulesdetail.cpp index 48d47f6..ea5f352 100644 --- a/noncore/settings/sysinfo/modulesdetail.cpp +++ b/noncore/settings/sysinfo/modulesdetail.cpp @@ -23,15 +23,17 @@ #include #include + #include -#include -#include #include #include #include +#include +#include +#include ModulesDetail::ModulesDetail( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) + : QWidget( parent, name, WStyle_ContextHelp ) { modname = ""; @@ -43,11 +45,12 @@ ModulesDetail::ModulesDetail( QWidget* parent, const char* name, WFlags fl ) CommandCB->insertItem( "modprobe -r" ); CommandCB->insertItem( "rmmod" ); // I can't think of other useful commands yet. Anyone? - layout->addWidget( CommandCB, 1, 0 ); + QWhatsThis::add( CommandCB, tr( "Select a command here and then click the Send button to the right to send the command." ) ); ModulesView = new QTextView( this, "ModulesView" ); layout->addMultiCellWidget( ModulesView, 0, 0, 0, 1 ); + QWhatsThis::add( ModulesView, tr( "This area shows detailed information about this module." ) ); SendButton = new QPushButton( this, "SendButton" ); SendButton->setMinimumSize( QSize( 50, 24 ) ); @@ -55,6 +58,7 @@ ModulesDetail::ModulesDetail( QWidget* parent, const char* name, WFlags fl ) SendButton->setText( tr( "Send" ) ); connect( SendButton, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) ); layout->addWidget( SendButton, 1, 1 ); + QWhatsThis::add( SendButton, tr( "Click here to send the selected command to this module." ) ); } ModulesDetail::~ModulesDetail() diff --git a/noncore/settings/sysinfo/modulesinfo.cpp b/noncore/settings/sysinfo/modulesinfo.cpp index 7a32c20..a0d26c7 100644 --- a/noncore/settings/sysinfo/modulesinfo.cpp +++ b/noncore/settings/sysinfo/modulesinfo.cpp @@ -21,11 +21,12 @@ #include +#include #include -#include #include +#include #include -#include +#include #include "modulesinfo.h" @@ -45,8 +46,9 @@ ModulesInfo::ModulesInfo( QWidget* parent, const char* name, WFlags fl ) QPEApplication::setStylusOperation( ModulesView->viewport(), QPEApplication::RightOnHold ); connect( ModulesView, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ), this, SLOT( viewModules( QListViewItem * ) ) ); - layout->addWidget( ModulesView ); + QWhatsThis::add( ModulesView, tr( "This is a list of all the kernel modules currently loaded on this handheld device.\n\nClick and hold on a module to see additional information about the module, or to unload it." ) ); + QTimer *t = new QTimer( this ); connect( t, SIGNAL( timeout() ), this, SLOT( updateData() ) ); t->start( 5000 ); diff --git a/noncore/settings/sysinfo/processdetail.cpp b/noncore/settings/sysinfo/processdetail.cpp index 5c0d335..661e32c 100644 --- a/noncore/settings/sysinfo/processdetail.cpp +++ b/noncore/settings/sysinfo/processdetail.cpp @@ -23,14 +23,15 @@ #include #include -#include -#include #include #include #include +#include +#include +#include ProcessDetail::ProcessDetail( QWidget* parent, const char* name, WFlags fl ) - : QWidget( parent, name, fl ) + : QWidget( parent, name, WStyle_ContextHelp ) { pid = 0; @@ -50,9 +51,11 @@ ProcessDetail::ProcessDetail( QWidget* parent, const char* name, WFlags fl ) SignalCB->insertItem( "18: SIGCONT" ); SignalCB->insertItem( "19: SIGSTOP" ); layout->addWidget( SignalCB, 1, 0 ); + QWhatsThis::add( SignalCB, tr( "Select a signal here and then click the Send button to the right to send to this process." ) ); ProcessView = new QTextView( this, "ProcessView" ); layout->addMultiCellWidget( ProcessView, 0, 0, 0, 1 ); + QWhatsThis::add( ProcessView, tr( "This area shows detailed information about this process." ) ); SendButton = new QPushButton( this, "SendButton" ); SendButton->setMinimumSize( QSize( 50, 24 ) ); @@ -60,6 +63,7 @@ ProcessDetail::ProcessDetail( QWidget* parent, const char* name, WFlags fl ) SendButton->setText( tr( "Send" ) ); connect( SendButton, SIGNAL( clicked() ), this, SLOT( slotSendClicked() ) ); layout->addWidget( SendButton, 1, 1 ); + QWhatsThis::add( SendButton, tr( "Click here to send the selected signal to this process." ) ); } ProcessDetail::~ProcessDetail() diff --git a/noncore/settings/sysinfo/processinfo.cpp b/noncore/settings/sysinfo/processinfo.cpp index 0512141..86133a9 100644 --- a/noncore/settings/sysinfo/processinfo.cpp +++ b/noncore/settings/sysinfo/processinfo.cpp @@ -19,12 +19,13 @@ #include +#include +#include #include -#include #include +#include #include -#include -#include +#include #include "processinfo.h" @@ -44,8 +45,8 @@ ProcessInfo::ProcessInfo( QWidget* parent, const char* name, WFlags fl ) QPEApplication::setStylusOperation( ProcessView->viewport(), QPEApplication::RightOnHold ); connect( ProcessView, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ), this, SLOT( viewProcess( QListViewItem * ) ) ); - layout->addWidget( ProcessView ); + QWhatsThis::add( ProcessView, tr( "This is a list of all the processes on this handheld device.\n\nClick and hold on a process to see additional information about the process, or to send a signal to it." ) ); QTimer *t = new QTimer( this ); connect( t, SIGNAL( timeout() ), this, SLOT( updateData() ) ); diff --git a/noncore/settings/sysinfo/versioninfo.cpp b/noncore/settings/sysinfo/versioninfo.cpp index 79e7fea..658f371 100644 --- a/noncore/settings/sysinfo/versioninfo.cpp +++ b/noncore/settings/sysinfo/versioninfo.cpp @@ -43,7 +43,7 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) setMinimumSize( 200, 150 ); QVBoxLayout *vb = new QVBoxLayout( this, 4 ); - + QString kernelVersionString; QFile file( "/proc/version" ); if ( file.open( IO_ReadOnly ) ) { @@ -51,23 +51,30 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) QString v; t >> v; t >> v; t >> v; v = v.left( 20 ); - kernelVersionString = tr( "Linux Kernel

Version: " ) + v + "

"; + kernelVersionString = tr( "Linux Kernel

Version: " ); + kernelVersionString.append( v ); + kernelVersionString.append( "

" ); t >> v; - kernelVersionString += tr( "Compiled by: " ) + v; + kernelVersionString.append( tr( "Compiled by: " ) ); + kernelVersionString.append( v ); file.close(); } - QString palmtopVersionString; - palmtopVersionString = tr( "Opie

Version: " ) + QPE_VERSION + "

"; + QString palmtopVersionString = tr( "Opie

Version: " ); + palmtopVersionString.append( QPE_VERSION ); + palmtopVersionString.append( "

" ); #ifdef QPE_VENDOR QString builder = QPE_VENDOR; #else QString builder = "Unknown"; -#endif - palmtopVersionString += tr( "Compiled by: " ) + builder + "

"; - palmtopVersionString += tr( "Built on: " ) + __DATE__; +#endif + palmtopVersionString.append( tr( "Compiled by: " ) ); + palmtopVersionString.append( builder ); + palmtopVersionString.append( "

" ); + palmtopVersionString.append( tr( "Built on: " ) ); + palmtopVersionString.append( __DATE__ ); + - QHBoxLayout *hb1 = new QHBoxLayout( vb ); hb1->setSpacing( 2 ); @@ -96,7 +103,7 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) linuxLogo->setPixmap( logo2Pixmap ); linuxLogo->setFixedSize( 60, 60 ); hb2->addWidget( linuxLogo, 0, Qt::AlignTop + Qt::AlignLeft ); - + QLabel *kernelVersion = new QLabel( this ); kernelVersion->setText( kernelVersionString ); hb2->addWidget( kernelVersion, 1, Qt::AlignTop + Qt::AlignLeft ); @@ -114,11 +121,15 @@ VersionInfo::VersionInfo( QWidget *parent, const char *name, WFlags f ) palmtopLogo3->setFixedSize( 60, 60 ); hb3->addWidget( palmtopLogo3, 0, Qt::AlignTop + Qt::AlignLeft ); -// QString systemString = tr( "System

System: ") + ODevice::inst()->systemString() - QString systemString = ""+ ODevice::inst()->systemString()+"" - +tr("

Version: " ) + ODevice::inst()->systemVersionString() - +tr("

Model: ") + ODevice::inst()->modelString() - +tr("

Vendor: ") + ODevice::inst()->vendorString(); + QString systemString = ""; + systemString.append( ODevice::inst()->systemString() ); + systemString.append( "" ); + systemString.append( tr( "

Version: " ) ); + systemString.append( ODevice::inst()->systemVersionString() ); + systemString.append( tr( "

Model: " ) ); + systemString.append( ODevice::inst()->modelString() ); + systemString.append( tr( "

Vendor: " ) ); + systemString.append( ODevice::inst()->vendorString() ); QLabel *systemVersion = new QLabel( this ); systemVersion->setText( systemString ); -- cgit v0.9.0.2