From 5b27ef38d45ae4aa751c6e364cb62ed428808e3f Mon Sep 17 00:00:00 2001 From: drw Date: Sun, 22 Feb 2004 17:17:08 +0000 Subject: Memory Applet: libopie->libopie2 --- diff --git a/noncore/applets/memoryapplet/config.in b/noncore/applets/memoryapplet/config.in index 578aaf9..4fc13ba 100644 --- a/noncore/applets/memoryapplet/config.in +++ b/noncore/applets/memoryapplet/config.in @@ -1,6 +1,6 @@ config MEMORYAPPLET boolean "opie-memoryapplet (view memory status and manage a swap file)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE && SYSINFO + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE2UI && SYSINFO comment "opie-memoryapplet needs a libqpe, libopie and sysinfo" depends ! ( LIBOPIE && SYSINFO ) diff --git a/noncore/applets/memoryapplet/memoryapplet.pro b/noncore/applets/memoryapplet/memoryapplet.pro index cd3f4a5..6031386 100644 --- a/noncore/applets/memoryapplet/memoryapplet.pro +++ b/noncore/applets/memoryapplet/memoryapplet.pro @@ -19,6 +19,6 @@ DESTDIR = $(OPIEDIR)/plugins/applets INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += ../$(OPIEDIR)/include VERSION = 1.0.0 -LIBS += -lqpe -lopie +LIBS += -lqpe -lopieui2 include ( $(OPIEDIR)/include.pro ) 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 @@ -26,7 +26,6 @@ #include #include -#include #include MemoryStatus::MemoryStatus(QWidget *parent, WFlags f ) @@ -41,12 +40,12 @@ MemoryStatus::MemoryStatus(QWidget *parent, WFlags f ) tab->addTab( mi = new MemoryInfo( tab ), "memory/memorytabicon", tr("Memory") ); tab->addTab( sf = new Swapfile( tab ), "memory/storagetabicon", tr("Swapfile") ); - QLabel* about = new QLabel(tr("
Memory Monitor Plugin
" + QLabel* about = new QLabel(tr("
Memory Monitor Plugin
" "Copyright (C) 2003 Anton Maslovsky
" "<my-zaurus@narod.ru>
" "http://my-zaurus.narod.ru
" - "Based on source code from:
qswap (udoseidel@gmx.de)
Battery Applet (trolltech.com)
SysInfo (OPIE)

" - "This program is licensed under GNU GPL.
"), tab); + "Based on source code from:
qswap (udoseidel@gmx.de)
Battery Applet (trolltech.com)
SysInfo (OPIE)

" + "This program is licensed under GNU GPL.
"), tab); tab->addTab( about, "memory/info", tr("About") ); @@ -55,25 +54,25 @@ MemoryStatus::MemoryStatus(QWidget *parent, WFlags f ) 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; } 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; } diff --git a/noncore/applets/memoryapplet/memorystatus.h b/noncore/applets/memoryapplet/memorystatus.h index 5c73833..c3926db 100644 --- a/noncore/applets/memoryapplet/memorystatus.h +++ b/noncore/applets/memoryapplet/memorystatus.h @@ -22,9 +22,11 @@ #include +#include + class MemoryInfo; class Swapfile; -class OTabWidget; +using Opie::OTabWidget; class MemoryStatus : public QFrame { @@ -35,12 +37,12 @@ public: QSize sizeHint() const; MemoryInfo* mi; - Swapfile* sf; + Swapfile* sf; - int percent(); + int percent(); private: - OTabWidget *tab; + OTabWidget *tab; }; #endif diff --git a/noncore/applets/memoryapplet/opie-memoryapplet.control b/noncore/applets/memoryapplet/opie-memoryapplet.control index 12026a4..c01a93f 100644 --- a/noncore/applets/memoryapplet/opie-memoryapplet.control +++ b/noncore/applets/memoryapplet/opie-memoryapplet.control @@ -4,7 +4,7 @@ Priority: optional Section: opie/applets Maintainer: Michael 'Mickey' Lauer Architecture: arm -Depends: task-opie-minimal +Depends: task-opie-minimal, libopieui2 Description: Memory Applet This applet displays the amount of free memory and manages the swap partition Version: $QPE_VERSION$EXTRAVERSION -- cgit v0.9.0.2