20 #include <QIODevice> |
20 #include <QIODevice> |
21 #include <QGenericMatrix> |
21 #include <QGenericMatrix> |
22 #include <QModelIndex> |
22 #include <QModelIndex> |
23 #include "basics.h" |
23 #include "basics.h" |
24 #include "colors.h" |
24 #include "colors.h" |
25 #include "types/matrix.h" |
|
26 #include "types/vertex.h" |
25 #include "types/vertex.h" |
27 |
26 |
28 // Converts a given value into a string that can be retrieved with text(). |
27 // Converts a given value into a string that can be retrieved with text(). |
29 // Used as the argument type to the formatting functions, hence its name. |
28 // Used as the argument type to the formatting functions, hence its name. |
30 class StringFormatArg |
29 class StringFormatArg |
37 StringFormatArg (int a) : m_text (QString::number (a)) {} |
36 StringFormatArg (int a) : m_text (QString::number (a)) {} |
38 StringFormatArg (long a) : m_text (QString::number (a)) {} |
37 StringFormatArg (long a) : m_text (QString::number (a)) {} |
39 StringFormatArg (float a) : m_text (QString::number (a)) {} |
38 StringFormatArg (float a) : m_text (QString::number (a)) {} |
40 StringFormatArg (double a) : m_text (QString::number (a)) {} |
39 StringFormatArg (double a) : m_text (QString::number (a)) {} |
41 StringFormatArg (const Vertex& a) : m_text (a.toString()) {} |
40 StringFormatArg (const Vertex& a) : m_text (a.toString()) {} |
42 StringFormatArg (const Matrix& a) : m_text (a.toString()) {} |
|
43 StringFormatArg (const char* a) : m_text (a) {} |
41 StringFormatArg (const char* a) : m_text (a) {} |
44 StringFormatArg (LDColor a) : m_text (a.indexString()) {} |
42 StringFormatArg (LDColor a) : m_text (a.indexString()) {} |
45 |
43 |
46 StringFormatArg (const void* a) |
44 StringFormatArg (const void* a) |
47 { |
45 { |