~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to libs/dimg/filters/levels/histogrambox.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
    HistogramWidget*     histogramWidget;
82
82
};
83
83
 
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)
86
86
{
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);
90
90
 
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>"
160
160
 
161
161
    connect(d->scaleBG, SIGNAL(buttonReleased(int)),
162
162
            this, SLOT(slotScaleChanged()));
163
 
    
 
163
 
164
164
    connect(this, SIGNAL(signalChannelChanged(ChannelType)),
165
165
            d->histogramWidget, SLOT(setChannelType(ChannelType)));
166
 
    
 
166
 
167
167
    connect(this, SIGNAL(signalScaleChanged(HistogramScale)),
168
168
            d->histogramWidget, SLOT(setScaleType(HistogramScale)));
169
169
}
222
222
{
223
223
    d->histoBox->layout()->setMargin(margin);
224
224
}
225
 
    
 
225
 
226
226
void HistogramBox::slotChannelChanged()
227
227
{
228
228
    switch (channel())
272
272
    typedef QPair<QString, QString> ChannelPair;
273
273
 
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."));
276
276
 
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."));
279
279
 
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."));
282
282
 
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."));
285
285
 
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."));
288
288
 
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."));
293
293
 
294
294
    channelDescMap.insert(LuminosityChannel, luminosityPair);
295
295
    channelDescMap.insert(RedChannel, redPair);