OSSP CVS Repository

ossp - Check-in [4048]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4048
Date: 2003-Feb-17 18:16:18 (local)
2003-Feb-17 17:16:18 (UTC)
User:ms
Branch:
Comment: Implemented new class Reportpanel.
Tickets:
Inspections:
Files:
ossp-pkg/as/as-gui/Makefile.in      1.42 -> 1.43     4 inserted, 4 deleted
ossp-pkg/as/as-gui/as_reportpanel.cpp      added-> 1.1
ossp-pkg/as/as-gui/as_reportpanel.h      added-> 1.1

ossp-pkg/as/as-gui/Makefile.in 1.42 -> 1.43

--- Makefile.in  2003/02/08 18:10:09     1.42
+++ Makefile.in  2003/02/17 17:16:18     1.43
@@ -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_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_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_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_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_OBJ         = moc_as_gui.o moc_as_table.o moc_as_panel.o
+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
 
 .SUFFIXES:
 .SUFFIXES: .c .cc .cpp .cxx .o


ossp-pkg/as/as-gui/as_reportpanel.cpp -> 1.1

*** /dev/null    Sun Sep 29 07:22:42 2024
--- -    Sun Sep 29 07:22:45 2024
***************
*** 0 ****
--- 1,140 ----
+ //
+ //  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 <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //
+ //  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_reportpanel.cpp: ISO C++ implementation
+ //
+ 
+ #include <qvariant.h>
+ #include <qgroupbox.h>
+ #include <qpushbutton.h>
+ #include <qtextbrowser.h>
+ #include <qtoolbutton.h>
+ #include <qlayout.h>
+ #include <qtooltip.h>
+ #include <qwhatsthis.h>
+ 
+ #include "as_reportpanel.h"
+ #include "as_generic.h"
+ 
+ 
+ //
+ // Constructs a Reportpanel 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
+ // true to construct a modal dialog.
+ //
+ Reportpanel::Reportpanel(QWidget *pParent, const char *kszName, bool bModal, WFlags Flags)
+     : QDialog(pParent, kszName, bModal, Flags)
+ {
+     // Boilerplate code to initialize the panel
+     if (!kszName)
+         this->setName("Reportpanel");
+ 
+     // Make Panel resizeable
+     this->setSizeGripEnabled(true);
+     this->setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5,
+         (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth()));
+ 
+     // Build panel using already constructed widgets and layouts
+     m_pFormlay = new QVBoxLayout(this, 11, 6, "Formlayout");
+     m_pToolay = new QHBoxLayout(0, 0, 6, "Toolbuttonlay"); 
+     m_pPushlay = new QHBoxLayout(0, 0, 6, "Pushbuttonlay"); 
+ 
+     // Groupbox and its browser
+     m_pGroupbox = new QGroupBox(this, "Groupbox");
+     m_pGroupbox->setFrameShape(QGroupBox::GroupBoxPanel);
+     m_pGroupbox->setFrameShadow(QGroupBox::Sunken);
+     m_pGroupbox->setColumnLayout(0, Qt::Vertical);
+     m_pGroupbox->layout()->setSpacing(6);
+     m_pGroupbox->layout()->setMargin(11);
+     m_pGrouplay = new QVBoxLayout(m_pGroupbox->layout());
+     m_pGrouplay->setAlignment(Qt::AlignTop);
+     m_pBrowser = new QTextBrowser(m_pGroupbox, "Reportbrowser");
+     m_pGrouplay->addWidget(m_pBrowser);
+     m_pGrouplay->addLayout(m_pToolay);
+ 
+     // Tool button suite
+     m_pWeeklybutt = new QToolButton(m_pGroupbox, "Weeklybutton");
+     m_pMonthlybutt = new QToolButton(m_pGroupbox, "Monthlybutton");
+     m_pBothbutt = new QToolButton(m_pGroupbox, "Bothbutton");
+     m_pToolay->addWidget(m_pWeeklybutt);
+     m_pToolay->addWidget(m_pMonthlybutt);
+     m_pToolay->addWidget(m_pBothbutt);
+     m_pFormlay->addWidget(m_pGroupbox);
+ 
+     // Push button suite
+     m_pSavebutt = new QPushButton(this, "Savebutton");
+     m_pDismissbutt = new QPushButton(this, "Dismissbutton");
+     m_pPushlay->addWidget(m_pSavebutt);
+     m_pPushlay->addWidget(m_pDismissbutt);
+     m_pFormlay->addLayout(m_pPushlay);
+ 
+     // Connect signals to slots, accept() and reject() are Qt implicit
+     connect(m_pDismissbutt, SIGNAL(clicked(void)), SLOT(accept(void)));
+     connect(m_pSavebutt, SIGNAL(clicked(void)), SLOT(saveReport(void)));
+     this->textChange();
+     this->resize(QSize(400, 332).expandedTo(minimumSizeHint()));
+ }
+ 
+ //
+ // Saves the currently displayed local report
+ //
+ void Reportpanel::saveReport(void)
+ {
+     Prototype Unimp;
+     Unimp.doMbox();
+ }
+ 
+ //
+ // Sets the strings of the subwidgets using the current language
+ //
+ void Reportpanel::textChange(void)
+ {
+     this->setCaption(tr("AS local report", "Local report using weekly data or monthly data or both."));
+     m_pGroupbox->setTitle(tr("Local report", "Comment for Groupbox"));
+ 
+     // Top level push buttons associated with accept and save slots
+     m_pDismissbutt->setText(tr("Dismiss", "Comment for Dismissbutton"));
+     QToolTip::add(m_pDismissbutt, tr("Closes the report panel", "Comment for tooltip Reportbutton"));
+     QWhatsThis::add(m_pDismissbutt, tr("The dismiss button dismisses the report panel", "Comment for whatsThis Reportbutton"));
+     m_pSavebutt->setText(tr("Save", "Comment for Savebutton"));
+     QToolTip::add(m_pSavebutt, tr("Closes the report panel", "Comment for tooltip Reportbutton"));
+     QWhatsThis::add(m_pSavebutt, tr("The dismiss button dismisses the report panel", "Comment for whatsThis Reportbutton"));
+ 
+     // Inner tool buttons for new local report generation
+     m_pWeeklybutt->setText(tr("Weekly", "Comment for Weeklybutt"));
+     QToolTip::add(m_pWeeklybutt, tr("Generates a weekly report", "Comment for tooltip Weeklybutt"));
+     QWhatsThis::add(m_pWeeklybutt, tr("The weekly button generates a new weekly report", "Comment for whatsThis Weeklybutt"));
+     m_pMonthlybutt->setText(tr("Monthly", "Comment for Monthlybutt"));
+     QToolTip::add(m_pMonthlybutt, tr("Generates a weekly report", "Comment for tooltip Monthlybutt"));
+     QWhatsThis::add(m_pMonthlybutt, tr("The weekly button generates a new weekly report", "Comment for whatsThis Monthlybutt"));
+     m_pBothbutt->setText(tr("Both", "Comment for Bothbutt"));
+     QToolTip::add(m_pBothbutt, tr("Generates a weekly report", "Comment for tooltip Bothbutt"));
+     QWhatsThis::add(m_pBothbutt, tr("The weekly button generates a new weekly report", "Comment for whatsThis Bothbutt"));
+ }


