QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RFontChooserWidget.h
Go to the documentation of this file.
1
20#ifndef _RFONTCHOOSERWIDGET_H_
21#define _RFONTCHOOSERWIDGET_H_
22
23#include "gui_global.h"
24
25#include <QComboBox>
26#include <QFont>
27#include <QFontComboBox>
28
29class QLabel;
30
35class QCADGUI_EXPORT RFontChooserWidget: public QWidget {
36
37Q_OBJECT
38Q_PROPERTY(QString label READ getLabel WRITE setLabel);
39Q_PROPERTY(QFont chosenFont READ getChosenFont WRITE setChosenFont);
40
41public:
42 RFontChooserWidget(QWidget* parent = 0);
43
44 QFont getChosenFont() const;
45 void setChosenFont(const QFont& font);
46 int getSize() const;
47 void setSize(int size);
48 QString getLabel() const;
49 void setLabel(const QString& l);
50
51signals:
52 void valueChanged(const QFont& font);
53
54public slots:
55 void chosenFontChanged(const QFont& font);
56 void sizeChanged(int index);
57
58protected:
59 void resizeEvent(QResizeEvent* event);
60
61private:
62 void updateSizeCombo();
63
64private:
65 QFont chosenFont;
66 QComboBox* cbSize;
67 QFontComboBox* cbChosenFont;
68 QLabel* lbSampleText;
69 QLabel* lbLabel;
70};
71
73
74#endif
Q_DECLARE_METATYPE(RMath *)
Definition RFontChooserWidget.h:35
QFontComboBox * cbChosenFont
Definition RFontChooserWidget.h:67
void valueChanged(const QFont &font)
QLabel * lbLabel
Definition RFontChooserWidget.h:69
QLabel * lbSampleText
Definition RFontChooserWidget.h:68
QComboBox * cbSize
Definition RFontChooserWidget.h:66
#define QCADGUI_EXPORT
Definition gui_global.h:10