Hello Uwe,
For the problem in Pulsview, I could identify two places in the source
code that should be changed.
binding.cpp
QWidget * Binding :: get_property_form (QWidget * parent,
bool auto_commit) const
Would I expand to:
add_properties_to_form (layout, auto_commit);
// Alpers
QList <QComboBox *> combobox = form-> findChildren <QComboBox *> ();
int count = combobox.count ();
for (int i = 0; i <count; i ++) {
int idx = combobox.at (i) -> findText (QString ::
fromStdString(global.s));
// int idx = combobox.at (i) -> findText ("L <2.5V H> 2.5V");
if (idx! = -1) combobox.at (i) -> SetCurrentIndex (idx);
}
In the dynamic Widget of the properties, all ComboBoxes are searched
for the location and if found set!
I receive the info for the search
mainbar.cpp
void MainBar :: update_device_config_widgets ()
// Update the configure popup
// Alpers
QString default_volt_threshold;
gdouble lo, hi;
if (sr_dev-> config_check (ConfigKey :: VOLTAGE_THRESHOLD,Capability :: GET)) {
auto gvar = sr_dev-> config_get(ConfigKey :: VOLTAGE_THRESHOLD);
g_variant_get (gvar.gobj (),"(dd)", & lo, & hi);
default_volt_threshold = QString ("L <% 1V H>% 2V") arg (lo, 0,
'f', 1) .arg (hi, 0, 'f', 1);
global.s = default_volt_threshold.toStdString ();
// qDebug () << "volt_threshold:" << QString ("L <% 1V H>% 2V")arg (lo, 0, 'f',
1) .arg (hi, 0, 'f', 1);
}
Here I ask the hardware for a treshold property and take over the.
Value.
My skills are not very good at QT programming (OOP).
For the transfer of the information threshold I solved with the use of
a global variable global.s. Of course, this solution destroys the idea
of data encapsulation.
Here I ask the professional programmers for advice to help solve this
better in the sense of the project. Surely Soeren Apel has a better
idea of information exchange between the modules.
greetings
Jörg
Described is the behavior in this bug
> > https://sigrok.org/bugzilla/show_bug.cgi?id=1149
>
>
> > Do not close Bug-ID 1149, because the actual function for Pulseview
> > has not yet been solved!
>
> These are two separate issues, yeah. I added some more info to #1149,
> probably a floating-point related issue in PulseView.
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel