summaryrefslogtreecommitdiff
path: root/noncore/applets/memoryapplet/memorystatus.cpp
Side-by-side diff
Diffstat (limited to 'noncore/applets/memoryapplet/memorystatus.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/memoryapplet/memorystatus.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/noncore/applets/memoryapplet/memorystatus.cpp b/noncore/applets/memoryapplet/memorystatus.cpp
index b738312..c01ba28 100644
--- a/noncore/applets/memoryapplet/memorystatus.cpp
+++ b/noncore/applets/memoryapplet/memorystatus.cpp
@@ -28,3 +28,2 @@
-#include <opie/otabwidget.h>
#include <qlayout.h>
@@ -43,3 +42,3 @@ MemoryStatus::MemoryStatus(QWidget *parent, WFlags f )
- QLabel* about = new QLabel(tr("<center><b>Memory Monitor Plugin</b><br>"
+ QLabel* about = new QLabel(tr("<center><b>Memory Monitor Plugin</b><br>"
"Copyright (C) 2003 Anton Maslovsky<br>"
@@ -47,4 +46,4 @@ MemoryStatus::MemoryStatus(QWidget *parent, WFlags f )
"<a href=\"http://my-zaurus.narod.ru\">http://my-zaurus.narod.ru</a><br>"
- "Based on source code from:<br> qswap (udoseidel@gmx.de) <br> Battery Applet (trolltech.com) <br> SysInfo (OPIE)<br><br>"
- "This program is licensed under GNU GPL.</center>"), tab);
+ "Based on source code from:<br> qswap (udoseidel@gmx.de) <br> Battery Applet (trolltech.com) <br> SysInfo (OPIE)<br><br>"
+ "This program is licensed under GNU GPL.</center>"), tab);
@@ -57,14 +56,14 @@ int MemoryStatus::percent()
{
- if (mi == 0)
- return 100;
+ if (mi == 0)
+ return 100;
- int total = mi->total;
- if (mi->swaptotal > 0)
- total += mi->swaptotal;
+ int total = mi->total;
+ if (mi->swaptotal > 0)
+ total += mi->swaptotal;
- int used = mi->realUsed;
- if (mi->swapused > 0)
- total += mi->swapused;
+ int used = mi->realUsed;
+ if (mi->swapused > 0)
+ total += mi->swapused;
- return ((total - used) * 100)/total;
+ return ((total - used) * 100)/total;
}
@@ -73,5 +72,5 @@ QSize MemoryStatus::sizeHint() const
{
- QSize s = tab->size();
- s.setWidth(200);
- s.setHeight((mi->swaptotal > 0) ? 220 : 200);
+ QSize s = tab->size();
+ s.setWidth(200);
+ s.setHeight((mi->swaptotal > 0) ? 220 : 200);
return s;