author | drw <drw> | 2002-10-26 19:12:24 (UTC) |
---|---|---|
committer | drw <drw> | 2002-10-26 19:12:24 (UTC) |
commit | ff2c581b50252714fb4621d088cbf0961ed23f2b (patch) (side-by-side diff) | |
tree | eeae9967322a8ec4aa6b86d044c4b7ac0c700785 | |
parent | 0929d2489a2ae219fc6ab02f5fe0678a21f50190 (diff) | |
download | opie-ff2c581b50252714fb4621d088cbf0961ed23f2b.zip opie-ff2c581b50252714fb4621d088cbf0961ed23f2b.tar.gz opie-ff2c581b50252714fb4621d088cbf0961ed23f2b.tar.bz2 |
Use new pics for checkbook
-rw-r--r-- | noncore/apps/checkbook/checkbook.cpp | 8 | ||||
-rw-r--r-- | noncore/apps/checkbook/opie-checkbook.control | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp index ee65784..4b81c6d 100644 --- a/noncore/apps/checkbook/checkbook.cpp +++ b/noncore/apps/checkbook/checkbook.cpp @@ -28,99 +28,99 @@ #include "checkbook.h" #include "transaction.h" #include <opie/otabwidget.h> #include <qpe/config.h> #include <qpe/qpeapplication.h> #include <qpe/qpemessagebox.h> #include <qpe/resource.h> #include <qcombobox.h> #include <qfile.h> #include <qlabel.h> #include <qlayout.h> #include <qlineedit.h> #include <qlistview.h> #include <qmultilineedit.h> #include <qpushbutton.h> #include <qwhatsthis.h> #include <qwidget.h> Checkbook::Checkbook( QWidget *parent, const QString &n, const QString &fd, char symbol ) : QDialog( parent, 0, TRUE, WStyle_ContextHelp ) { name = n; filename = fd + name + ".qcb"; filedir = fd; currencySymbol = symbol; currBalance = 0.0; if ( name != "" ) { setCaption( name + " - " + tr( "Checkbook" ) ); } else { setCaption( tr( "New checkbook" ) ); } // Setup layout to make everything pretty QVBoxLayout *layout = new QVBoxLayout( this ); layout->setMargin( 2 ); layout->setSpacing( 4 ); // Setup tabs for all info mainWidget = new OTabWidget( this ); layout->addWidget( mainWidget ); - mainWidget->addTab( initInfo(), "help_icon", tr( "Info" ) ); - mainWidget->addTab( initTransactions(), "Spreadsheet", tr( "Transactions" ) ); - mainWidget->addTab( initCharts(), "DocumentTypePowerPoint", tr( "Charts" ) ); + mainWidget->addTab( initInfo(), "checkbook/infotab", tr( "Info" ) ); + mainWidget->addTab( initTransactions(), "checkbook/trantab", tr( "Transactions" ) ); + mainWidget->addTab( initCharts(), "checkbook/charttab", tr( "Charts" ) ); mainWidget->setCurrentTab( tr( "Info" ) ); // Load checkbook information loadCheckbook(); } Checkbook::~Checkbook() { } const QString &Checkbook::getName() { return( name ); } QWidget *Checkbook::initInfo() { QWidget *control = new QWidget( mainWidget ); QVBoxLayout *vb = new QVBoxLayout( control ); QScrollView *sv = new QScrollView( control ); vb->addWidget( sv, 0, 0 ); sv->setResizePolicy( QScrollView::AutoOneFit ); sv->setFrameStyle( QFrame::NoFrame ); QWidget *container = new QWidget( sv->viewport() ); sv->addChild( container ); QGridLayout *layout = new QGridLayout( container ); layout->setSpacing( 2 ); layout->setMargin( 4 ); // Account name QLabel *label = new QLabel( tr( "Name:" ), container ); QWhatsThis::add( label, tr( "Enter name of checkbook here." ) ); layout->addWidget( label, 0, 0 ); nameEdit = new QLineEdit( container ); QWhatsThis::add( nameEdit, tr( "Enter name of checkbook here." ) ); connect( nameEdit, SIGNAL( textChanged( const QString & ) ), this, SLOT( slotNameChanged( const QString & ) ) ); layout->addWidget( nameEdit, 0, 1 ); // Type of account label = new QLabel( tr( "Type:" ), container ); QWhatsThis::add( label, tr( "Select type of checkbook here." ) ); layout->addWidget( label, 1, 0 ); typeList = new QComboBox( container ); @@ -202,97 +202,97 @@ QWidget *Checkbook::initTransactions() tranTable->setAllColumnsShowFocus( TRUE ); layout->addMultiCellWidget( tranTable, 1, 1, 0, 2 ); QPEApplication::setStylusOperation( tranTable->viewport(), QPEApplication::RightOnHold ); connect( tranTable, SIGNAL( rightButtonPressed( QListViewItem *, const QPoint &, int ) ), this, SLOT( slotEditTran() ) ); QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), control ); QWhatsThis::add( btn, tr( "Click here to add a new transaction." ) ); connect( btn, SIGNAL( clicked() ), this, SLOT( slotNewTran() ) ); layout->addWidget( btn, 2, 0 ); btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Edit" ), control ); QWhatsThis::add( btn, tr( "Select a transaction and then click here to edit it." ) ); connect( btn, SIGNAL( clicked() ), this, SLOT( slotEditTran() ) ); layout->addWidget( btn, 2, 1 ); btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), control ); QWhatsThis::add( btn, tr( "Select a checkbook and then click here to delete it." ) ); connect( btn, SIGNAL( clicked() ), this, SLOT( slotDeleteTran() ) ); layout->addWidget( btn, 2, 2 ); return( control ); } QWidget *Checkbook::initCharts() { QWidget *control = new QWidget( mainWidget ); QGridLayout *layout = new QGridLayout( control ); layout->setSpacing( 2 ); layout->setMargin( 4 ); /* QLabel *label = new QLabel( control ); label->setText( tr( "Graph type:" ) ); layout->addWidget( label, 0, 0 ); graphList = new QComboBox( control ); graphList->insertItem( tr( "By category" ) ); graphList->insertItem( tr( "..." ) ); graphList->insertItem( tr( "..." ) ); layout->addWidget( graphList, 0, 1 ); */ QWidget *graphWidget = new QWidget( control ); QWhatsThis::add( graphWidget, tr( "Graph not implemented yet." ) ); layout->addMultiCellWidget( graphWidget, 0, 0, 0, 1 ); graphWidget->setBackgroundMode( QWidget::PaletteBase ); - QPushButton *btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Draw" ), control ); + QPushButton *btn = new QPushButton( Resource::loadPixmap( "checkbook/drawbtn" ), tr( "Draw" ), control ); QWhatsThis::add( btn, tr( "Click here to draw the graph." ) ); connect( btn, SIGNAL( clicked() ), this, SLOT( slotDrawGraph() ) ); layout->addWidget( btn, 1, 1 ); return control; } void Checkbook::loadCheckbook() { transactions.clear(); Config config(filename, Config::File); // Load info config.setGroup( "Account" ); nameEdit->setText( name ); QString temptext = config.readEntry( "Type" ); int i = typeList->count(); while ( i > 0 ) { i--; typeList->setCurrentItem( i ); if ( typeList->currentText() == temptext ) { break; } } bankEdit->setText( config.readEntry( "Bank", "" ) ); acctNumEdit->setText( config.readEntry( "Number", "" ) ); pinNumEdit->setText( config.readEntry( "PINNumber", "" ) ); balanceEdit->setText( config.readEntry( "Balance", "0.0" ) ); notesEdit->setText( config.readEntry( "Notes", "" ) ); bool ok; currBalance = balanceEdit->text().toFloat( &ok ); startBalance = currBalance; // Load transactions TranInfo *tran; QString trandesc = ""; float amount; QString stramount; for ( int i = 1; trandesc != QString::null; i++ ) { tran = new TranInfo( config, i ); trandesc = tran->desc(); if ( trandesc != QString::null ) { diff --git a/noncore/apps/checkbook/opie-checkbook.control b/noncore/apps/checkbook/opie-checkbook.control index f8e14ca..7bde1db 100644 --- a/noncore/apps/checkbook/opie-checkbook.control +++ b/noncore/apps/checkbook/opie-checkbook.control @@ -1,9 +1,9 @@ -Files: bin/checkbook apps/Applications/checkbook.desktop pics/checkbook/checkbook.png +Files: bin/checkbook apps/Applications/checkbook.desktop pics/checkbook Priority: optional Section: applications -Maintainer: drw <drw@handhelds.org> +Maintainer: Dan Williams <williamsdr@acm.org> Architecture: arm Version: $QPE_VERSION-$SUB_VERSION Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION) Description: Checkbook keeping program. The checkbook accounting program for the Opie environment. |