1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
/***************************************************************************
raboutdialog.cpp - description
-------------------
begin : Wed Apr 28 1999
copyright : (C) 1999 by Andreas Mustun
email : mustun@ribbonsoft.com
***************************************************************************/
#include <qkeycode.h>
#include <qlayout.h>
#include <qpixmap.h>
#include "raboutdialog.h"
#include "rlabel.h"
#include "rprgdef.h"
#include "rpushbutton.h"
#ifdef DEF_QCAD
#include "xpm/qcad.xpm"
#include "xpm/apsicon.xpm"
#endif
#ifdef DEF_CAM_EXPERT
#include "xpm/camexpert.xpm"
#include "xpm/firmicon.xpm"
#endif
/*! \class RAboutDialog
\brief The "Help" -> "About" Dialog
\author Andrew Mustun
*/
/*! Constructor
\param _parent The Parent Widget
\param _name Name
*/
RAboutDialog::RAboutDialog(QWidget* _parent,
const char* _name)
:QDialog(_parent, _name, true, WStyle_NormalBorder)
{
setFixedSize(350, 194);
setCaption(DEF_APPNAME);
// Stuff the elements into a box layout:
//
QGridLayout * gl = new QGridLayout(this, 4, 2, 5);
gl->setColStretch(0, 2);
gl->setColStretch(1, 5);
gl->setRowStretch(0, 1);
gl->setRowStretch(1, 20);
gl->setRowStretch(2, 20);
gl->setRowStretch(3, 6);
// Program:
//
fProg = new QFrame(this, "fprog");
fProg->setFrameStyle(QFrame::Box|QFrame::Sunken);
gl->addMultiCellWidget(fProg, 1, 1, 0, 1);
QGridLayout* glp = new QGridLayout(fProg, 1, 2, 5);
glp->setColStretch(0, 1);
glp->setColStretch(1, 3);
lIconProg = new RLabel(fProg, "liconprog");
lIconProg->setPixmap(QPixmap(DEF_APP_ICON));
lIconProg->setAlignment(AlignHCenter|AlignTop);
glp->addWidget(lIconProg, 0, 0);
QCString mes(1024);
mes.sprintf("%s\nVersion: %s\nReleased: %s\nAll rights reserved.",
DEF_APPNAME,
DEF_VERSION,
DEF_RELEASE);
lInfoProg = new RLabel(mes.data(), fProg, "linfoprog");
lInfoProg->setAlignment(AlignTop);
glp->addWidget(lInfoProg, 0, 1);
// Firm:
//
fFirm = new QFrame(this, "ffirm");
fFirm->setFrameStyle(QFrame::Box|QFrame::Sunken);
gl->addMultiCellWidget(fFirm, 2, 2, 0, 1);
QGridLayout* glf = new QGridLayout(fFirm, 1, 2, 5);
glf->setColStretch(0, 1);
glf->setColStretch(1, 3);
lIconFirm = new RLabel(fFirm, "liconfirm");
lIconFirm->setPixmap(QPixmap(DEF_ORG_ICON));
lIconFirm->setAlignment(AlignHCenter|AlignTop);
glf->addWidget(lIconFirm, 0, 0);
mes.sprintf("Copyright by %s\n%s\nSupport: %s\nInternet: %s",
DEF_FIRM,
DEF_PROGRAMMER,
DEF_SUPPORTEMAIL,
DEF_INTERNET);
lInfoFirm = new RLabel(mes.data(), fFirm, "linfofirm");
lInfoFirm->setAlignment(AlignTop);
glf->addWidget(lInfoFirm, 0, 1);
bOk = new RPushButton("OK", this);
connect(bOk, SIGNAL(clicked()), SLOT(accept()));
bOk->setAccel(Key_Return);
gl->addMultiCellWidget(bOk, 3, 3, 0, 1);
}
/*! Destructor
*/
RAboutDialog::~RAboutDialog()
{
}
// EOF-
|