summaryrefslogtreecommitdiffstats
path: root/lib/kofficeui/KoRuler.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficeui/KoRuler.h')
-rw-r--r--lib/kofficeui/KoRuler.h71
1 files changed, 36 insertions, 35 deletions
diff --git a/lib/kofficeui/KoRuler.h b/lib/kofficeui/KoRuler.h
index 77d169f4..5cea5678 100644
--- a/lib/kofficeui/KoRuler.h
+++ b/lib/kofficeui/KoRuler.h
@@ -24,8 +24,8 @@
#ifndef koRuler_h
#define koRuler_h
-#include <qframe.h>
-#include <qpixmap.h>
+#include <tqframe.h>
+#include <tqpixmap.h>
#include <kdemacros.h>
#include <koffice_export.h>
@@ -34,7 +34,7 @@
#include <KoUnit.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};
@@ -63,11 +63,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);
@@ -84,7 +84,7 @@ struct KoTabulator {
}
};
-typedef QValueList<KoTabulator> KoTabulatorList;
+typedef TQValueList<KoTabulator> KoTabulatorList;
class KoRulerPrivate;
@@ -96,11 +96,12 @@ class KoRulerPrivate;
* and supports zooming, tabulators, paragraph indents, showing the mouse position, etc.
*
* It also offers a popupmenu upon right-clicking, for changing the unit,
- * the page layout, or removing a tab.
+ * the page tqlayout, or removing a tab.
*/
-class KOFFICEUI_EXPORT KoRuler : public QFrame
+class KOFFICEUI_EXPORT KoRuler : public TQFrame
{
Q_OBJECT
+ TQ_OBJECT
friend class KoRulerPrivate; // for the Action enum
public:
static const int F_TABS;
@@ -112,7 +113,7 @@ public:
* Create a ruler
* TODO document params
*/
- KoRuler( QWidget *_parent, QWidget *_canvas, Orientation _orientation,
+ KoRuler( TQWidget *_parent, TQWidget *_canvas, Qt::Orientation _orientation,
const KoPageLayout& _layout, int _flags, KoUnit::Unit _unit,
KoTabChooser *_tabChooser = 0L );
~KoRuler();
@@ -122,7 +123,7 @@ public:
* example "mm", "pt" or "inch".
* @deprecated You should use the KoUnit::Unit variant instead.
*/
- void setUnit( const QString& unit ) KDE_DEPRECATED ;
+ void setUnit( const TQString& unit ) KDE_DEPRECATED ;
/**
* Set the unit to be used.
*/
@@ -138,7 +139,7 @@ public:
const double& zoom() const { return m_zoom; }
/**
- * Set the page layout, see @ref KoPageLayout.
+ * Set the page tqlayout, see @ref KoPageLayout.
* This defines the size of the page and the margins,
* from which the size of the ruler is deducted.
*/
@@ -159,7 +160,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 );
@@ -243,14 +244,14 @@ public:
void setPageLayoutMenuItemEnabled(bool b);
/**
- * Reimplemented from QWidget
+ * Reimplemented from TQWidget
*/
- virtual QSize minimumSizeHint() const;
+ virtual TQSize tqminimumSizeHint() const;
/**
- * Reimplemented from QWidget
+ * Reimplemented from TQWidget
*/
- virtual QSize sizeHint() const;
+ virtual TQSize tqsizeHint() const;
signals:
void newPageLayout( const KoPageLayout & );
@@ -267,28 +268,28 @@ signals:
void tabListChanged( const KoTabulatorList & );
void unitChanged( KoUnit::Unit );
- void addGuide(const QPoint &, bool, int );
- void moveGuide( const QPoint &, bool, int );
- void addHelpline(const QPoint &, bool );
- void moveHelpLines( const QPoint &, bool );
+ void addGuide(const TQPoint &, bool, int );
+ void moveGuide( const TQPoint &, bool, int );
+ 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 )
+ void drawContents( TQPainter *_painter )
{ orientation == Qt::Horizontal ? drawHorizontal( _painter ) : drawVertical( _painter ); }
- void drawHorizontal( QPainter *_painter );
- void drawVertical( QPainter *_painter );
- void drawTabs( QPainter &_painter );
+ void drawHorizontal( TQPainter *_painter );
+ void drawVertical( TQPainter *_painter );
+ void drawTabs( 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 );
@@ -314,7 +315,7 @@ private:
Qt::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;
@@ -342,13 +343,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 {
@@ -360,13 +361,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