Diffstat (limited to 'noncore/apps/qashmoney/memorydialog.cpp') (more/less context) (ignore 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 @@ -#include "memorydialog.h" -#include "memory.h" -#include <qmessagebox.h> - -extern Memory *memory; - -MemoryDialog::MemoryDialog () : QDialog ( 0, 0, TRUE ) -{ - setCaption ( tr ( "Edit Memory" ) ); - - listbox = new QListBox ( this, "listbox" ); - memory->displayMemoryItems ( listbox ); - listbox->clearSelection(); - - secondline = new QHBox ( this ); - - newbutton = new QPushButton ( secondline ); - newbutton->setPixmap( QPixmap ("/opt/QtPalmtop/pics/new.png") ); - connect ( newbutton, SIGNAL ( released() ), this, SLOT ( addItem() ) ); - - editbutton = new QPushButton ( secondline ); - editbutton->setPixmap( QPixmap ("/opt/QtPalmtop/pics/edit.png") ); - connect ( editbutton, SIGNAL ( released() ), this, SLOT ( editItem() ) ); - - deletebutton = new QPushButton( secondline ); - deletebutton->setPixmap( QPixmap ("/opt/QtPalmtop/pics/delete.png") ); - connect ( deletebutton, SIGNAL ( released() ), this, SLOT ( deleteItem() ) ); - - lineedit = new QLineEdit ( this ); - - layout = new QVBoxLayout ( this, 2, 2 ); - layout->addWidget ( listbox ); - layout->addWidget ( secondline ); - layout->addWidget ( lineedit ); -} - -MemoryDialog::~MemoryDialog() - { - } - -void MemoryDialog::addItem () - { - if ( lineedit->text().length() != 0 ) - { - memory->addMemoryItem ( lineedit->text() ); - listbox->clear (); - memory->displayMemoryItems ( listbox ); - listbox->clearFocus(); - listbox->clearSelection (); - lineedit->clear(); - } - } - -void MemoryDialog::editItem () - { - if ( listbox->currentItem() != -1 ) - { - lineedit->setText ( listbox->currentText() ); - memory->deleteMemoryItem ( listbox->currentText() ); - listbox->clear (); - memory->displayMemoryItems ( listbox ); - listbox->clearSelection(); - } - else - QMessageBox::warning ( this, "QashMoney", "Please select an item to edit." ); - } - -void MemoryDialog::deleteItem () - { - if ( listbox->currentItem() != -1 ) - { - memory->deleteMemoryItem ( listbox->currentText() ); - listbox->clear (); - memory->displayMemoryItems ( listbox ); - listbox->clearSelection(); - } - else - QMessageBox::warning ( this, "QashMoney", "Please select an item to delete." ); - } - - - - - - - |