summaryrefslogtreecommitdiff
authordrw <drw>2005-06-03 18:31:12 (UTC)
committer drw <drw>2005-06-03 18:31:12 (UTC)
commit77736831bd44d6ca60ee573133cd72551d312dbc (patch) (side-by-side diff)
tree7bd56feaf8283e813d2064e7bef1177666897b5d
parentd0f6a0721d7ab67a115d08990143944ee71d54ba (diff)
downloadopie-77736831bd44d6ca60ee573133cd72551d312dbc.zip
opie-77736831bd44d6ca60ee573133cd72551d312dbc.tar.gz
opie-77736831bd44d6ca60ee573133cd72551d312dbc.tar.bz2
Add config option to use smaller font for checkbook transaction tab - patch courtesy of hrw
Diffstat (more/less context) (show 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.cpp3
-rw-r--r--noncore/apps/checkbook/configuration.cpp6
-rw-r--r--noncore/apps/checkbook/configuration.h1
5 files changed, 37 insertions, 21 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
@@ -39,2 +39,3 @@ Cfg::Cfg()
_currencySymbol="$";
+ _useSmallFont=TRUE;
_showLocks=FALSE;
@@ -79,2 +80,3 @@ void Cfg::readConfig(Config &config)
_currencySymbol = config.readEntry( "CurrencySymbol", "$" );
+ _useSmallFont = config.readBoolEntry( "UseSmallFont", TRUE );
_showLocks = config.readBoolEntry( "ShowLocks", FALSE );
@@ -166,2 +168,3 @@ void Cfg::writeConfig(Config &config)
config.writeEntry( "CurrencySymbol", _currencySymbol );
+ config.writeEntry( "UseSmallFont", _useSmallFont );
config.writeEntry( "ShowLocks", _showLocks );
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,24 +1,24 @@
/*
-                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,
@@ -70,2 +70,4 @@ class Cfg
// --- members
+ bool getUseSmallFont() { return(_useSmallFont); }
+ void setUseSmallFont(bool n) { _useSmallFont=n; }
bool getShowLocks() { return(_showLocks); }
@@ -118,2 +120,3 @@ class Cfg
QString _currencySymbol;
+ bool _useSmallFont;
bool _showLocks;
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
@@ -223,3 +223,6 @@ QWidget *Checkbook::initTransactions()
QFont fnt(QPEApplication::font());
+ if( _pCfg->getUseSmallFont() )
+ {
fnt.setPointSize( fnt.pointSize()-1 );
+ }
tranTable->setFont( fnt );
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
@@ -148,2 +148,7 @@ QWidget *Configuration::initSettings(Cfg &cfg)
+ 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);
@@ -156,2 +161,3 @@ void Configuration::saveConfig(Cfg &cfg)
cfg.setCurrencySymbol( symbolEdit->text() );
+ cfg.setUseSmallFont( smallFontCB->isChecked() );
cfg.setShowLocks( lockCB->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
@@ -50,2 +50,3 @@ class Configuration : public QDialog
QLineEdit *symbolEdit;
+ QCheckBox *smallFontCB;
QCheckBox *lockCB;