mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-04-26 00:38:10 -04:00
Add button to open settings folder
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
#include "OpenRGBSupportedDevicesPage.h"
|
||||
#include "ui_OpenRGBSupportedDevicesPage.h"
|
||||
#include "ResourceManager.h"
|
||||
#include <QUrl>
|
||||
#include <QDesktopServices>
|
||||
|
||||
using namespace Ui;
|
||||
|
||||
@@ -43,6 +46,13 @@ void OpenRGBSupportedDevicesPage::on_SaveButton_clicked()
|
||||
detectorTableModel->applySettings();
|
||||
}
|
||||
|
||||
void OpenRGBSupportedDevicesPage::on_OpenSettingsFolderButton_clicked()
|
||||
{
|
||||
std::string config_dir = ResourceManager::get()->GetConfigurationDirectory();
|
||||
QUrl url = QUrl::fromLocalFile(QString::fromStdString(config_dir));
|
||||
QDesktopServices::openUrl(url);
|
||||
}
|
||||
|
||||
void OpenRGBSupportedDevicesPage::on_Filter_textChanged(const QString &arg1)
|
||||
{
|
||||
#ifdef _QT6
|
||||
|
||||
@@ -23,6 +23,8 @@ public:
|
||||
private slots:
|
||||
void on_SaveButton_clicked();
|
||||
|
||||
void on_OpenSettingsFolderButton_clicked();
|
||||
|
||||
void on_Filter_textChanged(const QString &arg1);
|
||||
|
||||
void on_ToggleAllCheckbox_toggled(const bool checked);
|
||||
|
||||
@@ -39,11 +39,22 @@
|
||||
<widget class="QTableView" name="SupportedDevicesTable"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="SaveButton">
|
||||
<property name="text">
|
||||
<string>Apply changes</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="ButtonsLayout">
|
||||
<item>
|
||||
<widget class="QPushButton" name="OpenSettingsFolderButton">
|
||||
<property name="text">
|
||||
<string>Open settings folder</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="SaveButton">
|
||||
<property name="text">
|
||||
<string>Apply changes</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user