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
|
/***************************************************************************
rintro.cpp - description
-------------------
begin : Mon Sep 27 1999
copyright : (C) 1999 by Andreas Mustun
email : andrew@ribbonsoft.com
***************************************************************************/
/****************************************************************************
** rintro.cpp 1998/10/04 A. Mustun RibbonSoft
**
** Copyright (C) 1998 RibbonSoft. All rights reserved.
**
*****************************************************************************/
#include <qapplication.h>
#include <qfont.h>
#include <qpainter.h>
#include <qpixmap.h>
#include "rintro.h"
#include "rlabel.h"
#include "rprgdef.h"
#include "rconfig.h"
#ifdef DEF_CAM_EXPERT
#include "xpm/camexpertintro.xpm"
#endif
#ifdef DEF_QCAD
#include "xpm/qcadintro.xpm"
#endif
// Constructor:
//
RIntro::RIntro(const char* _version,
QWidget* _parent,
const char* _name)
:QWidget(_parent, _name, WStyle_NoBorder)
{
setFixedSize(298, 200); // 256 158
/*
move((QApplication::desktop()->width()-width())/2,
(QApplication::desktop()->height()-height())/2);
*/
if(parentWidget()) {
move((parentWidget()->width()-width())/2,
(parentWidget()->height()-height())/2);
}
sVersion = "Version ";
sVersion +=_version;
pIntro = new QPixmap(DEF_INTRO);
}
// Destructor:
//
RIntro::~RIntro()
{
}
// Paint:
//
void
RIntro::paintEvent(QPaintEvent* _ev)
{
QWidget::paintEvent(_ev);
QPainter paint; // painter
paint.begin(this);
paint.drawPixmap(0, 0, *pIntro);
#ifndef DEF_QCAD
paint.setFont(QFont("helvetica", RCONFIG->getSettingInt("Application:FontSize0")));
paint.setPen(black);
/*paint.drawText(19, 69, 200, 50,
AlignLeft|AlignTop,
"http://www.ribbonsoft.com\n"
"info@ribbonsoft.com");*/
paint.setFont(QFont("helvetica", 9));
/*paint.setPen(white);*/
paint.drawText(DEF_INTRO_VERX, DEF_INTRO_VERY, 100, 26,
AlignLeft|AlignTop,
sVersion.data());
#endif
paint.end();
}
// EOF
|