summaryrefslogtreecommitdiffstats
path: root/digikam/libs/widgets/common
diff options
context:
space:
mode:
Diffstat (limited to 'digikam/libs/widgets/common')
-rw-r--r--digikam/libs/widgets/common/colorgradientwidget.cpp38
-rw-r--r--digikam/libs/widgets/common/colorgradientwidget.h17
-rw-r--r--digikam/libs/widgets/common/curveswidget.cpp176
-rw-r--r--digikam/libs/widgets/common/curveswidget.h25
-rw-r--r--digikam/libs/widgets/common/dcursortracker.cpp48
-rw-r--r--digikam/libs/widgets/common/dcursortracker.h14
-rw-r--r--digikam/libs/widgets/common/dlogoaction.cpp34
-rw-r--r--digikam/libs/widgets/common/dlogoaction.h7
-rw-r--r--digikam/libs/widgets/common/dpopupmenu.cpp66
-rw-r--r--digikam/libs/widgets/common/dpopupmenu.h24
-rw-r--r--digikam/libs/widgets/common/filesaveoptionsbox.cpp48
-rw-r--r--digikam/libs/widgets/common/filesaveoptionsbox.h15
-rw-r--r--digikam/libs/widgets/common/histogramwidget.cpp302
-rw-r--r--digikam/libs/widgets/common/histogramwidget.h25
-rw-r--r--digikam/libs/widgets/common/paniconwidget.cpp82
-rw-r--r--digikam/libs/widgets/common/paniconwidget.h39
-rw-r--r--digikam/libs/widgets/common/previewwidget.cpp126
-rw-r--r--digikam/libs/widgets/common/previewwidget.h35
-rw-r--r--digikam/libs/widgets/common/searchtextbar.cpp94
-rw-r--r--digikam/libs/widgets/common/searchtextbar.h36
-rw-r--r--digikam/libs/widgets/common/sidebar.cpp78
-rw-r--r--digikam/libs/widgets/common/sidebar.h27
-rw-r--r--digikam/libs/widgets/common/splashscreen.cpp58
-rw-r--r--digikam/libs/widgets/common/splashscreen.h15
-rw-r--r--digikam/libs/widgets/common/squeezedcombobox.cpp94
-rw-r--r--digikam/libs/widgets/common/squeezedcombobox.h57
-rw-r--r--digikam/libs/widgets/common/statusled.cpp24
-rw-r--r--digikam/libs/widgets/common/statusled.h9
-rw-r--r--digikam/libs/widgets/common/statusnavigatebar.cpp64
-rw-r--r--digikam/libs/widgets/common/statusnavigatebar.h11
-rw-r--r--digikam/libs/widgets/common/statusprogressbar.cpp44
-rw-r--r--digikam/libs/widgets/common/statusprogressbar.h17
-rw-r--r--digikam/libs/widgets/common/statuszoombar.cpp86
-rw-r--r--digikam/libs/widgets/common/statuszoombar.h25
34 files changed, 938 insertions, 922 deletions
diff --git a/digikam/libs/widgets/common/colorgradientwidget.cpp b/digikam/libs/widgets/common/colorgradientwidget.cpp
index 37908da2..13fdbc69 100644
--- a/digikam/libs/widgets/common/colorgradientwidget.cpp
+++ b/digikam/libs/widgets/common/colorgradientwidget.cpp
@@ -21,11 +21,11 @@
*
* ============================================================ */
-// Qt includes.
+// TQt includes.
-#include <qimage.h>
-#include <qpainter.h>
-#include <qdrawutil.h>
+#include <tqimage.h>
+#include <tqpainter.h>
+#include <tqdrawutil.h>
// KDE includes.
@@ -48,20 +48,20 @@ public:
int orientation;
- QColor color1;
- QColor color2;
+ TQColor color1;
+ TQColor color2;
};
-ColorGradientWidget::ColorGradientWidget(int o, int size, QWidget *parent)
- : QFrame(parent, 0, Qt::WDestructiveClose)
+ColorGradientWidget::ColorGradientWidget(int o, int size, TQWidget *tqparent)
+ : TQFrame(tqparent, 0, TQt::WDestructiveClose)
{
d = new ColorGradientWidgetPriv;
d->orientation = o;
- setFrameStyle(QFrame::Box|QFrame::Plain);
+ setFrameStyle(TQFrame::Box|TQFrame::Plain);
setLineWidth(1);
- if ( d->orientation == Horizontal )
+ if ( d->orientation ==Qt::Horizontal )
setFixedHeight( size );
else
setFixedWidth( size );
@@ -75,25 +75,25 @@ ColorGradientWidget::~ColorGradientWidget()
delete d;
}
-void ColorGradientWidget::setColors( const QColor &col1, const QColor &col2 )
+void ColorGradientWidget::setColors( const TQColor &col1, const TQColor &col2 )
{
d->color1 = col1;
d->color2 = col2;
update();
}
-void ColorGradientWidget::drawContents(QPainter *p)
+void ColorGradientWidget::drawContents(TQPainter *p)
{
- QImage image(contentsRect().width(), contentsRect().height(), 32);
+ TQImage image(contentsRect().width(), contentsRect().height(), 32);
- QColor col, color1, color2;
+ TQColor col, color1, color2;
float scale;
// Widget is disable : drawing grayed frame.
if ( !isEnabled() )
{
- color1 = palette().disabled().foreground();
- color2 = palette().disabled().background();
+ color1 = tqpalette().disabled().foreground();
+ color2 = tqpalette().disabled().background();
}
else
{
@@ -105,7 +105,7 @@ void ColorGradientWidget::drawContents(QPainter *p)
int greenDiff = color2.green() - color1.green();
int blueDiff = color2.blue() - color1.blue();
- if ( d->orientation == Vertical )
+ if ( d->orientation ==Qt::Vertical )
{
for ( int y = 0; y < image.height(); y++ )
{
@@ -141,7 +141,7 @@ void ColorGradientWidget::drawContents(QPainter *p)
}
const int psize = 256;
- QColor ditherPalette[psize];
+ TQColor ditherPalette[psize];
for ( int s = 0; s < psize; s++ )
{
@@ -152,7 +152,7 @@ void ColorGradientWidget::drawContents(QPainter *p)
KImageEffect::dither(image, ditherPalette, psize);
- QPixmap pm;
+ TQPixmap pm;
pm.convertFromImage(image);
p->drawPixmap(contentsRect(), pm);
}
diff --git a/digikam/libs/widgets/common/colorgradientwidget.h b/digikam/libs/widgets/common/colorgradientwidget.h
index 3a7a3364..d9aef44d 100644
--- a/digikam/libs/widgets/common/colorgradientwidget.h
+++ b/digikam/libs/widgets/common/colorgradientwidget.h
@@ -26,8 +26,8 @@
// KDE includes.
-#include <qframe.h>
-#include <qcolor.h>
+#include <tqframe.h>
+#include <tqcolor.h>
// Local includes.
@@ -38,29 +38,30 @@ namespace Digikam
class ColorGradientWidgetPriv;
-class DIGIKAM_EXPORT ColorGradientWidget : public QFrame
+class DIGIKAM_EXPORT ColorGradientWidget : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
public:
enum Orientation
{
- Horizontal=0,
- Vertical
+ Horizontal=0,
+ Vertical
};
public:
- ColorGradientWidget( int o, int size, QWidget *parent=0 );
+ ColorGradientWidget( int o, int size, TQWidget *tqparent=0 );
~ColorGradientWidget();
- void setColors( const QColor &col1, const QColor &col2 );
+ void setColors( const TQColor &col1, const TQColor &col2 );
protected:
- void drawContents(QPainter *);
+ void drawContents(TQPainter *);
private:
diff --git a/digikam/libs/widgets/common/curveswidget.cpp b/digikam/libs/widgets/common/curveswidget.cpp
index bd8737ac..41ab2200 100644
--- a/digikam/libs/widgets/common/curveswidget.cpp
+++ b/digikam/libs/widgets/common/curveswidget.cpp
@@ -28,18 +28,18 @@
#include <cmath>
#include <cstdlib>
-// Qt includes.
-
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qpoint.h>
-#include <qpen.h>
-#include <qevent.h>
-#include <qtimer.h>
-#include <qrect.h>
-#include <qcolor.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
+// TQt includes.
+
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqpoint.h>
+#include <tqpen.h>
+#include <tqevent.h>
+#include <tqtimer.h>
+#include <tqrect.h>
+#include <tqcolor.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
// KDE includes.
@@ -101,14 +101,14 @@ public:
DColor colorGuide;
- QTimer *blinkTimer;
+ TQTimer *blinkTimer;
ImageCurves *curves; // Curves data instance.
};
-CurvesWidget::CurvesWidget(int w, int h, QWidget *parent, bool readOnly)
- : QWidget(parent, 0, Qt::WDestructiveClose)
+CurvesWidget::CurvesWidget(int w, int h, TQWidget *tqparent, bool readOnly)
+ : TQWidget(tqparent, 0, TQt::WDestructiveClose)
{
d = new CurvesWidgetPriv;
@@ -117,8 +117,8 @@ CurvesWidget::CurvesWidget(int w, int h, QWidget *parent, bool readOnly)
CurvesWidget::CurvesWidget(int w, int h,
uchar *i_data, uint i_w, uint i_h, bool i_sixteenBits,
- QWidget *parent, bool readOnly)
- : QWidget(parent, 0, Qt::WDestructiveClose)
+ TQWidget *tqparent, bool readOnly)
+ : TQWidget(tqparent, 0, TQt::WDestructiveClose)
{
d = new CurvesWidgetPriv;
@@ -148,13 +148,13 @@ void CurvesWidget::setup(int w, int h, bool readOnly)
m_imageHistogram = 0;
setMouseTracking(true);
- setPaletteBackgroundColor(colorGroup().background());
+ setPaletteBackgroundColor(tqcolorGroup().background());
setMinimumSize(w, h);
- d->blinkTimer = new QTimer( this );
+ d->blinkTimer = new TQTimer( this );
- connect(d->blinkTimer, SIGNAL(timeout()),
- this, SLOT(slotBlinkTimerDone()));
+ connect(d->blinkTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(slotBlinkTimerDone()));
}
void CurvesWidget::updateData(uchar *i_data, uint i_w, uint i_h, bool i_sixteenBits)
@@ -168,7 +168,7 @@ void CurvesWidget::updateData(uchar *i_data, uint i_w, uint i_h, bool i_sixteenB
delete m_imageHistogram;
// Calc new histogram data
- m_imageHistogram = new ImageHistogram(i_data, i_w, i_h, i_sixteenBits, this);
+ m_imageHistogram = new ImageHistogram(i_data, i_w, i_h, i_sixteenBits, TQT_TQOBJECT(this));
if (d->curves)
delete d->curves;
@@ -184,7 +184,7 @@ void CurvesWidget::reset()
d->grabPoint = -1;
d->guideVisible = false;
- repaint(false);
+ tqrepaint(false);
}
ImageCurves* CurvesWidget::curves() const
@@ -208,7 +208,7 @@ void CurvesWidget::setLoadingFailed()
d->clearFlag = CurvesWidgetPriv::HistogramFailed;
d->pos = 0;
d->blinkTimer->stop();
- repaint(false);
+ tqrepaint(false);
setCursor(KCursor::arrowCursor());
}
@@ -216,7 +216,7 @@ void CurvesWidget::setCurveGuide(const DColor& color)
{
d->guideVisible = true;
d->colorGuide = color;
- repaint(false);
+ tqrepaint(false);
}
void CurvesWidget::curveTypeChanged()
@@ -233,7 +233,7 @@ void CurvesWidget::curveTypeChanged()
0, m_imageHistogram->getHistogramSegment()-1);
d->curves->setCurvePoint( m_channelType,
- i * 2, QPoint(index,
+ i * 2, TQPoint(index,
d->curves->getCurveValue(m_channelType,
index)) );
}
@@ -245,11 +245,11 @@ void CurvesWidget::curveTypeChanged()
break;
}
- repaint(false);
+ tqrepaint(false);
emit signalCurvesChanged();
}
-void CurvesWidget::customEvent(QCustomEvent *event)
+void CurvesWidget::customEvent(TQCustomEvent *event)
{
if (!event) return;
@@ -262,7 +262,7 @@ void CurvesWidget::customEvent(QCustomEvent *event)
setCursor(KCursor::waitCursor());
d->clearFlag = CurvesWidgetPriv::HistogramStarted;
d->blinkTimer->start(200);
- repaint(false);
+ tqrepaint(false);
}
else
{
@@ -271,14 +271,14 @@ void CurvesWidget::customEvent(QCustomEvent *event)
// Repaint histogram
d->clearFlag = CurvesWidgetPriv::HistogramCompleted;
d->blinkTimer->stop();
- repaint(false);
+ tqrepaint(false);
setCursor(KCursor::arrowCursor());
}
else
{
d->clearFlag = CurvesWidgetPriv::HistogramFailed;
d->blinkTimer->stop();
- repaint(false);
+ tqrepaint(false);
setCursor(KCursor::arrowCursor());
emit signalHistogramComputationFailed();
}
@@ -298,11 +298,11 @@ void CurvesWidget::stopHistogramComputation()
void CurvesWidget::slotBlinkTimerDone()
{
- repaint(false);
+ tqrepaint(false);
d->blinkTimer->start(200);
}
-void CurvesWidget::paintEvent(QPaintEvent*)
+void CurvesWidget::paintEvent(TQPaintEvent*)
{
if (d->clearFlag == CurvesWidgetPriv::HistogramDataLoading ||
d->clearFlag == CurvesWidgetPriv::HistogramStarted)
@@ -310,14 +310,14 @@ void CurvesWidget::paintEvent(QPaintEvent*)
// In first, we draw an animation.
int asize = 24;
- QPixmap anim(asize, asize);
- QPainter p2;
- p2.begin(&anim, this);
- p2.fillRect(0, 0, asize, asize, palette().active().background());
+ TQPixmap anim(asize, asize);
+ TQPainter p2;
+ p2.tqbegin(TQT_TQPAINTDEVICE(&anim), this);
+ p2.fillRect(0, 0, asize, asize, tqpalette().active().background());
p2.translate(asize/2, asize/2);
d->pos = (d->pos + 10) % 360;
- p2.setPen(QPen(palette().active().text()));
+ p2.setPen(TQPen(tqpalette().active().text()));
p2.rotate(d->pos);
for ( int i=0 ; i<12 ; i++ )
{
@@ -328,20 +328,20 @@ void CurvesWidget::paintEvent(QPaintEvent*)
// ... and we render busy text.
- QPixmap pm(size());
- QPainter p1;
- p1.begin(&pm, this);
- p1.fillRect(0, 0, width(), height(), palette().active().background());
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ TQPixmap pm(size());
+ TQPainter p1;
+ p1.tqbegin(TQT_TQPAINTDEVICE(&pm), this);
+ p1.fillRect(0, 0, width(), height(), tqpalette().active().background());
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawRect(0, 0, width(), height());
p1.drawPixmap(width()/2 - asize /2, asize, anim);
- p1.setPen(QPen(palette().active().text()));
+ p1.setPen(TQPen(tqpalette().active().text()));
if (d->clearFlag == CurvesWidgetPriv::HistogramDataLoading)
- p1.drawText(0, 0, width(), height(), Qt::AlignCenter,
+ p1.drawText(0, 0, width(), height(), TQt::AlignCenter,
i18n("Loading image..."));
else
- p1.drawText(0, 0, width(), height(), Qt::AlignCenter,
+ p1.drawText(0, 0, width(), height(), TQt::AlignCenter,
i18n("Histogram calculation..."));
p1.end();
@@ -351,14 +351,14 @@ void CurvesWidget::paintEvent(QPaintEvent*)
if (d->clearFlag == CurvesWidgetPriv::HistogramFailed)
{
- QPixmap pm(size());
- QPainter p1;
- p1.begin(&pm, this);
- p1.fillRect(0, 0, width(), height(), palette().active().background());
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ TQPixmap pm(size());
+ TQPainter p1;
+ p1.tqbegin(TQT_TQPAINTDEVICE(&pm), this);
+ p1.fillRect(0, 0, width(), height(), tqpalette().active().background());
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawRect(0, 0, width(), height());
- p1.setPen(QPen(palette().active().text()));
- p1.drawText(0, 0, width(), height(), Qt::AlignCenter,
+ p1.setPen(TQPen(tqpalette().active().text()));
+ p1.drawText(0, 0, width(), height(), TQt::AlignCenter,
i18n("Histogram\ncalculation\nfailed."));
p1.end();
bitBlt(this, 0, 0, &pm);
@@ -414,11 +414,11 @@ void CurvesWidget::paintEvent(QPaintEvent*)
}
// Drawing selection or all histogram values.
- // A QPixmap is used for enable the double buffering.
+ // A TQPixmap is used for enable the double buffering.
- QPixmap pm(size());
- QPainter p1;
- p1.begin(&pm, this);
+ TQPixmap pm(size());
+ TQPainter p1;
+ p1.tqbegin(TQT_TQPAINTDEVICE(&pm), this);
int curvePrevVal = 0;
@@ -483,14 +483,14 @@ void CurvesWidget::paintEvent(QPaintEvent*)
// Drawing histogram
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - y);
- p1.setPen(QPen(palette().active().background(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight - y, x, 0);
// Drawing curves.
- p1.setPen(QPen(palette().active().link(), 2, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().link(), 2, TQt::SolidLine));
p1.drawLine(x - 1, wHeight - ((curvePrevVal * wHeight) / histogram->getHistogramSegment()),
x, wHeight - ((curveVal * wHeight) / histogram->getHistogramSegment()));
@@ -501,11 +501,11 @@ void CurvesWidget::paintEvent(QPaintEvent*)
if (!d->readOnlyMode && d->curves->getCurveType(m_channelType) == ImageCurves::CURVE_SMOOTH)
{
- p1.setPen(QPen(Qt::red, 3, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::red, 3, TQt::SolidLine));
for (int p = 0 ; p < 17 ; p++)
{
- QPoint curvePoint = d->curves->getCurvePoint(m_channelType, p);
+ TQPoint curvePoint = d->curves->getCurvePoint(m_channelType, p);
if (curvePoint.x() >= 0)
{
@@ -518,7 +518,7 @@ void CurvesWidget::paintEvent(QPaintEvent*)
// Drawing black/middle/highlight tone grid separators.
- p1.setPen(QPen(palette().active().base(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
p1.drawLine(wWidth/4, 0, wWidth/4, wHeight);
p1.drawLine(wWidth/2, 0, wWidth/2, wHeight);
p1.drawLine(3*wWidth/4, 0, 3*wWidth/4, wHeight);
@@ -528,16 +528,16 @@ void CurvesWidget::paintEvent(QPaintEvent*)
// Drawing X,Y point position dragged by mouse over widget.
- p1.setPen(QPen(Qt::red, 1, Qt::DotLine));
+ p1.setPen(TQPen(TQt::red, 1, TQt::DotLine));
if (d->xMouseOver != -1 && d->yMouseOver != -1)
{
- QString string = i18n("x:%1\ny:%2").arg(d->xMouseOver).arg(d->yMouseOver);
- QFontMetrics fontMt(string);
- QRect rect = fontMt.boundingRect(0, 0, wWidth, wHeight, 0, string);
+ TQString string = i18n("x:%1\ny:%2").tqarg(d->xMouseOver).tqarg(d->yMouseOver);
+ TQFontMetrics fontMt(string);
+ TQRect rect = fontMt.boundingRect(0, 0, wWidth, wHeight, 0, string);
rect.moveRight(wWidth);
rect.moveBottom(wHeight);
- p1.drawText(rect, Qt::AlignLeft||Qt::AlignTop, string);
+ p1.drawText(rect, TQt::AlignLeft||TQt::AlignTop, string);
}
// Drawing color guide.
@@ -561,7 +561,7 @@ void CurvesWidget::paintEvent(QPaintEvent*)
break;
case CurvesWidget::ValueHistogram:
- guidePos = QMAX(QMAX(d->colorGuide.red(), d->colorGuide.green()), d->colorGuide.blue());
+ guidePos = TQMAX(TQMAX(d->colorGuide.red(), d->colorGuide.green()), d->colorGuide.blue());
break;
default: // Alpha.
@@ -574,41 +574,41 @@ void CurvesWidget::paintEvent(QPaintEvent*)
int xGuide = (guidePos * wWidth) / histogram->getHistogramSegment();
p1.drawLine(xGuide, 0, xGuide, wHeight);
- QString string = i18n("x:%1").arg(guidePos);
- QFontMetrics fontMt( string );
- QRect rect = fontMt.boundingRect(0, 0, wWidth, wHeight, 0, string);
- p1.setPen(QPen(Qt::red, 1, Qt::SolidLine));
+ TQString string = i18n("x:%1").tqarg(guidePos);
+ TQFontMetrics fontMt( string );
+ TQRect rect = fontMt.boundingRect(0, 0, wWidth, wHeight, 0, string);
+ p1.setPen(TQPen(TQt::red, 1, TQt::SolidLine));
rect.moveTop(1);
if (xGuide < wWidth/2)
{
rect.moveLeft(xGuide);
- p1.fillRect(rect, QBrush(QColor(250, 250, 255)));
+ p1.fillRect(rect, TQBrush(TQColor(250, 250, 255)));
p1.drawRect(rect);
rect.moveLeft(xGuide+3);
- p1.drawText(rect, Qt::AlignLeft, string);
+ p1.drawText(rect, TQt::AlignLeft, string);
}
else
{
rect.moveRight(xGuide);
- p1.fillRect(rect, QBrush(QColor(250, 250, 255)));
+ p1.fillRect(rect, TQBrush(TQColor(250, 250, 255)));
p1.drawRect(rect);
rect.moveRight(xGuide-3);
- p1.drawText(rect, Qt::AlignRight, string);
+ p1.drawText(rect, TQt::AlignRight, string);
}
}
}
// Drawing frame.
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawRect(0, 0, width(), height());
p1.end();
bitBlt(this, 0, 0, &pm);
}
-void CurvesWidget::mousePressEvent(QMouseEvent *e)
+void CurvesWidget::mousePressEvent(TQMouseEvent *e)
{
if (d->readOnlyMode || !m_imageHistogram) return;
@@ -678,7 +678,7 @@ void CurvesWidget::mousePressEvent(QMouseEvent *e)
d->grabPoint = closest_point;
d->curves->setCurvePoint(m_channelType, d->grabPoint,
- QPoint(x, m_imageHistogram->getHistogramSegment() - y));
+ TQPoint(x, m_imageHistogram->getHistogramSegment() - y));
break;
}
@@ -694,10 +694,10 @@ void CurvesWidget::mousePressEvent(QMouseEvent *e)
}
d->curves->curvesCalculateCurve(m_channelType);
- repaint(false);
+ tqrepaint(false);
}
-void CurvesWidget::mouseReleaseEvent(QMouseEvent *e)
+void CurvesWidget::mouseReleaseEvent(TQMouseEvent *e)
{
if (d->readOnlyMode || !m_imageHistogram) return;
@@ -707,11 +707,11 @@ void CurvesWidget::mouseReleaseEvent(QMouseEvent *e)
setCursor(KCursor::arrowCursor());
d->grabPoint = -1;
d->curves->curvesCalculateCurve(m_channelType);
- repaint(false);
+ tqrepaint(false);
emit signalCurvesChanged();
}
-void CurvesWidget::mouseMoveEvent(QMouseEvent *e)
+void CurvesWidget::mouseMoveEvent(TQMouseEvent *e)
{
if (d->readOnlyMode || !m_imageHistogram) return;
@@ -771,7 +771,7 @@ void CurvesWidget::mouseMoveEvent(QMouseEvent *e)
d->grabPoint = closest_point;
d->curves->setCurvePoint(m_channelType, d->grabPoint,
- QPoint(x, m_imageHistogram->getHistogramSegment()-1 - y));
+ TQPoint(x, m_imageHistogram->getHistogramSegment()-1 - y));
}
d->curves->curvesCalculateCurve(m_channelType);
@@ -824,15 +824,15 @@ void CurvesWidget::mouseMoveEvent(QMouseEvent *e)
d->xMouseOver = x;
d->yMouseOver = m_imageHistogram->getHistogramSegment()-1 - y;
emit signalMouseMoved(d->xMouseOver, d->yMouseOver);
- repaint(false);
+ tqrepaint(false);
}
-void CurvesWidget::leaveEvent(QEvent*)
+void CurvesWidget::leaveEvent(TQEvent*)
{
d->xMouseOver = -1;
d->yMouseOver = -1;
emit signalMouseMoved(d->xMouseOver, d->yMouseOver);
- repaint(false);
+ tqrepaint(false);
}
} // NameSpace Digikam
diff --git a/digikam/libs/widgets/common/curveswidget.h b/digikam/libs/widgets/common/curveswidget.h
index f1b250cb..a3c397bf 100644
--- a/digikam/libs/widgets/common/curveswidget.h
+++ b/digikam/libs/widgets/common/curveswidget.h
@@ -24,16 +24,16 @@
#ifndef CURVESWIDGET_H
#define CURVESWIDGET_H
-// Qt includes.
+// TQt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// Local includes.
#include "dcolor.h"
#include "digikam_export.h"
-class QCustomEvent;
+class TQCustomEvent;
namespace Digikam
{
@@ -42,9 +42,10 @@ class ImageHistogram;
class ImageCurves;
class CurvesWidgetPriv;
-class DIGIKAM_EXPORT CurvesWidget : public QWidget
+class DIGIKAM_EXPORT CurvesWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -65,12 +66,12 @@ public:
public:
- CurvesWidget(int w, int h, QWidget *parent, bool readOnly=false);
+ CurvesWidget(int w, int h, TQWidget *tqparent, bool readOnly=false);
CurvesWidget(int w, int h, // Widget size.
uchar *i_data, uint i_w, uint i_h, // Full image info.
bool i_sixteenBits, // 8 or 16 bits image.
- QWidget *parent=0, // Parent widget instance.
+ TQWidget *tqparent=0, // Parent widget instance.
bool readOnly=false); // If true : widget with full edition mode capabilities.
// If false : display curve data only without edition.
@@ -111,15 +112,15 @@ protected slots:
protected:
- void paintEvent(QPaintEvent*);
- void mousePressEvent(QMouseEvent*);
- void mouseReleaseEvent(QMouseEvent*);
- void mouseMoveEvent(QMouseEvent*);
- void leaveEvent(QEvent*);
+ void paintEvent(TQPaintEvent*);
+ void mousePressEvent(TQMouseEvent*);
+ void mouseReleaseEvent(TQMouseEvent*);
+ void mouseMoveEvent(TQMouseEvent*);
+ void leaveEvent(TQEvent*);
private:
- void customEvent(QCustomEvent *event);
+ void customEvent(TQCustomEvent *event);
private:
diff --git a/digikam/libs/widgets/common/dcursortracker.cpp b/digikam/libs/widgets/common/dcursortracker.cpp
index f144aeca..c2fe358d 100644
--- a/digikam/libs/widgets/common/dcursortracker.cpp
+++ b/digikam/libs/widgets/common/dcursortracker.cpp
@@ -22,10 +22,10 @@
*
* ============================================================ */
-// Qt includes.
+// TQt includes.
-#include <qevent.h>
-#include <qtooltip.h>
+#include <tqevent.h>
+#include <tqtooltip.h>
// Local includes.
@@ -34,20 +34,20 @@
namespace Digikam
{
-DCursorTracker::DCursorTracker(const QString& txt, QWidget *parent)
- : QLabel(txt, 0, "", WX11BypassWM)
+DCursorTracker::DCursorTracker(const TQString& txt, TQWidget *tqparent)
+ : TQLabel(txt, 0, "", WX11BypassWM)
{
- parent->setMouseTracking(true);
- parent->installEventFilter(this);
+ tqparent->setMouseTracking(true);
+ tqparent->installEventFilter(this);
setEnable(true);
}
/**
* Overload to make sure the widget size is correct
*/
-void DCursorTracker::setText(const QString& txt)
+void DCursorTracker::setText(const TQString& txt)
{
- QLabel::setText(txt);
+ TQLabel::setText(txt);
adjustSize();
}
@@ -56,20 +56,20 @@ void DCursorTracker::setEnable(bool b)
m_enable = b;
}
-bool DCursorTracker::eventFilter(QObject *object, QEvent *e)
+bool DCursorTracker::eventFilter(TQObject *object, TQEvent *e)
{
- QWidget *widget = static_cast<QWidget*>(object);
+ TQWidget *widget = TQT_TQWIDGET(object);
switch (e->type())
{
- case QEvent::MouseMove:
+ case TQEvent::MouseMove:
{
- QMouseEvent *event = static_cast<QMouseEvent*>(e);
- if (m_enable && (widget->rect().contains(event->pos()) ||
- (event->stateAfter() & LeftButton)))
+ TQMouseEvent *event = TQT_TQMOUSEEVENT(e);
+ if (m_enable && (TQT_TQRECT_OBJECT(widget->rect()).tqcontains(event->pos()) ||
+ (event->stateAfter() & Qt::LeftButton)))
{
show();
- QPoint p = widget->mapToGlobal(QPoint(widget->width()/2, 0));
+ TQPoint p = widget->mapToGlobal(TQPoint(widget->width()/2, 0));
move(p.x()-width()/2, p.y()-height());
}
else
@@ -79,10 +79,10 @@ bool DCursorTracker::eventFilter(QObject *object, QEvent *e)
break;
}
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
{
- QMouseEvent* event = static_cast<QMouseEvent*>(e);
- if ( !widget->rect().contains(event->pos()) )
+ TQMouseEvent* event = TQT_TQMOUSEEVENT(e);
+ if ( !TQT_TQRECT_OBJECT(widget->rect()).tqcontains(event->pos()) )
{
hide();
}
@@ -97,13 +97,13 @@ bool DCursorTracker::eventFilter(QObject *object, QEvent *e)
}
-DTipTracker::DTipTracker(const QString& txt, QWidget *parent)
- : DCursorTracker(txt, parent)
+DTipTracker::DTipTracker(const TQString& txt, TQWidget *tqparent)
+ : DCursorTracker(txt, tqparent)
{
- setPalette(QToolTip::palette());
- setFrameStyle(QFrame::Plain | QFrame::Box);
+ setPalette(TQToolTip::palette());
+ setFrameStyle(TQFrame::Plain | TQFrame::Box);
setLineWidth(1);
- setAlignment(AlignAuto | AlignTop);
+ tqsetAlignment(AlignAuto | AlignTop);
}
} // namespace Digikam
diff --git a/digikam/libs/widgets/common/dcursortracker.h b/digikam/libs/widgets/common/dcursortracker.h
index c6a30c15..88665841 100644
--- a/digikam/libs/widgets/common/dcursortracker.h
+++ b/digikam/libs/widgets/common/dcursortracker.h
@@ -25,9 +25,9 @@
#ifndef DCURSOR_TRACKER_H
#define DCURSOR_TRACKER_H
-// Qt includes.
+// TQt includes.
-#include <qlabel.h>
+#include <tqlabel.h>
// Local includes.
@@ -40,19 +40,19 @@ namespace Digikam
* This class implements a decoration-less window which will follow the cursor
* when it's over a specified widget.
*/
-class DIGIKAM_EXPORT DCursorTracker : public QLabel
+class DIGIKAM_EXPORT DCursorTracker : public TQLabel
{
public:
- DCursorTracker(const QString& txt, QWidget *parent);
+ DCursorTracker(const TQString& txt, TQWidget *tqparent);
- void setText(const QString& txt);
+ void setText(const TQString& txt);
void setEnable(bool b);
protected:
- bool eventFilter(QObject*, QEvent*);
+ bool eventFilter(TQObject*, TQEvent*);
private:
@@ -68,7 +68,7 @@ class DTipTracker : public DCursorTracker
public:
- DTipTracker(const QString& txt, QWidget *parent);
+ DTipTracker(const TQString& txt, TQWidget *tqparent);
};
} // namespace Digikam
diff --git a/digikam/libs/widgets/common/dlogoaction.cpp b/digikam/libs/widgets/common/dlogoaction.cpp
index e86bebff..d4b81ab2 100644
--- a/digikam/libs/widgets/common/dlogoaction.cpp
+++ b/digikam/libs/widgets/common/dlogoaction.cpp
@@ -21,10 +21,10 @@
*
* ============================================================ */
-// Qt includes.
+// TQt includes.
-#include <qtooltip.h>
-#include <qpixmap.h>
+#include <tqtooltip.h>
+#include <tqpixmap.h>
// KDE includes.
@@ -43,14 +43,14 @@
namespace Digikam
{
-DLogoAction::DLogoAction(QObject* parent, const char* name)
- : KAction(parent, name)
+DLogoAction::DLogoAction(TQObject* tqparent, const char* name)
+ : KAction(tqparent, name)
{
setText("digikam.org");
setIcon("digikam");
}
-int DLogoAction::plug(QWidget *widget, int index)
+int DLogoAction::plug(TQWidget *widget, int index)
{
if (kapp && !kapp->authorizeKAction(name()))
return -1;
@@ -59,26 +59,26 @@ int DLogoAction::plug(QWidget *widget, int index)
{
KToolBar *bar = (KToolBar *)widget;
int id = getToolButtonID();
- KURLLabel *pixmapLogo = new KURLLabel(Digikam::webProjectUrl(), QString(), bar);
+ KURLLabel *pixmapLogo = new KURLLabel(Digikam::webProjectUrl(), TQString(), bar);
pixmapLogo->setMargin(0);
pixmapLogo->setScaledContents(false);
- pixmapLogo->setSizePolicy(QSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum));
- QToolTip::add(pixmapLogo, i18n("Visit digiKam project website"));
+ pixmapLogo->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Minimum, TQSizePolicy::Minimum));
+ TQToolTip::add(pixmapLogo, i18n("Visit digiKam project website"));
KGlobal::dirs()->addResourceType("banner-digikam", KGlobal::dirs()->kde_default("data") + "digikam/data");
- QString directory = KGlobal::dirs()->findResourceDir("banner-digikam", "banner-digikam.png");
- pixmapLogo->setPixmap(QPixmap( directory + "banner-digikam.png" ));
- pixmapLogo->setFocusPolicy(QWidget::NoFocus);
+ TQString directory = KGlobal::dirs()->findResourceDir("banner-digikam", "banner-digikam.png");
+ pixmapLogo->setPixmap(TQPixmap( directory + "banner-digikam.png" ));
+ pixmapLogo->setFocusPolicy(TQ_NoFocus);
bar->insertWidget(id, pixmapLogo->width(), pixmapLogo);
bar->alignItemRight(id);
addContainer(bar, id);
- connect(bar, SIGNAL(destroyed()),
- this, SLOT(slotDestroyed()));
+ connect(bar, TQT_SIGNAL(destroyed()),
+ this, TQT_SLOT(slotDestroyed()));
- connect(pixmapLogo, SIGNAL(leftClickedURL(const QString&)),
- this, SLOT(slotProcessURL(const QString&)));
+ connect(pixmapLogo, TQT_SIGNAL(leftClickedURL(const TQString&)),
+ this, TQT_SLOT(slotProcessURL(const TQString&)));
return containerCount() - 1;
}
@@ -88,7 +88,7 @@ int DLogoAction::plug(QWidget *widget, int index)
return containerId;
}
-void DLogoAction::slotProcessURL(const QString& url)
+void DLogoAction::slotProcessURL(const TQString& url)
{
KApplication::kApplication()->invokeBrowser(url);
}
diff --git a/digikam/libs/widgets/common/dlogoaction.h b/digikam/libs/widgets/common/dlogoaction.h
index 2b6d5818..8c05667c 100644
--- a/digikam/libs/widgets/common/dlogoaction.h
+++ b/digikam/libs/widgets/common/dlogoaction.h
@@ -38,16 +38,17 @@ namespace Digikam
class DIGIKAM_EXPORT DLogoAction : public KAction
{
Q_OBJECT
+ TQ_OBJECT
public:
- DLogoAction(QObject* parent, const char* name=0);
+ DLogoAction(TQObject* tqparent, const char* name=0);
- virtual int plug(QWidget *widget, int index=-1);
+ virtual int plug(TQWidget *widget, int index=-1);
private slots:
- void slotProcessURL(const QString&);
+ void slotProcessURL(const TQString&);
};
} // namespace Digikam
diff --git a/digikam/libs/widgets/common/dpopupmenu.cpp b/digikam/libs/widgets/common/dpopupmenu.cpp
index d7f93886..d68b9953 100644
--- a/digikam/libs/widgets/common/dpopupmenu.cpp
+++ b/digikam/libs/widgets/common/dpopupmenu.cpp
@@ -24,11 +24,11 @@
*
* ============================================================ */
-// Qt includes.
+// TQt includes.
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qstyle.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqstyle.h>
// KDE includes.
@@ -45,11 +45,11 @@
namespace Digikam
{
-static QImage s_dpopupmenu_sidePixmap;
-static QColor s_dpopupmenu_sidePixmapColor;
+static TQImage s_dpopupmenu_sidePixmap;
+static TQColor s_dpopupmenu_sidePixmapColor;
-DPopupMenu::DPopupMenu(QWidget* parent, const char* name)
- : KPopupMenu(parent, name)
+DPopupMenu::DPopupMenu(TQWidget* tqparent, const char* name)
+ : KPopupMenu(tqparent, name)
{
// Must be initialized so that we know the size on first invocation
if ( s_dpopupmenu_sidePixmap.isNull() )
@@ -62,13 +62,13 @@ DPopupMenu::~DPopupMenu()
void DPopupMenu::generateSidePixmap()
{
- const QColor newColor = calcPixmapColor();
+ const TQColor newColor = calcPixmapColor();
if ( newColor != s_dpopupmenu_sidePixmapColor )
{
s_dpopupmenu_sidePixmapColor = newColor;
- if (KApplication::kApplication()->aboutData()->appName() == QString("digikam"))
+ if (KApplication::kApplication()->aboutData()->appName() == TQString("digikam"))
s_dpopupmenu_sidePixmap.load( locate( "data","digikam/data/menusidepixmap.png" ) );
else
s_dpopupmenu_sidePixmap.load( locate( "data","showfoto/menusidepixmap.png" ) );
@@ -82,25 +82,25 @@ int DPopupMenu::sidePixmapWidth() const
return s_dpopupmenu_sidePixmap.width();
}
-QRect DPopupMenu::sideImageRect() const
+TQRect DPopupMenu::sideImageRect() const
{
- return QStyle::visualRect(QRect(frameWidth(), frameWidth(),
+ return TQStyle::tqvisualRect(TQRect(frameWidth(), frameWidth(),
s_dpopupmenu_sidePixmap.width(),
height() - 2*frameWidth()),
this);
}
-QColor DPopupMenu::calcPixmapColor()
+TQColor DPopupMenu::calcPixmapColor()
{
- QColor color;
- QColor activeTitle = QApplication::palette().active().background();
- QColor inactiveTitle = QApplication::palette().inactive().background();
+ TQColor color;
+ TQColor activeTitle = TQApplication::tqpalette().active().background();
+ TQColor inactiveTitle = TQApplication::tqpalette().inactive().background();
// figure out which color is most suitable for recoloring to
int h1, s1, v1, h2, s2, v2, h3, s3, v3;
activeTitle.hsv(&h1, &s1, &v1);
inactiveTitle.hsv(&h2, &s2, &v2);
- QApplication::palette().active().background().hsv(&h3, &s3, &v3);
+ TQApplication::tqpalette().active().background().hsv(&h3, &s3, &v3);
if ( (kAbs(h1-h3)+kAbs(s1-s3)+kAbs(v1-v3) < kAbs(h2-h3)+kAbs(s2-s3)+kAbs(v2-v3)) &&
((kAbs(h1-h3)+kAbs(s1-s3)+kAbs(v1-v3) < 32) || (s1 < 32)) && (s2 > s1))
@@ -111,7 +111,7 @@ QColor DPopupMenu::calcPixmapColor()
// limit max/min brightness
int r, g, b;
color.rgb(&r, &g, &b);
- int gray = qGray(r, g, b);
+ int gray = tqGray(r, g, b);
if (gray > 180)
{
r = (r - (gray - 180) < 0 ? 0 : r - (gray - 180));
@@ -129,12 +129,12 @@ QColor DPopupMenu::calcPixmapColor()
return color;
}
-void DPopupMenu::setMinimumSize(const QSize & s)
+void DPopupMenu::setMinimumSize(const TQSize & s)
{
KPopupMenu::setMinimumSize(s.width() + s_dpopupmenu_sidePixmap.width(), s.height());
}
-void DPopupMenu::setMaximumSize(const QSize & s)
+void DPopupMenu::setMaximumSize(const TQSize & s)
{
KPopupMenu::setMaximumSize(s.width() + s_dpopupmenu_sidePixmap.width(), s.height());
}
@@ -149,34 +149,34 @@ void DPopupMenu::setMaximumSize(int w, int h)
KPopupMenu::setMaximumSize(w + s_dpopupmenu_sidePixmap.width(), h);
}
-void DPopupMenu::resizeEvent(QResizeEvent * e)
+void DPopupMenu::resizeEvent(TQResizeEvent * e)
{
KPopupMenu::resizeEvent(e);
- setFrameRect(QStyle::visualRect(QRect(s_dpopupmenu_sidePixmap.width(), 0,
+ setFrameRect(TQStyle::tqvisualRect(TQRect(s_dpopupmenu_sidePixmap.width(), 0,
width() - s_dpopupmenu_sidePixmap.width(), height()),
this ) );
}
-//Workaround Qt3.3.x sizing bug, by ensuring we're always wide enough.
+//Workaround TQt3.3.x sizing bug, by ensuring we're always wide enough.
void DPopupMenu::resize(int width, int height)
{
- width = kMax(width, maximumSize().width());
+ width = kMax(width, tqmaximumSize().width());
KPopupMenu::resize(width, height);
}
-void DPopupMenu::paintEvent(QPaintEvent* e)
+void DPopupMenu::paintEvent(TQPaintEvent* e)
{
generateSidePixmap();
- QPainter p( this );
+ TQPainter p( this );
- QRect r = sideImageRect();
+ TQRect r = sideImageRect();
r.setTop(r.bottom()-s_dpopupmenu_sidePixmap.height()+1);
if ( r.intersects( e->rect() ) )
{
- QRect drawRect = r.intersect(e->rect()).intersect(sideImageRect());
- QRect pixRect = drawRect;
+ TQRect drawRect = r.intersect(e->rect()).intersect(sideImageRect());
+ TQRect pixRect = drawRect;
pixRect.moveBy(-r.left(), -r.top());
p.drawImage(drawRect.topLeft(), s_dpopupmenu_sidePixmap, pixRect);
}
@@ -188,10 +188,10 @@ void DPopupMenu::paintEvent(QPaintEvent* e)
drawContents(&p);
- style().drawPrimitive(QStyle::PE_PanelPopup, &p,
- QRect(0, 0, width(), height()),
- colorGroup(), QStyle::Style_Default,
- QStyleOption( frameWidth(), 0));
+ tqstyle().tqdrawPrimitive(TQStyle::PE_PanelPopup, &p,
+ TQRect(0, 0, width(), height()),
+ tqcolorGroup(), TQStyle::Style_Default,
+ TQStyleOption( frameWidth(), 0));
}
} // namespace Digikam
diff --git a/digikam/libs/widgets/common/dpopupmenu.h b/digikam/libs/widgets/common/dpopupmenu.h
index a65f8e8f..96f6a8aa 100644
--- a/digikam/libs/widgets/common/dpopupmenu.h
+++ b/digikam/libs/widgets/common/dpopupmenu.h
@@ -27,11 +27,11 @@
#ifndef DPOPUPMENU_H
#define DPOPUPMENU_H
-// Qt includes.
+// TQt includes.
-#include <qcolor.h>
-#include <qimage.h>
-#include <qrect.h>
+#include <tqcolor.h>
+#include <tqimage.h>
+#include <tqrect.h>
// KDE includes.
@@ -41,7 +41,7 @@
#include "digikam_export.h"
-class QSize;
+class TQSize;
namespace Digikam
{
@@ -51,7 +51,7 @@ class DIGIKAM_EXPORT DPopupMenu : public KPopupMenu
public:
- DPopupMenu(QWidget *parent=0, const char *name=0);
+ DPopupMenu(TQWidget *tqparent=0, const char *name=0);
~DPopupMenu();
int sidePixmapWidth() const;
@@ -62,20 +62,20 @@ private:
void generateSidePixmap();
/** Returns the available size for the image */
- QRect sideImageRect() const;
+ TQRect sideImageRect() const;
/** Calculates a color that matches the current colorscheme */
- QColor calcPixmapColor();
+ TQColor calcPixmapColor();
- void setMinimumSize(const QSize& s);
- void setMaximumSize(const QSize& s);
+ void setMinimumSize(const TQSize& s);
+ void setMaximumSize(const TQSize& s);
void setMinimumSize(int w, int h);
void setMaximumSize(int w, int h);
- void resizeEvent(QResizeEvent* e);
+ void resizeEvent(TQResizeEvent* e);
void resize(int width, int height);
- void paintEvent(QPaintEvent* e);
+ void paintEvent(TQPaintEvent* e);
};
} // namespace Digikam
diff --git a/digikam/libs/widgets/common/filesaveoptionsbox.cpp b/digikam/libs/widgets/common/filesaveoptionsbox.cpp
index 72c99e24..eb4d4f88 100644
--- a/digikam/libs/widgets/common/filesaveoptionsbox.cpp
+++ b/digikam/libs/widgets/common/filesaveoptionsbox.cpp
@@ -22,14 +22,14 @@
*
* ============================================================ */
-// Qt includes.
+// TQt includes.
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qwidget.h>
-#include <qlabel.h>
-#include <qwhatsthis.h>
-#include <qcheckbox.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqwidget.h>
+#include <tqlabel.h>
+#include <tqwhatsthis.h>
+#include <tqcheckbox.h>
// KDE includes.
@@ -67,11 +67,11 @@ public:
JPEG2000Options = 0;
}
- QWidget *noneOptions;
+ TQWidget *noneOptions;
- QGridLayout *noneGrid;
+ TQGridLayout *noneGrid;
- QLabel *labelNone;
+ TQLabel *labelNone;
JPEGSettings *JPEGOptions;
@@ -82,16 +82,16 @@ public:
JP2KSettings *JPEG2000Options;
};
-FileSaveOptionsBox::FileSaveOptionsBox(QWidget *parent)
- : QWidgetStack(parent, 0, Qt::WDestructiveClose)
+FileSaveOptionsBox::FileSaveOptionsBox(TQWidget *tqparent)
+ : TQWidgetStack(tqparent, 0, TQt::WDestructiveClose)
{
d = new FileSaveOptionsBoxPriv;
//-- NONE Settings ------------------------------------------------------
- d->noneOptions = new QWidget(this);
- d->noneGrid = new QGridLayout(d->noneOptions, 1, 1, KDialog::spacingHint());
- d->labelNone = new QLabel(i18n("No options available"), d->noneOptions);
+ d->noneOptions = new TQWidget(this);
+ d->noneGrid = new TQGridLayout(d->noneOptions, 1, 1, KDialog::spacingHint());
+ d->labelNone = new TQLabel(i18n("No options available"), d->noneOptions);
d->noneGrid->addMultiCellWidget(d->labelNone, 0, 0, 0, 1);
//-- JPEG Settings ------------------------------------------------------
@@ -128,27 +128,27 @@ FileSaveOptionsBox::~FileSaveOptionsBox()
delete d;
}
-void FileSaveOptionsBox::slotImageFileSelected(const QString& file)
+void FileSaveOptionsBox::slotImageFileSelected(const TQString& file)
{
- QString format = QImageIO::imageFormat(file);
+ TQString format = TQImageIO::imageFormat(file);
toggleFormatOptions(format);
}
-void FileSaveOptionsBox::slotImageFileFormatChanged(const QString& filter)
+void FileSaveOptionsBox::slotImageFileFormatChanged(const TQString& filter)
{
- QString format = KImageIO::typeForMime(filter).upper();
+ TQString format = KImageIO::typeForMime(filter).upper();
toggleFormatOptions(format);
}
-void FileSaveOptionsBox::toggleFormatOptions(const QString& format)
+void FileSaveOptionsBox::toggleFormatOptions(const TQString& format)
{
- if (format == QString("JPEG"))
+ if (format == TQString("JPEG"))
raiseWidget(DImg::JPEG);
- else if (format == QString("PNG"))
+ else if (format == TQString("PNG"))
raiseWidget(DImg::PNG);
- else if (format == QString("TIFF"))
+ else if (format == TQString("TIFF"))
raiseWidget(DImg::TIFF);
- else if (format == QString("JP2"))
+ else if (format == TQString("JP2"))
raiseWidget(DImg::JP2K);
else
raiseWidget(DImg::NONE);
diff --git a/digikam/libs/widgets/common/filesaveoptionsbox.h b/digikam/libs/widgets/common/filesaveoptionsbox.h
index c9076dab..ea81927b 100644
--- a/digikam/libs/widgets/common/filesaveoptionsbox.h
+++ b/digikam/libs/widgets/common/filesaveoptionsbox.h
@@ -27,8 +27,8 @@
// KDE includes.
-#include <qwidgetstack.h>
-#include <qstring.h>
+#include <tqwidgetstack.h>
+#include <tqstring.h>
// Local includes.
@@ -40,25 +40,26 @@ namespace Digikam
class FileSaveOptionsBoxPriv;
-class DIGIKAM_EXPORT FileSaveOptionsBox : public QWidgetStack
+class DIGIKAM_EXPORT FileSaveOptionsBox : public TQWidgetStack
{
Q_OBJECT
+ TQ_OBJECT
public:
- FileSaveOptionsBox(QWidget *parent=0);
+ FileSaveOptionsBox(TQWidget *tqparent=0);
~FileSaveOptionsBox();
void applySettings();
public slots:
- void slotImageFileFormatChanged(const QString&);
- void slotImageFileSelected(const QString&);
+ void slotImageFileFormatChanged(const TQString&);
+ void slotImageFileSelected(const TQString&);
private:
- void toggleFormatOptions(const QString& format);
+ void toggleFormatOptions(const TQString& format);
void readSettings();
private:
diff --git a/digikam/libs/widgets/common/histogramwidget.cpp b/digikam/libs/widgets/common/histogramwidget.cpp
index 4e9b5377..4e8f2427 100644
--- a/digikam/libs/widgets/common/histogramwidget.cpp
+++ b/digikam/libs/widgets/common/histogramwidget.cpp
@@ -28,19 +28,19 @@
#include <cmath>
-// Qt includes.
-
-#include <qpixmap.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qevent.h>
-#include <qtimer.h>
-#include <qcolor.h>
-#include <qbrush.h>
-#include <qrect.h>
-#include <qfont.h>
-#include <qfontmetrics.h>
-#include <qtooltip.h>
+// TQt includes.
+
+#include <tqpixmap.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqevent.h>
+#include <tqtimer.h>
+#include <tqcolor.h>
+#include <tqbrush.h>
+#include <tqrect.h>
+#include <tqfont.h>
+#include <tqfontmetrics.h>
+#include <tqtooltip.h>
// KDE includes.
@@ -102,7 +102,7 @@ public:
// image/computation time).
bool inInitialRepaintWait;
- QTimer *blinkTimer;
+ TQTimer *blinkTimer;
DColor colorGuide;
};
@@ -110,9 +110,9 @@ public:
// Constructor without image data (needed to use updateData() method after instance created).
HistogramWidget::HistogramWidget(int w, int h,
- QWidget *parent, bool selectMode,
+ TQWidget *tqparent, bool selectMode,
bool showProgress, bool statisticsVisible)
- : QWidget(parent, 0, Qt::WDestructiveClose)
+ : TQWidget(tqparent, 0, TQt::WDestructiveClose)
{
d = new HistogramWidgetPriv;
setup(w, h, selectMode, showProgress, statisticsVisible);
@@ -126,15 +126,15 @@ HistogramWidget::HistogramWidget(int w, int h,
HistogramWidget::HistogramWidget(int w, int h,
uchar *i_data, uint i_w, uint i_h,
bool i_sixteenBits,
- QWidget *parent, bool selectMode,
+ TQWidget *tqparent, bool selectMode,
bool showProgress, bool statisticsVisible)
- : QWidget(parent, 0, Qt::WDestructiveClose)
+ : TQWidget(tqparent, 0, TQt::WDestructiveClose)
{
d = new HistogramWidgetPriv;
d->sixteenBits = i_sixteenBits;
setup(w, h, selectMode, showProgress, statisticsVisible);
- m_imageHistogram = new ImageHistogram(i_data, i_w, i_h, i_sixteenBits, this);
+ m_imageHistogram = new ImageHistogram(i_data, i_w, i_h, i_sixteenBits, TQT_TQOBJECT(this));
m_selectionHistogram = 0L;
}
@@ -144,16 +144,16 @@ HistogramWidget::HistogramWidget(int w, int h,
uchar *i_data, uint i_w, uint i_h,
uchar *s_data, uint s_w, uint s_h,
bool i_sixteenBits,
- QWidget *parent, bool selectMode,
+ TQWidget *tqparent, bool selectMode,
bool showProgress, bool statisticsVisible)
- : QWidget(parent, 0, Qt::WDestructiveClose)
+ : TQWidget(tqparent, 0, TQt::WDestructiveClose)
{
d = new HistogramWidgetPriv;
d->sixteenBits = i_sixteenBits;
setup(w, h, selectMode, showProgress, statisticsVisible);
- m_imageHistogram = new ImageHistogram(i_data, i_w, i_h, i_sixteenBits, this);
- m_selectionHistogram = new ImageHistogram(s_data, s_w, s_h, i_sixteenBits, this);
+ m_imageHistogram = new ImageHistogram(i_data, i_w, i_h, i_sixteenBits, TQT_TQOBJECT(this));
+ m_selectionHistogram = new ImageHistogram(s_data, s_w, s_h, i_sixteenBits, TQT_TQOBJECT(this));
}
HistogramWidget::~HistogramWidget()
@@ -182,26 +182,26 @@ void HistogramWidget::setup(int w, int h, bool selectMode, bool showProgress, bo
setMouseTracking(true);
setMinimumSize(w, h);
- d->blinkTimer = new QTimer( this );
+ d->blinkTimer = new TQTimer( this );
- connect( d->blinkTimer, SIGNAL(timeout()),
- this, SLOT(slotBlinkTimerDone()) );
+ connect( d->blinkTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(slotBlinkTimerDone()) );
}
void HistogramWidget::setHistogramGuideByColor(const DColor& color)
{
d->guideVisible = true;
d->colorGuide = color;
- repaint(false);
+ tqrepaint(false);
}
void HistogramWidget::reset()
{
d->guideVisible = false;
- repaint(false);
+ tqrepaint(false);
}
-void HistogramWidget::customEvent(QCustomEvent *event)
+void HistogramWidget::customEvent(TQCustomEvent *event)
{
if (!event) return;
@@ -220,15 +220,15 @@ void HistogramWidget::customEvent(QCustomEvent *event)
{
if (d->clearFlag != HistogramWidgetPriv::HistogramDataLoading)
{
- // enter initial repaint wait, repaint only after waiting
+ // enter initial tqrepaint wait, tqrepaint only after waiting
// a short time so that very fast computation does not create flicker
d->inInitialRepaintWait = true;
d->blinkTimer->start( 100 );
}
else
{
- // after the initial repaint, we can repaint immediately
- repaint(false);
+ // after the initial tqrepaint, we can tqrepaint immediately
+ tqrepaint(false);
d->blinkTimer->start( 200 );
}
}
@@ -244,22 +244,22 @@ void HistogramWidget::customEvent(QCustomEvent *event)
setCursor( KCursor::arrowCursor() );
// Send signals to refresh information if necessary.
- // The signals may trigger multiple repaints, avoid this,
- // we repaint once afterwards.
+ // The signals may trigger multiple tqrepaints, avoid this,
+ // we tqrepaint once afterwards.
setUpdatesEnabled(false);
notifyValuesChanged();
emit signalHistogramComputationDone(d->sixteenBits);
setUpdatesEnabled(true);
- repaint(false);
+ tqrepaint(false);
}
else
{
d->clearFlag = HistogramWidgetPriv::HistogramFailed;
d->blinkTimer->stop();
d->inInitialRepaintWait = false;
- repaint(false);
+ tqrepaint(false);
setCursor( KCursor::arrowCursor() );
// Remove old histogram data from memory.
if (m_imageHistogram)
@@ -285,7 +285,7 @@ void HistogramWidget::setDataLoading()
{
setCursor( KCursor::waitCursor() );
d->clearFlag = HistogramWidgetPriv::HistogramDataLoading;
- // enter initial repaint wait, repaint only after waiting
+ // enter initial tqrepaint wait, tqrepaint only after waiting
// a short time so that very fast computation does not create flicker
d->inInitialRepaintWait = true;
d->pos = 0;
@@ -299,7 +299,7 @@ void HistogramWidget::setLoadingFailed()
d->pos = 0;
d->blinkTimer->stop();
d->inInitialRepaintWait = false;
- repaint(false);
+ tqrepaint(false);
setCursor( KCursor::arrowCursor() );
}
@@ -340,10 +340,10 @@ void HistogramWidget::updateData(uchar *i_data, uint i_w, uint i_h,
delete m_selectionHistogram;
// Calc new histogram data
- m_imageHistogram = new ImageHistogram(i_data, i_w, i_h, i_sixteenBits, this);
+ m_imageHistogram = new ImageHistogram(i_data, i_w, i_h, i_sixteenBits, TQT_TQOBJECT(this));
if (s_data && s_w && s_h)
- m_selectionHistogram = new ImageHistogram(s_data, s_w, s_h, i_sixteenBits, this);
+ m_selectionHistogram = new ImageHistogram(s_data, s_w, s_h, i_sixteenBits, TQT_TQOBJECT(this));
else
m_selectionHistogram = 0L;
}
@@ -360,17 +360,17 @@ void HistogramWidget::updateSelectionData(uchar *s_data, uint s_w, uint s_h,
delete m_selectionHistogram;
// Calc new histogram data
- m_selectionHistogram = new ImageHistogram(s_data, s_w, s_h, i_sixteenBits, this);
+ m_selectionHistogram = new ImageHistogram(s_data, s_w, s_h, i_sixteenBits, TQT_TQOBJECT(this));
}
void HistogramWidget::slotBlinkTimerDone()
{
d->inInitialRepaintWait = false;
- repaint(false);
+ tqrepaint(false);
d->blinkTimer->start( 200 );
}
-void HistogramWidget::paintEvent(QPaintEvent*)
+void HistogramWidget::paintEvent(TQPaintEvent*)
{
// Widget is disabled, not initialized,
// or loading, but no message shall be drawn:
@@ -381,13 +381,13 @@ void HistogramWidget::paintEvent(QPaintEvent*)
d->clearFlag == HistogramWidgetPriv::HistogramDataLoading))
)
{
- QPixmap pm(size());
- QPainter p1;
- p1.begin(&pm, this);
- p1.fillRect(0, 0, size().width(), size().height(), palette().disabled().background());
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ TQPixmap pm(size());
+ TQPainter p1;
+ p1.tqbegin(TQT_TQPAINTDEVICE(&pm), TQT_TQOBJECT(this));
+ p1.fillRect(0, 0, size().width(), size().height(), tqpalette().disabled().background());
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawRect(0, 0, width(), height());
- p1.setPen(QPen(palette().disabled().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().disabled().foreground(), 1, TQt::SolidLine));
p1.drawRect(0, 0, width(), height());
p1.end();
bitBlt(this, 0, 0, &pm);
@@ -403,14 +403,14 @@ void HistogramWidget::paintEvent(QPaintEvent*)
// In first, we draw an animation.
int asize = 24;
- QPixmap anim(asize, asize);
- QPainter p2;
- p2.begin(&anim, this);
- p2.fillRect(0, 0, asize, asize, palette().active().background());
+ TQPixmap anim(asize, asize);
+ TQPainter p2;
+ p2.tqbegin(TQT_TQPAINTDEVICE(&anim), TQT_TQOBJECT(this));
+ p2.fillRect(0, 0, asize, asize, tqpalette().active().background());
p2.translate(asize/2, asize/2);
d->pos = (d->pos + 10) % 360;
- p2.setPen(QPen(palette().active().text()));
+ p2.setPen(TQPen(tqpalette().active().text()));
p2.rotate(d->pos);
for ( int i=0 ; i<12 ; i++ )
{
@@ -421,20 +421,20 @@ void HistogramWidget::paintEvent(QPaintEvent*)
// ... and we render busy text.
- QPixmap pm(size());
- QPainter p1;
- p1.begin(&pm, this);
- p1.fillRect(0, 0, width(), height(), palette().active().background());
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ TQPixmap pm(size());
+ TQPainter p1;
+ p1.tqbegin(TQT_TQPAINTDEVICE(&pm), TQT_TQOBJECT(this));
+ p1.fillRect(0, 0, width(), height(), tqpalette().active().background());
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawRect(0, 0, width(), height());
p1.drawPixmap(width()/2 - asize /2, asize, anim);
- p1.setPen(QPen(palette().active().text()));
+ p1.setPen(TQPen(tqpalette().active().text()));
if (d->clearFlag == HistogramWidgetPriv::HistogramDataLoading)
- p1.drawText(0, 0, width(), height(), Qt::AlignCenter,
+ p1.drawText(0, 0, width(), height(), TQt::AlignCenter,
i18n("Loading image..."));
else
- p1.drawText(0, 0, width(), height(), Qt::AlignCenter,
+ p1.drawText(0, 0, width(), height(), TQt::AlignCenter,
i18n("Histogram calculation..."));
p1.end();
@@ -445,14 +445,14 @@ void HistogramWidget::paintEvent(QPaintEvent*)
// Draw message.
else if (d->clearFlag == HistogramWidgetPriv::HistogramFailed)
{
- QPixmap pm(size());
- QPainter p1;
- p1.begin(&pm, this);
- p1.fillRect(0, 0, width(), height(), palette().active().background());
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ TQPixmap pm(size());
+ TQPainter p1;
+ p1.tqbegin(TQT_TQPAINTDEVICE(&pm), TQT_TQOBJECT(this));
+ p1.fillRect(0, 0, width(), height(), tqpalette().active().background());
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawRect(0, 0, width(), height());
- p1.setPen(QPen(palette().active().text()));
- p1.drawText(0, 0, width(), height(), Qt::AlignCenter,
+ p1.setPen(TQPen(tqpalette().active().text()));
+ p1.drawText(0, 0, width(), height(), TQt::AlignCenter,
i18n("Histogram\ncalculation\nfailed."));
p1.end();
bitBlt(this, 0, 0, &pm);
@@ -497,7 +497,7 @@ void HistogramWidget::paintEvent(QPaintEvent*)
break;
case HistogramWidget::ColorChannelsHistogram: // All color channels.
- max = QMAX (QMAX (histogram->getMaximum(ImageHistogram::RedChannel),
+ max = TQMAX (TQMAX (histogram->getMaximum(ImageHistogram::RedChannel),
histogram->getMaximum(ImageHistogram::GreenChannel)),
histogram->getMaximum(ImageHistogram::BlueChannel));
break;
@@ -520,12 +520,12 @@ void HistogramWidget::paintEvent(QPaintEvent*)
break;
}
- // A QPixmap is used to enable the double buffering.
+ // A TQPixmap is used to enable the double buffering.
- QPixmap pm(size());
- QPainter p1;
- p1.begin(&pm, this);
- p1.fillRect(0, 0, width(), height(), palette().active().background());
+ TQPixmap pm(size());
+ TQPainter p1;
+ p1.tqbegin(TQT_TQPAINTDEVICE(&pm), TQT_TQOBJECT(this));
+ p1.fillRect(0, 0, width(), height(), tqpalette().active().background());
// Drawing selection or all histogram values.
@@ -645,35 +645,35 @@ void HistogramWidget::paintEvent(QPaintEvent*)
{
if ( x >= (int)(d->xmin * wWidth) && x <= (int)(d->xmax * wWidth) )
{
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, 0);
- p1.setPen(QPen(palette().active().background(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - y);
}
else
{
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - y);
- p1.setPen(QPen(palette().active().background(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight - y, x, 0);
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
{
- p1.setPen(QPen(palette().active().base(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, 0);
}
}
}
else
{
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - y);
- p1.setPen(QPen(palette().active().background(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight - y, x, 0);
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
{
- p1.setPen(QPen(palette().active().base(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, 0);
}
}
@@ -684,9 +684,9 @@ void HistogramWidget::paintEvent(QPaintEvent*)
{
if ( x >= (int)(d->xmin * wWidth) && x <= (int)(d->xmax * wWidth) )
{
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, 0);
- p1.setPen(QPen(palette().active().background(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
// Witch color must be used on the foreground with all colors channel mode?
switch (m_colorType)
@@ -710,69 +710,69 @@ void HistogramWidget::paintEvent(QPaintEvent*)
switch (m_colorType)
{
case HistogramWidget::RedColor:
- p1.setPen(QPen(Qt::green, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::green, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yg);
- p1.setPen(QPen(Qt::blue, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::blue, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yb);
- p1.setPen(QPen(Qt::red, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::red, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yr);
- p1.setPen(QPen(palette().active().background(), 1, Qt::SolidLine));
- p1.drawLine(x, wHeight - QMAX(QMAX(yr, yg), yb), x, 0);
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
+ p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
{
- p1.setPen(QPen(palette().active().base(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, 0);
}
break;
case HistogramWidget::GreenColor:
- p1.setPen(QPen(Qt::blue, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::blue, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yb);
- p1.setPen(QPen(Qt::red, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::red, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yr);
- p1.setPen(QPen(Qt::green, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::green, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yg);
- p1.setPen(QPen(palette().active().background(), 1, Qt::SolidLine));
- p1.drawLine(x, wHeight - QMAX(QMAX(yr, yg), yb), x, 0);
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
+ p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
{
- p1.setPen(QPen(palette().active().base(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, 0);
}
break;
default:
- p1.setPen(QPen(Qt::red, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::red, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yr);
- p1.setPen(QPen(Qt::green, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::green, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yg);
- p1.setPen(QPen(Qt::blue, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::blue, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yb);
- p1.setPen(QPen(palette().active().background(), 1, Qt::SolidLine));
- p1.drawLine(x, wHeight - QMAX(QMAX(yr, yg), yb), x, 0);
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
+ p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
{
- p1.setPen(QPen(palette().active().base(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, 0);
}
@@ -786,69 +786,69 @@ void HistogramWidget::paintEvent(QPaintEvent*)
switch (m_colorType)
{
case HistogramWidget::RedColor:
- p1.setPen(QPen(Qt::green, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::green, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yg);
- p1.setPen(QPen(Qt::blue, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::blue, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yb);
- p1.setPen(QPen(Qt::red, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::red, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yr);
- p1.setPen(QPen(palette().active().background(), 1, Qt::SolidLine));
- p1.drawLine(x, wHeight - QMAX(QMAX(yr, yg), yb), x, 0);
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
+ p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
{
- p1.setPen(QPen(palette().active().base(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, 0);
}
break;
case HistogramWidget::GreenColor:
- p1.setPen(QPen(Qt::blue, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::blue, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yb);
- p1.setPen(QPen(Qt::red, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::red, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yr);
- p1.setPen(QPen(Qt::green, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::green, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yg);
- p1.setPen(QPen(palette().active().background(), 1, Qt::SolidLine));
- p1.drawLine(x, wHeight - QMAX(QMAX(yr, yg), yb), x, 0);
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
+ p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
{
- p1.setPen(QPen(palette().active().base(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, 0);
}
break;
default:
- p1.setPen(QPen(Qt::red, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::red, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yr);
- p1.setPen(QPen(Qt::green, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::green, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yg);
- p1.setPen(QPen(Qt::blue, 1, Qt::SolidLine));
+ p1.setPen(TQPen(TQt::blue, 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, wHeight - yb);
- p1.setPen(QPen(palette().active().background(), 1, Qt::SolidLine));
- p1.drawLine(x, wHeight - QMAX(QMAX(yr, yg), yb), x, 0);
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().background(), 1, TQt::SolidLine));
+ p1.drawLine(x, wHeight - TQMAX(TQMAX(yr, yg), yb), x, 0);
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight - yr -1, x, wHeight - yr);
p1.drawLine(x, wHeight - yg -1, x, wHeight - yg);
p1.drawLine(x, wHeight - yb -1, x, wHeight - yb);
if ( x == wWidth/4 || x == wWidth/2 || x == 3*wWidth/4 )
{
- p1.setPen(QPen(palette().active().base(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().base(), 1, TQt::SolidLine));
p1.drawLine(x, wHeight, x, 0);
}
@@ -860,7 +860,7 @@ void HistogramWidget::paintEvent(QPaintEvent*)
// Drawing color guide.
- p1.setPen(QPen(Qt::red, 1, Qt::DotLine));
+ p1.setPen(TQPen(TQt::red, 1, TQt::DotLine));
int guidePos;
if (d->guideVisible)
@@ -880,7 +880,7 @@ void HistogramWidget::paintEvent(QPaintEvent*)
break;
case HistogramWidget::ValueHistogram:
- guidePos = QMAX(QMAX(d->colorGuide.red(), d->colorGuide.green()), d->colorGuide.blue());
+ guidePos = TQMAX(TQMAX(d->colorGuide.red(), d->colorGuide.green()), d->colorGuide.blue());
break;
case HistogramWidget::ColorChannelsHistogram:
@@ -911,37 +911,37 @@ void HistogramWidget::paintEvent(QPaintEvent*)
int xGuide = (guidePos * wWidth) / histogram->getHistogramSegment();
p1.drawLine(xGuide, 0, xGuide, wHeight);
- QString string = i18n("x:%1").arg(guidePos);
- QFontMetrics fontMt( string );
- QRect rect = fontMt.boundingRect(0, 0, wWidth, wHeight, 0, string);
- p1.setPen(QPen(Qt::red, 1, Qt::SolidLine));
+ TQString string = i18n("x:%1").tqarg(guidePos);
+ TQFontMetrics fontMt( string );
+ TQRect rect = fontMt.boundingRect(0, 0, wWidth, wHeight, 0, string);
+ p1.setPen(TQPen(TQt::red, 1, TQt::SolidLine));
rect.moveTop(1);
if (xGuide < wWidth/2)
{
rect.moveLeft(xGuide);
- p1.fillRect(rect, QBrush(QColor(250, 250, 255)) );
+ p1.fillRect(rect, TQBrush(TQColor(250, 250, 255)) );
p1.drawRect(rect);
rect.moveLeft(xGuide+3);
- p1.drawText(rect, Qt::AlignLeft, string);
+ p1.drawText(rect, TQt::AlignLeft, string);
}
else
{
rect.moveRight(xGuide);
- p1.fillRect(rect, QBrush(QColor(250, 250, 255)) );
+ p1.fillRect(rect, TQBrush(TQColor(250, 250, 255)) );
p1.drawRect(rect);
rect.moveRight(xGuide-3);
- p1.drawText(rect, Qt::AlignRight, string);
+ p1.drawText(rect, TQt::AlignRight, string);
}
}
}
if (d->statisticsVisible)
{
- QString tipText, value;
- QString cellBeg("<tr><td><nobr><font size=-1>");
- QString cellMid("</font></nobr></td><td><nobr><font size=-1>");
- QString cellEnd("</font></nobr></td></tr>");
+ TQString tipText, value;
+ TQString cellBeg("<tr><td><nobr><font size=-1>");
+ TQString cellMid("</font></nobr></td><td><nobr><font size=-1>");
+ TQString cellEnd("</font></nobr></td></tr>");
tipText = "<table cellspacing=0 cellpadding=0>";
tipText += cellBeg + i18n("Mean:") + cellMid;
@@ -970,23 +970,23 @@ void HistogramWidget::paintEvent(QPaintEvent*)
tipText += "</table>";
- QToolTip::add( this, tipText);
+ TQToolTip::add( this, tipText);
}
- p1.setPen(QPen(palette().active().foreground(), 1, Qt::SolidLine));
+ p1.setPen(TQPen(tqpalette().active().foreground(), 1, TQt::SolidLine));
p1.drawRect(0, 0, width(), height());
p1.end();
bitBlt(this, 0, 0, &pm);
}
-void HistogramWidget::mousePressEvent(QMouseEvent* e)
+void HistogramWidget::mousePressEvent(TQMouseEvent* e)
{
if ( d->selectMode == true && d->clearFlag == HistogramWidgetPriv::HistogramCompleted )
{
if (!d->inSelected)
{
d->inSelected = true;
- repaint(false);
+ tqrepaint(false);
}
d->xmin = ((double)e->pos().x()) / ((double)width());
@@ -997,7 +997,7 @@ void HistogramWidget::mousePressEvent(QMouseEvent* e)
}
}
-void HistogramWidget::mouseReleaseEvent(QMouseEvent*)
+void HistogramWidget::mouseReleaseEvent(TQMouseEvent*)
{
if ( d->selectMode == true && d->clearFlag == HistogramWidgetPriv::HistogramCompleted )
{
@@ -1009,12 +1009,12 @@ void HistogramWidget::mouseReleaseEvent(QMouseEvent*)
//emit signalMinValueChanged( 0 );
//emit signalMaxValueChanged( d->range );
notifyValuesChanged();
- repaint(false);
+ tqrepaint(false);
}
}
}
-void HistogramWidget::mouseMoveEvent(QMouseEvent *e)
+void HistogramWidget::mouseMoveEvent(TQMouseEvent *e)
{
if ( d->selectMode == true && d->clearFlag == HistogramWidgetPriv::HistogramCompleted )
{
@@ -1040,7 +1040,7 @@ void HistogramWidget::mouseMoveEvent(QMouseEvent *e)
notifyValuesChanged();
//emit signalMaxValueChanged( d->xmax == 0.0 ? d->range : (int)(d->xmax * d->range) );
- repaint(false);
+ tqrepaint(false);
}
}
}
@@ -1064,7 +1064,7 @@ void HistogramWidget::slotMinValueChanged( int min )
{
d->xmin = ((double)min)/d->range;
}
- repaint(false);
+ tqrepaint(false);
}
}
@@ -1082,7 +1082,7 @@ void HistogramWidget::slotMaxValueChanged(int max)
{
d->xmax = ((double)max)/d->range;
}
- repaint(false);
+ tqrepaint(false);
}
}
diff --git a/digikam/libs/widgets/common/histogramwidget.h b/digikam/libs/widgets/common/histogramwidget.h
index 76b48015..01d0abe7 100644
--- a/digikam/libs/widgets/common/histogramwidget.h
+++ b/digikam/libs/widgets/common/histogramwidget.h
@@ -24,16 +24,16 @@
#ifndef HISTOGRAMWIDGET_H
#define HISTOGRAMWIDGET_H
-// Qt includes.
+// TQt includes.
-#include <qwidget.h>
+#include <tqwidget.h>
// Local includes.
#include "dcolor.h"
#include "digikam_export.h"
-class QCustomEvent;
+class TQCustomEvent;
namespace Digikam
{
@@ -41,9 +41,10 @@ namespace Digikam
class ImageHistogram;
class HistogramWidgetPriv;
-class DIGIKAM_EXPORT HistogramWidget : public QWidget
+class DIGIKAM_EXPORT HistogramWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -80,7 +81,7 @@ public:
/** Constructor without image data. Needed to use updateData() method after to create instance.*/
HistogramWidget(int w, int h, // Widget size.
- QWidget *parent=0, bool selectMode=true,
+ TQWidget *tqparent=0, bool selectMode=true,
bool showProgress=true,
bool statisticsVisible=false);
@@ -88,7 +89,7 @@ public:
HistogramWidget(int w, int h, // Widget size.
uchar *i_data, uint i_w, uint i_h, // Full image info.
bool i_sixteenBits, // 8 or 16 bits image.
- QWidget *parent=0, bool selectMode=true,
+ TQWidget *tqparent=0, bool selectMode=true,
bool showProgress=true,
bool statisticsVisible=false);
@@ -97,7 +98,7 @@ public:
uchar *i_data, uint i_w, uint i_h, // Full image info.
uchar *s_data, uint s_w, uint s_h, // Image selection info.
bool i_sixteenBits, // 8 or 16 bits image.
- QWidget *parent=0, bool selectMode=true,
+ TQWidget *tqparent=0, bool selectMode=true,
bool showProgress=true,
bool statisticsVisible=false);
@@ -156,14 +157,14 @@ protected slots:
protected:
- void paintEvent(QPaintEvent*);
- void mousePressEvent(QMouseEvent*);
- void mouseReleaseEvent(QMouseEvent*);
- void mouseMoveEvent(QMouseEvent*);
+ void paintEvent(TQPaintEvent*);
+ void mousePressEvent(TQMouseEvent*);
+ void mouseReleaseEvent(TQMouseEvent*);
+ void mouseMoveEvent(TQMouseEvent*);
private :
- void customEvent(QCustomEvent*);
+ void customEvent(TQCustomEvent*);
void notifyValuesChanged();
private:
diff --git a/digikam/libs/widgets/common/paniconwidget.cpp b/digikam/libs/widgets/common/paniconwidget.cpp
index 2d727656..984d1738 100644
--- a/digikam/libs/widgets/common/paniconwidget.cpp
+++ b/digikam/libs/widgets/common/paniconwidget.cpp
@@ -26,12 +26,12 @@
#include <cmath>
-// Qt includes.
+// TQt includes.
-#include <qpainter.h>
-#include <qpixmap.h>
-#include <qpen.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqpixmap.h>
+#include <tqpen.h>
+#include <tqtimer.h>
// KDE includes.
@@ -61,13 +61,13 @@ public:
int xpos;
int ypos;
- QRect regionSelection; // Original size image selection.
+ TQRect regionSelection; // Original size image selection.
- QImage image;
+ TQImage image;
};
-PanIconWidget::PanIconWidget(QWidget *parent, WFlags flags)
- : QWidget(parent, 0, flags)
+PanIconWidget::PanIconWidget(TQWidget *tqparent, WFlags flags)
+ : TQWidget(tqparent, 0, flags)
{
d = new PanIconWidgetPriv;
m_flicker = false;
@@ -75,7 +75,7 @@ PanIconWidget::PanIconWidget(QWidget *parent, WFlags flags)
m_pixmap = 0;
m_zoomFactor = 1.0;
- setBackgroundMode(Qt::NoBackground);
+ setBackgroundMode(TQt::NoBackground);
setMouseTracking(true);
}
@@ -88,11 +88,11 @@ PanIconWidget::~PanIconWidget()
delete d;
}
-void PanIconWidget::setImage(int previewWidth, int previewHeight, const QImage& image)
+void PanIconWidget::setImage(int previewWidth, int previewHeight, const TQImage& image)
{
- QSize sz(image.width(), image.height());
- sz.scale(previewWidth, previewHeight, QSize::ScaleMin);
- m_pixmap = new QPixmap(previewWidth, previewHeight);
+ TQSize sz(image.width(), image.height());
+ sz.tqscale(previewWidth, previewHeight, TQSize::ScaleMin);
+ m_pixmap = new TQPixmap(previewWidth, previewHeight);
m_width = sz.width();
m_height = sz.height();
d->image = image.smoothScale(sz.width(), sz.height());
@@ -102,7 +102,7 @@ void PanIconWidget::setImage(int previewWidth, int previewHeight, const QImage&
m_zoomedOrgHeight = image.height();
setFixedSize(m_width, m_height);
- m_rect = QRect(width()/2-m_width/2, height()/2-m_height/2, m_width, m_height);
+ m_rect = TQRect(width()/2-m_width/2, height()/2-m_height/2, m_width, m_height);
updatePixmap();
m_timerID = startTimer(800);
}
@@ -110,7 +110,7 @@ void PanIconWidget::setImage(int previewWidth, int previewHeight, const QImage&
void PanIconWidget::setImage(int previewWidth, int previewHeight, const DImg& image)
{
DImg img(image);
- setImage(previewWidth, previewHeight, img.copyQImage());
+ setImage(previewWidth, previewHeight, img.copyTQImage());
}
void PanIconWidget::slotZoomFactorChanged(double factor)
@@ -120,10 +120,10 @@ void PanIconWidget::slotZoomFactorChanged(double factor)
m_zoomedOrgWidth = (int)(m_orgWidth * factor);
m_zoomedOrgHeight = (int)(m_orgHeight * factor);
updatePixmap();
- repaint(false);
+ tqrepaint(false);
}
-void PanIconWidget::setRegionSelection(const QRect& regionSelection)
+void PanIconWidget::setRegionSelection(const TQRect& regionSelection)
{
d->regionSelection = regionSelection;
m_localRegionSelection.setX( m_rect.x() + (int)((float)d->regionSelection.x() *
@@ -139,22 +139,22 @@ void PanIconWidget::setRegionSelection(const QRect& regionSelection)
((float)m_height / (float)m_zoomedOrgHeight)) );
updatePixmap();
- repaint(false);
+ tqrepaint(false);
}
-QRect PanIconWidget::getRegionSelection()
+TQRect PanIconWidget::getRegionSelection()
{
return (d->regionSelection);
}
void PanIconWidget::setCursorToLocalRegionSelectionCenter()
{
- QCursor::setPos(mapToGlobal(m_localRegionSelection.center()));
+ TQCursor::setPos(mapToGlobal(m_localRegionSelection.center()));
}
void PanIconWidget::setCenterSelection()
{
- setRegionSelection(QRect(
+ setRegionSelection(TQRect(
(int)(((float)m_zoomedOrgWidth / 2.0) - ((float)d->regionSelection.width() / 2.0)),
(int)(((float)m_zoomedOrgHeight / 2.0) - ((float)d->regionSelection.height() / 2.0)),
d->regionSelection.width(),
@@ -166,7 +166,7 @@ void PanIconWidget::regionSelectionMoved(bool targetDone)
if (targetDone)
{
updatePixmap();
- repaint(false);
+ tqrepaint(false);
}
int x = (int)lround( ((float)m_localRegionSelection.x() - (float)m_rect.x() ) *
@@ -192,23 +192,23 @@ void PanIconWidget::regionSelectionMoved(bool targetDone)
void PanIconWidget::updatePixmap()
{
// Drawing background and image.
- m_pixmap->fill(colorGroup().background());
+ m_pixmap->fill(tqcolorGroup().background());
bitBlt(m_pixmap, m_rect.x(), m_rect.y(), &d->image, 0, 0);
- QPainter p(m_pixmap);
+ TQPainter p(m_pixmap);
// Drawing selection border
- if (m_flicker) p.setPen(QPen(Qt::white, 1, Qt::SolidLine));
- else p.setPen(QPen(Qt::red, 1, Qt::SolidLine));
+ if (m_flicker) p.setPen(TQPen(TQt::white, 1, TQt::SolidLine));
+ else p.setPen(TQPen(TQt::red, 1, TQt::SolidLine));
p.drawRect(m_localRegionSelection.x(),
m_localRegionSelection.y(),
m_localRegionSelection.width(),
m_localRegionSelection.height());
- if (m_flicker) p.setPen(QPen(Qt::red, 1, Qt::DotLine));
- else p.setPen(QPen(Qt::white, 1, Qt::DotLine));
+ if (m_flicker) p.setPen(TQPen(TQt::red, 1, TQt::DotLine));
+ else p.setPen(TQPen(TQt::white, 1, TQt::DotLine));
p.drawRect(m_localRegionSelection.x(),
m_localRegionSelection.y(),
@@ -218,7 +218,7 @@ void PanIconWidget::updatePixmap()
p.end();
}
-void PanIconWidget::paintEvent(QPaintEvent*)
+void PanIconWidget::paintEvent(TQPaintEvent*)
{
bitBlt(this, 0, 0, m_pixmap);
}
@@ -233,9 +233,9 @@ void PanIconWidget::setMouseFocus()
emit signalSelectionTakeFocus();
}
-void PanIconWidget::hideEvent(QHideEvent *e)
+void PanIconWidget::hideEvent(TQHideEvent *e)
{
- QWidget::hideEvent(e);
+ TQWidget::hideEvent(e);
if ( d->moveSelection )
{
@@ -245,10 +245,10 @@ void PanIconWidget::hideEvent(QHideEvent *e)
}
}
-void PanIconWidget::mousePressEvent ( QMouseEvent * e )
+void PanIconWidget::mousePressEvent ( TQMouseEvent * e )
{
if ( (e->button() == Qt::LeftButton || e->button() == Qt::MidButton) &&
- m_localRegionSelection.contains( e->x(), e->y() ) )
+ m_localRegionSelection.tqcontains( e->x(), e->y() ) )
{
d->xpos = e->x();
d->ypos = e->y();
@@ -258,7 +258,7 @@ void PanIconWidget::mousePressEvent ( QMouseEvent * e )
}
}
-void PanIconWidget::mouseMoveEvent ( QMouseEvent * e )
+void PanIconWidget::mouseMoveEvent ( TQMouseEvent * e )
{
if ( d->moveSelection &&
(e->state() == Qt::LeftButton || e->state() == Qt::MidButton) )
@@ -286,20 +286,20 @@ void PanIconWidget::mouseMoveEvent ( QMouseEvent * e )
m_localRegionSelection.moveBottom(m_rect.bottom());
updatePixmap();
- repaint(false);
+ tqrepaint(false);
regionSelectionMoved(false);
return;
}
else
{
- if ( m_localRegionSelection.contains( e->x(), e->y() ) )
+ if ( m_localRegionSelection.tqcontains( e->x(), e->y() ) )
setCursor( KCursor::handCursor() );
else
setCursor( KCursor::arrowCursor() );
}
}
-void PanIconWidget::mouseReleaseEvent ( QMouseEvent * )
+void PanIconWidget::mouseReleaseEvent ( TQMouseEvent * )
{
if ( d->moveSelection )
{
@@ -309,16 +309,16 @@ void PanIconWidget::mouseReleaseEvent ( QMouseEvent * )
}
}
-void PanIconWidget::timerEvent(QTimerEvent * e)
+void PanIconWidget::timerEvent(TQTimerEvent * e)
{
if (e->timerId() == m_timerID)
{
m_flicker = !m_flicker;
updatePixmap();
- repaint(false);
+ tqrepaint(false);
}
else
- QWidget::timerEvent(e);
+ TQWidget::timerEvent(e);
}
} // NameSpace Digikam
diff --git a/digikam/libs/widgets/common/paniconwidget.h b/digikam/libs/widgets/common/paniconwidget.h
index 45d480d4..807f9647 100644
--- a/digikam/libs/widgets/common/paniconwidget.h
+++ b/digikam/libs/widgets/common/paniconwidget.h
@@ -25,11 +25,11 @@
#ifndef PANICONWIDGET_H
#define PANICONWIDGET_H
-// Qt includes.
+// TQt includes.
-#include <qwidget.h>
-#include <qrect.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqrect.h>
+#include <tqimage.h>
// Local includes.
@@ -41,20 +41,21 @@ namespace Digikam
class ImagePanIconWidget;
class PanIconWidgetPriv;
-class PanIconWidget : public QWidget
+class PanIconWidget : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- PanIconWidget(QWidget *parent=0, WFlags flags=Qt::WDestructiveClose);
+ PanIconWidget(TQWidget *tqparent=0, WFlags flags=TQt::WDestructiveClose);
~PanIconWidget();
- void setImage(int previewWidth, int previewHeight, const QImage& image);
+ void setImage(int previewWidth, int previewHeight, const TQImage& image);
void setImage(int previewWidth, int previewHeight, const DImg& image);
- void setRegionSelection(const QRect& regionSelection);
- QRect getRegionSelection();
+ void setRegionSelection(const TQRect& regionSelection);
+ TQRect getRegionSelection();
void setCenterSelection();
void setCursorToLocalRegionSelectionCenter();
@@ -65,7 +66,7 @@ signals:
// Used with ImagePreview widget.
// Emit when selection have been moved with mouse. 'targetDone' booleen
// value is used for indicate if the mouse have been released.
- void signalSelectionMoved(const QRect& rect, bool targetDone );
+ void signalSelectionMoved(const TQRect& rect, bool targetDone );
void signalSelectionTakeFocus();
@@ -77,12 +78,12 @@ public slots:
protected:
- void hideEvent(QHideEvent*);
- void paintEvent(QPaintEvent*);
- void mousePressEvent(QMouseEvent*);
- void mouseReleaseEvent(QMouseEvent*);
- void mouseMoveEvent(QMouseEvent*);
- void timerEvent(QTimerEvent*);
+ void hideEvent(TQHideEvent*);
+ void paintEvent(TQPaintEvent*);
+ void mousePressEvent(TQMouseEvent*);
+ void mouseReleaseEvent(TQMouseEvent*);
+ void mouseMoveEvent(TQMouseEvent*);
+ void timerEvent(TQTimerEvent*);
/** Recalculate the target selection position and emit 'signalSelectionMoved'.*/
void regionSelectionMoved(bool targetDone);
@@ -103,10 +104,10 @@ protected:
double m_zoomFactor;
- QRect m_rect;
- QRect m_localRegionSelection; // Thumbnail size selection.
+ TQRect m_rect;
+ TQRect m_localRegionSelection; // Thumbnail size selection.
- QPixmap *m_pixmap;
+ TQPixmap *m_pixmap;
private:
diff --git a/digikam/libs/widgets/common/previewwidget.cpp b/digikam/libs/widgets/common/previewwidget.cpp
index d48f4ac8..8af3e876 100644
--- a/digikam/libs/widgets/common/previewwidget.cpp
+++ b/digikam/libs/widgets/common/previewwidget.cpp
@@ -25,16 +25,16 @@
#include <cmath>
-// Qt includes.
+// TQt includes.
-#include <qstring.h>
-#include <qcache.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qtimer.h>
-#include <qguardedptr.h>
+#include <tqstring.h>
+#include <tqcache.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqtimer.h>
+#include <tqguardedptr.h>
// KDE includes.
@@ -66,7 +66,7 @@ public:
maxZoom = 12.0;
zoomWidth = 0;
zoomHeight = 0;
- tileTmpPix = new QPixmap(tileSize, tileSize);
+ tileTmpPix = new TQPixmap(tileSize, tileSize);
tileCache.setMaxCost((10*1024*1024)/(tileSize*tileSize*4));
tileCache.setAutoDelete(true);
@@ -86,25 +86,25 @@ public:
double maxZoom;
const double zoomMultiplier;
- QPoint centerZoomPoint;
+ TQPoint centerZoomPoint;
- QRect pixmapRect;
+ TQRect pixmapRect;
- QCache<QPixmap> tileCache;
+ TQCache<TQPixmap> tileCache;
- QPixmap* tileTmpPix;
+ TQPixmap* tileTmpPix;
- QColor bgColor;
+ TQColor bgColor;
};
-PreviewWidget::PreviewWidget(QWidget *parent)
- : QScrollView(parent, 0, Qt::WDestructiveClose)
+PreviewWidget::PreviewWidget(TQWidget *tqparent)
+ : TQScrollView(tqparent, 0, TQt::WDestructiveClose)
{
d = new PreviewWidgetPriv;
d->bgColor.setRgb(0, 0, 0);
m_movingInProgress = false;
- viewport()->setBackgroundMode(Qt::NoBackground);
+ viewport()->setBackgroundMode(TQt::NoBackground);
viewport()->setMouseTracking(false);
horizontalScrollBar()->setLineStep( 1 );
@@ -112,7 +112,7 @@ PreviewWidget::PreviewWidget(QWidget *parent)
verticalScrollBar()->setLineStep( 1 );
verticalScrollBar()->setPageStep( 1 );
- setFrameStyle(QFrame::GroupBoxPanel|QFrame::Plain);
+ setFrameStyle(TQFrame::GroupBoxPanel|TQFrame::Plain);
setMargin(0);
setLineWidth(1);
}
@@ -123,7 +123,7 @@ PreviewWidget::~PreviewWidget()
delete d;
}
-void PreviewWidget::setBackgroundColor(const QColor& color)
+void PreviewWidget::setBackgroundColor(const TQColor& color)
{
if (d->bgColor == color)
return;
@@ -138,7 +138,7 @@ void PreviewWidget::slotReset()
resetPreview();
}
-QRect PreviewWidget::previewRect()
+TQRect PreviewWidget::previewRect()
{
return d->pixmapRect;
}
@@ -194,12 +194,12 @@ double PreviewWidget::snapZoom(double zoom)
// across 50%, 100% or fit-to-window, then return the
// the corresponding special value. Otherwise zoom is returned unchanged.
double fit = calcAutoZoomFactor(ZoomInOrOut);
- QValueList<double> snapValues;
+ TQValueList<double> snapValues;
snapValues.append(0.5);
snapValues.append(1.0);
snapValues.append(fit);
qHeapSort(snapValues);
- QValueList<double>::const_iterator it;
+ TQValueList<double>::const_iterator it;
if (d->zoom < zoom)
{
@@ -300,7 +300,7 @@ void PreviewWidget::setZoomFactor(double zoom, bool centerView)
updateContentsSize();
// adapt step size to zoom factor. Overall, using a finer step size than scrollbar default.
- int step = QMAX(2, 2*lround(d->zoom));
+ int step = TQMAX(2, 2*lround(d->zoom));
horizontalScrollBar()->setLineStep( step );
horizontalScrollBar()->setPageStep( step * 10 );
verticalScrollBar()->setLineStep( step );
@@ -400,7 +400,7 @@ double PreviewWidget::calcAutoZoomFactor(AutoZoomMode mode)
double dstWidth = contentsRect().width();
double dstHeight = contentsRect().height();
- double zoom = QMIN(dstWidth/srcWidth, dstHeight/srcHeight);
+ double zoom = TQMIN(dstWidth/srcWidth, dstHeight/srcHeight);
// limit precision as above
zoom = floor(zoom * 10000.0) / 10000.0;
if (mode == ZoomInOrOut)
@@ -408,7 +408,7 @@ double PreviewWidget::calcAutoZoomFactor(AutoZoomMode mode)
return zoom;
else
// ZoomInOnly: accept that an image is smaller than available space, dont scale up
- return QMIN(1.0, zoom);
+ return TQMIN(1.0, zoom);
}
void PreviewWidget::updateContentsSize()
@@ -422,14 +422,14 @@ void PreviewWidget::updateContentsSize()
int centery = contentsRect().height()/2;
int xoffset = int(centerx - d->zoomWidth/2);
int yoffset = int(centery - d->zoomHeight/2);
- xoffset = QMAX(xoffset, 0);
- yoffset = QMAX(yoffset, 0);
+ xoffset = TQMAX(xoffset, 0);
+ yoffset = TQMAX(yoffset, 0);
- d->pixmapRect = QRect(xoffset, yoffset, d->zoomWidth, d->zoomHeight);
+ d->pixmapRect = TQRect(xoffset, yoffset, d->zoomWidth, d->zoomHeight);
}
else
{
- d->pixmapRect = QRect(0, 0, d->zoomWidth, d->zoomHeight);
+ d->pixmapRect = TQRect(0, 0, d->zoomWidth, d->zoomHeight);
}
d->tileCache.clear();
@@ -442,18 +442,18 @@ void PreviewWidget::setContentsSize()
resizeContents(d->zoomWidth, d->zoomHeight);
}
-void PreviewWidget::resizeEvent(QResizeEvent* e)
+void PreviewWidget::resizeEvent(TQResizeEvent* e)
{
if (!e) return;
- QScrollView::resizeEvent(e);
+ TQScrollView::resizeEvent(e);
if (d->autoZoom)
updateAutoZoom();
updateContentsSize();
- // No need to repaint. its called
+ // No need to tqrepaint. its called
// automatically after resize
// To be sure than corner widget used to pan image will be hide/show
@@ -461,27 +461,27 @@ void PreviewWidget::resizeEvent(QResizeEvent* e)
zoomFactorChanged(d->zoom);
}
-void PreviewWidget::viewportPaintEvent(QPaintEvent *e)
+void PreviewWidget::viewportPaintEvent(TQPaintEvent *e)
{
- QRect er(e->rect());
- er = QRect(QMAX(er.x() - 1, 0),
- QMAX(er.y() - 1, 0),
- QMIN(er.width() + 2, contentsRect().width()),
- QMIN(er.height() + 2, contentsRect().height()));
+ TQRect er(e->rect());
+ er = TQRect(TQMAX(er.x() - 1, 0),
+ TQMAX(er.y() - 1, 0),
+ TQMIN(er.width() + 2, contentsRect().width()),
+ TQMIN(er.height() + 2, contentsRect().height()));
bool antialias = (d->zoom <= 1.0) ? true : false;
- QRect o_cr(viewportToContents(er.topLeft()), viewportToContents(er.bottomRight()));
- QRect cr = o_cr;
+ TQRect o_cr(viewportToContents(er.topLeft()), viewportToContents(er.bottomRight()));
+ TQRect cr = o_cr;
- QRegion clipRegion(er);
+ TQRegion clipRegion(er);
cr = d->pixmapRect.intersect(cr);
if (!cr.isEmpty() && !previewIsNull())
{
- clipRegion -= QRect(contentsToViewport(cr.topLeft()), cr.size());
+ clipRegion -= TQRect(contentsToViewport(cr.topLeft()), cr.size());
- QRect pr = QRect(cr.x() - d->pixmapRect.x(), cr.y() - d->pixmapRect.y(),
+ TQRect pr = TQRect(cr.x() - d->pixmapRect.x(), cr.y() - d->pixmapRect.y(),
cr.width(), cr.height());
int x1 = (int)floor((double)pr.x() / (double)d->tileSize) * d->tileSize;
@@ -489,7 +489,7 @@ void PreviewWidget::viewportPaintEvent(QPaintEvent *e)
int x2 = (int)ceilf((double)pr.right() / (double)d->tileSize) * d->tileSize;
int y2 = (int)ceilf((double)pr.bottom() / (double)d->tileSize) * d->tileSize;
- QPixmap pix(d->tileSize, d->tileSize);
+ TQPixmap pix(d->tileSize, d->tileSize);
int sx, sy, sw, sh;
int step = (int)floor(d->tileSize / d->zoom);
@@ -497,14 +497,14 @@ void PreviewWidget::viewportPaintEvent(QPaintEvent *e)
{
for (int i = x1 ; i < x2 ; i += d->tileSize)
{
- QString key = QString("%1,%2").arg(i).arg(j);
- QPixmap *pix = d->tileCache.find(key);
+ TQString key = TQString("%1,%2").tqarg(i).tqarg(j);
+ TQPixmap *pix = d->tileCache.tqfind(key);
if (!pix)
{
if (antialias)
{
- pix = new QPixmap(d->tileSize, d->tileSize);
+ pix = new TQPixmap(d->tileSize, d->tileSize);
d->tileCache.insert(key, pix);
}
else
@@ -522,9 +522,9 @@ void PreviewWidget::viewportPaintEvent(QPaintEvent *e)
paintPreview(pix, sx, sy, sw, sh);
}
- QRect r(i, j, d->tileSize, d->tileSize);
- QRect ir = pr.intersect(r);
- QPoint pt(contentsToViewport(QPoint(ir.x() + d->pixmapRect.x(),
+ TQRect r(i, j, d->tileSize, d->tileSize);
+ TQRect ir = pr.intersect(r);
+ TQPoint pt(contentsToViewport(TQPoint(ir.x() + d->pixmapRect.x(),
ir.y() + d->pixmapRect.y())));
bitBlt(viewport(), pt.x(), pt.y(),
@@ -535,7 +535,7 @@ void PreviewWidget::viewportPaintEvent(QPaintEvent *e)
}
}
- QPainter p(viewport());
+ TQPainter p(viewport());
p.setClipRegion(clipRegion);
p.fillRect(er, d->bgColor);
p.end();
@@ -543,7 +543,7 @@ void PreviewWidget::viewportPaintEvent(QPaintEvent *e)
viewportPaintExtraData();
}
-void PreviewWidget::contentsMousePressEvent(QMouseEvent *e)
+void PreviewWidget::contentsMousePressEvent(TQMouseEvent *e)
{
if (!e || e->button() == Qt::RightButton)
return;
@@ -562,8 +562,8 @@ void PreviewWidget::contentsMousePressEvent(QMouseEvent *e)
m_movingInProgress = true;
d->midButtonX = e->x();
d->midButtonY = e->y();
- viewport()->repaint(false);
- viewport()->setCursor(Qt::SizeAllCursor);
+ viewport()->tqrepaint(false);
+ viewport()->setCursor(TQt::SizeAllCursor);
}
return;
}
@@ -571,7 +571,7 @@ void PreviewWidget::contentsMousePressEvent(QMouseEvent *e)
viewport()->setMouseTracking(false);
}
-void PreviewWidget::contentsMouseMoveEvent(QMouseEvent *e)
+void PreviewWidget::contentsMouseMoveEvent(TQMouseEvent *e)
{
if (!e) return;
@@ -586,7 +586,7 @@ void PreviewWidget::contentsMouseMoveEvent(QMouseEvent *e)
}
}
-void PreviewWidget::contentsMouseReleaseEvent(QMouseEvent *e)
+void PreviewWidget::contentsMouseReleaseEvent(TQMouseEvent *e)
{
if (!e) return;
@@ -596,7 +596,7 @@ void PreviewWidget::contentsMouseReleaseEvent(QMouseEvent *e)
{
emit signalContentsMovedEvent(true);
viewport()->unsetCursor();
- viewport()->repaint(false);
+ viewport()->tqrepaint(false);
}
if (e->button() == Qt::RightButton)
@@ -605,11 +605,11 @@ void PreviewWidget::contentsMouseReleaseEvent(QMouseEvent *e)
}
}
-void PreviewWidget::contentsWheelEvent(QWheelEvent *e)
+void PreviewWidget::contentsWheelEvent(TQWheelEvent *e)
{
e->accept();
- if (e->state() & Qt::ShiftButton)
+ if (e->state() & TQt::ShiftButton)
{
if (e->delta() < 0)
emit signalShowNextImage();
@@ -617,7 +617,7 @@ void PreviewWidget::contentsWheelEvent(QWheelEvent *e)
emit signalShowPrevImage();
return;
}
- else if (e->state() & Qt::ControlButton)
+ else if (e->state() & TQt::ControlButton)
{
// When zooming with the mouse-wheel, the image center is kept fixed.
d->centerZoomPoint = e->pos();
@@ -625,11 +625,11 @@ void PreviewWidget::contentsWheelEvent(QWheelEvent *e)
slotDecreaseZoom();
else if (e->delta() > 0 && !maxZoom())
slotIncreaseZoom();
- d->centerZoomPoint = QPoint();
+ d->centerZoomPoint = TQPoint();
return;
}
- QScrollView::contentsWheelEvent(e);
+ TQScrollView::contentsWheelEvent(e);
}
void PreviewWidget::zoomFactorChanged(double zoom)
diff --git a/digikam/libs/widgets/common/previewwidget.h b/digikam/libs/widgets/common/previewwidget.h
index 1e307692..67bf1e82 100644
--- a/digikam/libs/widgets/common/previewwidget.h
+++ b/digikam/libs/widgets/common/previewwidget.h
@@ -24,37 +24,38 @@
#ifndef PREVIEWWIDGET_H
#define PREVIEWWIDGET_H
-// Qt includes.
+// TQt includes.
-#include <qscrollview.h>
+#include <tqscrollview.h>
// Local includes.
#include "digikam_export.h"
-class QPainter;
-class QPixmap;
-class QColor;
+class TQPainter;
+class TQPixmap;
+class TQColor;
namespace Digikam
{
class PreviewWidgetPriv;
-class DIGIKAM_EXPORT PreviewWidget : public QScrollView
+class DIGIKAM_EXPORT PreviewWidget : public TQScrollView
{
Q_OBJECT
+ TQ_OBJECT
public:
- PreviewWidget(QWidget *parent=0);
+ PreviewWidget(TQWidget *tqparent=0);
~PreviewWidget();
void setZoomFactor(double z);
void setZoomFactor(double z, bool centerView);
void setZoomFactorSnapped(double z);
- void setBackgroundColor(const QColor& color);
+ void setBackgroundColor(const TQColor& color);
void fitToWindow();
bool isFitToWindow();
void toggleFitToWindow();
@@ -103,21 +104,21 @@ protected:
int tileSize();
void updateAutoZoom(AutoZoomMode mode = ZoomInOrOut);
void updateContentsSize();
- QRect previewRect();
-
- virtual void resizeEvent(QResizeEvent *);
- virtual void viewportPaintEvent(QPaintEvent *);
- virtual void contentsMousePressEvent(QMouseEvent *);
- virtual void contentsMouseMoveEvent(QMouseEvent *);
- virtual void contentsMouseReleaseEvent(QMouseEvent *);
- virtual void contentsWheelEvent(QWheelEvent *);
+ TQRect previewRect();
+
+ virtual void resizeEvent(TQResizeEvent *);
+ virtual void viewportPaintEvent(TQPaintEvent *);
+ virtual void contentsMousePressEvent(TQMouseEvent *);
+ virtual void contentsMouseMoveEvent(TQMouseEvent *);
+ virtual void contentsMouseReleaseEvent(TQMouseEvent *);
+ virtual void contentsWheelEvent(TQWheelEvent *);
virtual void setContentsSize();
virtual void viewportPaintExtraData(){};
virtual int previewWidth()=0;
virtual int previewHeight()=0;
virtual bool previewIsNull()=0;
virtual void resetPreview()=0;
- virtual void paintPreview(QPixmap *pix, int sx, int sy, int sw, int sh)=0;
+ virtual void paintPreview(TQPixmap *pix, int sx, int sy, int sw, int sh)=0;
virtual void zoomFactorChanged(double zoom);
private:
diff --git a/digikam/libs/widgets/common/searchtextbar.cpp b/digikam/libs/widgets/common/searchtextbar.cpp
index 1a76bbfb..219d0a79 100644
--- a/digikam/libs/widgets/common/searchtextbar.cpp
+++ b/digikam/libs/widgets/common/searchtextbar.cpp
@@ -21,14 +21,14 @@
*
* ============================================================ */
-// Qt includes.
+// TQt includes.
-#include <qcolor.h>
-#include <qpalette.h>
-#include <qpainter.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qtoolbutton.h>
+#include <tqcolor.h>
+#include <tqpalette.h>
+#include <tqpainter.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
// KDE includes.
@@ -56,11 +56,11 @@ public:
bool drawMsg;
- QString message;
+ TQString message;
};
-DLineEdit::DLineEdit(const QString &msg, QWidget *parent)
- : KLineEdit(parent)
+DLineEdit::DLineEdit(const TQString &msg, TQWidget *tqparent)
+ : KLineEdit(tqparent)
{
d = new DLineEditPriv;
setMessage(msg);
@@ -71,33 +71,33 @@ DLineEdit::~DLineEdit()
delete d;
}
-QString DLineEdit::message() const
+TQString DLineEdit::message() const
{
return d->message;
}
-void DLineEdit::setMessage(const QString &msg)
+void DLineEdit::setMessage(const TQString &msg)
{
d->message = msg;
- repaint();
+ tqrepaint();
}
-void DLineEdit::setText(const QString &txt)
+void DLineEdit::setText(const TQString &txt)
{
d->drawMsg = txt.isEmpty();
- repaint();
+ tqrepaint();
KLineEdit::setText(txt);
}
-void DLineEdit::drawContents(QPainter *p)
+void DLineEdit::drawContents(TQPainter *p)
{
KLineEdit::drawContents(p);
if (d->drawMsg && !hasFocus())
{
- QPen tmp = p->pen();
- p->setPen(palette().color(QPalette::Disabled, QColorGroup::Text));
- QRect cr = contentsRect();
+ TQPen tmp = p->pen();
+ p->setPen(palette().color(TQPalette::Disabled, TQColorGroup::Text));
+ TQRect cr = contentsRect();
// Add two pixel margin on the left side
cr.rLeft() += 3;
@@ -106,30 +106,30 @@ void DLineEdit::drawContents(QPainter *p)
}
}
-void DLineEdit::dropEvent(QDropEvent *e)
+void DLineEdit::dropEvent(TQDropEvent *e)
{
d->drawMsg = false;
KLineEdit::dropEvent(e);
}
-void DLineEdit::focusInEvent(QFocusEvent *e)
+void DLineEdit::focusInEvent(TQFocusEvent *e)
{
if (d->drawMsg)
{
d->drawMsg = false;
- repaint();
+ tqrepaint();
}
- QLineEdit::focusInEvent(e);
+ TQLineEdit::focusInEvent(e);
}
-void DLineEdit::focusOutEvent(QFocusEvent *e)
+void DLineEdit::focusOutEvent(TQFocusEvent *e)
{
if (text().isEmpty())
{
d->drawMsg = true;
- repaint();
+ tqrepaint();
}
- QLineEdit::focusOutEvent(e);
+ TQLineEdit::focusOutEvent(e);
}
// ---------------------------------------------------------------------
@@ -147,21 +147,21 @@ public:
bool textQueryCompletion;
- QToolButton *clearButton;
+ TQToolButton *clearButton;
DLineEdit *searchEdit;
};
-SearchTextBar::SearchTextBar(QWidget *parent, const char* name, const QString &msg)
- : QWidget(parent, 0, Qt::WDestructiveClose)
+SearchTextBar::SearchTextBar(TQWidget *tqparent, const char* name, const TQString &msg)
+ : TQWidget(tqparent, 0, TQt::WDestructiveClose)
{
d = new SearchTextBarPriv;
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
setName(name);
- QHBoxLayout *hlay = new QHBoxLayout(this);
+ TQHBoxLayout *hlay = new TQHBoxLayout(this);
- d->clearButton = new QToolButton(this);
+ d->clearButton = new TQToolButton(this);
d->clearButton->setEnabled(false);
d->clearButton->setAutoRaise(true);
d->clearButton->setIconSet(kapp->iconLoader()->loadIcon("clear_left",
@@ -172,21 +172,21 @@ SearchTextBar::SearchTextBar(QWidget *parent, const char* name, const QString &m
kcom->setOrder(KCompletion::Sorted);
d->searchEdit->setCompletionObject(kcom, true);
d->searchEdit->setAutoDeleteCompletionObject(true);
- d->searchEdit->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Minimum));
+ d->searchEdit->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Expanding, TQSizePolicy::Minimum));
hlay->setSpacing(0);
hlay->setMargin(0);
hlay->addWidget(d->searchEdit);
hlay->addWidget(d->clearButton);
- connect(d->clearButton, SIGNAL(clicked()),
- d->searchEdit, SLOT(clear()));
+ connect(d->clearButton, TQT_SIGNAL(clicked()),
+ d->searchEdit, TQT_SLOT(clear()));
- connect(d->searchEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(slotTextChanged(const QString&)));
+ connect(d->searchEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(slotTextChanged(const TQString&)));
KConfig *config = kapp->config();
- config->setGroup(name + QString(" Search Text Tool"));
+ config->setGroup(name + TQString(" Search Text Tool"));
d->searchEdit->setCompletionMode((KGlobalSettings::Completion)config->readNumEntry("AutoCompletionMode",
(int)KGlobalSettings::CompletionAuto));
}
@@ -194,7 +194,7 @@ SearchTextBar::SearchTextBar(QWidget *parent, const char* name, const QString &m
SearchTextBar::~SearchTextBar()
{
KConfig *config = kapp->config();
- config->setGroup(name() + QString(" Search Text Tool"));
+ config->setGroup(name() + TQString(" Search Text Tool"));
config->writeEntry("AutoCompletionMode", (int)d->searchEdit->completionMode());
config->sync();
@@ -211,12 +211,12 @@ bool SearchTextBar::textQueryCompletion() const
return d->textQueryCompletion;
}
-void SearchTextBar::setText(const QString& text)
+void SearchTextBar::setText(const TQString& text)
{
d->searchEdit->setText(text);
}
-QString SearchTextBar::text() const
+TQString SearchTextBar::text() const
{
return d->searchEdit->text();
}
@@ -226,7 +226,7 @@ DLineEdit *SearchTextBar::lineEdit() const
return d->searchEdit;
}
-void SearchTextBar::slotTextChanged(const QString& text)
+void SearchTextBar::slotTextChanged(const TQString& text)
{
if (d->searchEdit->text().isEmpty())
d->searchEdit->unsetPalette();
@@ -244,11 +244,11 @@ void SearchTextBar::slotSearchResult(bool match)
return;
}
- QPalette pal = d->searchEdit->palette();
- pal.setColor(QPalette::Active, QColorGroup::Base,
- match ? QColor(200, 255, 200) :
- QColor(255, 200, 200));
- pal.setColor(QPalette::Active, QColorGroup::Text, Qt::black);
+ TQPalette pal = d->searchEdit->palette();
+ pal.setColor(TQPalette::Active, TQColorGroup::Base,
+ match ? TQColor(200, 255, 200) :
+ TQColor(255, 200, 200));
+ pal.setColor(TQPalette::Active, TQColorGroup::Text, TQt::black);
d->searchEdit->setPalette(pal);
// If search result match the text query, we put the text
diff --git a/digikam/libs/widgets/common/searchtextbar.h b/digikam/libs/widgets/common/searchtextbar.h
index 77f9aca3..a1f1ee5d 100644
--- a/digikam/libs/widgets/common/searchtextbar.h
+++ b/digikam/libs/widgets/common/searchtextbar.h
@@ -24,10 +24,10 @@
#ifndef SEARCH_TEXT_BAR_H
#define SEARCH_TEXT_BAR_H
-// Qt includes.
+// TQt includes.
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
// KDE includes.
@@ -47,40 +47,42 @@ class SearchTextBarPriv;
class DIGIKAM_EXPORT DLineEdit : public KLineEdit
{
Q_OBJECT
+ TQ_OBJECT
public:
- DLineEdit(const QString &msg, QWidget *parent);
+ DLineEdit(const TQString &msg, TQWidget *tqparent);
~DLineEdit();
- void setMessage(const QString &msg);
- QString message() const;
+ void setMessage(const TQString &msg);
+ TQString message() const;
- void setText(const QString& txt);
+ void setText(const TQString& txt);
protected:
- void drawContents(QPainter *p);
- void dropEvent(QDropEvent *e);
- void focusInEvent(QFocusEvent *e);
- void focusOutEvent(QFocusEvent *e);
+ void drawContents(TQPainter *p);
+ void dropEvent(TQDropEvent *e);
+ void focusInEvent(TQFocusEvent *e);
+ void focusOutEvent(TQFocusEvent *e);
private :
DLineEditPriv* d;
};
-class DIGIKAM_EXPORT SearchTextBar : public QWidget
+class DIGIKAM_EXPORT SearchTextBar : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- SearchTextBar(QWidget *parent, const char* name, const QString &msg=i18n("Search..."));
+ SearchTextBar(TQWidget *tqparent, const char* name, const TQString &msg=i18n("Search..."));
~SearchTextBar();
- void setText(const QString& text);
- QString text() const;
+ void setText(const TQString& text);
+ TQString text() const;
void setEnableTextQueryCompletion(bool b);
bool textQueryCompletion() const;
@@ -89,7 +91,7 @@ public:
signals:
- void signalTextChanged(const QString&);
+ void signalTextChanged(const TQString&);
public slots:
@@ -97,7 +99,7 @@ public slots:
private slots:
- void slotTextChanged(const QString&);
+ void slotTextChanged(const TQString&);
private :
diff --git a/digikam/libs/widgets/common/sidebar.cpp b/digikam/libs/widgets/common/sidebar.cpp
index be6f48e2..0d935bbb 100644
--- a/digikam/libs/widgets/common/sidebar.cpp
+++ b/digikam/libs/widgets/common/sidebar.cpp
@@ -24,12 +24,12 @@
/** @file sidebar.cpp */
-// Qt includes.
+// TQt includes.
-#include <qsplitter.h>
-#include <qwidgetstack.h>
-#include <qdatastream.h>
-#include <qtimer.h>
+#include <tqsplitter.h>
+#include <tqwidgetstack.h>
+#include <tqdatastream.h>
+#include <tqtimer.h>
// KDE includes.
@@ -78,24 +78,24 @@ public:
int maxSize;
int dragSwitchId;
- QWidgetStack *stack;
- QSplitter *splitter;
- QSize bigSize;
- QTimer *dragSwitchTimer;
+ TQWidgetStack *stack;
+ TQSplitter *splitter;
+ TQSize bigSize;
+ TQTimer *dragSwitchTimer;
Sidebar::Side side;
};
-Sidebar::Sidebar(QWidget *parent, const char *name, Side side, bool minimizedDefault)
- : KMultiTabBar(KMultiTabBar::Vertical, parent, name)
+Sidebar::Sidebar(TQWidget *tqparent, const char *name, Side side, bool minimizedDefault)
+ : KMultiTabBar(KMultiTabBar::Vertical, tqparent, name)
{
d = new SidebarPriv;
d->minimizedDefault = minimizedDefault;
d->side = side;
- d->dragSwitchTimer = new QTimer(this);
+ d->dragSwitchTimer = new TQTimer(this);
- connect(d->dragSwitchTimer, SIGNAL(timeout()),
- this, SLOT(slotDragSwitchTimer()));
+ connect(d->dragSwitchTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(slotDragSwitchTimer()));
}
Sidebar::~Sidebar()
@@ -109,14 +109,14 @@ void Sidebar::updateMinimumWidth()
int width = 0;
for (int i = 0; i < d->tabs; i++)
{
- QWidget *w = d->stack->widget(i);
+ TQWidget *w = d->stack->widget(i);
if (w && w->width() > width)
width = w->width();
}
d->stack->setMinimumWidth(width);
}
-void Sidebar::setSplitter(QSplitter *sp)
+void Sidebar::setSplitter(TQSplitter *sp)
{
#if KDE_IS_VERSION(3,3,0)
setStyle(KMultiTabBar::VSNET);
@@ -125,7 +125,7 @@ void Sidebar::setSplitter(QSplitter *sp)
#endif
d->splitter = sp;
- d->stack = new QWidgetStack(d->splitter);
+ d->stack = new TQWidgetStack(d->splitter);
if(d->side == Left)
setPosition(KMultiTabBar::Left);
@@ -133,7 +133,7 @@ void Sidebar::setSplitter(QSplitter *sp)
setPosition(KMultiTabBar::Right);
}
-QSplitter* Sidebar::splitter() const
+TQSplitter* Sidebar::splitter() const
{
return d->splitter;
}
@@ -141,7 +141,7 @@ QSplitter* Sidebar::splitter() const
void Sidebar::loadViewState()
{
KConfig *config = kapp->config();
- config->setGroup(QString("%1").arg(name()));
+ config->setGroup(TQString("%1").tqarg(name()));
int tab = config->readNumEntry("ActiveTab", 0);
bool minimized = config->readBoolEntry("Minimized", d->minimizedDefault);
@@ -168,7 +168,7 @@ void Sidebar::loadViewState()
void Sidebar::saveViewState()
{
KConfig *config = kapp->config();
- config->setGroup(QString("%1").arg(name()));
+ config->setGroup(TQString("%1").tqarg(name()));
config->writeEntry("ActiveTab", d->activeTab);
config->writeEntry("Minimized", d->minimized);
config->sync();
@@ -192,22 +192,22 @@ void Sidebar::restore()
KMultiTabBar::show();
}
-void Sidebar::appendTab(QWidget *w, const QPixmap &pic, const QString &title)
+void Sidebar::appendTab(TQWidget *w, const TQPixmap &pic, const TQString &title)
{
- w->reparent(d->stack, QPoint(0, 0));
+ w->reparent(d->stack, TQPoint(0, 0));
KMultiTabBar::appendTab(pic, d->tabs, title);
d->stack->addWidget(w, d->tabs);
tab(d->tabs)->setAcceptDrops(true);
tab(d->tabs)->installEventFilter(this);
- connect(tab(d->tabs), SIGNAL(clicked(int)),
- this, SLOT(clicked(int)));
+ connect(tab(d->tabs), TQT_SIGNAL(clicked(int)),
+ this, TQT_SLOT(clicked(int)));
d->tabs++;
}
-void Sidebar::deleteTab(QWidget *w)
+void Sidebar::deleteTab(TQWidget *w)
{
int tab = d->stack->id(w);
if(tab < 0)
@@ -249,7 +249,7 @@ void Sidebar::clicked(int tab)
}
}
-void Sidebar::setActiveTab(QWidget *w)
+void Sidebar::setActiveTab(TQWidget *w)
{
int tab = d->stack->id(w);
if(tab < 0)
@@ -268,7 +268,7 @@ void Sidebar::setActiveTab(QWidget *w)
emit signalChangedTab(d->stack->visibleWidget());
}
-QWidget* Sidebar::getActiveTab()
+TQWidget* Sidebar::getActiveTab()
{
return d->stack->visibleWidget();
}
@@ -306,22 +306,22 @@ bool Sidebar::isExpanded()
return !d->minimized;
}
-bool Sidebar::eventFilter(QObject *obj, QEvent *ev)
+bool Sidebar::eventFilter(TQObject *obj, TQEvent *ev)
{
- QPtrList<KMultiTabBarTab>* pTabs = tabs();
+ TQPtrList<KMultiTabBarTab>* pTabs = tabs();
- for (QPtrListIterator<KMultiTabBarTab> it(*pTabs); it.current(); ++it)
+ for (TQPtrListIterator<KMultiTabBarTab> it(*pTabs); it.current(); ++it)
{
- if ( obj == *it )
+ if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(*it) )
{
- if ( ev->type() == QEvent::DragEnter)
+ if ( ev->type() == TQEvent::DragEnter)
{
- QDragEnterEvent *e = static_cast<QDragEnterEvent *>(ev);
+ TQDragEnterEvent *e = static_cast<TQDragEnterEvent *>(ev);
enterEvent(e);
e->accept(true);
return false;
}
- else if (ev->type() == QEvent::DragMove)
+ else if (ev->type() == TQEvent::DragMove)
{
if (!d->dragSwitchTimer->isActive())
{
@@ -330,17 +330,17 @@ bool Sidebar::eventFilter(QObject *obj, QEvent *ev)
}
return false;
}
- else if (ev->type() == QEvent::DragLeave)
+ else if (ev->type() == TQEvent::DragLeave)
{
d->dragSwitchTimer->stop();
- QDragLeaveEvent *e = static_cast<QDragLeaveEvent *>(ev);
+ TQDragLeaveEvent *e = static_cast<TQDragLeaveEvent *>(ev);
leaveEvent(e);
return false;
}
- else if (ev->type() == QEvent::Drop)
+ else if (ev->type() == TQEvent::Drop)
{
d->dragSwitchTimer->stop();
- QDropEvent *e = static_cast<QDropEvent *>(ev);
+ TQDropEvent *e = static_cast<TQDropEvent *>(ev);
leaveEvent(e);
return false;
}
@@ -351,7 +351,7 @@ bool Sidebar::eventFilter(QObject *obj, QEvent *ev)
}
}
- // Else, pass the event on to the parent class
+ // Else, pass the event on to the tqparent class
return KMultiTabBar::eventFilter(obj, ev);
}
diff --git a/digikam/libs/widgets/common/sidebar.h b/digikam/libs/widgets/common/sidebar.h
index f3e9e02b..380acf6d 100644
--- a/digikam/libs/widgets/common/sidebar.h
+++ b/digikam/libs/widgets/common/sidebar.h
@@ -39,7 +39,7 @@
#include "digikam_export.h"
-class QSplitter;
+class TQSplitter;
namespace Digikam
{
@@ -52,6 +52,7 @@ class SidebarPriv;
class DIGIKAM_EXPORT Sidebar : public KMultiTabBar
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -66,23 +67,23 @@ public:
/**
* Creates a new sidebar
- * @param parent sidebar's parent
+ * @param tqparent sidebar's tqparent
* @param name the name of the widget is used to store its state to config
* @param side where the sidebar should be displayed. At the left or right border.
* @param minimizedDefault hide the sidebar when the program is started the first time?
*/
- Sidebar(QWidget *parent, const char *name, Side side=Left, bool mimimizedDefault=false);
+ Sidebar(TQWidget *tqparent, const char *name, Side side=Left, bool mimimizedDefault=false);
virtual ~Sidebar();
/**
- * The width of the widget stack can be changed by a QSplitter.
+ * The width of the widget stack can be changed by a TQSplitter.
* @param sp sets the splitter, which should handle the width. The splitter normally
* is part of the main view.
*/
- void setSplitter(QSplitter *sp);
- void setSplitterSizePolicy(QSizePolicy p);
+ void setSplitter(TQSplitter *sp);
+ void setSplitterSizePolicy(TQSizePolicy p);
- QSplitter* splitter() const;
+ TQSplitter* splitter() const;
/**
* Appends a new tab to the sidebar
@@ -90,22 +91,22 @@ public:
* @param pic icon which is shown in this tab
* @param title text which is shown it this tab
*/
- void appendTab(QWidget *w, const QPixmap &pic, const QString &title);
+ void appendTab(TQWidget *w, const TQPixmap &pic, const TQString &title);
/**
* Deletes a tab from the tabbar
*/
- void deleteTab(QWidget *w);
+ void deleteTab(TQWidget *w);
/**
* Activates a tab
*/
- void setActiveTab(QWidget *w);
+ void setActiveTab(TQWidget *w);
/**
* Returns the currently activated tab, or 0 if no tab is active
*/
- QWidget* getActiveTab();
+ TQWidget* getActiveTab();
/**
* Hides the sidebar (display only the activation buttons)
@@ -143,7 +144,7 @@ private:
* save the view state to disk
*/
void saveViewState();
- bool eventFilter(QObject *o, QEvent *e);
+ bool eventFilter(TQObject *o, TQEvent *e);
void updateMinimumWidth();
private slots:
@@ -160,7 +161,7 @@ signals:
/**
* is emitted, when another tab is activated
*/
- void signalChangedTab(QWidget *w);
+ void signalChangedTab(TQWidget *w);
/**
* is emitted, when tab is shrink or expanded
diff --git a/digikam/libs/widgets/common/splashscreen.cpp b/digikam/libs/widgets/common/splashscreen.cpp
index a9437d2a..8294d974 100644
--- a/digikam/libs/widgets/common/splashscreen.cpp
+++ b/digikam/libs/widgets/common/splashscreen.cpp
@@ -22,12 +22,12 @@
*
* ============================================================ */
-// Qt includes.
+// TQt includes.
-#include <qtimer.h>
-#include <qfont.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqtimer.h>
+#include <tqfont.h>
+#include <tqstring.h>
+#include <tqcolor.h>
// KDE includes.
@@ -52,28 +52,28 @@ public:
state = 0;
progressBarSize = 3;
state = 0;
- color = Qt::black;
- alignment = Qt::AlignLeft;
+ color = TQt::black;
+ tqalignment = TQt::AlignLeft;
}
int state;
int progressBarSize;
- int alignment;
+ int tqalignment;
- QString string;
+ TQString string;
- QColor color;
+ TQColor color;
};
-SplashScreen::SplashScreen(const QString& splash, WFlags f)
- : KSplashScreen(QPixmap(locate("appdata", splash)), f)
+SplashScreen::SplashScreen(const TQString& splash, WFlags f)
+ : KSplashScreen(TQPixmap(locate("appdata", splash)), f)
{
d = new SplashScreenPriv;
- QTimer *timer = new QTimer(this);
+ TQTimer *timer = new TQTimer(this);
- connect(timer, SIGNAL(timeout()),
- this, SLOT(animate()));
+ connect(timer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(animate()));
timer->start(150);
}
@@ -86,46 +86,46 @@ SplashScreen::~SplashScreen()
void SplashScreen::animate()
{
d->state = ((d->state + 1) % (2*d->progressBarSize-1));
- repaint();
+ tqrepaint();
}
-void SplashScreen::setColor(const QColor& color)
+void SplashScreen::setColor(const TQColor& color)
{
d->color = color;
}
-void SplashScreen::setAlignment(int alignment)
+void SplashScreen::tqsetAlignment(int tqalignment)
{
- d->alignment = alignment;
+ d->tqalignment = tqalignment;
}
-void SplashScreen::message(const QString& message)
+void SplashScreen::message(const TQString& message)
{
d->string = message;
- QSplashScreen::message(d->string, d->alignment, d->color);
+ TQSplashScreen::message(d->string, d->tqalignment, d->color);
animate();
}
-void SplashScreen::drawContents(QPainter* painter)
+void SplashScreen::drawContents(TQPainter* painter)
{
int position;
- QColor basecolor(155, 192, 231);
+ TQColor basecolor(155, 192, 231);
// Draw background circles
painter->setPen(NoPen);
- painter->setBrush(QColor(225, 234, 231));
+ painter->setBrush(TQColor(225, 234, 231));
painter->drawEllipse(21, 7, 9, 9);
painter->drawEllipse(32, 7, 9, 9);
painter->drawEllipse(43, 7, 9, 9);
// Draw animated circles, increments are chosen
// to get close to background's color
- // (didn't work well with QColor::light function)
+ // (didn't work well with TQColor::light function)
for (int i=0; i < d->progressBarSize; i++)
{
position = (d->state+i)%(2*d->progressBarSize-1);
if (position < 3)
{
- painter->setBrush(QColor(basecolor.red() -18*i,
+ painter->setBrush(TQColor(basecolor.red() -18*i,
basecolor.green()-28*i,
basecolor.blue() -10*i));
@@ -135,7 +135,7 @@ void SplashScreen::drawContents(QPainter* painter)
painter->setPen(d->color);
- QFont fnt(KGlobalSettings::generalFont());
+ TQFont fnt(KGlobalSettings::generalFont());
int fntSize = fnt.pointSize();
if (fntSize > 0)
{
@@ -148,13 +148,13 @@ void SplashScreen::drawContents(QPainter* painter)
}
painter->setFont(fnt);
- QRect r = rect();
+ TQRect r = rect();
r.setRect( r.x() + 59, r.y() + 5, r.width() - 10, r.height() - 10 );
// Draw message at given position, limited to 43 chars
// If message is too long, string is truncated
if (d->string.length() > 40) {d->string.truncate(39); d->string += "...";}
- painter->drawText(r, d->alignment, d->string);
+ painter->drawText(r, d->tqalignment, d->string);
}
} // namespace Digikam
diff --git a/digikam/libs/widgets/common/splashscreen.h b/digikam/libs/widgets/common/splashscreen.h
index a5aed336..9845c818 100644
--- a/digikam/libs/widgets/common/splashscreen.h
+++ b/digikam/libs/widgets/common/splashscreen.h
@@ -25,9 +25,9 @@
#ifndef SPLASHSCREEN_H
#define SPLASHSCREEN_H
-// Qt includes.
+// TQt includes.
-#include <qpainter.h>
+#include <tqpainter.h>
// KDE includes.
@@ -45,23 +45,24 @@ class SplashScreenPriv;
class DIGIKAM_EXPORT SplashScreen : public KSplashScreen
{
Q_OBJECT
+ TQ_OBJECT
public:
- SplashScreen(const QString& splash, WFlags f=0);
+ SplashScreen(const TQString& splash, WFlags f=0);
virtual ~SplashScreen();
- void setAlignment(int alignment);
- void setColor(const QColor& color);
+ void tqsetAlignment(int tqalignment);
+ void setColor(const TQColor& color);
protected:
- void drawContents (QPainter *);
+ void drawContents (TQPainter *);
public slots:
void animate();
- void message(const QString &message);
+ void message(const TQString &message);
private:
diff --git a/digikam/libs/widgets/common/squeezedcombobox.cpp b/digikam/libs/widgets/common/squeezedcombobox.cpp
index 1554b958..a195e4f9 100644
--- a/digikam/libs/widgets/common/squeezedcombobox.cpp
+++ b/digikam/libs/widgets/common/squeezedcombobox.cpp
@@ -25,17 +25,17 @@
/** @file squeezedcombobox.cpp */
-// Qt includes.
-
-#include <qlistbox.h>
-#include <qcombobox.h>
-#include <qpair.h>
-#include <qtimer.h>
-#include <qvaluelist.h>
-#include <qstyle.h>
-#include <qapplication.h>
-#include <qtooltip.h>
-#include <qmap.h>
+// TQt includes.
+
+#include <tqlistbox.h>
+#include <tqcombobox.h>
+#include <tqpair.h>
+#include <tqtimer.h>
+#include <tqvaluelist.h>
+#include <tqstyle.h>
+#include <tqapplication.h>
+#include <tqtooltip.h>
+#include <tqmap.h>
// Local includes.
@@ -55,31 +55,31 @@ public:
tooltip = 0;
}
- QMap<int, QString> originalItems;
+ TQMap<int, TQString> originalItems;
- QTimer *timer;
+ TQTimer *timer;
SqueezedComboBoxTip *tooltip;
};
-SqueezedComboBox::SqueezedComboBox(QWidget *parent, const char *name)
- : QComboBox(parent, name)
+SqueezedComboBox::SqueezedComboBox(TQWidget *tqparent, const char *name)
+ : TQComboBox(tqparent, name)
{
d = new SqueezedComboBoxPriv;
- d->timer = new QTimer(this);
+ d->timer = new TQTimer(this);
- // See B.K.O #138747 : always for QComboBox instance to use a QListbox to
+ // See B.K.O #138747 : always for TQComboBox instance to use a TQListbox to
// render content independently of Widget style used.
- setListBox(new QListBox(this));
+ setListBox(new TQListBox(this));
d->tooltip = new SqueezedComboBoxTip(listBox()->viewport(), this);
setMinimumWidth(100);
- connect(d->timer, SIGNAL(timeout()),
- this, SLOT(slotTimeOut()));
+ connect(d->timer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(slotTimeOut()));
- connect(this, SIGNAL(activated( int )),
- this, SLOT(slotUpdateToolTip( int )));
+ connect(this, TQT_SIGNAL(activated( int )),
+ this, TQT_SLOT(slotUpdateToolTip( int )));
}
SqueezedComboBox::~SqueezedComboBox()
@@ -89,19 +89,19 @@ SqueezedComboBox::~SqueezedComboBox()
delete d;
}
-QSize SqueezedComboBox::sizeHint() const
+TQSize SqueezedComboBox::tqsizeHint() const
{
constPolish();
- QFontMetrics fm = fontMetrics();
+ TQFontMetrics fm = fontMetrics();
- int maxW = count() ? 18 : 7 * fm.width(QChar('x')) + 18;
- int maxH = QMAX( fm.lineSpacing(), 14 ) + 2;
+ int maxW = count() ? 18 : 7 * fm.width(TQChar('x')) + 18;
+ int maxH = TQMAX( fm.lineSpacing(), 14 ) + 2;
- return style().sizeFromContents(QStyle::CT_ComboBox, this,
- QSize(maxW, maxH)).expandedTo(QApplication::globalStrut());
+ return tqstyle().tqsizeFromContents(TQStyle::CT_ComboBox, this,
+ TQSize(maxW, maxH)).expandedTo(TQApplication::globalStrut());
}
-void SqueezedComboBox::insertSqueezedItem(const QString& newItem, int index)
+void SqueezedComboBox::insertSqueezedItem(const TQString& newItem, int index)
{
d->originalItems[index] = newItem;
insertItem( squeezeText(newItem), index );
@@ -111,23 +111,23 @@ void SqueezedComboBox::insertSqueezedItem(const QString& newItem, int index)
slotUpdateToolTip(0);
}
-void SqueezedComboBox::insertSqueezedList(const QStringList& newItems, int index)
+void SqueezedComboBox::insertSqueezedList(const TQStringList& newItems, int index)
{
- for(QStringList::const_iterator it = newItems.begin() ; it != newItems.end() ; ++it)
+ for(TQStringList::const_iterator it = newItems.begin() ; it != newItems.end() ; ++it)
{
insertSqueezedItem(*it, index);
index++;
}
}
-void SqueezedComboBox::resizeEvent(QResizeEvent *)
+void SqueezedComboBox::resizeEvent(TQResizeEvent *)
{
d->timer->start(200, true);
}
void SqueezedComboBox::slotTimeOut()
{
- QMapIterator<int,QString> it;
+ TQMapIterator<int,TQString> it;
for (it = d->originalItems.begin() ; it != d->originalItems.end();
++it)
{
@@ -135,24 +135,24 @@ void SqueezedComboBox::slotTimeOut()
}
}
-QString SqueezedComboBox::squeezeText(const QString& original)
+TQString SqueezedComboBox::squeezeText(const TQString& original)
{
// not the complete widgetSize is usable. Need to compensate for that.
int widgetSize = width()-30;
- QFontMetrics fm(fontMetrics());
+ TQFontMetrics fm(fontMetrics());
// If we can fit the full text, return that.
if (fm.width(original) < widgetSize)
return(original);
// We need to squeeze.
- QString sqItem = original; // prevent empty return value;
+ TQString sqItem = original; // prevent empty return value;
widgetSize = widgetSize-fm.width("...");
for (uint i = 0 ; i != original.length(); ++i)
{
if ((int)fm.width(original.right(i)) > widgetSize)
{
- sqItem = QString(original.left(i) + "...");
+ sqItem = TQString(original.left(i) + "...");
break;
}
}
@@ -161,11 +161,11 @@ QString SqueezedComboBox::squeezeText(const QString& original)
void SqueezedComboBox::slotUpdateToolTip(int index)
{
- QToolTip::remove(this);
- QToolTip::add(this, d->originalItems[index]);
+ TQToolTip::remove(this);
+ TQToolTip::add(this, d->originalItems[index]);
}
-QString SqueezedComboBox::itemHighlighted()
+TQString SqueezedComboBox::itemHighlighted()
{
int curItem = listBox()->currentItem();
return d->originalItems[curItem];
@@ -173,23 +173,23 @@ QString SqueezedComboBox::itemHighlighted()
// ------------------------------------------------------------------------
-SqueezedComboBoxTip::SqueezedComboBoxTip(QWidget *parent, SqueezedComboBox *name)
- : QToolTip( parent )
+SqueezedComboBoxTip::SqueezedComboBoxTip(TQWidget *tqparent, SqueezedComboBox *name)
+ : TQToolTip( tqparent )
{
m_originalWidget = name;
}
-void SqueezedComboBoxTip::maybeTip(const QPoint &pos)
+void SqueezedComboBoxTip::maybeTip(const TQPoint &pos)
{
- QListBox* listBox = m_originalWidget->listBox();
+ TQListBox* listBox = m_originalWidget->listBox();
if (!listBox)
return;
- QListBoxItem* selectedItem = listBox->itemAt( pos );
+ TQListBoxItem* selectedItem = listBox->itemAt( pos );
if (selectedItem)
{
- QRect positionToolTip = listBox->itemRect(selectedItem);
- QString toolTipText = m_originalWidget->itemHighlighted();
+ TQRect positionToolTip = listBox->tqitemRect(selectedItem);
+ TQString toolTipText = m_originalWidget->itemHighlighted();
if (!toolTipText.isNull())
tip(positionToolTip, toolTipText);
}
diff --git a/digikam/libs/widgets/common/squeezedcombobox.h b/digikam/libs/widgets/common/squeezedcombobox.h
index 242948c8..c26792ca 100644
--- a/digikam/libs/widgets/common/squeezedcombobox.h
+++ b/digikam/libs/widgets/common/squeezedcombobox.h
@@ -25,13 +25,13 @@
/** @file squeezedcombobox.h */
-#ifndef SQUEEZEDCOMBOBOX_H
-#define SQUEEZEDCOMBOBOX_H
+#ifndef STQUEEZEDCOMBOBOX_H
+#define STQUEEZEDCOMBOBOX_H
-// Qt includes.
+// TQt includes.
-#include <qcombobox.h>
-#include <qtooltip.h>
+#include <tqcombobox.h>
+#include <tqtooltip.h>
// Local includes.
@@ -44,7 +44,7 @@ class SqueezedComboBoxPriv;
/** @class SqueezedComboBox
*
- * This widget is a QComboBox, but then a little bit
+ * This widget is a TQComboBox, but then a little bit
* different. It only shows the right part of the items
* depending on de size of the widget. When it is not
* possible to show the complete item, it will be shortened
@@ -53,18 +53,19 @@ class SqueezedComboBoxPriv;
* @image html squeezedcombobox.png "This is how it looks"
* @author Tom Albers
*/
-class DIGIKAM_EXPORT SqueezedComboBox : public QComboBox
+class DIGIKAM_EXPORT SqueezedComboBox : public TQComboBox
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
* Constructor
- * @param parent parent widget
+ * @param tqparent tqparent widget
* @param name name to give to the widget
*/
- SqueezedComboBox(QWidget *parent = 0, const char *name = 0 );
+ SqueezedComboBox(TQWidget *tqparent = 0, const char *name = 0 );
/**
* destructor
@@ -72,36 +73,36 @@ public:
virtual ~SqueezedComboBox();
/**
- * This inserts a item to the list. See QComboBox::insertItem()
- * for details. Please do not use QComboBox::insertItem() to this
+ * This inserts a item to the list. See TQComboBox::insertItem()
+ * for details. Please do not use TQComboBox::insertItem() to this
* widget, as that will fail.
* @param newItem the original (long version) of the item which needs
* to be added to the combobox
* @param index the position in the widget.
*/
- void insertSqueezedItem(const QString& newItem, int index);
+ void insertSqueezedItem(const TQString& newItem, int index);
/**
- * This inserts items to the list. See QComboBox::insertStringList()
- * for details. Please do not use QComboBox::insertStringList() to this
+ * This inserts items to the list. See TQComboBox::insertStringList()
+ * for details. Please do not use TQComboBox::insertStringList() to this
* widget, as that will fail.
* @param newItems the originals (long version) of the items which needs
* to be added to the combobox
* @param index the position in the widget.
*/
- void insertSqueezedList(const QStringList& newItems, int index);
+ void insertSqueezedList(const TQStringList& newItems, int index);
/**
* This method returns the full text (not squeezed) of the currently
* highlighted item.
* @return full text of the highlighted item
*/
- QString itemHighlighted();
+ TQString itemHighlighted();
/**
- * Sets the sizeHint() of this widget.
+ * Sets the tqsizeHint() of this widget.
*/
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
private slots:
@@ -110,8 +111,8 @@ private slots:
private:
- void resizeEvent(QResizeEvent *);
- QString squeezeText(const QString& original);
+ void resizeEvent(TQResizeEvent *);
+ TQString squeezeText(const TQString& original);
private:
@@ -125,11 +126,11 @@ private:
* the tooltip will contain the full text and helps
* the user find the correct entry. It is automatically
* activated when starting a SqueezedComboBox. This is
- * inherited from QToolTip
+ * inherited from TQToolTip
*
* @author Tom Albers
*/
-class SqueezedComboBoxTip : public QToolTip
+class SqueezedComboBoxTip : public TQToolTip
{
public:
@@ -140,18 +141,18 @@ public:
* t = new SqueezedComboBoxTip( this->listBox()->viewport(), this );
* @endcode
*
- * @param parent parent widget (viewport)
- * @param name parent widget
+ * @param tqparent tqparent widget (viewport)
+ * @param name tqparent widget
*/
- SqueezedComboBoxTip(QWidget *parent, SqueezedComboBox *name);
+ SqueezedComboBoxTip(TQWidget *tqparent, SqueezedComboBox *name);
protected:
/**
- * Reimplemented version from QToolTip which shows the
+ * Reimplemented version from TQToolTip which shows the
* tooltip when needed.
* @param pos the point where the mouse currently is
*/
- void maybeTip(const QPoint& pos);
+ void maybeTip(const TQPoint& pos);
private:
@@ -160,4 +161,4 @@ private:
} // namespace Digikam
-#endif // SQUEEZEDCOMBOBOX_H
+#endif // STQUEEZEDCOMBOBOX_H
diff --git a/digikam/libs/widgets/common/statusled.cpp b/digikam/libs/widgets/common/statusled.cpp
index 3798adec..f63e6347 100644
--- a/digikam/libs/widgets/common/statusled.cpp
+++ b/digikam/libs/widgets/common/statusled.cpp
@@ -21,10 +21,10 @@
*
* ============================================================ */
-// Qt includes.
+// TQt includes.
-#include <qpixmap.h>
-#include <qstring.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
// KDE includes.
@@ -39,11 +39,11 @@
namespace Digikam
{
-StatusLed::StatusLed(QWidget *parent)
- : QLabel(parent)
+StatusLed::StatusLed(TQWidget *tqparent)
+ : TQLabel(tqparent)
{
setLedColor(Gray);
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
}
StatusLed::~StatusLed()
@@ -54,25 +54,25 @@ void StatusLed::setLedColor(LedColor color)
{
m_color = color;
- QString file;
+ TQString file;
switch(m_color)
{
case Green:
- file = QString("indicator-green");
+ file = TQString("indicator-green");
break;
case Red:
- file = QString("indicator-red");
+ file = TQString("indicator-red");
break;
default:
- file = QString("indicator-gray");
+ file = TQString("indicator-gray");
break;
}
KGlobal::dirs()->addResourceType(file.ascii(), KGlobal::dirs()->kde_default("data") + "digikam/data");
- QString directory = KGlobal::dirs()->findResourceDir(file.ascii(), file + QString(".png"));
- setPixmap(QPixmap(directory + file + QString(".png")));
+ TQString directory = KGlobal::dirs()->findResourceDir(file.ascii(), file + TQString(".png"));
+ setPixmap(TQPixmap(directory + file + TQString(".png")));
}
StatusLed::LedColor StatusLed::ledColor() const
diff --git a/digikam/libs/widgets/common/statusled.h b/digikam/libs/widgets/common/statusled.h
index d151c972..11e1fd29 100644
--- a/digikam/libs/widgets/common/statusled.h
+++ b/digikam/libs/widgets/common/statusled.h
@@ -24,9 +24,9 @@
#ifndef STATUS_LED_H
#define STATUS_LED_H
-// Qt includes.
+// TQt includes.
-#include <qlabel.h>
+#include <tqlabel.h>
// Local includes.
@@ -37,9 +37,10 @@ namespace Digikam
class StatusNavigateBarPriv;
-class DIGIKAM_EXPORT StatusLed : public QLabel
+class DIGIKAM_EXPORT StatusLed : public TQLabel
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -52,7 +53,7 @@ public:
public:
- StatusLed(QWidget *parent=0);
+ StatusLed(TQWidget *tqparent=0);
~StatusLed();
LedColor ledColor() const;
diff --git a/digikam/libs/widgets/common/statusnavigatebar.cpp b/digikam/libs/widgets/common/statusnavigatebar.cpp
index 6f090cb2..4d136515 100644
--- a/digikam/libs/widgets/common/statusnavigatebar.cpp
+++ b/digikam/libs/widgets/common/statusnavigatebar.cpp
@@ -22,11 +22,11 @@
*
* ============================================================ */
-// Qt includes.
+// TQt includes.
-#include <qlayout.h>
-#include <qtoolbutton.h>
-#include <qtooltip.h>
+#include <tqlayout.h>
+#include <tqtoolbutton.h>
+#include <tqtooltip.h>
// KDE includes.
@@ -56,60 +56,60 @@ public:
int itemType;
- QToolButton *firstButton;
- QToolButton *prevButton;
- QToolButton *nextButton;
- QToolButton *lastButton;
+ TQToolButton *firstButton;
+ TQToolButton *prevButton;
+ TQToolButton *nextButton;
+ TQToolButton *lastButton;
};
-StatusNavigateBar::StatusNavigateBar(QWidget *parent)
- : QWidget(parent, 0, Qt::WDestructiveClose)
+StatusNavigateBar::StatusNavigateBar(TQWidget *tqparent)
+ : TQWidget(tqparent, 0, TQt::WDestructiveClose)
{
d = new StatusNavigateBarPriv;
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
- QHBoxLayout *lay = new QHBoxLayout(this);
+ TQHBoxLayout *lay = new TQHBoxLayout(this);
- d->firstButton = new QToolButton(this);
- d->firstButton->setFocusPolicy(QWidget::NoFocus);
+ d->firstButton = new TQToolButton(this);
+ d->firstButton->setFocusPolicy(TQ_NoFocus);
d->firstButton->setAutoRaise(true);
d->firstButton->setIconSet(SmallIconSet("start"));
- QToolTip::add(d->firstButton, i18n("Go to the first item"));
+ TQToolTip::add(d->firstButton, i18n("Go to the first item"));
- d->prevButton = new QToolButton(this);
- d->prevButton->setFocusPolicy(QWidget::NoFocus);
+ d->prevButton = new TQToolButton(this);
+ d->prevButton->setFocusPolicy(TQ_NoFocus);
d->prevButton->setAutoRaise(true);
d->prevButton->setIconSet(SmallIconSet("back"));
- QToolTip::add(d->prevButton, i18n("Go to the previous item"));
+ TQToolTip::add(d->prevButton, i18n("Go to the previous item"));
- d->nextButton = new QToolButton(this);
- d->nextButton->setFocusPolicy(QWidget::NoFocus);
+ d->nextButton = new TQToolButton(this);
+ d->nextButton->setFocusPolicy(TQ_NoFocus);
d->nextButton->setAutoRaise(true);
d->nextButton->setIconSet(SmallIconSet("forward"));
- QToolTip::add(d->nextButton, i18n("Go to the next item"));
+ TQToolTip::add(d->nextButton, i18n("Go to the next item"));
- d->lastButton = new QToolButton(this);
- d->lastButton->setFocusPolicy(QWidget::NoFocus);
+ d->lastButton = new TQToolButton(this);
+ d->lastButton->setFocusPolicy(TQ_NoFocus);
d->lastButton->setAutoRaise(true);
d->lastButton->setIconSet(SmallIconSet("finish"));
- QToolTip::add(d->lastButton, i18n("Go to the last item"));
+ TQToolTip::add(d->lastButton, i18n("Go to the last item"));
lay->addWidget(d->firstButton);
lay->addWidget(d->prevButton);
lay->addWidget(d->nextButton);
lay->addWidget(d->lastButton);
- connect(d->firstButton, SIGNAL(clicked()),
- this, SIGNAL(signalFirstItem()));
+ connect(d->firstButton, TQT_SIGNAL(clicked()),
+ this, TQT_SIGNAL(signalFirstItem()));
- connect(d->prevButton, SIGNAL(clicked()),
- this, SIGNAL(signalPrevItem()));
+ connect(d->prevButton, TQT_SIGNAL(clicked()),
+ this, TQT_SIGNAL(signalPrevItem()));
- connect(d->nextButton, SIGNAL(clicked()),
- this, SIGNAL(signalNextItem()));
+ connect(d->nextButton, TQT_SIGNAL(clicked()),
+ this, TQT_SIGNAL(signalNextItem()));
- connect(d->lastButton, SIGNAL(clicked()),
- this, SIGNAL(signalLastItem()));
+ connect(d->lastButton, TQT_SIGNAL(clicked()),
+ this, TQT_SIGNAL(signalLastItem()));
}
StatusNavigateBar::~StatusNavigateBar()
diff --git a/digikam/libs/widgets/common/statusnavigatebar.h b/digikam/libs/widgets/common/statusnavigatebar.h
index 89ab8aa9..cc822b2d 100644
--- a/digikam/libs/widgets/common/statusnavigatebar.h
+++ b/digikam/libs/widgets/common/statusnavigatebar.h
@@ -25,10 +25,10 @@
#ifndef STATUS_NAVIGATE_BAR_H
#define STATUS_NAVIGATE_BAR_H
-// Qt includes.
+// TQt includes.
-#include <qwidget.h>
-#include <qstring.h>
+#include <tqwidget.h>
+#include <tqstring.h>
// Local includes.
@@ -39,9 +39,10 @@ namespace Digikam
class StatusNavigateBarPriv;
-class DIGIKAM_EXPORT StatusNavigateBar : public QWidget
+class DIGIKAM_EXPORT StatusNavigateBar : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -55,7 +56,7 @@ public:
public:
- StatusNavigateBar(QWidget *parent=0);
+ StatusNavigateBar(TQWidget *tqparent=0);
~StatusNavigateBar();
void setNavigateBarState(bool hasPrev, bool hasNext);
diff --git a/digikam/libs/widgets/common/statusprogressbar.cpp b/digikam/libs/widgets/common/statusprogressbar.cpp
index 04866fad..bd1c9ec3 100644
--- a/digikam/libs/widgets/common/statusprogressbar.cpp
+++ b/digikam/libs/widgets/common/statusprogressbar.cpp
@@ -22,11 +22,11 @@
*
* ============================================================ */
-// Qt includes.
+// TQt includes.
-#include <qlayout.h>
-#include <qwidget.h>
-#include <qpushbutton.h>
+#include <tqlayout.h>
+#include <tqwidget.h>
+#include <tqpushbutton.h>
// KDE includes.
@@ -64,29 +64,29 @@ public:
}
- QWidget *progressWidget;
+ TQWidget *progressWidget;
- QPushButton *cancelButton;
+ TQPushButton *cancelButton;
KSqueezedTextLabel *textLabel;
KProgress *progressBar;
};
-StatusProgressBar::StatusProgressBar(QWidget *parent)
- : QWidgetStack(parent, 0, Qt::WDestructiveClose)
+StatusProgressBar::StatusProgressBar(TQWidget *tqparent)
+ : TQWidgetStack(tqparent, 0, TQt::WDestructiveClose)
{
d = new StatusProgressBarPriv;
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
d->textLabel = new KSqueezedTextLabel(this);
- d->progressWidget = new QWidget(this);
- QHBoxLayout *hBox = new QHBoxLayout(d->progressWidget);
+ d->progressWidget = new TQWidget(this);
+ TQHBoxLayout *hBox = new TQHBoxLayout(d->progressWidget);
d->progressBar = new KProgress(d->progressWidget);
setProgressTotalSteps(100);
- d->cancelButton = new QPushButton(d->progressWidget);
- d->cancelButton->setFocusPolicy(QWidget::NoFocus);
- d->cancelButton->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
+ d->cancelButton = new TQPushButton(d->progressWidget);
+ d->cancelButton->setFocusPolicy(TQ_NoFocus);
+ d->cancelButton->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
d->cancelButton->setPixmap(SmallIcon("cancel"));
// Parent widget will probably have the wait cursor set.
@@ -99,8 +99,8 @@ StatusProgressBar::StatusProgressBar(QWidget *parent)
addWidget(d->textLabel, StatusProgressBarPriv::TextLabel);
addWidget(d->progressWidget, StatusProgressBarPriv::ProgressBar);
- connect( d->cancelButton, SIGNAL( clicked() ),
- this, SIGNAL( signalCancelButtonPressed() ) );
+ connect( d->cancelButton, TQT_SIGNAL( clicked() ),
+ this, TQT_SIGNAL( signalCancelButtonPressed() ) );
progressBarMode(TextMode);
}
@@ -110,14 +110,14 @@ StatusProgressBar::~StatusProgressBar()
delete d;
}
-void StatusProgressBar::setText(const QString& text)
+void StatusProgressBar::setText(const TQString& text)
{
d->textLabel->setText(text);
}
-void StatusProgressBar::setAlignment(int a)
+void StatusProgressBar::tqsetAlignment(int a)
{
- d->textLabel->setAlignment(a);
+ d->textLabel->tqsetAlignment(a);
}
int StatusProgressBar::progressValue()
@@ -140,13 +140,13 @@ int StatusProgressBar::progressTotalSteps()
return d->progressBar->totalSteps();
}
-void StatusProgressBar::setProgressText(const QString& text)
+void StatusProgressBar::setProgressText(const TQString& text)
{
- d->progressBar->setFormat( text + QString ("%p%") );
+ d->progressBar->setFormat( text + TQString ("%p%") );
d->progressBar->update();
}
-void StatusProgressBar::progressBarMode(int mode, const QString& text)
+void StatusProgressBar::progressBarMode(int mode, const TQString& text)
{
if ( mode == TextMode)
{
diff --git a/digikam/libs/widgets/common/statusprogressbar.h b/digikam/libs/widgets/common/statusprogressbar.h
index 4eb419c5..3e801c87 100644
--- a/digikam/libs/widgets/common/statusprogressbar.h
+++ b/digikam/libs/widgets/common/statusprogressbar.h
@@ -27,8 +27,8 @@
// KDE includes.
-#include <qwidgetstack.h>
-#include <qstring.h>
+#include <tqwidgetstack.h>
+#include <tqstring.h>
// Local includes.
@@ -39,9 +39,10 @@ namespace Digikam
class StatusProgressBarPriv;
-class DIGIKAM_EXPORT StatusProgressBar : public QWidgetStack
+class DIGIKAM_EXPORT StatusProgressBar : public TQWidgetStack
{
Q_OBJECT
+ TQ_OBJECT
public:
@@ -54,12 +55,12 @@ public:
public:
- StatusProgressBar(QWidget *parent=0);
+ StatusProgressBar(TQWidget *tqparent=0);
~StatusProgressBar();
- void setAlignment(int a);
+ void tqsetAlignment(int a);
- void progressBarMode(int mode, const QString& text=QString());
+ void progressBarMode(int mode, const TQString& text=TQString());
int progressValue();
@@ -68,9 +69,9 @@ public:
public slots:
- void setText(const QString& text);
+ void setText(const TQString& text);
void setProgressValue(int v);
- void setProgressText(const QString& text);
+ void setProgressText(const TQString& text);
signals:
diff --git a/digikam/libs/widgets/common/statuszoombar.cpp b/digikam/libs/widgets/common/statuszoombar.cpp
index 808c529c..9f2b002e 100644
--- a/digikam/libs/widgets/common/statuszoombar.cpp
+++ b/digikam/libs/widgets/common/statuszoombar.cpp
@@ -21,13 +21,13 @@
*
* ============================================================ */
-// Qt includes.
+// TQt includes.
-#include <qtoolbutton.h>
-#include <qtimer.h>
-#include <qslider.h>
-#include <qtooltip.h>
-#include <qevent.h>
+#include <tqtoolbutton.h>
+#include <tqtimer.h>
+#include <tqslider.h>
+#include <tqtooltip.h>
+#include <tqevent.h>
// KDE includes.
@@ -44,30 +44,30 @@
namespace Digikam
{
-QSliderReverseWheel::QSliderReverseWheel(QWidget *parent)
- : QSlider(parent)
+TQSliderReverseWheel::TQSliderReverseWheel(TQWidget *tqparent)
+ : TQSlider(tqparent)
{
// empty, we just need to re-implement wheelEvent to reverse the wheel
}
-QSliderReverseWheel::~QSliderReverseWheel()
+TQSliderReverseWheel::~TQSliderReverseWheel()
{
}
-void QSliderReverseWheel::wheelEvent(QWheelEvent * e)
+void TQSliderReverseWheel::wheelEvent(TQWheelEvent * e)
{
- if ( e->orientation() != orientation() && !rect().contains(e->pos()) )
+ if ( e->orientation() != orientation() && !TQT_TQRECT_OBJECT(rect()).tqcontains(e->pos()) )
return;
static float offset = 0;
- static QSlider* offset_owner = 0;
+ static TQSlider* offset_owner = 0;
if (offset_owner != this){
offset_owner = this;
offset = 0;
}
// note: different sign in front of e->delta vs. original implementation
- offset += e->delta()*QMAX(pageStep(),lineStep())/120;
- if (QABS(offset)<1)
+ offset += e->delta()*TQMAX(pageStep(),lineStep())/120;
+ if (TQABS(offset)<1)
return;
setValue( value() + int(offset) );
offset -= int(offset);
@@ -90,29 +90,29 @@ public:
zoomTimer = 0;
}
- QToolButton *zoomPlusButton;
- QToolButton *zoomMinusButton;
+ TQToolButton *zoomPlusButton;
+ TQToolButton *zoomMinusButton;
- QTimer *zoomTimer;
+ TQTimer *zoomTimer;
- QSlider *zoomSlider;
+ TQSlider *zoomSlider;
DTipTracker *zoomTracker;
};
-StatusZoomBar::StatusZoomBar(QWidget *parent)
- : QHBox(parent, 0, Qt::WDestructiveClose)
+StatusZoomBar::StatusZoomBar(TQWidget *tqparent)
+ : TQHBox(tqparent, 0, TQt::WDestructiveClose)
{
d = new StatusZoomBarPriv;
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
- d->zoomMinusButton = new QToolButton(this);
+ d->zoomMinusButton = new TQToolButton(this);
d->zoomMinusButton->setAutoRaise(true);
- d->zoomMinusButton->setFocusPolicy(QWidget::NoFocus);
+ d->zoomMinusButton->setFocusPolicy(TQ_NoFocus);
d->zoomMinusButton->setIconSet(SmallIconSet("viewmag-"));
- QToolTip::add(d->zoomMinusButton, i18n("Zoom Out"));
+ TQToolTip::add(d->zoomMinusButton, i18n("Zoom Out"));
- d->zoomSlider = new QSliderReverseWheel(this);
+ d->zoomSlider = new TQSliderReverseWheel(this);
d->zoomSlider->setMinValue(ThumbnailSize::Small);
d->zoomSlider->setMaxValue(ThumbnailSize::Huge);
d->zoomSlider->setPageStep(ThumbnailSize::Step);
@@ -121,32 +121,32 @@ StatusZoomBar::StatusZoomBar(QWidget *parent)
d->zoomSlider->setLineStep(ThumbnailSize::Step);
d->zoomSlider->setMaximumHeight(fontMetrics().height()+2);
d->zoomSlider->setFixedWidth(120);
- d->zoomSlider->setFocusPolicy(QWidget::NoFocus);
+ d->zoomSlider->setFocusPolicy(TQ_NoFocus);
- d->zoomPlusButton = new QToolButton(this);
+ d->zoomPlusButton = new TQToolButton(this);
d->zoomPlusButton->setAutoRaise(true);
d->zoomPlusButton->setIconSet(SmallIconSet("viewmag+"));
- d->zoomPlusButton->setFocusPolicy(QWidget::NoFocus);
- QToolTip::add(d->zoomPlusButton, i18n("Zoom In"));
+ d->zoomPlusButton->setFocusPolicy(TQ_NoFocus);
+ TQToolTip::add(d->zoomPlusButton, i18n("Zoom In"));
d->zoomTracker = new DTipTracker("", d->zoomSlider);
// -------------------------------------------------------------
- connect(d->zoomMinusButton, SIGNAL(clicked()),
- this, SIGNAL(signalZoomMinusClicked()));
+ connect(d->zoomMinusButton, TQT_SIGNAL(clicked()),
+ this, TQT_SIGNAL(signalZoomMinusClicked()));
- connect(d->zoomPlusButton, SIGNAL(clicked()),
- this, SIGNAL(signalZoomPlusClicked()));
+ connect(d->zoomPlusButton, TQT_SIGNAL(clicked()),
+ this, TQT_SIGNAL(signalZoomPlusClicked()));
- connect(d->zoomSlider, SIGNAL(valueChanged(int)),
- this, SIGNAL(signalZoomSliderChanged(int)));
+ connect(d->zoomSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SIGNAL(signalZoomSliderChanged(int)));
- connect(d->zoomSlider, SIGNAL(valueChanged(int)),
- this, SLOT(slotZoomSliderChanged(int)));
+ connect(d->zoomSlider, TQT_SIGNAL(valueChanged(int)),
+ this, TQT_SLOT(slotZoomSliderChanged(int)));
- connect(d->zoomSlider, SIGNAL(sliderReleased()),
- this, SLOT(slotZoomSliderReleased()));
+ connect(d->zoomSlider, TQT_SIGNAL(sliderReleased()),
+ this, TQT_SLOT(slotZoomSliderReleased()));
}
StatusZoomBar::~StatusZoomBar()
@@ -166,9 +166,9 @@ void StatusZoomBar::slotZoomSliderChanged(int)
delete d->zoomTimer;
}
- d->zoomTimer = new QTimer( this );
- connect(d->zoomTimer, SIGNAL(timeout()),
- this, SLOT(slotDelayedZoomSliderChanged()) );
+ d->zoomTimer = new TQTimer( this );
+ connect(d->zoomTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(slotDelayedZoomSliderChanged()) );
d->zoomTimer->start(300, true);
}
@@ -189,7 +189,7 @@ void StatusZoomBar::setZoomSliderValue(int v)
d->zoomSlider->blockSignals(false);
}
-void StatusZoomBar::setZoomTrackerText(const QString& text)
+void StatusZoomBar::setZoomTrackerText(const TQString& text)
{
d->zoomTracker->setText(text);
}
diff --git a/digikam/libs/widgets/common/statuszoombar.h b/digikam/libs/widgets/common/statuszoombar.h
index 4ef0447e..e0a4093c 100644
--- a/digikam/libs/widgets/common/statuszoombar.h
+++ b/digikam/libs/widgets/common/statuszoombar.h
@@ -24,15 +24,15 @@
#ifndef STATUSSTATUSBAR_H
#define STATUSSTATUSBAR_H
-// Qt includes.
+// TQt includes.
-#include <qslider.h>
-#include <qevent.h>
+#include <tqslider.h>
+#include <tqevent.h>
// KDE includes.
-#include <qhbox.h>
-#include <qstring.h>
+#include <tqhbox.h>
+#include <tqstring.h>
// Local includes.
@@ -44,36 +44,37 @@ namespace Digikam
class StatusZoomBarPriv;
-class DIGIKAM_EXPORT QSliderReverseWheel : public QSlider
+class DIGIKAM_EXPORT TQSliderReverseWheel : public TQSlider
{
public:
- QSliderReverseWheel(QWidget *parent=0);
- ~QSliderReverseWheel();
+ TQSliderReverseWheel(TQWidget *tqparent=0);
+ ~TQSliderReverseWheel();
private:
- void wheelEvent(QWheelEvent *e);
+ void wheelEvent(TQWheelEvent *e);
};
// ----------------------------------------------------------------------
-class DIGIKAM_EXPORT StatusZoomBar : public QHBox
+class DIGIKAM_EXPORT StatusZoomBar : public TQHBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- StatusZoomBar( QWidget *parent=0 );
+ StatusZoomBar( TQWidget *tqparent=0 );
~StatusZoomBar();
void setEnableZoomPlus(bool e);
void setEnableZoomMinus(bool e);
void setZoomSliderValue(int v);
- void setZoomTrackerText(const QString& text);
+ void setZoomTrackerText(const TQString& text);
signals: