summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-01-01 13:40:41 +0100
committerStanislaw Halik <sthalik@misaki.pl>2014-01-01 13:40:41 +0100
commit9f0ba65825054b182d9a9c2b53dad955a90d4df1 (patch)
tree498d575d7482c2473ba68b9566c48267913a6168 /qfunctionconfigurator
parente38d6ab7472e9adb6bac0550fdffebb748ac4353 (diff)
base spline widget size on config size
Diffstat (limited to 'qfunctionconfigurator')
-rw-r--r--qfunctionconfigurator/functionconfig.h2
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp7
2 files changed, 7 insertions, 2 deletions
diff --git a/qfunctionconfigurator/functionconfig.h b/qfunctionconfigurator/functionconfig.h
index d809259b..ab2d0d0c 100644
--- a/qfunctionconfigurator/functionconfig.h
+++ b/qfunctionconfigurator/functionconfig.h
@@ -32,6 +32,8 @@ private:
int _max_Output;
FunctionConfig(const FunctionConfig&) = delete;
public:
+ const int maxInput() const { return _max_Input; }
+ const int maxOutput() const { return _max_Output; }
//
// Contructor(s) and destructor
//
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp
index 4ad0a9a4..5a02a826 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.cpp
+++ b/qfunctionconfigurator/qfunctionconfigurator.cpp
@@ -31,8 +31,7 @@ QFunctionConfigurator::QFunctionConfigurator(QWidget *parent)
//
// Defaults, for when the widget has no values different from the domXML()
//
- MaxInput = 50; // Maximum input limit
- MaxOutput = 180; // Maximum output limit
+
pPerEGU_Output = 1; // Number of pixels, per EGU
pPerEGU_Input = 4; // Number of pixels, per EGU
gDistEGU_Input = 5; // Distance of gridlines
@@ -74,6 +73,10 @@ void QFunctionConfigurator::setConfig(FunctionConfig* config, QString settingsFi
setCaption(config->getTitle());
_draw_function = _draw_background = true;
+
+ setmaxInputEGU(config->maxInput());
+ setmaxOutputEGU(config->maxOutput());
+
this->update();
}