summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/checkbook.cpp8
-rw-r--r--noncore/apps/checkbook/opie-checkbook.control4
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
@@ -52,51 +52,51 @@ Checkbook::Checkbook( QWidget *parent, const QString &n, const QString &fd, char
52 name = n; 52 name = n;
53 filename = fd + name + ".qcb"; 53 filename = fd + name + ".qcb";
54 filedir = fd; 54 filedir = fd;
55 currencySymbol = symbol; 55 currencySymbol = symbol;
56 currBalance = 0.0; 56 currBalance = 0.0;
57 57
58 if ( name != "" ) 58 if ( name != "" )
59 { 59 {
60 setCaption( name + " - " + tr( "Checkbook" ) ); 60 setCaption( name + " - " + tr( "Checkbook" ) );
61 } 61 }
62 else 62 else
63 { 63 {
64 setCaption( tr( "New checkbook" ) ); 64 setCaption( tr( "New checkbook" ) );
65 } 65 }
66 66
67 // Setup layout to make everything pretty 67 // Setup layout to make everything pretty
68 QVBoxLayout *layout = new QVBoxLayout( this ); 68 QVBoxLayout *layout = new QVBoxLayout( this );
69 layout->setMargin( 2 ); 69 layout->setMargin( 2 );
70 layout->setSpacing( 4 ); 70 layout->setSpacing( 4 );
71 71
72 // Setup tabs for all info 72 // Setup tabs for all info
73 mainWidget = new OTabWidget( this ); 73 mainWidget = new OTabWidget( this );
74 layout->addWidget( mainWidget ); 74 layout->addWidget( mainWidget );
75 75
76 mainWidget->addTab( initInfo(), "help_icon", tr( "Info" ) ); 76 mainWidget->addTab( initInfo(), "checkbook/infotab", tr( "Info" ) );
77 mainWidget->addTab( initTransactions(), "Spreadsheet", tr( "Transactions" ) ); 77 mainWidget->addTab( initTransactions(), "checkbook/trantab", tr( "Transactions" ) );
78 mainWidget->addTab( initCharts(), "DocumentTypePowerPoint", tr( "Charts" ) ); 78 mainWidget->addTab( initCharts(), "checkbook/charttab", tr( "Charts" ) );
79 mainWidget->setCurrentTab( tr( "Info" ) ); 79 mainWidget->setCurrentTab( tr( "Info" ) );
80 80
81 // Load checkbook information 81 // Load checkbook information
82 loadCheckbook(); 82 loadCheckbook();
83} 83}
84 84
85Checkbook::~Checkbook() 85Checkbook::~Checkbook()
86{ 86{
87} 87}
88 88
89const QString &Checkbook::getName() 89const QString &Checkbook::getName()
90{ 90{
91 return( name ); 91 return( name );
92} 92}
93 93
94QWidget *Checkbook::initInfo() 94QWidget *Checkbook::initInfo()
95{ 95{
96 QWidget *control = new QWidget( mainWidget ); 96 QWidget *control = new QWidget( mainWidget );
97 97
98 QVBoxLayout *vb = new QVBoxLayout( control ); 98 QVBoxLayout *vb = new QVBoxLayout( control );
99 99
100 QScrollView *sv = new QScrollView( control ); 100 QScrollView *sv = new QScrollView( control );
101 vb->addWidget( sv, 0, 0 ); 101 vb->addWidget( sv, 0, 0 );
102 sv->setResizePolicy( QScrollView::AutoOneFit ); 102 sv->setResizePolicy( QScrollView::AutoOneFit );
@@ -226,49 +226,49 @@ QWidget *Checkbook::initTransactions()
226QWidget *Checkbook::initCharts() 226QWidget *Checkbook::initCharts()
227{ 227{
228 QWidget *control = new QWidget( mainWidget ); 228 QWidget *control = new QWidget( mainWidget );
229 229
230 QGridLayout *layout = new QGridLayout( control ); 230 QGridLayout *layout = new QGridLayout( control );
231 layout->setSpacing( 2 ); 231 layout->setSpacing( 2 );
232 layout->setMargin( 4 ); 232 layout->setMargin( 4 );
233 233
234/* 234/*
235 QLabel *label = new QLabel( control ); 235 QLabel *label = new QLabel( control );
236 label->setText( tr( "Graph type:" ) ); 236 label->setText( tr( "Graph type:" ) );
237 layout->addWidget( label, 0, 0 ); 237 layout->addWidget( label, 0, 0 );
238 graphList = new QComboBox( control ); 238 graphList = new QComboBox( control );
239 graphList->insertItem( tr( "By category" ) ); 239 graphList->insertItem( tr( "By category" ) );
240 graphList->insertItem( tr( "..." ) ); 240 graphList->insertItem( tr( "..." ) );
241 graphList->insertItem( tr( "..." ) ); 241 graphList->insertItem( tr( "..." ) );
242 layout->addWidget( graphList, 0, 1 ); 242 layout->addWidget( graphList, 0, 1 );
243*/ 243*/
244 244
245 QWidget *graphWidget = new QWidget( control ); 245 QWidget *graphWidget = new QWidget( control );
246 QWhatsThis::add( graphWidget, tr( "Graph not implemented yet." ) ); 246 QWhatsThis::add( graphWidget, tr( "Graph not implemented yet." ) );
247 layout->addMultiCellWidget( graphWidget, 0, 0, 0, 1 ); 247 layout->addMultiCellWidget( graphWidget, 0, 0, 0, 1 );
248 graphWidget->setBackgroundMode( QWidget::PaletteBase ); 248 graphWidget->setBackgroundMode( QWidget::PaletteBase );
249 249
250 QPushButton *btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Draw" ), control ); 250 QPushButton *btn = new QPushButton( Resource::loadPixmap( "checkbook/drawbtn" ), tr( "Draw" ), control );
251 QWhatsThis::add( btn, tr( "Click here to draw the graph." ) ); 251 QWhatsThis::add( btn, tr( "Click here to draw the graph." ) );
252 connect( btn, SIGNAL( clicked() ), this, SLOT( slotDrawGraph() ) ); 252 connect( btn, SIGNAL( clicked() ), this, SLOT( slotDrawGraph() ) );
253 layout->addWidget( btn, 1, 1 ); 253 layout->addWidget( btn, 1, 1 );
254 254
255 return control; 255 return control;
256} 256}
257 257
258void Checkbook::loadCheckbook() 258void Checkbook::loadCheckbook()
259{ 259{
260 transactions.clear(); 260 transactions.clear();
261 261
262 Config config(filename, Config::File); 262 Config config(filename, Config::File);
263 263
264 // Load info 264 // Load info
265 config.setGroup( "Account" ); 265 config.setGroup( "Account" );
266 nameEdit->setText( name ); 266 nameEdit->setText( name );
267 QString temptext = config.readEntry( "Type" ); 267 QString temptext = config.readEntry( "Type" );
268 int i = typeList->count(); 268 int i = typeList->count();
269 while ( i > 0 ) 269 while ( i > 0 )
270 { 270 {
271 i--; 271 i--;
272 typeList->setCurrentItem( i ); 272 typeList->setCurrentItem( i );
273 if ( typeList->currentText() == temptext ) 273 if ( typeList->currentText() == temptext )
274 { 274 {
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 @@
1Files: bin/checkbook apps/Applications/checkbook.desktop pics/checkbook/checkbook.png 1Files: bin/checkbook apps/Applications/checkbook.desktop pics/checkbook
2Priority: optional 2Priority: optional
3Section: applications 3Section: applications
4Maintainer: drw <drw@handhelds.org> 4Maintainer: Dan Williams <williamsdr@acm.org>
5Architecture: arm 5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION 6Version: $QPE_VERSION-$SUB_VERSION
7Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION) 7Depends: opie-base ($QPE_VERSION), libopie ($QPE_VERSION)
8Description: Checkbook keeping program. 8Description: Checkbook keeping program.
9 The checkbook accounting program for the Opie environment. 9 The checkbook accounting program for the Opie environment.