diff options
Diffstat (limited to 'krita/ui/kis_histogram_view.cc')
| -rw-r--r-- | krita/ui/kis_histogram_view.cc | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/krita/ui/kis_histogram_view.cc b/krita/ui/kis_histogram_view.cc index 67c308897..cc4fe59c5 100644 --- a/krita/ui/kis_histogram_view.cc +++ b/krita/ui/kis_histogram_view.cc @@ -18,13 +18,13 @@ #include <math.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qbuttongroup.h> -#include <qpushbutton.h> -#include <qscrollbar.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqbuttongroup.h> +#include <tqpushbutton.h> +#include <tqscrollbar.h> #include <kdebug.h> @@ -38,13 +38,13 @@ #include "kis_basic_histogram_producers.h" #include "kis_paint_device.h" -KisHistogramView::KisHistogramView(QWidget *parent, const char *name, WFlags f) - : QLabel(parent, name, f) +KisHistogramView::KisHistogramView(TQWidget *tqparent, const char *name, WFlags f) + : TQLabel(tqparent, name, f) { // This is needed until we can computationally scale it well. Until then, this is needed // And when we have it, it won't hurt to have it around setScaledContents(true); - setFrameShape(QFrame::Box); // Draw a box around ourselves + setFrameShape(TQFrame::Box); // Draw a box around ourselves } KisHistogramView::~KisHistogramView() @@ -108,7 +108,7 @@ KisHistogramProducerSP KisHistogramView::currentProducer() return m_currentProducer; } -QStringList KisHistogramView::channelStrings() +TQStringList KisHistogramView::channelStrings() { return m_channelStrings; } @@ -120,14 +120,14 @@ KisIDList KisHistogramView::listProducers() return KisIDList(); } -void KisHistogramView::setCurrentChannels(const KisID& producerID, QValueVector<KisChannelInfo *> channels) +void KisHistogramView::setCurrentChannels(const KisID& producerID, TQValueVector<KisChannelInfo *> channels) { setCurrentChannels( KisHistogramProducerFactoryRegistry::instance()->get(producerID)->generate(), channels); } -void KisHistogramView::setCurrentChannels(KisHistogramProducerSP producer, QValueVector<KisChannelInfo *> channels) +void KisHistogramView::setCurrentChannels(KisHistogramProducerSP producer, TQValueVector<KisChannelInfo *> channels) { m_currentProducer = producer; m_currentProducer->setView(m_from, m_width); @@ -143,7 +143,7 @@ void KisHistogramView::setCurrentChannels(KisHistogramProducerSP producer, QValu return; } - QValueVector<KisChannelInfo *> producerChannels = m_currentProducer->channels(); + TQValueVector<KisChannelInfo *> producerChannels = m_currentProducer->channels(); for (uint i = 0; i < channels.count(); i++) { // Also makes sure the channel is actually in the producer's list @@ -197,7 +197,7 @@ void KisHistogramView::setActiveChannel(int channel) m_histogram->setChannel(0); // Set a default channel, just being nice } else { m_color = false; - QValueVector<KisChannelInfo *> channels = m_currentProducer->channels(); + TQValueVector<KisChannelInfo *> channels = m_currentProducer->channels(); for (uint i = 0; i < channels.count(); i++) { KisChannelInfo* channel = channels.at(i); if (channel->name() == info.channel->name()) { @@ -249,7 +249,7 @@ void KisHistogramView::addProducerChannels(KisHistogramProducerSP producer) { info.isProducer = true; info.producer = producer; // channel not used for a producer - QValueVector<KisChannelInfo *> channels = info.producer->channels(); + TQValueVector<KisChannelInfo *> channels = info.producer->channels(); int count = channels.count(); m_comboInfo.append(info); m_channelStrings.append(producer->id() . name()); @@ -257,24 +257,24 @@ void KisHistogramView::addProducerChannels(KisHistogramProducerSP producer) { info.isProducer = false; info.channel = channels.at(j); m_comboInfo.append(info); - m_channelStrings.append(QString(" ").append(info.channel->name())); + m_channelStrings.append(TQString(" ").append(info.channel->name())); } } void KisHistogramView::updateHistogram() { - Q_UINT32 height = this->height(); + TQ_UINT32 height = this->height(); int selFrom, selTo; // from - to in bins if (!m_currentProducer) { // Something's very wrong: no producer for this colorspace to update histogram with! return; } - Q_INT32 bins = m_histogram->producer()->numberOfBins(); - m_pix = QPixmap(bins, height); + TQ_INT32 bins = m_histogram->producer()->numberOfBins(); + m_pix = TQPixmap(bins, height); m_pix.fill(); - QPainter p(&m_pix); - p.setBrush(Qt::black); + TQPainter p(&m_pix); + p.setBrush(TQt::black); // Draw the box of the selection, if any if (m_histogram->hasSelection()) { @@ -289,7 +289,7 @@ void KisHistogramView::updateHistogram() selTo = 2; } - Q_INT32 i = 0; + TQ_INT32 i = 0; double highest = 0; bool blackOnBlack = false; @@ -302,16 +302,16 @@ void KisHistogramView::updateHistogram() } for (uint chan = 0; chan < m_channels.count(); chan++) { - QColor color; + TQColor color; m_histogram->setChannel(m_channelToOffset.at(chan)); if (m_color) { color = m_channels.at(chan)->color(); p.setPen(color); } else { - color = Qt::black; + color = TQt::black; } - blackOnBlack = (color == Qt::black); + blackOnBlack = (color == TQt::black); if (m_histogram->getHistogramType() == LINEAR) { double factor = (double)height / highest; @@ -319,7 +319,7 @@ void KisHistogramView::updateHistogram() // So that we get a good view even with a selection box with // black colors on background of black selection if (i >= selFrom && i < selTo && blackOnBlack) { - p.setPen(Qt::white); + p.setPen(TQt::white); } else { p.setPen(color); } @@ -330,7 +330,7 @@ void KisHistogramView::updateHistogram() for( i = 0; i < bins; ++i ) { // Same as above if (i >= selFrom && i < selTo && blackOnBlack) { - p.setPen(Qt::white); + p.setPen(TQt::white); } else { p.setPen(color); } @@ -343,11 +343,11 @@ void KisHistogramView::updateHistogram() setPixmap(m_pix); } -void KisHistogramView::mousePressEvent(QMouseEvent * e) { +void KisHistogramView::mousePressEvent(TQMouseEvent * e) { if (e->button() == Qt::RightButton) emit rightClicked(e->globalPos()); else - QLabel::mousePressEvent(e); + TQLabel::mousePressEvent(e); } |
