summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator/qfunctionconfigurator.cpp
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.cpp
parent4fdc2d9b3733f2b8d3edd4e10fdba0b7a525ae22 (diff)
nix explicit malloc
simplifies, allows for copy operator
Diffstat (limited to 'qfunctionconfigurator/qfunctionconfigurator.cpp')
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp
index e94eded4..a197dadb 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.cpp
+++ b/qfunctionconfigurator/qfunctionconfigurator.cpp
@@ -41,7 +41,7 @@ void QFunctionConfigurator::setConfig(FunctionConfig* config) {
QString currentFile = settings.value ( "SettingsFile", QCoreApplication::applicationDirPath() + "/settings/default.ini" ).toString();
QSettings iniFile( currentFile, QSettings::IniFormat );
- config->loadSettings(iniFile);
+ config->loadSettings(iniFile, name);
_config = config;
_draw_function = _draw_background = true;
update_range();
@@ -52,7 +52,7 @@ void QFunctionConfigurator::saveSettings(QString settingsFile) {
QSettings iniFile( settingsFile, QSettings::IniFormat ); // Application settings (in INI-file)
if (_config) {
- _config->saveSettings(iniFile);
+ _config->saveSettings(iniFile, name);
}
}
@@ -279,7 +279,6 @@ void QFunctionConfigurator::mousePressEvent(QMouseEvent *e)
}
if (!bTouchingPoint) {
_config->addPoint(pixel_coord_to_point(e->pos()));
- emit CurveChanged( true );
}
}
}
@@ -296,7 +295,6 @@ void QFunctionConfigurator::mousePressEvent(QMouseEvent *e)
if (found_pt != -1) {
_config->removePoint(found_pt);
- emit CurveChanged( true );
}
movingPoint = -1;
}
@@ -353,7 +351,6 @@ void QFunctionConfigurator::mouseReleaseEvent(QMouseEvent *e)
if (e->button() == Qt::LeftButton) {
timer.invalidate();
if (movingPoint >= 0 && movingPoint < points.size()) {
- emit CurveChanged( true );
if (_config) {
_config->movePoint(movingPoint, pixel_coord_to_point(e->pos()));
}
@@ -400,12 +397,6 @@ QPointF QFunctionConfigurator::point_to_pixel(QPointF point) const
range.y() + range.height() - point.y() * c.y());
}
-void QFunctionConfigurator::setColorBezier(QColor color)
-{
- colBezier = color;
- update();
-}
-
void QFunctionConfigurator::resizeEvent(QResizeEvent *)
{
update_range();