aboutsummaryrefslogtreecommitdiffstats
path: root/SQLiteStudio3/guiSQLiteStudio/common/fontedit.h
blob: e68463b86a8c99ecf41b82d7bfe57b643a707b28 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef FONTEDIT_H
#define FONTEDIT_H

#include "guiSQLiteStudio_global.h"
#include <QWidget>

namespace Ui {
    class FontEdit;
}

class GUI_API_EXPORT FontEdit : public QWidget
{
        Q_OBJECT

        Q_PROPERTY(QFont font READ getFont WRITE setFont NOTIFY fontChanged)

    public:
        explicit FontEdit(QWidget *parent = 0);
        ~FontEdit();

        QFont getFont() const;

    public slots:
        void setFont(QFont arg);

    protected:
        void changeEvent(QEvent *e);

    private:
        void init();
        void updateFont();

        Ui::FontEdit *ui = nullptr;
        QFont font;

    private slots:
        void browse();

    signals:
        void fontChanged(const QFont& font);
};

#endif // FONTEDIT_H