summaryrefslogtreecommitdiffstats
path: root/dlgpreferences.h
blob: 6848cc6f24ecad61a08648cfe9f74ee4bf1fd408 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#ifndef DLGPREFERENCES_H
#define DLGPREFERENCES_H

#include <QDialog>
#include <QDebug>

namespace Ui {
class DlgPreferences;
}

/**
 * @brief The DlgPreferences class
 */
class DlgPreferences : public QDialog
{
    Q_OBJECT

    Q_PROPERTY(int Height READ Height WRITE setHeight NOTIFY HeightChanged)
    Q_PROPERTY(int Width READ Width WRITE setWidth NOTIFY WidthChanged)

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

    /**
     * @brief Height from lineEditHeight
     * @return
     * The hight entered by the user.
     */
    int Height() const
    {
        return m_Height;
    }

    /**
    * @brief Width from lineEditWidth
    * @return
    * The width entered by the user.
    */
    int Width() const
    {
        return m_Width;
    }

public slots:
    void setHeight(int arg);

    void setWidth(int arg);

signals:
    void HeightChanged(int arg);

    void WidthChanged(int arg);

private slots:
    void on_buttonOk_clicked();

private:
    Ui::DlgPreferences *ui;
    int m_Height;
    int m_Width;

    // QDialog interface
public slots:
    void accept();
    void reject();
};

#endif // DLGPREFERENCES_H