1 // |
1 // |
2 // OSSP asgui - Accounting system graphical user interface |
2 // OSSP asgui - Accounting system graphical user interface |
3 // Copyright (c) 2002-2004 The OSSP Project (http://www.ossp.org/) |
3 // Copyright (c) 2002-2008 The OSSP Project (http://www.ossp.org/) |
4 // Copyright (c) 2002-2004 Ralf S. Engelschall <rse@engelschall.com> |
4 // Copyright (c) 2002-2008 Ralf S. Engelschall <rse@engelschall.com> |
5 // Copyright (c) 2002-2004 Michael Schloh von Bennewitz <michael@schloh.com> |
5 // Copyright (c) 2002-2008 Michael Schloh von Bennewitz <michael@schloh.com> |
6 // Copyright (c) 2002-2004 Cable & Wireless Telecommunications Services GmbH |
6 // Copyright (c) 2002-2008 Cable & Wireless Telecommunications Services GmbH |
7 // |
7 // |
8 // This file is part of OSSP asgui, an accounting system graphical user |
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/. |
9 // interface which can be found at http://asgui.europalab.com/. |
10 // |
10 // |
11 // Permission to use, copy, modify, and distribute this software for |
11 // Permission to use, copy, modify, and distribute this software for |
12 // any purpose with or without fee is hereby granted, provided that |
12 // any purpose with or without fee is hereby granted, provided that |
13 // the above copyright notice and this permission notice appear in all |
13 // the above copyright notice and this permission notice appear in all |
14 // copies. |
14 // copies. |
50 // name 'kszName' and widget flags set to 'Flags'. |
54 // name 'kszName' and widget flags set to 'Flags'. |
51 // |
55 // |
52 // The dialog will by default be modal, unless you set 'bModal' to |
56 // The dialog will by default be modal, unless you set 'bModal' to |
53 // false to construct a modeless dialog. |
57 // false to construct a modeless dialog. |
54 // |
58 // |
55 Numdial::Numdial(QWidget *pParent, const char *kszName, bool bModal, WFlags Flags) |
59 Numdial::Numdial(QWidget *pParent, const char *kszName, bool bModal, Qt::WFlags Flags) |
56 : QDialog(pParent, kszName, bModal, Flags) |
60 : QDialog(pParent, kszName, bModal, Flags) |
57 { |
61 { |
58 // Boilerplate code to initialize the panel |
62 // Boilerplate code to initialize the panel |
59 if (!kszName) |
63 if (!kszName) |
60 this->setName("Numberdialog"); |
64 this->setName("Numberdialog"); |
62 // Fix dialog size |
66 // Fix dialog size |
63 this->setSizeGripEnabled(false); |
67 this->setSizeGripEnabled(false); |
64 this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)0, |
68 this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)0, |
65 (QSizePolicy::SizeType)0, 0, 0, this->sizePolicy().hasHeightForWidth())); |
69 (QSizePolicy::SizeType)0, 0, 0, this->sizePolicy().hasHeightForWidth())); |
66 |
70 |
67 m_pFrame = new QFrame(this, "Mainframe"); |
71 m_pFrame = new Q3Frame(this, "Mainframe"); |
68 m_pFrame->setFrameShape(QFrame::StyledPanel); |
72 m_pFrame->setFrameShape(Q3Frame::StyledPanel); |
69 m_pFrame->setFrameShadow(QFrame::Raised); |
73 m_pFrame->setFrameShadow(Q3Frame::Raised); |
70 m_pFramelay = new QVBoxLayout(m_pFrame, 11, 6, "Framelay"); |
74 m_pFramelay = new Q3VBoxLayout(m_pFrame, 11, 6, "Framelay"); |
71 m_pInputlay = new QHBoxLayout(0, 0, 6, "Horizontallayout"); |
75 m_pInputlay = new Q3HBoxLayout(0, 0, 6, "Horizontallayout"); |
72 m_pFormlayout = new QVBoxLayout(this, 11, 6, "Formlayout"); |
76 m_pFormlayout = new Q3VBoxLayout(this, 11, 6, "Formlayout"); |
73 |
77 |
74 m_pReportlabel = new QLabel(m_pFrame, "Reportlabel"); |
78 m_pReportlabel = new QLabel(m_pFrame, "Reportlabel"); |
75 m_pReportlabel->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, m_pReportlabel->sizePolicy().hasHeightForWidth())); |
79 m_pReportlabel->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, m_pReportlabel->sizePolicy().hasHeightForWidth())); |
76 m_pInputlay->addWidget(m_pReportlabel); |
80 m_pInputlay->addWidget(m_pReportlabel); |
77 |
81 |
86 m_pWeeklabel->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, m_pWeeklabel->sizePolicy().hasHeightForWidth())); |
90 m_pWeeklabel->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, m_pWeeklabel->sizePolicy().hasHeightForWidth())); |
87 m_pInputlay->addWidget(m_pWeeklabel); |
91 m_pInputlay->addWidget(m_pWeeklabel); |
88 m_pFramelay->addLayout(m_pInputlay); |
92 m_pFramelay->addLayout(m_pInputlay); |
89 |
93 |
90 // Push button suite |
94 // Push button suite |
91 m_pButtlay = new QHBoxLayout(0, 0, 6, "Buttlay"); |
95 m_pButtlay = new Q3HBoxLayout(0, 0, 6, "Buttlay"); |
92 m_pOkaybutt = new QPushButton(m_pFrame, "Okaybutton"); |
96 m_pOkaybutt = new QPushButton(m_pFrame, "Okaybutton"); |
93 m_pOkaybutt->setPaletteBackgroundColor(QColor(198, 196, 186)); |
97 m_pOkaybutt->setPaletteBackgroundColor(QColor(198, 196, 186)); |
94 m_pOkaybutt->setCursor(QCursor(13)); |
98 m_pOkaybutt->setCursor(QCursor(13)); |
95 m_pOkaybutt->setDefault(true); |
99 m_pOkaybutt->setDefault(true); |
96 m_pButtlay->addWidget(m_pOkaybutt); |
100 m_pButtlay->addWidget(m_pOkaybutt); |
120 m_pWeeklabel->setText(trUtf8("weeks of data")); |
124 m_pWeeklabel->setText(trUtf8("weeks of data")); |
121 |
125 |
122 // Top level push buttons associated with accept slot |
126 // Top level push buttons associated with accept slot |
123 m_pCancelbutt->setText(trUtf8("Cancel", "Comment for Cancelbutton")); |
127 m_pCancelbutt->setText(trUtf8("Cancel", "Comment for Cancelbutton")); |
124 QToolTip::add(m_pCancelbutt, trUtf8("Closes the report panel", "Comment for tooltip Cancelbutton")); |
128 QToolTip::add(m_pCancelbutt, trUtf8("Closes the report panel", "Comment for tooltip Cancelbutton")); |
125 QWhatsThis::add(m_pCancelbutt, trUtf8("The cancel button closes the report panel without further action", "Comment for whatsThis Cancelbutton")); |
129 Q3WhatsThis::add(m_pCancelbutt, trUtf8("The cancel button closes the report panel without further action", "Comment for whatsThis Cancelbutton")); |
126 m_pOkaybutt->setText(trUtf8("Okay", "Comment for Okaybutton")); |
130 m_pOkaybutt->setText(trUtf8("Okay", "Comment for Okaybutton")); |
127 QToolTip::add(m_pOkaybutt, trUtf8("Aknowleges your input", "Comment for tooltip Okaybutton")); |
131 QToolTip::add(m_pOkaybutt, trUtf8("Aknowleges your input", "Comment for tooltip Okaybutton")); |
128 QWhatsThis::add(m_pOkaybutt, trUtf8("The okay button aknowleges your input and prepares for action", "Comment for whatsThis Okaybutton")); |
132 Q3WhatsThis::add(m_pOkaybutt, trUtf8("The okay button aknowleges your input and prepares for action", "Comment for whatsThis Okaybutton")); |
129 |
133 |
130 // Text help for spinbox number input |
134 // Text help for spinbox number input |
131 QToolTip::add(m_pSpinbox, trUtf8("Input a number", "Comment for tooltip Spinbox")); |
135 QToolTip::add(m_pSpinbox, trUtf8("Input a number", "Comment for tooltip Spinbox")); |
132 QWhatsThis::add(m_pSpinbox, trUtf8("Click on the arrows or type to input a number", "Comment for whatsThis Spinbox")); |
136 Q3WhatsThis::add(m_pSpinbox, trUtf8("Click on the arrows or type to input a number", "Comment for whatsThis Spinbox")); |
133 } |
137 } |
134 } // namespace AS |
138 } // namespace AS |