-
Notifications
You must be signed in to change notification settings - Fork 165
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
iio-widgets: Add optional runtime reconfiguration
Signed-off-by: Andrei-Fabian-Pop <[email protected]>
- Loading branch information
1 parent
f260ad2
commit c317c79
Showing
34 changed files
with
936 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#ifndef IIOCONFIGURATIONPOPUP_H | ||
#define IIOCONFIGURATIONPOPUP_H | ||
|
||
#include "iiowidgetselector.h" | ||
#include "scopy-iio-widgets_export.h" | ||
#include <gui/tintedoverlay.h> | ||
#include <iioutil/iioitem.h> | ||
#include <iio.h> | ||
#include <QWidget> | ||
#include <QLabel> | ||
#include <QPushButton> | ||
#include <QTreeView> | ||
|
||
namespace scopy { | ||
class SCOPY_IIO_WIDGETS_EXPORT IIOConfigurationPopup : public QWidget | ||
{ | ||
Q_OBJECT | ||
public: | ||
explicit IIOConfigurationPopup(iio_context *ctx, QWidget *parent = nullptr); | ||
explicit IIOConfigurationPopup(iio_device *dev, QWidget *parent = nullptr); | ||
explicit IIOConfigurationPopup(iio_channel *chnl, QWidget *parent = nullptr); | ||
~IIOConfigurationPopup(); | ||
|
||
void enableTintedOverlay(bool enable = true); | ||
|
||
Q_SIGNALS: | ||
void selectButtonClicked(IIOItem *selected); | ||
void exitButtonClicked(); | ||
|
||
protected Q_SLOTS: | ||
void modelSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); | ||
|
||
protected: | ||
void init(); | ||
void initUI(); | ||
|
||
gui::TintedOverlay *m_tintedOverlay; | ||
QLabel *m_titleLabel; | ||
IIOWidgetSelector *m_widgetSelector; | ||
QPushButton *m_exitButton; | ||
QPushButton *m_selectButton; | ||
IIOItem *m_root; | ||
}; | ||
} // namespace scopy | ||
|
||
#endif // IIOCONFIGURATIONPOPUP_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#ifndef IIOWIDGETSELECTOR_H | ||
#define IIOWIDGETSELECTOR_H | ||
|
||
#include <QWidget> | ||
#include <QFrame> | ||
#include <QStandardItemModel> | ||
#include <QItemSelection> | ||
#include <QTreeView> | ||
#include <iioutil/iioitem.h> | ||
|
||
namespace scopy { | ||
class IIOWidgetSelector : public QFrame | ||
{ | ||
Q_OBJECT | ||
public: | ||
IIOWidgetSelector(IIOItem *root, QWidget *parent = nullptr); | ||
~IIOWidgetSelector(); | ||
QTreeView *getTree() const; | ||
QStandardItemModel *getModel() const; | ||
|
||
Q_SIGNALS: | ||
void itemSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected); | ||
|
||
private: | ||
QTreeView *m_treeView; | ||
QStandardItemModel *m_model; | ||
}; | ||
} // namespace scopy | ||
|
||
#endif // IIOWIDGETSELECTOR_H |
Oops, something went wrong.