Changeset View
Changeset View
Standalone View
Standalone View
dialogs/imagelib/transforms/kpTransformPreviewDialog.cpp
Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Line(s) | 62 | : QDialog (parent), | |||
---|---|---|---|---|---|
67 | m_previewGroupBox (nullptr), | 67 | m_previewGroupBox (nullptr), | ||
68 | m_previewPixmapLabel (nullptr), | 68 | m_previewPixmapLabel (nullptr), | ||
69 | m_gridLayout (nullptr), | 69 | m_gridLayout (nullptr), | ||
70 | m_environ (_env) | 70 | m_environ (_env) | ||
71 | { | 71 | { | ||
72 | setWindowTitle (caption); | 72 | setWindowTitle (caption); | ||
73 | QDialogButtonBox *buttons = new QDialogButtonBox (QDialogButtonBox::Ok | | 73 | QDialogButtonBox *buttons = new QDialogButtonBox (QDialogButtonBox::Ok | | ||
74 | QDialogButtonBox::Cancel, this); | 74 | QDialogButtonBox::Cancel, this); | ||
75 | connect (buttons, SIGNAL (accepted()), this, SLOT (accept())); | 75 | connect (buttons, &QDialogButtonBox::accepted, this, &kpTransformPreviewDialog::accept); | ||
76 | connect (buttons, SIGNAL (rejected()), this, SLOT (reject())); | 76 | connect (buttons, &QDialogButtonBox::rejected, this, &kpTransformPreviewDialog::reject); | ||
77 | 77 | | |||
78 | QWidget *baseWidget = new QWidget (this); | 78 | QWidget *baseWidget = new QWidget (this); | ||
79 | m_mainWidget = baseWidget; | 79 | m_mainWidget = baseWidget; | ||
80 | 80 | | |||
81 | QVBoxLayout *dialogLayout = new QVBoxLayout (this); | 81 | QVBoxLayout *dialogLayout = new QVBoxLayout (this); | ||
82 | dialogLayout->addWidget (baseWidget); | 82 | dialogLayout->addWidget (baseWidget); | ||
83 | dialogLayout->addWidget (buttons); | 83 | dialogLayout->addWidget (buttons); | ||
84 | 84 | | |||
▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Line(s) | |||||
168 | 168 | | |||
169 | // private | 169 | // private | ||
170 | void kpTransformPreviewDialog::createPreviewGroupBox () | 170 | void kpTransformPreviewDialog::createPreviewGroupBox () | ||
171 | { | 171 | { | ||
172 | m_previewGroupBox = new QGroupBox (i18n ("Preview"), mainWidget ()); | 172 | m_previewGroupBox = new QGroupBox (i18n ("Preview"), mainWidget ()); | ||
173 | 173 | | |||
174 | m_previewPixmapLabel = new kpResizeSignallingLabel (m_previewGroupBox); | 174 | m_previewPixmapLabel = new kpResizeSignallingLabel (m_previewGroupBox); | ||
175 | m_previewPixmapLabel->setMinimumSize (150, 110); | 175 | m_previewPixmapLabel->setMinimumSize (150, 110); | ||
176 | connect (m_previewPixmapLabel, SIGNAL (resized()), | 176 | connect (m_previewPixmapLabel, &kpResizeSignallingLabel::resized, | ||
177 | this, SLOT (updatePreview())); | 177 | this, &kpTransformPreviewDialog::updatePreview); | ||
178 | 178 | | |||
179 | QPushButton *updatePushButton = new QPushButton (i18n ("&Update"), | 179 | QPushButton *updatePushButton = new QPushButton (i18n ("&Update"), | ||
180 | m_previewGroupBox); | 180 | m_previewGroupBox); | ||
181 | connect (updatePushButton, SIGNAL (clicked()), | 181 | connect (updatePushButton, &QPushButton::clicked, | ||
182 | this, SLOT (slotUpdateWithWaitCursor())); | 182 | this, &kpTransformPreviewDialog::slotUpdateWithWaitCursor); | ||
183 | 183 | | |||
184 | 184 | | |||
185 | QVBoxLayout *previewLayout = new QVBoxLayout (m_previewGroupBox); | 185 | QVBoxLayout *previewLayout = new QVBoxLayout (m_previewGroupBox); | ||
186 | previewLayout->addWidget (m_previewPixmapLabel, 1/*stretch*/); | 186 | previewLayout->addWidget (m_previewPixmapLabel, 1/*stretch*/); | ||
187 | previewLayout->addWidget (updatePushButton, 0/*stretch*/, Qt::AlignHCenter); | 187 | previewLayout->addWidget (updatePushButton, 0/*stretch*/, Qt::AlignHCenter); | ||
188 | } | 188 | } | ||
189 | 189 | | |||
190 | 190 | | |||
▲ Show 20 Lines • Show All 276 Lines • Show Last 20 Lines |