src/format.h

changeset 1244
68e126e8c629
parent 1159
6ad8cdcd88d9
child 1316
31f4293cec30
equal deleted inserted replaced
1243:0fb1d3d17b60 1244:68e126e8c629
17 */ 17 */
18 18
19 #pragma once 19 #pragma once
20 #include <QIODevice> 20 #include <QIODevice>
21 #include <QGenericMatrix> 21 #include <QGenericMatrix>
22 #include <QModelIndex>
22 #include "basics.h" 23 #include "basics.h"
23 #include "colors.h" 24 #include "colors.h"
24 #include "types/matrix.h" 25 #include "types/matrix.h"
25 26
26 // 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().
85 m_text += "}"; 86 m_text += "}";
86 } 87 }
87 m_text += "}"; 88 m_text += "}";
88 } 89 }
89 90
91 StringFormatArg(const QModelIndex& index)
92 {
93 m_text = QString("{%1, %2}").arg(index.row(), index.column());
94 }
95
90 inline QString text() const 96 inline QString text() const
91 { 97 {
92 return m_text; 98 return m_text;
93 } 99 }
94 100

mercurial