diff options
| author | Amaury Pouly <amaury.pouly@gmail.com> | 2014-09-18 19:02:54 +0200 |
|---|---|---|
| committer | Amaury Pouly <amaury.pouly@gmail.com> | 2014-09-19 10:57:32 +0200 |
| commit | a01bf8d93c2289c50fa4f24c15f6255e942ee82b (patch) | |
| tree | 73ddff5d20ee2dc6c198ac4ce80295303c1f42b1 /utils/regtools/qeditor/utils.h | |
| parent | b2ef4a806bd5f8f81917a7c93d210cee123191af (diff) | |
| download | rockbox-a01bf8d93c2289c50fa4f24c15f6255e942ee82b.zip rockbox-a01bf8d93c2289c50fa4f24c15f6255e942ee82b.tar.gz rockbox-a01bf8d93c2289c50fa4f24c15f6255e942ee82b.tar.bz2 rockbox-a01bf8d93c2289c50fa4f24c15f6255e942ee82b.tar.xz | |
qeditor: move backend selector to its own class, that's cleaner
Change-Id: I7f3fa66a8f67639b4b64cf9f6acc5fb10e227653
Reviewed-on: http://gerrit.rockbox.org/974
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
Diffstat (limited to 'utils/regtools/qeditor/utils.h')
| -rw-r--r-- | utils/regtools/qeditor/utils.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/utils/regtools/qeditor/utils.h b/utils/regtools/qeditor/utils.h index ee08f1f..56d4962 100644 --- a/utils/regtools/qeditor/utils.h +++ b/utils/regtools/qeditor/utils.h @@ -15,6 +15,9 @@ #include <QHBoxLayout> #include <QItemEditorCreatorBase> #include <QStyledItemDelegate> +#include <QComboBox> +#include <QFileDialog> +#include "settings.h" #include "backend.h" class SocBitRangeValidator : public QValidator @@ -274,4 +277,44 @@ protected: QLineEdit *m_line; }; +class BackendSelector : public QWidget +{ + Q_OBJECT +public: + BackendSelector(Backend *backend, QWidget *parent = 0); + virtual ~BackendSelector(); + IoBackend *GetBackend(); + +signals: + void OnSelect(IoBackend *backend); + +protected: + enum + { + DataSelNothing, + DataSelFile, +#ifdef HAVE_HWSTUB + DataSelDevice, +#endif + }; + + Backend *m_backend; + IoBackend *m_io_backend; + QComboBox *m_data_selector; + QLineEdit *m_data_sel_edit; +#ifdef HAVE_HWSTUB + QComboBox *m_dev_selector; + HWStubBackendHelper m_hwstub_helper; +#endif + void ChangeBackend(IoBackend *new_backend); + +private slots: +#ifdef HAVE_HWSTUB + void OnDevListChanged(); + void OnDevChanged(int index); + void ClearDevList(); +#endif + void OnDataSelChanged(int index); +}; + #endif /* AUX_H */ |