Vidalia
0.3.1
Main Page
Namespaces
Classes
Files
File List
File Members
src
vidalia
log
LogMessageColumnDelegate.cpp
Go to the documentation of this file.
1
/*
2
** This file is part of Vidalia, and is subject to the license terms in the
3
** LICENSE file, found in the top level directory of this distribution. If you
4
** did not receive the LICENSE file with this file, you may obtain it from the
5
** Vidalia source package distributed by the Vidalia Project at
6
** http://www.torproject.org/projects/vidalia.html. No part of Vidalia,
7
** including this file, may be copied, modified, propagated, or distributed
8
** except according to the terms described in the LICENSE file.
9
*/
10
11
/*
12
** \file LogMessageColumnDelegate.cpp
13
** \brief Delegate responsible for rendering the log message column
14
*/
15
16
#include "
LogMessageColumnDelegate.h
"
17
18
19
/** Default constructor. */
20
LogMessageColumnDelegate::LogMessageColumnDelegate
(QObject *parent)
21
: QItemDelegate(parent)
22
{
23
}
24
25
/** Overrides the default paint() method so that we can prevent Qt from
26
* munging Tor's log messages when using a Right-to-Left layout (e.g. when
27
* viewing Vidalia in Farsi). */
28
void
29
LogMessageColumnDelegate::paint
(QPainter *painter,
30
const
QStyleOptionViewItem &option,
31
const
QModelIndex &index)
const
32
{
33
QStyleOptionViewItem styleOption = option;
34
styleOption.direction = Qt::LeftToRight;
35
36
QItemDelegate::paint(painter, styleOption, index);
37
}
38
Generated on Mon Jan 14 2013 08:44:27 for Vidalia by
1.8.3