printpanel.cpp Example File
linguist/trollprint/printpanel.cpp
#include <QtGui>
#include "printpanel.h"
PrintPanel::PrintPanel(QWidget *parent)
: QWidget(parent)
{
twoSidedGroupBox = new QGroupBox(tr("2-sided"));
twoSidedEnabledRadio = new QRadioButton(tr("Enabled"));
twoSidedDisabledRadio = new QRadioButton(tr("Disabled"));
twoSidedDisabledRadio->setChecked(true);
colorsGroupBox = new QGroupBox(tr("Colors"));
colorsEnabledRadio = new QRadioButton(tr("Enabled"));
colorsDisabledRadio = new QRadioButton(tr("Disabled"));
colorsDisabledRadio->setChecked(true);
QHBoxLayout *twoSidedLayout = new QHBoxLayout;
twoSidedLayout->addWidget(twoSidedEnabledRadio);
twoSidedLayout->addWidget(twoSidedDisabledRadio);
twoSidedGroupBox->setLayout(twoSidedLayout);
QHBoxLayout *colorsLayout = new QHBoxLayout;
colorsLayout->addWidget(colorsEnabledRadio);
colorsLayout->addWidget(colorsDisabledRadio);
colorsGroupBox->setLayout(colorsLayout);
QVBoxLayout *mainLayout = new QVBoxLayout;
mainLayout->addWidget(twoSidedGroupBox);
mainLayout->addWidget(colorsGroupBox);
setLayout(mainLayout);
}
Copyright © 2008 Nokia Corporation and/or its subsidiary(-ies) |
Trademarks |
Qt 4.4.3 |