Vidalia 0.2.15
LogMessageColumnDelegate.h
Go to the documentation of this file.
00001 /*
00002 **  This file is part of Vidalia, and is subject to the license terms in the
00003 **  LICENSE file, found in the top level directory of this distribution. If you
00004 **  did not receive the LICENSE file with this file, you may obtain it from the
00005 **  Vidalia source package distributed by the Vidalia Project at
00006 **  http://www.torproject.org/projects/vidalia.html. No part of Vidalia, 
00007 **  including this file, may be copied, modified, propagated, or distributed 
00008 **  except according to the terms described in the LICENSE file.
00009 */
00010 
00011 /*
00012 ** \file LogMessageColumnDelegate.h
00013 ** \brief Delegate responsible for rendering the log message column
00014 */
00015 
00016 #ifndef _LOGMESSAGECOLUMNDELEGATE_H
00017 #define _LOGMESSAGECOLUMNDELEGATE_H
00018 
00019 #include <QItemDelegate>
00020 
00021 
00022 class LogMessageColumnDelegate : public QItemDelegate
00023 {
00024 public:
00025   /** Default constructor. */
00026   LogMessageColumnDelegate(QObject *parent = 0);
00027 
00028   /** Overrides the default paint() method so that we can prevent Qt from
00029    * munging Tor's log messages when using a Right-to-Left layout (e.g. when
00030    * viewing Vidalia in Farsi). */
00031   virtual void paint(QPainter *painter,
00032                      const QStyleOptionViewItem &option,
00033                      const QModelIndex &index) const;
00034 };
00035 
00036 #endif
00037