From 29baf8dcda3d05d91d340b739de0fdd9e37f5749 Mon Sep 17 00:00:00 2001 From: leseb Date: Thu, 21 Mar 2002 17:33:38 +0000 Subject: Enable any size pages --- (limited to 'noncore/graphics/drawpad/newpagedialog.cpp') diff --git a/noncore/graphics/drawpad/newpagedialog.cpp b/noncore/graphics/drawpad/newpagedialog.cpp new file mode 100644 index 0000000..c11d977 --- a/dev/null +++ b/noncore/graphics/drawpad/newpagedialog.cpp @@ -0,0 +1,61 @@ +/*************************************************************************** + * * + * DrawPad - a drawing program for Opie Environment * + * * + * (C) 2002 by S. Prud'homme * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "newpagedialog.h" + +#include +#include +#include + +NewPageDialog::NewPageDialog(QWidget* parent, const char* name) + : QDialog(parent, name, true) +{ + setCaption(tr("New Page")); + + QLabel* widthLabel = new QLabel(tr("Width :"), this); + QLabel* heightLabel = new QLabel(tr("Height :"), this); + + m_pWidthSpinBox = new QSpinBox(1, 1024, 1, this); + m_pHeightSpinBox = new QSpinBox(1, 1024, 1, this); + + QGridLayout* gridLayout = new QGridLayout(this, 2, 2, 2, 2); + + gridLayout->addWidget(widthLabel, 0, 0); + gridLayout->addWidget(heightLabel, 1, 0); + gridLayout->addWidget(m_pWidthSpinBox, 0, 1); + gridLayout->addWidget(m_pHeightSpinBox, 1, 1); +} + +NewPageDialog::~NewPageDialog() +{ +} + +void NewPageDialog::setWidth(int width) +{ + m_pWidthSpinBox->setValue(width); +} + +void NewPageDialog::setHeight(int height) +{ + m_pHeightSpinBox->setValue(height); +} + +int NewPageDialog::width() +{ + return m_pWidthSpinBox->value(); +} + +int NewPageDialog::height() +{ + return m_pHeightSpinBox->value(); +} -- cgit v0.9.0.2