81
81
HistogramWidget* histogramWidget;
84
HistogramBox::HistogramBox(QWidget *parent, HistogramBoxType type, bool selectMode)
85
: QWidget(parent), d(new HistogramBoxPriv)
84
HistogramBox::HistogramBox(QWidget* parent, HistogramBoxType type, bool selectMode)
85
: QWidget(parent), d(new HistogramBoxPriv)
87
87
d->channelCB = new KComboBox(this);
88
QLabel *channelLabel = new QLabel(i18n("Channel:"), this);
88
QLabel* channelLabel = new QLabel(i18n("Channel:"), this);
89
89
channelLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
91
QWidget *scaleBox = new QWidget(this);
92
QHBoxLayout *hlay = new QHBoxLayout(scaleBox);
91
QWidget* scaleBox = new QWidget(this);
92
QHBoxLayout* hlay = new QHBoxLayout(scaleBox);
93
93
d->scaleBG = new QButtonGroup(scaleBox);
94
94
scaleBox->setWhatsThis(i18n("<p>Select the histogram scale.</p>"
95
95
"<p>If the image's maximal counts are small, you can use the <b>linear</b> scale.</p>"
161
161
connect(d->scaleBG, SIGNAL(buttonReleased(int)),
162
162
this, SLOT(slotScaleChanged()));
164
164
connect(this, SIGNAL(signalChannelChanged(ChannelType)),
165
165
d->histogramWidget, SLOT(setChannelType(ChannelType)));
167
167
connect(this, SIGNAL(signalScaleChanged(HistogramScale)),
168
168
d->histogramWidget, SLOT(setScaleType(HistogramScale)));
272
272
typedef QPair<QString, QString> ChannelPair;
274
274
ChannelPair luminosityPair(i18nc("The luminosity channel", "Luminosity"), i18n(
275
"<b>Luminosity</b>: display the image's luminosity values."));
275
"<b>Luminosity</b>: display the image's luminosity values."));
277
277
ChannelPair redPair(i18nc("The red channel", "Red"), i18n(
278
"<b>Red</b>: display the red image-channel values."));
278
"<b>Red</b>: display the red image-channel values."));
280
280
ChannelPair greenPair(i18nc("The green channel", "Green"), i18n(
281
"<b>Green</b>: display the green image-channel values."));
281
"<b>Green</b>: display the green image-channel values."));
283
283
ChannelPair bluePair(i18nc("The blue channel", "Blue"), i18n(
284
"<b>Blue</b>: display the blue image-channel values."));
284
"<b>Blue</b>: display the blue image-channel values."));
286
286
ChannelPair colorsPair(i18nc("The colors channel", "Colors"), i18n(
287
"<b>Colors</b>: Display all color channel values at the same time."));
287
"<b>Colors</b>: Display all color channel values at the same time."));
289
289
ChannelPair alphaPair(i18nc("The alpha channel", "Alpha"), i18n(
290
"<b>Alpha</b>: display the alpha image-channel values. "
291
"This channel corresponds to the transparency value and "
292
"is supported by some image formats, such as PNG or TIF."));
290
"<b>Alpha</b>: display the alpha image-channel values. "
291
"This channel corresponds to the transparency value and "
292
"is supported by some image formats, such as PNG or TIF."));
294
294
channelDescMap.insert(LuminosityChannel, luminosityPair);
295
295
channelDescMap.insert(RedChannel, redPair);