diff options
Diffstat (limited to 'krita/ui/kis_clipboard.cc')
-rw-r--r-- | krita/ui/kis_clipboard.cc | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/krita/ui/kis_clipboard.cc b/krita/ui/kis_clipboard.cc index 8b6a6cd8..b6a273c9 100644 --- a/krita/ui/kis_clipboard.cc +++ b/krita/ui/kis_clipboard.cc @@ -15,12 +15,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include <qapplication.h> -#include <qclipboard.h> -#include <qobject.h> -#include <qimage.h> -#include <qmessagebox.h> -#include <qbuffer.h> +#include <tqapplication.h> +#include <tqclipboard.h> +#include <tqobject.h> +#include <tqimage.h> +#include <tqmessagebox.h> +#include <tqbuffer.h> #include <kmultipledrag.h> #include <klocale.h> @@ -52,8 +52,8 @@ KisClipboard::KisClipboard() clipboardDataChanged(); // Make sure we are notified when clipboard changes - connect( QApplication::clipboard(), SIGNAL( dataChanged() ), - this, SLOT( clipboardDataChanged() ) ); + connect( TQApplication::tqclipboard(), TQT_SIGNAL( dataChanged() ), + this, TQT_SLOT( clipboardDataChanged() ) ); } KisClipboard::~KisClipboard() @@ -80,8 +80,8 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) m_hasClip = true; // We'll create a store (ZIP format) in memory - QBuffer buffer; - QCString mimeType("application/x-krita-selection"); + TQBuffer buffer; + TQCString mimeType("application/x-krita-selection"); KoStore* store = KoStore::createStore( &buffer, KoStore::Write, mimeType ); Q_ASSERT( store ); Q_ASSERT( !store->bad() ); @@ -98,7 +98,7 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) // ColorSpace id of layer data if (store->open("colorspace")) { - QString csName = selection->colorSpace()->id().id(); + TQString csName = selection->colorSpace()->id().id(); store->write(csName.ascii(), strlen(csName.ascii())); store->close(); } @@ -116,14 +116,14 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) delete store; - // We also create a QImage so we can interchange with other applications - QImage qimg; + // We also create a TQImage so we can interchange with other applications + TQImage qimg; KisConfig cfg; - QString monitorProfileName = cfg.monitorProfile(); + TQString monitorProfileName = cfg.monitorProfile(); KisProfile * monitorProfile = KisMetaRegistry::instance()->csRegistry()->getProfileByName(monitorProfileName); - qimg = selection->convertToQImage(monitorProfile); + qimg = selection->convertToTQImage(monitorProfile); - QImageDrag *qimgDrag = new QImageDrag(qimg); + TQImageDrag *qimgDrag = new TQImageDrag(qimg); KMultipleDrag *multiDrag = new KMultipleDrag(); if ( !qimg.isNull() ) multiDrag->addDragObject( qimgDrag ); @@ -132,36 +132,36 @@ void KisClipboard::setClip(KisPaintDeviceSP selection) multiDrag->addDragObject( storeDrag ); - QClipboard *cb = QApplication::clipboard(); + TQClipboard *cb = TQApplication::tqclipboard(); cb->setData(multiDrag); m_pushedClipboard = true; } KisPaintDeviceSP KisClipboard::clip() { - QClipboard *cb = QApplication::clipboard(); - QCString mimeType("application/x-krita-selection"); - QMimeSource *cbData = cb->data(); + TQClipboard *cb = TQApplication::tqclipboard(); + TQCString mimeType("application/x-krita-selection"); + TQMimeSource *cbData = cb->data(); if(cbData && cbData->provides(mimeType)) { - QBuffer buffer(cbData->encodedData(mimeType)); + TQBuffer buffer(cbData->tqencodedData(mimeType)); KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType ); KisProfile *profile=0; if (store->hasFile("profile.icc")) { - QByteArray data; + TQByteArray data; store->open("profile.icc"); data = store->read(store->size()); store->close(); profile = new KisProfile(data); } - QString csName; + TQString csName; // ColorSpace id of layer data if (store->hasFile("colorspace")) { store->open("colorspace"); - csName = QString(store->read(store->size())); + csName = TQString(store->read(store->size())); store->close(); } @@ -178,30 +178,30 @@ KisPaintDeviceSP KisClipboard::clip() } else { - QImage qimg = cb->image(); + TQImage qimg = cb->image(); if (qimg.isNull()) return 0; KisConfig cfg; - Q_UINT32 behaviour = cfg.pasteBehaviour(); + TQ_UINT32 behaviour = cfg.pasteBehaviour(); if(behaviour==2) { // Ask user each time - behaviour = QMessageBox::question(0,i18n("Pasting data from simple source"),i18n("The image data you are trying to paste has no colour profile information.\n\nOn the web and in simple applications the data are supposed to be in sRGB color format.\nImporting as web will show it as it is supposed to look.\nMost monitors are not perfect though so if you made the image yourself\nyou might want to import it as it looked on you monitor.\n\nHow do you want to interpret these data?"),i18n("As &Web"),i18n("As on &Monitor")); + behaviour = TQMessageBox::question(0,i18n("Pasting data from simple source"),i18n("The image data you are trying to paste has no colour profile information.\n\nOn the web and in simple applications the data are supposed to be in sRGB color format.\nImporting as web will show it as it is supposed to look.\nMost monitors are not perfect though so if you made the image yourself\nyou might want to import it as it looked on you monitor.\n\nHow do you want to interpret these data?"),i18n("As &Web"),i18n("As on &Monitor")); } KisColorSpace * cs; - QString profileName(""); + TQString profileName(""); if(behaviour==1) profileName = cfg.monitorProfile(); cs = KisMetaRegistry::instance()->csRegistry() ->getColorSpace(KisID("RGBA",""), profileName); m_clip = new KisPaintDevice(cs, "from paste"); Q_CHECK_PTR(m_clip); - m_clip->convertFromQImage(qimg, profileName); + m_clip->convertFromTQImage(qimg, profileName); } return m_clip; @@ -211,10 +211,10 @@ void KisClipboard::clipboardDataChanged() { if (!m_pushedClipboard) { m_hasClip = false; - QClipboard *cb = QApplication::clipboard(); - QImage qimg = cb->image(); - QMimeSource *cbData = cb->data(); - QCString mimeType("application/x-krita-selection"); + TQClipboard *cb = TQApplication::tqclipboard(); + TQImage qimg = cb->image(); + TQMimeSource *cbData = cb->data(); + TQCString mimeType("application/x-krita-selection"); if(cbData && cbData->provides(mimeType)) m_hasClip = true; @@ -232,34 +232,34 @@ bool KisClipboard::hasClip() return m_hasClip; } -QSize KisClipboard::clipSize() +TQSize KisClipboard::clipSize() { - QClipboard *cb = QApplication::clipboard(); - QCString mimeType("application/x-krita-selection"); - QMimeSource *cbData = cb->data(); + TQClipboard *cb = TQApplication::tqclipboard(); + TQCString mimeType("application/x-krita-selection"); + TQMimeSource *cbData = cb->data(); KisPaintDeviceSP clip; if(cbData && cbData->provides(mimeType)) { - QBuffer buffer(cbData->encodedData(mimeType)); + TQBuffer buffer(cbData->tqencodedData(mimeType)); KoStore* store = KoStore::createStore( &buffer, KoStore::Read, mimeType ); KisProfile *profile=0; if (store->hasFile("profile.icc")) { - QByteArray data; + TQByteArray data; store->open("profile.icc"); data = store->read(store->size()); store->close(); profile = new KisProfile(data); } - QString csName; + TQString csName; // ColorSpace id of layer data if (store->hasFile("colorspace")) { store->open("colorspace"); - csName = QString(store->read(store->size())); + csName = TQString(store->read(store->size())); store->close(); } @@ -277,7 +277,7 @@ QSize KisClipboard::clipSize() return clip->exactBounds().size(); } else { - QImage qimg = cb->image(); + TQImage qimg = cb->image(); return qimg.size(); } ; |