-
Notifications
You must be signed in to change notification settings - Fork 2
FFTMonitor Bin and AdvSpectrumAnalyzerSubtab[CPP-52][CPP-268] #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e0a68c8 to
72bd97b
Compare
|
|
||
| @Slot(list) # type: ignore | ||
| def fill_series(self, series): | ||
| for line in series: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could not deduce what the type of Slot this was if I passed just the single line back to python here which is why I'm using a list here and iterating over.
I tried using QLine but this does not have the replace function similar to what we use in other QObject definitions.
Maybe @jayvdb you would know?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PySide2.QtCore.QLine has methods setPoints and setLine which match the docs at https://doc.qt.io/qt-5/qline.html#setLine . So only accepts two points...? I havent found a polyline.
I guess https://doc.qt.io/qtforpython-5/PySide2/QtGui/QPolygon.html#PySide2.QtGui.PySide2.QtGui.QPolygon is going to want to close the shape, so that likely wont work.
https://stackoverflow.com/questions/13368947/drawing-a-line-consisting-of-multiple-points-using-pyqt suggests using a QGraphicsScene and use QGraphicsLineItem to drop on multiple QLine to form the polyline. https://felgo.com/doc/felgo-lineitem/ is similar but with QML. maybe then https://doc.qt.io/qtforpython-5/PySide2/QtWidgets/QGraphicsLineItem.html could be the slot type inside the list, but that doesnt radically improve on what you have here.
It might be worth trying this if we have more of these polylines in the console, but IMO your current approach seems a better fit given most of the graphs in the console have multiple series
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replaced and figured it out QtCharts.QtCharts.XYSeries is the inner type.
72bd97b to
93c997f
Compare
93c997f to
629f969
Compare
resources/Constants/Constants.qml
Outdated
| readonly property int dropdownWidth: 100 | ||
| readonly property var dropdownModel: ["Channel 1", "Channel 2", "Channel 3", "Channel 4"] | ||
| readonly property string dropdownLabel: "Channel Selection:" | ||
| readonly property string dropdownRowSuggestionText: "Enable with setting in \"System Monitor\" group." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this referring to the "System Monitor" sub-tab? Currently it is blank, making this a bit confusing atm.
Also it looks to be in monospace, which is a bit odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an advanced setting feature in the settings tab that is in the System Monitor group. That being said Ill try to mention the settings tab as well so it is more clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. I removed the monospace and revised the message to be more clear!
Implements
To - Run