view ui/certificateitemdelegate.h @ 330:1e6d1eab8395

Fix NSS unit test for Windows and change how instructions are written This was supposed to fix the block on error. But it did not.
author Andre Heinecke <aheinecke@intevation.de>
date Tue, 08 Apr 2014 15:08:57 +0000
parents abac76b855b2
children 9e38a4bcd44e
line wrap: on
line source
#ifndef CERTIFICATELISTITEM_H
#define CERTIFICATELISTITEM_H
/**
 * @file certificateitemdelegate.h
 * @brief Item delegate drawing custom certificate items in list views.
 *
 */

#include <QStyledItemDelegate>

class CertificateItemDelegate : public QStyledItemDelegate
{
Q_OBJECT

public:
    CertificateItemDelegate(QWidget *parent = 0) : QStyledItemDelegate(parent){}

    /**
     * @brief Renders the delegate using the given painter and options.
     *
     * @param painter   The painter to draw the item.
     * @param option    The style options.
     * @param index     The model index of the item to draw.
     */
    void paint(QPainter *painter, const QStyleOptionViewItem &option,
        const QModelIndex &index) const;

private:

    /**
     * @brief Draw the item using the given parameters.
     *
     * @param painter   The painter to draw the item.
     * @param option    The style options.
     * @param index     The model index of the item to draw.
     * @param icon      The icon to display.
     * @param font      The font used to draw text.
     */
    void drawItem(QPainter *painter, const QStyleOptionViewItem &option,
        const QModelIndex &index, QIcon *icon, QFont *font) const;
};
#endif

http://wald.intevation.org/projects/trustbridge/