author | mickeyl <mickeyl> | 2004-11-04 10:33:04 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-11-04 10:33:04 (UTC) |
commit | 7855b19ce0241a7b7b4fc72e3a8ddd9bf73b0a77 (patch) (unidiff) | |
tree | e76604c6af3da9c19b69dcdcf8105d58bac63f71 /noncore/apps/qashmoney/memorydialog.cpp | |
parent | cd2d50799e087fad5b56df9d7fe9aa572a313e64 (diff) | |
download | opie-7855b19ce0241a7b7b4fc72e3a8ddd9bf73b0a77.zip opie-7855b19ce0241a7b7b4fc72e3a8ddd9bf73b0a77.tar.gz opie-7855b19ce0241a7b7b4fc72e3a8ddd9bf73b0a77.tar.bz2 |
opie-qashmoney is now unsupported
Diffstat (limited to 'noncore/apps/qashmoney/memorydialog.cpp') (more/less context) (show whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/memorydialog.cpp | 86 |
1 files changed, 0 insertions, 86 deletions
diff --git a/noncore/apps/qashmoney/memorydialog.cpp b/noncore/apps/qashmoney/memorydialog.cpp deleted file mode 100755 index ba11540..0000000 --- a/noncore/apps/qashmoney/memorydialog.cpp +++ b/dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | #include "memorydialog.h" | ||
2 | #include "memory.h" | ||
3 | #include <qmessagebox.h> | ||
4 | |||
5 | extern Memory *memory; | ||
6 | |||
7 | MemoryDialog::MemoryDialog () : QDialog ( 0, 0, TRUE ) | ||
8 | { | ||
9 | setCaption ( tr ( "Edit Memory" ) ); | ||
10 | |||
11 | listbox = new QListBox ( this, "listbox" ); | ||
12 | memory->displayMemoryItems ( listbox ); | ||
13 | listbox->clearSelection(); | ||
14 | |||
15 | secondline = new QHBox ( this ); | ||
16 | |||
17 | newbutton = new QPushButton ( secondline ); | ||
18 | newbutton->setPixmap( QPixmap ("/opt/QtPalmtop/pics/new.png") ); | ||
19 | connect ( newbutton, SIGNAL ( released() ), this, SLOT ( addItem() ) ); | ||
20 | |||
21 | editbutton = new QPushButton ( secondline ); | ||
22 | editbutton->setPixmap( QPixmap ("/opt/QtPalmtop/pics/edit.png") ); | ||
23 | connect ( editbutton, SIGNAL ( released() ), this, SLOT ( editItem() ) ); | ||
24 | |||
25 | deletebutton = new QPushButton( secondline ); | ||
26 | deletebutton->setPixmap( QPixmap ("/opt/QtPalmtop/pics/delete.png") ); | ||
27 | connect ( deletebutton, SIGNAL ( released() ), this, SLOT ( deleteItem() ) ); | ||
28 | |||
29 | lineedit = new QLineEdit ( this ); | ||
30 | |||
31 | layout = new QVBoxLayout ( this, 2, 2 ); | ||
32 | layout->addWidget ( listbox ); | ||
33 | layout->addWidget ( secondline ); | ||
34 | layout->addWidget ( lineedit ); | ||
35 | } | ||
36 | |||
37 | MemoryDialog::~MemoryDialog() | ||
38 | { | ||
39 | } | ||
40 | |||
41 | void MemoryDialog::addItem () | ||
42 | { | ||
43 | if ( lineedit->text().length() != 0 ) | ||
44 | { | ||
45 | memory->addMemoryItem ( lineedit->text() ); | ||
46 | listbox->clear (); | ||
47 | memory->displayMemoryItems ( listbox ); | ||
48 | listbox->clearFocus(); | ||
49 | listbox->clearSelection (); | ||
50 | lineedit->clear(); | ||
51 | } | ||
52 | } | ||
53 | |||
54 | void MemoryDialog::editItem () | ||
55 | { | ||
56 | if ( listbox->currentItem() != -1 ) | ||
57 | { | ||
58 | lineedit->setText ( listbox->currentText() ); | ||
59 | memory->deleteMemoryItem ( listbox->currentText() ); | ||
60 | listbox->clear (); | ||
61 | memory->displayMemoryItems ( listbox ); | ||
62 | listbox->clearSelection(); | ||
63 | } | ||
64 | else | ||
65 | QMessageBox::warning ( this, "QashMoney", "Please select an item to edit." ); | ||
66 | } | ||
67 | |||
68 | void MemoryDialog::deleteItem () | ||
69 | { | ||
70 | if ( listbox->currentItem() != -1 ) | ||
71 | { | ||
72 | memory->deleteMemoryItem ( listbox->currentText() ); | ||
73 | listbox->clear (); | ||
74 | memory->displayMemoryItems ( listbox ); | ||
75 | listbox->clearSelection(); | ||
76 | } | ||
77 | else | ||
78 | QMessageBox::warning ( this, "QashMoney", "Please select an item to delete." ); | ||
79 | } | ||
80 | |||
81 | |||
82 | |||
83 | |||
84 | |||
85 | |||
86 | |||