Commit b9f6596f authored by Laurent Montel's avatar Laurent Montel 😁

qt3to4

svn path=/trunk/koffice/; revision=523032
parent 6c9a8a58
......@@ -52,7 +52,7 @@ public:
public:
virtual QValueVector<KisChannelInfo *> channels() const;
virtual Q3ValueVector<KisChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 pixelSize() const;
......
......@@ -59,7 +59,7 @@ public:
virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
// XXX: darken & intensity8?
virtual QValueVector<KisChannelInfo *> channels() const;
virtual Q3ValueVector<KisChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 pixelSize() const;
......
......@@ -55,7 +55,7 @@ public:
virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
virtual QValueVector<KisChannelInfo *> channels() const;
virtual Q3ValueVector<KisChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 pixelSize() const;
......
......@@ -51,7 +51,7 @@ public:
virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const;
virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
virtual QValueVector<KisChannelInfo *> channels() const;
virtual Q3ValueVector<KisChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 pixelSize() const;
......
......@@ -59,7 +59,7 @@ public:
virtual Q_UINT8 difference(const Q_UINT8 *src1, const Q_UINT8 *src2);
virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
virtual QValueVector<KisChannelInfo *> channels() const;
virtual Q3ValueVector<KisChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 pixelSize() const;
......
......@@ -59,7 +59,7 @@ public:
virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
virtual QValueVector<KisChannelInfo *> channels() const;
virtual Q3ValueVector<KisChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 pixelSize() const;
......
......@@ -62,7 +62,7 @@ public:
virtual void convolveColors(Q_UINT8** colors, Q_INT32 * kernelValues, KisChannelInfo::enumChannelFlags channelFlags, Q_UINT8 *dst, Q_INT32 factor, Q_INT32 offset, Q_INT32 nColors) const;
virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
virtual QValueVector<KisChannelInfo *> channels() const;
virtual Q3ValueVector<KisChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 pixelSize() const;
......
......@@ -60,7 +60,7 @@ public:
virtual void invertColor(Q_UINT8 * src, Q_INT32 nPixels);
virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
virtual QValueVector<KisChannelInfo *> channels() const;
virtual Q3ValueVector<KisChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 pixelSize() const;
......
......@@ -280,15 +280,15 @@ void compositeXor(Q_INT32 pixelSize,
red=((double) (UINT8_MAX -sAlpha)*dAlpha*
s[PIXEL_RED]/UINT8_MAX +(double) (UINT8_MAX -dAlpha)*
sAlpha*d[PIXEL_RED]/UINT8_MAX )/alpha ;
d[PIXEL_RED]=RoundSignedToQuantum(red);
d[PIXEL_RED]=RoundSignedToQuantum(Qt::red);
green=((double) (UINT8_MAX -sAlpha)*dAlpha*
s[PIXEL_GREEN]/UINT8_MAX +(double) (UINT8_MAX -dAlpha)*
sAlpha*d[PIXEL_GREEN]/UINT8_MAX )/alpha ;
d[PIXEL_GREEN]=RoundSignedToQuantum(green);
d[PIXEL_GREEN]=RoundSignedToQuantum(Qt::green);
blue=((double) (UINT8_MAX -sAlpha)*dAlpha*
s[PIXEL_BLUE]/UINT8_MAX +(double) (UINT8_MAX -dAlpha)*
sAlpha*d[PIXEL_BLUE]/UINT8_MAX )/alpha ;
d[PIXEL_BLUE]=RoundSignedToQuantum(blue);
d[PIXEL_BLUE]=RoundSignedToQuantum(Qt::blue);
d[PIXEL_ALPHA]=UINT8_MAX -RoundSignedToQuantum(alpha );
}
dst += dstRowSize;
......@@ -327,13 +327,13 @@ void compositePlus(Q_INT32 pixelSize,
red=((double) (UINT8_MAX -sAlpha)*s[PIXEL_RED]+(double)
(UINT8_MAX -dAlpha)*d[PIXEL_RED])/UINT8_MAX ;
d[PIXEL_RED]=RoundSignedToQuantum(red);
d[PIXEL_RED]=RoundSignedToQuantum(Qt::red);
green=((double) (UINT8_MAX -sAlpha)*s[PIXEL_GREEN]+(double)
(UINT8_MAX -dAlpha)*d[PIXEL_GREEN])/UINT8_MAX ;
d[PIXEL_GREEN]=RoundSignedToQuantum(green);
d[PIXEL_GREEN]=RoundSignedToQuantum(Qt::green);
blue=((double) (UINT8_MAX -sAlpha)*s[PIXEL_BLUE]+(double)
(UINT8_MAX -dAlpha)*d[PIXEL_BLUE])/UINT8_MAX ;
d[PIXEL_BLUE]=RoundSignedToQuantum(blue);
d[PIXEL_BLUE]=RoundSignedToQuantum(Qt::blue);
alpha =((double) (UINT8_MAX -sAlpha)+
(double) (UINT8_MAX -dAlpha))/UINT8_MAX ;
d[PIXEL_ALPHA]=UINT8_MAX -RoundSignedToQuantum(alpha );
......@@ -374,13 +374,13 @@ void compositeMinus(Q_INT32 pixelSize,
red=((double) (UINT8_MAX -dAlpha)*d[PIXEL_RED]-
(double) (UINT8_MAX -sAlpha)*s[PIXEL_RED])/UINT8_MAX ;
d[PIXEL_RED]=RoundSignedToQuantum(red);
d[PIXEL_RED]=RoundSignedToQuantum(Qt::red);
green=((double) (UINT8_MAX -dAlpha)*d[PIXEL_GREEN]-
(double) (UINT8_MAX -sAlpha)*s[PIXEL_GREEN])/UINT8_MAX ;
d[PIXEL_GREEN]=RoundSignedToQuantum(green);
d[PIXEL_GREEN]=RoundSignedToQuantum(Qt::green);
blue=((double) (UINT8_MAX -dAlpha)*d[PIXEL_BLUE]-
(double) (UINT8_MAX -sAlpha)*s[PIXEL_BLUE])/UINT8_MAX ;
d[PIXEL_BLUE]=RoundSignedToQuantum(blue);
d[PIXEL_BLUE]=RoundSignedToQuantum(Qt::blue);
alpha =((double) (UINT8_MAX -dAlpha)-
(double) (UINT8_MAX -sAlpha))/UINT8_MAX ;
d[PIXEL_ALPHA]=UINT8_MAX -RoundSignedToQuantum(alpha );
......
......@@ -50,7 +50,7 @@ public:
virtual void darken(const Q_UINT8 * src, Q_UINT8 * dst, Q_INT32 shade, bool compensate, double compensation, Q_INT32 nPixels) const;
virtual Q_UINT8 intensity8(const Q_UINT8 * src) const;
virtual QValueVector<KisChannelInfo *> channels() const;
virtual Q3ValueVector<KisChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 pixelSize() const;
......
......@@ -20,7 +20,7 @@
#include <qcolor.h>
#include <qstringlist.h>
#include <qvaluelist.h>
#include <q3valuelist.h>
#include <qmap.h>
#include "kis_global.h"
......@@ -128,7 +128,7 @@ public:
virtual void mixColors(const Q_UINT8 **colors, const Q_UINT8 *weights, Q_UINT32 nColors, Q_UINT8 *dst) const;
virtual QValueVector<KisChannelInfo *> channels() const;
virtual Q3ValueVector<KisChannelInfo *> channels() const;
virtual Q_UINT32 nChannels() const;
virtual Q_UINT32 nColorChannels() const;
virtual Q_UINT32 nSubstanceChannels() const;
......@@ -142,7 +142,7 @@ public:
Q_INT32 renderingIntent = INTENT_PERCEPTUAL,
float exposure = 0.0f);
virtual QValueList<KisFilter*> createBackgroundFilters();
virtual Q3ValueList<KisFilter*> createBackgroundFilters();
virtual KisCompositeOpList userVisiblecompositeOps() const;
......
......@@ -21,6 +21,9 @@
#include "qwidget.h"
#include "qpushbutton.h"
//Added by qt3to4:
#include <QLabel>
#include <Q3GridLayout>
#include "kis_canvas_subject.h"
#include "kis_canvas_observer.h"
......@@ -28,7 +31,7 @@
#include <koffice_export.h>
class KoFrameButton;
class QGridLayout;
class Q3GridLayout;
class QColor;
class QLabel;
class QSpinBox;
......
......@@ -44,9 +44,9 @@ namespace WetAndSticky {
* Defines the contents and attributes of a cell on the canvas.
*/
typedef struct cell {
Q_UINT8 blue;
Q_UINT8 green;
Q_UINT8 red;
Q_UINT8 Qt::blue;
Q_UINT8 Qt::green;
Q_UINT8 Qt::red;
Q_UINT8 alpha;
float hue;
......@@ -94,7 +94,7 @@ public:
virtual Q_UINT8 scaleToU8(const Q_UINT8 * srcPixel, Q_INT32 channelPos);
virtual Q_UINT16 scaleToU16(const Q_UINT8 * srcPixel, Q_INT32 channelPos);
virtual QValueVector<KisChannelInfo *> channels() const;
virtual Q3ValueVector<KisChannelInfo *> channels() const;
virtual bool hasAlpha() const;
virtual Q_INT32 nChannels() const;
virtual Q_INT32 nColorChannels() const;
......
......@@ -40,7 +40,7 @@
<cstring>lblDirection</cstring>
</property>
<property name="text">
<string>Direction:</string>
<string>Qt::Orientation:</string>
</property>
<property name="buddy" stdset="0">
<cstring>intDryingRate</cstring>
......@@ -54,7 +54,7 @@
</item>
<item>
<property name="text">
<string>Right</string>
<string>Qt::DockRight</string>
</property>
</item>
<item>
......@@ -64,7 +64,7 @@
</item>
<item>
<property name="text">
<string>Left</string>
<string>Qt::DockLeft</string>
</property>
</item>
<property name="name">
......
......@@ -19,7 +19,7 @@
#define KIS_ALPHA_MASK_
#include <qimage.h>
#include <qvaluevector.h>
#include <q3valuevector.h>
#include <ksharedptr.h>
......@@ -89,7 +89,7 @@ private:
void computeAlpha(const QImage& img);
void copyAlpha(const QImage& img);
QValueVector<Q_UINT8> m_data;
Q3ValueVector<Q_UINT8> m_data;
Q_INT32 m_width;
Q_INT32 m_height;
};
......
......@@ -32,8 +32,8 @@ public:
void createSegment( int interpolation, int colorInterpolation, double startOffset, double endOffset, double middleOffset, QColor left, QColor right );
const QValueVector<double> getHandlePositions() const;
const QValueVector<double> getMiddleHandlePositions() const;
const Q3ValueVector<double> getHandlePositions() const;
const Q3ValueVector<double> getMiddleHandlePositions() const;
/**
* Moves the StartOffset of the specified segment to the specified value
......
......@@ -18,7 +18,7 @@
#ifndef _KIS_BOUNDARY_H_
#define _KIS_BOUNDARY_H_
#include <qvaluelist.h>
#include <q3valuelist.h>
#include <qpair.h>
#include <koffice_export.h>
......@@ -45,8 +45,8 @@ private:
KisPaintDevice* m_device;
int m_fuzzyness;
typedef QValueList<PointPair> PointPairList;
typedef QValueList< PointPairList > PointPairListList;
typedef Q3ValueList<PointPair> PointPairList;
typedef Q3ValueList< PointPairList > PointPairListList;
PointPairListList m_horSegments;
PointPairListList m_vertSegments;
......
......@@ -20,11 +20,13 @@
#ifndef KIS_BRUSH_
#define KIS_BRUSH_
#include <qcstring.h>
#include <q3cstring.h>
#include <qstring.h>
#include <qsize.h>
#include <qimage.h>
#include <qvaluevector.h>
#include <q3valuevector.h>
//Added by qt3to4:
#include <QPixmap>
#include <kio/job.h>
......@@ -172,7 +174,7 @@ private:
bool m_useColorAsMask;
bool m_hasColor;
QImage m_img;
mutable QValueVector<ScaledBrush> m_scaledBrushes;
mutable Q3ValueVector<ScaledBrush> m_scaledBrushes;
Q_INT32 m_width;
Q_INT32 m_height;
......
......@@ -19,7 +19,7 @@
#define KIS_DATAMANAGER_H_
#include <qglobal.h>
#include <qvaluevector.h>
#include <q3valuevector.h>
#include <qrect.h>
class KoStore;
......
......@@ -22,10 +22,12 @@
#include <qdom.h>
#include <qcstring.h>
#include <q3cstring.h>
#include <qstring.h>
//Added by qt3to4:
#include <Q3MemArray>
typedef QMemArray<Q_UINT8> UByteArray;
typedef Q3MemArray<Q_UINT8> UByteArray;
struct KisExifRational {
Q_UINT32 numerator;
......
......@@ -32,7 +32,7 @@ class KisFilterConfigWidget : public QWidget {
public:
KisFilterConfigWidget(QWidget * parent, const char * name = 0, WFlags f = 0 );
KisFilterConfigWidget(QWidget * parent, const char * name = 0, Qt::WFlags f = 0 );
virtual ~KisFilterConfigWidget();
virtual void setConfiguration(KisFilterConfiguration * config) = 0;
......
......@@ -24,7 +24,7 @@
#ifndef KIS_GRADIENT_H
#define KIS_GRADIENT_H
#include <qvaluevector.h>
#include <q3valuevector.h>
#include <qcolor.h>
#include <kio/job.h>
......@@ -250,7 +250,7 @@ protected:
inline void pushSegment( KisGradientSegment* segment ) { m_segments.push_back(segment); };
void setImage(const QImage& img);
QValueVector<KisGradientSegment *> m_segments;
Q3ValueVector<KisGradientSegment *> m_segments;
private:
bool init();
......
......@@ -129,7 +129,7 @@ public:
private:
// Dump the histogram to debug.
void dump();
QValueVector<Calculations> calculateForRange(double from, double to);
Q3ValueVector<Calculations> calculateForRange(double from, double to);
Calculations calculateSingleRange(int channel, double from, double to);
KisPaintDeviceSP m_device;
......@@ -143,7 +143,7 @@ private:
KisPaintDeviceSP m_dev;
QValueVector<Calculations> m_completeCalculations, m_selectionCalculations;
Q3ValueVector<Calculations> m_completeCalculations, m_selectionCalculations;
};
......
......@@ -20,7 +20,7 @@
#include <qobject.h>
#include <qstring.h>
#include <qvaluevector.h>
#include <q3valuevector.h>
#include <qmutex.h>
#include <config.h>
......
......@@ -19,11 +19,13 @@
#ifndef KIS_IMAGEPIPE_BRUSH_
#define KIS_IMAGEPIPE_BRUSH_
#include <qptrlist.h>
#include <qvaluelist.h>
#include <qvaluevector.h>
#include <q3ptrlist.h>
#include <q3valuelist.h>
#include <q3valuevector.h>
#include <qmap.h>
#include <qstring.h>
//Added by qt3to4:
#include <Q3CString>
#include <kio/job.h>
......@@ -31,7 +33,7 @@
#include "kis_brush.h"
#include "kis_global.h"
class QCString;
class Q3CString;
class QImage;
class QPoint;
class QSize;
......@@ -109,8 +111,8 @@ public:
* devices. The fact that it's a vector of a vector, is to support multidimensional
* brushes (not yet supported!) */
KisImagePipeBrush(const QString& name, int w, int h,
QValueVector< QValueVector<KisPaintDevice*> > devices,
QValueVector<KisPipeBrushParasite::SelectionMode> modes);
Q3ValueVector< Q3ValueVector<KisPaintDevice*> > devices,
Q3ValueVector<KisPipeBrushParasite::SelectionMode> modes);
virtual ~KisImagePipeBrush();
virtual bool load();
......@@ -159,7 +161,7 @@ private:
mutable Q_UINT32 m_currentBrush;
QByteArray m_data;
mutable QPtrList<KisBrush> m_brushes;
mutable Q3PtrList<KisBrush> m_brushes;
enumBrushType m_brushType;
......
......@@ -26,6 +26,8 @@
#include "kis_basic_math_toolbox.h"
#include "kis_iterators_pixel.h"
//Added by qt3to4:
#include <Q3MemArray>
KisMathToolbox::KisMathToolbox(KisID id) : m_id(id)
......@@ -63,8 +65,8 @@ typedef void (*PtrFromDouble)(Q_UINT8*, int, double);
void KisMathToolbox::transformToFR(KisPaintDeviceSP src, KisFloatRepresentation* fr, const QRect& rect)
{
Q_INT32 depth = src->colorSpace()->nColorChannels();
QMemArray<PtrToDouble> f(depth);
QValueVector<KisChannelInfo *> cis = src->colorSpace()->channels();
Q3MemArray<PtrToDouble> f(depth);
Q3ValueVector<KisChannelInfo *> cis = src->colorSpace()->channels();
for(Q_INT32 k = 0; k < depth; k++)
{
switch( cis[k]->channelValueType() )
......@@ -115,8 +117,8 @@ void KisMathToolbox::transformToFR(KisPaintDeviceSP src, KisFloatRepresentation*
void KisMathToolbox::transformFromFR(KisPaintDeviceSP dst, KisFloatRepresentation* fr, const QRect& rect)
{
Q_INT32 depth = dst->colorSpace()->nColorChannels();
QMemArray<PtrFromDouble> f(depth);
QValueVector<KisChannelInfo *> cis = dst->colorSpace()->channels();
Q3MemArray<PtrFromDouble> f(depth);
Q3ValueVector<KisChannelInfo *> cis = dst->colorSpace()->channels();
for(Q_INT32 k = 0; k < depth; k++)
{
switch( cis[k]->channelValueType() )
......
......@@ -21,9 +21,9 @@
#include <qcolor.h>
#include <qobject.h>
#include <qpixmap.h>
#include <qptrlist.h>
#include <q3ptrlist.h>
#include <qrect.h>
#include <qvaluelist.h>
#include <q3valuelist.h>
#include <qstring.h>
#include "kis_types.h"
......@@ -40,7 +40,7 @@ class DCOPObject;
class QImage;
class QSize;
class QPoint;
class QWMatrix;
class QMatrix;
class QTimer;
class KNamedCommand;
......@@ -545,7 +545,7 @@ private:
KisExifInfo* m_exifInfo;
QValueList<KisFilter*> m_longRunningFilters;
Q3ValueList<KisFilter*> m_longRunningFilters;
QTimer * m_longRunningFilterTimer;
};
......
......@@ -167,7 +167,7 @@ public:
/**
* Paint a line that connects the dots in points
*/
void paintPolyline(const QValueVector <KisPoint> &points,
void paintPolyline(const Q3ValueVector <KisPoint> &points,
int index = 0, int numPoints = -1);
/**
......
......@@ -20,7 +20,9 @@
#include <qimage.h>
#include <qcolor.h>
#include <qvaluevector.h>
#include <q3valuevector.h>
//Added by qt3to4:
#include <QPixmap>
#include <kio/job.h>
#include <kpalette.h>
......@@ -105,7 +107,7 @@ private:
QString m_name;
QString m_comment;
Q_INT32 m_columns;
QValueVector<KisPaletteEntry> m_colors;
Q3ValueVector<KisPaletteEntry> m_colors;
};
#endif // KIS_PALETTE_
......
......@@ -18,7 +18,7 @@
#ifndef KIS_POINT_H_
#define KIS_POINT_H_
#include <qvaluevector.h>
#include <q3valuevector.h>
#include <KoPoint.h>
/**
......@@ -42,7 +42,7 @@ public:
QPoint roundQPoint() const { return QPoint(qRound(x()), qRound(y())); }
};
typedef QValueVector<KisPoint> vKisPoint;
typedef Q3ValueVector<KisPoint> vKisPoint;
#endif // KIS_POINT_H_
......@@ -20,7 +20,7 @@
#define KIS_THREAD_POOL_
#include <qthread.h>
#include <qptrlist.h>
#include <q3ptrlist.h>
#include <qmutex.h>
#include "kis_thread.h"
......@@ -59,9 +59,9 @@ private:
int m_numberOfQueuedThreads;
int m_maxThreads;
int m_wait;
QPtrList<KisThread> m_threads;
QPtrList<KisThread> m_runningThreads;
QPtrList<KisThread> m_oldThreads;
Q3PtrList<KisThread> m_threads;
Q3PtrList<KisThread> m_runningThreads;
Q3PtrList<KisThread> m_oldThreads;
static KisThreadPool * m_singleton;
};
......