summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook
authorar <ar>2004-02-08 19:14:56 (UTC)
committer ar <ar>2004-02-08 19:14:56 (UTC)
commit5f698069bca9dde2c8be9ff1bf863ee3a7a33cf0 (patch) (side-by-side diff)
tree525f35c4937c9f4ae99538289c5d1f96c53d7fa7 /noncore/apps/checkbook
parent2dc8add65c44b3dd240cf2bd3c276c3c0155f46b (diff)
downloadopie-5f698069bca9dde2c8be9ff1bf863ee3a7a33cf0.zip
opie-5f698069bca9dde2c8be9ff1bf863ee3a7a33cf0.tar.gz
opie-5f698069bca9dde2c8be9ff1bf863ee3a7a33cf0.tar.bz2
improve support for BigScreen
Diffstat (limited to 'noncore/apps/checkbook') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/checkbook.cpp6
-rw-r--r--noncore/apps/checkbook/mainwindow.cpp11
2 files changed, 6 insertions, 11 deletions
diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp
index a42c824..a5492e4 100644
--- a/noncore/apps/checkbook/checkbook.cpp
+++ b/noncore/apps/checkbook/checkbook.cpp
@@ -474,26 +474,25 @@ void Checkbook::slotStartingBalanceChanged( const QString &newbalance )
// --- slotNewTran ------------------------------------------------------------
void Checkbook::slotNewTran()
{
TranInfo *traninfo = new TranInfo( info->getNextNumber() );
if( !_dLastNew.isNull() )
traninfo->setDate(_dLastNew);
Transaction *currtran = new Transaction( this, true, info->name(),
traninfo,
_pCfg );
- currtran->showMaximized();
- if ( currtran->exec() == QDialog::Accepted )
+ if ( QPEApplication::execDialog( currtran ) == QDialog::Accepted )
{
// Add to transaction list
info->addTransaction( traninfo );
// Add to transaction table
float amount;
QString stramount;
amount = (traninfo->withdrawal() ? -1 : 1)*traninfo->amount();
stramount.sprintf( "%s%.2f", _pCfg->getCurrencySymbol().latin1(), amount );
( void ) new CBListItem( traninfo, tranTable, traninfo->getIdStr(), traninfo->datestr(false),
traninfo->number(), traninfo->datestr(true), traninfo->desc(),
stramount );
@@ -521,26 +520,25 @@ void Checkbook::slotNewTran()
// --- slotEditTran -----------------------------------------------------------
void Checkbook::slotEditTran()
{
QListViewItem *curritem = tranTable->currentItem();
if ( !curritem )
return;
TranInfo *traninfo=info->findTransaction( curritem->text(COL_ID) );
Transaction *currtran = new Transaction( this, false, info->name(),
traninfo,
_pCfg );
- currtran->showMaximized();
- if ( currtran->exec() == QDialog::Accepted )
+ if ( QPEApplication::execDialog( currtran ) == QDialog::Accepted )
{
curritem->setText( COL_NUM, traninfo->number() );
curritem->setText( COL_SORTDATE, traninfo->datestr(false) );
curritem->setText( COL_DATE, traninfo->datestr(true) );
curritem->setText( COL_DESC, traninfo->desc() );
float amount = traninfo->amount();
if ( traninfo->withdrawal() )
{
amount *= -1;
}
QString stramount;
diff --git a/noncore/apps/checkbook/mainwindow.cpp b/noncore/apps/checkbook/mainwindow.cpp
index f29001a..60aea42 100644
--- a/noncore/apps/checkbook/mainwindow.cpp
+++ b/noncore/apps/checkbook/mainwindow.cpp
@@ -27,29 +27,29 @@
*/
#include "mainwindow.h"
#include "cbinfo.h"
#include "configuration.h"
#include "password.h"
#include "checkbook.h"
#include "listedit.h"
#include <qpe/config.h>
#include <qpe/global.h>
#include <qpe/qpeapplication.h>
-#include <qmenubar.h>
#include <qpe/qpemessagebox.h>
#include <qpe/qpetoolbar.h>
#include <qpe/resource.h>
+#include <qmenubar.h>
#include <qaction.h>
#include <qcheckbox.h>
#include <qdir.h>
#include <qlineedit.h>
#include <qwhatsthis.h>
MainWindow::MainWindow( QWidget* parent, const char* name, WFlags /*fl*/ )
: QMainWindow( parent, name, WStyle_ContextHelp )
{
setCaption( tr( "Checkbook" ) );
@@ -205,26 +205,25 @@ void MainWindow::addCheckbook( CBInfo *cb )
void MainWindow::buildFilename( const QString &name )
{
tempFilename = cbDir;
tempFilename.append( name );
tempFilename.append( ".qcb" );
}
void MainWindow::slotNew()
{
CBInfo *cb = new CBInfo();
Checkbook *currcb = new Checkbook( this, cb, &_cfg );
- currcb->showMaximized();
- if ( currcb->exec() == QDialog::Accepted )
+ if ( QPEApplication::execDialog( currcb ) == QDialog::Accepted )
{
// Save new checkbook
buildFilename( cb->name() );
_cfg.setLastBook( cb->name() );
cb->setFilename( tempFilename );
cb->write();
// Add to listbox
checkbooks->inSort( cb );
addCheckbook( cb );
}
delete currcb;
@@ -263,26 +262,25 @@ void MainWindow::openBook(QListViewItem *curritem)
{
Password *pw = new Password( this, tr( "Enter password" ), tr( "Please enter your password:" ) );
if ( pw->exec() != QDialog::Accepted || pw->password != cb->password() )
{
delete pw;
return;
}
delete pw;
}
_cfg.setLastBook( currname );
Checkbook *currcb = new Checkbook( this, cb, &_cfg );
- currcb->showMaximized();
- if ( currcb->exec() == QDialog::Accepted )
+ if ( QPEApplication::execDialog( currcb ) == QDialog::Accepted )
{
QString newname = cb->name();
if ( currname != newname )
{
// Update name if changed
if( curritem ) {
curritem->setText( posName, newname );
cbList->sort();
}
_cfg.setLastBook( newname );
// Remove old file
@@ -336,26 +334,25 @@ void MainWindow::slotDelete()
{
f.remove();
}
delete cbList->currentItem();
}
}
// --- slotConfigure ----------------------------------------------------------
void MainWindow::slotConfigure()
{
Configuration *cfgdlg = new Configuration( this, _cfg );
- cfgdlg->showMaximized();
- if ( cfgdlg->exec() == QDialog::Accepted )
+ if ( QPEApplication::execDialog( cfgdlg ) == QDialog::Accepted )
{
// read data from config dialog & save it
cfgdlg->saveConfig( _cfg );
writeConfig();
buildList();
}
delete cfgdlg;
}
// --- writeConfig --------------------------------------------------------------
void MainWindow::writeConfig()