|
1 // |
|
2 // OSSP asgui - Accounting system graphical user interface |
|
3 // Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) |
|
4 // Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> |
|
5 // Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> |
|
6 // Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH |
|
7 // |
|
8 // This file is part of OSSP asgui, an accounting system graphical user |
|
9 // interface which can be found at http://www.ossp.org/pkg/tool/asgui/. |
|
10 // |
|
11 // Permission to use, copy, modify, and distribute this software for |
|
12 // any purpose with or without fee is hereby granted, provided that |
|
13 // the above copyright notice and this permission notice appear in all |
|
14 // copies. |
|
15 // |
|
16 // THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED |
|
17 // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
|
18 // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
|
19 // IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR |
|
20 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
|
21 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
|
22 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF |
|
23 // USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
|
24 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|
25 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|
26 // OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|
27 // SUCH DAMAGE. |
|
28 // |
|
29 // as_panel.cpp: ISO C++ implementation |
|
30 // |
|
31 |
|
32 #include <vector> |
|
33 |
|
34 #include <qimage.h> |
|
35 |
|
36 #include "as_panel.h" |
|
37 #include "as_generic.h" |
|
38 #include "as_const.h" |
|
39 |
|
40 #include "as_gfx/revcolour.xpm" |
|
41 |
|
42 // |
|
43 // Constructs a Prefpanel as a child of 'pParent', with the |
|
44 // name 'kszName' and widget flags set to 'Flags'. |
|
45 // |
|
46 // The dialog will by default be modal, unless you set 'bModal' to |
|
47 // false to construct a modeless dialog. |
|
48 // |
|
49 Prefpanel::Prefpanel(QWidget *pParent, const char *kszName, bool bModal, WFlags Flags) |
|
50 : QDialog(pParent, kszName, bModal, Flags) |
|
51 { |
|
52 if (!kszName) |
|
53 this->setName("Prefpanel"); |
|
54 |
|
55 this->setSizeGripEnabled(false); |
|
56 this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5, |
|
57 (QSizePolicy::SizeType)5, 0, 0, this->sizePolicy().hasHeightForWidth())); |
|
58 |
|
59 // Initialize our button colours |
|
60 m_pLight = new QColor(); |
|
61 m_pDark = new QColor(); |
|
62 |
|
63 m_pVlayout = new QVBoxLayout(this, 11, 6, "Formlayout"); |
|
64 m_pTabselect = new QTabWidget(this, "Tabselector"); |
|
65 |
|
66 // Start of style chooser UI pieces |
|
67 m_pBoolpage = new QWidget(m_pTabselect, "Tabpage"); |
|
68 m_pBoolayout = new QHBoxLayout(m_pBoolpage, 11, 6, "Genlayout"); |
|
69 m_pBinlayout = new QVBoxLayout(0, 0, 6, "Binarylayout"); |
|
70 m_pStylegroup = new QButtonGroup(m_pBoolpage, "Stylebuttongroup"); |
|
71 m_pStylegroup->setColumnLayout(0, Qt::Vertical); |
|
72 m_pStylegroup->layout()->setSpacing(6); |
|
73 m_pStylegroup->layout()->setMargin(11); |
|
74 m_pStylegroup->setExclusive(true); |
|
75 |
|
76 m_pStylelay = new QVBoxLayout(m_pStylegroup->layout()); |
|
77 m_pStylelay->setAlignment(Qt::AlignTop); |
|
78 |
|
79 // Block to handle a vector of radio buttons |
|
80 int nIter = 0; |
|
81 QStringList Styles = QStyleFactory::keys(); |
|
82 std::vector<QRadioButton *> Stylevector(Styles.size()); |
|
83 |
|
84 // Discover which interface styles are available, and |
|
85 // dynamically construct new radio buttons to represent them |
|
86 for (QStringList::Iterator Stylename = Styles.begin(); |
|
87 Stylename != Styles.end(); Stylename++) { |
|
88 Stylevector[nIter] = new QRadioButton(m_pStylegroup, *Stylename + "_button"); |
|
89 Stylevector[nIter]->setText(trUtf8(*Stylename, "Comment for " + *Stylename)); |
|
90 Stylevector[nIter]->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding, |
|
91 Stylevector[nIter]->sizePolicy().hasHeightForWidth()); |
|
92 QToolTip::add(Stylevector[nIter], trUtf8("The " + *Stylename + " style", |
|
93 "Comment for toolTip " + *Stylename)); |
|
94 QWhatsThis::add(Stylevector[nIter], trUtf8("Click this button to enjoy the style of the " |
|
95 + *Stylename + " user interface", "Comment whatsThis for " + *Stylename)); |
|
96 m_pStylelay->addWidget(Stylevector[nIter]); |
|
97 nIter++; |
|
98 } |
|
99 |
|
100 // Start of binary option UI pieces (like make backups, yes or no) |
|
101 m_pSwitchgroup = new QButtonGroup(m_pBoolpage, "Switchbuttongroup"); |
|
102 m_pSwitchgroup->setColumnLayout(0, Qt::Vertical); |
|
103 m_pSwitchgroup->layout()->setSpacing(6); |
|
104 m_pSwitchgroup->layout()->setMargin(11); |
|
105 m_pSwitchgroup->setExclusive(false); |
|
106 m_pSwitchlay = new QVBoxLayout(m_pSwitchgroup->layout()); |
|
107 m_pSwitchlay->setAlignment(Qt::AlignTop); |
|
108 |
|
109 // Optional file backups with hard coded extension .bak |
|
110 m_pBackupcheck = new QCheckBox(m_pSwitchgroup, "Backupbutton"); |
|
111 m_pBackupcheck->setText(trUtf8("Make .bak file on save", "Comment for Backupcheck")); |
|
112 QToolTip::add(m_pBackupcheck, trUtf8("Make a .bak file when saving", "Comment for toolTip Backupcheck")); |
|
113 QWhatsThis::add(m_pBackupcheck, trUtf8("Check this box to enable automatic file backups when overwriting an existing file", "Comment whatsThis for Backupcheck")); |
|
114 m_pSwitchlay->addWidget(m_pBackupcheck); |
|
115 |
|
116 // Optional easy filename appending with hard coded extension .as |
|
117 m_pExtendcheck = new QCheckBox(m_pSwitchgroup, "Extensionbutton"); |
|
118 m_pExtendcheck->setText(trUtf8("Append .as extension", "Comment for Extensioncheck")); |
|
119 QToolTip::add(m_pExtendcheck, trUtf8("Use the .as file extension", "Comment for toolTip Extensioncheck")); |
|
120 QWhatsThis::add(m_pExtendcheck, trUtf8("Check this box to automatically append '.as' to new filenames when saving", "Comment whatsThis for Extensioncheck")); |
|
121 m_pSwitchlay->addWidget(m_pExtendcheck); |
|
122 |
|
123 // Start of report option UI pieces (like detailed report listings) |
|
124 m_pReportgroup = new QButtonGroup(m_pBoolpage, "Reportbuttongroup"); |
|
125 m_pReportgroup->setColumnLayout(0, Qt::Vertical); |
|
126 m_pReportgroup->layout()->setSpacing(6); |
|
127 m_pReportgroup->layout()->setMargin(11); |
|
128 m_pReportgroup->setExclusive(false); |
|
129 m_pReportlay = new QVBoxLayout(m_pReportgroup->layout()); |
|
130 m_pReportlay->setAlignment(Qt::AlignTop); |
|
131 |
|
132 // Optional detailed report listings write all events in range |
|
133 m_pDetailcheck = new QCheckBox(m_pReportgroup, "Detailistbutton"); |
|
134 m_pDetailcheck->setText(trUtf8("Detailed listing", "Comment for Detailcheck")); |
|
135 QToolTip::add(m_pDetailcheck, trUtf8("Write detailed event listings", "Comment for toolTip Detailcheck")); |
|
136 QWhatsThis::add(m_pDetailcheck, trUtf8("Check this box to enable writing of detailed event listings to the local report", "Comment whatsThis for Detailcheck")); |
|
137 m_pReportlay->addWidget(m_pDetailcheck); |
|
138 |
|
139 // Optional signature line in report footer |
|
140 m_pSigncheck = new QCheckBox(m_pReportgroup, "Signaturebutton"); |
|
141 m_pSigncheck->setText(trUtf8("Signature line", "Comment for Signaturecheck")); |
|
142 QToolTip::add(m_pSigncheck, trUtf8("Append a signature line", "Comment for toolTip Signaturecheck")); |
|
143 QWhatsThis::add(m_pSigncheck, trUtf8("Check this box to write a signature line to the report footer", "Comment whatsThis for Signaturecheck")); |
|
144 m_pReportlay->addWidget(m_pSigncheck); |
|
145 m_pBoolayout->addWidget(m_pStylegroup); |
|
146 m_pBinlayout->addWidget(m_pReportgroup); |
|
147 m_pBinlayout->addWidget(m_pSwitchgroup); |
|
148 m_pBoolayout->addLayout(m_pBinlayout); |
|
149 m_pTabselect->insertTab(m_pBoolpage, ""); |
|
150 |
|
151 // Start of paths page UI pieces |
|
152 m_pGeneralpage = new QWidget(m_pTabselect, "Generalpage"); |
|
153 m_pGenlayout = new QHBoxLayout(m_pGeneralpage, 11, 6, "Genlayout"); |
|
154 m_pGenbox = new QGroupBox(m_pGeneralpage, "Groupboxlayout"); |
|
155 m_pGenbox->setColumnLayout(0, Qt::Vertical); |
|
156 m_pGenbox->layout()->setSpacing(6); |
|
157 m_pGenbox->layout()->setMargin(11); |
|
158 m_pGenboxlay = new QHBoxLayout(m_pGenbox->layout()); |
|
159 m_pGenboxlay->setAlignment(Qt::AlignTop); |
|
160 |
|
161 // Start of path text entry preferences UI pieces |
|
162 m_pGeninner = new QGridLayout(0, 4, 2, 0, 16, "Innergrid"); |
|
163 m_pAcctlabel = new QLabel(m_pGenbox, "Accfilelabel"); |
|
164 m_pGeninner->addWidget(m_pAcctlabel, 0, 0); |
|
165 m_pAcctline = new QLineEdit(m_pGenbox, "Accountline"); |
|
166 m_pGeninner->addWidget(m_pAcctline, 0, 1); |
|
167 m_pEventlabel = new QLabel(m_pGenbox, "Evntdirlabel"); |
|
168 m_pGeninner->addWidget(m_pEventlabel, 1, 0); |
|
169 m_pEventline = new QLineEdit(m_pGenbox, "Eventline"); |
|
170 m_pGeninner->addWidget(m_pEventline, 1, 1); |
|
171 m_pHomelabel = new QLabel(m_pGenbox, "Homelabel"); |
|
172 m_pGeninner->addWidget(m_pHomelabel, 2, 0); |
|
173 m_pHomeline = new QLineEdit(m_pGenbox, "Homeline"); |
|
174 m_pGeninner->addWidget(m_pHomeline, 2, 1); |
|
175 m_pUserlabel = new QLabel(m_pGenbox, "Userlabel"); |
|
176 m_pGeninner->addWidget(m_pUserlabel, 3, 0); |
|
177 m_pUserline = new QLineEdit(m_pGenbox, "Userline"); |
|
178 m_pGeninner->addWidget(m_pUserline, 3, 1); |
|
179 m_pGenboxlay->addLayout(m_pGeninner); |
|
180 |
|
181 m_pGenlayout->addWidget(m_pGenbox); |
|
182 m_pTabselect->insertTab(m_pGeneralpage, ""); |
|
183 |
|
184 // Start of remote page UI pieces |
|
185 m_pRemotepage = new QWidget(m_pTabselect, "Remotepage"); |
|
186 m_pRemlayout = new QHBoxLayout(m_pRemotepage, 11, 6, "Remlayout"); |
|
187 m_pRembox = new QGroupBox(m_pRemotepage, "Remoteboxlayout"); |
|
188 |
|
189 m_pRembox->setColumnLayout(0, Qt::Vertical); |
|
190 m_pRembox->layout()->setSpacing(6); |
|
191 m_pRembox->layout()->setMargin(11); |
|
192 m_pRemboxlay = new QHBoxLayout(m_pRembox->layout()); |
|
193 m_pRemboxlay->setAlignment(Qt::AlignTop); |
|
194 |
|
195 // Start of RPC preferences UI pieces |
|
196 m_pReminner = new QGridLayout(0, 5, 2, 0, 12, "Innergrid"); |
|
197 m_pCorbalabel = new QLabel(m_pRembox, "Corbalabel"); |
|
198 m_pReminner->addWidget(m_pCorbalabel, 0, 0); |
|
199 m_pCorbaline = new QLineEdit(m_pRembox, "Corbaline"); |
|
200 m_pReminner->addWidget(m_pCorbaline, 0, 1); |
|
201 m_pCorbacheck = new QCheckBox(m_pRembox, "Corbacheckbox"); |
|
202 m_pReminner->addWidget(m_pCorbacheck, 1, 1); |
|
203 QSpacerItem *Spacey = new QSpacerItem(6, 12, QSizePolicy::Minimum, QSizePolicy::Minimum); |
|
204 m_pReminner->addItem(Spacey, 2, 0); |
|
205 m_pSoaplabel = new QLabel(m_pRembox, "Soaplabel"); |
|
206 m_pReminner->addWidget(m_pSoaplabel, 3, 0); |
|
207 m_pSoapline = new QLineEdit(m_pRembox, "Soapline"); |
|
208 m_pReminner->addWidget(m_pSoapline, 3, 1); |
|
209 m_pSoapcheck = new QCheckBox(m_pRembox, "Corbacheckbox"); |
|
210 m_pReminner->addWidget(m_pSoapcheck, 4, 1); |
|
211 m_pRemboxlay->addLayout(m_pReminner); |
|
212 |
|
213 m_pRemlayout->addWidget(m_pRembox); |
|
214 m_pTabselect->insertTab(m_pRemotepage, ""); |
|
215 |
|
216 // Start of color page UI pieces |
|
217 m_pColourpage = new QWidget(m_pTabselect, "Colourpage"); |
|
218 m_pColourlayout = new QHBoxLayout(m_pColourpage, 11, 6, "Colourlayout"); |
|
219 m_pShadebox = new QGroupBox(m_pColourpage, "Shadegroupbox"); |
|
220 m_pShadebox->setColumnLayout(0, Qt::Horizontal); |
|
221 m_pShadebox->layout()->setSpacing(6); |
|
222 m_pShadebox->layout()->setMargin(11); |
|
223 m_pShadeboxlay = new QVBoxLayout(m_pShadebox->layout()); |
|
224 m_pShadeboxlay->setAlignment(Qt::AlignTop); |
|
225 |
|
226 m_pShadelayout = new QGridLayout(0, 2, 2, 6, 16, "Shadelayout"); |
|
227 m_pLightlab = new QLabel(m_pShadebox, "Lightlabel"); |
|
228 m_pLightlab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth()); |
|
229 m_pShadelayout->addWidget(m_pLightlab, 0, 0); |
|
230 m_pLightbutt = new QToolButton(m_pShadebox, "Lightbutton"); |
|
231 m_pLightbutt->setFocusPolicy(QToolButton::TabFocus); |
|
232 m_pLightbutt->setCursor(QCursor(13)); |
|
233 m_pShadelayout->addWidget(m_pLightbutt, 0, 1); |
|
234 |
|
235 m_pDarklab = new QLabel(m_pShadebox, "Darklabel"); |
|
236 m_pDarklab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth()); |
|
237 m_pShadelayout->addWidget(m_pDarklab, 1, 0); |
|
238 m_pDarkbutt = new QToolButton(m_pShadebox, "Darkbutton"); |
|
239 m_pDarkbutt->setFocusPolicy(QToolButton::TabFocus); |
|
240 m_pDarkbutt->setCursor(QCursor(13)); |
|
241 m_pShadelayout->addWidget(m_pDarkbutt, 1, 1); |
|
242 |
|
243 m_pRevertlab = new QLabel(m_pShadebox, "Revertlabel"); |
|
244 m_pShadelayout->addWidget(m_pRevertlab, 2, 0); |
|
245 m_pRevertbutt = new QToolButton(m_pShadebox, "Revertbutton"); |
|
246 m_pRevertbutt->setFocusPolicy(QToolButton::TabFocus); |
|
247 // m_pRevertbutt->setIconSet(QIconSet(QPixmap(s_kpcRevcolour_xpm))); |
|
248 m_pRevertbutt->setCursor(QCursor(13)); |
|
249 m_pShadelayout->addWidget(m_pRevertbutt, 2, 1); |
|
250 |
|
251 m_pThemebox = new QGroupBox(m_pColourpage, "Themegroupbox"); |
|
252 m_pThemebox->setColumnLayout(0, Qt::Vertical); |
|
253 m_pThemebox->layout()->setSpacing(6); |
|
254 m_pThemebox->layout()->setMargin(11); |
|
255 m_pThemeboxlay = new QVBoxLayout(m_pThemebox->layout()); |
|
256 |
|
257 QLabel *pPlaceholder = new QLabel(m_pThemebox, "Placeholderlabel"); |
|
258 pPlaceholder->setText(trUtf8("Reserved for future use", "Comment for Placeholderlabel")); |
|
259 m_pThemeboxlay->addWidget(pPlaceholder, 1, Qt::AlignCenter); |
|
260 |
|
261 m_pShadeboxlay->addLayout(m_pShadelayout); |
|
262 m_pColourlayout->addWidget(m_pShadebox); |
|
263 m_pColourlayout->addWidget(m_pThemebox); |
|
264 m_pTabselect->insertTab(m_pColourpage, ""); |
|
265 |
|
266 connect(m_pLightbutt, SIGNAL(clicked(void)), SLOT(shadeLight(void))); |
|
267 connect(m_pDarkbutt, SIGNAL(clicked(void)), SLOT(shadeDark(void))); |
|
268 connect(m_pRevertbutt, SIGNAL(clicked(void)), SLOT(shadeRevert(void))); |
|
269 |
|
270 // Finally add the damn pages to the tab selector widget! |
|
271 m_pVlayout->addWidget(m_pTabselect); |
|
272 |
|
273 // Start of bottom buttons for aknowlegement and commital of changes |
|
274 m_pButtlay = new QHBoxLayout(0, 0, 12, "Buttonlayout"); |
|
275 m_pOkaybutton = new QPushButton(this, "Okaybutton"); |
|
276 m_pOkaybutton->setMinimumWidth(120); |
|
277 m_pOkaybutton->setPaletteBackgroundColor(QColor(202, 194, 182)); |
|
278 m_pOkaybutton->setCursor(QCursor(13)); |
|
279 m_pButtlay->addWidget(m_pOkaybutton); |
|
280 m_pApplybutton = new QPushButton(this, "Applybutton"); |
|
281 m_pApplybutton->setMinimumWidth(120); |
|
282 m_pApplybutton->setPaletteBackgroundColor(QColor(198, 196, 186)); |
|
283 m_pApplybutton->setCursor(QCursor(13)); |
|
284 m_pButtlay->addWidget(m_pApplybutton); |
|
285 // QSpacerItem *Spacey = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); |
|
286 // m_pButtlay->addItem(Spacey); |
|
287 m_pCancelbutton = new QPushButton(this, "Cancelbutton"); |
|
288 m_pCancelbutton->setMinimumWidth(120); |
|
289 m_pCancelbutton->setPaletteBackgroundColor(QColor(198, 196, 186)); |
|
290 m_pCancelbutton->setCursor(QCursor(13)); |
|
291 m_pButtlay->addWidget(m_pCancelbutton); |
|
292 m_pCancelbutton->setDefault(true); |
|
293 m_pVlayout->addLayout(m_pButtlay); |
|
294 |
|
295 // Connect our signals to slots, accept() and reject() are Qt implicit |
|
296 connect(m_pOkaybutton, SIGNAL(clicked(void)), SLOT(accept(void))); |
|
297 connect(m_pApplybutton, SIGNAL(clicked(void)), SIGNAL(applied(void))); |
|
298 connect(m_pCancelbutton, SIGNAL(clicked(void)), SLOT(reject(void))); |
|
299 connect(m_pCorbacheck, SIGNAL(toggled(bool)), SLOT(enableCorba(bool))); |
|
300 connect(m_pSoapcheck, SIGNAL(toggled(bool)), SLOT(enableSoap(bool))); |
|
301 this->textChange(); |
|
302 this->resize(QSize(400, 264).expandedTo(minimumSizeHint())); |
|
303 } |
|
304 |
|
305 // |
|
306 // Sets the light shading colour for rows |
|
307 // |
|
308 void Prefpanel::shadeLight(void) |
|
309 { |
|
310 QColorDialog::setCustomColor(0, this->getRevlight()->rgb()); |
|
311 QColorDialog::setCustomColor(1, this->getRevdark()->rgb()); |
|
312 QColorDialog::setCustomColor(2, this->getAltlight()->rgb()); |
|
313 QColorDialog::setCustomColor(3, this->getAltdark()->rgb()); |
|
314 QColor Colortemp = QColorDialog::getColor(*m_pLight); |
|
315 if (Colortemp.isValid()) { |
|
316 delete m_pLight; |
|
317 m_pLight = new QColor(Colortemp); |
|
318 m_pLightbutt->setPaletteBackgroundColor(*m_pLight); |
|
319 } |
|
320 } |
|
321 |
|
322 // |
|
323 // Sets the dark shading colour for rows |
|
324 // |
|
325 void Prefpanel::shadeDark(void) |
|
326 { |
|
327 QColorDialog::setCustomColor(0, m_pLight->rgb()); |
|
328 QColorDialog::setCustomColor(1, m_pDark->rgb()); |
|
329 QColor Colortemp = QColorDialog::getColor(*m_pDark); |
|
330 if (Colortemp.isValid()) { |
|
331 delete m_pDark; |
|
332 m_pDark = new QColor(Colortemp); |
|
333 m_pDarkbutt->setPaletteBackgroundColor(*m_pDark); |
|
334 } |
|
335 } |
|
336 |
|
337 // |
|
338 // Reverts the shading colours to default values |
|
339 // |
|
340 void Prefpanel::shadeRevert(void) |
|
341 { |
|
342 delete m_pLight; |
|
343 m_pLight = new QColor(*this->getRevlight()); |
|
344 m_pLightbutt->setPaletteBackgroundColor(*m_pLight); |
|
345 delete m_pDark; |
|
346 m_pDark = new QColor(*this->getRevdark()); |
|
347 m_pDarkbutt->setPaletteBackgroundColor(*m_pDark); |
|
348 } |
|
349 |
|
350 // |
|
351 // Polish off ending changes after creating and before widget shows |
|
352 // |
|
353 void Prefpanel::polish(void) |
|
354 { |
|
355 // Set our buttons now that user has probably set their colours |
|
356 m_pLightbutt->setPaletteBackgroundColor(*m_pLight); |
|
357 m_pDarkbutt->setPaletteBackgroundColor(*m_pDark); |
|
358 } |
|
359 |
|
360 // |
|
361 // Sets the strings of the subwidgets using the current language |
|
362 // |
|
363 void Prefpanel::textChange(void) |
|
364 { |
|
365 this->setCaption(trUtf8("AS Applicate Preferences", "Personal preferences are persistent across sessions")); |
|
366 |
|
367 m_pTabselect->changeTab(m_pBoolpage, trUtf8("General")); |
|
368 m_pTabselect->changeTab(m_pGeneralpage, trUtf8("Paths")); |
|
369 m_pTabselect->changeTab(m_pRemotepage, trUtf8("Hosts")); |
|
370 m_pTabselect->changeTab(m_pColourpage, trUtf8("Colour")); |
|
371 |
|
372 m_pOkaybutton->setText(trUtf8("Okay", "Comment for Okaybutton")); |
|
373 QToolTip::add(m_pOkaybutton, trUtf8("Applies and saves changes", "Comment for tooltip Okaybutton")); |
|
374 QWhatsThis::add(m_pOkaybutton, trUtf8("The okay button applies and saves changes", "Comment for whatsThis Okaybutton")); |
|
375 |
|
376 m_pApplybutton->setText(trUtf8("Apply", "Comment for Applybutton")); |
|
377 QToolTip::add(m_pApplybutton, trUtf8("Apply changes immediately", "Comment for toolTip Applybutton")); |
|
378 QWhatsThis::add(m_pApplybutton, trUtf8("The apply button applies changes immediately", "Comment for whatsThis Applybutton")); |
|
379 |
|
380 m_pCancelbutton->setText(trUtf8("Cancel", "Comment for Cancelbutton")); |
|
381 QToolTip::add(m_pCancelbutton, trUtf8("Cancel any changes", "Comment for toolTip Cancelbutton")); |
|
382 QWhatsThis::add(m_pCancelbutton, trUtf8("The cancel button cancels any changes", "Comment for whatsThis Cancelbutton")); |
|
383 |
|
384 m_pGenbox->setTitle(trUtf8("File and directory paths", "Comment for Genbox")); |
|
385 m_pAcctlabel->setText(trUtf8("Accounts path", "Comment for Acctlabel")); |
|
386 m_pEventlabel->setText(trUtf8("Events directory", "Comment for Eventlabel")); |
|
387 m_pUserlabel->setText(trUtf8("User name", "Comment for Userlabel")); |
|
388 m_pHomelabel->setText(trUtf8("Home directory", "Comment for Homelabel")); |
|
389 QToolTip::add(m_pAcctline, trUtf8("The accounts file pathname", "Comment for toolTip Acctline")); |
|
390 QToolTip::add(m_pEventline, trUtf8("The default events directory", "Comment for toolTip Eventline")); |
|
391 QToolTip::add(m_pUserline, trUtf8("The user name", "Comment for toolTip Userline")); |
|
392 QToolTip::add(m_pHomeline, trUtf8("The home directory", "Comment for toolTip Homeline")); |
|
393 |
|
394 m_pRembox->setTitle(trUtf8("Remote host names", "Comment for Rembox")); |
|
395 m_pCorbalabel->setText(trUtf8("CORBA host", "Comment for Corbalabel")); |
|
396 m_pSoaplabel->setText(trUtf8("SOAP host", "Comment for Soaplabel")); |
|
397 QToolTip::add(m_pCorbaline, trUtf8("The CORBA host name", "Comment for toolTip Corbaline")); |
|
398 QToolTip::add(m_pSoapline, trUtf8("The SOAP host name", "Comment for toolTip Soapline")); |
|
399 |
|
400 m_pCorbacheck->setText(trUtf8("Enable IIOP transmission", "Comment for Corbacheck")); |
|
401 QToolTip::add(m_pCorbacheck, trUtf8("Will enable transmission over IIOP", "Comment for toolTip Corbacheck")); |
|
402 QWhatsThis::add(m_pCorbacheck, trUtf8("Check this box to enable transmission to a CORBA host", "Comment whatsThis for Corbacheck")); |
|
403 |
|
404 m_pSoapcheck->setText(trUtf8("Enable SOAP transmission", "Comment for Soapcheck")); |
|
405 QToolTip::add(m_pSoapcheck, trUtf8("Will enable transmission over SOAP", "Comment for toolTip Soapcheck")); |
|
406 QWhatsThis::add(m_pSoapcheck, trUtf8("Check this box to enable transmission to a SOAP host", "Comment whatsThis for Soapcheck")); |
|
407 |
|
408 m_pShadebox->setTitle(trUtf8("Row shading", "Comment for Shadebox")); |
|
409 m_pThemebox->setTitle(trUtf8("Skin themes", "Comment for Themebox")); |
|
410 |
|
411 m_pLightlab->setText(trUtf8("Light", "Comment for Lightlabel")); |
|
412 m_pDarklab->setText(trUtf8("Dark", "Comment for Darklabel")); |
|
413 m_pRevertlab->setText(trUtf8("Revert", "Comment for Revertlabel")); |
|
414 QToolTip::add(m_pLightbutt, trUtf8("Light row shading colour", "Comment for tooltip Lightbutt")); |
|
415 QWhatsThis::add(m_pLightbutt, trUtf8("The Light button sets the light row shading colour.", "Comment for whatsThis Lightbutt")); |
|
416 QToolTip::add(m_pDarkbutt, trUtf8("Dark row shading colour", "Comment for tooltip Darkbutt")); |
|
417 QWhatsThis::add(m_pDarkbutt, trUtf8("The Dark button sets the light row shading colour.", "Comment for whatsThis Darkbutt")); |
|
418 |
|
419 m_pStylegroup->setTitle(trUtf8("Available styles", "Comment for Stylebuttons")); |
|
420 m_pReportgroup->setTitle(trUtf8("Report options", "Comment for Reportbox")); |
|
421 m_pSwitchgroup->setTitle(trUtf8("Other options", "Comment for Switchbox")); |
|
422 } |