Diffstat (limited to 'noncore/apps/checkbook/configuration.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/checkbook/configuration.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/noncore/apps/checkbook/configuration.cpp b/noncore/apps/checkbook/configuration.cpp index 3f5662d..dfae446 100644 --- a/noncore/apps/checkbook/configuration.cpp +++ b/noncore/apps/checkbook/configuration.cpp | |||
@@ -76,6 +76,12 @@ Configuration::Configuration( QWidget *parent, Cfg &cfg ) | |||
76 | QStringList lst=cfg.getCategories(); | 76 | QStringList lst=cfg.getCategories(); |
77 | _listEditCategories->addData( lst ); | 77 | _listEditCategories->addData( lst ); |
78 | _mainWidget->addTab( _listEditCategories, tr( "&Categories" ) ); | 78 | _mainWidget->addTab( _listEditCategories, tr( "&Categories" ) ); |
79 | |||
80 | // Payees tab | ||
81 | _listEditPayees=new ListEdit(_mainWidget, "PAYEES"); | ||
82 | _listEditPayees->addColumnDef( new ColumnDef( tr("Payee"), (ColumnDef::ColumnType)(ColumnDef::typeString | ColumnDef::typeUnique), tr("New Payee")) ); | ||
83 | _listEditPayees->addData( cfg.getPayees() ); | ||
84 | _mainWidget->addTab( _listEditPayees, tr("&Payees") ); | ||
79 | } | 85 | } |
80 | 86 | ||
81 | Configuration::~Configuration() | 87 | Configuration::~Configuration() |
@@ -138,6 +144,12 @@ QWidget *Configuration::initSettings(Cfg &cfg) | |||
138 | lastTabCB->setChecked( cfg.isShowLastTab() ); | 144 | lastTabCB->setChecked( cfg.isShowLastTab() ); |
139 | layout->addMultiCellWidget( lastTabCB, 4, 4, 0, 1 ); | 145 | layout->addMultiCellWidget( lastTabCB, 4, 4, 0, 1 ); |
140 | 146 | ||
147 | savePayees = new QCheckBox( tr("Save new description as payee"), container ); | ||
148 | QWhatsThis::add( savePayees, tr("Click here to save new descriptions in the list of payess.") ); | ||
149 | savePayees->setMaximumHeight(fh+5); | ||
150 | savePayees->setChecked( cfg.getSavePayees() ); | ||
151 | layout->addMultiCellWidget( savePayees, 5, 5, 0, 1 ); | ||
152 | |||
141 | return(control); | 153 | return(control); |
142 | } | 154 | } |
143 | 155 | ||
@@ -150,6 +162,7 @@ void Configuration::saveConfig(Cfg &cfg) | |||
150 | cfg.setShowBalances( balCB->isChecked() ); | 162 | cfg.setShowBalances( balCB->isChecked() ); |
151 | cfg.setOpenLastBook( openLastBookCB->isChecked() ); | 163 | cfg.setOpenLastBook( openLastBookCB->isChecked() ); |
152 | cfg.setShowLastTab( lastTabCB->isChecked() ); | 164 | cfg.setShowLastTab( lastTabCB->isChecked() ); |
165 | cfg.setSavePayees( savePayees->isChecked() ); | ||
153 | 166 | ||
154 | // Typelist | 167 | // Typelist |
155 | _listEditTypes->storeInList( cfg.getAccountTypes() ); | 168 | _listEditTypes->storeInList( cfg.getAccountTypes() ); |
@@ -158,4 +171,7 @@ void Configuration::saveConfig(Cfg &cfg) | |||
158 | QStringList lst; | 171 | QStringList lst; |
159 | _listEditCategories->storeInList( lst ); | 172 | _listEditCategories->storeInList( lst ); |
160 | cfg.setCategories( lst ); | 173 | cfg.setCategories( lst ); |
174 | |||
175 | // Payees | ||
176 | _listEditPayees->storeInList( cfg.getPayees() ); | ||
161 | } | 177 | } |