diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-06-13 07:30:19 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-06-13 07:36:07 +0200 |
commit | 6f695e3bc5574970baf8605423cf245ea695b9ac (patch) | |
tree | 3a367d36c111b11d8d28dbdf8bb0c69355339177 /ftnoir_filter_ewma2 | |
parent | fdfe758ab74fa954fa02eefda10480980074f010 (diff) |
ewma: update settings form
Diffstat (limited to 'ftnoir_filter_ewma2')
-rw-r--r-- | ftnoir_filter_ewma2/ftnoir_ewma_filtercontrols.ui | 775 | ||||
-rw-r--r-- | ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp | 4 |
2 files changed, 333 insertions, 446 deletions
diff --git a/ftnoir_filter_ewma2/ftnoir_ewma_filtercontrols.ui b/ftnoir_filter_ewma2/ftnoir_ewma_filtercontrols.ui index 8ee633cc..76158795 100644 --- a/ftnoir_filter_ewma2/ftnoir_ewma_filtercontrols.ui +++ b/ftnoir_filter_ewma2/ftnoir_ewma_filtercontrols.ui @@ -9,7 +9,7 @@ <rect> <x>0</x> <y>0</y> - <width>477</width> + <width>404</width> <height>380</height> </rect> </property> @@ -35,453 +35,340 @@ <property name="styleSheet"> <string notr="true"/> </property> - <layout class="QVBoxLayout" name="_vertical_layout"> - <item> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="sizeConstraint"> - <enum>QLayout::SetMinimumSize</enum> - </property> - <item> - <layout class="QGridLayout" name="gridLayout"> - <item row="4" column="3"> - <widget class="QLabel" name="lblInvert1_5"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>30</width> - <height>16777215</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string>pow</string> - </property> - </widget> - </item> - <item row="4" column="2"> - <widget class="QSpinBox" name="spinPowCurve"> - <property name="minimumSize"> - <size> - <width>40</width> - <height>22</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true">background:none;</string> - </property> - <property name="maximum"> - <number>100</number> - </property> - <property name="singleStep"> - <number>5</number> - </property> - <property name="value"> - <number>10</number> - </property> - </widget> - </item> - <item row="4" column="1"> - <widget class="QSlider" name="powCurve"> - <property name="minimumSize"> - <size> - <width>45</width> - <height>15</height> - </size> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>100</number> - </property> - <property name="pageStep"> - <number>10</number> - </property> - <property name="value"> - <number>10</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::NoTicks</enum> - </property> - </widget> - </item> - <item row="3" column="3"> - <widget class="QLabel" name="lblInvert1_4"> - <property name="minimumSize"> - <size> - <width>35</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>30</width> - <height>16777215</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string>frames</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QLabel" name="lblInvert1_7"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>30</width> - <height>16777215</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string>Max.</string> - </property> - </widget> - </item> - <item row="4" column="0"> - <widget class="QLabel" name="lblInvert1_8"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>30</width> - <height>16777215</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string>Curve</string> - </property> - </widget> - </item> - <item row="2" column="2"> - <widget class="QSpinBox" name="spinMinSmooth"> - <property name="minimumSize"> - <size> - <width>40</width> - <height>22</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true">background:none;</string> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>100</number> - </property> - <property name="singleStep"> - <number>5</number> - </property> - <property name="value"> - <number>2</number> - </property> - </widget> - </item> - <item row="2" column="3"> - <widget class="QLabel" name="lblInvert1"> - <property name="minimumSize"> - <size> - <width>35</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>30</width> - <height>16777215</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string>frames</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QSlider" name="maxSmooth"> - <property name="minimumSize"> - <size> - <width>45</width> - <height>15</height> - </size> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>100</number> - </property> - <property name="pageStep"> - <number>10</number> - </property> - <property name="value"> - <number>10</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::NoTicks</enum> - </property> - </widget> - </item> - <item row="3" column="2"> - <widget class="QSpinBox" name="spinMaxSmooth"> - <property name="minimumSize"> - <size> - <width>40</width> - <height>22</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true">background:none;</string> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>100</number> - </property> - <property name="singleStep"> - <number>5</number> - </property> - <property name="value"> - <number>10</number> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="lblInvert1_6"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>30</width> - <height>16777215</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string>Min.</string> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QSlider" name="minSmooth"> - <property name="minimumSize"> - <size> - <width>45</width> - <height>15</height> - </size> - </property> - <property name="minimum"> - <number>1</number> - </property> - <property name="maximum"> - <number>100</number> - </property> - <property name="pageStep"> - <number>10</number> - </property> - <property name="value"> - <number>2</number> - </property> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="tickPosition"> - <enum>QSlider::NoTicks</enum> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="label_4"> - <property name="minimumSize"> - <size> - <width>0</width> - <height>204</height> - </size> - </property> - <property name="styleSheet"> - <string notr="true">background-color: rgb(214, 214, 214); + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="geometry"> + <rect> + <x>204</x> + <y>351</y> + <width>164</width> + <height>25</height> + </rect> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + <widget class="QLabel" name="label_4"> + <property name="geometry"> + <rect> + <x>4</x> + <y>143</y> + <width>396</width> + <height>204</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background-color: rgb(214, 214, 214); border-color: rgb(0, 0, 0);</string> - </property> - <property name="frameShape"> - <enum>QFrame::Box</enum> - </property> - <property name="text"> - <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + </property> + <property name="frameShape"> + <enum>QFrame::Box</enum> + </property> + <property name="text"> + <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Min. frames:</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Defines the way the filter responds to fast movements;</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Higher value: slower response;</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Max. frames:</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Defines the way the filter responds to slow movements;</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Higher value: slower response;</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Pow:</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Defines the filters 'readiness' to respond to speed changes;</span></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt;">Higher value = </span><span style=" font-size:10pt; font-weight:600;">higher</span><span style=" font-size:10pt;"> response;</span></p> -<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:10pt;"></p></body></html></string> - </property> - <property name="margin"> - <number>5</number> - </property> - </widget> - </item> - </layout> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <layout class="QHBoxLayout" name="horizontalLayout_2"> - <property name="sizeConstraint"> - <enum>QLayout::SetDefaultConstraint</enum> - </property> - <item> - <widget class="QPushButton" name="btnOK"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>52</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>OK</string> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="btnCancel"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>52</width> - <height>0</height> - </size> - </property> - <property name="maximumSize"> - <size> - <width>100</width> - <height>16777215</height> - </size> - </property> - <property name="text"> - <string>Cancel</string> - </property> - </widget> - </item> - </layout> - </item> - <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>10</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - </layout> - </item> - </layout> +</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2';">Min. frames:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2';">Defines the way the filter responds to fast movements;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2';">Higher value: slower response;</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2';"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2';">Max. frames:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2';">Defines the way the filter responds to slow movements;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2';">Higher value: slower response;</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2';"><br /></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2';">Pow:</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2';">Defines the filters 'readiness' to respond to speed changes;</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2';">Higher value = </span><span style=" font-family:'MS Shell Dlg 2'; font-weight:600;">faster</span><span style=" font-family:'MS Shell Dlg 2';"> response;</span></p> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2';"><br /></p></body></html></string> + </property> + <property name="margin"> + <number>5</number> + </property> + </widget> + <widget class="QLabel" name="lblInvert1_6"> + <property name="geometry"> + <rect> + <x>5</x> + <y>5</y> + <width>27</width> + <height>16</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>Min.</string> + </property> + </widget> + <widget class="QSlider" name="maxSmooth"> + <property name="geometry"> + <rect> + <x>47</x> + <y>32</y> + <width>84</width> + <height>23</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>15</height> + </size> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>100</number> + </property> + <property name="pageStep"> + <number>10</number> + </property> + <property name="value"> + <number>10</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="tickPosition"> + <enum>QSlider::NoTicks</enum> + </property> + </widget> + <widget class="QSpinBox" name="spinMaxSmooth"> + <property name="geometry"> + <rect> + <x>135</x> + <y>32</y> + <width>52</width> + <height>23</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>40</width> + <height>22</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background:none;</string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>100</number> + </property> + <property name="singleStep"> + <number>5</number> + </property> + <property name="value"> + <number>10</number> + </property> + </widget> + <widget class="QSpinBox" name="spinPowCurve"> + <property name="geometry"> + <rect> + <x>135</x> + <y>59</y> + <width>52</width> + <height>23</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>40</width> + <height>22</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background:none;</string> + </property> + <property name="maximum"> + <number>100</number> + </property> + <property name="singleStep"> + <number>5</number> + </property> + <property name="value"> + <number>10</number> + </property> + </widget> + <widget class="QSlider" name="powCurve"> + <property name="geometry"> + <rect> + <x>47</x> + <y>59</y> + <width>84</width> + <height>23</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>15</height> + </size> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>100</number> + </property> + <property name="pageStep"> + <number>10</number> + </property> + <property name="value"> + <number>10</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="tickPosition"> + <enum>QSlider::NoTicks</enum> + </property> + </widget> + <widget class="QLabel" name="lblInvert1_8"> + <property name="geometry"> + <rect> + <x>5</x> + <y>59</y> + <width>38</width> + <height>16</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>Curve</string> + </property> + </widget> + <widget class="QLabel" name="lblInvert1_7"> + <property name="geometry"> + <rect> + <x>5</x> + <y>32</y> + <width>32</width> + <height>16</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>0</width> + <height>0</height> + </size> + </property> + <property name="maximumSize"> + <size> + <width>16777215</width> + <height>16777215</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>Max.</string> + </property> + </widget> + <widget class="QSlider" name="minSmooth"> + <property name="geometry"> + <rect> + <x>47</x> + <y>5</y> + <width>84</width> + <height>23</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>45</width> + <height>15</height> + </size> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>100</number> + </property> + <property name="pageStep"> + <number>10</number> + </property> + <property name="value"> + <number>2</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="tickPosition"> + <enum>QSlider::NoTicks</enum> + </property> + </widget> + <widget class="QSpinBox" name="spinMinSmooth"> + <property name="geometry"> + <rect> + <x>135</x> + <y>5</y> + <width>52</width> + <height>23</height> + </rect> + </property> + <property name="minimumSize"> + <size> + <width>40</width> + <height>22</height> + </size> + </property> + <property name="styleSheet"> + <string notr="true">background:none;</string> + </property> + <property name="minimum"> + <number>1</number> + </property> + <property name="maximum"> + <number>100</number> + </property> + <property name="singleStep"> + <number>5</number> + </property> + <property name="value"> + <number>2</number> + </property> + </widget> </widget> - <tabstops> - <tabstop>btnOK</tabstop> - <tabstop>btnCancel</tabstop> - </tabstops> <resources> <include location="ewma-filter.qrc"/> </resources> diff --git a/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp b/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp index e3399a19..fb02354e 100644 --- a/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp +++ b/ftnoir_filter_ewma2/ftnoir_filter_ewma2_dialog.cpp @@ -33,8 +33,8 @@ FilterControls::FilterControls() : { ui.setupUi( this ); - connect(ui.btnOK, SIGNAL(clicked()), this, SLOT(doOK())); - connect(ui.btnCancel, SIGNAL(clicked()), this, SLOT(doCancel())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); tie_setting(s.kMaxSmoothing, ui.maxSmooth); tie_setting(s.kMinSmoothing, ui.minSmooth); |