summaryrefslogtreecommitdiff
path: root/noncore/apps/checkbook/configuration.cpp
authordrw <drw>2005-06-03 18:31:12 (UTC)
committer drw <drw>2005-06-03 18:31:12 (UTC)
commit77736831bd44d6ca60ee573133cd72551d312dbc (patch) (unidiff)
tree7bd56feaf8283e813d2064e7bef1177666897b5d /noncore/apps/checkbook/configuration.cpp
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 (limited to 'noncore/apps/checkbook/configuration.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/checkbook/configuration.cpp6
1 files changed, 6 insertions, 0 deletions
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
@@ -101,73 +101,79 @@ QWidget *Configuration::initSettings(Cfg &cfg)
101 101
102 QWidget *container = new QWidget( sv->viewport() ); 102 QWidget *container = new QWidget( sv->viewport() );
103 sv->addChild( container ); 103 sv->addChild( container );
104 104
105 QGridLayout *layout = new QGridLayout( container ); 105 QGridLayout *layout = new QGridLayout( container );
106 layout->setSpacing( 4 ); 106 layout->setSpacing( 4 );
107 layout->setMargin( 4 ); 107 layout->setMargin( 4 );
108 108
109 QLabel *label = new QLabel( tr( "Enter currency symbol:" ), container ); 109 QLabel *label = new QLabel( tr( "Enter currency symbol:" ), container );
110 QWhatsThis::add( label, tr( "Enter your local currency symbol here." ) ); 110 QWhatsThis::add( label, tr( "Enter your local currency symbol here." ) );
111 label->setMaximumHeight( fh + 3 ); 111 label->setMaximumHeight( fh + 3 );
112 layout->addWidget( label, 0, 0 ); 112 layout->addWidget( label, 0, 0 );
113 113
114 symbolEdit = new QLineEdit( cfg.getCurrencySymbol(), container ); 114 symbolEdit = new QLineEdit( cfg.getCurrencySymbol(), container );
115 QWhatsThis::add( symbolEdit, tr( "Enter your local currency symbol here." ) ); 115 QWhatsThis::add( symbolEdit, tr( "Enter your local currency symbol here." ) );
116 symbolEdit->setMaximumHeight( fh + 5 ); 116 symbolEdit->setMaximumHeight( fh + 5 );
117 symbolEdit->setFocus(); 117 symbolEdit->setFocus();
118 layout->addWidget( symbolEdit, 0, 1 ); 118 layout->addWidget( symbolEdit, 0, 1 );
119 119
120 lockCB = new QCheckBox( tr( "Show whether checkbook is password\nprotected" ), container ); 120 lockCB = new QCheckBox( tr( "Show whether checkbook is password\nprotected" ), container );
121 QWhatsThis::add( lockCB, tr( "Click here to select whether or not the main window will display that the checkbook is protected with a password." ) ); 121 QWhatsThis::add( lockCB, tr( "Click here to select whether or not the main window will display that the checkbook is protected with a password." ) );
122 lockCB->setChecked( cfg.getShowLocks() ); 122 lockCB->setChecked( cfg.getShowLocks() );
123 layout->addMultiCellWidget( lockCB, 1, 1, 0, 1 ); 123 layout->addMultiCellWidget( lockCB, 1, 1, 0, 1 );
124 124
125 balCB = new QCheckBox( tr( "Show checkbook balances" ), container ); 125 balCB = new QCheckBox( tr( "Show checkbook balances" ), container );
126 QWhatsThis::add( balCB, tr( "Click here to select whether or not the main window will display the current balance for each checkbook." ) ); 126 QWhatsThis::add( balCB, tr( "Click here to select whether or not the main window will display the current balance for each checkbook." ) );
127 balCB->setMaximumHeight( fh + 5 ); 127 balCB->setMaximumHeight( fh + 5 );
128 balCB->setChecked( cfg.getShowBalances() ); 128 balCB->setChecked( cfg.getShowBalances() );
129 layout->addMultiCellWidget( balCB, 2, 2, 0, 1 ); 129 layout->addMultiCellWidget( balCB, 2, 2, 0, 1 );
130 130
131 openLastBookCB = new QCheckBox( tr("Open last checkbook" ), container ); 131 openLastBookCB = new QCheckBox( tr("Open last checkbook" ), container );
132 QWhatsThis::add( openLastBookCB, tr("Click here to select whether the last open checkbook will be opened at startup.") ); 132 QWhatsThis::add( openLastBookCB, tr("Click here to select whether the last open checkbook will be opened at startup.") );
133 openLastBookCB->setMaximumHeight(fh+5); 133 openLastBookCB->setMaximumHeight(fh+5);
134 openLastBookCB->setChecked( cfg.isOpenLastBook() ); 134 openLastBookCB->setChecked( cfg.isOpenLastBook() );
135 layout->addMultiCellWidget( openLastBookCB, 3, 3, 0, 1 ); 135 layout->addMultiCellWidget( openLastBookCB, 3, 3, 0, 1 );
136 136
137 lastTabCB = new QCheckBox( tr("Show last checkbook tab" ), container ); 137 lastTabCB = new QCheckBox( tr("Show last checkbook tab" ), container );
138 QWhatsThis::add( lastTabCB, tr("Click here to select whether the last tab in a checkbook should be displayed.") ); 138 QWhatsThis::add( lastTabCB, tr("Click here to select whether the last tab in a checkbook should be displayed.") );
139 lastTabCB->setMaximumHeight(fh+5); 139 lastTabCB->setMaximumHeight(fh+5);
140 lastTabCB->setChecked( cfg.isShowLastTab() ); 140 lastTabCB->setChecked( cfg.isShowLastTab() );
141 layout->addMultiCellWidget( lastTabCB, 4, 4, 0, 1 ); 141 layout->addMultiCellWidget( lastTabCB, 4, 4, 0, 1 );
142 142
143 savePayees = new QCheckBox( tr("Save new description as payee"), container ); 143 savePayees = new QCheckBox( tr("Save new description as payee"), container );
144 QWhatsThis::add( savePayees, tr("Click here to save new descriptions in the list of payess.") ); 144 QWhatsThis::add( savePayees, tr("Click here to save new descriptions in the list of payess.") );
145 savePayees->setMaximumHeight(fh+5); 145 savePayees->setMaximumHeight(fh+5);
146 savePayees->setChecked( cfg.getSavePayees() ); 146 savePayees->setChecked( cfg.getSavePayees() );
147 layout->addMultiCellWidget( savePayees, 5, 5, 0, 1 ); 147 layout->addMultiCellWidget( savePayees, 5, 5, 0, 1 );
148 148
149 smallFontCB = new QCheckBox( tr( "Use smaller font for list" ), container );
150 QWhatsThis::add( smallFontCB, tr( "Click here to select smaller font for transactions." ) );
151 smallFontCB->setChecked( cfg.getUseSmallFont() );
152 layout->addMultiCellWidget( smallFontCB, 6, 6, 0, 1 );
153
149 return(control); 154 return(control);
150} 155}
151 156
152// --- saveConfig ------------------------------------------------------------- 157// --- saveConfig -------------------------------------------------------------
153void Configuration::saveConfig(Cfg &cfg) 158void Configuration::saveConfig(Cfg &cfg)
154{ 159{
155 // Settings 160 // Settings
156 cfg.setCurrencySymbol( symbolEdit->text() ); 161 cfg.setCurrencySymbol( symbolEdit->text() );
162 cfg.setUseSmallFont( smallFontCB->isChecked() );
157 cfg.setShowLocks( lockCB->isChecked() ); 163 cfg.setShowLocks( lockCB->isChecked() );
158 cfg.setShowBalances( balCB->isChecked() ); 164 cfg.setShowBalances( balCB->isChecked() );
159 cfg.setOpenLastBook( openLastBookCB->isChecked() ); 165 cfg.setOpenLastBook( openLastBookCB->isChecked() );
160 cfg.setShowLastTab( lastTabCB->isChecked() ); 166 cfg.setShowLastTab( lastTabCB->isChecked() );
161 cfg.setSavePayees( savePayees->isChecked() ); 167 cfg.setSavePayees( savePayees->isChecked() );
162 168
163 // Typelist 169 // Typelist
164 _listEditTypes->storeInList( cfg.getAccountTypes() ); 170 _listEditTypes->storeInList( cfg.getAccountTypes() );
165 171
166 // Category list 172 // Category list
167 QStringList lst; 173 QStringList lst;
168 _listEditCategories->storeInList( lst ); 174 _listEditCategories->storeInList( lst );
169 cfg.setCategories( lst ); 175 cfg.setCategories( lst );
170 176
171 // Payees 177 // Payees
172 _listEditPayees->storeInList( cfg.getPayees() ); 178 _listEditPayees->storeInList( cfg.getPayees() );
173} 179}