Index: ossp-pkg/as/as-gui/Makefile.in RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/Makefile.in,v rcsdiff -q -kk '-r1.43' '-r1.44' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/Makefile.in,v' 2>/dev/null --- Makefile.in 2003/02/17 17:16:18 1.43 +++ Makefile.in 2003/02/25 09:24:07 1.44 @@ -72,9 +72,9 @@ TARGET_PROGS = as-gui TARGET_MANS = as-gui.1 as-gui.conf.5 -SRCS = as_main.cpp as_gui.cpp as_assist.cpp as_slot.cpp as_dataop.cpp as_except.cpp as_generic.cpp as_amount.cpp as_table.cpp as_panel.cpp as_reportpanel.cpp as_sfile.cpp as_pref.cpp as_user.cpp as_rand.cpp as_crc.cpp as_uuid.cpp as_version.cpp +SRCS = as_main.cpp as_gui.cpp as_assist.cpp as_slot.cpp as_dataop.cpp as_except.cpp as_generic.cpp as_amount.cpp as_table.cpp as_panel.cpp as_reportpanel.cpp as_numdial.cpp as_sfile.cpp as_pref.cpp as_user.cpp as_rand.cpp as_crc.cpp as_uuid.cpp as_version.cpp -OBJS = as_main.o as_gui.o as_assist.o as_slot.o as_dataop.o as_except.o as_generic.o as_amount.o as_table.o as_panel.o as_sfile.o as_pref.o as_reportpanel.o as_user.o as_rand.o as_crc.o as_uuid.o as_version.o +OBJS = as_main.o as_gui.o as_assist.o as_slot.o as_dataop.o as_except.o as_generic.o as_amount.o as_table.o as_panel.o as_sfile.o as_pref.o as_reportpanel.o as_numdial.o as_user.o as_rand.o as_crc.o as_uuid.o as_version.o GRAFX = gfx/ossplogo.xpm @@ -84,8 +84,8 @@ IDL_OBJ = as_stub.o # Qt meta object compiler (MOC) generated -MOC_OUT = moc_as_gui.cpp moc_as_table.cpp moc_as_panel.cpp moc_as_reportpanel.cpp -MOC_OBJ = moc_as_gui.o moc_as_table.o moc_as_panel.o moc_as_reportpanel.o +MOC_OUT = moc_as_gui.cpp moc_as_table.cpp moc_as_panel.cpp moc_as_reportpanel.cpp moc_as_numdial.cpp +MOC_OBJ = moc_as_gui.o moc_as_table.o moc_as_panel.o moc_as_reportpanel.o moc_as_numdial.o .SUFFIXES: .SUFFIXES: .c .cc .cpp .cxx .o Index: ossp-pkg/as/as-gui/as_numdial.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_numdial.cpp,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/as/as-gui/as_numdial.cpp,v' | diff -u /dev/null - -L'ossp-pkg/as/as-gui/as_numdial.cpp' 2>/dev/null --- ossp-pkg/as/as-gui/as_numdial.cpp +++ - 2025-05-20 21:25:36.907468086 +0200 @@ -0,0 +1,134 @@ +// +// OSSP asgui - Accounting system graphical user interface +// Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/) +// Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/) +// Copyright (c) 2002-2003 Ralf S. Engelschall +// Copyright (c) 2002-2003 Michael Schloh von Bennewitz +// +// 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/. +// +// Permission to use, copy, modify, and distribute this software for +// any purpose with or without fee is hereby granted, provided that +// the above copyright notice and this permission notice appear in all +// copies. +// +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// as_numdial.cpp: ISO C++ implementation +// + +#include "as_numdial.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "as_const.h" + + +namespace AS { + +// +// Constructs a Numdial as a child of 'pParent', with the +// name 'kszName' and widget flags set to 'Flags'. +// +// The dialog will by default be modal, unless you set 'bModal' to +// false to construct a modeless dialog. +// +Numdial::Numdial(QWidget *pParent, const char *kszName, bool bModal, WFlags Flags) + : QDialog(pParent, kszName, bModal, Flags) +{ + // Boilerplate code to initialize the panel + if (!kszName) + this->setName("Numberdialog"); + + // Fix dialog size + this->setSizeGripEnabled(false); + this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)0, + (QSizePolicy::SizeType)0, 0, 0, this->sizePolicy().hasHeightForWidth())); + + m_pFrame = new QFrame(this, "Mainframe"); + m_pFrame->setFrameShape(QFrame::StyledPanel); + m_pFrame->setFrameShadow(QFrame::Raised); + m_pFramelay = new QVBoxLayout(m_pFrame, 11, 6, "Framelay"); + m_pInputlay = new QHBoxLayout(0, 0, 6, "Horizontallayout"); + m_pFormlayout = new QVBoxLayout(this, 11, 6, "Formlayout"); + + m_pReportlabel = new QLabel(m_pFrame, "Reportlabel"); + m_pReportlabel->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, m_pReportlabel->sizePolicy().hasHeightForWidth())); + m_pInputlay->addWidget(m_pReportlabel); + + m_pSpinbox = new QSpinBox(m_pFrame, "Spinbox"); + m_pSpinbox->setMinValue(1); // Must choose at least one week + m_pSpinbox->setMaxValue(TITRAQ_BIGMAGIC); // Must choose less than magic +// m_pSpinbox->setButtonSymbols(QSpinBox::PlusMinus); +// m_pSpinbox->editor()->setAlignment(Qt::AlignRight); + m_pInputlay->addWidget(m_pSpinbox); + + m_pWeeklabel = new QLabel(m_pFrame, "Weeklabel"); + m_pWeeklabel->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)4, (QSizePolicy::SizeType)5, 0, 0, m_pWeeklabel->sizePolicy().hasHeightForWidth())); + m_pInputlay->addWidget(m_pWeeklabel); + m_pFramelay->addLayout(m_pInputlay); + + // Push button suite + m_pButtlay = new QHBoxLayout(0, 0, 6, "Buttlay"); + m_pOkaybutt = new QPushButton(m_pFrame, "Okaybutton"); + m_pOkaybutt->setPaletteBackgroundColor(QColor(198, 196, 186)); + m_pOkaybutt->setCursor(QCursor(13)); + m_pOkaybutt->setDefault(true); + m_pButtlay->addWidget(m_pOkaybutt); + m_pCancelbutt = new QPushButton(m_pFrame, "Cancelbutton"); + m_pCancelbutt->setPaletteBackgroundColor(QColor(198, 196, 186)); + m_pCancelbutt->setCursor(QCursor(13)); + m_pButtlay->addWidget(m_pCancelbutt); + m_pFramelay->addLayout(m_pButtlay); + + // Add all the junk to our main frame + m_pFormlayout->addWidget(m_pFrame); + + // Connect signals to slots, accept() and reject() are Qt implicit + connect(m_pOkaybutt, SIGNAL(clicked(void)), SLOT(accept(void))); + connect(m_pCancelbutt, SIGNAL(clicked(void)), SLOT(reject(void))); + this->resize(QSize(272, 111).expandedTo(minimumSizeHint())); + this->textChange(); +} + +// +// Sets the strings of the subwidgets using the current language +// +void Numdial::textChange() +{ + this->setCaption(trUtf8("Numberdialog", "For general input of numbers followed by an accept or cancel operation")); + m_pReportlabel->setText(trUtf8("Report")); + m_pWeeklabel->setText(trUtf8("weeks of data")); + + // Top level push buttons associated with accept slot + m_pCancelbutt->setText(trUtf8("Cancel", "Comment for Cancelbutton")); + QToolTip::add(m_pCancelbutt, trUtf8("Closes the report panel", "Comment for tooltip Cancelbutton")); + QWhatsThis::add(m_pCancelbutt, trUtf8("The cancel button closes the report panel without further action", "Comment for whatsThis Cancelbutton")); + m_pOkaybutt->setText(trUtf8("Okay", "Comment for Okaybutton")); + QToolTip::add(m_pOkaybutt, trUtf8("Aknowleges your input", "Comment for tooltip Okaybutton")); + QWhatsThis::add(m_pOkaybutt, trUtf8("The okay button aknowleges your input and prepares for action", "Comment for whatsThis Okaybutton")); + + // Text help for spinbox number input + QToolTip::add(m_pSpinbox, trUtf8("Input a number", "Comment for tooltip Spinbox")); + QWhatsThis::add(m_pSpinbox, trUtf8("Click on the arrows or type to input a number", "Comment for whatsThis Spinbox")); +} +} // namespace AS Index: ossp-pkg/as/as-gui/as_numdial.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_numdial.h,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/as/as-gui/as_numdial.h,v' | diff -u /dev/null - -L'ossp-pkg/as/as-gui/as_numdial.h' 2>/dev/null --- ossp-pkg/as/as-gui/as_numdial.h +++ - 2025-05-20 21:25:36.910183172 +0200 @@ -0,0 +1,80 @@ +// +// OSSP asgui - Accounting system graphical user interface +// Copyright (c) 2002-2003 The OSSP Project (http://www.ossp.org/) +// Copyright (c) 2002-2003 Cable & Wireless Deutschland (http://www.cw.com/de/) +// Copyright (c) 2002-2003 Ralf S. Engelschall +// Copyright (c) 2002-2003 Michael Schloh von Bennewitz +// +// 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/. +// +// Permission to use, copy, modify, and distribute this software for +// any purpose with or without fee is hereby granted, provided that +// the above copyright notice and this permission notice appear in all +// copies. +// +// THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +// IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +// ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +// SUCH DAMAGE. +// +// as_numdial.h: ISO C++ interface +// + +#ifndef NUMDIALOG_H +#define NUMDIALOG_H + +#include +#include +#include + + +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QFrame; +class QLabel; +class QPushButton; + +namespace AS { + +class Numdial : public QDialog +{ + Q_OBJECT + +public: + Numdial(QWidget *pParent = 0, const char *pkcName = 0, bool bModal = true, WFlags Flags = 0); +// ~Numdial(void); // No need to destroy widgets, because qt does it for us + + QFrame *m_pFrame; + QLabel *m_pReportlabel; + QSpinBox *m_pSpinbox; + QLabel *m_pWeeklabel; + QPushButton *m_pOkaybutt; + QPushButton *m_pCancelbutt; + +protected: + QVBoxLayout *m_pFormlayout; + QVBoxLayout *m_pFramelay; + QHBoxLayout *m_pInputlay; + QHBoxLayout *m_pButtlay; + +protected slots: + virtual void textChange(); + +public: + // Accessors members + int getNum(void) const {return m_pSpinbox->value();}; + void setNum(int nInit) {m_pSpinbox->setValue(nInit);}; +}; +} // namespace AS + +#endif // NUMDIALOG_H