Changeset View
Changeset View
Standalone View
Standalone View
libkookascan/kscancontrols.cpp
Show First 20 Lines • Show All 65 Lines • ▼ Show 20 Line(s) | 65 | if (mText.isEmpty()) { | |||
---|---|---|---|---|---|
66 | mText = i18n("(Unknown)"); | 66 | mText = i18n("(Unknown)"); | ||
67 | } | 67 | } | ||
68 | } | 68 | } | ||
69 | 69 | | |||
70 | KScanControl::~KScanControl() {} | 70 | KScanControl::~KScanControl() {} | ||
71 | 71 | | |||
72 | QString KScanControl::text() const | 72 | QString KScanControl::text() const | ||
73 | { | 73 | { | ||
74 | return (QString::null); | 74 | return (QString()); | ||
75 | } | 75 | } | ||
76 | void KScanControl::setText(const QString &text) {} | 76 | void KScanControl::setText(const QString &text) {} | ||
77 | 77 | | |||
78 | int KScanControl::value() const | 78 | int KScanControl::value() const | ||
79 | { | 79 | { | ||
80 | return (0); | 80 | return (0); | ||
81 | } | 81 | } | ||
82 | void KScanControl::setValue(int val) {} | 82 | void KScanControl::setValue(int val) {} | ||
▲ Show 20 Lines • Show All 169 Lines • ▼ Show 20 Line(s) | |||||
252 | 252 | | |||
253 | void KScanCheckbox::setValue(int i) | 253 | void KScanCheckbox::setValue(int i) | ||
254 | { | 254 | { | ||
255 | mCheckbox->setChecked((bool) i); | 255 | mCheckbox->setChecked((bool) i); | ||
256 | } | 256 | } | ||
257 | 257 | | |||
258 | QString KScanCheckbox::label() const | 258 | QString KScanCheckbox::label() const | ||
259 | { | 259 | { | ||
260 | return (QString::null); | 260 | return (QString()); | ||
261 | } | 261 | } | ||
262 | 262 | | |||
263 | // KScanCombo - combo box with list of options | 263 | // KScanCombo - combo box with list of options | ||
264 | // ------------------------------------------- | 264 | // ------------------------------------------- | ||
265 | // | 265 | // | ||
266 | // This control (and currently only this control) is special, because the | 266 | // This control (and currently only this control) is special, because the | ||
267 | // item text is set to the translated value of the option values. But these | 267 | // item text is set to the translated value of the option values. But these | ||
268 | // values need to reported back unchanged, so the untranslated form is stored | 268 | // values need to reported back unchanged, so the untranslated form is stored | ||
▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Line(s) | |||||
327 | 327 | | |||
328 | void KScanCombo::setValue(int i) | 328 | void KScanCombo::setValue(int i) | ||
329 | { | 329 | { | ||
330 | mCombo->setCurrentIndex(i); | 330 | mCombo->setCurrentIndex(i); | ||
331 | } | 331 | } | ||
332 | 332 | | |||
333 | QString KScanCombo::textAt(int i) const | 333 | QString KScanCombo::textAt(int i) const | ||
334 | { | 334 | { | ||
335 | return (i == -1 ? QString::null : mCombo->itemData(i).toString()); | 335 | return (i == -1 ? QString() : mCombo->itemData(i).toString()); | ||
336 | } | 336 | } | ||
337 | 337 | | |||
338 | int KScanCombo::count() const | 338 | int KScanCombo::count() const | ||
339 | { | 339 | { | ||
340 | return (mCombo->count()); | 340 | return (mCombo->count()); | ||
341 | } | 341 | } | ||
342 | 342 | | |||
343 | void KScanCombo::slotActivated(int i) | 343 | void KScanCombo::slotActivated(int i) | ||
▲ Show 20 Lines • Show All 43 Lines • ▼ Show 20 Line(s) | |||||
387 | { | 387 | { | ||
388 | mGroup = new QGroupBox(text, this); | 388 | mGroup = new QGroupBox(text, this); | ||
389 | mGroup->setFlat(true); | 389 | mGroup->setFlat(true); | ||
390 | mLayout->addWidget(mGroup); | 390 | mLayout->addWidget(mGroup); | ||
391 | } | 391 | } | ||
392 | 392 | | |||
393 | QString KScanGroup::label() const | 393 | QString KScanGroup::label() const | ||
394 | { | 394 | { | ||
395 | return (QString::null); | 395 | return (QString()); | ||
396 | } | 396 | } | ||
397 | 397 | | |||
398 | // KScanPushButton - action button | 398 | // KScanPushButton - action button | ||
399 | // ------------------------------- | 399 | // ------------------------------- | ||
400 | 400 | | |||
401 | KScanPushButton::KScanPushButton(QWidget *parent, const QString &text) | 401 | KScanPushButton::KScanPushButton(QWidget *parent, const QString &text) | ||
402 | : KScanControl(parent, text) | 402 | : KScanControl(parent, text) | ||
403 | { | 403 | { | ||
404 | mButton = new QPushButton(text, this); | 404 | mButton = new QPushButton(text, this); | ||
405 | mLayout->addWidget(mButton); | 405 | mLayout->addWidget(mButton); | ||
406 | 406 | | |||
407 | connect(mButton, SIGNAL(clicked()), SIGNAL(returnPressed())); | 407 | connect(mButton, SIGNAL(clicked()), SIGNAL(returnPressed())); | ||
408 | } | 408 | } | ||
409 | 409 | | |||
410 | QString KScanPushButton::label() const | 410 | QString KScanPushButton::label() const | ||
411 | { | 411 | { | ||
412 | return (QString::null); | 412 | return (QString()); | ||
413 | } | 413 | } |