summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook
Side-by-side diff
Diffstat (limited to 'noncore/apps/checkbook') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/cfg.cpp3
-rw-r--r--noncore/apps/checkbook/cfg.h45
-rw-r--r--noncore/apps/checkbook/checkbook.cpp5
-rw-r--r--noncore/apps/checkbook/configuration.cpp6
-rw-r--r--noncore/apps/checkbook/configuration.h1
5 files changed, 38 insertions, 22 deletions
diff --git a/noncore/apps/checkbook/cfg.cpp b/noncore/apps/checkbook/cfg.cpp
index 24fa4cb..4f70593 100644
--- a/noncore/apps/checkbook/cfg.cpp
+++ b/noncore/apps/checkbook/cfg.cpp
@@ -38,4 +38,5 @@ Cfg::Cfg()
{
_currencySymbol="$";
+ _useSmallFont=TRUE;
_showLocks=FALSE;
_showBalances=FALSE;
@@ -78,4 +79,5 @@ void Cfg::readConfig(Config &config)
// read scalars
_currencySymbol = config.readEntry( "CurrencySymbol", "$" );
+ _useSmallFont = config.readBoolEntry( "UseSmallFont", TRUE );
_showLocks = config.readBoolEntry( "ShowLocks", FALSE );
_showBalances = config.readBoolEntry( "ShowBalances", FALSE );
@@ -165,4 +167,5 @@ void Cfg::writeConfig(Config &config)
// write scalars
config.writeEntry( "CurrencySymbol", _currencySymbol );
+ config.writeEntry( "UseSmallFont", _useSmallFont );
config.writeEntry( "ShowLocks", _showLocks );
config.writeEntry( "ShowBalances", _showBalances );
diff --git a/noncore/apps/checkbook/cfg.h b/noncore/apps/checkbook/cfg.h
index 20692b4..418bd93 100644
--- a/noncore/apps/checkbook/cfg.h
+++ b/noncore/apps/checkbook/cfg.h
@@ -1,25 +1,25 @@
/*
-                This file is part of the OPIE Project
+ This file is part of the OPIE Project
=.
-             .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org>
-           .>+-=
- _;:,     .>    :=|. This file is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This file is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General
-..}^=.=       =       ; Public License for more details.
-++=   -.     .`     .:
- :     =  ...= . :.=- You should have received a copy of the GNU
- -.   .:....=;==+<; General Public License along with this file;
-  -_. . .   )=.  = see the file COPYING. If not, write to the
-    --        :-=` Free Software Foundation, Inc.,
+ .=l. Copyright (c) 2002 Dan Williams <drw@handhelds.org>
+ .>+-=
+_;:, .> :=|. This file is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This file is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General
+..}^=.= = ; Public License for more details.
+++= -. .` .:
+: = ...= . :.=- You should have received a copy of the GNU
+-. .:....=;==+<; General Public License along with this file;
+ -_. . . )=. = see the file COPYING. If not, write to the
+ -- :-=` Free Software Foundation, Inc.,
59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
@@ -69,4 +69,6 @@ class Cfg
// --- members
+ bool getUseSmallFont() { return(_useSmallFont); }
+ void setUseSmallFont(bool n) { _useSmallFont=n; }
bool getShowLocks() { return(_showLocks); }
void setShowLocks(bool n) { _showLocks=n; }
@@ -117,4 +119,5 @@ class Cfg
private:
QString _currencySymbol;
+ bool _useSmallFont;
bool _showLocks;
bool _showBalances;
diff --git a/noncore/apps/checkbook/checkbook.cpp b/noncore/apps/checkbook/checkbook.cpp
index b325f45..1231f42 100644
--- a/noncore/apps/checkbook/checkbook.cpp
+++ b/noncore/apps/checkbook/checkbook.cpp
@@ -222,5 +222,8 @@ QWidget *Checkbook::initTransactions()
tranTable = new QListView( control );
QFont fnt(QPEApplication::font());
- fnt.setPointSize( fnt.pointSize()-1 );
+ if( _pCfg->getUseSmallFont() )
+ {
+ fnt.setPointSize( fnt.pointSize()-1 );
+ }
tranTable->setFont( fnt );
QWhatsThis::add( tranTable, tr( "This is a listing of all transactions entered for this checkbook.\n\nTo sort entries by a specific field, click on the column name." ) );
diff --git a/noncore/apps/checkbook/configuration.cpp b/noncore/apps/checkbook/configuration.cpp
index 872d9b2..929c7c0 100644
--- a/noncore/apps/checkbook/configuration.cpp
+++ b/noncore/apps/checkbook/configuration.cpp
@@ -147,4 +147,9 @@ QWidget *Configuration::initSettings(Cfg &cfg)
layout->addMultiCellWidget( savePayees, 5, 5, 0, 1 );
+ smallFontCB = new QCheckBox( tr( "Use smaller font for list" ), container );
+ QWhatsThis::add( smallFontCB, tr( "Click here to select smaller font for transactions." ) );
+ smallFontCB->setChecked( cfg.getUseSmallFont() );
+ layout->addMultiCellWidget( smallFontCB, 6, 6, 0, 1 );
+
return(control);
}
@@ -155,4 +160,5 @@ void Configuration::saveConfig(Cfg &cfg)
// Settings
cfg.setCurrencySymbol( symbolEdit->text() );
+ cfg.setUseSmallFont( smallFontCB->isChecked() );
cfg.setShowLocks( lockCB->isChecked() );
cfg.setShowBalances( balCB->isChecked() );
diff --git a/noncore/apps/checkbook/configuration.h b/noncore/apps/checkbook/configuration.h
index 663514d..44c9717 100644
--- a/noncore/apps/checkbook/configuration.h
+++ b/noncore/apps/checkbook/configuration.h
@@ -49,4 +49,5 @@ class Configuration : public QDialog
QLineEdit *symbolEdit;
+ QCheckBox *smallFontCB;
QCheckBox *lockCB;
QCheckBox *balCB;