Commit 91c32ab0 authored by Casper Boemann's avatar Casper Boemann

bye bye a lot of Q3*

svn path=/trunk/koffice/; revision=542258
parent 859b0def
......@@ -18,7 +18,7 @@
#include <cfloat>
#include <QImage>
#include <q3valuevector.h>
#include <QVector>
#include <kdebug.h>
......@@ -56,7 +56,8 @@ KisAlphaMask::KisAlphaMask(qint32 width, qint32 height)
m_width = width;
m_height = height;
m_data.resize(width * height, OPACITY_TRANSPARENT);
m_data.clear();
m_data.insert(0, width * height, OPACITY_TRANSPARENT);
}
KisAlphaMask::~KisAlphaMask()
......
......@@ -19,7 +19,7 @@
#define KIS_ALPHA_MASK_
#include <QImage>
#include <q3valuevector.h>
#include <QVector>
#include <ksharedptr.h>
......@@ -90,7 +90,7 @@ private:
void computeAlpha(const QImage& img);
void copyAlpha(const QImage& img);
Q3ValueVector<quint8> m_data;
QVector<quint8> m_data;
qint32 m_width;
qint32 m_height;
};
......
......@@ -17,8 +17,7 @@
*/
#include <QPixmap>
#include <QPainter>
//Added by qt3to4:
#include <Q3ValueList>
#include <QList>
#include "kis_colorspace.h"
#include "kis_iterators_pixel.h"
......@@ -47,7 +46,7 @@ void KisBoundary::generateBoundary(int w, int h) {
bool darkTop;
bool darkBot;
m_horSegments.append(Q3ValueList<PointPair>());
m_horSegments.append(QList<PointPair>());
while (!topIt.isDone()) {
darkTop = cs->getAlpha(topIt.rawData());
......@@ -68,7 +67,7 @@ void KisBoundary::generateBoundary(int w, int h) {
bool darkLeft;
bool darkRight;
m_vertSegments.append(Q3ValueList<PointPair>());
m_vertSegments.append(QList<PointPair>());
while (!leftIt.isDone()) {
darkLeft = cs->getAlpha(leftIt.rawData());
......
......@@ -18,7 +18,7 @@
#ifndef _KIS_BOUNDARY_H_
#define _KIS_BOUNDARY_H_
#include <q3valuelist.h>
#include <QList>
#include <QPair>
#include <krita_export.h>
......@@ -45,8 +45,8 @@ private:
KisPaintDevice* m_device;
int m_fuzzyness;
typedef Q3ValueList<PointPair> PointPairList;
typedef Q3ValueList< PointPairList > PointPairListList;
typedef QList<PointPair> PointPairList;
typedef QList< PointPairList > PointPairListList;
PointPairListList m_horSegments;
PointPairListList m_vertSegments;
......
......@@ -20,12 +20,10 @@
#ifndef KIS_BRUSH_
#define KIS_BRUSH_
#include <q3cstring.h>
#include <QString>
#include <QSize>
#include <QImage>
#include <q3valuevector.h>
//Added by qt3to4:
#include <QVector>
#include <QPixmap>
#include <kio/job.h>
......@@ -174,7 +172,7 @@ private:
bool m_useColorAsMask;
bool m_hasColor;
QImage m_img;
mutable Q3ValueVector<ScaledBrush> m_scaledBrushes;
mutable QVector<ScaledBrush> m_scaledBrushes;
qint32 m_width;
qint32 m_height;
......
......@@ -34,8 +34,7 @@
#include <q3pointarray.h>
#include <QRect>
#include <QString>
//Added by qt3to4:
#include <Q3MemArray>
#include <QVector>
#include <kdebug.h>
#include <klocale.h>
......@@ -143,7 +142,7 @@ void KisConvolutionPainter::applyMatrix(KisKernelSP kernel, qint32 x, qint32 y,
// Iterate over all pixels in our rect, create a cache of pixels around the current pixel and convolve them in the colorstrategy.
Q3MemArray<quint8 *> pixelPtrCache(kw * kh);
QVector<quint8 *> pixelPtrCache(kw * kh);
// pixelPtrCache.fill(0);
// row == the y position of the pixel we want to change in the paint device
......@@ -236,7 +235,7 @@ void KisConvolutionPainter::applyMatrixRepeat(KisKernelSP kernel, qint32 x, qint
// Iterate over all pixels in our rect, create a cache of pixels around the current pixel and convolve them in the colorstrategy.
Q3MemArray<quint8 *> pixelPtrCache(kw * kh);
QVector<quint8 *> pixelPtrCache(kw * kh);
// row == the y position of the pixel we want to change in the paint device
int row = y;
......
......@@ -22,12 +22,10 @@
#include <qdom.h>
#include <q3cstring.h>
#include <QString>
//Added by qt3to4:
#include <Q3MemArray>
#include <QVector>
#include <krita_export.h>
typedef Q3MemArray<quint8> UByteArray;
typedef QVector<quint8> UByteArray;
struct KisExifRational {
quint32 numerator;
......@@ -91,7 +89,7 @@ class KRITAIMAGE_EXPORT ExifValue {
{
if(m_type == EXIF_TYPE_UNDEFINED)
{
((UByteArray*)m_value)->duplicate(data, size);
qCopy(data, data + size, ((UByteArray*)m_value)->begin());
m_components = size;
}
}
......
......@@ -17,7 +17,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <QString>
#include <q3ptrlist.h>
#include <kaction.h>
#include <kdebug.h>
......
......@@ -18,6 +18,7 @@
*/
#include <kdebug.h>
#include <QVector>
#include <QDateTime> // ### Debug
#include "kis_types.h"
......@@ -109,8 +110,8 @@ KisHistogram::Calculations KisHistogram::selectionCalculations() {
return m_selectionCalculations.at(m_channel);
}
Q3ValueVector<KisHistogram::Calculations> KisHistogram::calculateForRange(double from, double to) {
Q3ValueVector<Calculations> calculations;
QVector<KisHistogram::Calculations> KisHistogram::calculateForRange(double from, double to) {
QVector<Calculations> calculations;
uint count = m_producer->channels().count();
for (uint i = 0; i < count; i++) {
......
......@@ -19,6 +19,8 @@
#ifndef KIS_HISTOGRAM_
#define KIS_HISTOGRAM_
#include <QVector>
#include "kis_types.h"
#include "kis_colorspace.h"
#include "kis_histogram_producer.h"
......@@ -129,7 +131,7 @@ public:
private:
// Dump the histogram to debug.
void dump();
Q3ValueVector<Calculations> calculateForRange(double from, double to);
QVector<Calculations> calculateForRange(double from, double to);
Calculations calculateSingleRange(int channel, double from, double to);
KisPaintDeviceSP m_device;
......@@ -143,7 +145,7 @@ private:
KisPaintDeviceSP m_dev;
Q3ValueVector<Calculations> m_completeCalculations, m_selectionCalculations;
QVector<Calculations> m_completeCalculations, m_selectionCalculations;
};
......
......@@ -31,7 +31,7 @@
#include <QImage>
#include <QPoint>
#include <q3valuevector.h>
#include <QVector>
#include <QFile>
#include <QRegExp>
#include <QStringList>
......@@ -156,8 +156,8 @@ KisImagePipeBrush::KisImagePipeBrush(const QString& filename) : super(filename)
}
KisImagePipeBrush::KisImagePipeBrush(const QString& name, int w, int h,
Q3ValueVector< Q3ValueVector<KisPaintDevice*> > devices,
Q3ValueVector<KisPipeBrushParasite::SelectionMode> modes)
QVector< QVector<KisPaintDevice*> > devices,
QVector<KisPipeBrushParasite::SelectionMode> modes)
: super("")
{
Q_ASSERT(devices.count() == modes.count());
......@@ -186,8 +186,7 @@ KisImagePipeBrush::KisImagePipeBrush(const QString& name, int w, int h,
KisImagePipeBrush::~KisImagePipeBrush()
{
m_brushes.setAutoDelete(true);
m_brushes.clear();
qDeleteAll(m_brushes);
}
bool KisImagePipeBrush::load()
......@@ -300,7 +299,7 @@ bool KisImagePipeBrush::saveToDevice(QIODevice* dev) const
return false;
// <gbr brushes>
for (uint i = 0; i < m_brushes.count(); i++)
for (int i = 0; i < m_brushes.count(); i++)
if (!m_brushes.at(i)->saveToDevice(dev))
return false;
......@@ -360,7 +359,7 @@ bool KisImagePipeBrush::useColorAsMask() const
void KisImagePipeBrush::setUseColorAsMask(bool useColorAsMask)
{
for (uint i = 0; i < m_brushes.count(); i++) {
for (int i = 0; i < m_brushes.count(); i++) {
m_brushes.at(i)->setUseColorAsMask(useColorAsMask);
}
}
......@@ -421,7 +420,7 @@ bool KisImagePipeBrush::canPaintFor(const KisPaintInformation& info) {
}
void KisImagePipeBrush::makeMaskImage() {
for (uint i = 0; i < m_brushes.count(); i++)
for (int i = 0; i < m_brushes.count(); i++)
m_brushes.at(i)->makeMaskImage();
setBrushType(PIPE_MASK);
......@@ -432,17 +431,17 @@ KisImagePipeBrush* KisImagePipeBrush::clone() const {
// The obvious way of cloning each brush in this one doesn't work for some reason...
// XXX Multidimensionals not supported yet, change together with the constructor...
Q3ValueVector< Q3ValueVector<KisPaintDevice*> > devices;
Q3ValueVector<KisPipeBrushParasite::SelectionMode> modes;
QVector< QVector<KisPaintDevice*> > devices;
QVector<KisPipeBrushParasite::SelectionMode> modes;
devices.push_back(Q3ValueVector<KisPaintDevice*>());
devices.push_back(QVector<KisPaintDevice*>());
modes.push_back(m_parasite.selection[0]);
for (uint i = 0; i < m_brushes.count(); i++) {
for (int i = 0; i < m_brushes.count(); i++) {
KisPaintDevice* pd = new KisPaintDevice(
KisMetaRegistry::instance()->csRegistry()->getColorSpace(KisID("RGBA",""),""), "clone pd" );
pd->convertFromQImage(m_brushes.at(i)->img(), "");
devices.at(0).append(pd);
devices[0].append(pd);
}
KisImagePipeBrush* c = new KisImagePipeBrush(name(), width(), height(), devices, modes);
......
......@@ -19,9 +19,7 @@
#ifndef KIS_IMAGEPIPE_BRUSH_
#define KIS_IMAGEPIPE_BRUSH_
#include <q3ptrlist.h>
#include <q3valuelist.h>
#include <q3valuevector.h>
#include <QList>
#include <QMap>
#include <QString>
......@@ -108,8 +106,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,
Q3ValueVector< Q3ValueVector<KisPaintDevice*> > devices,
Q3ValueVector<KisPipeBrushParasite::SelectionMode> modes);
QVector< QVector<KisPaintDevice*> > devices,
QVector<KisPipeBrushParasite::SelectionMode> modes);
virtual ~KisImagePipeBrush();
virtual bool load();
......@@ -158,7 +156,7 @@ private:
mutable quint32 m_currentBrush;
QByteArray m_data;
mutable Q3PtrList<KisBrush> m_brushes;
mutable QList<KisBrush *> m_brushes;
enumBrushType m_brushType;
......
......@@ -21,7 +21,7 @@
#include <QImage>
#include <QDateTime>
#include <QApplication>
#include <q3valuelist.h>
#include <QList>
#include <QTimer>
#include <kcommand.h>
......@@ -306,8 +306,8 @@ KisPaintDevice::~KisPaintDevice()
{
delete m_dcop;
delete m_longRunningFilterTimer;
Q3ValueList<KisFilter*>::iterator it;
Q3ValueList<KisFilter*>::iterator end = m_longRunningFilters.end();
QList<KisFilter*>::iterator it;
QList<KisFilter*>::iterator end = m_longRunningFilters.end();
for (it = m_longRunningFilters.begin(); it != end; ++it) {
KisFilter * f = (*it);
delete f;
......@@ -1146,8 +1146,8 @@ void KisPaintDevice::runBackgroundFilters()
{
QRect rc = exactBounds();
if (!m_longRunningFilters.isEmpty()) {
Q3ValueList<KisFilter*>::iterator it;
Q3ValueList<KisFilter*>::iterator end = m_longRunningFilters.end();
QList<KisFilter*>::iterator it;
QList<KisFilter*>::iterator end = m_longRunningFilters.end();
for (it = m_longRunningFilters.begin(); it != end; ++it) {
(*it)->process(KisPaintDeviceSP(this), KisPaintDeviceSP(this), 0, rc);
}
......
......@@ -21,9 +21,8 @@
#include <QColor>
#include <QObject>
#include <QPixmap>
#include <q3ptrlist.h>
#include <QRect>
#include <q3valuelist.h>
#include <QList>
#include <QString>
#include "kis_types.h"
......@@ -545,7 +544,7 @@ private:
KisExifInfo* m_exifInfo;
Q3ValueList<KisFilter*> m_longRunningFilters;
QList<KisFilter*> m_longRunningFilters;
QTimer * m_longRunningFilterTimer;
};
......
......@@ -167,7 +167,7 @@ public:
/**
* Paint a line that connects the dots in points
*/
void paintPolyline(const Q3ValueVector <KisPoint> &points,
void paintPolyline(const QVector <KisPoint> &points,
int index = 0, int numPoints = -1);
/**
......
......@@ -29,7 +29,7 @@
#include <QImage>
#include <QPoint>
#include <q3valuevector.h>
#include <QVector>
#include <QFile>
#include <QTextStream>
......@@ -273,8 +273,8 @@ void KisPalette::add(const KisPaletteEntry & c)
void KisPalette::remove(const KisPaletteEntry & c)
{
Q3ValueVector<KisPaletteEntry>::iterator it = m_colors.begin();
Q3ValueVector<KisPaletteEntry>::iterator end = m_colors.end();
QVector<KisPaletteEntry>::iterator it = m_colors.begin();
QVector<KisPaletteEntry>::iterator end = m_colors.end();
while (it != end) {
if ((*it) == c) {
......
......@@ -20,8 +20,7 @@
#include <QImage>
#include <QColor>
#include <q3valuevector.h>
//Added by qt3to4:
#include <QVector>
#include <QPixmap>
#include <kio/job.h>
......@@ -107,7 +106,7 @@ private:
QString m_name;
QString m_comment;
qint32 m_columns;
Q3ValueVector<KisPaletteEntry> m_colors;
QVector<KisPaletteEntry> m_colors;
};
#endif // KIS_PALETTE_
......
......@@ -18,7 +18,7 @@
#ifndef KIS_POINT_H_
#define KIS_POINT_H_
#include <q3valuevector.h>
#include <QVector>
#include <KoPoint.h>
/**
......@@ -42,7 +42,7 @@ public:
QPoint roundQPoint() const { return QPoint(qRound(x()), qRound(y())); }
};
typedef Q3ValueVector<KisPoint> vKisPoint;
typedef QVector<KisPoint> vKisPoint;
#endif // KIS_POINT_H_
......@@ -17,8 +17,7 @@
*/
#include <QImage>
//Added by qt3to4:
#include <Q3MemArray>
#include <QVector>
#include <kdebug.h>
#include <klocale.h>
......@@ -186,7 +185,7 @@ void KisSelection::paintUniformSelectionRegion(QImage img, const QRect& imageRec
QRegion region = uniformRegion & QRegion(imageRect);
if (!region.isEmpty()) {
Q3MemArray<QRect> rects = region.rects();
QVector<QRect> rects = region.rects();
for (unsigned int i = 0; i < rects.count(); i++) {
QRect r = rects[i];
......
......@@ -18,7 +18,7 @@
#ifndef KISTYPES_H_
#define KISTYPES_H_
#include <q3valuevector.h>
#include <QVector>
#include <QMap>
#include <QPoint>
......@@ -73,7 +73,7 @@ typedef KSharedPtr<KisHistogram> KisHistogramSP;
class KisPaintOpFactory;
typedef KSharedPtr<KisPaintOpFactory> KisPaintOpFactorySP;
typedef Q3ValueVector<QPoint> vKisSegments;
typedef QVector<QPoint> vKisSegments;
//class KisGuide;
//typedef KSharedPtr<KisGuide> KisGuideSP;
......
......@@ -29,6 +29,7 @@
#endif
#include <QPainter>
//Added by qt3to4:
#include <Q3ValueVector>
#include <QWheelEvent>
#include <QPaintEvent>
#include <QKeyEvent>
......
......@@ -127,8 +127,8 @@ void KisCustomBrush::createBrush() {
}
// For each layer in the current image, create a new image, and add it to the list
Q3ValueVector< Q3ValueVector<KisPaintDevice*> > devices;
devices.push_back(Q3ValueVector<KisPaintDevice*>());
QVector< QVector<KisPaintDevice*> > devices;
devices.push_back(QVector<KisPaintDevice*>());
int w = img->width();
int h = img->height();
......@@ -138,10 +138,10 @@ void KisCustomBrush::createBrush() {
while (layer) {
KisPaintLayer* paint = 0;
if (layer->visible() && (paint = dynamic_cast<KisPaintLayer*>(layer)))
devices.at(0).push_back(paint->paintDevice().data());
devices[0].push_back(paint->paintDevice().data());
layer = layer->nextSibling().data();
}
Q3ValueVector<KisPipeBrushParasite::SelectionMode> modes;
QVector<KisPipeBrushParasite::SelectionMode> modes;
switch(comboBox2->currentIndex()) {
case 0: modes.push_back(KisPipeBrushParasite::Constant); break;
......
......@@ -226,7 +226,7 @@
<item row="2" column="0" >
<widget class="QGroupBox" name="grpImage" >
<property name="title" >
<string>&amp;Image Size</string>
<string>Image Size</string>
</property>
<layout class="QGridLayout" >
<property name="margin" >
......@@ -283,7 +283,7 @@
<item row="1" column="0" >
<widget class="QLabel" name="lblHeight" >
<property name="text" >
<string>&amp;Height:</string>
<string>Hei&amp;ght:</string>
</property>
<property name="buddy" >
<cstring></cstring>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment