Back to index

scribus-ng  1.3.4.dfsg+svn20071115
polyprops.cpp
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #include "polyprops.h"
00008 #include "polyprops.moc"
00009 #include "polygonwidget.h"
00010 #include "commonstrings.h"
00011 
00012 extern QPixmap loadIcon(QString nam);
00013 
00014 PolygonProps::PolygonProps(QWidget* parent, int polyC, int polyFd, double polyF, bool polyS, double polyR) : QDialog( parent, "poly", true, 0 )
00015 {
00016        setCaption( tr( "Polygon Properties" ) );
00017        setIcon(loadIcon("AppIcon.png"));
00018        PolygonPropsLayout = new QVBoxLayout( this, 10, 5, "PolygonPropsLayout");
00019        polyWidget = new PolygonWidget(this, polyC, polyFd, polyF, polyS, polyR);
00020        PolygonPropsLayout->addWidget( polyWidget );
00021        Layout1 = new QHBoxLayout( 0, 0, 6, "Layout1_2");
00022        QSpacerItem* spacer_2 = new QSpacerItem( 0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum );
00023        Layout1->addItem( spacer_2 );
00024        okButton = new QPushButton( this, "PushButton1" );
00025        okButton->setText( CommonStrings::tr_OK );
00026        okButton->setDefault( true );
00027        Layout1->addWidget( okButton );
00028        cancelButton = new QPushButton( this, "PushButton2" );
00029        cancelButton->setText( CommonStrings::tr_Cancel );
00030        Layout1->addWidget( cancelButton );
00031        PolygonPropsLayout->addLayout( Layout1 );
00032        // signals and slots connections
00033        connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
00034        connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
00035 }
00036 
00037 void PolygonProps::getValues(int* polyC, int* polyFd, double* polyF, bool* polyS, double* polyR)
00038 {
00039        polyWidget->getValues(polyC, polyFd, polyF, polyS, polyR);
00040 }