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  RLinetypePattern getLinetypePatternAt(int i);
47  void setLinetypePattern(const QString& name);
48  void setLinetypePattern(const RLinetypePattern& linetypePattern);
49  bool getOnlyFixed();
50  void setOnlyFixed(bool onlyFixed);
51 
52 signals:
53  void valueChanged(const RLinetypePattern& linetypePattern);
54 
55 public slots:
56  void linetypePatternChanged(int index);
57 
58 private:
59  bool onlyFixed;
60  QList<RLinetypePattern> patterns;
61 };
62 
64 
65 #endif