QCAD Application Framework
CAD Application Development and Automation.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RLinetypePattern.h
Go to the documentation of this file.
1 #ifndef RLINETYPEPATTERN_H
2 #define RLINETYPEPATTERN_H
3 
4 #include <stdarg.h>
5 #include <math.h>
6 
7 #include <QMetaType>
8 
9 
10 
19 public:
23  RLinetypePattern(int num...);
24  void set(const QList<double> dashes);
25 
27  RLinetypePattern(const RLinetypePattern& other);
29 
30  bool isValid() const;
31  int getNumDashes() const;
32  double getPatternLength() const;
33  double getDashLengthAt(int i) const;
34  double getLargestGap() const;
35  bool hasDashAt(double pos) const;
36  double getDelta(double pos) const;
37  bool isSymmetrical(int i) const;
38  void scale(double factor);
39 
40  RLinetypePattern& operator=(const RLinetypePattern& other);
41 
42 private:
43  int num;
44  double* pattern;
45  bool* symmetrical;
46 };
47 
48 QDebug operator<<(QDebug dbg, const RLinetypePattern& p);
49 
54 Q_DECLARE_METATYPE(_RMapQStringRLinetypePattern*)
55 Q_DECLARE_METATYPE(_RMapQStringRLinetypePattern)
56 
57 #endif