Diffstat (limited to 'noncore/apps/qashmoney/newtransaction.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/newtransaction.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/noncore/apps/qashmoney/newtransaction.cpp b/noncore/apps/qashmoney/newtransaction.cpp index 5c78139..87b7f7e 100755 --- a/noncore/apps/qashmoney/newtransaction.cpp +++ b/noncore/apps/qashmoney/newtransaction.cpp | |||
@@ -1,274 +1,274 @@ | |||
1 | #include "newtransaction.h" | 1 | #include "newtransaction.h" |
2 | #include "calculator.h" | 2 | #include "calculator.h" |
3 | #include "datepicker.h" | 3 | #include "datepicker.h" |
4 | #include "budget.h" | 4 | #include "budget.h" |
5 | 5 | ||
6 | #include <qmultilineedit.h> | 6 | #include <qmultilineedit.h> |
7 | 7 | ||
8 | extern Budget *budget; | 8 | extern Budget *budget; |
9 | extern Preferences *preferences; | 9 | extern Preferences *preferences; |
10 | 10 | ||
11 | NewTransaction::NewTransaction ( QWidget* parent ) : QDialog ( parent, 0, TRUE ) | 11 | NewTransaction::NewTransaction ( QWidget* parent ) : QDialog ( parent, 0, TRUE ) |
12 | { | 12 | { |
13 | transactiondescription = ""; | 13 | transactiondescription = ""; |
14 | currentlineitem = -1; | 14 | currentlineitem = -1; |
15 | currentbudget = -1; | 15 | currentbudget = -1; |
16 | dateedited = FALSE; | 16 | dateedited = FALSE; |
17 | setCaption( tr( "Transaction" ) ); | 17 | setCaption( tr( "Transaction" ) ); |
18 | 18 | ||
19 | // START FIRST COLUMN | 19 | // START FIRST COLUMN |
20 | 20 | ||
21 | namelabel = new QLabel ( "Transaction", this ); | 21 | namelabel = new QLabel ( "Transaction", this ); |
22 | 22 | ||
23 | transactionnamebox = new QHBox ( this ); | 23 | transactionnamebox = new QHBox ( this ); |
24 | transactionname = new QComboBox ( transactionnamebox ); | 24 | transactionname = new QComboBox ( transactionnamebox ); |
25 | transactionname->setEditable ( TRUE ); | 25 | transactionname->setEditable ( TRUE ); |
26 | descriptionbutton = new QPushButton ( transactionnamebox ); | 26 | descriptionbutton = new QPushButton ( transactionnamebox ); |
27 | descriptionbutton->setPixmap ( QPixmap ( "/opt/QtPalmtop/pics/info.png" ) ); | 27 | descriptionbutton->setPixmap ( QPixmap ( "/opt/QtPalmtop/pics/info.png" ) ); |
28 | connect ( descriptionbutton, SIGNAL ( released () ), this, SLOT ( addTransactionDescription() ) ); | 28 | connect ( descriptionbutton, SIGNAL ( released() ), this, SLOT ( addTransactionDescription() ) ); |
29 | 29 | ||
30 | amountlabel = new QLabel ( "Amount", this ); | 30 | amountlabel = new QLabel ( "Amount", this ); |
31 | 31 | ||
32 | transactionamountbox = new QHBox ( this ); | 32 | transactionamountbox = new QHBox ( this ); |
33 | transactionamount = new QLineEdit ( transactionamountbox ); | 33 | transactionamount = new QLineEdit ( transactionamountbox ); |
34 | transactionamount->setAlignment ( Qt::AlignRight ); | 34 | transactionamount->setAlignment ( Qt::AlignRight ); |
35 | transactionamount->setText ( "0.00" ); | 35 | transactionamount->setText ( "0.00" ); |
36 | calculatorbutton = new QPushButton( transactionamountbox ); | 36 | calculatorbutton = new QPushButton( transactionamountbox ); |
37 | calculatorbutton->setPixmap ( QPixmap ( "/opt/QtPalmtop/pics/kcalc.png" ) ); | 37 | calculatorbutton->setPixmap ( QPixmap ( "/opt/QtPalmtop/pics/kcalc.png" ) ); |
38 | connect ( calculatorbutton, SIGNAL ( released() ), this, SLOT ( showCalculator() ) ); | 38 | connect ( calculatorbutton, SIGNAL ( released() ), this, SLOT ( showCalculator() ) ); |
39 | 39 | ||
40 | datelabel = new QLabel ( "Date", this ); | 40 | datelabel = new QLabel ( "Date", this ); |
41 | 41 | ||
42 | transactiondatebox = new QHBox ( this ); | 42 | transactiondatebox = new QHBox ( this ); |
43 | transactiondate = new QLineEdit ( transactiondatebox ); | 43 | transactiondate = new QLineEdit ( transactiondatebox ); |
44 | transactiondate->setAlignment ( Qt::AlignRight ); | 44 | transactiondate->setAlignment ( Qt::AlignRight ); |
45 | transactiondate->setDisabled ( TRUE ); | 45 | transactiondate->setDisabled ( TRUE ); |
46 | datebutton = new QPushButton( transactiondatebox ); | 46 | datebutton = new QPushButton( transactiondatebox ); |
47 | datebutton->setPixmap ( QPixmap ( "/opt/QtPalmtop/pics/date.png" ) ); | 47 | datebutton->setPixmap ( QPixmap ( "/opt/QtPalmtop/pics/date.png" ) ); |
48 | connect ( datebutton, SIGNAL ( released () ), this, SLOT ( showCalendar () ) ); | 48 | connect ( datebutton, SIGNAL ( released() ), this, SLOT ( showCalendar() ) ); |
49 | 49 | ||
50 | clearedcheckbox = new QCheckBox ( "Cleared", this ); | 50 | clearedcheckbox = new QCheckBox ( "Cleared", this ); |
51 | depositbox = new QCheckBox ( "Credit", this ); | 51 | depositbox = new QCheckBox ( "Credit", this ); |
52 | 52 | ||
53 | // START SECOND COLUMN | 53 | // START SECOND COLUMN |
54 | 54 | ||
55 | numberlabel = new QLabel ( "Number", this ); | 55 | numberlabel = new QLabel ( "Number", this ); |
56 | transactionnumber = new QLineEdit ( this ); | 56 | transactionnumber = new QLineEdit ( this ); |
57 | 57 | ||
58 | budgetlabel = new QLabel ( "Budget", this ); | 58 | budgetlabel = new QLabel ( "Budget", this ); |
59 | budgetbox = new QComboBox ( FALSE, this ); | 59 | budgetbox = new QComboBox ( FALSE, this ); |
60 | 60 | ||
61 | lineitemlabel = new QLabel ( "LineItem", this ); | 61 | lineitemlabel = new QLabel ( "LineItem", this ); |
62 | lineitembox = new QComboBox ( FALSE, this ); | 62 | lineitembox = new QComboBox ( FALSE, this ); |
63 | 63 | ||
64 | layout = new QGridLayout ( this, 7, 2, 2, 2 ); | 64 | layout = new QGridLayout ( this, 7, 2, 2, 2 ); |
65 | layout->addWidget ( namelabel, 0, 0, Qt::AlignLeft ); | 65 | layout->addWidget ( namelabel, 0, 0, Qt::AlignLeft ); |
66 | layout->addWidget ( transactionnamebox, 1, 0, Qt::AlignLeft ); | 66 | layout->addWidget ( transactionnamebox, 1, 0, Qt::AlignLeft ); |
67 | layout->addWidget ( amountlabel, 2, 0, Qt::AlignLeft ); | 67 | layout->addWidget ( amountlabel, 2, 0, Qt::AlignLeft ); |
68 | layout->addWidget ( transactionamountbox, 3, 0, Qt::AlignLeft ); | 68 | layout->addWidget ( transactionamountbox, 3, 0, Qt::AlignLeft ); |
69 | layout->addWidget ( datelabel, 4, 0, Qt::AlignLeft ); | 69 | layout->addWidget ( datelabel, 4, 0, Qt::AlignLeft ); |
70 | layout->addWidget ( transactiondatebox, 5, 0, Qt::AlignLeft ); | 70 | layout->addWidget ( transactiondatebox, 5, 0, Qt::AlignLeft ); |
71 | layout->addWidget ( clearedcheckbox, 6, 0, Qt::AlignLeft ); | 71 | layout->addWidget ( clearedcheckbox, 6, 0, Qt::AlignLeft ); |
72 | layout->addWidget ( numberlabel, 0, 1, Qt::AlignLeft ); | 72 | layout->addWidget ( numberlabel, 0, 1, Qt::AlignLeft ); |
73 | layout->addWidget ( transactionnumber, 1, 1, Qt::AlignLeft ); | 73 | layout->addWidget ( transactionnumber, 1, 1, Qt::AlignLeft ); |
74 | layout->addWidget ( budgetlabel, 2, 1, Qt::AlignLeft ); | 74 | layout->addWidget ( budgetlabel, 2, 1, Qt::AlignLeft ); |
75 | layout->addWidget ( budgetbox, 3, 1, Qt::AlignLeft ); | 75 | layout->addWidget ( budgetbox, 3, 1, Qt::AlignLeft ); |
76 | layout->addWidget ( lineitemlabel, 4, 1, Qt::AlignLeft ); | 76 | layout->addWidget ( lineitemlabel, 4, 1, Qt::AlignLeft ); |
77 | layout->addWidget ( lineitembox, 5, 1, Qt::AlignLeft ); | 77 | layout->addWidget ( lineitembox, 5, 1, Qt::AlignLeft ); |
78 | layout->addWidget ( depositbox, 6, 1, Qt::AlignLeft ); | 78 | layout->addWidget ( depositbox, 6, 1, Qt::AlignLeft ); |
79 | 79 | ||
80 | if ( budget->getNumberOfBudgets() != 0 ) | 80 | if ( budget->getNumberOfBudgets() != 0 ) |
81 | { | 81 | { |
82 | budgetnameslist = budget->getBudgetNames(); | 82 | budgetnameslist = budget->getBudgetNames(); |
83 | budgetidslist = budget->getBudgetIDs(); | 83 | budgetidslist = budget->getBudgetIDs(); |
84 | budgetbox->insertStringList ( *budgetnameslist ); | 84 | budgetbox->insertStringList ( *budgetnameslist ); |
85 | lineitemlabel->setEnabled ( FALSE ); | 85 | lineitemlabel->setEnabled ( FALSE ); |
86 | lineitembox->setEnabled ( FALSE ); | 86 | lineitembox->setEnabled ( FALSE ); |
87 | connect ( budgetbox, SIGNAL ( activated ( int ) ), this, SLOT ( setCurrentBudget ( int ) ) ); | 87 | connect ( budgetbox, SIGNAL ( activated(int) ), this, SLOT ( setCurrentBudget(int) ) ); |
88 | connect ( lineitembox, SIGNAL ( activated ( int ) ), this, SLOT ( setCurrentLineItem ( int ) ) ); | 88 | connect ( lineitembox, SIGNAL ( activated(int) ), this, SLOT ( setCurrentLineItem(int) ) ); |
89 | } | 89 | } |
90 | else | 90 | else |
91 | { | 91 | { |
92 | budgetlabel->setEnabled ( FALSE ); | 92 | budgetlabel->setEnabled ( FALSE ); |
93 | budgetbox->setEnabled ( FALSE ); | 93 | budgetbox->setEnabled ( FALSE ); |
94 | lineitemlabel->setEnabled ( FALSE ); | 94 | lineitemlabel->setEnabled ( FALSE ); |
95 | lineitembox->setEnabled ( FALSE ); | 95 | lineitembox->setEnabled ( FALSE ); |
96 | } | 96 | } |
97 | 97 | ||
98 | } | 98 | } |
99 | 99 | ||
100 | NewTransaction::~NewTransaction () | 100 | NewTransaction::~NewTransaction () |
101 | { | 101 | { |
102 | } | 102 | } |
103 | 103 | ||
104 | void NewTransaction::showCalculator () | 104 | void NewTransaction::showCalculator () |
105 | { | 105 | { |
106 | Calculator *calculator = new Calculator ( this ); | 106 | Calculator *calculator = new Calculator ( this ); |
107 | calculator->setMaximumWidth ( ( int ) ( this->size().width() * 0.9 ) ); | 107 | calculator->setMaximumWidth ( ( int ) ( this->size().width() * 0.9 ) ); |
108 | if ( calculator->exec () == QDialog::Accepted ) | 108 | if ( calculator->exec () == QDialog::Accepted ) |
109 | transactionamount->setText ( calculator->display->text() ); | 109 | transactionamount->setText ( calculator->display->text() ); |
110 | } | 110 | } |
111 | 111 | ||
112 | void NewTransaction::showCalendar () | 112 | void NewTransaction::showCalendar () |
113 | { | 113 | { |
114 | QDate newDate = QDate::currentDate (); | 114 | QDate newDate = QDate::currentDate (); |
115 | DatePicker *dp = new DatePicker ( newDate ); | 115 | DatePicker *dp = new DatePicker ( newDate ); |
116 | dp->setMaximumWidth ( ( int ) ( this->size().width() * 0.9 ) ); | 116 | dp->setMaximumWidth ( ( int ) ( this->size().width() * 0.9 ) ); |
117 | 117 | ||
118 | int response = dp->exec(); | 118 | int response = dp->exec(); |
119 | if ( response == QDialog::Accepted ) | 119 | if ( response == QDialog::Accepted ) |
120 | { | 120 | { |
121 | // Set date integers | 121 | // Set date integers |
122 | year = dp->getYear(); | 122 | year = dp->getYear(); |
123 | month = dp->getMonth(); | 123 | month = dp->getMonth(); |
124 | day = dp->getDay(); | 124 | day = dp->getDay(); |
125 | 125 | ||
126 | // Set dateedited to TRUE | 126 | // Set dateedited to TRUE |
127 | // This tells the transactiondisplay object that the user edited an transaction | 127 | // This tells the transactiondisplay object that the user edited an transaction |
128 | // and did change the date3 | 128 | // and did change the date3 |
129 | dateedited = TRUE; | 129 | dateedited = TRUE; |
130 | 130 | ||
131 | // Display date with our selected format | 131 | // Display date with our selected format |
132 | transactiondate->setText ( preferences->getDate ( year, month, day ) ); | 132 | transactiondate->setText ( preferences->getDate ( year, month, day ) ); |
133 | } | 133 | } |
134 | } | 134 | } |
135 | 135 | ||
136 | bool NewTransaction::getDateEdited () | 136 | bool NewTransaction::getDateEdited () |
137 | { | 137 | { |
138 | return dateedited; | 138 | return dateedited; |
139 | } | 139 | } |
140 | 140 | ||
141 | int NewTransaction::getDay () | 141 | int NewTransaction::getDay () |
142 | { | 142 | { |
143 | return day; | 143 | return day; |
144 | } | 144 | } |
145 | 145 | ||
146 | int NewTransaction::getMonth () | 146 | int NewTransaction::getMonth () |
147 | { | 147 | { |
148 | return month; | 148 | return month; |
149 | } | 149 | } |
150 | 150 | ||
151 | int NewTransaction::getYear () | 151 | int NewTransaction::getYear () |
152 | { | 152 | { |
153 | return year; | 153 | return year; |
154 | } | 154 | } |
155 | 155 | ||
156 | QString NewTransaction::getDescription () | 156 | QString NewTransaction::getDescription () |
157 | { | 157 | { |
158 | return transactiondescription; | 158 | return transactiondescription; |
159 | } | 159 | } |
160 | 160 | ||
161 | void NewTransaction::setDescription ( QString description ) | 161 | void NewTransaction::setDescription ( QString description ) |
162 | { | 162 | { |
163 | transactiondescription = description; | 163 | transactiondescription = description; |
164 | } | 164 | } |
165 | 165 | ||
166 | void NewTransaction::addTransactionDescription () | 166 | void NewTransaction::addTransactionDescription () |
167 | { | 167 | { |
168 | // Function for adding or editing an transaction description. | 168 | // Function for adding or editing an transaction description. |
169 | QDialog *description = new QDialog ( this, "description", TRUE ); | 169 | QDialog *description = new QDialog ( this, "description", TRUE ); |
170 | description->setCaption ( "Notes" ); | 170 | description->setCaption ( "Notes" ); |
171 | QMultiLineEdit *enter = new QMultiLineEdit ( description ); | 171 | QMultiLineEdit *enter = new QMultiLineEdit ( description ); |
172 | enter->setFixedSize ( ( int ) (this->width() * 0.75 ), ( int ) ( this->height() * 0.5 ) ); | 172 | enter->setFixedSize ( ( int ) (this->width() * 0.75 ), ( int ) ( this->height() * 0.5 ) ); |
173 | enter->setWrapColumnOrWidth ( ( int ) (this->width() * 0.75 ) ); | 173 | enter->setWrapColumnOrWidth ( ( int ) (this->width() * 0.75 ) ); |
174 | enter->setWordWrap ( QMultiLineEdit::WidgetWidth ); | 174 | enter->setWordWrap ( QMultiLineEdit::WidgetWidth ); |
175 | if ( transactiondescription != "(NULL)" ) | 175 | if ( transactiondescription != "(NULL)" ) |
176 | enter->setText ( transactiondescription ); | 176 | enter->setText ( transactiondescription ); |
177 | if ( description->exec () == QDialog::Accepted ) | 177 | if ( description->exec () == QDialog::Accepted ) |
178 | transactiondescription = enter->text (); | 178 | transactiondescription = enter->text (); |
179 | } | 179 | } |
180 | 180 | ||
181 | int NewTransaction::getNameIndex ( QString name ) | 181 | int NewTransaction::getNameIndex ( QString name ) |
182 | { | 182 | { |
183 | int counter; | 183 | int counter; |
184 | int items = transactionname->count(); | 184 | int items = transactionname->count(); |
185 | for ( counter = 0; ( items - 1 ); counter++ ) | 185 | for ( counter = 0; ( items - 1 ); counter++ ) |
186 | { | 186 | { |
187 | if ( name == transactionname->text ( counter ) ) | 187 | if ( name == transactionname->text ( counter ) ) |
188 | { | 188 | { |
189 | return counter; | 189 | return counter; |
190 | break; | 190 | break; |
191 | } | 191 | } |
192 | } | 192 | } |
193 | return 0; | 193 | return 0; |
194 | } | 194 | } |
195 | 195 | ||
196 | void NewTransaction::setCurrentBudget ( int index ) | 196 | void NewTransaction::setCurrentBudget ( int index ) |
197 | { | 197 | { |
198 | if ( index != 0 ) | 198 | if ( index != 0 ) |
199 | { | 199 | { |
200 | currentbudget = budgetidslist->operator[] ( index - 1 ).toInt(); | 200 | currentbudget = budgetidslist->operator[] ( index - 1 ).toInt(); |
201 | lineitemslist = budget->getLineItems ( currentbudget ); | 201 | lineitemslist = budget->getLineItems ( currentbudget ); |
202 | lineitemidslist = budget->getLineItemIDs ( currentbudget ); | 202 | lineitemidslist = budget->getLineItemIDs ( currentbudget ); |
203 | lineitemlabel->setEnabled ( TRUE ); | 203 | lineitemlabel->setEnabled ( TRUE ); |
204 | lineitembox->setEnabled ( TRUE ); | 204 | lineitembox->setEnabled ( TRUE ); |
205 | lineitembox->clear(); | 205 | lineitembox->clear(); |
206 | lineitembox->insertStringList ( lineitemslist ); | 206 | lineitembox->insertStringList ( lineitemslist ); |
207 | setCurrentLineItem ( 0 ); | 207 | setCurrentLineItem ( 0 ); |
208 | } | 208 | } |
209 | else | 209 | else |
210 | { | 210 | { |
211 | lineitembox->clear(); | 211 | lineitembox->clear(); |
212 | lineitemlabel->setEnabled ( FALSE ); | 212 | lineitemlabel->setEnabled ( FALSE ); |
213 | lineitembox->setEnabled ( FALSE ); | 213 | lineitembox->setEnabled ( FALSE ); |
214 | currentlineitem = -1; | 214 | currentlineitem = -1; |
215 | currentbudget = -1; | 215 | currentbudget = -1; |
216 | } | 216 | } |
217 | } | 217 | } |
218 | 218 | ||
219 | void NewTransaction::setCurrentLineItem ( int index ) | 219 | void NewTransaction::setCurrentLineItem ( int index ) |
220 | { | 220 | { |
221 | currentlineitem = ( lineitemidslist.operator[] ( index ).toInt() ); | 221 | currentlineitem = ( lineitemidslist.operator[] ( index ).toInt() ); |
222 | } | 222 | } |
223 | 223 | ||
224 | int NewTransaction::getCurrentBudget () | 224 | int NewTransaction::getCurrentBudget () |
225 | { | 225 | { |
226 | return currentbudget; | 226 | return currentbudget; |
227 | } | 227 | } |
228 | 228 | ||
229 | int NewTransaction::getBudgetIndex ( int budgetid ) | 229 | int NewTransaction::getBudgetIndex ( int budgetid ) |
230 | { | 230 | { |
231 | currentbudget = budgetid; | 231 | currentbudget = budgetid; |
232 | const QString budget = QString::number ( budgetid ); | 232 | const QString budget = QString::number ( budgetid ); |
233 | return budgetidslist->findIndex ( budget ); | 233 | return budgetidslist->findIndex ( budget ); |
234 | } | 234 | } |
235 | 235 | ||
236 | int NewTransaction::getLineItemIndex ( int lineitemid ) | 236 | int NewTransaction::getLineItemIndex ( int lineitemid ) |
237 | { | 237 | { |
238 | currentlineitem = lineitemid; | 238 | currentlineitem = lineitemid; |
239 | const QString lineitem = QString::number ( lineitemid ); | 239 | const QString lineitem = QString::number ( lineitemid ); |
240 | return lineitemidslist.findIndex ( lineitem ); | 240 | return lineitemidslist.findIndex ( lineitem ); |
241 | } | 241 | } |
242 | 242 | ||
243 | void NewTransaction::setLineItems () | 243 | void NewTransaction::setLineItems () |
244 | { | 244 | { |
245 | lineitemslist = budget->getLineItems ( currentbudget ); | 245 | lineitemslist = budget->getLineItems ( currentbudget ); |
246 | lineitemidslist = budget->getLineItemIDs ( currentbudget ); | 246 | lineitemidslist = budget->getLineItemIDs ( currentbudget ); |
247 | lineitemlabel->setEnabled ( TRUE ); | 247 | lineitemlabel->setEnabled ( TRUE ); |
248 | lineitembox->setEnabled ( TRUE ); | 248 | lineitembox->setEnabled ( TRUE ); |
249 | lineitembox->clear(); | 249 | lineitembox->clear(); |
250 | lineitembox->insertStringList ( lineitemslist ); | 250 | lineitembox->insertStringList ( lineitemslist ); |
251 | } | 251 | } |
252 | 252 | ||
253 | int NewTransaction::getCurrentLineItem () | 253 | int NewTransaction::getCurrentLineItem () |
254 | { | 254 | { |
255 | return currentlineitem; | 255 | return currentlineitem; |
256 | } | 256 | } |
257 | 257 | ||
258 | void NewTransaction::setComboBoxes ( int budgetid, int lineitemid ) | 258 | void NewTransaction::setComboBoxes ( int budgetid, int lineitemid ) |
259 | { | 259 | { |
260 | const QString budgetname = QString::number ( budgetid ); | 260 | const QString budgetname = QString::number ( budgetid ); |
261 | budgetbox->setCurrentItem ( ( budgetidslist->findIndex ( budgetname ) ) ); | 261 | budgetbox->setCurrentItem ( ( budgetidslist->findIndex ( budgetname ) ) ); |
262 | currentbudget = budgetidslist->operator[] ( budgetbox->currentItem() - 1 ).toInt(); | 262 | currentbudget = budgetidslist->operator[] ( budgetbox->currentItem() - 1 ).toInt(); |
263 | 263 | ||
264 | lineitemslist = budget->getLineItems ( currentbudget ); | 264 | lineitemslist = budget->getLineItems ( currentbudget ); |
265 | lineitemidslist = budget->getLineItemIDs ( currentbudget ); | 265 | lineitemidslist = budget->getLineItemIDs ( currentbudget ); |
266 | lineitemlabel->setEnabled ( TRUE ); | 266 | lineitemlabel->setEnabled ( TRUE ); |
267 | lineitembox->setEnabled ( TRUE ); | 267 | lineitembox->setEnabled ( TRUE ); |
268 | lineitembox->clear(); | 268 | lineitembox->clear(); |
269 | lineitembox->insertStringList ( lineitemslist ); | 269 | lineitembox->insertStringList ( lineitemslist ); |
270 | 270 | ||
271 | const QString lineitem = QString::number ( lineitemid ); | 271 | const QString lineitem = QString::number ( lineitemid ); |
272 | lineitembox->setCurrentItem ( lineitemidslist.findIndex ( lineitem ) ); | 272 | lineitembox->setCurrentItem ( lineitemidslist.findIndex ( lineitem ) ); |
273 | currentlineitem = ( lineitemidslist.operator[] ( lineitembox->currentItem() ).toInt() ); | 273 | currentlineitem = ( lineitemidslist.operator[] ( lineitembox->currentItem() ).toInt() ); |
274 | } | 274 | } |