*** /dev/null Sat Nov 23 05:51:46 2024
--- - Sat Nov 23 05:51:56 2024
***************
*** 0 ****
--- 1,143 ----
+ //
+ // 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_panel.cpp: ISO C++ implementation
+ //
+
+ #include "as_panel.h"
+
+ #include <qvariant.h>
+ #include <qbuttongroup.h>
+ #include <qlabel.h>
+ #include <qlineedit.h>
+ #include <qpushbutton.h>
+ #include <qradiobutton.h>
+ #include <qtabwidget.h>
+ #include <qtoolbutton.h>
+ #include <qwidget.h>
+ #include <qlayout.h>
+ #include <qtooltip.h>
+ #include <qwhatsthis.h>
+
+ //
+ // Constructs a Prefpanel as a child of 'pParent', with the
+ // name 'kszName' and widget flags set to 'Flags'.
+ //
+ // The dialog will by default be modeless, unless you set 'bModal' to
+ // true to construct a modal dialog.
+ //
+ Prefpanel::Prefpanel(QWidget *pParent, const char *kszName, bool bModal, WFlags Flags)
+ : QDialog(pParent, kszName, bModal, Flags)
+ {
+ if (!kszName)
+ this->setName("Prefpanel");
+
+ setSizeGripEnabled(false);
+ setSizePolicy(QSizePolicy((QSizePolicy::SizeType)5,
+ (QSizePolicy::SizeType)5, 0, 0, sizePolicy().hasHeightForWidth()));
+
+ m_pPrefgroup = new QButtonGroup(this, "Prefbuttons");
+ m_pPrefgroup->setGeometry(QRect(230, 350, 220, 60));
+
+ m_pOkaybutton = new QPushButton(m_pPrefgroup, "Okaybutton");
+ m_pOkaybutton->setGeometry(QRect(10, 20, 86, 30));
+
+ m_pCancelbutton = new QPushButton(m_pPrefgroup, "Cancelbutton");
+ m_pCancelbutton->setGeometry(QRect(120, 20, 86, 30));
+ m_pCancelbutton->setDefault(true);
+
+ m_pTabselect = new QTabWidget(this, "Tabselector");
+ m_pTabselect->setGeometry(QRect(10, 10, 470, 320));
+
+ m_pGeneralpage = new QWidget(m_pTabselect, "Generalpage");
+
+ m_pAcctlabel = new QLabel(m_pGeneralpage, "Accfilelabel");
+ m_pAcctlabel->setGeometry(QRect(30, 40, 80, 20));
+
+ m_pAcctline = new QLineEdit(m_pGeneralpage, "Accountline");
+ m_pAcctline->setGeometry(QRect(130, 40, 108, 22));
+
+ m_pAcctbutton = new QToolButton(m_pGeneralpage, "Accfilebutton");
+ m_pAcctbutton->setGeometry(QRect(270, 40, 80, 20));
+ m_pAcctbutton->setFocusPolicy(QToolButton::StrongFocus);
+ m_pTabselect->insertTab(m_pGeneralpage, "");
+
+ m_pStylepage = new QWidget(m_pTabselect, "Stylepage");
+
+ m_pStylegroup = new QButtonGroup(m_pStylepage, "Stylebuttons");
+ m_pStylegroup->setGeometry(QRect(150, 30, 140, 230));
+
+ m_pStylebutton1 = new QRadioButton(m_pStylegroup, "Stylebutton1");
+ m_pStylebutton1->setGeometry(QRect(20, 30, 60, 20));
+
+ m_pStylebutton2 = new QRadioButton(m_pStylegroup, "Stylebutton2");
+ m_pStylebutton2->setGeometry(QRect(20, 70, 95, 20));
+ m_pTabselect->insertTab(m_pStylepage, "");
+ this->textChange();
+ this->resize(QSize(491, 433).expandedTo(minimumSizeHint()));
+ }
+
+ //
+ // Sets the strings of the subwidgets using the current language
+ //
+ void Prefpanel::textChange()
+ {
+ this->setCaption(tr("AS Applicate Preferences", "Personal preferences are persistent across sessions"));
+ m_pPrefgroup->setTitle(tr("Prefbuttons", "Buttons for preferences"));
+ QToolTip::add(m_pPrefgroup, tr("Buttons for Preferences", "Comment for toolTip Prefbuttons"));
+ QWhatsThis::add(m_pPrefgroup, tr("Buttons for Preferences", "Comment for whatsThis Prefbuttons"));
+ m_pOkaybutton->setText(tr("Okay", "Comment for Okaybutton"));
+ QToolTip::add(m_pOkaybutton, tr("Tooltip for Okaybutton", "Comment for tooltip Okaybutton"));
+ QWhatsThis::add(m_pOkaybutton, tr("Whatsthis for Okaybutton", "Comment for whatsThis Okaybutton"));
+ m_pCancelbutton->setText(tr("Cancel", "Comment for Cancelbutton"));
+ QToolTip::add(m_pCancelbutton, tr("Tooltip for Cancelbutton", "Comment for toolTip Cancelbutton"));
+ QWhatsThis::add(m_pCancelbutton, tr("Whatsthis for Cancelbutton", "Comment for whatsThis Cancelbutton"));
+ QToolTip::add(m_pTabselect, tr("Tooltip for General Preferences", "Comment for toolTip General Preferences"));
+ QWhatsThis::add(m_pTabselect, tr("Whats this for General Not sure", "Comment for whatsthis General Preferences"));
+ m_pAcctlabel->setText(tr("Account path", "Comment for Accfile"));
+ QToolTip::add(m_pAcctlabel, tr("Tooltip for Accfilelabel", "Comment for toolTip Accfilelabel"));
+ QWhatsThis::add(m_pAcctlabel, tr("Whatsthis for Accfilelabel", "Comment for whatsThis Accfilelabel"));
+ m_pAcctline->setText(tr("Initialname", "Comment for text Lineedit"));
+ QToolTip::add(m_pAcctline, tr("Tooltip for Accountfile", "Comment for toolTip Accountfile"));
+ QWhatsThis::add(m_pAcctline, tr("Whatsthis for Accountfile", "Comment for whatsThis Accountfile"));
+ m_pAcctbutton->setText(tr("Change...", "Text for Accfilebutton"));
+ m_pAcctbutton->setTextLabel(tr("Accfile label", "Comment for textLabel Accfilebutton"));
+ QToolTip::add(m_pAcctbutton, tr("Tooltip for Accfilebutton", "Comment for toolTip Accfilbutton"));
+ QWhatsThis::add(m_pAcctbutton, tr("Whatsthis for Accfilebutton", "Comment for whatsThis Accfilebutton"));
+ m_pTabselect->changeTab(m_pGeneralpage, tr("General"));
+ m_pStylegroup->setTitle(tr("Available styles", "Comment for Stylebuttons"));
+ QToolTip::add(m_pStylegroup, tr("Tooltip for Stylebutton", "Comment for toolTip Stylebutton"));
+ QWhatsThis::add(m_pStylegroup, tr("Whatsthis for Stylebutton", "Comment for whatsThis Stylebuttons"));
+ m_pStylebutton1->setText(tr("Erste", "Comment for Stylebutton1"));
+ QToolTip::add(m_pStylebutton1, tr("Tooltip for Stylebutton1", "Comment for toolTip Stylebutton1"));
+ QWhatsThis::add(m_pStylebutton1, tr("Whatsthis for Stylebutton1", "Comment whatsThis for Stylebutton1"));
+ m_pStylebutton2->setText(tr("Zweite", "Comment for Stylebutton2"));
+ QToolTip::add(m_pStylebutton2, tr("Tooltip for Stylebutton2", "Comment toolTip for Stylebutton2"));
+ QWhatsThis::add(m_pStylebutton2, tr("Whatsthis for Stylebutton2", "Comment for whatsThis Stylebutton2"));
+ m_pTabselect->changeTab(m_pStylepage, tr("Styles"));
+ }
|