1
0

refactor: use .ui file instead of manual layout in settings dialog.

- enable Qt UIC in cmake file.
- use .ui file to replace manually written layout in settings dialog.
This commit is contained in:
2026-07-04 22:17:40 +08:00
parent 04a4ab9bff
commit 1de1517a81
4 changed files with 217 additions and 125 deletions

View File

@@ -8,8 +8,12 @@
#include <QObject>
#include <QDialog>
class QCheckBox;
class QComboBox;
QT_BEGIN_NAMESPACE
namespace Ui {
class SettingsDialog;
}
QT_END_NAMESPACE
class SettingsDialog : public QDialog
{
Q_OBJECT
@@ -17,18 +21,8 @@ public:
explicit SettingsDialog(QWidget *parent = nullptr);
~SettingsDialog();
signals:
public slots:
private:
QCheckBox * m_useLightCheckerboard = nullptr;
QCheckBox * m_loopGallery = nullptr;
QCheckBox * m_svgTiny12Only = nullptr;
QComboBox * m_doubleClickBehavior = nullptr;
QComboBox * m_mouseWheelBehavior = nullptr;
QComboBox * m_initWindowSizeBehavior = nullptr;
QComboBox * m_hiDpiRoundingPolicyBehavior = nullptr;
QT_PREPEND_NAMESPACE(Ui::SettingsDialog) *ui;
};
#endif // SETTINGSDIALOG_H