summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator
diff options
context:
space:
mode:
Diffstat (limited to 'qfunctionconfigurator')
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp8
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.h2
2 files changed, 4 insertions, 6 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp
index bad06f8a..a068a53c 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.cpp
+++ b/qfunctionconfigurator/qfunctionconfigurator.cpp
@@ -17,10 +17,9 @@
#include <QImage>
#include <QPixmap>
#include <QTimer>
-
#include <QtDebug>
-
-#include <math.h>
+#include <cmath>
+#include <QTabWidget>
static const int pointSize = 5;
@@ -111,9 +110,8 @@ void QFunctionConfigurator::drawBackground(const QRectF &fullRect)
{
int i;
QRect scale;
-
_background = QPixmap(fullRect.width(), fullRect.height());
- QColor bgColor = palette().color(QPalette::Normal, QPalette::Background);
+ auto bgColor = palette().button();
QPainter painter(&_background);
painter.fillRect(fullRect, bgColor);
painter.setRenderHint(QPainter::Antialiasing);
diff --git a/qfunctionconfigurator/qfunctionconfigurator.h b/qfunctionconfigurator/qfunctionconfigurator.h
index fa72fb72..1ac919fe 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.h
+++ b/qfunctionconfigurator/qfunctionconfigurator.h
@@ -112,7 +112,7 @@ protected slots:
void mouseReleaseEvent(QMouseEvent *e);
protected:
- void drawBackground(const QRectF &rect);
+ void drawBackground(const QRectF &);
void drawFunction();
void drawPoint(QPainter *painter, const QPointF &pt, QColor colBG );
void drawLine(QPainter *painter, const QPointF &start, const QPointF &end, QPen pen);