1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/as_panel.cpp Fri Nov 28 11:21:08 2008 +0100 1.3 @@ -0,0 +1,422 @@ 1.4 +// 1.5 +// OSSP asgui - Accounting system graphical user interface 1.6 +// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) 1.7 +// Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> 1.8 +// Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> 1.9 +// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH 1.10 +// 1.11 +// This file is part of OSSP asgui, an accounting system graphical user 1.12 +// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. 1.13 +// 1.14 +// Permission to use, copy, modify, and distribute this software for 1.15 +// any purpose with or without fee is hereby granted, provided that 1.16 +// the above copyright notice and this permission notice appear in all 1.17 +// copies. 1.18 +// 1.19 +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED 1.20 +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 1.21 +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 1.22 +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR 1.23 +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1.24 +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1.25 +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 1.26 +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 1.27 +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 1.28 +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 1.29 +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 1.30 +// SUCH DAMAGE. 1.31 +// 1.32 +// as_panel.cpp: ISO C++ implementation 1.33 +// 1.34 + 1.35 +#include <vector> 1.36 + 1.37 +#include <qimage.h> 1.38 + 1.39 +#include "as_panel.h" 1.40 +#include "as_generic.h" 1.41 +#include "as_const.h" 1.42 + 1.43 +#include "as_gfx/revcolour.xpm" 1.44 + 1.45 +// 1.46 +// Constructs a Prefpanel as a child of 'pParent', with the 1.47 +// name 'kszName' and widget flags set to 'Flags'. 1.48 +// 1.49 +// The dialog will by default be modal, unless you set 'bModal' to 1.50 +// false to construct a modeless dialog. 1.51 +// 1.52 +Prefpanel::Prefpanel(QWidget *pParent, const char *kszName, bool bModal, WFlags Flags) 1.53 + : QDialog(pParent, kszName, bModal, Flags) 1.54 +{ 1.55 + if (!kszName) 1.56 + this->setName("Prefpanel"); 1.57 + 1.58 + this->setSizeGripEnabled(false); 1.59 + this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5, 1.60 + (QSizePolicy::SizeType)5, 0, 0, this->sizePolicy().hasHeightForWidth())); 1.61 + 1.62 + // Initialize our button colours 1.63 + m_pLight = new QColor(); 1.64 + m_pDark = new QColor(); 1.65 + 1.66 + m_pVlayout = new QVBoxLayout(this, 11, 6, "Formlayout"); 1.67 + m_pTabselect = new QTabWidget(this, "Tabselector"); 1.68 + 1.69 + // Start of style chooser UI pieces 1.70 + m_pBoolpage = new QWidget(m_pTabselect, "Tabpage"); 1.71 + m_pBoolayout = new QHBoxLayout(m_pBoolpage, 11, 6, "Genlayout"); 1.72 + m_pBinlayout = new QVBoxLayout(0, 0, 6, "Binarylayout"); 1.73 + m_pStylegroup = new QButtonGroup(m_pBoolpage, "Stylebuttongroup"); 1.74 + m_pStylegroup->setColumnLayout(0, Qt::Vertical); 1.75 + m_pStylegroup->layout()->setSpacing(6); 1.76 + m_pStylegroup->layout()->setMargin(11); 1.77 + m_pStylegroup->setExclusive(true); 1.78 + 1.79 + m_pStylelay = new QVBoxLayout(m_pStylegroup->layout()); 1.80 + m_pStylelay->setAlignment(Qt::AlignTop); 1.81 + 1.82 + // Block to handle a vector of radio buttons 1.83 + int nIter = 0; 1.84 + QStringList Styles = QStyleFactory::keys(); 1.85 + std::vector<QRadioButton *> Stylevector(Styles.size()); 1.86 + 1.87 + // Discover which interface styles are available, and 1.88 + // dynamically construct new radio buttons to represent them 1.89 + for (QStringList::Iterator Stylename = Styles.begin(); 1.90 + Stylename != Styles.end(); Stylename++) { 1.91 + Stylevector[nIter] = new QRadioButton(m_pStylegroup, *Stylename + "_button"); 1.92 + Stylevector[nIter]->setText(trUtf8(*Stylename, "Comment for " + *Stylename)); 1.93 + Stylevector[nIter]->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Expanding, 1.94 + Stylevector[nIter]->sizePolicy().hasHeightForWidth()); 1.95 + QToolTip::add(Stylevector[nIter], trUtf8("The " + *Stylename + " style", 1.96 + "Comment for toolTip " + *Stylename)); 1.97 + QWhatsThis::add(Stylevector[nIter], trUtf8("Click this button to enjoy the style of the " 1.98 + + *Stylename + " user interface", "Comment whatsThis for " + *Stylename)); 1.99 + m_pStylelay->addWidget(Stylevector[nIter]); 1.100 + nIter++; 1.101 + } 1.102 + 1.103 + // Start of binary option UI pieces (like make backups, yes or no) 1.104 + m_pSwitchgroup = new QButtonGroup(m_pBoolpage, "Switchbuttongroup"); 1.105 + m_pSwitchgroup->setColumnLayout(0, Qt::Vertical); 1.106 + m_pSwitchgroup->layout()->setSpacing(6); 1.107 + m_pSwitchgroup->layout()->setMargin(11); 1.108 + m_pSwitchgroup->setExclusive(false); 1.109 + m_pSwitchlay = new QVBoxLayout(m_pSwitchgroup->layout()); 1.110 + m_pSwitchlay->setAlignment(Qt::AlignTop); 1.111 + 1.112 + // Optional file backups with hard coded extension .bak 1.113 + m_pBackupcheck = new QCheckBox(m_pSwitchgroup, "Backupbutton"); 1.114 + m_pBackupcheck->setText(trUtf8("Make .bak file on save", "Comment for Backupcheck")); 1.115 + QToolTip::add(m_pBackupcheck, trUtf8("Make a .bak file when saving", "Comment for toolTip Backupcheck")); 1.116 + QWhatsThis::add(m_pBackupcheck, trUtf8("Check this box to enable automatic file backups when overwriting an existing file", "Comment whatsThis for Backupcheck")); 1.117 + m_pSwitchlay->addWidget(m_pBackupcheck); 1.118 + 1.119 + // Optional easy filename appending with hard coded extension .as 1.120 + m_pExtendcheck = new QCheckBox(m_pSwitchgroup, "Extensionbutton"); 1.121 + m_pExtendcheck->setText(trUtf8("Append .as extension", "Comment for Extensioncheck")); 1.122 + QToolTip::add(m_pExtendcheck, trUtf8("Use the .as file extension", "Comment for toolTip Extensioncheck")); 1.123 + QWhatsThis::add(m_pExtendcheck, trUtf8("Check this box to automatically append '.as' to new filenames when saving", "Comment whatsThis for Extensioncheck")); 1.124 + m_pSwitchlay->addWidget(m_pExtendcheck); 1.125 + 1.126 + // Start of report option UI pieces (like detailed report listings) 1.127 + m_pReportgroup = new QButtonGroup(m_pBoolpage, "Reportbuttongroup"); 1.128 + m_pReportgroup->setColumnLayout(0, Qt::Vertical); 1.129 + m_pReportgroup->layout()->setSpacing(6); 1.130 + m_pReportgroup->layout()->setMargin(11); 1.131 + m_pReportgroup->setExclusive(false); 1.132 + m_pReportlay = new QVBoxLayout(m_pReportgroup->layout()); 1.133 + m_pReportlay->setAlignment(Qt::AlignTop); 1.134 + 1.135 + // Optional detailed report listings write all events in range 1.136 + m_pDetailcheck = new QCheckBox(m_pReportgroup, "Detailistbutton"); 1.137 + m_pDetailcheck->setText(trUtf8("Detailed listing", "Comment for Detailcheck")); 1.138 + QToolTip::add(m_pDetailcheck, trUtf8("Write detailed event listings", "Comment for toolTip Detailcheck")); 1.139 + QWhatsThis::add(m_pDetailcheck, trUtf8("Check this box to enable writing of detailed event listings to the local report", "Comment whatsThis for Detailcheck")); 1.140 + m_pReportlay->addWidget(m_pDetailcheck); 1.141 + 1.142 + // Optional signature line in report footer 1.143 + m_pSigncheck = new QCheckBox(m_pReportgroup, "Signaturebutton"); 1.144 + m_pSigncheck->setText(trUtf8("Signature line", "Comment for Signaturecheck")); 1.145 + QToolTip::add(m_pSigncheck, trUtf8("Append a signature line", "Comment for toolTip Signaturecheck")); 1.146 + QWhatsThis::add(m_pSigncheck, trUtf8("Check this box to write a signature line to the report footer", "Comment whatsThis for Signaturecheck")); 1.147 + m_pReportlay->addWidget(m_pSigncheck); 1.148 + m_pBoolayout->addWidget(m_pStylegroup); 1.149 + m_pBinlayout->addWidget(m_pReportgroup); 1.150 + m_pBinlayout->addWidget(m_pSwitchgroup); 1.151 + m_pBoolayout->addLayout(m_pBinlayout); 1.152 + m_pTabselect->insertTab(m_pBoolpage, ""); 1.153 + 1.154 + // Start of paths page UI pieces 1.155 + m_pGeneralpage = new QWidget(m_pTabselect, "Generalpage"); 1.156 + m_pGenlayout = new QHBoxLayout(m_pGeneralpage, 11, 6, "Genlayout"); 1.157 + m_pGenbox = new QGroupBox(m_pGeneralpage, "Groupboxlayout"); 1.158 + m_pGenbox->setColumnLayout(0, Qt::Vertical); 1.159 + m_pGenbox->layout()->setSpacing(6); 1.160 + m_pGenbox->layout()->setMargin(11); 1.161 + m_pGenboxlay = new QHBoxLayout(m_pGenbox->layout()); 1.162 + m_pGenboxlay->setAlignment(Qt::AlignTop); 1.163 + 1.164 + // Start of path text entry preferences UI pieces 1.165 + m_pGeninner = new QGridLayout(0, 4, 2, 0, 16, "Innergrid"); 1.166 + m_pAcctlabel = new QLabel(m_pGenbox, "Accfilelabel"); 1.167 + m_pGeninner->addWidget(m_pAcctlabel, 0, 0); 1.168 + m_pAcctline = new QLineEdit(m_pGenbox, "Accountline"); 1.169 + m_pGeninner->addWidget(m_pAcctline, 0, 1); 1.170 + m_pEventlabel = new QLabel(m_pGenbox, "Evntdirlabel"); 1.171 + m_pGeninner->addWidget(m_pEventlabel, 1, 0); 1.172 + m_pEventline = new QLineEdit(m_pGenbox, "Eventline"); 1.173 + m_pGeninner->addWidget(m_pEventline, 1, 1); 1.174 + m_pHomelabel = new QLabel(m_pGenbox, "Homelabel"); 1.175 + m_pGeninner->addWidget(m_pHomelabel, 2, 0); 1.176 + m_pHomeline = new QLineEdit(m_pGenbox, "Homeline"); 1.177 + m_pGeninner->addWidget(m_pHomeline, 2, 1); 1.178 + m_pUserlabel = new QLabel(m_pGenbox, "Userlabel"); 1.179 + m_pGeninner->addWidget(m_pUserlabel, 3, 0); 1.180 + m_pUserline = new QLineEdit(m_pGenbox, "Userline"); 1.181 + m_pGeninner->addWidget(m_pUserline, 3, 1); 1.182 + m_pGenboxlay->addLayout(m_pGeninner); 1.183 + 1.184 + m_pGenlayout->addWidget(m_pGenbox); 1.185 + m_pTabselect->insertTab(m_pGeneralpage, ""); 1.186 + 1.187 + // Start of remote page UI pieces 1.188 + m_pRemotepage = new QWidget(m_pTabselect, "Remotepage"); 1.189 + m_pRemlayout = new QHBoxLayout(m_pRemotepage, 11, 6, "Remlayout"); 1.190 + m_pRembox = new QGroupBox(m_pRemotepage, "Remoteboxlayout"); 1.191 + 1.192 + m_pRembox->setColumnLayout(0, Qt::Vertical); 1.193 + m_pRembox->layout()->setSpacing(6); 1.194 + m_pRembox->layout()->setMargin(11); 1.195 + m_pRemboxlay = new QHBoxLayout(m_pRembox->layout()); 1.196 + m_pRemboxlay->setAlignment(Qt::AlignTop); 1.197 + 1.198 + // Start of RPC preferences UI pieces 1.199 + m_pReminner = new QGridLayout(0, 5, 2, 0, 12, "Innergrid"); 1.200 + m_pCorbalabel = new QLabel(m_pRembox, "Corbalabel"); 1.201 + m_pReminner->addWidget(m_pCorbalabel, 0, 0); 1.202 + m_pCorbaline = new QLineEdit(m_pRembox, "Corbaline"); 1.203 + m_pReminner->addWidget(m_pCorbaline, 0, 1); 1.204 + m_pCorbacheck = new QCheckBox(m_pRembox, "Corbacheckbox"); 1.205 + m_pReminner->addWidget(m_pCorbacheck, 1, 1); 1.206 + QSpacerItem *Spacey = new QSpacerItem(6, 12, QSizePolicy::Minimum, QSizePolicy::Minimum); 1.207 + m_pReminner->addItem(Spacey, 2, 0); 1.208 + m_pSoaplabel = new QLabel(m_pRembox, "Soaplabel"); 1.209 + m_pReminner->addWidget(m_pSoaplabel, 3, 0); 1.210 + m_pSoapline = new QLineEdit(m_pRembox, "Soapline"); 1.211 + m_pReminner->addWidget(m_pSoapline, 3, 1); 1.212 + m_pSoapcheck = new QCheckBox(m_pRembox, "Corbacheckbox"); 1.213 + m_pReminner->addWidget(m_pSoapcheck, 4, 1); 1.214 + m_pRemboxlay->addLayout(m_pReminner); 1.215 + 1.216 + m_pRemlayout->addWidget(m_pRembox); 1.217 + m_pTabselect->insertTab(m_pRemotepage, ""); 1.218 + 1.219 + // Start of color page UI pieces 1.220 + m_pColourpage = new QWidget(m_pTabselect, "Colourpage"); 1.221 + m_pColourlayout = new QHBoxLayout(m_pColourpage, 11, 6, "Colourlayout"); 1.222 + m_pShadebox = new QGroupBox(m_pColourpage, "Shadegroupbox"); 1.223 + m_pShadebox->setColumnLayout(0, Qt::Horizontal); 1.224 + m_pShadebox->layout()->setSpacing(6); 1.225 + m_pShadebox->layout()->setMargin(11); 1.226 + m_pShadeboxlay = new QVBoxLayout(m_pShadebox->layout()); 1.227 + m_pShadeboxlay->setAlignment(Qt::AlignTop); 1.228 + 1.229 + m_pShadelayout = new QGridLayout(0, 2, 2, 6, 16, "Shadelayout"); 1.230 + m_pLightlab = new QLabel(m_pShadebox, "Lightlabel"); 1.231 + m_pLightlab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth()); 1.232 + m_pShadelayout->addWidget(m_pLightlab, 0, 0); 1.233 + m_pLightbutt = new QToolButton(m_pShadebox, "Lightbutton"); 1.234 + m_pLightbutt->setFocusPolicy(QToolButton::TabFocus); 1.235 + m_pLightbutt->setCursor(QCursor(13)); 1.236 + m_pShadelayout->addWidget(m_pLightbutt, 0, 1); 1.237 + 1.238 + m_pDarklab = new QLabel(m_pShadebox, "Darklabel"); 1.239 + m_pDarklab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth()); 1.240 + m_pShadelayout->addWidget(m_pDarklab, 1, 0); 1.241 + m_pDarkbutt = new QToolButton(m_pShadebox, "Darkbutton"); 1.242 + m_pDarkbutt->setFocusPolicy(QToolButton::TabFocus); 1.243 + m_pDarkbutt->setCursor(QCursor(13)); 1.244 + m_pShadelayout->addWidget(m_pDarkbutt, 1, 1); 1.245 + 1.246 + m_pRevertlab = new QLabel(m_pShadebox, "Revertlabel"); 1.247 + m_pShadelayout->addWidget(m_pRevertlab, 2, 0); 1.248 + m_pRevertbutt = new QToolButton(m_pShadebox, "Revertbutton"); 1.249 + m_pRevertbutt->setFocusPolicy(QToolButton::TabFocus); 1.250 +// m_pRevertbutt->setIconSet(QIconSet(QPixmap(s_kpcRevcolour_xpm))); 1.251 + m_pRevertbutt->setCursor(QCursor(13)); 1.252 + m_pShadelayout->addWidget(m_pRevertbutt, 2, 1); 1.253 + 1.254 + m_pThemebox = new QGroupBox(m_pColourpage, "Themegroupbox"); 1.255 + m_pThemebox->setColumnLayout(0, Qt::Vertical); 1.256 + m_pThemebox->layout()->setSpacing(6); 1.257 + m_pThemebox->layout()->setMargin(11); 1.258 + m_pThemeboxlay = new QVBoxLayout(m_pThemebox->layout()); 1.259 + 1.260 + QLabel *pPlaceholder = new QLabel(m_pThemebox, "Placeholderlabel"); 1.261 + pPlaceholder->setText(trUtf8("Reserved for future use", "Comment for Placeholderlabel")); 1.262 + m_pThemeboxlay->addWidget(pPlaceholder, 1, Qt::AlignCenter); 1.263 + 1.264 + m_pShadeboxlay->addLayout(m_pShadelayout); 1.265 + m_pColourlayout->addWidget(m_pShadebox); 1.266 + m_pColourlayout->addWidget(m_pThemebox); 1.267 + m_pTabselect->insertTab(m_pColourpage, ""); 1.268 + 1.269 + connect(m_pLightbutt, SIGNAL(clicked(void)), SLOT(shadeLight(void))); 1.270 + connect(m_pDarkbutt, SIGNAL(clicked(void)), SLOT(shadeDark(void))); 1.271 + connect(m_pRevertbutt, SIGNAL(clicked(void)), SLOT(shadeRevert(void))); 1.272 + 1.273 + // Finally add the damn pages to the tab selector widget! 1.274 + m_pVlayout->addWidget(m_pTabselect); 1.275 + 1.276 + // Start of bottom buttons for aknowlegement and commital of changes 1.277 + m_pButtlay = new QHBoxLayout(0, 0, 12, "Buttonlayout"); 1.278 + m_pOkaybutton = new QPushButton(this, "Okaybutton"); 1.279 + m_pOkaybutton->setMinimumWidth(120); 1.280 + m_pOkaybutton->setPaletteBackgroundColor(QColor(202, 194, 182)); 1.281 + m_pOkaybutton->setCursor(QCursor(13)); 1.282 + m_pButtlay->addWidget(m_pOkaybutton); 1.283 + m_pApplybutton = new QPushButton(this, "Applybutton"); 1.284 + m_pApplybutton->setMinimumWidth(120); 1.285 + m_pApplybutton->setPaletteBackgroundColor(QColor(198, 196, 186)); 1.286 + m_pApplybutton->setCursor(QCursor(13)); 1.287 + m_pButtlay->addWidget(m_pApplybutton); 1.288 +// QSpacerItem *Spacey = new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); 1.289 +// m_pButtlay->addItem(Spacey); 1.290 + m_pCancelbutton = new QPushButton(this, "Cancelbutton"); 1.291 + m_pCancelbutton->setMinimumWidth(120); 1.292 + m_pCancelbutton->setPaletteBackgroundColor(QColor(198, 196, 186)); 1.293 + m_pCancelbutton->setCursor(QCursor(13)); 1.294 + m_pButtlay->addWidget(m_pCancelbutton); 1.295 + m_pCancelbutton->setDefault(true); 1.296 + m_pVlayout->addLayout(m_pButtlay); 1.297 + 1.298 + // Connect our signals to slots, accept() and reject() are Qt implicit 1.299 + connect(m_pOkaybutton, SIGNAL(clicked(void)), SLOT(accept(void))); 1.300 + connect(m_pApplybutton, SIGNAL(clicked(void)), SIGNAL(applied(void))); 1.301 + connect(m_pCancelbutton, SIGNAL(clicked(void)), SLOT(reject(void))); 1.302 + connect(m_pCorbacheck, SIGNAL(toggled(bool)), SLOT(enableCorba(bool))); 1.303 + connect(m_pSoapcheck, SIGNAL(toggled(bool)), SLOT(enableSoap(bool))); 1.304 + this->textChange(); 1.305 + this->resize(QSize(400, 264).expandedTo(minimumSizeHint())); 1.306 +} 1.307 + 1.308 +// 1.309 +// Sets the light shading colour for rows 1.310 +// 1.311 +void Prefpanel::shadeLight(void) 1.312 +{ 1.313 + QColorDialog::setCustomColor(0, this->getRevlight()->rgb()); 1.314 + QColorDialog::setCustomColor(1, this->getRevdark()->rgb()); 1.315 + QColorDialog::setCustomColor(2, this->getAltlight()->rgb()); 1.316 + QColorDialog::setCustomColor(3, this->getAltdark()->rgb()); 1.317 + QColor Colortemp = QColorDialog::getColor(*m_pLight); 1.318 + if (Colortemp.isValid()) { 1.319 + delete m_pLight; 1.320 + m_pLight = new QColor(Colortemp); 1.321 + m_pLightbutt->setPaletteBackgroundColor(*m_pLight); 1.322 + } 1.323 +} 1.324 + 1.325 +// 1.326 +// Sets the dark shading colour for rows 1.327 +// 1.328 +void Prefpanel::shadeDark(void) 1.329 +{ 1.330 + QColorDialog::setCustomColor(0, m_pLight->rgb()); 1.331 + QColorDialog::setCustomColor(1, m_pDark->rgb()); 1.332 + QColor Colortemp = QColorDialog::getColor(*m_pDark); 1.333 + if (Colortemp.isValid()) { 1.334 + delete m_pDark; 1.335 + m_pDark = new QColor(Colortemp); 1.336 + m_pDarkbutt->setPaletteBackgroundColor(*m_pDark); 1.337 + } 1.338 +} 1.339 + 1.340 +// 1.341 +// Reverts the shading colours to default values 1.342 +// 1.343 +void Prefpanel::shadeRevert(void) 1.344 +{ 1.345 + delete m_pLight; 1.346 + m_pLight = new QColor(*this->getRevlight()); 1.347 + m_pLightbutt->setPaletteBackgroundColor(*m_pLight); 1.348 + delete m_pDark; 1.349 + m_pDark = new QColor(*this->getRevdark()); 1.350 + m_pDarkbutt->setPaletteBackgroundColor(*m_pDark); 1.351 +} 1.352 + 1.353 +// 1.354 +// Polish off ending changes after creating and before widget shows 1.355 +// 1.356 +void Prefpanel::polish(void) 1.357 +{ 1.358 + // Set our buttons now that user has probably set their colours 1.359 + m_pLightbutt->setPaletteBackgroundColor(*m_pLight); 1.360 + m_pDarkbutt->setPaletteBackgroundColor(*m_pDark); 1.361 +} 1.362 + 1.363 +// 1.364 +// Sets the strings of the subwidgets using the current language 1.365 +// 1.366 +void Prefpanel::textChange(void) 1.367 +{ 1.368 + this->setCaption(trUtf8("AS Applicate Preferences", "Personal preferences are persistent across sessions")); 1.369 + 1.370 + m_pTabselect->changeTab(m_pBoolpage, trUtf8("General")); 1.371 + m_pTabselect->changeTab(m_pGeneralpage, trUtf8("Paths")); 1.372 + m_pTabselect->changeTab(m_pRemotepage, trUtf8("Hosts")); 1.373 + m_pTabselect->changeTab(m_pColourpage, trUtf8("Colour")); 1.374 + 1.375 + m_pOkaybutton->setText(trUtf8("Okay", "Comment for Okaybutton")); 1.376 + QToolTip::add(m_pOkaybutton, trUtf8("Applies and saves changes", "Comment for tooltip Okaybutton")); 1.377 + QWhatsThis::add(m_pOkaybutton, trUtf8("The okay button applies and saves changes", "Comment for whatsThis Okaybutton")); 1.378 + 1.379 + m_pApplybutton->setText(trUtf8("Apply", "Comment for Applybutton")); 1.380 + QToolTip::add(m_pApplybutton, trUtf8("Apply changes immediately", "Comment for toolTip Applybutton")); 1.381 + QWhatsThis::add(m_pApplybutton, trUtf8("The apply button applies changes immediately", "Comment for whatsThis Applybutton")); 1.382 + 1.383 + m_pCancelbutton->setText(trUtf8("Cancel", "Comment for Cancelbutton")); 1.384 + QToolTip::add(m_pCancelbutton, trUtf8("Cancel any changes", "Comment for toolTip Cancelbutton")); 1.385 + QWhatsThis::add(m_pCancelbutton, trUtf8("The cancel button cancels any changes", "Comment for whatsThis Cancelbutton")); 1.386 + 1.387 + m_pGenbox->setTitle(trUtf8("File and directory paths", "Comment for Genbox")); 1.388 + m_pAcctlabel->setText(trUtf8("Accounts path", "Comment for Acctlabel")); 1.389 + m_pEventlabel->setText(trUtf8("Events directory", "Comment for Eventlabel")); 1.390 + m_pUserlabel->setText(trUtf8("User name", "Comment for Userlabel")); 1.391 + m_pHomelabel->setText(trUtf8("Home directory", "Comment for Homelabel")); 1.392 + QToolTip::add(m_pAcctline, trUtf8("The accounts file pathname", "Comment for toolTip Acctline")); 1.393 + QToolTip::add(m_pEventline, trUtf8("The default events directory", "Comment for toolTip Eventline")); 1.394 + QToolTip::add(m_pUserline, trUtf8("The user name", "Comment for toolTip Userline")); 1.395 + QToolTip::add(m_pHomeline, trUtf8("The home directory", "Comment for toolTip Homeline")); 1.396 + 1.397 + m_pRembox->setTitle(trUtf8("Remote host names", "Comment for Rembox")); 1.398 + m_pCorbalabel->setText(trUtf8("CORBA host", "Comment for Corbalabel")); 1.399 + m_pSoaplabel->setText(trUtf8("SOAP host", "Comment for Soaplabel")); 1.400 + QToolTip::add(m_pCorbaline, trUtf8("The CORBA host name", "Comment for toolTip Corbaline")); 1.401 + QToolTip::add(m_pSoapline, trUtf8("The SOAP host name", "Comment for toolTip Soapline")); 1.402 + 1.403 + m_pCorbacheck->setText(trUtf8("Enable IIOP transmission", "Comment for Corbacheck")); 1.404 + QToolTip::add(m_pCorbacheck, trUtf8("Will enable transmission over IIOP", "Comment for toolTip Corbacheck")); 1.405 + QWhatsThis::add(m_pCorbacheck, trUtf8("Check this box to enable transmission to a CORBA host", "Comment whatsThis for Corbacheck")); 1.406 + 1.407 + m_pSoapcheck->setText(trUtf8("Enable SOAP transmission", "Comment for Soapcheck")); 1.408 + QToolTip::add(m_pSoapcheck, trUtf8("Will enable transmission over SOAP", "Comment for toolTip Soapcheck")); 1.409 + QWhatsThis::add(m_pSoapcheck, trUtf8("Check this box to enable transmission to a SOAP host", "Comment whatsThis for Soapcheck")); 1.410 + 1.411 + m_pShadebox->setTitle(trUtf8("Row shading", "Comment for Shadebox")); 1.412 + m_pThemebox->setTitle(trUtf8("Skin themes", "Comment for Themebox")); 1.413 + 1.414 + m_pLightlab->setText(trUtf8("Light", "Comment for Lightlabel")); 1.415 + m_pDarklab->setText(trUtf8("Dark", "Comment for Darklabel")); 1.416 + m_pRevertlab->setText(trUtf8("Revert", "Comment for Revertlabel")); 1.417 + QToolTip::add(m_pLightbutt, trUtf8("Light row shading colour", "Comment for tooltip Lightbutt")); 1.418 + QWhatsThis::add(m_pLightbutt, trUtf8("The Light button sets the light row shading colour.", "Comment for whatsThis Lightbutt")); 1.419 + QToolTip::add(m_pDarkbutt, trUtf8("Dark row shading colour", "Comment for tooltip Darkbutt")); 1.420 + QWhatsThis::add(m_pDarkbutt, trUtf8("The Dark button sets the light row shading colour.", "Comment for whatsThis Darkbutt")); 1.421 + 1.422 + m_pStylegroup->setTitle(trUtf8("Available styles", "Comment for Stylebuttons")); 1.423 + m_pReportgroup->setTitle(trUtf8("Report options", "Comment for Reportbox")); 1.424 + m_pSwitchgroup->setTitle(trUtf8("Other options", "Comment for Switchbox")); 1.425 +}