Changeset View
Changeset View
Standalone View
Standalone View
widgets/kpPrintDialogPage.cpp
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | 53 | { | |||
---|---|---|---|---|---|
55 | 55 | | |||
56 | setWindowTitle (i18nc ("@title:tab", "I&mage Position")); | 56 | setWindowTitle (i18nc ("@title:tab", "I&mage Position")); | ||
57 | 57 | | |||
58 | d->printCenteredRadio = new QRadioButton (i18n ("&Center of the page"), | 58 | d->printCenteredRadio = new QRadioButton (i18n ("&Center of the page"), | ||
59 | this); | 59 | this); | ||
60 | d->printTopLeftRadio = new QRadioButton (i18n ("Top-&left of the page"), | 60 | d->printTopLeftRadio = new QRadioButton (i18n ("Top-&left of the page"), | ||
61 | this); | 61 | this); | ||
62 | 62 | | |||
63 | QVBoxLayout *lay = new QVBoxLayout (this); | 63 | auto *lay = new QVBoxLayout (this); | ||
64 | lay->addWidget (d->printCenteredRadio); | 64 | lay->addWidget (d->printCenteredRadio); | ||
65 | lay->addWidget (d->printTopLeftRadio); | 65 | lay->addWidget (d->printTopLeftRadio); | ||
66 | lay->addStretch (); | 66 | lay->addStretch (); | ||
67 | 67 | | |||
68 | setPrintImageCenteredOnPage (true); | 68 | setPrintImageCenteredOnPage (true); | ||
69 | } | 69 | } | ||
70 | 70 | | |||
71 | kpPrintDialogPage::~kpPrintDialogPage () | 71 | kpPrintDialogPage::~kpPrintDialogPage () | ||
72 | { | 72 | { | ||
73 | delete d; | 73 | delete d; | ||
74 | } | 74 | } | ||
75 | 75 | | |||
76 | 76 | | |||
77 | bool kpPrintDialogPage::printImageCenteredOnPage () | 77 | bool kpPrintDialogPage::printImageCenteredOnPage () | ||
78 | { | 78 | { | ||
79 | qCDebug(kpLogWidgets) << "kpPrintDialogPage::printImageCenteredOnPage()" | 79 | qCDebug(kpLogWidgets) << "kpPrintDialogPage::printImageCenteredOnPage()" | ||
80 | << " returning " << d->printCenteredRadio->isChecked() << endl; | 80 | << " returning " << d->printCenteredRadio->isChecked(); | ||
81 | return d->printCenteredRadio->isChecked (); | 81 | return d->printCenteredRadio->isChecked (); | ||
82 | } | 82 | } | ||
83 | 83 | | |||
84 | 84 | | |||
85 | void kpPrintDialogPage::setPrintImageCenteredOnPage (bool printCentered) | 85 | void kpPrintDialogPage::setPrintImageCenteredOnPage (bool printCentered) | ||
86 | { | 86 | { | ||
87 | qCDebug(kpLogWidgets) << "kpPrintDialogPage::setOptions(" << printCentered << ")"; | 87 | qCDebug(kpLogWidgets) << "kpPrintDialogPage::setOptions(" << printCentered << ")"; | ||
88 | if (printCentered) | 88 | if (printCentered) { | ||
89 | d->printCenteredRadio->setChecked (true); | 89 | d->printCenteredRadio->setChecked (true); | ||
90 | else | 90 | } | ||
91 | else { | ||||
91 | d->printTopLeftRadio->setChecked (true); | 92 | d->printTopLeftRadio->setChecked (true); | ||
92 | } | 93 | } | ||
94 | } | ||||
93 | 95 | | |||
94 | 96 | |