author | drw <drw> | 2002-11-17 02:14:03 (UTC) |
---|---|---|
committer | drw <drw> | 2002-11-17 02:14:03 (UTC) |
commit | 9ed0a6022d4c3bcd8428096cdf28cad1e0355ab2 (patch) (side-by-side diff) | |
tree | f84b36548fa91496c0c100c96a3fa1512ec8b108 /noncore/settings/sysinfo/storage.cpp | |
parent | 5a1f5ba99dfb754f1be4500dd55dca42b36413b8 (diff) | |
download | opie-9ed0a6022d4c3bcd8428096cdf28cad1e0355ab2.zip opie-9ed0a6022d4c3bcd8428096cdf28cad1e0355ab2.tar.gz opie-9ed0a6022d4c3bcd8428096cdf28cad1e0355ab2.tar.bz2 |
Start of What's This for Sysinfo, plus some code tweaks
Diffstat (limited to 'noncore/settings/sysinfo/storage.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/settings/sysinfo/storage.cpp | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/noncore/settings/sysinfo/storage.cpp b/noncore/settings/sysinfo/storage.cpp index b369ff1..c33663e 100644 --- a/noncore/settings/sysinfo/storage.cpp +++ b/noncore/settings/sysinfo/storage.cpp @@ -22,5 +22,6 @@ #include <qlayout.h> #include <qtimer.h> -#include <qlayout.h> +#include <qwhatsthis.h> + #include "graph.h" #include "storage.h" @@ -124,22 +125,27 @@ void StorageInfo::updateMounts() // qDebug(humanname); if ( isCF(humanname) ) - humanname = tr("CF Card: "+*fsmount+" "+*fsTit+" "); + humanname = tr( "CF Card: " ); else if ( humanname == "/dev/hda1" ) - humanname = tr("Hard Disk "+*fsmount+" "+*fsTit+" "); + humanname = tr( "Hard Disk " ); else if ( humanname.left(9) == "/dev/mmcd" ) - humanname = tr("SD Card "+*fsmount+" "+*fsTit+" "); + humanname = tr( "SD Card " ); else if ( humanname.left(7) == "/dev/hd" ) - humanname = tr("Hard Disk") + " " + humanname.mid(7)+" "+*fsmount+" "+*fsTit+" "; + humanname = tr( "Hard Disk /dev/hd " ); else if ( humanname.left(7) == "/dev/sd" ) - humanname = tr("SCSI Hard Disk") + " " + humanname.mid(7)+" "+*fsmount+" "+*fsTit+" "; + humanname = tr( "SCSI Hard Disk /dev/sd " ); else if ( humanname == "/dev/mtdblock1" || humanname == "/dev/mtdblock/1" ) - humanname = tr("Int. Storage "+*fsmount+" "+*fsTit+"\n"); + humanname = tr( "Int. Storage " ); else if ( humanname.left(14) == "/dev/mtdblock/" ) - humanname = tr("Int. Storage") + " " + humanname.mid(14)+" "+*fsmount+" "+*fsTit+" "; + humanname = tr( "Int. Storage /dev/mtdblock/ " ); else if ( humanname.left(13) == "/dev/mtdblock" ) - humanname = tr("Int. Storage") + " " + humanname.mid(13)+" "+*fsmount+" "+*fsTit+" "; + humanname = tr( "Int. Storage /dev/mtdblock " ); else if ( humanname.left(9) == "/dev/root" ) - humanname = tr("Int. Storage "+*fsmount+" "+*fsTit+" "); + humanname = tr( "Int. Storage " ); // etc. + humanname.append( *fsmount ); + humanname.append( " " ); + humanname.append( *fsTit ); + humanname.append( " " ); + MountInfo* mi = new MountInfo( *fsit, humanname, this ); vb->addWidget(mi); @@ -147,4 +153,15 @@ void StorageInfo::updateMounts() mi->show(); fsmount++;fsTit++; + QString tempstr = humanname.left( 2 ); + if ( tempstr == tr( "CF" ) ) + QWhatsThis::add( mi, tr( "This graph represents how much memory is currently used on this Compact Flash memory card." ) ); + else if ( tempstr == tr( "Ha" ) ) + QWhatsThis::add( mi, tr( "This graph represents how much storage is currently used on this hard drive." ) ); + else if ( tempstr == tr( "SD" ) ) + QWhatsThis::add( mi, tr( "This graph represents how much memory is currently used on this Secure Digital memory card." ) ); + else if ( tempstr == tr( "SC" ) ) + QWhatsThis::add( mi, tr( "This graph represents how much storage is currently used on this hard drive." ) ); + else if ( tempstr == tr( "In" ) ) + QWhatsThis::add( mi, tr( "This graph represents how much memory is currently used of the built-in memory (i.e. Flash memory) on this handheld device." ) ); } vb->addStretch(); |