service: am: Improve profile select applet

This commit is contained in:
Narr the Reg
2023-03-28 20:55:06 -06:00
committed by german77
parent 8bdc51b620
commit 668eb5b8da
8 changed files with 270 additions and 34 deletions

View File

@@ -28,7 +28,8 @@ class QtProfileSelectionDialog final : public QDialog {
Q_OBJECT
public:
explicit QtProfileSelectionDialog(Core::HID::HIDCore& hid_core, QWidget* parent);
explicit QtProfileSelectionDialog(Core::HID::HIDCore& hid_core, QWidget* parent,
const Core::Frontend::ProfileSelectParameters& parameters);
~QtProfileSelectionDialog() override;
int exec() override;
@@ -40,6 +41,9 @@ public:
private:
void SelectUser(const QModelIndex& index);
void SetWindowTitle(const Core::Frontend::ProfileSelectParameters& parameters);
void SetDialogPurpose(const Core::Frontend::ProfileSelectParameters& parameters);
int user_index = 0;
QVBoxLayout* layout;
@@ -66,10 +70,11 @@ public:
~QtProfileSelector() override;
void Close() const override;
void SelectProfile(SelectProfileCallback callback_) const override;
void SelectProfile(SelectProfileCallback callback_,
const Core::Frontend::ProfileSelectParameters& parameters) const override;
signals:
void MainWindowSelectProfile() const;
void MainWindowSelectProfile(const Core::Frontend::ProfileSelectParameters& parameters) const;
void MainWindowRequestExit() const;
private: