git repos / SagoImageBrowser

blame: src/preferencesdialog.h

normal view · raw

10d6e6f8 Poul Sander 2026-02-24 18:40 1
#pragma once
10d6e6f8 Poul Sander 2026-02-24 18:40 2
10d6e6f8 Poul Sander 2026-02-24 18:40 3
#include <QDialog>
83f0e0bc Poul Sander 2026-05-30 17:59 4
#include <QKeySequence>
83f0e0bc Poul Sander 2026-05-30 17:59 5
#include <QMap>
10d6e6f8 Poul Sander 2026-02-24 18:40 6
10d6e6f8 Poul Sander 2026-02-24 18:40 7
class QComboBox;
4ae57f60 Poul Sander 2026-02-25 21:35 8
class QCheckBox;
459bad0f Poul Sander 2026-05-17 14:11 9
class QSpinBox;
83f0e0bc Poul Sander 2026-05-30 17:59 10
class QTabWidget;
83f0e0bc Poul Sander 2026-05-30 17:59 11
class QTableWidget;
10d6e6f8 Poul Sander 2026-02-24 18:40 12
10d6e6f8 Poul Sander 2026-02-24 18:40 13
class PreferencesDialog : public QDialog
10d6e6f8 Poul Sander 2026-02-24 18:40 14
{
10d6e6f8 Poul Sander 2026-02-24 18:40 15
    Q_OBJECT
10d6e6f8 Poul Sander 2026-02-24 18:40 16
10d6e6f8 Poul Sander 2026-02-24 18:40 17
public:
10d6e6f8 Poul Sander 2026-02-24 18:40 18
    explicit PreferencesDialog(QWidget *parent = nullptr);
10d6e6f8 Poul Sander 2026-02-24 18:40 19
10d6e6f8 Poul Sander 2026-02-24 18:40 20
    QString getBackgroundColor() const;
10d6e6f8 Poul Sander 2026-02-24 18:40 21
    void setBackgroundColor(const QString &color);
10d6e6f8 Poul Sander 2026-02-24 18:40 22
459bad0f Poul Sander 2026-05-17 14:11 23
    int getCacheSize() const;
459bad0f Poul Sander 2026-05-17 14:11 24
    void setCacheSize(int n);
459bad0f Poul Sander 2026-05-17 14:11 25
ac476ca8 Poul Sander 2026-05-18 16:47 26
    QString getThumbnailCacheSize() const;
ac476ca8 Poul Sander 2026-05-18 16:47 27
    void setThumbnailCacheSize(const QString &size);
ac476ca8 Poul Sander 2026-05-18 16:47 28
4ae57f60 Poul Sander 2026-02-25 21:35 29
    bool getLockDocking() const;
4ae57f60 Poul Sander 2026-02-25 21:35 30
    void setLockDocking(bool lock);
4ae57f60 Poul Sander 2026-02-25 21:35 31
d1aa6cbe Poul Sander 2026-03-02 16:57 32
    bool getResetLayout() const;
d1aa6cbe Poul Sander 2026-03-02 16:57 33
    void setResetLayout(bool reset);
d1aa6cbe Poul Sander 2026-03-02 16:57 34
83f0e0bc Poul Sander 2026-05-30 17:59 35
    QMap<int, QKeySequence> getShortcuts() const;
83f0e0bc Poul Sander 2026-05-30 17:59 36
    void setShortcuts(const QMap<int, QKeySequence> &map);
83f0e0bc Poul Sander 2026-05-30 17:59 37
7370f1c0 Poul Sander 2026-03-01 15:15 38
signals:
7370f1c0 Poul Sander 2026-03-01 15:15 39
    void resetLayoutRequested();
7370f1c0 Poul Sander 2026-03-01 15:15 40
10d6e6f8 Poul Sander 2026-02-24 18:40 41
private:
83f0e0bc Poul Sander 2026-05-30 17:59 42
    void setupGeneralTab(QTabWidget *tabs);
83f0e0bc Poul Sander 2026-05-30 17:59 43
    void setupShortcutsTab(QTabWidget *tabs);
83f0e0bc Poul Sander 2026-05-30 17:59 44
    void highlightConflicts();
83f0e0bc Poul Sander 2026-05-30 17:59 45
10d6e6f8 Poul Sander 2026-02-24 18:40 46
    QComboBox *m_backgroundColorCombo;
459bad0f Poul Sander 2026-05-17 14:11 47
    QSpinBox  *m_cacheSizeSpinBox;
ac476ca8 Poul Sander 2026-05-18 16:47 48
    QComboBox *m_thumbnailSizeCombo;
4ae57f60 Poul Sander 2026-02-25 21:35 49
    QCheckBox *m_lockDockingCheck;
d1aa6cbe Poul Sander 2026-03-02 16:57 50
    QCheckBox *m_resetLayoutCheck;
83f0e0bc Poul Sander 2026-05-30 17:59 51
    QTableWidget *m_shortcutsTable = nullptr;
83f0e0bc Poul Sander 2026-05-30 17:59 52
    QList<int> m_rowToAction;  // maps table row → ShortcutManager::Action
10d6e6f8 Poul Sander 2026-02-24 18:40 53
};
1970-01-01 00:00 54