summaryrefslogtreecommitdiffstats
path: root/src/knutanalog.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 19:37:06 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-30 19:37:06 +0000
commit968af1d235ac30d737991b269156bee5dc99d318 (patch)
tree19b118fa5380087e10cb728be545760791ce0676 /src/knutanalog.h
parentaea4882f3b37f17c5b56bc77667e683c52254c30 (diff)
downloadknutclient-968af1d235ac30d737991b269156bee5dc99d318.tar.gz
knutclient-968af1d235ac30d737991b269156bee5dc99d318.zip
TQt4 port knutclient
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knutclient@1238881 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/knutanalog.h')
-rw-r--r--src/knutanalog.h115
1 files changed, 58 insertions, 57 deletions
diff --git a/src/knutanalog.h b/src/knutanalog.h
index b0b64f5..97d9c81 100644
--- a/src/knutanalog.h
+++ b/src/knutanalog.h
@@ -20,15 +20,15 @@
#ifndef KNUTANALOG_H
#define KNUTANALOG_H
-#include <qframe.h>
+#include <tqframe.h>
-#include <qpixmap.h> // po odladeni smazat
-#include <qimage.h>
-#include <qmutex.h>
+#include <tqpixmap.h> // po odladeni smazat
+#include <tqimage.h>
+#include <tqmutex.h>
-class QPainter;
-class QFont;
+class TQPainter;
+class TQFont;
enum speedOfAAlias { none,fast,slow};
@@ -41,8 +41,9 @@ enum speedOfAAlias { none,fast,slow};
* @version 0.1
*/
-class KNutAnalog : public QFrame {
+class KNutAnalog : public TQFrame {
Q_OBJECT
+ TQ_OBJECT
public:
@@ -59,14 +60,14 @@ public:
*
* When you need paint or repainr panel you have to call functiin reapaint
* other functions calls this function theirself, when run = true
- * Pokud je potreba vykreslit nebo prekreslit panel je nutno zavolat funkci repaint,
+ * Pokud je potreba vykreslit nebo prekreslit panel je nutno zavolat funkci tqrepaint,
* ostatni funkce ji zavolaji sami pokud je run = TRUE.
*
* @param bottomLimit Is bottom value of scale..
* @param topLimit is end value of scale.
* @param typeOfView determine type view of scale 1- circle 2- right part of circle, 3 - top part of circle
- * @param countOfParts determine count of big parts (parents parts) of scale.
- * @param countOfSubParts determine count small parts (children parts) id scale, evere big part include e few small part.
+ * @param countOfParts determine count of big parts (tqparents parts) of scale.
+ * @param countOfSubParts determine count small parts (tqchildren parts) id scale, evere big part include e few small part.
* @param pointerColor determine color of pointer.
* @param scaleColor determine color of scale.
* @param textColor determine color of text.
@@ -74,7 +75,7 @@ public:
* @param qualityOfPainter determine quality painting of pointer- 0 nothing. 1 fast antialiasing, 2 slow antialiasing, 3 blur motion + fast antialiasing, 4 blur motion + slow antialiasing
* @since 0.3
**/
- KNutAnalog(QWidget *parent = 0, const char *name = 0, int Astart = 0, int topLimit = 100, int typeOfView = 1, int countOfParts = 5, int countOfSubParts = 0, QColor pointerColor = Qt::black, QColor m_scaleColor = Qt::black, QColor textColor = Qt::black, QFont *analogFonts = 0, int qualityOfPointer = 4, bool makeBG = false );
+ KNutAnalog(TQWidget *tqparent = 0, const char *name = 0, int Astart = 0, int topLimit = 100, int typeOfView = 1, int countOfParts = 5, int countOfSubParts = 0, TQColor pointerColor = TQt::black, TQColor m_scaleColor = TQt::black, TQColor textColor = TQt::black, TQFont *analogFonts = 0, int qualityOfPointer = 4, bool makeBG = false );
/**
* Destruktor
@@ -90,19 +91,19 @@ public:
* @param m_inscription determinuje inscription , bottom text , usually.
* @param m_inscription Udava nadpis, "dolni" text, obvykle co je mereno.
* @param text_up Udava mernou jednotku "horni" text, obvykle merna jednotka.
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
*
* @since 0.1
**/
- void setText (QString m_inscription, QString text_up, bool run=false);
+ void setText (TQString m_inscription, TQString text_up, bool run=false);
/**
* Makes background of analog panel.
* Vytvori pozadi analogoveho panelu.
*
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
*
* @since 0.2
@@ -114,12 +115,12 @@ public:
* Repaint pointer of analog panel.
* Prekresli rucicku analogoveho panelu.
*
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
*
* @since 0.2
**/
- void repaintPointer ( bool run );
+ void tqrepaintPointer ( bool run );
@@ -128,7 +129,7 @@ public:
* Sets nine basic color for circle in scale
*
* @param run = TRUE provede okamzite prekresleni panelu.
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
*
* @since 0.1
**/
@@ -144,7 +145,7 @@ public:
*
* @since 0.1
**/
- void setArcColor(int reg, QColor color );
+ void setArcColor(int reg, TQColor color );
@@ -157,7 +158,7 @@ public:
* @param startOfCircle Urcuje zazatek mezikruzi.
* @param endOfCircle Urcuje konec mezikruzi.
* @param color Urcuje barvu.
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
*
* @since 0.2
@@ -170,7 +171,7 @@ public:
* Clear colors of scale
* Zrusi vybarveni stupnice.
*
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
*
* @since 0.1
@@ -185,7 +186,7 @@ public:
*
* @param Astart Urcuje pocatecni hodnotu stupnice.
* @param AEND Urcuje koncovou hodnotu stupnice.
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
*
* @since 0.2
@@ -198,7 +199,7 @@ public:
*
* @param Count Determine number of parts of pointer..
* @param Count Urcuje pocet casti stupnice.
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
*
* @since 0.1
@@ -211,11 +212,11 @@ public:
*
* @param pointerColor determine color of pointer.
* @param pointerColor Urcuje barvu rucicky.
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
* @since 0.2
*/
- void setPointerColor (QColor pointerColor, bool run=false);
+ void setPointerColor (TQColor pointerColor, bool run=false);
/**
* sets color of text;
@@ -223,12 +224,12 @@ public:
*
* @param fontColor determine color of font.
* @param fontColor urcuje barvu fontu.
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
*
* @since 0.1
*/
- void setFontColor (QColor fontColor, bool run=false );
+ void setFontColor (TQColor fontColor, bool run=false );
@@ -238,19 +239,19 @@ public:
*
* @param scaleColor determine color if scale.
* @param scaleColor urcuje barvu stupnice.
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
*
* @since 0.1
*/
- void setScaleColor (QColor scaleColor, bool run=false);
+ void setScaleColor (TQColor scaleColor, bool run=false);
/**
* Sets type of digital processing of pointer. 0 nothing. 1 fast antialiasing, 2 slow antialiasing, 3 blur motion + fast antialiasing, 4 blur motion + slow antialiasing.
*
* @param qualityOfPointer determine quality of pointer's digital procesing
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
*
* @since 0.1
@@ -264,7 +265,7 @@ public:
* Posune rucicku na hodnotu pointerValue.
*
* @param pointerValue Urcuje hodnotu na jakou bude nastavena rucicka.
- * @param run = TRUE makes immediately repaint of panel
+ * @param run = TRUE makes immediately tqrepaint of panel
* @param run = TRUE provede okamzite prekresleni panelu.
*
* @since 0.1
@@ -292,7 +293,7 @@ public:
*
* @since 0.1
*/
- void slotSetScaleFont(QFont newScaleFont);
+ void slotSetScaleFont(TQFont newScaleFont);
/**
@@ -303,7 +304,7 @@ public:
*
* @since 0.1
*/
- void slotSetTextFont(QFont newTextFont);
+ void slotSetTextFont(TQFont newTextFont);
/**
@@ -313,23 +314,23 @@ public:
*
* @since 0.1
*/
- void slotSetAllFont(QFont newAllFont);
+ void slotSetAllFont(TQFont newAllFont);
/**
* Repaint layer of backgroud and layer of pointer,
- * all panel will be repainted
+ * all panel will be tqrepainted
* Da povel k prekreseni urovne pozadi a urovne rucicky.
* To znamena, ze bude prekreslen kompletne cely panel.
*
* @since 0.1
*/
- void repaintAll (void);
+ void tqrepaintAll (void);
protected:
- virtual void resizeEvent( QResizeEvent * );
- virtual void paintEvent( QPaintEvent * );
+ virtual void resizeEvent( TQResizeEvent * );
+ virtual void paintEvent( TQPaintEvent * );
private:
@@ -360,42 +361,42 @@ public:
/**
* @internal
*/
- void paintPartOfCircle ( QPainter *paint, int centerX , int centerY, int widthOfCircle );
+ void paintPartOfCircle ( TQPainter *paint, int centerX , int centerY, int widthOfCircle );
/**
* @internal
*/
- void paintScale ( QPainter *paint , int centerX , int centerY, int widthOfCircle);
+ void paintScale ( TQPainter *paint , int centerX , int centerY, int widthOfCircle);
/**
* @internal
*/
- void makeAntialiasing (QImage* myImage, QPixmap* smallPixmap, const QRgb colorOfBG, speedOfAAlias speed = slow , int typeOfView = 0);
+ void makeAntialiasing (TQImage* myImage, TQPixmap* smallPixmap, const TQRgb colorOfBG, speedOfAAlias speed = slow , int typeOfView = 0);
/**
* @internal
*/
- void makeMotionBlur (QImage* myImage, const QRgb colorOfBG, int typeOfView = 0);
+ void makeMotionBlur (TQImage* myImage, const TQRgb colorOfBG, int typeOfView = 0);
/**
* @internal
*/
- void paintScaleNumbers ( QPainter *paint );
+ void paintScaleNumbers ( TQPainter *paint );
/**
* @internal
*/
- void paintText ( QPainter *paint );
+ void paintText ( TQPainter *paint );
/**
* @internal
*/
- void paintValueOfPointer ( QPainter *p, double value);
+ void paintValueOfPointer ( TQPainter *p, double value);
@@ -410,11 +411,11 @@ public:
int m_typeOfView; // udava typ meraku
int m_countOfParts; // pocet policek na stupnici
int m_countOfSubParts; // pocet dilku v policku na stupnici
- QColor m_pointerColor, m_scaleColor, m_textColor; // colors of pointer, text and scale
+ TQColor m_pointerColor, m_scaleColor, m_textColor; // colors of pointer, text and scale
- QColor m_arcColors[9];
- QString m_inscription;
- QString AnMJ;
+ TQColor m_arcColors[9];
+ TQString m_inscription;
+ TQString AnMJ;
int m_countOfColorParts; // count of color parts on scale
double m_valueOfPointer; // position of pointer;
double m_angleOfViewer, m_startAngle; //pocatecni_uhel;
@@ -428,24 +429,24 @@ public:
speedOfAAlias m_speedOfAAlias;
bool m_makeBlurMotion;
- QFont m_scaleFont;
- QFont m_textFont;
+ TQFont m_scaleFont;
+ TQFont m_textFont;
- QPixmap *m_wholeLayer;
+ TQPixmap *m_wholeLayer;
- QPixmap *m_backgroudLayerBig;
+ TQPixmap *m_backgroudLayerBig;
- QPixmap *m_scaleLayerBig;
- QPixmap *m_scaleLayerSmall;
+ TQPixmap *m_scaleLayerBig;
+ TQPixmap *m_scaleLayerSmall;
- QPixmap *m_pointerLayerBig;
- QPixmap *m_pointerLayerSmall;
+ TQPixmap *m_pointerLayerBig;
+ TQPixmap *m_pointerLayerSmall;
extentOfDyeDef m_extentOfDye[5];
- QMutex m_pointerMutex;
+ TQMutex m_pointerMutex;
};