summaryrefslogtreecommitdiff
path: root/noncore/applets/memoryapplet
Unidiff
Diffstat (limited to 'noncore/applets/memoryapplet') (more/less context) (show whitespace changes)
-rw-r--r--noncore/applets/memoryapplet/memoryapplet.pro4
-rw-r--r--noncore/applets/memoryapplet/memoryappletimpl.cpp65
-rw-r--r--noncore/applets/memoryapplet/memoryappletimpl.h43
-rw-r--r--noncore/applets/memoryapplet/memorymeter.cpp14
-rw-r--r--noncore/applets/memoryapplet/memorymeter.h1
5 files changed, 13 insertions, 114 deletions
diff --git a/noncore/applets/memoryapplet/memoryapplet.pro b/noncore/applets/memoryapplet/memoryapplet.pro
index 6031386..3cd7839 100644
--- a/noncore/applets/memoryapplet/memoryapplet.pro
+++ b/noncore/applets/memoryapplet/memoryapplet.pro
@@ -5,3 +5,2 @@ HEADERS = ../../settings/sysinfo/graph.h \
5 ../../settings/sysinfo/memory.h \ 5 ../../settings/sysinfo/memory.h \
6 memoryappletimpl.h \
7 memorymeter.h \ 6 memorymeter.h \
@@ -12,3 +11,2 @@ SOURCES = ../../settings/sysinfo/graph.cpp \
12 ../../settings/sysinfo/memory.cpp \ 11 ../../settings/sysinfo/memory.cpp \
13 memoryappletimpl.cpp \
14 memorymeter.cpp \ 12 memorymeter.cpp \
@@ -21,3 +19,3 @@ DEPENDPATH += ../$(OPIEDIR)/include
21VERSION = 1.0.0 19VERSION = 1.0.0
22LIBS += -lqpe -lopieui2 20LIBS += -lqpe -lopiecore2 -lopieui2
23 21
diff --git a/noncore/applets/memoryapplet/memoryappletimpl.cpp b/noncore/applets/memoryapplet/memoryappletimpl.cpp
deleted file mode 100644
index a117e7f..0000000
--- a/noncore/applets/memoryapplet/memoryappletimpl.cpp
+++ b/dev/null
@@ -1,65 +0,0 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#include "memorymeter.h"
21#include "memoryappletimpl.h"
22
23MemoryAppletImpl::MemoryAppletImpl()
24 : memory(0)
25{
26}
27
28MemoryAppletImpl::~MemoryAppletImpl()
29{
30 delete memory;
31}
32
33QWidget *MemoryAppletImpl::applet( QWidget *parent )
34{
35 if ( !memory )
36 memory = new MemoryMeter( parent );
37
38 return memory;
39}
40
41int MemoryAppletImpl::position() const
42{
43 return 8;
44}
45
46QRESULT MemoryAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
47{
48 *iface = 0;
49 if ( uuid == IID_QUnknown )
50 *iface = this;
51 else if ( uuid == IID_TaskbarApplet )
52 *iface = this;
53 else
54 return QS_FALSE;
55
56 (*iface)->addRef();
57
58 return QS_OK;
59}
60
61Q_EXPORT_INTERFACE()
62{
63 Q_CREATE_INSTANCE( MemoryAppletImpl )
64}
65
diff --git a/noncore/applets/memoryapplet/memoryappletimpl.h b/noncore/applets/memoryapplet/memoryappletimpl.h
deleted file mode 100644
index 2db7dbe..0000000
--- a/noncore/applets/memoryapplet/memoryappletimpl.h
+++ b/dev/null
@@ -1,43 +0,0 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20#ifndef MEMORYAPPLETIMPL_H
21#define MEMORYAPPLETIMPL_H
22
23#include <qtopia/taskbarappletinterface.h>
24
25class MemoryMeter;
26
27class /*QTOPIA_PLUGIN_EXPORT*/ MemoryAppletImpl : public TaskbarAppletInterface
28{
29public:
30 MemoryAppletImpl();
31 virtual ~MemoryAppletImpl();
32
33 QRESULT queryInterface( const QUuid&, QUnknownInterface** );
34 Q_REFCOUNT
35
36 virtual QWidget *applet( QWidget *parent );
37 virtual int position() const;
38
39private:
40 MemoryMeter *memory;
41};
42
43#endif
diff --git a/noncore/applets/memoryapplet/memorymeter.cpp b/noncore/applets/memoryapplet/memorymeter.cpp
index 54b5c52..9299f49 100644
--- a/noncore/applets/memoryapplet/memorymeter.cpp
+++ b/noncore/applets/memoryapplet/memorymeter.cpp
@@ -22,8 +22,6 @@
22 22
23#include <opie2/otaskbarapplet.h>
23#include <qtopia/power.h> 24#include <qtopia/power.h>
24#include <qtopia/config.h> 25#include <qtopia/config.h>
25
26#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
27#include <qtopia/qcopenvelope_qws.h> 26#include <qtopia/qcopenvelope_qws.h>
28#endif
29 27
@@ -68,2 +66,7 @@ MemoryMeter::~MemoryMeter()
68 66
67int MemoryMeter::position()
68{
69 return 7;
70}
71
69QSize MemoryMeter::sizeHint() const 72QSize MemoryMeter::sizeHint() const
@@ -239 +242,6 @@ void MemoryMeter::paintEvent( QPaintEvent* )
239 242
243Q_EXPORT_INTERFACE()
244{
245 Q_CREATE_INSTANCE( OTaskbarAppletWrapper<MemoryMeter> );
246}
247
diff --git a/noncore/applets/memoryapplet/memorymeter.h b/noncore/applets/memoryapplet/memorymeter.h
index 0f3cb0b..ed541f0 100644
--- a/noncore/applets/memoryapplet/memorymeter.h
+++ b/noncore/applets/memoryapplet/memorymeter.h
@@ -33,2 +33,3 @@ public:
33 ~MemoryMeter(); 33 ~MemoryMeter();
34 static int position();
34 35