summaryrefslogtreecommitdiffstats
path: root/src/statgraph.h
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2013-07-27 16:57:53 +0200
committerSlávek Banko <[email protected]>2013-07-27 18:48:46 +0200
commit7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931 (patch)
tree4655c7263ca5c64d23d10167cb459dd9cb253815 /src/statgraph.h
parent88ea2b6cd4382627fb6efca9cc54825aee881d1e (diff)
downloadtork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.tar.gz
tork-7c2bc4b5ce4fc1a72868aa949e9ec49fbe2e7931.zip
Initial TQt conversion
Diffstat (limited to 'src/statgraph.h')
-rw-r--r--src/statgraph.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/statgraph.h b/src/statgraph.h
index 40a9c26..2c526f5 100644
--- a/src/statgraph.h
+++ b/src/statgraph.h
@@ -34,10 +34,10 @@
#ifndef STATGRAPH_H
#define STATGRAPH_H
-#include <qobject.h>
-#include <qstring.h>
-#include <qcolor.h>
-#include <qlabel.h>
+#include <ntqobject.h>
+#include <ntqstring.h>
+#include <ntqcolor.h>
+#include <ntqlabel.h>
/**
* @author Diego 'Flameeyes' Pettenò
@@ -49,7 +49,7 @@
* system trays and so on.
*
*/
-class StatGraph : public QLabel {
+class StatGraph : public TQLabel {
Q_OBJECT
public:
//@{
@@ -57,22 +57,22 @@ public:
* @name defaultcolors Default graphs' colors
* @brief These colors will be used as defaults color for graphs.
*/
- static const QColor defaultBgColor;
- static const QColor defaultReadingColor;
- static const QColor defaultLabelColor;
- static const QColor defaultGridColor;
- static const QColor invalidColor; ///< Color used to pass transparent colors
+ static const TQColor defaultBgColor;
+ static const TQColor defaultReadingColor;
+ static const TQColor defaultLabelColor;
+ static const TQColor defaultGridColor;
+ static const TQColor invalidColor; ///< Color used to pass transparent colors
//@}
enum Style { Lines, Bars, Shades };
protected:
Style m_style; ///< Style of the graph
- QString m_label; ///< Label to show on the graph (QString::null to not show label)
+ TQString m_label; ///< Label to show on the graph (TQString::null to not show label)
- QColor m_bgColor; ///< Background color for the graph @see defaultBgColor
- QColor m_readingColor; ///< Color for the readings graph
- QColor m_labelColor; ///< Color for the graph's label (if any)
- QColor m_gridColor; ///< Color for the graph's grid (if any)
+ TQColor m_bgColor; ///< Background color for the graph @see defaultBgColor
+ TQColor m_readingColor; ///< Color for the readings graph
+ TQColor m_labelColor; ///< Color for the graph's label (if any)
+ TQColor m_gridColor; ///< Color for the graph's grid (if any)
ushort m_gridPace; ///< Pace at which a the grid is drawn. If 0, the grid is not drawn.
ushort m_pace; ///< Horizontal pace for readings
@@ -80,7 +80,7 @@ protected:
uint m_currReading; ///< Current index in the readings arrays.
uint *m_readings; ///< Array for readings.
- Qt::ButtonState m_button; ///< Button clicked in pressed/released events
+ TQt::ButtonState m_button; ///< Button clicked in pressed/released events
public:
/**
* @brief Constructor for a StatGraph instance
@@ -88,16 +88,16 @@ public:
* @param pace X-distance between two reads. This will also influence the number
* of readings which can be added (label's width / pace)
* @param gridPace Y-distance between two grid lines. If 0, the grid is not drawn.
- * @param label Label to show on the graph (QString::null to not show label)
+ * @param label Label to show on the graph (TQString::null to not show label)
* @param bgColor Background color to apply to the graph
- * @param name Name of the statgraph instance (passed to QObject)
+ * @param name Name of the statgraph instance (passed to TQObject)
*
- * This constructor initialize the QObject parent class and the
+ * This constructor initialize the TQObject parent class and the
* label which will be used to draw the graph on.
* Note: it will @b not change the background of the label, nor it will draw
* the label.
*/
- StatGraph(QWidget *parent, ushort pace = 1, ushort gridPace = 0, const QString &label = QString::null, const QColor &bgColor = defaultBgColor, const char *name = "");
+ StatGraph(TQWidget *parent, ushort pace = 1, ushort gridPace = 0, const TQString &label = TQString::null, const TQColor &bgColor = defaultBgColor, const char *name = "");
virtual ~StatGraph();
@@ -108,35 +108,35 @@ public:
{ m_style = style; }
protected:
- virtual void resizeEvent(QResizeEvent*);
- virtual void paintEvent(QPaintEvent*);
- virtual void mousePressEvent(QMouseEvent *);
- virtual void mouseReleaseEvent(QMouseEvent *);
+ virtual void resizeEvent(TQResizeEvent*);
+ virtual void paintEvent(TQPaintEvent*);
+ virtual void mousePressEvent(TQMouseEvent *);
+ virtual void mouseReleaseEvent(TQMouseEvent *);
/**
* @brief Paints the grid on the graph
*/
- void paintGrid(QPainter &p);
+ void paintGrid(TQPainter &p);
/**
* @brief Paints the graph using Shades style
*/
- void paintShades(QPainter &p);
+ void paintShades(TQPainter &p);
/**
* @brief Paints the graph using Bars style
*/
- void paintBars(QPainter &p);
+ void paintBars(TQPainter &p);
/**
* @brief Paints the graph using Lines style
*/
- void paintLines(QPainter &p);
+ void paintLines(TQPainter &p);
/**
* @brief Paints the label on the graph
*/
- void paintLabel(QPainter &p);
+ void paintLabel(TQPainter &p);
/**
* @brief Apply softening algorithm to readings
@@ -158,9 +158,9 @@ public slots:
* @brief Sets the label to show on the graph
*
* This function sets the string to show on the graph.
- * To disable showLabel, simply pass QString::null as label to show.
+ * To disable showLabel, simply pass TQString::null as label to show.
*/
- inline void setLabel(const QString &label)
+ inline void setLabel(const TQString &label)
{
m_label = label;
}
@@ -171,7 +171,7 @@ public slots:
* This function sets the background color for the graph instance
* To set the background to transparent, simply pass invalidColor value.
*/
- void setBgColor(const QColor &color);
+ void setBgColor(const TQColor &color);
/**
* @brief Sets the reading color for the graph.
@@ -180,7 +180,7 @@ public slots:
* @note Passing invalidColor to this, made it move to the default color
* as soon as a redraw is requested.
*/
- inline void setReadingColor(const QColor &color)
+ inline void setReadingColor(const TQColor &color)
{ m_readingColor = color; }
/**
@@ -190,7 +190,7 @@ public slots:
* @note Passing invalidColor to this, made it move to the default color
* as soon as a redraw is requested.
*/
- inline void setLabelColor(const QColor &color)
+ inline void setLabelColor(const TQColor &color)
{ m_labelColor = color; }
/**
@@ -200,7 +200,7 @@ public slots:
* @note Passing invalidColor to this, made it move to the default color
* as soon as a redraw is requested.
*/
- inline void setGridColor(const QColor &color)
+ inline void setGridColor(const TQColor &color)
{ m_gridColor = color; }
/**