diff options
Diffstat (limited to 'krita/ui/kis_doc.cc')
-rw-r--r-- | krita/ui/kis_doc.cc | 250 |
1 files changed, 125 insertions, 125 deletions
diff --git a/krita/ui/kis_doc.cc b/krita/ui/kis_doc.cc index 7ae27bde..2a7d1300 100644 --- a/krita/ui/kis_doc.cc +++ b/krita/ui/kis_doc.cc @@ -19,15 +19,15 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -// Qt -#include <qapplication.h> -#include <qdom.h> -#include <qimage.h> -#include <qpainter.h> -#include <qtl.h> -#include <qstringlist.h> -#include <qwidget.h> -#include <qpaintdevicemetrics.h> +// TQt +#include <tqapplication.h> +#include <tqdom.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqtl.h> +#include <tqstringlist.h> +#include <tqwidget.h> +#include <tqpaintdevicemetrics.h> // KDE #include <dcopobject.h> @@ -103,8 +103,8 @@ namespace { public: KisCommandImageMv(KisDoc *doc, KisUndoAdapter *adapter, - const QString& name, - const QString& oldName) : super(i18n("Rename Image"), adapter) + const TQString& name, + const TQString& oldName) : super(i18n("Rename Image"), adapter) { m_doc = doc; m_name = name; @@ -131,14 +131,14 @@ namespace { private: KisDoc *m_doc; - QString m_name; - QString m_oldName; + TQString m_name; + TQString m_oldName; }; } -KisDoc::KisDoc(QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name, bool singleViewMode) : - super(parentWidget, widgetName, parent, name, singleViewMode) +KisDoc::KisDoc(TQWidget *tqparentWidget, const char *widgetName, TQObject *tqparent, const char *name, bool singleViewMode) : + super(tqparentWidget, widgetName, tqparent, name, singleViewMode) { m_undo = false; @@ -168,7 +168,7 @@ KisDoc::~KisDoc() delete m_dcop; } -QCString KisDoc::mimeType() const +TQCString KisDoc::mimeType() const { return APP_MIMETYPE; } @@ -182,14 +182,14 @@ DCOPObject *KisDoc::dcopObject() return m_dcop; } -bool KisDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) +bool KisDoc::initDoc(InitDocFlags flags, TQWidget* tqparentWidget) { if (!init()) return false; bool ok = false; - QString file; + TQString file; KoTemplateChooseDia::DialogType dlgtype; if (flags != KoDocument::InitDocFileNew) { @@ -203,7 +203,7 @@ bool KisDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) file, dlgtype, "krita_template", - parentWidget); + tqparentWidget); setUndo(false); if (ret == KoTemplateChooseDia::Template) { @@ -227,7 +227,7 @@ bool KisDoc::initDoc(InitDocFlags flags, QWidget* parentWidget) return ok; } -void KisDoc::openExistingFile(const QString& file) +void KisDoc::openExistingFile(const TQString& file) { setUndo(false); @@ -236,7 +236,7 @@ void KisDoc::openExistingFile(const QString& file) setUndo(true); } -void KisDoc::openTemplate(const QString& file) +void KisDoc::openTemplate(const TQString& file) { setUndo(false); @@ -260,8 +260,8 @@ bool KisDoc::init() m_cmdHistory = new KoCommandHistory(actionCollection(), true); Q_CHECK_PTR(m_cmdHistory); - connect(m_cmdHistory, SIGNAL(documentRestored()), this, SLOT(slotDocumentRestored())); - connect(m_cmdHistory, SIGNAL(commandExecuted(KCommand *)), this, SLOT(slotCommandExecuted(KCommand *))); + connect(m_cmdHistory, TQT_SIGNAL(documentRestored()), this, TQT_SLOT(slotDocumentRestored())); + connect(m_cmdHistory, TQT_SIGNAL(commandExecuted(KCommand *)), this, TQT_SLOT(slotCommandExecuted(KCommand *))); setUndo(true); m_nserver = new KisNameServer(i18n("Image %1"), 1); @@ -277,13 +277,13 @@ bool KisDoc::init() return true; } -QDomDocument KisDoc::saveXML() +TQDomDocument KisDoc::saveXML() { - QDomDocument doc = createDomDocument("DOC", CURRENT_DTD_VERSION); - QDomElement root = doc.documentElement(); + TQDomDocument doc = createDomDocument("DOC", CURRENT_DTD_VERSION); + TQDomElement root = doc.documentElement(); root.setAttribute("editor", "Krita"); - root.setAttribute("depth", sizeof(Q_UINT8)); + root.setAttribute("depth", sizeof(TQ_UINT8)); root.setAttribute("syntaxVersion", "1"); root.appendChild(saveImage(doc, m_currentImage)); @@ -291,7 +291,7 @@ QDomDocument KisDoc::saveXML() return doc; } -bool KisDoc::loadOasis( const QDomDocument&, KoOasisStyles&, const QDomDocument&, KoStore* ) +bool KisDoc::loadOasis( const TQDomDocument&, KoOasisStyles&, const TQDomDocument&, KoStore* ) { //XXX: todo (and that includes defining an OASIS format for layered 2D raster data!) return false; @@ -304,11 +304,11 @@ bool KisDoc::saveOasis( KoStore*, KoXmlWriter* ) return false; } -bool KisDoc::loadXML(QIODevice *, const QDomDocument& doc) +bool KisDoc::loadXML(TQIODevice *, const TQDomDocument& doc) { - QDomElement root; - QString attr; - QDomNode node; + TQDomElement root; + TQString attr; + TQDomNode node; KisImageSP img; if (!init()) @@ -332,7 +332,7 @@ bool KisDoc::loadXML(QIODevice *, const QDomDocument& doc) for (node = root.firstChild(); !node.isNull(); node = node.nextSibling()) { if (node.isElement()) { if (node.nodeName() == "IMAGE") { - QDomElement elem = node.toElement(); + TQDomElement elem = node.toElement(); if (!(img = loadImage(elem))) return false; m_currentImage = img; @@ -347,7 +347,7 @@ bool KisDoc::loadXML(QIODevice *, const QDomDocument& doc) } bool KisDoc::loadChildren(KoStore* store) { - QPtrListIterator<KoDocumentChild> it(children()); + TQPtrListIterator<KoDocumentChild> it(tqchildren()); for( ; it.current(); ++it ) { if (!it.current()->loadDocument(store)) { return false; @@ -356,9 +356,9 @@ bool KisDoc::loadChildren(KoStore* store) { return true; } -QDomElement KisDoc::saveImage(QDomDocument& doc, KisImageSP img) +TQDomElement KisDoc::saveImage(TQDomDocument& doc, KisImageSP img) { - QDomElement image = doc.createElement("IMAGE"); + TQDomElement image = doc.createElement("IMAGE"); Q_ASSERT(img); image.setAttribute("name", img->name()); @@ -373,7 +373,7 @@ QDomElement KisDoc::saveImage(QDomDocument& doc, KisImageSP img) image.setAttribute("x-res", img->xRes()); image.setAttribute("y-res", img->yRes()); - Q_UINT32 count=0; + TQ_UINT32 count=0; KisSaveXmlVisitor visitor(doc, image, count, true); m_currentImage->rootLayer()->accept(visitor); @@ -381,22 +381,22 @@ QDomElement KisDoc::saveImage(QDomDocument& doc, KisImageSP img) return image; } -KisImageSP KisDoc::loadImage(const QDomElement& element) +KisImageSP KisDoc::loadImage(const TQDomElement& element) { KisConfig cfg; - QString attr; - QDomNode node; - QDomNode child; + TQString attr; + TQDomNode node; + TQDomNode child; KisImageSP img; - QString name; - Q_INT32 width; - Q_INT32 height; - QString description; - QString profileProductName; + TQString name; + TQ_INT32 width; + TQ_INT32 height; + TQString description; + TQString profileProductName; double xres; double yres; - QString colorspacename; + TQString colorspacename; KisColorSpace * cs; if ((attr = element.attribute("mime")) == NATIVE_MIMETYPE) { @@ -447,7 +447,7 @@ KisImageSP KisDoc::loadImage(const QDomElement& element) img = new KisImage(this, width, height, cs, name); img->blockSignals(true); // Don't send out signals while we're building the image Q_CHECK_PTR(img); - connect( img, SIGNAL( sigImageModified() ), this, SLOT( slotImageUpdated() )); + connect( img, TQT_SIGNAL( sigImageModified() ), this, TQT_SLOT( slotImageUpdated() )); img->setDescription(description); img->setResolution(xres, yres); @@ -460,10 +460,10 @@ KisImageSP KisDoc::loadImage(const QDomElement& element) return img; } -void KisDoc::loadLayers(const QDomElement& element, KisImageSP img, KisGroupLayerSP parent) +void KisDoc::loadLayers(const TQDomElement& element, KisImageSP img, KisGroupLayerSP tqparent) { - QDomNode node = element.firstChild(); - QDomNode child; + TQDomNode node = element.firstChild(); + TQDomNode child; if(!node.isNull()) { @@ -477,7 +477,7 @@ void KisDoc::loadLayers(const QDomElement& element, KisImageSP img, KisGroupLaye } else { img->nextLayerName(); // Make sure the nameserver is current with the number of layers. - img->addLayer(layer, parent, 0); + img->addLayer(layer, tqparent, 0); } } } @@ -485,17 +485,17 @@ void KisDoc::loadLayers(const QDomElement& element, KisImageSP img, KisGroupLaye } } -KisLayerSP KisDoc::loadLayer(const QDomElement& element, KisImageSP img) +KisLayerSP KisDoc::loadLayer(const TQDomElement& element, KisImageSP img) { // Nota bene: If you add new properties to layers, you should // ALWAYS define a default value in case the property is not // present in the layer definition: this helps a LOT with backward // compatibilty. - QString attr; - QString name; - Q_INT32 x; - Q_INT32 y; - Q_INT32 opacity; + TQString attr; + TQString name; + TQ_INT32 x; + TQ_INT32 y; + TQ_INT32 opacity; bool visible; bool locked; @@ -514,11 +514,11 @@ KisLayerSP KisDoc::loadLayer(const QDomElement& element, KisImageSP img) if ((attr = element.attribute("opacity")).isNull()) return 0; - if ((opacity = attr.toInt()) < 0 || opacity > Q_UINT8_MAX) + if ((opacity = attr.toInt()) < 0 || opacity > TQ_UINT8_MAX) opacity = OPACITY_OPAQUE; - QString compositeOpName = element.attribute("compositeop"); + TQString compositeOpName = element.attribute("compositeop"); KisCompositeOp compositeOp; if (compositeOpName.isNull()) { @@ -562,16 +562,16 @@ KisLayerSP KisDoc::loadLayer(const QDomElement& element, KisImageSP img) } -KisLayerSP KisDoc::loadPaintLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, - Q_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) +KisLayerSP KisDoc::loadPaintLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, + TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { - QString attr; + TQString attr; KisPaintLayerSP layer; KisColorSpace * cs; - QString colorspacename; - QString profileProductName; + TQString colorspacename; + TQString profileProductName; if ((colorspacename = element.attribute("colorspacename")).isNull()) cs = img->colorSpace(); @@ -591,21 +591,21 @@ KisLayerSP KisDoc::loadPaintLayer(const QDomElement& element, KisImageSP img, if ((element.attribute("filename")).isNull()) m_layerFilenames[layer.data()] = name; else - m_layerFilenames[layer.data()] = QString(element.attribute("filename")); + m_layerFilenames[layer.data()] = TQString(element.attribute("filename")); - if ((attr = element.attribute("hasmask")).isNull()) + if ((attr = element.attribute("hastqmask")).isNull()) attr = "0"; if (attr == "1") { - // We add a mask, but we'll fill in the actual mask later in completeLoading with the visitor + // We add a tqmask, but we'll fill in the actual tqmask later in completeLoading with the visitor layer->createMask(); } // Load exif info - for( QDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling() ) + for( TQDomNode node = element.firstChild(); !node.isNull(); node = node.nextSibling() ) { - QDomElement e = node.toElement(); + TQDomElement e = node.toElement(); if ( !e.isNull() && e.tagName() == "ExifInfo" ) { layer->paintDevice()->exifInfo()->load(e); @@ -614,11 +614,11 @@ KisLayerSP KisDoc::loadPaintLayer(const QDomElement& element, KisImageSP img, return layer.data(); } -KisGroupLayerSP KisDoc::loadGroupLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, +KisGroupLayerSP KisDoc::loadGroupLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { - QString attr; + TQString attr; KisGroupLayerSP layer; layer = new KisGroupLayer(img, name, opacity); @@ -635,13 +635,13 @@ KisGroupLayerSP KisDoc::loadGroupLayer(const QDomElement& element, KisImageSP im return layer; } -KisAdjustmentLayerSP KisDoc::loadAdjustmentLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 x, Q_INT32 y, Q_INT32 opacity, bool visible, bool locked, +KisAdjustmentLayerSP KisDoc::loadAdjustmentLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 x, TQ_INT32 y, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { - QString attr; + TQString attr; KisAdjustmentLayerSP layer; - QString filtername; + TQString filtername; if ((filtername = element.attribute("filtername")).isNull()) { // XXX: Invalid adjustmentlayer! We should warn about it! @@ -671,18 +671,18 @@ KisAdjustmentLayerSP KisDoc::loadAdjustmentLayer(const QDomElement& element, Kis if ((element.attribute("filename")).isNull()) m_layerFilenames[layer.data()] = name; else - m_layerFilenames[layer.data()] = QString(element.attribute("filename")); + m_layerFilenames[layer.data()] = TQString(element.attribute("filename")); return layer; } -KisPartLayerSP KisDoc::loadPartLayer(const QDomElement& element, KisImageSP img, - QString name, Q_INT32 /*x*/, Q_INT32 /*y*/, Q_INT32 opacity, +KisPartLayerSP KisDoc::loadPartLayer(const TQDomElement& element, KisImageSP img, + TQString name, TQ_INT32 /*x*/, TQ_INT32 /*y*/, TQ_INT32 opacity, bool visible, bool locked, KisCompositeOp compositeOp) { KisChildDoc* child = new KisChildDoc(this); - QString filename(element.attribute("filename")); - QDomElement partElement = element.namedItem("object").toElement(); + TQString filename(element.attribute("filename")); + TQDomElement partElement = element.namedItem("object").toElement(); if (partElement.isNull()) { kdWarning() << "loadPartLayer failed with partElement isNull" << endl; @@ -706,10 +706,10 @@ KisPartLayerSP KisDoc::loadPartLayer(const QDomElement& element, KisImageSP img, bool KisDoc::completeSaving(KoStore *store) { - QString uri = url().url(); - QString location; + TQString uri = url().url(); + TQString location; bool external = isStoredExtern(); - Q_INT32 totalSteps = 0; + TQ_INT32 totalSteps = 0; if (!m_currentImage) return false; @@ -719,7 +719,7 @@ bool KisDoc::completeSaving(KoStore *store) setIOSteps(totalSteps + 1); // Save the layers data - Q_UINT32 count=0; + TQ_UINT32 count=0; KisSaveVisitor visitor(m_currentImage, store, count); if(external) @@ -733,7 +733,7 @@ bool KisDoc::completeSaving(KoStore *store) // e.g. have <ANNOTATION> tags or so. KisAnnotationSP annotation = (m_currentImage)->annotation("exif"); if (annotation) { - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += (m_currentImage)->name() + "/annotations/exif"; if (store->open(location)) { store->write(annotation->annotation()); @@ -744,7 +744,7 @@ bool KisDoc::completeSaving(KoStore *store) annotation = m_currentImage->getProfile()->annotation(); if (annotation) { - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += m_currentImage->name() + "/annotations/icc"; if (store->open(location)) { store->write(annotation->annotation()); @@ -759,10 +759,10 @@ bool KisDoc::completeSaving(KoStore *store) bool KisDoc::completeLoading(KoStore *store) { - QString uri = url().url(); - QString location; + TQString uri = url().url(); + TQString location; bool external = isStoredExtern(); - Q_INT32 totalSteps = 0; + TQ_INT32 totalSteps = 0; totalSteps = (m_currentImage)->nlayers(); @@ -778,20 +778,20 @@ bool KisDoc::completeLoading(KoStore *store) // annotations // exif - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += (m_currentImage)->name() + "/annotations/exif"; if (store->hasFile(location)) { - QByteArray data; + TQByteArray data; store->open(location); data = store->read(store->size()); store->close(); (m_currentImage)->addAnnotation(new KisAnnotation("exif", "", data)); } // icc profile - location = external ? QString::null : uri; + location = external ? TQString() : uri; location += (m_currentImage)->name() + "/annotations/icc"; if (store->hasFile(location)) { - QByteArray data; + TQByteArray data; store->open(location); data = store->read(store->size()); store->close(); @@ -805,7 +805,7 @@ bool KisDoc::completeLoading(KoStore *store) return true; } -QWidget* KisDoc::createCustomDocumentWidget(QWidget *parent) +TQWidget* KisDoc::createCustomDocumentWidget(TQWidget *tqparent) { KisConfig cfg; @@ -813,16 +813,16 @@ QWidget* KisDoc::createCustomDocumentWidget(QWidget *parent) int w = cfg.defImgWidth(); int h = cfg.defImgHeight(); - QSize sz = KisClipboard::instance()->clipSize(); + TQSize sz = KisClipboard::instance()->clipSize(); if (sz.isValid() && sz.width() != 0 && sz.height() != 0) { w = sz.width(); h = sz.height(); } - return new KisCustomImageWidget(parent, this, w, h, cfg.defImgResolution(), cfg.workingColorSpace(),"unnamed"); + return new KisCustomImageWidget(tqparent, this, w, h, cfg.defImgResolution(), cfg.workingColorSpace(),"unnamed"); } -KoDocument* KisDoc::hitTest(const QPoint &pos, const QWMatrix& matrix) { +KoDocument* KisDoc::hitTest(const TQPoint &pos, const TQWMatrix& matrix) { KoDocument* doc = super::hitTest(pos, matrix); if (doc && doc != this) { // We hit a child document. We will only acknowledge we hit it, if the hit child @@ -841,7 +841,7 @@ KoDocument* KisDoc::hitTest(const QPoint &pos, const QWMatrix& matrix) { return doc; } -void KisDoc::renameImage(const QString& oldName, const QString& newName) +void KisDoc::renameImage(const TQString& oldName, const TQString& newName) { (m_currentImage)->setName(newName); @@ -850,7 +850,7 @@ void KisDoc::renameImage(const QString& oldName, const QString& newName) } -KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisColorSpace * colorstrategy) +KisImageSP KisDoc::newImage(const TQString& name, TQ_INT32 width, TQ_INT32 height, KisColorSpace * colorstrategy) { if (!init()) return 0; @@ -859,7 +859,7 @@ KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisImageSP img = new KisImage(this, width, height, colorstrategy, name); Q_CHECK_PTR(img); - connect( img, SIGNAL( sigImageModified() ), this, SLOT( slotImageUpdated() )); + connect( img, TQT_SIGNAL( sigImageModified() ), this, TQT_SLOT( slotImageUpdated() )); KisPaintLayer *layer = new KisPaintLayer(img, img->nextLayerName(), OPACITY_OPAQUE,colorstrategy); Q_CHECK_PTR(layer); @@ -868,7 +868,7 @@ KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisFillPainter painter; painter.begin(layer->paintDevice()); - painter.fillRect(0, 0, width, height, KisColor(Qt::white, cs), OPACITY_OPAQUE); + painter.fillRect(0, 0, width, height, KisColor(TQt::white, cs), OPACITY_OPAQUE); painter.end(); img->addLayer(layer, img->rootLayer(), 0); @@ -881,14 +881,14 @@ KisImageSP KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, return img; } -bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisColorSpace * cs, const KisColor &bgColor, const QString &imgDescription, const double imgResolution) +bool KisDoc::newImage(const TQString& name, TQ_INT32 width, TQ_INT32 height, KisColorSpace * cs, const KisColor &bgColor, const TQString &imgDescription, const double imgResolution) { if (!init()) return false; KisConfig cfg; - Q_UINT8 opacity = OPACITY_OPAQUE;//bgColor.getAlpha(); + TQ_UINT8 opacity = OPACITY_OPAQUE;//bgColor.getAlpha(); KisImageSP img; KisPaintLayer *layer; @@ -898,7 +898,7 @@ bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisCol img = new KisImage(this, width, height, cs, name); Q_CHECK_PTR(img); - connect( img, SIGNAL( sigImageModified() ), this, SLOT( slotImageUpdated() )); + connect( img, TQT_SIGNAL( sigImageModified() ), this, TQT_SLOT( slotImageUpdated() )); img->setResolution(imgResolution, imgResolution); img->setDescription(imgDescription); img->setProfile(cs->getProfile()); @@ -911,7 +911,7 @@ bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisCol painter.fillRect(0, 0, width, height, bgColor, opacity); painter.end(); - QValueVector<KisPaintDeviceAction *> actions = KisMetaRegistry::instance() -> + TQValueVector<KisPaintDeviceAction *> actions = KisMetaRegistry::instance() -> csRegistry()->paintDeviceActionsFor(cs); for (uint i = 0; i < actions.count(); i++) actions.at(i)->act(layer->paintDevice(), img->width(), img->height()); @@ -931,21 +931,21 @@ bool KisDoc::newImage(const QString& name, Q_INT32 width, Q_INT32 height, KisCol return true; } -KoView* KisDoc::createViewInstance(QWidget* parent, const char *name) +KoView* KisDoc::createViewInstance(TQWidget* tqparent, const char *name) { - KisView * v = new KisView(this, this, parent, name); + KisView * v = new KisView(this, this, tqparent, name); Q_CHECK_PTR(v); return v; } -void KisDoc::paintContent(QPainter& painter, const QRect& rc, bool transparent, double zoomX, double zoomY) +void KisDoc::paintContent(TQPainter& painter, const TQRect& rc, bool transparent, double zoomX, double zoomY) { KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); KisProfile * profile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); painter.scale(zoomX, zoomY); - QRect rect = rc & m_currentImage->bounds(); + TQRect rect = rc & m_currentImage->bounds(); KisImage::PaintFlags paintFlags; if (transparent) { paintFlags = KisImage::PAINT_SELECTION; @@ -964,12 +964,12 @@ void KisDoc::slotImageUpdated() setModified(true); } -void KisDoc::slotImageUpdated(const QRect& rect) +void KisDoc::slotImageUpdated(const TQRect& rect) { emit docUpdated(rect); } -void KisDoc::beginMacro(const QString& macroName) +void KisDoc::beginMacro(const TQString& macroName) { if (m_undo) { if (m_macroNestDepth == 0) { @@ -1002,7 +1002,7 @@ void KisDoc::endMacro() void KisDoc::setCommandHistoryListener(const KisCommandHistoryListener * l) { - // Never have more than one instance of a listener around. Qt should prove a Set class for this... + // Never have more than one instance of a listener around. TQt should prove a Set class for this... m_undoListeners.removeRef(l); m_undoListeners.append(l); } @@ -1051,22 +1051,22 @@ void KisDoc::setUndo(bool undo) } } -Q_INT32 KisDoc::undoLimit() const +TQ_INT32 KisDoc::undoLimit() const { return m_cmdHistory->undoLimit(); } -void KisDoc::setUndoLimit(Q_INT32 limit) +void KisDoc::setUndoLimit(TQ_INT32 limit) { m_cmdHistory->setUndoLimit(limit); } -Q_INT32 KisDoc::redoLimit() const +TQ_INT32 KisDoc::redoLimit() const { return m_cmdHistory->redoLimit(); } -void KisDoc::setRedoLimit(Q_INT32 limit) +void KisDoc::setRedoLimit(TQ_INT32 limit) { m_cmdHistory->setRedoLimit(limit); } @@ -1089,9 +1089,9 @@ void KisDoc::slotCommandExecuted(KCommand *command) } -void KisDoc::slotUpdate(KisImageSP, Q_UINT32 x, Q_UINT32 y, Q_UINT32 w, Q_UINT32 h) +void KisDoc::slotUpdate(KisImageSP, TQ_UINT32 x, TQ_UINT32 y, TQ_UINT32 w, TQ_UINT32 h) { - QRect rc(x, y, w, h); + TQRect rc(x, y, w, h); emit docUpdated(rc); } @@ -1101,7 +1101,7 @@ bool KisDoc::undo() const return m_undo; } -void KisDoc::setIOSteps(Q_INT32 nsteps) +void KisDoc::setIOSteps(TQ_INT32 nsteps) { m_ioProgressTotalSteps = nsteps * 100; m_ioProgressBase = 0; @@ -1118,7 +1118,7 @@ void KisDoc::IODone() emitProgress(-1); } -void KisDoc::slotIOProgress(Q_INT8 percentage) +void KisDoc::slotIOProgress(TQ_INT8 percentage) { KApplication *app = KApplication::kApplication(); @@ -1132,7 +1132,7 @@ void KisDoc::slotIOProgress(Q_INT8 percentage) emitProgress(totalPercentage); } -KisChildDoc * KisDoc::createChildDoc( const QRect & rect, KoDocument* childDoc ) +KisChildDoc * KisDoc::createChildDoc( const TQRect & rect, KoDocument* childDoc ) { KisChildDoc * ch = new KisChildDoc( this, rect, childDoc ); insertChild( ch ); |