Menu

[5212b7]: / treedelegate.cpp  Maximize  Restore  History

Download this file

26 lines (20 with data), 498 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "treedelegate.h"
#include <QDebug>
#include <QPainter>
#include "treeitem.h"
#include "treemodel.h"
TreeDelegate::TreeDelegate(QObject *)
{
}
#include <QTextDocument>
#include "noteobj.h"
QString TreeDelegate::displayText (const QVariant & value, const QLocale & ) const // FIXME-4 Ugly, but works...
{
QString s=value.toString();
if (Qt::mightBeRichText (s))
{
NoteObj no (s);
s=no.getNoteASCII();
}
return s.trimmed().replace ('\n',' ').replace ('\t',' ');
}