diff options
author | Wim Vriend <facetracknoir@gmail.com> | 2012-07-22 14:26:47 +0000 |
---|---|---|
committer | Wim Vriend <facetracknoir@gmail.com> | 2012-07-22 14:26:47 +0000 |
commit | 2b1a785960259d1fea4be644384f29756c20351e (patch) | |
tree | 9115c31fb87f1074e9b20943e0c8e3b9e3e3c9a6 /bin | |
parent | f232afc51a7a61e52ff2bbfff76de046198ebb44 (diff) |
Changed FunctionConfigurator: now using Pixmap for drawing and added resetCurve
git-svn-id: svn+ssh://svn.code.sf.net/p/facetracknoir/code@116 19e81ba0-9b1a-49c3-bd6c-561e1906d5fb
Diffstat (limited to 'bin')
-rw-r--r-- | bin/QFunctionConfigurator.dll | bin | 0 -> 69632 bytes | |||
-rw-r--r-- | bin/QFunctionConfigurator.lib | bin | 27136 -> 27876 bytes | |||
-rw-r--r-- | bin/qfunctionconfigurator.h | 18 |
3 files changed, 16 insertions, 2 deletions
diff --git a/bin/QFunctionConfigurator.dll b/bin/QFunctionConfigurator.dll Binary files differnew file mode 100644 index 00000000..18ba60b4 --- /dev/null +++ b/bin/QFunctionConfigurator.dll diff --git a/bin/QFunctionConfigurator.lib b/bin/QFunctionConfigurator.lib Binary files differindex 05f4afa1..6c49062e 100644 --- a/bin/QFunctionConfigurator.lib +++ b/bin/QFunctionConfigurator.lib diff --git a/bin/qfunctionconfigurator.h b/bin/qfunctionconfigurator.h index c2a2f25b..e1f70c5a 100644 --- a/bin/qfunctionconfigurator.h +++ b/bin/qfunctionconfigurator.h @@ -128,6 +128,11 @@ public slots: void setOutputEGU(QString);
void setCaption(QString);
+ void resetCurve() {
+ QSettings iniFile( strSettingsFile, QSettings::IniFormat ); // Application settings (in INI-file)
+ loadSettings( iniFile );
+ }
+
protected slots:
void paintEvent(QPaintEvent *e);
void mousePressEvent(QMouseEvent *e);
@@ -135,11 +140,13 @@ protected slots: void mouseReleaseEvent(QMouseEvent *e);
protected:
- void drawBackground(QPainter *painter, const QRectF &rect);
+ void drawBackground(const QRectF &rect);
+ void drawFunction(const QRectF &rect);
void drawPoint(QPainter *painter, const QPointF &pt, QColor colBG );
void drawLine(QPainter *painter, const QPointF &start, const QPointF &end, QPen pen);
bool markContains(const QPointF &pt, const QPointF &coord) const;
- bool withinRange( const QPointF &coord ) const;
+// bool withinRange( const QPointF &coord ) const;
+ bool withinRect( const QPointF &coord, const QRectF &rect ) const;
protected:
virtual void resizeEvent(QResizeEvent *);
@@ -163,6 +170,13 @@ private: QString strInputEGU; // Engineering Units input (vertical axis)
QString strOutputEGU; // Engineering Units output (horizontal axis)
QString strCaption; // Caption of the graph
+ QString strSettingsFile; // Name of last read INI-file
+ QPushButton *btnReset; // Reset Curve
+
+ bool _draw_background; // Flag to determine if the background should be (re-)drawn on the QPixmap
+ QPixmap _background; // Image of the static parts (axis, lines, etc.)
+ bool _draw_function; // Flag to determine if the function should be (re-)drawn on the QPixmap
+ QPixmap _function; // Image of the function (static unless edited by the user)
//
// Properties of the CurveConfigurator Widget
|