diff -r e8292658d5b3 -r c1941114ca88 as_panel.cpp --- a/as_panel.cpp Fri Nov 28 14:20:00 2008 +0100 +++ b/as_panel.cpp Fri Dec 05 23:14:02 2008 +0100 @@ -1,12 +1,12 @@ // // OSSP asgui - Accounting system graphical user interface -// Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) -// Copyright (c) 2002-2004 Ralf S. Engelschall -// Copyright (c) 2002-2004 Michael Schloh von Bennewitz -// Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH +// Copyright (c) 2002-2008 The OSSP Project (http://www.ossp.org/) +// Copyright (c) 2002-2008 Ralf S. Engelschall +// Copyright (c) 2002-2008 Michael Schloh von Bennewitz +// Copyright (c) 2002-2008 Cable & Wireless Telecommunications Services GmbH // // This file is part of OSSP asgui, an accounting system graphical user -// interface which can be found at http://www.ossp.org/pkg/tool/asgui/. +// interface which can be found at http://asgui.europalab.com/. // // Permission to use, copy, modify, and distribute this software for // any purpose with or without fee is hereby granted, provided that @@ -29,10 +29,18 @@ // as_panel.cpp: ISO C++ implementation // +#define QT3_SUPPORT + #include #include +//Added by qt3to4: +#include +#include +#include +#include + #include "as_panel.h" #include "as_generic.h" #include "as_const.h" @@ -46,7 +54,7 @@ // The dialog will by default be modal, unless you set 'bModal' to // false to construct a modeless dialog. // -Prefpanel::Prefpanel(QWidget *pParent, const char *kszName, bool bModal, WFlags Flags) +Prefpanel::Prefpanel(QWidget *pParent, const char *kszName, bool bModal, Qt::WFlags Flags) : QDialog(pParent, kszName, bModal, Flags) { if (!kszName) @@ -60,20 +68,20 @@ m_pLight = new QColor(); m_pDark = new QColor(); - m_pVlayout = new QVBoxLayout(this, 11, 6, "Formlayout"); + m_pVlayout = new Q3VBoxLayout(this, 11, 6, "Formlayout"); m_pTabselect = new QTabWidget(this, "Tabselector"); // Start of style chooser UI pieces m_pBoolpage = new QWidget(m_pTabselect, "Tabpage"); - m_pBoolayout = new QHBoxLayout(m_pBoolpage, 11, 6, "Genlayout"); - m_pBinlayout = new QVBoxLayout(0, 0, 6, "Binarylayout"); - m_pStylegroup = new QButtonGroup(m_pBoolpage, "Stylebuttongroup"); + m_pBoolayout = new Q3HBoxLayout(m_pBoolpage, 11, 6, "Genlayout"); + m_pBinlayout = new Q3VBoxLayout(0, 0, 6, "Binarylayout"); + m_pStylegroup = new Q3ButtonGroup(m_pBoolpage, "Stylebuttongroup"); m_pStylegroup->setColumnLayout(0, Qt::Vertical); m_pStylegroup->layout()->setSpacing(6); m_pStylegroup->layout()->setMargin(11); m_pStylegroup->setExclusive(true); - m_pStylelay = new QVBoxLayout(m_pStylegroup->layout()); + m_pStylelay = new Q3VBoxLayout(m_pStylegroup->layout()); m_pStylelay->setAlignment(Qt::AlignTop); // Block to handle a vector of radio buttons @@ -91,56 +99,56 @@ Stylevector[nIter]->sizePolicy().hasHeightForWidth()); QToolTip::add(Stylevector[nIter], trUtf8("The " + *Stylename + " style", "Comment for toolTip " + *Stylename)); - QWhatsThis::add(Stylevector[nIter], trUtf8("Click this button to enjoy the style of the " + Q3WhatsThis::add(Stylevector[nIter], trUtf8("Click this button to enjoy the style of the " + *Stylename + " user interface", "Comment whatsThis for " + *Stylename)); m_pStylelay->addWidget(Stylevector[nIter]); nIter++; } // Start of binary option UI pieces (like make backups, yes or no) - m_pSwitchgroup = new QButtonGroup(m_pBoolpage, "Switchbuttongroup"); + m_pSwitchgroup = new Q3ButtonGroup(m_pBoolpage, "Switchbuttongroup"); m_pSwitchgroup->setColumnLayout(0, Qt::Vertical); m_pSwitchgroup->layout()->setSpacing(6); m_pSwitchgroup->layout()->setMargin(11); m_pSwitchgroup->setExclusive(false); - m_pSwitchlay = new QVBoxLayout(m_pSwitchgroup->layout()); + m_pSwitchlay = new Q3VBoxLayout(m_pSwitchgroup->layout()); m_pSwitchlay->setAlignment(Qt::AlignTop); // Optional file backups with hard coded extension .bak m_pBackupcheck = new QCheckBox(m_pSwitchgroup, "Backupbutton"); m_pBackupcheck->setText(trUtf8("Make .bak file on save", "Comment for Backupcheck")); QToolTip::add(m_pBackupcheck, trUtf8("Make a .bak file when saving", "Comment for toolTip Backupcheck")); - QWhatsThis::add(m_pBackupcheck, trUtf8("Check this box to enable automatic file backups when overwriting an existing file", "Comment whatsThis for Backupcheck")); + Q3WhatsThis::add(m_pBackupcheck, trUtf8("Check this box to enable automatic file backups when overwriting an existing file", "Comment whatsThis for Backupcheck")); m_pSwitchlay->addWidget(m_pBackupcheck); // Optional easy filename appending with hard coded extension .as m_pExtendcheck = new QCheckBox(m_pSwitchgroup, "Extensionbutton"); m_pExtendcheck->setText(trUtf8("Append .as extension", "Comment for Extensioncheck")); QToolTip::add(m_pExtendcheck, trUtf8("Use the .as file extension", "Comment for toolTip Extensioncheck")); - QWhatsThis::add(m_pExtendcheck, trUtf8("Check this box to automatically append '.as' to new filenames when saving", "Comment whatsThis for Extensioncheck")); + Q3WhatsThis::add(m_pExtendcheck, trUtf8("Check this box to automatically append '.as' to new filenames when saving", "Comment whatsThis for Extensioncheck")); m_pSwitchlay->addWidget(m_pExtendcheck); // Start of report option UI pieces (like detailed report listings) - m_pReportgroup = new QButtonGroup(m_pBoolpage, "Reportbuttongroup"); + m_pReportgroup = new Q3ButtonGroup(m_pBoolpage, "Reportbuttongroup"); m_pReportgroup->setColumnLayout(0, Qt::Vertical); m_pReportgroup->layout()->setSpacing(6); m_pReportgroup->layout()->setMargin(11); m_pReportgroup->setExclusive(false); - m_pReportlay = new QVBoxLayout(m_pReportgroup->layout()); + m_pReportlay = new Q3VBoxLayout(m_pReportgroup->layout()); m_pReportlay->setAlignment(Qt::AlignTop); // Optional detailed report listings write all events in range m_pDetailcheck = new QCheckBox(m_pReportgroup, "Detailistbutton"); m_pDetailcheck->setText(trUtf8("Detailed listing", "Comment for Detailcheck")); QToolTip::add(m_pDetailcheck, trUtf8("Write detailed event listings", "Comment for toolTip Detailcheck")); - QWhatsThis::add(m_pDetailcheck, trUtf8("Check this box to enable writing of detailed event listings to the local report", "Comment whatsThis for Detailcheck")); + Q3WhatsThis::add(m_pDetailcheck, trUtf8("Check this box to enable writing of detailed event listings to the local report", "Comment whatsThis for Detailcheck")); m_pReportlay->addWidget(m_pDetailcheck); // Optional signature line in report footer m_pSigncheck = new QCheckBox(m_pReportgroup, "Signaturebutton"); m_pSigncheck->setText(trUtf8("Signature line", "Comment for Signaturecheck")); QToolTip::add(m_pSigncheck, trUtf8("Append a signature line", "Comment for toolTip Signaturecheck")); - QWhatsThis::add(m_pSigncheck, trUtf8("Check this box to write a signature line to the report footer", "Comment whatsThis for Signaturecheck")); + Q3WhatsThis::add(m_pSigncheck, trUtf8("Check this box to write a signature line to the report footer", "Comment whatsThis for Signaturecheck")); m_pReportlay->addWidget(m_pSigncheck); m_pBoolayout->addWidget(m_pStylegroup); m_pBinlayout->addWidget(m_pReportgroup); @@ -150,16 +158,16 @@ // Start of paths page UI pieces m_pGeneralpage = new QWidget(m_pTabselect, "Generalpage"); - m_pGenlayout = new QHBoxLayout(m_pGeneralpage, 11, 6, "Genlayout"); - m_pGenbox = new QGroupBox(m_pGeneralpage, "Groupboxlayout"); + m_pGenlayout = new Q3HBoxLayout(m_pGeneralpage, 11, 6, "Genlayout"); + m_pGenbox = new Q3GroupBox(m_pGeneralpage, "Groupboxlayout"); m_pGenbox->setColumnLayout(0, Qt::Vertical); m_pGenbox->layout()->setSpacing(6); m_pGenbox->layout()->setMargin(11); - m_pGenboxlay = new QHBoxLayout(m_pGenbox->layout()); + m_pGenboxlay = new Q3HBoxLayout(m_pGenbox->layout()); m_pGenboxlay->setAlignment(Qt::AlignTop); // Start of path text entry preferences UI pieces - m_pGeninner = new QGridLayout(0, 4, 2, 0, 16, "Innergrid"); + m_pGeninner = new Q3GridLayout(0, 4, 2, 0, 16, "Innergrid"); m_pAcctlabel = new QLabel(m_pGenbox, "Accfilelabel"); m_pGeninner->addWidget(m_pAcctlabel, 0, 0); m_pAcctline = new QLineEdit(m_pGenbox, "Accountline"); @@ -183,17 +191,17 @@ // Start of remote page UI pieces m_pRemotepage = new QWidget(m_pTabselect, "Remotepage"); - m_pRemlayout = new QHBoxLayout(m_pRemotepage, 11, 6, "Remlayout"); - m_pRembox = new QGroupBox(m_pRemotepage, "Remoteboxlayout"); + m_pRemlayout = new Q3HBoxLayout(m_pRemotepage, 11, 6, "Remlayout"); + m_pRembox = new Q3GroupBox(m_pRemotepage, "Remoteboxlayout"); m_pRembox->setColumnLayout(0, Qt::Vertical); m_pRembox->layout()->setSpacing(6); m_pRembox->layout()->setMargin(11); - m_pRemboxlay = new QHBoxLayout(m_pRembox->layout()); + m_pRemboxlay = new Q3HBoxLayout(m_pRembox->layout()); m_pRemboxlay->setAlignment(Qt::AlignTop); // Start of RPC preferences UI pieces - m_pReminner = new QGridLayout(0, 5, 2, 0, 12, "Innergrid"); + m_pReminner = new Q3GridLayout(0, 5, 2, 0, 12, "Innergrid"); m_pCorbalabel = new QLabel(m_pRembox, "Corbalabel"); m_pReminner->addWidget(m_pCorbalabel, 0, 0); m_pCorbaline = new QLineEdit(m_pRembox, "Corbaline"); @@ -215,20 +223,20 @@ // Start of color page UI pieces m_pColourpage = new QWidget(m_pTabselect, "Colourpage"); - m_pColourlayout = new QHBoxLayout(m_pColourpage, 11, 6, "Colourlayout"); - m_pShadebox = new QGroupBox(m_pColourpage, "Shadegroupbox"); + m_pColourlayout = new Q3HBoxLayout(m_pColourpage, 11, 6, "Colourlayout"); + m_pShadebox = new Q3GroupBox(m_pColourpage, "Shadegroupbox"); m_pShadebox->setColumnLayout(0, Qt::Horizontal); m_pShadebox->layout()->setSpacing(6); m_pShadebox->layout()->setMargin(11); - m_pShadeboxlay = new QVBoxLayout(m_pShadebox->layout()); + m_pShadeboxlay = new Q3VBoxLayout(m_pShadebox->layout()); m_pShadeboxlay->setAlignment(Qt::AlignTop); - m_pShadelayout = new QGridLayout(0, 2, 2, 6, 16, "Shadelayout"); + m_pShadelayout = new Q3GridLayout(0, 2, 2, 6, 16, "Shadelayout"); m_pLightlab = new QLabel(m_pShadebox, "Lightlabel"); m_pLightlab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth()); m_pShadelayout->addWidget(m_pLightlab, 0, 0); m_pLightbutt = new QToolButton(m_pShadebox, "Lightbutton"); - m_pLightbutt->setFocusPolicy(QToolButton::TabFocus); + m_pLightbutt->setFocusPolicy(Qt::TabFocus); m_pLightbutt->setCursor(QCursor(13)); m_pShadelayout->addWidget(m_pLightbutt, 0, 1); @@ -236,23 +244,23 @@ m_pDarklab->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Preferred, this->sizePolicy().hasHeightForWidth()); m_pShadelayout->addWidget(m_pDarklab, 1, 0); m_pDarkbutt = new QToolButton(m_pShadebox, "Darkbutton"); - m_pDarkbutt->setFocusPolicy(QToolButton::TabFocus); + m_pDarkbutt->setFocusPolicy(Qt::TabFocus); m_pDarkbutt->setCursor(QCursor(13)); m_pShadelayout->addWidget(m_pDarkbutt, 1, 1); m_pRevertlab = new QLabel(m_pShadebox, "Revertlabel"); m_pShadelayout->addWidget(m_pRevertlab, 2, 0); m_pRevertbutt = new QToolButton(m_pShadebox, "Revertbutton"); - m_pRevertbutt->setFocusPolicy(QToolButton::TabFocus); + m_pRevertbutt->setFocusPolicy(Qt::TabFocus); // m_pRevertbutt->setIconSet(QIconSet(QPixmap(s_kpcRevcolour_xpm))); m_pRevertbutt->setCursor(QCursor(13)); m_pShadelayout->addWidget(m_pRevertbutt, 2, 1); - m_pThemebox = new QGroupBox(m_pColourpage, "Themegroupbox"); + m_pThemebox = new Q3GroupBox(m_pColourpage, "Themegroupbox"); m_pThemebox->setColumnLayout(0, Qt::Vertical); m_pThemebox->layout()->setSpacing(6); m_pThemebox->layout()->setMargin(11); - m_pThemeboxlay = new QVBoxLayout(m_pThemebox->layout()); + m_pThemeboxlay = new Q3VBoxLayout(m_pThemebox->layout()); QLabel *pPlaceholder = new QLabel(m_pThemebox, "Placeholderlabel"); pPlaceholder->setText(trUtf8("Reserved for future use", "Comment for Placeholderlabel")); @@ -271,7 +279,7 @@ m_pVlayout->addWidget(m_pTabselect); // Start of bottom buttons for aknowlegement and commital of changes - m_pButtlay = new QHBoxLayout(0, 0, 12, "Buttonlayout"); + m_pButtlay = new Q3HBoxLayout(0, 0, 12, "Buttonlayout"); m_pOkaybutton = new QPushButton(this, "Okaybutton"); m_pOkaybutton->setMinimumWidth(120); m_pOkaybutton->setPaletteBackgroundColor(QColor(202, 194, 182)); @@ -371,15 +379,15 @@ m_pOkaybutton->setText(trUtf8("Okay", "Comment for Okaybutton")); QToolTip::add(m_pOkaybutton, trUtf8("Applies and saves changes", "Comment for tooltip Okaybutton")); - QWhatsThis::add(m_pOkaybutton, trUtf8("The okay button applies and saves changes", "Comment for whatsThis Okaybutton")); + Q3WhatsThis::add(m_pOkaybutton, trUtf8("The okay button applies and saves changes", "Comment for whatsThis Okaybutton")); m_pApplybutton->setText(trUtf8("Apply", "Comment for Applybutton")); QToolTip::add(m_pApplybutton, trUtf8("Apply changes immediately", "Comment for toolTip Applybutton")); - QWhatsThis::add(m_pApplybutton, trUtf8("The apply button applies changes immediately", "Comment for whatsThis Applybutton")); + Q3WhatsThis::add(m_pApplybutton, trUtf8("The apply button applies changes immediately", "Comment for whatsThis Applybutton")); m_pCancelbutton->setText(trUtf8("Cancel", "Comment for Cancelbutton")); QToolTip::add(m_pCancelbutton, trUtf8("Cancel any changes", "Comment for toolTip Cancelbutton")); - QWhatsThis::add(m_pCancelbutton, trUtf8("The cancel button cancels any changes", "Comment for whatsThis Cancelbutton")); + Q3WhatsThis::add(m_pCancelbutton, trUtf8("The cancel button cancels any changes", "Comment for whatsThis Cancelbutton")); m_pGenbox->setTitle(trUtf8("File and directory paths", "Comment for Genbox")); m_pAcctlabel->setText(trUtf8("Accounts path", "Comment for Acctlabel")); @@ -399,11 +407,11 @@ m_pCorbacheck->setText(trUtf8("Enable IIOP transmission", "Comment for Corbacheck")); QToolTip::add(m_pCorbacheck, trUtf8("Will enable transmission over IIOP", "Comment for toolTip Corbacheck")); - QWhatsThis::add(m_pCorbacheck, trUtf8("Check this box to enable transmission to a CORBA host", "Comment whatsThis for Corbacheck")); + Q3WhatsThis::add(m_pCorbacheck, trUtf8("Check this box to enable transmission to a CORBA host", "Comment whatsThis for Corbacheck")); m_pSoapcheck->setText(trUtf8("Enable SOAP transmission", "Comment for Soapcheck")); QToolTip::add(m_pSoapcheck, trUtf8("Will enable transmission over SOAP", "Comment for toolTip Soapcheck")); - QWhatsThis::add(m_pSoapcheck, trUtf8("Check this box to enable transmission to a SOAP host", "Comment whatsThis for Soapcheck")); + Q3WhatsThis::add(m_pSoapcheck, trUtf8("Check this box to enable transmission to a SOAP host", "Comment whatsThis for Soapcheck")); m_pShadebox->setTitle(trUtf8("Row shading", "Comment for Shadebox")); m_pThemebox->setTitle(trUtf8("Skin themes", "Comment for Themebox")); @@ -412,9 +420,9 @@ m_pDarklab->setText(trUtf8("Dark", "Comment for Darklabel")); m_pRevertlab->setText(trUtf8("Revert", "Comment for Revertlabel")); QToolTip::add(m_pLightbutt, trUtf8("Light row shading colour", "Comment for tooltip Lightbutt")); - QWhatsThis::add(m_pLightbutt, trUtf8("The Light button sets the light row shading colour.", "Comment for whatsThis Lightbutt")); + Q3WhatsThis::add(m_pLightbutt, trUtf8("The Light button sets the light row shading colour.", "Comment for whatsThis Lightbutt")); QToolTip::add(m_pDarkbutt, trUtf8("Dark row shading colour", "Comment for tooltip Darkbutt")); - QWhatsThis::add(m_pDarkbutt, trUtf8("The Dark button sets the light row shading colour.", "Comment for whatsThis Darkbutt")); + Q3WhatsThis::add(m_pDarkbutt, trUtf8("The Dark button sets the light row shading colour.", "Comment for whatsThis Darkbutt")); m_pStylegroup->setTitle(trUtf8("Available styles", "Comment for Stylebuttons")); m_pReportgroup->setTitle(trUtf8("Report options", "Comment for Reportbox"));