mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-12-06 09:22:48 -05:00
feat: Add settings button to quick refactor dialog
This commit is contained in:
@ -25,6 +25,7 @@
|
||||
#include "settings/ConfigurationManager.hpp"
|
||||
#include "settings/GeneralSettings.hpp"
|
||||
#include "settings/QuickRefactorSettings.hpp"
|
||||
#include "settings/SettingsConstants.hpp"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QComboBox>
|
||||
@ -162,6 +163,14 @@ void QuickRefactorDialog::setupUi()
|
||||
Settings::quickRefactorSettings().writeSettings();
|
||||
});
|
||||
|
||||
m_settingsButton = new QToolButton(this);
|
||||
m_settingsButton->setIcon(Utils::Icons::SETTINGS_TOOLBAR.icon());
|
||||
m_settingsButton->setToolTip(Tr::tr("Open Quick Refactor Settings"));
|
||||
m_settingsButton->setIconSize(QSize(16, 16));
|
||||
actionsLayout->addWidget(m_settingsButton);
|
||||
|
||||
connect(m_settingsButton, &QToolButton::clicked, this, &QuickRefactorDialog::onOpenSettings);
|
||||
|
||||
mainLayout->addLayout(actionsLayout);
|
||||
|
||||
QHBoxLayout *instructionsLayout = new QHBoxLayout();
|
||||
@ -570,6 +579,11 @@ void QuickRefactorDialog::onOpenInstructionsFolder()
|
||||
QDesktopServices::openUrl(url);
|
||||
}
|
||||
|
||||
void QuickRefactorDialog::onOpenSettings()
|
||||
{
|
||||
Core::ICore::showOptionsDialog(Constants::QODE_ASSIST_QUICK_REFACTOR_SETTINGS_PAGE_ID);
|
||||
}
|
||||
|
||||
QString QuickRefactorDialog::selectedConfiguration() const
|
||||
{
|
||||
return m_selectedConfiguration;
|
||||
|
||||
@ -60,6 +60,7 @@ private slots:
|
||||
void onEditCustomCommand();
|
||||
void onDeleteCustomCommand();
|
||||
void onOpenInstructionsFolder();
|
||||
void onOpenSettings();
|
||||
void loadCustomCommands();
|
||||
void loadAvailableConfigurations();
|
||||
void onConfigurationChanged(int index);
|
||||
@ -77,6 +78,7 @@ private:
|
||||
QToolButton *m_editCommandButton;
|
||||
QToolButton *m_deleteCommandButton;
|
||||
QToolButton *m_openFolderButton;
|
||||
QToolButton *m_settingsButton;
|
||||
QToolButton *m_toolsButton;
|
||||
QToolButton *m_thinkingButton;
|
||||
QComboBox *m_commandsComboBox;
|
||||
|
||||
Reference in New Issue
Block a user