Changeset View
Changeset View
Standalone View
Standalone View
src/signatureconfigurator.cpp
Show First 20 Lines • Show All 150 Lines • ▼ Show 20 Line(s) | 108 | { | |||
---|---|---|---|---|---|
151 | // The focus might be still in the widget that is disabled | 151 | // The focus might be still in the widget that is disabled | ||
152 | q->connect(mEnableCheck, &QCheckBox::clicked, mEnableCheck, QOverload<>::of(&QCheckBox::setFocus)); | 152 | q->connect(mEnableCheck, &QCheckBox::clicked, mEnableCheck, QOverload<>::of(&QCheckBox::setFocus)); | ||
153 | 153 | | |||
154 | int pageno = 0; | 154 | int pageno = 0; | ||
155 | // page 0: input field for direct entering: | 155 | // page 0: input field for direct entering: | ||
156 | QWidget *page = new QWidget(widgetStack); | 156 | QWidget *page = new QWidget(widgetStack); | ||
157 | widgetStack->insertWidget(pageno, page); | 157 | widgetStack->insertWidget(pageno, page); | ||
158 | QVBoxLayout *page_vlay = new QVBoxLayout(page); | 158 | QVBoxLayout *page_vlay = new QVBoxLayout(page); | ||
159 | page_vlay->setMargin(0); | 159 | page_vlay->setContentsMargins(0, 0, 0, 0); | ||
160 | 160 | | |||
161 | #ifndef QT_NO_TOOLBAR | 161 | #ifndef QT_NO_TOOLBAR | ||
162 | mEditToolBar = new KToolBar(q); | 162 | mEditToolBar = new KToolBar(q); | ||
163 | mEditToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); | 163 | mEditToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); | ||
164 | page_vlay->addWidget(mEditToolBar, 0); | 164 | page_vlay->addWidget(mEditToolBar, 0); | ||
165 | 165 | | |||
166 | mFormatToolBar = new KToolBar(q); | 166 | mFormatToolBar = new KToolBar(q); | ||
167 | mFormatToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); | 167 | mFormatToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); | ||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Line(s) | 212 | #endif | |||
220 | 220 | | |||
221 | widgetStack->setCurrentIndex(0); // since mSourceCombo->currentItem() == 0 | 221 | widgetStack->setCurrentIndex(0); // since mSourceCombo->currentItem() == 0 | ||
222 | 222 | | |||
223 | // page 1: "signature file" requester, label, "edit file" button: | 223 | // page 1: "signature file" requester, label, "edit file" button: | ||
224 | ++pageno; | 224 | ++pageno; | ||
225 | page = new QWidget(widgetStack); | 225 | page = new QWidget(widgetStack); | ||
226 | widgetStack->insertWidget(pageno, page); // force sequential numbers (play safe) | 226 | widgetStack->insertWidget(pageno, page); // force sequential numbers (play safe) | ||
227 | page_vlay = new QVBoxLayout(page); | 227 | page_vlay = new QVBoxLayout(page); | ||
228 | page_vlay->setMargin(0); | 228 | page_vlay->setContentsMargins(0, 0, 0, 0); | ||
229 | hlay = new QHBoxLayout(); // inherits spacing | 229 | hlay = new QHBoxLayout(); // inherits spacing | ||
230 | page_vlay->addLayout(hlay); | 230 | page_vlay->addLayout(hlay); | ||
231 | mFileRequester = new KUrlRequester(page); | 231 | mFileRequester = new KUrlRequester(page); | ||
232 | mFileRequester->setFilter(QStringLiteral("*.txt")); | 232 | mFileRequester->setFilter(QStringLiteral("*.txt")); | ||
233 | mFileRequester->setWhatsThis( | 233 | mFileRequester->setWhatsThis( | ||
234 | i18n("Use this requester to specify a text file that contains your " | 234 | i18n("Use this requester to specify a text file that contains your " | ||
235 | "signature. It will be read every time you create a new mail or " | 235 | "signature. It will be read every time you create a new mail or " | ||
236 | "append a new signature.")); | 236 | "append a new signature.")); | ||
Show All 12 Lines | |||||
249 | hlay->addWidget(mEditButton); | 249 | hlay->addWidget(mEditButton); | ||
250 | page_vlay->addStretch(1); // spacer | 250 | page_vlay->addStretch(1); // spacer | ||
251 | 251 | | |||
252 | // page 2: "signature command" requester and label: | 252 | // page 2: "signature command" requester and label: | ||
253 | ++pageno; | 253 | ++pageno; | ||
254 | page = new QWidget(widgetStack); | 254 | page = new QWidget(widgetStack); | ||
255 | widgetStack->insertWidget(pageno, page); | 255 | widgetStack->insertWidget(pageno, page); | ||
256 | page_vlay = new QVBoxLayout(page); | 256 | page_vlay = new QVBoxLayout(page); | ||
257 | page_vlay->setMargin(0); | 257 | page_vlay->setContentsMargins(0, 0, 0, 0); | ||
258 | hlay = new QHBoxLayout(); // inherits spacing | 258 | hlay = new QHBoxLayout(); // inherits spacing | ||
259 | page_vlay->addLayout(hlay); | 259 | page_vlay->addLayout(hlay); | ||
260 | mCommandEdit = new KLineEdit(page); | 260 | mCommandEdit = new KLineEdit(page); | ||
261 | mCommandEdit->setClearButtonEnabled(true); | 261 | mCommandEdit->setClearButtonEnabled(true); | ||
262 | mCommandEdit->setCompletionObject(new KShellCompletion()); | 262 | mCommandEdit->setCompletionObject(new KShellCompletion()); | ||
263 | mCommandEdit->setAutoDeleteCompletionObject(true); | 263 | mCommandEdit->setAutoDeleteCompletionObject(true); | ||
264 | mCommandEdit->setWhatsThis( | 264 | mCommandEdit->setWhatsThis( | ||
265 | i18n("You can add an arbitrary command here, either with or without path " | 265 | i18n("You can add an arbitrary command here, either with or without path " | ||
▲ Show 20 Lines • Show All 224 Lines • Show Last 20 Lines |