summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/qfunctionconfigurator.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-09-17 12:40:39 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-09-17 12:41:45 +0200
commit679f424c250a38473c82bf1f997b75fbea4d3758 (patch)
tree06fee960550a851387fb9a26d85d44e5fc56649b /qfunctionconfigurator/qfunctionconfigurator.h
parent4fdc2d9b3733f2b8d3edd4e10fdba0b7a525ae22 (diff)
nix explicit malloc
simplifies, allows for copy operator
Diffstat (limited to 'qfunctionconfigurator/qfunctionconfigurator.h')
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.h23
1 files changed, 15 insertions, 8 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/qfunctionconfigurator.h
index d3a8741f..e4af0062 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.h
+++ b/qfunctionconfigurator/qfunctionconfigurator.h
@@ -16,40 +16,47 @@
class FTNOIR_TRACKER_BASE_EXPORT QFunctionConfigurator : public QWidget
{
Q_OBJECT
- Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier)
+ Q_PROPERTY(QString Name READ get_name WRITE set_name)
+
QColor colorBezier() const
{
return colBezier;
}
+ void setColorBezier(QColor color)
+ {
+ colBezier = color;
+ update();
+ }
+ QString get_name() const {
+ return name;
+ }
+ void set_name(QString name)
+ {
+ this->name = name;
+ }
public:
QFunctionConfigurator(QWidget *parent = 0);
FunctionConfig* config();
void setConfig(FunctionConfig* config);
void saveSettings(QString settingsFile);
-
-signals:
- void CurveChanged(bool);
-
public slots:
- void setColorBezier(QColor);
protected slots:
void paintEvent(QPaintEvent *e);
void mousePressEvent(QMouseEvent *e);
void mouseMoveEvent(QMouseEvent *e);
void mouseReleaseEvent(QMouseEvent *e);
-
protected:
void drawBackground();
void drawFunction();
void drawPoint(QPainter *painter, const QPointF &pt, QColor colBG );
void drawLine(QPainter *painter, const QPointF &start, const QPointF &end, QPen pen);
bool point_within_pixel(QPointF pt, QPointF pixel) const;
-
protected:
virtual void resizeEvent(QResizeEvent *);
private:
+ QString name;
void update_range() {
if (!_config)
return;