src/format.h

changeset 1403
7a2d84112983
parent 1380
bc799b965418
child 1422
bf373bd83c1f
equal deleted inserted replaced
1402:8bbf2af8c3f5 1403:7a2d84112983
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 {

mercurial