summaryrefslogtreecommitdiffstats
path: root/krita/core/kis_histogram.cc
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /krita/core/kis_histogram.cc
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'krita/core/kis_histogram.cc')
-rw-r--r--krita/core/kis_histogram.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/krita/core/kis_histogram.cc b/krita/core/kis_histogram.cc
index 97fdeac4..1b4db526 100644
--- a/krita/core/kis_histogram.cc
+++ b/krita/core/kis_histogram.cc
@@ -18,7 +18,7 @@
*/
#include <kdebug.h>
-#include <qdatetime.h> // ### Debug
+#include <tqdatetime.h> // ### Debug
#include "kis_types.h"
#include "kis_histogram.h"
@@ -59,12 +59,12 @@ KisHistogram::~KisHistogram()
void KisHistogram::updateHistogram()
{
- Q_INT32 x,y,w,h;
+ TQ_INT32 x,y,w,h;
m_dev->exactBounds(x,y,w,h);
KisRectIteratorPixel srcIt = m_dev->createRectIterator(x,y,w,h, false);
KisColorSpace* cs = m_dev->colorSpace();
- QTime t;
+ TQTime t;
t.start();
// Let the producer do it's work
@@ -109,8 +109,8 @@ KisHistogram::Calculations KisHistogram::selectionCalculations() {
return m_selectionCalculations.at(m_channel);
}
-QValueVector<KisHistogram::Calculations> KisHistogram::calculateForRange(double from, double to) {
- QValueVector<Calculations> calculations;
+TQValueVector<KisHistogram::Calculations> KisHistogram::calculateForRange(double from, double to) {
+ TQValueVector<Calculations> calculations;
uint count = m_producer->channels().count();
for (uint i = 0; i < count; i++) {
@@ -126,7 +126,7 @@ KisHistogram::Calculations KisHistogram::calculateSingleRange(int channel, doubl
// XXX If from == to, we only want a specific bin, handle that properly!
double max = from, min = to, total = 0.0, mean = 0.0; //, median = 0.0, stddev = 0.0;
- Q_UINT32 high = 0, low = (Q_UINT32) -1, count = 0;
+ TQ_UINT32 high = 0, low = (TQ_UINT32) -1, count = 0;
if (m_producer->count() == 0) {
// We won't get anything, even if a range is specified
@@ -134,17 +134,17 @@ KisHistogram::Calculations KisHistogram::calculateSingleRange(int channel, doubl
return c;
}
- Q_INT32 totbins = m_producer->numberOfBins();
- Q_UINT32 current;
+ TQ_INT32 totbins = m_producer->numberOfBins();
+ TQ_UINT32 current;
// convert the double range into actual bins:
double factor = static_cast<double>(totbins) / m_producer->viewWidth();
- Q_INT32 fromBin = static_cast<Q_INT32>((from - m_producer->viewFrom()) * factor);
- Q_INT32 toBin = fromBin + static_cast<Q_INT32>((to - from) * factor);
+ TQ_INT32 fromBin = static_cast<TQ_INT32>((from - m_producer->viewFrom()) * factor);
+ TQ_INT32 toBin = fromBin + static_cast<TQ_INT32>((to - from) * factor);
// Min, max, count, low, high
- for (Q_INT32 i = fromBin; i < toBin; i++) {
+ for (TQ_INT32 i = fromBin; i < toBin; i++) {
current = m_producer->getBinAt(channel, i);
double pos = static_cast<double>(i) / factor + from;
if (current > high)
@@ -194,22 +194,22 @@ void KisHistogram::dump() {
/* for( int i = 0; i <256; ++i ) {
kdDebug(DBG_AREA_MATH) << "Value "
- << QString().setNum(i)
+ << TQString().setNum(i)
<< ": "
- << QString().setNum(m_values[i])
+ << TQString().setNum(m_values[i])
<< "\n";
}*/
kdDebug(DBG_AREA_MATH) << "\n";
- kdDebug(DBG_AREA_MATH) << "Max: " << QString().setNum(c.getMax()) << "\n";
- kdDebug(DBG_AREA_MATH) << "Min: " << QString().setNum(c.getMin()) << "\n";
- kdDebug(DBG_AREA_MATH) << "High: " << QString().setNum(c.getHighest()) << "\n";
- kdDebug(DBG_AREA_MATH) << "Low: " << QString().setNum(c.getLowest()) << "\n";
+ kdDebug(DBG_AREA_MATH) << "Max: " << TQString().setNum(c.getMax()) << "\n";
+ kdDebug(DBG_AREA_MATH) << "Min: " << TQString().setNum(c.getMin()) << "\n";
+ kdDebug(DBG_AREA_MATH) << "High: " << TQString().setNum(c.getHighest()) << "\n";
+ kdDebug(DBG_AREA_MATH) << "Low: " << TQString().setNum(c.getLowest()) << "\n";
kdDebug(DBG_AREA_MATH) << "Mean: " << m_producer->positionToString(c.getMean()) << "\n";
- kdDebug(DBG_AREA_MATH) << "Total: " << QString().setNum(c.getTotal()) << "\n";
-// kdDebug(DBG_AREA_MATH) << "Median: " << QString().setNum(m_median) << "\n";
-// kdDebug(DBG_AREA_MATH) << "Stddev: " << QString().setNum(m_stddev) << "\n";
-// kdDebug(DBG_AREA_MATH) << "percentile: " << QString().setNum(m_percentile) << "\n";
+ kdDebug(DBG_AREA_MATH) << "Total: " << TQString().setNum(c.getTotal()) << "\n";
+// kdDebug(DBG_AREA_MATH) << "Median: " << TQString().setNum(m_median) << "\n";
+// kdDebug(DBG_AREA_MATH) << "Stddev: " << TQString().setNum(m_stddev) << "\n";
+// kdDebug(DBG_AREA_MATH) << "percentile: " << TQString().setNum(m_percentile) << "\n";
kdDebug(DBG_AREA_MATH) << "\n";
}