1 #include "SaveAsDialog.h"
5 #include <QButtonGroup>
24 SaveAsDialog::SaveAsDialog(QString pTitle,
QStringList &pFilterList, QDir &pDir,
QWidget *pParent) :
25 FileDialog(pTitle, pFilterList, pDir, pParent), p_dir(pDir)
28 this->setFileMode(QFileDialog::AnyFile);
33 this->setLabelText(QFileDialog::Accept,
"Save");
35 this->setLabelText(QFileDialog::Reject,
"Cancel");
38 QHBoxLayout *hBoxLayout =
new QHBoxLayout;
39 hBoxLayout->setAlignment(Qt::AlignLeft);
40 hBoxLayout->setSpacing(25);
41 hBoxLayout->setContentsMargins (25, 11, 25, 11 );
44 QButtonGroup *exportOptionsGrp =
new QButtonGroup();
45 exportOptionsGrp->setExclusive(
true);
47 p_fullImage =
new QRadioButton(
"Export Entire &Image",
this);
50 p_fullImage->setWhatsThis(
"Make a duplicate of the original image.");
52 p_exportAsIs =
new QRadioButton(
"Export Viewport &As Is",
this);
55 p_exportAsIs->setWhatsThis(
"Save the viewport as it is currently being viewed.");
57 p_exportFullRes =
new QRadioButton(
"Export Viewport at Full &Res",
this);
60 p_exportFullRes->setWhatsThis(
"Save the viewport but at the full resolution of the original image.");
71 QLayout *dialogLayout = layout();
73 dialogLayout->addItem(hBoxLayout);
74 dialogLayout->setAlignment(hBoxLayout, Qt::AlignLeft );
75 setLayout(dialogLayout);