Index: ossp-pkg/as/as-gui/as_gui.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_gui.cpp,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/as/as-gui/as_gui.cpp,v' | diff -u /dev/null - -L'ossp-pkg/as/as-gui/as_gui.cpp' 2>/dev/null --- ossp-pkg/as/as-gui/as_gui.cpp +++ - 2025-05-20 13:31:29.742571773 +0200 @@ -0,0 +1,92 @@ +#include "titraq.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Used in initialization of the application +void Titraqform::init() +{ + pDeletebutton->setBackgroundColor(darkYellow); + pMaintable->setFocus(); +} + +// +// Construct a Titraqform which is a child of 'pParent', with the +// name 'kszName' and widget flags set to 'Flags' +// + +Titraqform::Titraqform(QWidget *pParent, const char *kszName, bool bModal, + WFlags Flags) : QDialog(pParent, kszName, bModal, Flags) +{ + if (!kszName) + setName("Titraqform"); + resize(600, 480); + setCaption(trUtf8("OpenPKG Friend")); + pTitraqformlayout = new QVBoxLayout(this, 11, 6, "pTitraqformlayout"); + + // Contains the package layout and control layout + pMainlayout = new QVBoxLayout(0, 0, 6, "pMainlayout"); + + // Contains the table control and status line control + pPackagelayout = new QVBoxLayout(0, 0, 6, "pPackagelayout"); + + pMaintable = new QTable(this, "pMaintable"); + pMaintable->setNumRows(10); + pMaintable->setNumCols(6); + pMaintable->setReadOnly(FALSE); + pPackagelayout->addWidget(pMaintable); + + pStatusline = new QLineEdit(this, "pStatusline"); + pStatusline->setFrameShape(QLineEdit::LineEditPanel); + pStatusline->setFrameShadow(QLineEdit::Sunken); + pStatusline->setFrame(TRUE); + pStatusline->setReadOnly(TRUE); + pPackagelayout->addWidget(pStatusline); + pMainlayout->addLayout(pPackagelayout); + + // Contains all the push button controls + pControllayout = new QHBoxLayout(0, 0, 6, "pControllayout"); + + pInstallbutton = new QPushButton(this, "pInstallbutton"); + pInstallbutton->setCursor(QCursor(13)); + pInstallbutton->setText(trUtf8("&Install")); + pInstallbutton->setFlat(FALSE); + pControllayout->addWidget(pInstallbutton); + + pDeletebutton = new QPushButton(this, "pDeletebutton"); + pDeletebutton->setCursor(QCursor(13)); + pDeletebutton->setText(trUtf8("&Delete")); + pControllayout->addWidget(pDeletebutton); + + pVerifybutton = new QPushButton(this, "VerifyButton"); + pVerifybutton->setCursor(QCursor(13)); + pVerifybutton->setText(trUtf8("&Verify")); + pControllayout->addWidget(pVerifybutton); + + pCommitbutton = new QPushButton(this, "pCommitbutton"); + pCommitbutton->setPaletteBackgroundColor(QColor(186, 156, 144)); + pCommitbutton->setCursor(QCursor(13)); + pCommitbutton->setText(trUtf8("&Commit")); + pControllayout->addWidget(pCommitbutton); + pMainlayout->addLayout(pControllayout); + pTitraqformlayout->addLayout(pMainlayout); + + init(); // signals and slots connections +} + +// +// Destroy the object and free any allocated resources +// +Titraqform::~Titraqform() +{ + // Qt deletes child widgets for us +} Index: ossp-pkg/as/as-gui/as_gui.h RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_gui.h,v co -q -kk -p'1.1' '/v/ossp/cvs/ossp-pkg/as/as-gui/as_gui.h,v' | diff -u /dev/null - -L'ossp-pkg/as/as-gui/as_gui.h' 2>/dev/null --- ossp-pkg/as/as-gui/as_gui.h +++ - 2025-05-20 13:31:29.745993957 +0200 @@ -0,0 +1,39 @@ +#ifndef OPKGFORM_H +#define OPKGFORM_H + +#include +#include +class QVBoxLayout; +class QHBoxLayout; +class QGridLayout; +class QLineEdit; +class QPushButton; +class QTable; + +class Titraqform : public QDialog +{ + Q_OBJECT + +public: + Titraqform(QWidget *pParent = 0, const char *kszName = 0, + bool bModal = FALSE, WFlags Flags = 0); + ~Titraqform(); + + QTable *pMaintable; + QLineEdit *pStatusline; + QPushButton *pInstallbutton; + QPushButton *pDeletebutton; + QPushButton *pVerifybutton; + QPushButton *pCommitbutton; + +protected slots: + virtual void init(); + +protected: + QVBoxLayout *pTitraqformlayout; + QVBoxLayout *pMainlayout; + QVBoxLayout *pPackagelayout; + QHBoxLayout *pControllayout; +}; + +#endif // OPKGFORM_H