2
* KFontInst - KDE Font Installer
4
* Copyright 2003-2007 Craig Drummond <craig@kde.org>
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16
* General Public License for more details.
18
* You should have received a copy of the GNU General Public License
19
* along with this program; see the file COPYING. If not, write to
20
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21
* Boston, MA 02110-1301, USA.
24
#include "PrintDialog.h"
25
#include <QtGui/QFrame>
26
#include <QtGui/QLabel>
27
#include <QtGui/QGridLayout>
28
#include <KDE/KLocale>
33
CPrintDialog::CPrintDialog(QWidget *parent)
37
setCaption(i18n("Print Font Samples"));
38
setButtons(Ok|Cancel);
40
QFrame *page = new QFrame(this);
43
QGridLayout *layout=new QGridLayout(page);
45
layout->setSpacing(KDialog::spacingHint());
47
QLabel *lbl=new QLabel(i18n("Select size to print font:"), page);
48
lbl->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
49
layout->addWidget(lbl, 0, 0);
50
itsSize=new QComboBox(page);
51
itsSize->insertItem(0, i18n("Waterfall"));
52
itsSize->insertItem(1, i18n("12pt"));
53
itsSize->insertItem(2, i18n("18pt"));
54
itsSize->insertItem(3, i18n("24pt"));
55
itsSize->insertItem(4, i18n("36pt"));
56
itsSize->insertItem(5, i18n("48pt"));
57
itsSize->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Maximum);
58
layout->addWidget(itsSize, 0, 1);
59
layout->addItem(new QSpacerItem(2, 2), 2, 0);
62
bool CPrintDialog::exec(int size)
64
itsSize->setCurrentIndex(size);
65
return KDialog::Accepted==KDialog::exec();