summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-07-08 06:51:51 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-07-08 06:51:51 +0200
commit027fd0f8b4efcf005a0bba850109089737f40a3f (patch)
tree44261588d2024e3704b1acc9111682ad091dccff /qfunctionconfigurator
parentab47eac174db02710a7fa6c194e00c31cef755a4 (diff)
retab and reformat only
Diffstat (limited to 'qfunctionconfigurator')
-rw-r--r--qfunctionconfigurator/broken/qfunctionconfiguratorplugin.h29
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.h32
2 files changed, 30 insertions, 31 deletions
diff --git a/qfunctionconfigurator/broken/qfunctionconfiguratorplugin.h b/qfunctionconfigurator/broken/qfunctionconfiguratorplugin.h
index bc637338..ca68e0e2 100644
--- a/qfunctionconfigurator/broken/qfunctionconfiguratorplugin.h
+++ b/qfunctionconfigurator/broken/qfunctionconfiguratorplugin.h
@@ -11,27 +11,26 @@
class QFunctionConfiguratorPlugin : public QObject, public QDesignerCustomWidgetInterface
{
- Q_OBJECT
+ Q_OBJECT
Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetInterface" FILE "analogclock.json")
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
- QFunctionConfiguratorPlugin(QObject *parent = 0);
-
- bool isContainer() const;
- bool isInitialized() const;
- QIcon icon() const;
- QString domXml() const;
- QString group() const;
- QString includeFile() const;
- QString name() const;
- QString toolTip() const;
- QString whatsThis() const;
- QWidget *createWidget(QWidget *parent);
- void initialize(QDesignerFormEditorInterface *core);
+ QFunctionConfiguratorPlugin(QObject *parent = 0);
+ bool isContainer() const;
+ bool isInitialized() const;
+ QIcon icon() const;
+ QString domXml() const;
+ QString group() const;
+ QString includeFile() const;
+ QString name() const;
+ QString toolTip() const;
+ QString whatsThis() const;
+ QWidget *createWidget(QWidget *parent);
+ void initialize(QDesignerFormEditorInterface *core);
private:
- bool initialized;
+ bool initialized;
};
#endif // QFUNCTIONCONFIGURATORPLUGIN_H
diff --git a/qfunctionconfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/qfunctionconfigurator.h
index ac9b52e2..5b75d84d 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.h
+++ b/qfunctionconfigurator/qfunctionconfigurator.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2011-2014 Stanislaw Halik <sthalik@misaki.pl>
- *
+ *
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
@@ -17,12 +17,12 @@
class QFunctionConfigurator : public QWidget
{
- Q_OBJECT
+ Q_OBJECT
Q_PROPERTY(QColor colorBezier READ colorBezier WRITE setColorBezier)
public:
- QFunctionConfigurator(QWidget *parent = 0);
+ QFunctionConfigurator(QWidget *parent = 0);
- Map* config();
+ Map* config();
void setConfig(Map* config, const QString &name);
QColor colorBezier() const
@@ -35,18 +35,18 @@ public:
update();
}
protected slots:
- void paintEvent(QPaintEvent *e);
- void mousePressEvent(QMouseEvent *e);
- void mouseMoveEvent(QMouseEvent *e);
- void mouseReleaseEvent(QMouseEvent *e);
+ void paintEvent(QPaintEvent *e);
+ void mousePressEvent(QMouseEvent *e);
+ void mouseMoveEvent(QMouseEvent *e);
+ void mouseReleaseEvent(QMouseEvent *e);
private:
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);
+ 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(const QPointF& pt, const QPointF& pixel);
protected:
- void resizeEvent(QResizeEvent *) override;
+ void resizeEvent(QResizeEvent *) override;
private:
void update_range();
@@ -56,14 +56,14 @@ private:
Map* _config;
// bounds of the rectangle user can interact with
- QRectF pixel_bounds;
+ QRectF pixel_bounds;
int moving_control_point_idx;
QPointF c;
- QColor spline_color;
+ QColor spline_color;
- QPixmap _background;
- QPixmap _function;
+ QPixmap _background;
+ QPixmap _function;
bool _draw_function;
};