diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-14 17:13:34 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-09-14 17:13:34 +0200 |
commit | cf5a0fb030e44f616475b9c85115f0eafeecde70 (patch) | |
tree | f198e75d29c124e80c55f286b6657f44230a8ef5 /qfunctionconfigurator/qfunctionconfigurator.h | |
parent | 8c3c17c9e0e9d377a69ad44c4a3e350bf9f1d505 (diff) |
refactor QFunctionConfigurator
While the API is more clear now and withstands config changes properly,
there's a performance degradation while moving a spline point. It now
refreshes whole spline.
Diffstat (limited to 'qfunctionconfigurator/qfunctionconfigurator.h')
-rw-r--r-- | qfunctionconfigurator/qfunctionconfigurator.h | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/qfunctionconfigurator.h index 963f6b13..d2714ced 100644 --- a/qfunctionconfigurator/qfunctionconfigurator.h +++ b/qfunctionconfigurator/qfunctionconfigurator.h @@ -52,18 +52,18 @@ class FTNOIR_TRACKER_BASE_EXPORT QFunctionConfigurator : public QWidget { Q_OBJECT - Q_PROPERTY(int maxInputEGU READ maxInputEGU WRITE setmaxInputEGU); - Q_PROPERTY(int maxOutputEGU READ maxOutputEGU WRITE setmaxOutputEGU); - Q_PROPERTY(int pixPerEGU_Input READ pixPerEGU_Input WRITE setpixPerEGU_Input); - Q_PROPERTY(int pixPerEGU_Output READ pixPerEGU_Output WRITE setpixPerEGU_Output); - Q_PROPERTY(int gridDistEGU_Input READ gridDistEGU_Input WRITE setgridDistEGU_Input); - Q_PROPERTY(int gridDistEGU_Output READ gridDistEGU_Output WRITE setgridDistEGU_Output); - - Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier); - Q_PROPERTY(QColor colorBackground READ colorBackground WRITE setColorBackground); - Q_PROPERTY(QString stringInputEGU READ stringInputEGU WRITE setInputEGU); - Q_PROPERTY(QString stringOutputEGU READ stringOutputEGU WRITE setOutputEGU); - Q_PROPERTY(QString stringCaption READ stringCaption WRITE setCaption); + Q_PROPERTY(int maxInputEGU READ maxInputEGU WRITE setmaxInputEGU) + Q_PROPERTY(int maxOutputEGU READ maxOutputEGU WRITE setmaxOutputEGU) + Q_PROPERTY(int pixPerEGU_Input READ pixPerEGU_Input WRITE setpixPerEGU_Input) + Q_PROPERTY(int pixPerEGU_Output READ pixPerEGU_Output WRITE setpixPerEGU_Output) + Q_PROPERTY(int gridDistEGU_Input READ gridDistEGU_Input WRITE setgridDistEGU_Input) + Q_PROPERTY(int gridDistEGU_Output READ gridDistEGU_Output WRITE setgridDistEGU_Output) + + Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier) + Q_PROPERTY(QColor colorBackground READ colorBackground WRITE setColorBackground) + Q_PROPERTY(QString stringInputEGU READ stringInputEGU WRITE setInputEGU) + Q_PROPERTY(QString stringOutputEGU READ stringOutputEGU WRITE setOutputEGU) + Q_PROPERTY(QString stringCaption READ stringCaption WRITE setCaption) // Return the current value to Designer int maxInputEGU() const @@ -159,7 +159,6 @@ protected: 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 withinRect( const QPointF &coord, const QRectF &rect ) const; protected: @@ -169,7 +168,7 @@ private: QRectF range; // The actual rectangle for the Bezier-curve QPointF lastPoint; // The right-most point of the Function QPointF normalizePoint (QPointF point) const; // Convert the graphical Point to a real-life Point - QPointF graphicalizePoint (QPointF point, QString source = "") const; // Convert the Point to a graphical Point + QPointF graphicalizePoint (QPointF point) const; // Convert the Point to a graphical Point int movingPoint; @@ -197,7 +196,6 @@ private: // QString _title; // Title do display in Widget and to load Settings FunctionConfig* _config; - QList<QPointF> _points; // Function-points }; #endif // QFUNCTIONCONFIGURATOR_H |