mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-15 05:22:53 +08:00
Show group titles in widgets
This commit is contained in:
parent
a92b09d427
commit
034ae1b7f1
@ -89,6 +89,8 @@ public:
|
||||
|
||||
bool read(const QJsonObject &object);
|
||||
|
||||
void setTitle(const QString &title) { m_title = title; }
|
||||
|
||||
private:
|
||||
bool m_fft;
|
||||
bool m_led;
|
||||
|
@ -850,7 +850,10 @@ QVector<JSON::Group> UI::Dashboard::getLEDWidgets()
|
||||
Q_FOREACH (auto dataset, group.datasets())
|
||||
{
|
||||
if (dataset.led())
|
||||
{
|
||||
dataset.setTitle(dataset.title() + " (" + group.title() + ")");
|
||||
widgets.append(dataset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -877,7 +880,10 @@ QVector<JSON::Dataset> UI::Dashboard::getFFTWidgets()
|
||||
Q_FOREACH (auto dataset, group.datasets())
|
||||
{
|
||||
if (dataset.fft())
|
||||
{
|
||||
dataset.setTitle(dataset.title() + " (" + group.title() + ")");
|
||||
widgets.append(dataset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -895,7 +901,10 @@ QVector<JSON::Dataset> UI::Dashboard::getPlotWidgets()
|
||||
Q_FOREACH (auto dataset, group.datasets())
|
||||
{
|
||||
if (dataset.graph())
|
||||
{
|
||||
dataset.setTitle(dataset.title() + " (" + group.title() + ")");
|
||||
widgets.append(dataset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -930,7 +939,10 @@ QVector<JSON::Dataset> UI::Dashboard::getWidgetDatasets(const QString &handle)
|
||||
Q_FOREACH (auto dataset, group.datasets())
|
||||
{
|
||||
if (dataset.widget() == handle)
|
||||
{
|
||||
dataset.setTitle(dataset.title() + " (" + group.title() + ")");
|
||||
widgets.append(dataset);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user