ossp-pkg/as/as-gui/as_reportpanel.h -> 1.1

*** /dev/null    Sun Sep 29 07:22:42 2024
--- -    Sun Sep 29 07:22:45 2024
***************
*** 0 ****
--- 1,75 ----
+ //
+ //  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 <rse@engelschall.com>
+ //  Copyright (c) 2002-2003 Michael Schloh von Bennewitz <michael@schloh.com>
+ //
+ //  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_reportpanel.h: ISO C++ interface
+ //
+ 
+ #ifndef REPORTPANEL_H
+ #define REPORTPANEL_H
+ 
+ #include <qvariant.h>
+ #include <qdialog.h>
+ 
+ 
+ class QVBoxLayout;
+ class QHBoxLayout;
+ class QGridLayout;
+ class QGroupBox;
+ class QPushButton;
+ class QTextBrowser;
+ class QToolButton;
+ 
+ class Reportpanel : public QDialog
+ {
+     Q_OBJECT
+ 
+ public:
+     Reportpanel(QWidget *pParent = 0, const char *kszName = 0, bool bModal = true, WFlags Flags = 0);
+ //    ~Reportpanel(void); // No need to destroy widgets, because qt does it for us
+ 
+ public:
+     QGroupBox    *m_pGroupbox;
+     QToolButton  *m_pWeeklybutt;
+     QToolButton  *m_pMonthlybutt;
+     QToolButton  *m_pBothbutt;
+     QTextBrowser *m_pBrowser;
+     QPushButton  *m_pSavebutt;
+     QPushButton  *m_pDismissbutt;
+ 
+ protected:
+     QVBoxLayout *m_pFormlay;
+     QVBoxLayout *m_pGrouplay;
+     QHBoxLayout *m_pToolay;
+     QHBoxLayout *m_pPushlay;
+ 
+ protected slots:
+     void saveReport(void);
+     virtual void textChange(void);
+ };
+ 
+ #endif // REPORTPANEL_H

CVSTrac 2.0.1