ConfigurationBinders
0
0
699
577
Configuration Binders Example
-
0
0
0
What is this
-
0
0
<!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:'DejaVu Sans'; font-size:11pt; 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;">This is a CLAM Prototyper example showing different ways to open a <span style=" font-weight:600;">configuration dialog</span> for a processing. The underlying network contains an oscillator processing connected to an AudioSink. The buttons bellow use those different methods. You can click them and change, for instance, the frequency of the oscillator.</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;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The 'Learning' tab explain how to achieve this.</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;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The 'Testing' tab contains a checklist for testers.</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;"></p></body></html>
Qt::RichText
Qt::AlignJustify|Qt::AlignTop
true
Learning
-
0
0
<!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:'DejaVu Sans'; font-size:11pt; 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;">You can bind <span style=" font-weight:600;">actions</span> or <span style=" font-weight:600;">buttons</span> to open a configuration dialog either by <span style=" font-weight:600;">adding a custom property</span> or by <span style=" font-weight:600;">setting the name</span> of the action or button.</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;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To bind by <span style=" font-weight:600;">adding a custom property</span>, create a new string property for the action or button, name it '<span style=" font-style:italic;">clamConfiguration</span>', and give it the processing name as value. Here the oscillator processing is named "<span style=" font-style:italic;">My Processing</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;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">To bind by <span style=" font-weight:600;">setting the action or button name</span>, just change the objectName property with a name, composed by a prefix, 'configureAction__' or 'configure__', (notice two underlines) followed by the mangled name of the processing, that is turning spaces into three underlines. In our case, we use 'configureAction__My___Processing' and 'action__My___Processing'.</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;"></p></body></html>
Qt::RichText
Qt::AlignJustify|Qt::AlignTop
true
Testing
-
0
0
<!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:'DejaVu Sans'; font-size:11pt; 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;">Follow this test checklist if you are doing code changes regarding the configuration binders:</p>
<ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">First check that when you open the dialog, no error message is shown</li>
<li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">A tone should sound, provided that you have the audio properly setup (volume, speakers, jack connections...)</li>
<li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Then for each button</li></ul>
<ul type="circle" style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 2;"><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Clicking on the button should show a configuration dialog</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Check that the sound still sounding</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Cancel the dialog, no change to the sound</li></ul>
<ul type="circle" style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 2;"><li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Open, change the frequency, cancel and no change</li>
<li style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Open, change the frequency, accept and the tone will change</li></ul>
<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;"></p></body></html>
Qt::RichText
Qt::AlignJustify|Qt::AlignTop
true
-
Qt::Vertical
20
40
-
Using action with a custom property
-
Using push button with custom property
My Processing
-
Using action with mangled name
-
Using push button mangled name
-
Qt::Vertical
20
40
Configure By Name
Configure By Property
Configure By Property
My Processing
buttonActionName
clicked()
actionConfigure__My___Processing
trigger()
199
148
-1
-1
buttonActionProperty
clicked()
actionWhateverTheName
trigger()
199
184
-1
-1