author | mickeyl <mickeyl> | 2003-11-03 22:43:25 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-11-03 22:43:25 (UTC) |
commit | e0c0894f9ec4f8e7f09d099d93623dd570f26b13 (patch) (unidiff) | |
tree | 380f69b89944d63d23e51c5a62129f5f05183852 /noncore/applets/memoryapplet/swapfile.h | |
parent | 28812a7f2c5bd370a55824a73f6a0010f8ea9f7e (diff) | |
download | opie-e0c0894f9ec4f8e7f09d099d93623dd570f26b13.zip opie-e0c0894f9ec4f8e7f09d099d93623dd570f26b13.tar.gz opie-e0c0894f9ec4f8e7f09d099d93623dd570f26b13.tar.bz2 |
add memoryapplet (displays memory and manages a swap partition)
written by Anton Maslovsky (http://my-zaurus.narod.ru)
Diffstat (limited to 'noncore/applets/memoryapplet/swapfile.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/applets/memoryapplet/swapfile.h | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/noncore/applets/memoryapplet/swapfile.h b/noncore/applets/memoryapplet/swapfile.h new file mode 100644 index 0000000..8a6d25a --- a/dev/null +++ b/noncore/applets/memoryapplet/swapfile.h | |||
@@ -0,0 +1,70 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of 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 | |||
21 | #ifndef SWAPFILE_H | ||
22 | #define SWAPFILE_H | ||
23 | |||
24 | #include <qwidget.h> | ||
25 | |||
26 | class QLabel; | ||
27 | class QRadioButton; | ||
28 | class QLineEdit; | ||
29 | class QComboBox; | ||
30 | class QProgressBar; | ||
31 | |||
32 | class Swapfile : public QWidget | ||
33 | { | ||
34 | Q_OBJECT | ||
35 | public: | ||
36 | Swapfile( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ); | ||
37 | ~Swapfile(); | ||
38 | |||
39 | private slots: | ||
40 | void swapon(); | ||
41 | void swapoff(); | ||
42 | void cfsdchecked(); | ||
43 | void makeswapfile(); | ||
44 | void removeswapfile(); | ||
45 | void cardnotify( const QCString &msg, const QByteArray & ); | ||
46 | void getStatusPcmcia(); | ||
47 | void getStatusSd(); | ||
48 | void status(); | ||
49 | |||
50 | private: | ||
51 | bool cardInPcmcia0; | ||
52 | bool cardInPcmcia1; | ||
53 | bool cardInSd; | ||
54 | |||
55 | QRadioButton* ramRB; | ||
56 | QRadioButton* cfRB; | ||
57 | QRadioButton* sdRB; | ||
58 | QLineEdit* swapPath1; | ||
59 | QLabel* swapStatus; | ||
60 | QLabel* swapStatusIcon; | ||
61 | QComboBox* swapSize; | ||
62 | QProgressBar* mkswapProgress; | ||
63 | |||
64 | bool isRoot; | ||
65 | |||
66 | int exec(const QString& arg); | ||
67 | void setStatusMessage(const QString& text, bool error = false); | ||
68 | }; | ||
69 | |||
70 | #endif | ||