summaryrefslogtreecommitdiffstats
path: root/krecipes/src/widgets/kreruler.h
diff options
context:
space:
mode:
Diffstat (limited to 'krecipes/src/widgets/kreruler.h')
-rw-r--r--krecipes/src/widgets/kreruler.h62
1 files changed, 31 insertions, 31 deletions
diff --git a/krecipes/src/widgets/kreruler.h b/krecipes/src/widgets/kreruler.h
index b313e02..c1ecf40 100644
--- a/krecipes/src/widgets/kreruler.h
+++ b/krecipes/src/widgets/kreruler.h
@@ -25,8 +25,8 @@
#ifndef KRERULER_H
#define KRERULER_H
-#include <qframe.h>
-#include <qpixmap.h>
+#include <ntqframe.h>
+#include <ntqpixmap.h>
#include <kdemacros.h>
@@ -38,7 +38,7 @@
#include "kreunit.h"
class KoPageLayout;
-class QPainter;
+class TQPainter;
enum KoTabulators { T_LEFT = 0, T_CENTER = 1, T_RIGHT = 2, T_DEC_PNT = 3, T_INVALID = -1 };
enum KoTabulatorFilling { TF_BLANK = 0, TF_DOTS = 1, TF_LINE = 2, TF_DASH = 3, TF_DASH_DOT = 4, TF_DASH_DOT_DOT = 5};
@@ -67,11 +67,11 @@ struct KoTabulator {
/**
* Alignment character.
*/
- QChar alignChar;
+ TQChar alignChar;
bool operator==( const KoTabulator & t ) const {
- return QABS( ptPos - t.ptPos ) < 1E-4 && type == t.type &&
- filling == t.filling && QABS( ptWidth - t.ptWidth ) < 1E-4;
+ return TQABS( ptPos - t.ptPos ) < 1E-4 && type == t.type &&
+ filling == t.filling && TQABS( ptWidth - t.ptWidth ) < 1E-4;
}
bool operator!=( const KoTabulator & t ) const {
return !operator==(t);
@@ -88,7 +88,7 @@ struct KoTabulator {
}
};
-typedef QValueList<KoTabulator> KoTabulatorList;
+typedef TQValueList<KoTabulator> KoTabulatorList;
class KoRulerPrivate;
@@ -102,7 +102,7 @@ class KoRulerPrivate;
* It also offers a popupmenu upon right-clicking, for changing the unit,
* the page layout, or removing a tab.
*/
-class KoRuler : public QFrame
+class KoRuler : public TQFrame
{
Q_OBJECT
friend class KoRulerPrivate; // for the Action enum
@@ -116,7 +116,7 @@ public:
* Create a ruler
* TODO document params
*/
- KoRuler( QWidget *_parent, QWidget *_canvas, Orientation _orientation,
+ KoRuler( TQWidget *_parent, TQWidget *_canvas, Orientation _orientation,
const KoPageLayout& _layout, int _flags, KoUnit::Unit _unit );
~KoRuler();
@@ -156,7 +156,7 @@ public:
/**
* Set a global offset to the X and Y coordinates.
- * Usually the main drawing area is a QScrollView, and this is called
+ * Usually the main drawing area is a TQScrollView, and this is called
* with contentsX() and contentsY(), each time those values change.
*/
void setOffset( int _diffx, int _diffy );
@@ -240,14 +240,14 @@ public:
void setPageLayoutMenuItemEnabled(bool b);
/**
- * Reimplemented from QWidget
+ * Reimplemented from TQWidget
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize minimumSizeHint() const;
/**
- * Reimplemented from QWidget
+ * Reimplemented from TQWidget
*/
- virtual QSize sizeHint() const;
+ virtual TQSize sizeHint() const;
signals:
void newPageLayout( const KoPageLayout & );
@@ -264,25 +264,25 @@ signals:
void tabListChanged( const KoTabulatorList & );
void unitChanged( KoUnit::Unit );
- void addHelpline(const QPoint &, bool );
- void moveHelpLines( const QPoint &, bool );
+ void addHelpline(const TQPoint &, bool );
+ void moveHelpLines( const TQPoint &, bool );
protected:
enum Action {A_NONE, A_BR_LEFT, A_BR_RIGHT, A_BR_TOP, A_BR_BOTTOM,
A_LEFT_INDENT, A_FIRST_INDENT, A_TAB, A_RIGHT_INDENT,
A_HELPLINES };
- void drawContents( QPainter *_painter )
- { orientation == Qt::Horizontal ? drawHorizontal( _painter ) : drawVertical( _painter ); }
+ void drawContents( TQPainter *_painter )
+ { orientation == TQt::Horizontal ? drawHorizontal( _painter ) : drawVertical( _painter ); }
- void drawHorizontal( QPainter *_painter );
- void drawVertical( QPainter *_painter );
+ void drawHorizontal( TQPainter *_painter );
+ void drawVertical( TQPainter *_painter );
- void mousePressEvent( QMouseEvent *e );
- void mouseReleaseEvent( QMouseEvent *e );
- void mouseMoveEvent( QMouseEvent *e );
- void mouseDoubleClickEvent( QMouseEvent* );
- void resizeEvent( QResizeEvent *e );
+ void mousePressEvent( TQMouseEvent *e );
+ void mouseReleaseEvent( TQMouseEvent *e );
+ void mouseMoveEvent( TQMouseEvent *e );
+ void mouseDoubleClickEvent( TQMouseEvent* );
+ void resizeEvent( TQResizeEvent *e );
void handleDoubleClick();
double makeIntern( double _v );
@@ -305,10 +305,10 @@ private:
KoRulerPrivate *d;
- Qt::Orientation orientation;
+ TQt::Orientation orientation;
int diffx, diffy;
double i_left, i_first;
- QPixmap buffer;
+ TQPixmap buffer;
double m_zoom, m_1_zoom;
KoUnit::Unit m_unit;
bool hasToDelete;
@@ -336,13 +336,13 @@ inline double KoRuler::zoomIt(const double &value) const {
inline int KoRuler::zoomIt(const int &value) const {
if (m_zoom==1.0)
return value;
- return qRound(m_zoom*value);
+ return tqRound(m_zoom*value);
}
inline unsigned int KoRuler::zoomIt(const unsigned int &value) const {
if (m_zoom==1.0)
return value;
- return static_cast<unsigned int>(qRound(m_zoom*value));
+ return static_cast<unsigned int>(tqRound(m_zoom*value));
}
inline double KoRuler::unZoomIt(const double &value) const {
@@ -354,13 +354,13 @@ inline double KoRuler::unZoomIt(const double &value) const {
inline int KoRuler::unZoomIt(const int &value) const {
if(m_zoom==1.0)
return value;
- return qRound(value*m_1_zoom);
+ return tqRound(value*m_1_zoom);
}
inline unsigned int KoRuler::unZoomIt(const unsigned int &value) const {
if(m_zoom==1.0)
return value;
- return static_cast<unsigned int>(qRound(value*m_1_zoom));
+ return static_cast<unsigned int>(tqRound(value*m_1_zoom));
}
#endif