From 33a177f1eda90b4d1fff92976635beaa59f85172 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Tue, 29 Dec 2020 02:42:07 -0500 Subject: profiles dialog: - added select button - select new profile in the list after creating --- src/profilesdialog.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/profilesdialog.h') diff --git a/src/profilesdialog.h b/src/profilesdialog.h index 08298d0e..005bc33e 100644 --- a/src/profilesdialog.h +++ b/src/profilesdialog.h @@ -63,6 +63,11 @@ public: **/ bool failed() const { return m_FailState; } + // if the dialog was closed with the 'select' button, returns the name of the + // selected profile; if the dialog was closed with 'cancel', returns empty + // + std::optional selectedProfile() const; + signals: /** @@ -95,7 +100,8 @@ private: private slots: - void on_closeButton_clicked(); + void on_close_clicked(); + void on_select_clicked(); void on_addProfileButton_clicked(); @@ -104,6 +110,7 @@ private slots: void on_copyProfileButton_clicked(); void on_profilesList_currentItemChanged(QListWidgetItem *current, QListWidgetItem *previous); + void on_profilesList_itemActivated(QListWidgetItem* item); void on_removeProfileButton_clicked(); @@ -119,6 +126,7 @@ private: bool m_FailState; MOBase::IPluginGame const *m_Game; QString m_ActiveProfileName; + std::optional m_Selected; }; #endif // PROFILESDIALOG_H -- cgit v1.3.1