Changeset View
Changeset View
Standalone View
Standalone View
src/options/ksaneoptgamma.cpp
Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Line(s) | 46 | { | |||
---|---|---|---|---|---|
51 | readOption(); | 51 | readOption(); | ||
52 | 52 | | |||
53 | if (!m_optDesc) { | 53 | if (!m_optDesc) { | ||
54 | qDebug() << "This is a bug"; | 54 | qDebug() << "This is a bug"; | ||
55 | m_widget = new KSaneOptionWidget(parent, QStringLiteral("")); | 55 | m_widget = new KSaneOptionWidget(parent, QStringLiteral("")); | ||
56 | return; | 56 | return; | ||
57 | } | 57 | } | ||
58 | 58 | | |||
59 | m_widget = m_gamma = new LabeledGamma(parent, i18n(m_optDesc->title), | 59 | m_widget = m_gamma = new LabeledGamma(parent, sane_i18n(m_optDesc->title), | ||
60 | m_optDesc->size / sizeof(SANE_Word)); | 60 | m_optDesc->size / sizeof(SANE_Word)); | ||
61 | connect(m_gamma, &LabeledGamma::gammaTableChanged, this, &KSaneOptGamma::gammaTableChanged); | 61 | connect(m_gamma, &LabeledGamma::gammaTableChanged, this, &KSaneOptGamma::gammaTableChanged); | ||
62 | if (strcmp(m_optDesc->name, SANE_NAME_GAMMA_VECTOR_R) == 0) { | 62 | if (strcmp(m_optDesc->name, SANE_NAME_GAMMA_VECTOR_R) == 0) { | ||
63 | m_gamma->setColor(Qt::red); | 63 | m_gamma->setColor(Qt::red); | ||
64 | } | 64 | } | ||
65 | if (strcmp(m_optDesc->name, SANE_NAME_GAMMA_VECTOR_G) == 0) { | 65 | if (strcmp(m_optDesc->name, SANE_NAME_GAMMA_VECTOR_G) == 0) { | ||
66 | m_gamma->setColor(Qt::green); | 66 | m_gamma->setColor(Qt::green); | ||
67 | } | 67 | } | ||
68 | if (strcmp(m_optDesc->name, SANE_NAME_GAMMA_VECTOR_B) == 0) { | 68 | if (strcmp(m_optDesc->name, SANE_NAME_GAMMA_VECTOR_B) == 0) { | ||
69 | m_gamma->setColor(Qt::blue); | 69 | m_gamma->setColor(Qt::blue); | ||
70 | } | 70 | } | ||
71 | 71 | | |||
72 | m_widget->setToolTip(i18n(m_optDesc->desc)); | 72 | m_widget->setToolTip(sane_i18n(m_optDesc->desc)); | ||
73 | updateVisibility(); | 73 | updateVisibility(); | ||
74 | readValue(); | 74 | readValue(); | ||
75 | } | 75 | } | ||
76 | 76 | | |||
77 | void KSaneOptGamma::gammaTableChanged(const QVector<int> &gam_tbl) | 77 | void KSaneOptGamma::gammaTableChanged(const QVector<int> &gam_tbl) | ||
78 | { | 78 | { | ||
79 | QVector<int> copy = gam_tbl; | 79 | QVector<int> copy = gam_tbl; | ||
80 | writeData(copy.data()); | 80 | writeData(copy.data()); | ||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |