summaryrefslogtreecommitdiffstats
path: root/ksquirrel/ksquirrelpart/sq_glwidget_stuff.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ksquirrel/ksquirrelpart/sq_glwidget_stuff.cpp')
-rw-r--r--ksquirrel/ksquirrelpart/sq_glwidget_stuff.cpp600
1 files changed, 300 insertions, 300 deletions
diff --git a/ksquirrel/ksquirrelpart/sq_glwidget_stuff.cpp b/ksquirrel/ksquirrelpart/sq_glwidget_stuff.cpp
index 3926166..3a212cb 100644
--- a/ksquirrel/ksquirrelpart/sq_glwidget_stuff.cpp
+++ b/ksquirrel/ksquirrelpart/sq_glwidget_stuff.cpp
@@ -19,13 +19,13 @@
#include "config.h"
#endif
-#include <qclipboard.h>
-#include <qslider.h>
-#include <qdragobject.h>
-#include <qtimer.h>
-#include <qlabel.h>
-#include <qpainter.h>
-#include <qpaintdevicemetrics.h>
+#include <tqclipboard.h>
+#include <tqslider.h>
+#include <tqdragobject.h>
+#include <tqtimer.h>
+#include <tqlabel.h>
+#include <tqpainter.h>
+#include <tqpaintdevicemetrics.h>
#include <kapplication.h>
#include <kaction.h>
@@ -78,34 +78,34 @@
// Create actions
void SQ_GLWidget::createActions()
{
- pASelectionRect = new KToggleAction(i18n("Rectangle"), QPixmap(locate("data", "images/actions/glselection_rect.png")), 0, this, SLOT(slotSelectionRect()), ac, "SQ Selection Rect");
- pASelectionEllipse = new KToggleAction(i18n("Ellipse"), QPixmap(locate("data", "images/actions/glselection_ellipse.png")), 0, this, SLOT(slotSelectionEllipse()), ac, "SQ Selection Ellipse");
- pASelectionClear = new KAction(i18n("Clear"), 0, 0, this, SLOT(slotSelectionClear()), ac, "SQ Selection Clear");
+ pASelectionRect = new KToggleAction(i18n("Rectangle"), TQPixmap(locate("data", "images/actions/glselection_rect.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectionRect()), ac, "SQ Selection Rect");
+ pASelectionEllipse = new KToggleAction(i18n("Ellipse"), TQPixmap(locate("data", "images/actions/glselection_ellipse.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectionEllipse()), ac, "SQ Selection Ellipse");
+ pASelectionClear = new KAction(i18n("Clear"), 0, 0, TQT_TQOBJECT(this), TQT_SLOT(slotSelectionClear()), ac, "SQ Selection Clear");
- pAZoomW = new KToggleAction(i18n("Fit width"), QPixmap(locate("data", "images/actions/zoomW.png")), 0, this, SLOT(slotZoomW()), ac, "SQ ZoomW");
- pAZoomH = new KToggleAction(i18n("Fit height"), QPixmap(locate("data", "images/actions/zoomH.png")), 0, this, SLOT(slotZoomH()), ac, "SQ ZoomH");
- pAZoomWH = new KToggleAction(i18n("Fit image"), QPixmap(locate("data", "images/actions/zoomWH.png")), 0, this, SLOT(slotZoomWH()), ac, "SQ ZoomWH");
- pAZoom100 = new KToggleAction(i18n("Zoom 100%"), QPixmap(locate("data", "images/actions/zoom100.png")), 0, this, SLOT(slotZoom100()), ac, "SQ Zoom100");
- pAZoomLast = new KToggleAction(i18n("Leave previous zoom"), QPixmap(locate("data", "images/actions/zoomlast.png")), 0, this, SLOT(slotZoomLast()), ac, "SQ ZoomLast");
- pAIfLess = new KToggleAction(i18n("Ignore, if image is smaller than window"), QPixmap(locate("data", "images/actions/ifless.png")), 0, 0, 0, ac, "if less");
+ pAZoomW = new KToggleAction(i18n("Fit width"), TQPixmap(locate("data", "images/actions/zoomW.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomW()), ac, "SQ ZoomW");
+ pAZoomH = new KToggleAction(i18n("Fit height"), TQPixmap(locate("data", "images/actions/zoomH.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomH()), ac, "SQ ZoomH");
+ pAZoomWH = new KToggleAction(i18n("Fit image"), TQPixmap(locate("data", "images/actions/zoomWH.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomWH()), ac, "SQ ZoomWH");
+ pAZoom100 = new KToggleAction(i18n("Zoom 100%"), TQPixmap(locate("data", "images/actions/zoom100.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoom100()), ac, "SQ Zoom100");
+ pAZoomLast = new KToggleAction(i18n("Leave previous zoom"), TQPixmap(locate("data", "images/actions/zoomlast.png")), 0, TQT_TQOBJECT(this), TQT_SLOT(slotZoomLast()), ac, "SQ ZoomLast");
+ pAIfLess = new KToggleAction(i18n("Ignore, if image is smaller than window"), TQPixmap(locate("data", "images/actions/ifless.png")), 0, 0, 0, ac, "if less");
- pAFull = new KToggleAction(QString::null, 0, 0, 0, ac, "SQ GL Full");
+ pAFull = new KToggleAction(TQString(), 0, 0, 0, ac, "SQ GL Full");
- QString squirrel_zoom_actions = QString::fromLatin1("squirrel_zoom_actions");
+ TQString squirrel_zoom_actions = TQString::tqfromLatin1("squirrel_zoom_actions");
pAZoomW->setExclusiveGroup(squirrel_zoom_actions);
pAZoomH->setExclusiveGroup(squirrel_zoom_actions);
pAZoomWH->setExclusiveGroup(squirrel_zoom_actions);
pAZoom100->setExclusiveGroup(squirrel_zoom_actions);
pAZoomLast->setExclusiveGroup(squirrel_zoom_actions);
- QString squirrel_selection_type = QString::fromLatin1("squirrel_selection_type");
+ TQString squirrel_selection_type = TQString::tqfromLatin1("squirrel_selection_type");
pASelectionEllipse->setExclusiveGroup(squirrel_selection_type);
pASelectionRect->setExclusiveGroup(squirrel_selection_type);
- connect(pAIfLess, SIGNAL(toggled(bool)), this, SLOT(slotZoomIfLess()));
+ connect(pAIfLess, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotZoomIfLess()));
#ifndef KSQUIRREL_PART
- connect(pAFull, SIGNAL(toggled(bool)), KSquirrel::app(), SLOT(slotFullScreen(bool)));
+ connect(pAFull, TQT_SIGNAL(toggled(bool)), KSquirrel::app(), TQT_SLOT(slotFullScreen(bool)));
#endif
SQ_Config::instance()->setGroup("GL view");
@@ -155,54 +155,54 @@ void SQ_GLWidget::createToolbar()
}
/*
- * We will create QToolButtons and put them in toolbar.
+ * We will create TQToolButtons and put them in toolbar.
* Of course, we can just KAction::plug(), BUT plugged KActions
* will produce buttons, which cann't be clicked twise! I think
* plugged KActions will treat our attempt as double-click, not two single-clicks.
- * On the other hand, we can click QToolButton as frequently as we want.
+ * On the other hand, we can click TQToolButton as frequently as we want.
*
* Plugged KActions also don't know about autorepeat :(
*/
- new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_first.png")), i18n("Go to first image"), this, SLOT(slotFirst()), toolbar);
- pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_prev.png")), i18n("Previous image"), this, SLOT(slotPrev()), toolbar);
+ new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_first.png")), i18n("Go to first image"), TQT_TQOBJECT(this), TQT_SLOT(slotFirst()), toolbar);
+ pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_prev.png")), i18n("Previous image"), TQT_TQOBJECT(this), TQT_SLOT(slotPrev()), toolbar);
pATool->setAutoRepeat(true);
- pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_next.png")), i18n("Next image"), this, SLOT(slotNext()), toolbar);
+ pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_next.png")), i18n("Next image"), TQT_TQOBJECT(this), TQT_SLOT(slotNext()), toolbar);
pATool->setAutoRepeat(true);
- new SQ_ToolButton(QPixmap(locate("data", "images/actions/file_last.png")), i18n("Go to last image"), this, SLOT(slotLast()), toolbar);
+ new SQ_ToolButton(TQPixmap(locate("data", "images/actions/file_last.png")), i18n("Go to last image"), TQT_TQOBJECT(this), TQT_SLOT(slotLast()), toolbar);
// some toolbuttons need autorepeat...
- pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/zoom+.png")), i18n("Zoom +"), this, SLOT(slotZoomPlus()), toolbar);
+ pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/zoom+.png")), i18n("Zoom +"), TQT_TQOBJECT(this), TQT_SLOT(slotZoomPlus()), toolbar);
pATool->setAutoRepeat(true);
- pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/zoom-.png")), i18n("Zoom -"), this, SLOT(slotZoomMinus()), toolbar);
+ pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/zoom-.png")), i18n("Zoom -"), TQT_TQOBJECT(this), TQT_SLOT(slotZoomMinus()), toolbar);
pATool->setAutoRepeat(true);
- pAToolZoom = new SQ_ToolButtonPopup(QPixmap(locate("data", "images/actions/zoom_template.png")), i18n("Zoom"), toolbar);
+ pAToolZoom = new SQ_ToolButtonPopup(TQPixmap(locate("data", "images/actions/zoom_template.png")), i18n("Zoom"), toolbar);
pAToolZoom->setPopup(zoomMenu);
- pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/rotateL.png")), i18n("Rotate left"), this, SLOT(slotRotateLeft()), toolbar);
+ pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/rotateL.png")), i18n("Rotate left"), TQT_TQOBJECT(this), TQT_SLOT(slotRotateLeft()), toolbar);
pATool->setAutoRepeat(true);
- pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/rotateR.png")), i18n("Rotate right"), this, SLOT(slotRotateRight()), toolbar);
+ pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/rotateR.png")), i18n("Rotate right"), TQT_TQOBJECT(this), TQT_SLOT(slotRotateRight()), toolbar);
pATool->setAutoRepeat(true);
- pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/flipV.png")), i18n("Flip vertically"), this, SLOT(slotFlipV()), toolbar);
+ pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/flipV.png")), i18n("Flip vertically"), TQT_TQOBJECT(this), TQT_SLOT(slotFlipV()), toolbar);
pATool->setAutoRepeat(true);
- pATool = new SQ_ToolButton(QPixmap(locate("data", "images/actions/flipH.png")), i18n("Flip horizontally"), this, SLOT(slotFlipH()), toolbar);
+ pATool = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/flipH.png")), i18n("Flip horizontally"), TQT_TQOBJECT(this), TQT_SLOT(slotFlipH()), toolbar);
pATool->setAutoRepeat(true);
- new SQ_ToolButton(QPixmap(locate("data", "images/actions/reload.png")), i18n("Normalize"), this, SLOT(slotMatrixReset()), toolbar);
+ new SQ_ToolButton(TQPixmap(locate("data", "images/actions/reload.png")), i18n("Normalize"), TQT_TQOBJECT(this), TQT_SLOT(slotMatrixReset()), toolbar);
- pAToolFull = new SQ_ToolButton(QPixmap(locate("data", "images/actions/fullscreen.png")), i18n("Fullscreen"), pAFull, SLOT(activate()), toolbar);
+ pAToolFull = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/fullscreen.png")), i18n("Fullscreen"), pAFull, TQT_SLOT(activate()), toolbar);
pAToolFull->setToggleButton(true);
- pAToolImages = new SQ_ToolButtonPopup(QPixmap(locate("data", "images/actions/images.png")), i18n("Select image"), toolbar);
+ pAToolImages = new SQ_ToolButtonPopup(TQPixmap(locate("data", "images/actions/images.png")), i18n("Select image"), toolbar);
pAToolImages->setPopup(images);
- SQ_ToolButtonPopup *pAToolSel = new SQ_ToolButtonPopup(QPixmap(locate("data", "images/actions/glselection.png")), i18n("Selection"), toolbar);
+ SQ_ToolButtonPopup *pAToolSel = new SQ_ToolButtonPopup(TQPixmap(locate("data", "images/actions/glselection.png")), i18n("Selection"), toolbar);
pAToolSel->setPopup(selectionMenu);
- pAToolQuick = new SQ_ToolButton(QPixmap(locate("data", "images/actions/configure.png")), i18n("Codec settings"), this, SLOT(slotShowCodecSettings()), toolbar);
+ pAToolQuick = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/configure.png")), i18n("Codec settings"), TQT_TQOBJECT(this), TQT_SLOT(slotShowCodecSettings()), toolbar);
pAToolQuick->setEnabled(false);
- pAToolProp = new SQ_ToolButton(QPixmap(locate("data", "images/actions/prop.png")), i18n("Image Properties"), this, SLOT(slotProperties()), toolbar);
- pAToolPrint = new SQ_ToolButton(QPixmap(locate("data", "images/actions/print.png")), i18n("Print"), this, SLOT(slotPrint()), toolbar);
- new SQ_ToolButton(QPixmap(locate("data", "images/actions/shownav.png")), i18n("Show navigator"), this, SLOT(slotShowNav()), toolbar);
+ pAToolProp = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/prop.png")), i18n("Image Properties"), TQT_TQOBJECT(this), TQT_SLOT(slotProperties()), toolbar);
+ pAToolPrint = new SQ_ToolButton(TQPixmap(locate("data", "images/actions/print.png")), i18n("Print"), TQT_TQOBJECT(this), TQT_SLOT(slotPrint()), toolbar);
+ new SQ_ToolButton(TQPixmap(locate("data", "images/actions/shownav.png")), i18n("Show navigator"), TQT_TQOBJECT(this), TQT_SLOT(slotShowNav()), toolbar);
- slider_zoom = new QSlider(1, 38, 2, 19, Qt::Horizontal, toolbar);
- slider_zoom->setTickmarks(QSlider::Below);
+ slider_zoom = new TQSlider(1, 38, 2, 19, Qt::Horizontal, toolbar);
+ slider_zoom->setTickmarks(TQSlider::Below);
slider_zoom->setTickInterval(19);
- connect(slider_zoom, SIGNAL(valueChanged(int)), this, SLOT(slotSetZoomPercents(int)));
+ connect(slider_zoom, TQT_SIGNAL(valueChanged(int)), TQT_TQOBJECT(this), TQT_SLOT(slotSetZoomPercents(int)));
toolbar->insertWidget(1000, 0, slider_zoom);
toolbar->setItemAutoSized(1000);
toolbar->alignItemRight(1000);
@@ -220,33 +220,33 @@ void SQ_GLWidget::slotProperties()
stopAnimation();
const int real_size = tab->finfo.image[tab->current].w * tab->finfo.image[tab->current].h * sizeof(RGBA);
- QString sz = KIO::convertSize(real_size);
- QStringList list;
+ TQString sz = KIO::convertSize(real_size);
+ TQStringList list;
- QValueVector<QPair<QString,QString> > meta;
+ TQValueVector<TQPair<TQString,TQString> > meta;
if(!tab->finfo.meta.empty())
{
for(std::vector<fmt_metaentry>::iterator it = tab->finfo.meta.begin();it != tab->finfo.meta.end();++it)
{
- meta.append(QPair<QString,QString>((*it).group, (*it).data));
+ meta.append(TQPair<TQString,TQString>((*it).group, (*it).data));
}
}
// save tab->current image parameters and some additioanl information
// in list
list << tab->quickImageInfo
- << QString::fromLatin1("%1x%2").arg(tab->finfo.image[tab->current].w).arg(tab->finfo.image[tab->current].h)
- << QString::fromLatin1("%1").arg(tab->finfo.image[tab->current].bpp)
+ << TQString::tqfromLatin1("%1x%2").tqarg(tab->finfo.image[tab->current].w).tqarg(tab->finfo.image[tab->current].h)
+ << TQString::tqfromLatin1("%1").tqarg(tab->finfo.image[tab->current].bpp)
<< tab->finfo.image[tab->current].colorspace
<< tab->finfo.image[tab->current].compression
<< sz
- << QString::fromLatin1("%1").arg((double)real_size / tab->fmt_size, 0, 'f', 2)
+ << TQString::tqfromLatin1("%1").tqarg((double)real_size / tab->fmt_size, 0, 'f', 2)
<< ((tab->finfo.image[tab->current].interlaced) ? i18n("yes") : i18n("no"))
- << QString::fromLatin1("%1").arg(errors)
- << QString::fromLatin1("%1").arg(tab->finfo.image.size())
- << QString::fromLatin1("#%1").arg(tab->current+1)
- << QString::fromLatin1("%1").arg(tab->finfo.image[tab->current].delay);
+ << TQString::tqfromLatin1("%1").tqarg(errors)
+ << TQString::tqfromLatin1("%1").tqarg(tab->finfo.image.size())
+ << TQString::tqfromLatin1("#%1").tqarg(tab->current+1)
+ << TQString::tqfromLatin1("%1").tqarg(tab->finfo.image[tab->current].delay);
// create dialog and setup it
SQ_ImageProperties prop(this);
@@ -304,7 +304,7 @@ void SQ_GLWidget::findCloserTiles(int w, int h, std::vector<int> &x, std::vector
}
}
-QPair<int, int> SQ_GLWidget::calcRealDimensions(Parts &p, int y, int x)
+TQPair<int, int> SQ_GLWidget::calcRealDimensions(Parts &p, int y, int x)
{
int rw = 0, rh = 0;
int toy = y == -1 ? p.tilesy.size() : y;
@@ -320,7 +320,7 @@ QPair<int, int> SQ_GLWidget::calcRealDimensions(Parts &p, int y, int x)
for(std::vector<int>::iterator it = p.tilesy.begin();it != itEnd && toy--;++it)
rh += (*it);
- return QPair<int, int>(rw, rh);
+ return TQPair<int, int>(rw, rh);
}
void SQ_GLWidget::slotShowCodecSettings()
@@ -335,13 +335,13 @@ void SQ_GLWidget::slotShowCodecSettings()
SQ_CodecSettingsSkeleton skel(this);
- connect(&skel, SIGNAL(apply()), this, SLOT(slotApplyCodecSettings()));
+ connect(&skel, TQT_SIGNAL(apply()), TQT_TQOBJECT(this), TQT_SLOT(slotApplyCodecSettings()));
skel.addSettingsWidget(tab->lib->config);
skel.setCodecInfo(tab->lib->mime, tab->lib->quickinfo);
skel.adjustSize();
- if(skel.exec(tab->lib->settings) == QDialog::Accepted)
+ if(skel.exec(tab->lib->settings) == TQDialog::Accepted)
tab->lib->codec->set_settings(tab->lib->settings);
}
@@ -352,7 +352,7 @@ void SQ_GLWidget::slotApplyCodecSettings()
// new settings are already set by SQ_CodecSettingsSkeleton
tab->lib->codec->set_settings(tab->lib->settings);
m_original = tab->m_original;
- startDecoding(QString(tab->m_File));
+ startDecoding(TQString(tab->m_File));
}
}
@@ -392,7 +392,7 @@ void SQ_GLWidget::slotImagesShown()
void SQ_GLWidget::slotShowImages()
{
- images->exec(QCursor::pos());
+ images->exec(TQCursor::pos());
}
void SQ_GLWidget::slotImagesHidden()
@@ -422,7 +422,7 @@ void SQ_GLWidget::showExternalTools()
SQ_ExternalTool::instance()->setItems(items);
}
- SQ_ExternalTool::instance()->constPopupMenu()->exec(QCursor::pos());
+ SQ_ExternalTool::instance()->constPopupMenu()->exec(TQCursor::pos());
SQ_ExternalTool::instance()->constPopupMenu()->setEnabled(v_ogorogde_buzina_a_v_kieve_dzyadka);
}
@@ -457,8 +457,8 @@ void SQ_GLWidget::saveAs()
return;
SQ_Config::instance()->setGroup("GL view");
- QString lastPath = SQ_Config::instance()->readEntry("saveasPath");
- QString lastFilt = SQ_Config::instance()->readEntry("saveasFilter");
+ TQString lastPath = SQ_Config::instance()->readEntry("saveasPath");
+ TQString lastFilt = SQ_Config::instance()->readEntry("saveasFilter");
if(lastPath.isEmpty())
{
@@ -476,7 +476,7 @@ void SQ_GLWidget::saveAs()
d.setCurrentFilter(lastFilt);
d.updateCombo(false);
- if(d.exec() == QDialog::Rejected || d.selectedURL().isEmpty())
+ if(d.exec() == TQDialog::Rejected || d.selectedURL().isEmpty())
return;
KURL url = d.selectedURL();
@@ -487,13 +487,13 @@ void SQ_GLWidget::saveAs()
SQ_Config::instance()->writeEntry("saveasPath", u.prettyURL());
SQ_Config::instance()->writeEntry("saveasFilter", d.nameFilter());
- QString path = url.isLocalFile() ? url.path() : tmp->name();
+ TQString path = url.isLocalFile() ? url.path() : tmp->name();
SQ_LIBRARY *wlib = SQ_LibraryHandler::instance()->libraryByName(d.nameFilter());
if(!wlib || !wlib->writestatic)
{
- KMessageBox::error(this, i18n("Sorry, could not perform write operation\nfor codec \"%1\"").arg(d.nameFilter()));
+ KMessageBox::error(this, i18n("Sorry, could not perform write operation\nfor codec \"%1\"").tqarg(d.nameFilter()));
return;
}
@@ -504,7 +504,7 @@ void SQ_GLWidget::saveAs()
fmt_image im = tab->finfo.image[tab->current];
/*
- * The easiest way to rotate image is to use QImage + QImage::xForm(),
+ * The easiest way to rotate image is to use TQImage + TQImage::xForm(),
* but this method is VERY memory inefficient. We will use our own tranformation
* routins... Yes, they will be a little bit slower, but they require only
* one scaline in stack.
@@ -558,7 +558,7 @@ void SQ_GLWidget::saveAs()
opt.compression_scheme = (wlib->opt.compression_scheme & CompressionNo) ? CompressionNo : CompressionInternal;
opt.compression_level = wlib->opt.compression_def;
- int err = wlib->codec->write_init(QString(QFile::encodeName(path)), im2, opt);
+ int err = wlib->codec->write_init(TQString(TQFile::encodeName(path)).ascii(), im2, opt);
if(err != SQE_OK)
{
@@ -605,7 +605,7 @@ void SQ_GLWidget::saveAs()
// src dst perm overwrite resume progress
KIO::Job *j = KIO::file_copy(path, url, -1, true, false, false);
- connect(j, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyResult(KIO::Job *)));
+ connect(j, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyResult(KIO::Job *)));
}
}
@@ -615,7 +615,7 @@ void SQ_GLWidget::slotCopyResult(KIO::Job *job)
{
if(KMessageBox::questionYesNoCancel(this, job->errorString() + '\n' + i18n("Try another location?")) == KMessageBox::Yes)
{
- SQ_FileDialog d(QString::null, this);
+ SQ_FileDialog d(TQString(), this);
// set filter: writable codecs without *.*
d.setFilter(SQ_LibraryHandler::instance()->allFiltersFileDialogString(false, false));
@@ -624,11 +624,11 @@ void SQ_GLWidget::slotCopyResult(KIO::Job *job)
int result = d.exec();
- if(result == QDialog::Rejected || d.selectedURL().isEmpty())
+ if(result == TQDialog::Rejected || d.selectedURL().isEmpty())
return;
KIO::Job *j = KIO::file_copy(tmp->name(), d.selectedURL(), -1, true, false, false);
- connect(j, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyResult(KIO::Job *)));
+ connect(j, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyResult(KIO::Job *)));
}
}
}
@@ -638,15 +638,15 @@ void SQ_GLWidget::toClipboard()
if(!decoded || tab->broken)
return;
- QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian);
+ TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian);
im = im.swapRGB();
// image doesn't have extra regions
if(tab->parts[tab->current].realw == tab->parts[tab->current].w && tab->parts[tab->current].realh == tab->parts[tab->current].h)
- KApplication::clipboard()->setImage(im, QClipboard::Clipboard);
+ KApplication::tqclipboard()->setImage(im, TQClipboard::Clipboard);
else
- KApplication::clipboard()->setImage(im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h), QClipboard::Clipboard);
+ KApplication::tqclipboard()->setImage(im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h), TQClipboard::Clipboard);
}
void SQ_GLWidget::bcg()
@@ -659,7 +659,7 @@ void SQ_GLWidget::bcg()
_bcg.setPreviewImage(generatePreview());
- connect(&_bcg, SIGNAL(bcg(SQ_ImageBCGOptions *)), this, SLOT(slotBCG(SQ_ImageBCGOptions *)));
+ connect(&_bcg, TQT_SIGNAL(bcg(SQ_ImageBCGOptions *)), TQT_TQOBJECT(this), TQT_SLOT(slotBCG(SQ_ImageBCGOptions *)));
_bcg.exec();
@@ -677,7 +677,7 @@ void SQ_GLWidget::filter()
flt.setPreviewImage(generatePreview());
- connect(&flt, SIGNAL(filter(SQ_ImageFilterOptions *)), this, SLOT(slotFilter(SQ_ImageFilterOptions *)));
+ connect(&flt, TQT_SIGNAL(filter(SQ_ImageFilterOptions *)), TQT_TQOBJECT(this), TQT_SLOT(slotFilter(SQ_ImageFilterOptions *)));
flt.exec();
@@ -687,8 +687,8 @@ void SQ_GLWidget::filter()
void SQ_GLWidget::slotFilter(SQ_ImageFilterOptions *filtopt)
{
- QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian);
- QImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im;
+ TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian);
+ TQImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im;
fmt_filters::image image =
gls->valid() ? fmt_filters::image((unsigned char *)img.bits(), img.width(), img.height())
@@ -731,8 +731,8 @@ void SQ_GLWidget::slotFilter(SQ_ImageFilterOptions *filtopt)
void SQ_GLWidget::slotBCG(SQ_ImageBCGOptions *bcgopt)
{
- QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian);
- QImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im;
+ TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian);
+ TQImage img = gls->valid() ? im.copy(tab->sx, tab->sy, tab->sw, tab->sh) : im;
fmt_filters::image image =
gls->valid() ? fmt_filters::image((unsigned char *)img.bits(), img.width(), img.height())
@@ -758,8 +758,8 @@ void SQ_GLWidget::slotBCG(SQ_ImageBCGOptions *bcgopt)
bool SQ_GLWidget::calcSelection()
{
- QSize sz = gls->size();
- QPoint pt = gls->pos();
+ TQSize sz = gls->size();
+ TQPoint pt = gls->pos();
float z = getZoom();
float x = pt.x(), y = pt.y(), w = sz.width(), h = sz.height();
@@ -788,7 +788,7 @@ bool SQ_GLWidget::calcSelection()
(int)tab->curangle,
tab->orient))
{
- tab->srect = QRect(pt, sz);
+ tab->srect = TQRect(pt, sz);
tab->sx = sx;
tab->sy = sy;
tab->sw = sw;
@@ -801,10 +801,10 @@ bool SQ_GLWidget::calcSelection()
return true;
}
-QImage SQ_GLWidget::generatePreview()
+TQImage SQ_GLWidget::generatePreview()
{
- QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian);
- QImage img, ret;
+ TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian);
+ TQImage img, ret;
if(gls->valid() && calcSelection())
img = im.copy(tab->sx, tab->sy, tab->sw, tab->sh);
@@ -818,7 +818,7 @@ QImage SQ_GLWidget::generatePreview()
ret = SQ_Utils::scaleImage((unsigned char *)img.bits(), img.width(), img.height(), 160).swapRGB();
- SQ_Utils::exifRotate(QString::null, ret, tab->orient);
+ SQ_Utils::exifRotate(TQString(), ret, tab->orient);
return ret;
}
@@ -844,16 +844,16 @@ void SQ_GLWidget::slotShowNav()
void SQ_GLWidget::initAccelsAndMenu()
{
- QPopupMenu *menuRotate = new QPopupMenu(menu);
- QPopupMenu *menuZoom = new QPopupMenu(menu);
- QPopupMenu *menuMove = new QPopupMenu(menu);
+ TQPopupMenu *menuRotate = new TQPopupMenu(menu);
+ TQPopupMenu *menuZoom = new TQPopupMenu(menu);
+ TQPopupMenu *menuMove = new TQPopupMenu(menu);
#ifndef KSQUIRREL_PART
- QPopupMenu *menuWindow = new QPopupMenu(menu);
+ TQPopupMenu *menuWindow = new TQPopupMenu(menu);
#endif
- menuImage = new QPopupMenu(menu);
- menuFile = new QPopupMenu(menu);
+ menuImage = new TQPopupMenu(menu);
+ menuFile = new TQPopupMenu(menu);
menu->insertItem(SQ_IconLoader::instance()->loadIcon("icons", KIcon::Desktop, KIcon::SizeSmall), i18n("File"), menuFile);
menu->insertItem(SQ_IconLoader::instance()->loadIcon("view_orientation", KIcon::Desktop, KIcon::SizeSmall), i18n("Rotate"), menuRotate);
@@ -867,192 +867,192 @@ void SQ_GLWidget::initAccelsAndMenu()
menu->insertItem(i18n("Image"), menuImage);
#define SQ_ADD_KACTION(b) \
- (new KAction(QString::null, b, this, SLOT(slotAccelActivated()), ac, QString::fromLatin1("action_%1").arg(b)))
+ (new KAction(TQString(), b, TQT_TQOBJECT(this), TQT_SLOT(slotAccelActivated()), ac, TQString::tqfromLatin1("action_%1").tqarg(b)))
- id_saveas = menuFile->insertItem(SQ_IconLoader::instance()->loadIcon("filesaveas", KIcon::Desktop, KIcon::SizeSmall), i18n("Save As...") + "\tS", SQ_ADD_KACTION(Qt::Key_S), SLOT(activate()));
+ id_saveas = menuFile->insertItem(SQ_IconLoader::instance()->loadIcon("filesaveas", KIcon::Desktop, KIcon::SizeSmall), i18n("Save As...") + "\tS", SQ_ADD_KACTION(TQt::Key_S), TQT_SLOT(activate()));
#ifndef KSQUIRREL_PART
menuFile->insertSeparator();
- menuFile->insertItem(QPixmap(locate("data", "images/menu/next16.png")), i18n("Next") + "\tPageDown", SQ_ADD_KACTION(Qt::Key_PageDown), SLOT(activate()));
- menuFile->insertItem(QPixmap(locate("data", "images/menu/prev16.png")), i18n("Previous") + "\tPageUp", SQ_ADD_KACTION(Qt::Key_PageUp), SLOT(activate()));
- menuFile->insertItem(QPixmap(locate("data", "images/menu/first16.png")), i18n("First") + "\tHome", SQ_ADD_KACTION(Qt::Key_Home), SLOT(activate()));
- menuFile->insertItem(QPixmap(locate("data", "images/menu/last16.png")), i18n("Last") + "\tEnd", SQ_ADD_KACTION(Qt::Key_End), SLOT(activate()));
+ menuFile->insertItem(TQPixmap(locate("data", "images/menu/next16.png")), i18n("Next") + "\tPageDown", SQ_ADD_KACTION(TQt::Key_PageDown), TQT_SLOT(activate()));
+ menuFile->insertItem(TQPixmap(locate("data", "images/menu/prev16.png")), i18n("Previous") + "\tPageUp", SQ_ADD_KACTION(TQt::Key_PageUp), TQT_SLOT(activate()));
+ menuFile->insertItem(TQPixmap(locate("data", "images/menu/first16.png")), i18n("First") + "\tHome", SQ_ADD_KACTION(TQt::Key_Home), TQT_SLOT(activate()));
+ menuFile->insertItem(TQPixmap(locate("data", "images/menu/last16.png")), i18n("Last") + "\tEnd", SQ_ADD_KACTION(TQt::Key_End), TQT_SLOT(activate()));
#endif
menuFile->insertSeparator();
- id_f5 = menuFile->insertItem(i18n("Copy to...") + "\tF5", SQ_ADD_KACTION(Qt::Key_F5), SLOT(activate()));
- id_f6 = menuFile->insertItem(i18n("Move to...") + "\tF6", SQ_ADD_KACTION(Qt::Key_F7), SLOT(activate()));
- id_f7 = menuFile->insertItem(i18n("Copy to last folder") + "\tF7", SQ_ADD_KACTION(Qt::Key_F6), SLOT(activate()));
- id_f8 = menuFile->insertItem(i18n("Move to last folder") + "\tF8", SQ_ADD_KACTION(Qt::Key_F8), SLOT(activate()));
+ id_f5 = menuFile->insertItem(i18n("Copy to...") + "\tF5", SQ_ADD_KACTION(TQt::Key_F5), TQT_SLOT(activate()));
+ id_f6 = menuFile->insertItem(i18n("Move to...") + "\tF6", SQ_ADD_KACTION(TQt::Key_F7), TQT_SLOT(activate()));
+ id_f7 = menuFile->insertItem(i18n("Copy to last folder") + "\tF7", SQ_ADD_KACTION(TQt::Key_F6), TQT_SLOT(activate()));
+ id_f8 = menuFile->insertItem(i18n("Move to last folder") + "\tF8", SQ_ADD_KACTION(TQt::Key_F8), TQT_SLOT(activate()));
menuFile->insertSeparator();
- id_del = menuFile->insertItem(i18n("Delete") + "\tDelete", SQ_ADD_KACTION(Qt::Key_Delete), SLOT(activate()));
+ id_del = menuFile->insertItem(i18n("Delete") + "\tDelete", SQ_ADD_KACTION(TQt::Key_Delete), TQT_SLOT(activate()));
- menuRotate->insertItem(QPixmap(locate("data", "images/menu/rotateLeft16.png")), i18n("Rotate left") + "\tCtrl+Left", SQ_ADD_KACTION(Qt::Key_Left+CTRL), SLOT(activate()));
- menuRotate->insertItem(QPixmap(locate("data", "images/menu/rotateRight16.png")), i18n("Rotate right") + "\tCtrl+Right", SQ_ADD_KACTION(Qt::Key_Right+CTRL), SLOT(activate()));
+ menuRotate->insertItem(TQPixmap(locate("data", "images/menu/rotateLeft16.png")), i18n("Rotate left") + "\tCtrl+Left", SQ_ADD_KACTION(TQt::Key_Left+CTRL), TQT_SLOT(activate()));
+ menuRotate->insertItem(TQPixmap(locate("data", "images/menu/rotateRight16.png")), i18n("Rotate right") + "\tCtrl+Right", SQ_ADD_KACTION(TQt::Key_Right+CTRL), TQT_SLOT(activate()));
menuRotate->insertSeparator();
- menuRotate->insertItem(QPixmap(locate("data", "images/menu/18016.png")), i18n("Rotate 180'") + "\tCtrl+Up", SQ_ADD_KACTION(Qt::Key_Up+CTRL), SLOT(activate()));
+ menuRotate->insertItem(TQPixmap(locate("data", "images/menu/18016.png")), i18n("Rotate 180'") + "\tCtrl+Up", SQ_ADD_KACTION(TQt::Key_Up+CTRL), TQT_SLOT(activate()));
menuRotate->insertSeparator();
- menuRotate->insertItem(i18n("Rotate 1' left") + "\tAlt+Left", SQ_ADD_KACTION(Qt::Key_Left+ALT), SLOT(activate()));
- menuRotate->insertItem(i18n("Rotate 1' right") + "\tAlt+Right", SQ_ADD_KACTION(Qt::Key_Right+ALT), SLOT(activate()));
+ menuRotate->insertItem(i18n("Rotate 1' left") + "\tAlt+Left", SQ_ADD_KACTION(TQt::Key_Left+ALT), TQT_SLOT(activate()));
+ menuRotate->insertItem(i18n("Rotate 1' right") + "\tAlt+Right", SQ_ADD_KACTION(TQt::Key_Right+ALT), TQT_SLOT(activate()));
- menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom+16.png")), i18n("Zoom +") + "\t+", SQ_ADD_KACTION(Qt::Key_Plus), SLOT(activate()));
- menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom-16.png")), i18n("Zoom -") + "\t-", SQ_ADD_KACTION(Qt::Key_Minus), SLOT(activate()));
- menuZoom->insertItem(i18n("Zoom 2x") + "\tCtrl++", SQ_ADD_KACTION(Qt::Key_Plus+CTRL), SLOT(activate()));
- menuZoom->insertItem(i18n("Zoom 1/2x") + "\tCtrl+-", SQ_ADD_KACTION(Qt::Key_Minus+CTRL), SLOT(activate()));
+ menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom+16.png")), i18n("Zoom +") + "\t+", SQ_ADD_KACTION(TQt::Key_Plus), TQT_SLOT(activate()));
+ menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom-16.png")), i18n("Zoom -") + "\t-", SQ_ADD_KACTION(TQt::Key_Minus), TQT_SLOT(activate()));
+ menuZoom->insertItem(i18n("Zoom 2x") + "\tCtrl++", SQ_ADD_KACTION(TQt::Key_Plus+CTRL), TQT_SLOT(activate()));
+ menuZoom->insertItem(i18n("Zoom 1/2x") + "\tCtrl+-", SQ_ADD_KACTION(TQt::Key_Minus+CTRL), TQT_SLOT(activate()));
menuZoom->insertSeparator();
- menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom10016.png")), QString::fromLatin1("100%") + "\t1", SQ_ADD_KACTION(Qt::Key_1), SLOT(activate()));
- menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom20016.png")), QString::fromLatin1("200%") + "\t2", SQ_ADD_KACTION(Qt::Key_2), SLOT(activate()));
- menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom30016.png")), QString::fromLatin1("300%") + "\t3", SQ_ADD_KACTION(Qt::Key_3), SLOT(activate()));
- menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom50016.png")), QString::fromLatin1("500%") + "\t5", SQ_ADD_KACTION(Qt::Key_5), SLOT(activate()));
- menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom70016.png")), QString::fromLatin1("700%") + "\t7", SQ_ADD_KACTION(Qt::Key_7), SLOT(activate()));
- menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom90016.png")), QString::fromLatin1("900%") + "\t9", SQ_ADD_KACTION(Qt::Key_9), SLOT(activate()));
- menuZoom->insertItem(QPixmap(locate("data", "images/menu/zoom100016.png")), QString::fromLatin1("1000%") + "\t0", SQ_ADD_KACTION(Qt::Key_0), SLOT(activate()));
-
- menuMove->insertItem(QPixmap(locate("data", "images/menu/moveLeft16.png")), i18n("Move left") + "\tRight", SQ_ADD_KACTION(Qt::Key_Right), SLOT(activate()));
- menuMove->insertItem(QPixmap(locate("data", "images/menu/moveRight16.png")), i18n("Move right") + "\tLeft", SQ_ADD_KACTION(Qt::Key_Left), SLOT(activate()));
- menuMove->insertItem(QPixmap(locate("data", "images/menu/moveUp16.png")), i18n("Move up") + "\tDown", SQ_ADD_KACTION(Qt::Key_Down), SLOT(activate()));
- menuMove->insertItem(QPixmap(locate("data", "images/menu/moveDown16.png")), i18n("Move down") + "\tUp", SQ_ADD_KACTION(Qt::Key_Up), SLOT(activate()));
-
- menuImage->insertItem(QPixmap(locate("data", "images/menu/animate16.png")), i18n("Start/stop animation") + "\tA", SQ_ADD_KACTION(Qt::Key_A), SLOT(activate()));
- menuImage->insertItem(QPixmap(locate("data", "images/menu/background16.png")), i18n("Hide/show background") + "\tB", SQ_ADD_KACTION(Qt::Key_B), SLOT(activate()));
- menuImage->insertItem(QPixmap(locate("data", "images/menu/tickmarks16.png")), i18n("Hide/show tickmarks") + "\tK", SQ_ADD_KACTION(Qt::Key_K), SLOT(activate()));
+ menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom10016.png")), TQString::tqfromLatin1("100%") + "\t1", SQ_ADD_KACTION(TQt::Key_1), TQT_SLOT(activate()));
+ menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom20016.png")), TQString::tqfromLatin1("200%") + "\t2", SQ_ADD_KACTION(TQt::Key_2), TQT_SLOT(activate()));
+ menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom30016.png")), TQString::tqfromLatin1("300%") + "\t3", SQ_ADD_KACTION(TQt::Key_3), TQT_SLOT(activate()));
+ menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom50016.png")), TQString::tqfromLatin1("500%") + "\t5", SQ_ADD_KACTION(TQt::Key_5), TQT_SLOT(activate()));
+ menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom70016.png")), TQString::tqfromLatin1("700%") + "\t7", SQ_ADD_KACTION(TQt::Key_7), TQT_SLOT(activate()));
+ menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom90016.png")), TQString::tqfromLatin1("900%") + "\t9", SQ_ADD_KACTION(TQt::Key_9), TQT_SLOT(activate()));
+ menuZoom->insertItem(TQPixmap(locate("data", "images/menu/zoom100016.png")), TQString::tqfromLatin1("1000%") + "\t0", SQ_ADD_KACTION(TQt::Key_0), TQT_SLOT(activate()));
+
+ menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveLeft16.png")), i18n("Move left") + "\tRight", SQ_ADD_KACTION(TQt::Key_Right), TQT_SLOT(activate()));
+ menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveRight16.png")), i18n("Move right") + "\tLeft", SQ_ADD_KACTION(TQt::Key_Left), TQT_SLOT(activate()));
+ menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveUp16.png")), i18n("Move up") + "\tDown", SQ_ADD_KACTION(TQt::Key_Down), TQT_SLOT(activate()));
+ menuMove->insertItem(TQPixmap(locate("data", "images/menu/moveDown16.png")), i18n("Move down") + "\tUp", SQ_ADD_KACTION(TQt::Key_Up), TQT_SLOT(activate()));
+
+ menuImage->insertItem(TQPixmap(locate("data", "images/menu/animate16.png")), i18n("Start/stop animation") + "\tA", SQ_ADD_KACTION(TQt::Key_A), TQT_SLOT(activate()));
+ menuImage->insertItem(TQPixmap(locate("data", "images/menu/background16.png")), i18n("Hide/show background") + "\tB", SQ_ADD_KACTION(TQt::Key_B), TQT_SLOT(activate()));
+ menuImage->insertItem(TQPixmap(locate("data", "images/menu/tickmarks16.png")), i18n("Hide/show tickmarks") + "\tK", SQ_ADD_KACTION(TQt::Key_K), TQT_SLOT(activate()));
menuImage->insertSeparator();
- menuImage->insertItem(QPixmap(locate("data", "images/menu/flipV16.png")), i18n("Flip vertically") + "\tV", SQ_ADD_KACTION(Qt::Key_V), SLOT(activate()));
- menuImage->insertItem(QPixmap(locate("data", "images/menu/flipH16.png")), i18n("Flip horizontally") + "\tH", SQ_ADD_KACTION(Qt::Key_H), SLOT(activate()));
+ menuImage->insertItem(TQPixmap(locate("data", "images/menu/flipV16.png")), i18n("Flip vertically") + "\tV", SQ_ADD_KACTION(TQt::Key_V), TQT_SLOT(activate()));
+ menuImage->insertItem(TQPixmap(locate("data", "images/menu/flipH16.png")), i18n("Flip horizontally") + "\tH", SQ_ADD_KACTION(TQt::Key_H), TQT_SLOT(activate()));
menuImage->insertSeparator();
- menuImage->insertItem(QPixmap(locate("data", "images/menu/page116.png")), i18n("First page") + "\tF1", SQ_ADD_KACTION(Qt::Key_F1), SLOT(activate()));
- menuImage->insertItem(QPixmap(locate("data", "images/menu/page216.png")), i18n("Previous page") + "\tF2", SQ_ADD_KACTION(Qt::Key_F2), SLOT(activate()));
- menuImage->insertItem(QPixmap(locate("data", "images/menu/page316.png")), i18n("Next page") + "\tF3", SQ_ADD_KACTION(Qt::Key_F3), SLOT(activate()));
- menuImage->insertItem(QPixmap(locate("data", "images/menu/page416.png")), i18n("Last page") + "\tF4", SQ_ADD_KACTION(Qt::Key_F4), SLOT(activate()));
+ menuImage->insertItem(TQPixmap(locate("data", "images/menu/page116.png")), i18n("First page") + "\tF1", SQ_ADD_KACTION(TQt::Key_F1), TQT_SLOT(activate()));
+ menuImage->insertItem(TQPixmap(locate("data", "images/menu/page216.png")), i18n("Previous page") + "\tF2", SQ_ADD_KACTION(TQt::Key_F2), TQT_SLOT(activate()));
+ menuImage->insertItem(TQPixmap(locate("data", "images/menu/page316.png")), i18n("Next page") + "\tF3", SQ_ADD_KACTION(TQt::Key_F3), TQT_SLOT(activate()));
+ menuImage->insertItem(TQPixmap(locate("data", "images/menu/page416.png")), i18n("Last page") + "\tF4", SQ_ADD_KACTION(TQt::Key_F4), TQT_SLOT(activate()));
menuImage->insertSeparator();
- menuImage->insertItem(i18n("Copy file url") + "\tF9", SQ_ADD_KACTION(Qt::Key_F9), SLOT(activate()));
- menuImage->insertItem(i18n("To clipboard") + "\tQ", SQ_ADD_KACTION(Qt::Key_Q), SLOT(activate()));
- menuImage->insertItem(i18n("Print") + "\tCtrl+P", SQ_ADD_KACTION(Qt::Key_P+CTRL), SLOT(activate()));
+ menuImage->insertItem(i18n("Copy file url") + "\tF9", SQ_ADD_KACTION(TQt::Key_F9), TQT_SLOT(activate()));
+ menuImage->insertItem(i18n("To clipboard") + "\tQ", SQ_ADD_KACTION(TQt::Key_Q), TQT_SLOT(activate()));
+ menuImage->insertItem(i18n("Print") + "\tCtrl+P", SQ_ADD_KACTION(TQt::Key_P+CTRL), TQT_SLOT(activate()));
menuImage->insertSeparator();
- id_settings = menuImage->insertItem(SQ_IconLoader::instance()->loadIcon("configure", KIcon::Desktop, KIcon::SizeSmall), i18n("Codec settings") + "\tC", SQ_ADD_KACTION(Qt::Key_C), SLOT(activate()));
+ id_settings = menuImage->insertItem(SQ_IconLoader::instance()->loadIcon("configure", KIcon::Desktop, KIcon::SizeSmall), i18n("Codec settings") + "\tC", SQ_ADD_KACTION(TQt::Key_C), TQT_SLOT(activate()));
menuImage->setItemEnabled(id_settings, false);
menuImage->insertSeparator();
- menuImage->insertItem(i18n("Color balance...") + "\tD", SQ_ADD_KACTION(Qt::Key_D), SLOT(activate()));
- menuImage->insertItem(i18n("Apply filter...") + "\tU", SQ_ADD_KACTION(Qt::Key_U), SLOT(activate()));
+ menuImage->insertItem(i18n("Color balance...") + "\tD", SQ_ADD_KACTION(TQt::Key_D), TQT_SLOT(activate()));
+ menuImage->insertItem(i18n("Apply filter...") + "\tU", SQ_ADD_KACTION(TQt::Key_U), TQT_SLOT(activate()));
- menuImage->insertItem(i18n("Crop") + "\tY", SQ_ADD_KACTION(Qt::Key_Y), SLOT(activate()));
+ menuImage->insertItem(i18n("Crop") + "\tY", SQ_ADD_KACTION(TQt::Key_Y), TQT_SLOT(activate()));
#ifndef KSQUIRREL_PART
- menuWindow->insertItem(QPixmap(locate("data", "images/menu/fullscreen16.png")), i18n("Fullscreen") + "\tF", SQ_ADD_KACTION(Qt::Key_F), SLOT(activate()));
+ menuWindow->insertItem(TQPixmap(locate("data", "images/menu/fullscreen16.png")), i18n("Fullscreen") + "\tF", SQ_ADD_KACTION(TQt::Key_F), TQT_SLOT(activate()));
menuWindow->insertSeparator();
- menuWindow->insertItem(i18n("Previous tab") + "\tShift+Left", SQ_ADD_KACTION(Qt::Key_Left+SHIFT), SLOT(activate()));
- menuWindow->insertItem(i18n("Next tab") + "\tShift+Right", SQ_ADD_KACTION(Qt::Key_Right+SHIFT), SLOT(activate()));
+ menuWindow->insertItem(i18n("Previous tab") + "\tShift+Left", SQ_ADD_KACTION(TQt::Key_Left+SHIFT), TQT_SLOT(activate()));
+ menuWindow->insertItem(i18n("Next tab") + "\tShift+Right", SQ_ADD_KACTION(TQt::Key_Right+SHIFT), TQT_SLOT(activate()));
menuWindow->insertSeparator();
- menuWindow->insertItem(i18n("Close tab") + "\tW", SQ_ADD_KACTION(Qt::Key_W), SLOT(activate()));
+ menuWindow->insertItem(i18n("Close tab") + "\tW", SQ_ADD_KACTION(TQt::Key_W), TQT_SLOT(activate()));
- menuWindow->insertItem(i18n("Close all tabs") + "\tCtrl+W", SQ_ADD_KACTION(Qt::Key_W+CTRL), SLOT(activate()));
+ menuWindow->insertItem(i18n("Close all tabs") + "\tCtrl+W", SQ_ADD_KACTION(TQt::Key_W+CTRL), TQT_SLOT(activate()));
#endif
menu->insertSeparator();
- menu->insertItem(QPixmap(locate("data", "images/menu/reset16.png")), i18n("Reset") + "\tR", SQ_ADD_KACTION(Qt::Key_R), SLOT(activate()));
- id_prop = menu->insertItem(QPixmap(locate("data", "images/menu/prop16.png")), i18n("Properties") + "\tP", SQ_ADD_KACTION(Qt::Key_P), SLOT(activate()));
+ menu->insertItem(TQPixmap(locate("data", "images/menu/reset16.png")), i18n("Reset") + "\tR", SQ_ADD_KACTION(TQt::Key_R), TQT_SLOT(activate()));
+ id_prop = menu->insertItem(TQPixmap(locate("data", "images/menu/prop16.png")), i18n("Properties") + "\tP", SQ_ADD_KACTION(TQt::Key_P), TQT_SLOT(activate()));
menu->insertSeparator();
- menu->insertItem(i18n("Hotkeys") + "\t/", SQ_ADD_KACTION(Qt::Key_Slash), SLOT(activate()));
+ menu->insertItem(i18n("Hotkeys") + "\t/", SQ_ADD_KACTION(TQt::Key_Slash), TQT_SLOT(activate()));
#ifndef KSQUIRREL_PART
menu->insertSeparator();
- menu->insertItem(QPixmap(locate("data", "images/menu/close16.png")), i18n("Close") + "\tX", SQ_ADD_KACTION(Qt::Key_X), SLOT(activate()));
+ menu->insertItem(TQPixmap(locate("data", "images/menu/close16.png")), i18n("Close") + "\tX", SQ_ADD_KACTION(TQt::Key_X), TQT_SLOT(activate()));
#endif
- SQ_ADD_KACTION(Qt::Key_Down+CTRL);
- SQ_ADD_KACTION(Qt::Key_Equal);
- SQ_ADD_KACTION(Qt::Key_Equal+CTRL);
- SQ_ADD_KACTION(Qt::Key_N);
- SQ_ADD_KACTION(Qt::Key_Space);
- SQ_ADD_KACTION(Qt::Key_BackSpace);
- SQ_ADD_KACTION(Qt::Key_Escape);
- SQ_ADD_KACTION(Qt::Key_Return);
- SQ_ADD_KACTION(Qt::Key_Enter);
- SQ_ADD_KACTION(Qt::Key_Z);
- SQ_ADD_KACTION(Qt::Key_I);
- SQ_ADD_KACTION(Qt::Key_E);
+ SQ_ADD_KACTION(TQt::Key_Down+CTRL);
+ SQ_ADD_KACTION(TQt::Key_Equal);
+ SQ_ADD_KACTION(TQt::Key_Equal+CTRL);
+ SQ_ADD_KACTION(TQt::Key_N);
+ SQ_ADD_KACTION(TQt::Key_Space);
+ SQ_ADD_KACTION(TQt::Key_BackSpace);
+ SQ_ADD_KACTION(TQt::Key_Escape);
+ SQ_ADD_KACTION(TQt::Key_Return);
+ SQ_ADD_KACTION(TQt::Key_Enter);
+ SQ_ADD_KACTION(TQt::Key_Z);
+ SQ_ADD_KACTION(TQt::Key_I);
+ SQ_ADD_KACTION(TQt::Key_E);
#ifndef KSQUIRREL_PART
- SQ_ADD_KACTION(Qt::Key_R+CTRL);
- SQ_ADD_KACTION(Qt::Key_E+CTRL);
- SQ_ADD_KACTION(Qt::Key_C+CTRL);
+ SQ_ADD_KACTION(TQt::Key_R+CTRL);
+ SQ_ADD_KACTION(TQt::Key_E+CTRL);
+ SQ_ADD_KACTION(TQt::Key_C+CTRL);
#endif
- SQ_ADD_KACTION(Qt::Key_Menu);
- SQ_ADD_KACTION(Qt::Key_M);
- SQ_ADD_KACTION(Qt::Key_4);
- SQ_ADD_KACTION(Qt::Key_6);
- SQ_ADD_KACTION(Qt::Key_8);
- SQ_ADD_KACTION(Qt::Key_Comma);
- SQ_ADD_KACTION(Qt::Key_Period);
- SQ_ADD_KACTION(Qt::Key_Asterisk);
- SQ_ADD_KACTION(Qt::Key_L);
+ SQ_ADD_KACTION(TQt::Key_Menu);
+ SQ_ADD_KACTION(TQt::Key_M);
+ SQ_ADD_KACTION(TQt::Key_4);
+ SQ_ADD_KACTION(TQt::Key_6);
+ SQ_ADD_KACTION(TQt::Key_8);
+ SQ_ADD_KACTION(TQt::Key_Comma);
+ SQ_ADD_KACTION(TQt::Key_Period);
+ SQ_ADD_KACTION(TQt::Key_Asterisk);
+ SQ_ADD_KACTION(TQt::Key_L);
}
void SQ_GLWidget::slotAccelActivated()
{
- KAction *accel = static_cast<KAction *>(const_cast<QObject *>(sender()));
+ KAction *accel = static_cast<KAction *>(TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME *>(sender())));
KShortcut ks = accel->shortcut();
- if(!ks.compare(Qt::Key_Left)) matrix_move(movefactor, 0);
- else if(!ks.compare(Qt::Key_Right)) matrix_move(-movefactor, 0);
- else if(!ks.compare(Qt::Key_Up)) matrix_move(0, -movefactor);
- else if(!ks.compare(Qt::Key_Down)) matrix_move(0, movefactor);
- else if(!ks.compare(Qt::Key_Equal) ||
- !ks.compare(Qt::Key_Plus)) slotZoomPlus();
- else if(!ks.compare(Qt::Key_Minus)) slotZoomMinus();
- else if(!ks.compare(Qt::Key_Equal+CTRL) ||
- !ks.compare(Qt::Key_Plus+CTRL)) matrix_zoom(2.0f);
- else if(!ks.compare(Qt::Key_Minus+CTRL)) matrix_zoom(0.5f);
- else if(!ks.compare(Qt::Key_Q)) toClipboard();
- else if(!ks.compare(Qt::Key_V)) slotFlipV();
- else if(!ks.compare(Qt::Key_H)) slotFlipH();
- else if(!ks.compare(Qt::Key_Left+CTRL)) slotRotateLeft();
- else if(!ks.compare(Qt::Key_Right+CTRL)) slotRotateRight();
- else if(!ks.compare(Qt::Key_R)) slotMatrixReset();
- else if(!ks.compare(Qt::Key_Up+CTRL)) matrix_rotate(180.0f);
- else if(!ks.compare(Qt::Key_Down+CTRL)) matrix_rotate(-180.0f);
- else if(!ks.compare(Qt::Key_Left+ALT)) matrix_rotate(-1.0f);
- else if(!ks.compare(Qt::Key_Right+ALT)) matrix_rotate(1.0f);
+ if(!ks.compare(TQt::Key_Left)) matrix_move(movefactor, 0);
+ else if(!ks.compare(TQt::Key_Right)) matrix_move(-movefactor, 0);
+ else if(!ks.compare(TQt::Key_Up)) matrix_move(0, -movefactor);
+ else if(!ks.compare(TQt::Key_Down)) matrix_move(0, movefactor);
+ else if(!ks.compare(TQt::Key_Equal) ||
+ !ks.compare(TQt::Key_Plus)) slotZoomPlus();
+ else if(!ks.compare(TQt::Key_Minus)) slotZoomMinus();
+ else if(!ks.compare(TQt::Key_Equal+CTRL) ||
+ !ks.compare(TQt::Key_Plus+CTRL)) matrix_zoom(2.0f);
+ else if(!ks.compare(TQt::Key_Minus+CTRL)) matrix_zoom(0.5f);
+ else if(!ks.compare(TQt::Key_Q)) toClipboard();
+ else if(!ks.compare(TQt::Key_V)) slotFlipV();
+ else if(!ks.compare(TQt::Key_H)) slotFlipH();
+ else if(!ks.compare(TQt::Key_Left+CTRL)) slotRotateLeft();
+ else if(!ks.compare(TQt::Key_Right+CTRL)) slotRotateRight();
+ else if(!ks.compare(TQt::Key_R)) slotMatrixReset();
+ else if(!ks.compare(TQt::Key_Up+CTRL)) matrix_rotate(180.0f);
+ else if(!ks.compare(TQt::Key_Down+CTRL)) matrix_rotate(-180.0f);
+ else if(!ks.compare(TQt::Key_Left+ALT)) matrix_rotate(-1.0f);
+ else if(!ks.compare(TQt::Key_Right+ALT)) matrix_rotate(1.0f);
#ifndef KSQUIRREL_PART
- else if(!ks.compare(Qt::Key_Left+SHIFT)) SQ_GLView::window()->leftTab();
- else if(!ks.compare(Qt::Key_Right+SHIFT)) SQ_GLView::window()->rightTab();
- else if(!ks.compare(Qt::Key_W)) slotCloseRequest(SQ_GLView::window()->tabbar()->indexOf(SQ_GLView::window()->tabbar()->currentTab()));
- else if(!ks.compare(Qt::Key_W+CTRL)) closeAllTabsFull();
+ else if(!ks.compare(TQt::Key_Left+SHIFT)) SQ_GLView::window()->leftTab();
+ else if(!ks.compare(TQt::Key_Right+SHIFT)) SQ_GLView::window()->rightTab();
+ else if(!ks.compare(TQt::Key_W)) slotCloseRequest(SQ_GLView::window()->tabbar()->indexOf(SQ_GLView::window()->tabbar()->currentTab()));
+ else if(!ks.compare(TQt::Key_W+CTRL)) closeAllTabsFull();
#else
- else if(!ks.compare(Qt::Key_W)) closeAllTabsFull();
+ else if(!ks.compare(TQt::Key_W)) closeAllTabsFull();
#endif
- else if(!ks.compare(Qt::Key_N)) updateFilter(!linear);
- else if(!ks.compare(Qt::Key_P)) slotProperties();
- else if(!ks.compare(Qt::Key_C)) slotShowCodecSettings();
+ else if(!ks.compare(TQt::Key_N)) updateFilter(!linear);
+ else if(!ks.compare(TQt::Key_P)) slotProperties();
+ else if(!ks.compare(TQt::Key_C)) slotShowCodecSettings();
#ifndef KSQUIRREL_PART
- else if(!ks.compare(Qt::Key_PageDown) ||
- !ks.compare(Qt::Key_Space)) slotNext();
- else if(!ks.compare(Qt::Key_PageUp) ||
- !ks.compare(Qt::Key_BackSpace)) slotPrev();
- else if(!ks.compare(Qt::Key_X) ||
- !ks.compare(Qt::Key_Escape) ||
- !ks.compare(Qt::Key_Return) ||
- !ks.compare(Qt::Key_Enter)) KSquirrel::app()->closeGLWidget();
- else if(!ks.compare(Qt::Key_Home)) slotFirst();
- else if(!ks.compare(Qt::Key_End)) slotLast();
- else if(!ks.compare(Qt::Key_F)) toggleFullScreen();
+ else if(!ks.compare(TQt::Key_PageDown) ||
+ !ks.compare(TQt::Key_Space)) slotNext();
+ else if(!ks.compare(TQt::Key_PageUp) ||
+ !ks.compare(TQt::Key_BackSpace)) slotPrev();
+ else if(!ks.compare(TQt::Key_X) ||
+ !ks.compare(TQt::Key_Escape) ||
+ !ks.compare(TQt::Key_Return) ||
+ !ks.compare(TQt::Key_Enter)) KSquirrel::app()->closeGLWidget();
+ else if(!ks.compare(TQt::Key_Home)) slotFirst();
+ else if(!ks.compare(TQt::Key_End)) slotLast();
+ else if(!ks.compare(TQt::Key_F)) toggleFullScreen();
#endif
- else if(!ks.compare(Qt::Key_Z)) slotZoomMenu();
- else if(!ks.compare(Qt::Key_S)) saveAs();
- else if(!ks.compare(Qt::Key_A)) slotToggleAnimate();
- else if(!ks.compare(Qt::Key_I)) slotShowImages();
- else if(!ks.compare(Qt::Key_F1)) jumpToImage(false);
- else if(!ks.compare(Qt::Key_F2)) prevImage();
- else if(!ks.compare(Qt::Key_F3)) nextImage();
- else if(!ks.compare(Qt::Key_F4)) jumpToImage(true);
- else if(!ks.compare(Qt::Key_F5) || !ks.compare(Qt::Key_F6))
+ else if(!ks.compare(TQt::Key_Z)) slotZoomMenu();
+ else if(!ks.compare(TQt::Key_S)) saveAs();
+ else if(!ks.compare(TQt::Key_A)) slotToggleAnimate();
+ else if(!ks.compare(TQt::Key_I)) slotShowImages();
+ else if(!ks.compare(TQt::Key_F1)) jumpToImage(false);
+ else if(!ks.compare(TQt::Key_F2)) prevImage();
+ else if(!ks.compare(TQt::Key_F3)) nextImage();
+ else if(!ks.compare(TQt::Key_F4)) jumpToImage(true);
+ else if(!ks.compare(TQt::Key_F5) || !ks.compare(TQt::Key_F6))
{
// select a directory
KURL url = KFileDialog::getExistingURL(lastCopy.prettyURL(), this);
@@ -1063,49 +1063,49 @@ void SQ_GLWidget::slotAccelActivated()
lastCopy = url;
KIO::Job *job;
- if(!ks.compare(Qt::Key_F5))
+ if(!ks.compare(TQt::Key_F5))
job = KIO::copy(tab->m_original, url);
else
job = KIO::move(tab->m_original, url);
job->setWindow(this);
- connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyJobResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyJobResult(KIO::Job *)));
}
- else if(!ks.compare(Qt::Key_F7) || !ks.compare(Qt::Key_F8))
+ else if(!ks.compare(TQt::Key_F7) || !ks.compare(TQt::Key_F8))
{
KIO::Job *job;
- if(!ks.compare(Qt::Key_F6))
+ if(!ks.compare(TQt::Key_F6))
job = KIO::copy(tab->m_original, lastCopy);
else
job = KIO::move(tab->m_original, lastCopy);
job->setWindow(this);
- connect(job, SIGNAL(result(KIO::Job *)), this, SLOT(slotCopyJobResult(KIO::Job *)));
+ connect(job, TQT_SIGNAL(result(KIO::Job *)), TQT_TQOBJECT(this), TQT_SLOT(slotCopyJobResult(KIO::Job *)));
}
- else if(!ks.compare(Qt::Key_F9)) copyURL();
- else if(!ks.compare(Qt::Key_Slash)) slotShowHelp();
- else if(!ks.compare(Qt::Key_B)) toggleDrawingBackground();
- else if(!ks.compare(Qt::Key_K)) toogleTickmarks();
- else if(!ks.compare(Qt::Key_E)) showExternalTools();
- else if(!ks.compare(Qt::Key_Delete)) deleteWrapper();
- else if(!ks.compare(Qt::Key_D)) bcg();
- else if(!ks.compare(Qt::Key_U)) filter();
- else if(!ks.compare(Qt::Key_Y)) crop();
+ else if(!ks.compare(TQt::Key_F9)) copyURL();
+ else if(!ks.compare(TQt::Key_Slash)) slotShowHelp();
+ else if(!ks.compare(TQt::Key_B)) toggleDrawingBackground();
+ else if(!ks.compare(TQt::Key_K)) toogleTickmarks();
+ else if(!ks.compare(TQt::Key_E)) showExternalTools();
+ else if(!ks.compare(TQt::Key_Delete)) deleteWrapper();
+ else if(!ks.compare(TQt::Key_D)) bcg();
+ else if(!ks.compare(TQt::Key_U)) filter();
+ else if(!ks.compare(TQt::Key_Y)) crop();
#ifndef KSQUIRREL_PART
- else if(!ks.compare(Qt::Key_R+CTRL)) slotSelectionRect();
- else if(!ks.compare(Qt::Key_E+CTRL)) slotSelectionEllipse();
- else if(!ks.compare(Qt::Key_C+CTRL)) slotSelectionClear();
+ else if(!ks.compare(TQt::Key_R+CTRL)) slotSelectionRect();
+ else if(!ks.compare(TQt::Key_E+CTRL)) slotSelectionEllipse();
+ else if(!ks.compare(TQt::Key_C+CTRL)) slotSelectionClear();
#endif
- else if(!ks.compare(Qt::Key_P+CTRL)) slotPrint();
- else if(!ks.compare(Qt::Key_Menu) ||
- !ks.compare(Qt::Key_M)) menu->exec(QCursor::pos());
- else if(!ks.compare(Qt::Key_Comma)) slotZoomW();
- else if(!ks.compare(Qt::Key_Period)) slotZoomH();
- else if(!ks.compare(Qt::Key_Asterisk)) slotZoomWH();
- else if(!ks.compare(Qt::Key_L))
+ else if(!ks.compare(TQt::Key_P+CTRL)) slotPrint();
+ else if(!ks.compare(TQt::Key_Menu) ||
+ !ks.compare(TQt::Key_M)) menu->exec(TQCursor::pos());
+ else if(!ks.compare(TQt::Key_Comma)) slotZoomW();
+ else if(!ks.compare(TQt::Key_Period)) slotZoomH();
+ else if(!ks.compare(TQt::Key_Asterisk)) slotZoomWH();
+ else if(!ks.compare(TQt::Key_L))
{
bool b = pAIfLess->isChecked();
pAIfLess->setChecked(!b);
@@ -1115,16 +1115,16 @@ void SQ_GLWidget::slotAccelActivated()
{
int val = -1;
- if(!ks.compare(Qt::Key_1)) val = 1;
- else if(!ks.compare(Qt::Key_2)) val = 2;
- else if(!ks.compare(Qt::Key_3)) val = 3;
- else if(!ks.compare(Qt::Key_4)) val = 4;
- else if(!ks.compare(Qt::Key_5)) val = 5;
- else if(!ks.compare(Qt::Key_6)) val = 6;
- else if(!ks.compare(Qt::Key_7)) val = 7;
- else if(!ks.compare(Qt::Key_8)) val = 8;
- else if(!ks.compare(Qt::Key_9)) val = 9;
- else if(!ks.compare(Qt::Key_0)) val = 10;
+ if(!ks.compare(TQt::Key_1)) val = 1;
+ else if(!ks.compare(TQt::Key_2)) val = 2;
+ else if(!ks.compare(TQt::Key_3)) val = 3;
+ else if(!ks.compare(TQt::Key_4)) val = 4;
+ else if(!ks.compare(TQt::Key_5)) val = 5;
+ else if(!ks.compare(TQt::Key_6)) val = 6;
+ else if(!ks.compare(TQt::Key_7)) val = 7;
+ else if(!ks.compare(TQt::Key_8)) val = 8;
+ else if(!ks.compare(TQt::Key_9)) val = 9;
+ else if(!ks.compare(TQt::Key_0)) val = 10;
if(val != -1)
{
@@ -1214,7 +1214,7 @@ void SQ_GLWidget::crop()
memoryPart *pt;
SQ_GLWidget::findCloserTiles(tab->sw, tab->sh, pp.tilesx, pp.tilesy);
- QPair<int, int> pair = SQ_GLWidget::calcRealDimensions(pp);
+ TQPair<int, int> pair = SQ_GLWidget::calcRealDimensions(pp);
pp.realw = pair.first;
pp.realh = pair.second;
pp.w = tab->sw;
@@ -1224,7 +1224,7 @@ void SQ_GLWidget::crop()
{
KMessageBox::error(this,
i18n("Memory allocation failed for %1 of memory")
- .arg(KIO::convertSize(pp.realw * pp.realh * sizeof(RGBA))));
+ .tqarg(KIO::convertSize(pp.realw * pp.realh * sizeof(RGBA))));
return;
}
@@ -1291,7 +1291,7 @@ void SQ_GLWidget::slotChangeTab(int id)
if(id == -1)
{
SQ_GLView::window()->resetStatusBar();
- KSquirrel::app()->setCaption(QString::null);
+ KSquirrel::app()->setCaption(TQString());
decoded = false;
changeSlider(1.0);
}
@@ -1312,7 +1312,7 @@ void SQ_GLWidget::slotChangeTab(int id)
for(;it != itEnd;++it, ++i)
{
- mid = images->insertItem(QString::fromLatin1("#%1 [%2x%3@%4]").arg(i+1).arg((*it).w).arg((*it).h).arg((*it).bpp));
+ mid = images->insertItem(TQString::tqfromLatin1("#%1 [%2x%3@%4]").tqarg(i+1).tqarg((*it).w).tqarg((*it).h).tqarg((*it).bpp));
images->setItemParameter(mid, i);
if(i == tab->current)
@@ -1388,9 +1388,9 @@ void SQ_GLWidget::slotCloseRequest(int index)
SQ_GLView::window()->tabbar()->blockSignals(false);
// workaround bug in KTabBar
- QMouseEvent ev(QEvent::MouseMove,
- QCursor::pos(),
- SQ_GLView::window()->tabbar()->mapFromGlobal(QCursor::pos()),
+ TQMouseEvent ev(TQEvent::MouseMove,
+ TQCursor::pos(),
+ SQ_GLView::window()->tabbar()->mapFromGlobal(TQCursor::pos()),
Qt::NoButton,
Qt::NoButton);
@@ -1416,7 +1416,7 @@ void SQ_GLWidget::slotCloseRequest(int index)
void SQ_GLWidget::initBrokenImage()
{
memoryPart *pt;
- QImage broken = QPixmap(file_broken_xpm).convertToImage().swapRGB();
+ TQImage broken = TQPixmap(file_broken_xpm).convertToImage().swapRGB();
broken.setAlphaBuffer(true);
parts_broken = new Parts;
@@ -1452,14 +1452,14 @@ void SQ_GLWidget::initBrokenImage()
}
// Accept drop events.
-void SQ_GLWidget::dropEvent(QDropEvent *e)
+void SQ_GLWidget::dropEvent(TQDropEvent *e)
{
- QStringList files;
+ TQStringList files;
- if(QUriDrag::decodeLocalFiles(e, files))
+ if(TQUriDrag::decodeLocalFiles(e, files))
{
// go through array and find first supported image format
- for(QStringList::iterator it = files.begin();it != files.end();++it)
+ for(TQStringList::iterator it = files.begin();it != files.end();++it)
{
if(SQ_LibraryHandler::instance()->libraryForFile(*it))
{
@@ -1474,9 +1474,9 @@ void SQ_GLWidget::dropEvent(QDropEvent *e)
}
// Accept drag events.
-void SQ_GLWidget::dragEnterEvent(QDragEnterEvent *e)
+void SQ_GLWidget::dragEnterEvent(TQDragEnterEvent *e)
{
- e->accept(QUriDrag::canDecode(e));
+ e->accept(TQUriDrag::canDecode(e));
}
/*
@@ -1484,8 +1484,8 @@ void SQ_GLWidget::dragEnterEvent(QDragEnterEvent *e)
*/
void SQ_GLWidget::setClearColor()
{
- QColor color;
- QString path;
+ TQColor color;
+ TQString path;
SQ_Config::instance()->setGroup("GL view");
@@ -1493,7 +1493,7 @@ void SQ_GLWidget::setClearColor()
{
// system color
case 0:
- color = colorGroup().color(QColorGroup::Base);
+ color = tqcolorGroup().color(TQColorGroup::Base);
break;
// custom color
@@ -1601,10 +1601,10 @@ void SQ_GLWidget::toggleDrawingBackground()
void SQ_GLWidget::createMarks()
{
- mm[0] = QImage(locate("data", "images/marks/mark_1.png"));
- mm[1] = QImage(locate("data", "images/marks/mark_2.png"));
- mm[2] = QImage(locate("data", "images/marks/mark_3.png"));
- mm[3] = QImage(locate("data", "images/marks/mark_4.png"));
+ mm[0] = TQImage(locate("data", "images/marks/mark_1.png"));
+ mm[1] = TQImage(locate("data", "images/marks/mark_2.png"));
+ mm[2] = TQImage(locate("data", "images/marks/mark_3.png"));
+ mm[3] = TQImage(locate("data", "images/marks/mark_4.png"));
marks = (mm[0].isNull() || mm[1].isNull() || mm[2].isNull() || mm[3].isNull()) ? false : true;
@@ -1623,10 +1623,10 @@ void SQ_GLWidget::createMarks()
*/
void SQ_GLWidget::updateCurrentFileInfo()
{
- QString status = QString::fromLatin1("%1x%2@%3")
- .arg(tab->finfo.image[tab->current].w)
- .arg(tab->finfo.image[tab->current].h)
- .arg(tab->finfo.image[tab->current].bpp);
+ TQString status = TQString::tqfromLatin1("%1x%2@%3")
+ .tqarg(tab->finfo.image[tab->current].w)
+ .tqarg(tab->finfo.image[tab->current].h)
+ .tqarg(tab->finfo.image[tab->current].bpp);
#ifndef KSQUIRREL_PART
SQ_GLView::window()->sbarWidget("SBDecoded")->setText(status);
@@ -1667,7 +1667,7 @@ void SQ_GLWidget::calcFrameLabelWidth()
#ifndef KSQUIRREL_PART
SQ_GLView::window()->sbarWidget("SBFrame")->setFixedWidth(
SQ_GLView::window()->sbarWidget("SBFrame")->fontMetrics()
- .boundingRect(QString::fromLatin1("0%1/0%2").arg(tab->total).arg(tab->total)).width());
+ .boundingRect(TQString::tqfromLatin1("0%1/0%2").tqarg(tab->total).tqarg(tab->total)).width());
#endif
}
@@ -1680,9 +1680,9 @@ void SQ_GLWidget::calcFrameLabelWidth()
void SQ_GLWidget::frameChanged()
{
#ifndef KSQUIRREL_PART
- SQ_GLView::window()->sbarWidget("SBFrame")->setText(QString::fromLatin1("%1/%2").arg(tab->current+1).arg(tab->total));
+ SQ_GLView::window()->sbarWidget("SBFrame")->setText(TQString::tqfromLatin1("%1/%2").tqarg(tab->current+1).tqarg(tab->total));
#else
- t_glv.sbarWidget("SBFrame")->setText(QString::fromLatin1("%1/%2").arg(tab->current+1).arg(tab->total));
+ t_glv.sbarWidget("SBFrame")->setText(TQString::tqfromLatin1("%1/%2").tqarg(tab->current+1).tqarg(tab->total));
#endif
}
@@ -1705,7 +1705,7 @@ void SQ_GLWidget::closeAllTabsFull()
SQ_GLView::window()->resetStatusBar();
SQ_GLView::window()->tabbar()->hide();
- KSquirrel::app()->setCaption(QString::null);
+ KSquirrel::app()->setCaption(TQString());
#endif
decoded = false;
@@ -1727,17 +1727,17 @@ void SQ_GLWidget::slotPrint()
if(!decoded || tab->broken)
return;
- QImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, QImage::LittleEndian);
- QImage img;
+ TQImage im((uchar *)tab->parts[tab->current].buffer->data(), tab->parts[tab->current].realw, tab->parts[tab->current].realh, 32, 0, 0, TQImage::LittleEndian);
+ TQImage img;
if(gls->valid() && calcSelection())
- img = im.copy(tab->sx, tab->sy, tab->sw, tab->sh).swapRGB();
+ img = TQImage(im.copy(tab->sx, tab->sy, tab->sw, tab->sh)).swapRGB();
else
{
if(tab->parts[tab->current].realw == tab->parts[tab->current].w && tab->parts[tab->current].realh == tab->parts[tab->current].h)
img = im.swapRGB();
else
- img = im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h).swapRGB();
+ img = TQImage(im.copy(0, 0, tab->parts[tab->current].w, tab->parts[tab->current].h)).swapRGB();
}
img.setAlphaBuffer(true);
@@ -1748,20 +1748,20 @@ void SQ_GLWidget::slotPrint()
if(printer.setup(this))
{
- QPainter p(&printer);
+ TQPainter p(&printer);
- QPaintDeviceMetrics mt(&printer);
+ TQPaintDeviceMetrics mt(&printer);
- QSize sz(img.width(), img.height());
+ TQSize sz(img.width(), img.height());
if(img.width() > mt.width() || img.height() > mt.height())
- sz.scale(mt.width(), mt.height(), QSize::ScaleMin);
+ sz.tqscale(mt.width(), mt.height(), TQSize::ScaleMin);
int cp = printer.numCopies();
for(int i = 0;i < cp;i++)
{
- p.drawImage(QRect((mt.width()-sz.width())/2, (mt.height()-sz.height())/2, sz.width(), sz.height()), img);
+ p.drawImage(TQRect((mt.width()-sz.width())/2, (mt.height()-sz.height())/2, sz.width(), sz.height()), img);
if(i < cp-1)
printer.newPage();
@@ -1774,5 +1774,5 @@ void SQ_GLWidget::copyURL()
if(!decoded || tab->broken)
return;
- QApplication::clipboard()->setText(tab->m_original.prettyURL());
+ TQApplication::tqclipboard()->setText(tab->m_original.prettyURL());
}