QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RLinetypeCombo.h
Go to the documentation of this file.
1 
20 #ifndef RLINETYPECOMBO_H_
21 #define RLINETYPECOMBO_H_
22 
23 #include "gui_global.h"
24 
25 #include <QComboBox>
26 
27 #include "RDocument.h"
28 #include "RLinetypePattern.h"
29 
34 class QCADGUI_EXPORT RLinetypeCombo: public QComboBox {
35 
36 Q_OBJECT
37 Q_PROPERTY(bool onlyFixed READ getOnlyFixed WRITE setOnlyFixed);
38 
39 public:
40  RLinetypeCombo(QWidget* parent = 0);
41 
42  void init(RDocument* doc);
43  void reinit();
44 
45  RLinetypePattern getLinetypePattern();
46  void setLinetypePattern(const QString& name);
47  void setLinetypePattern(const RLinetypePattern& linetypePattern);
48  bool getOnlyFixed();
49  void setOnlyFixed(bool onlyFixed);
50 
51 signals:
52  void valueChanged(const RLinetypePattern& linetypePattern);
53 
54 public slots:
55  void linetypePatternChanged(int index);
56 
57 private:
58  bool onlyFixed;
59  QList<RLinetypePattern> patterns;
60 };
61 
63 
64 #endif