58 setWindowTitle( tr(
" Export options" ));
59 originalWidth = aWidth;
60 originalHeight = aHeight;
63 vectorEPSCheckBox = NULL;
71 QVBoxLayout* globalVLayout =
new QVBoxLayout(
this);
72 globalVLayout->setContentsMargins(10,10,10,10);
73 globalVLayout->setSpacing(10);
80 QWidget * sizeWidget =
new QWidget(
this);
81 QVBoxLayout * sizeWidgetLayout =
new QVBoxLayout(sizeWidget);
82 sizeWidgetLayout->setContentsMargins(10,10,10,10);
86 sizeGroupBox =
new QGroupBox(tr(
"Size"));
87 QVBoxLayout *sizeGroupBoxLayout =
new QVBoxLayout(sizeGroupBox);
88 QButtonGroup * sizeButtonGroupBox =
new QButtonGroup();
89 sizeGroupBoxLayout->setContentsMargins(15,15,15,15);
91 original =
new QRadioButton(
"Original");
92 modify =
new QRadioButton(
"Modify");
94 sizeButtonGroupBox->addButton(original);
95 sizeButtonGroupBox->addButton(modify);
96 sizeButtonGroupBox->setExclusive(
true);
98 sizeGroupBoxLayout->addWidget(original);
99 sizeGroupBoxLayout->addWidget(modify);
101 sizeGroupBox->setLayout(sizeGroupBoxLayout);
102 sizeWidgetLayout->addWidget(sizeGroupBox);
104 connect( sizeButtonGroupBox, SIGNAL( buttonClicked(QAbstractButton*) ),
this, SLOT(
changeSizeBox()) );
105 original->setChecked(
true );
109 heightWidget =
new QWidget(sizeWidget);
111 QHBoxLayout *heightLineLayout =
new QHBoxLayout(heightWidget);
115 heightLineLayout->addWidget(
new QLabel(
"Height",heightWidget));
116 height =
new QLineEdit(tmp.setNum(originalHeight),heightWidget);
117 height->setMaxLength(5);
118 heightLineLayout->addWidget(height);
120 heightWidget->setLayout(heightLineLayout);
122 sizeWidgetLayout->addWidget(heightWidget);
123 connect( height, SIGNAL( textChanged (
const QString& ) ),
this, SLOT(
textHeightChanged(
const QString &) ) );
127 widthWidget =
new QWidget(sizeWidget);
129 QHBoxLayout *widthLineLayout =
new QHBoxLayout(widthWidget);
131 widthLineLayout->addWidget(
new QLabel(
"Width ",widthWidget));
132 width =
new QLineEdit(tmp.setNum(originalWidth),widthWidget);
133 width->setMaxLength(5);
134 widthLineLayout->addWidget(width);
135 widthWidget->setLayout(widthLineLayout);
136 sizeWidgetLayout->addWidget(widthWidget);
137 connect( width, SIGNAL( textChanged (
const QString& ) ),
this, SLOT(
textWidthChanged(
const QString &) ) );
143 ratioCheckBox =
new QCheckBox(
"Keep ratio",sizeWidget);
144 ratioCheckBox->setChecked(
true );
146 sizeWidgetLayout->addWidget(ratioCheckBox);
148 ratioCheckBox->hide();
149 heightWidget->hide();
152 sizeWidget->setLayout(sizeWidgetLayout);
153 globalVLayout->addWidget(sizeWidget);
155 if (format ==
"eps") {
157 QGroupBox *EPSWidgetGroupBox =
new QGroupBox(tr(
"EPS options"),
this);
160 QVBoxLayout * EPSGroupBoxLayout =
new QVBoxLayout(EPSWidgetGroupBox);
161 EPSGroupBoxLayout->setContentsMargins(15,15,15,15);
174 vectorEPSCheckBox =
new QCheckBox(
"Vector EPS File",EPSWidgetGroupBox);
175 EPSGroupBoxLayout->addWidget(vectorEPSCheckBox);
177 EPSWidgetGroupBox->setLayout(EPSGroupBoxLayout);
179 vectorEPSCheckBox->setChecked(
true );
181 globalVLayout->addWidget(EPSWidgetGroupBox);
182 connect( vectorEPSCheckBox, SIGNAL( clicked() ),
this, SLOT(
changeVectorEPS()) );
186 if ((format ==
"jpg") ||
187 (format ==
"jpeg")) {
189 QGroupBox *imageGroupBox =
new QGroupBox(tr(
"Image quality"),
this);
190 QHBoxLayout *hSliderLayout =
new QHBoxLayout(imageGroupBox);
191 hSliderLayout->setContentsMargins(15,15,15,15);
193 qualitySlider=
new QSlider(Qt::Horizontal,imageGroupBox);
194 qualitySlider->setMinimum(0);
195 qualitySlider->setMaximum(100);
196 qualitySlider->setTickPosition(QSlider::TicksBelow);
197 qualitySlider->setValue(60);
198 hSliderLayout->addWidget(
new QLabel(
"Low ",imageGroupBox));
199 hSliderLayout->addWidget(qualitySlider);
200 hSliderLayout->addWidget(
new QLabel(
" Maximum",imageGroupBox));
202 imageGroupBox->setLayout(hSliderLayout);
204 globalVLayout->addWidget(imageGroupBox);
210 QWidget *buttonBox =
new QWidget(
this);
212 QHBoxLayout *buttonBoxLayout =
new QHBoxLayout(buttonBox);
214 buttonOk =
new QPushButton( tr(
"&OK" ),buttonBox );
215 buttonOk->setAutoDefault(
true );
216 buttonOk->setDefault(
true );
217 buttonBoxLayout->addWidget(buttonOk);
219 buttonCancel =
new QPushButton( tr(
"&Cancel" ),buttonBox );
220 buttonCancel->setAutoDefault(
true );
221 buttonBoxLayout->addWidget(buttonCancel);
223 buttonBox->setLayout(buttonBoxLayout);
224 globalVLayout->addWidget(buttonBox);
228 setLayout(globalVLayout);
231 connect( buttonOk, SIGNAL( clicked() ),
this, SLOT( accept() ) );
232 connect( buttonCancel, SIGNAL( clicked() ),
this, SLOT( reject() ) );