From 9f18259ef496bfa6d8cb520b39c374357ee49cbb Mon Sep 17 00:00:00 2001 From: Hartmnt Date: Fri, 3 Jan 2025 17:09:20 +0000 Subject: [PATCH] FEAT(client): Profiles frontend --- src/mumble/ConfigDialog.cpp | 12 ++- src/mumble/ConfigDialog.ui | 168 ++++++++++++++++++++++++++---------- 2 files changed, 132 insertions(+), 48 deletions(-) diff --git a/src/mumble/ConfigDialog.cpp b/src/mumble/ConfigDialog.cpp index 3cc4ebbce55..31ef0f670d3 100644 --- a/src/mumble/ConfigDialog.cpp +++ b/src/mumble/ConfigDialog.cpp @@ -84,6 +84,10 @@ ConfigDialog::ConfigDialog(QWidget *p) : QDialog(p) { restoreGeometry(Global::get().s.qbaConfigGeometry); } + for (const QString profile : Global::get().s.profiles.allProfiles.keys()) { + qcbProfiles->addItem(profile); + } + updateTabOrder(); qlwIcons->setFocus(); } @@ -230,13 +234,17 @@ void ConfigDialog::updateTabOrder() { setTabOrder(cancelButton, okButton); setTabOrder(okButton, qlwIcons); setTabOrder(qlwIcons, contentFocusWidget); + setTabOrder(contentFocusWidget, qcbProfiles); + setTabOrder(qcbProfiles, qpbProfileAdd); + setTabOrder(qpbProfileAdd, qpbProfileRename); + setTabOrder(qpbProfileRename, qpbProfileDelete); if (resetButton && restoreButton && restoreAllButton) { - setTabOrder(contentFocusWidget, resetButton); + setTabOrder(qpbProfileDelete, resetButton); setTabOrder(resetButton, restoreButton); setTabOrder(restoreButton, restoreAllButton); setTabOrder(restoreAllButton, applyButton); } else { - setTabOrder(contentFocusWidget, applyButton); + setTabOrder(qpbProfileDelete, applyButton); } setTabOrder(applyButton, cancelButton); } diff --git a/src/mumble/ConfigDialog.ui b/src/mumble/ConfigDialog.ui index 2cbe3f2c0eb..6d47052b737 100644 --- a/src/mumble/ConfigDialog.ui +++ b/src/mumble/ConfigDialog.ui @@ -17,6 +17,126 @@ true + + + + Profile + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Add + + + + + + + Rename + + + + + + + Delete + + + + + + + + + + + + + + 1 + 0 + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + + + + + + + Qt::Orientation::Horizontal + + + + + + + Qt::Orientation::Horizontal + + + QDialogButtonBox::StandardButton::Apply|QDialogButtonBox::StandardButton::Cancel|QDialogButtonBox::StandardButton::Ok + + + + + + + + @@ -35,60 +155,16 @@ - QListView::Adjust + QListView::ResizeMode::Adjust - QListView::Batched + QListView::LayoutMode::Batched true - - - - - - Qt::Horizontal - - - - - - - Qt::Horizontal - - - - 474 - 22 - - - - - - - - Qt::Horizontal - - - QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - - 1 - 0 - - - -