summaryrefslogtreecommitdiffhomepage
path: root/bin
diff options
context:
space:
mode:
authorWim Vriend <facetracknoir@gmail.com>2012-07-22 14:26:47 +0000
committerWim Vriend <facetracknoir@gmail.com>2012-07-22 14:26:47 +0000
commit2b1a785960259d1fea4be644384f29756c20351e (patch)
tree9115c31fb87f1074e9b20943e0c8e3b9e3e3c9a6 /bin
parentf232afc51a7a61e52ff2bbfff76de046198ebb44 (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.dllbin0 -> 69632 bytes
-rw-r--r--bin/QFunctionConfigurator.libbin27136 -> 27876 bytes
-rw-r--r--bin/qfunctionconfigurator.h18
3 files changed, 16 insertions, 2 deletions
diff --git a/bin/QFunctionConfigurator.dll b/bin/QFunctionConfigurator.dll
new file mode 100644
index 00000000..18ba60b4
--- /dev/null
+++ b/bin/QFunctionConfigurator.dll
Binary files differ
diff --git a/bin/QFunctionConfigurator.lib b/bin/QFunctionConfigurator.lib
index 05f4afa1..6c49062e 100644
--- a/bin/QFunctionConfigurator.lib
+++ b/bin/QFunctionConfigurator.lib
Binary files differ
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