mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-18 13:54:07 -05:00
![thunder2](/assets/img/avatar_default.png)
Added a new base class "RSItemDelegate" for adding a spacing for the item and remove the focus rectangle of the empty text for items with only an icon. Removed existing classes "ForumsItemDelegate" and "MessagesItemDelegate". git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3771 b45a01b8-16f6-495d-af2f-9b41ad6348cc
28 lines
637 B
C++
28 lines
637 B
C++
/*
|
|
* ChanGroupDelegate.cpp
|
|
*
|
|
* Created on: Sep 7, 2009
|
|
* Author: alex
|
|
*/
|
|
|
|
#include "ChanGroupDelegate.h"
|
|
#include <QApplication>
|
|
#include <QPainter>
|
|
#include <QColor>
|
|
|
|
ChanGroupDelegate::ChanGroupDelegate(QObject *parent) : RSItemDelegate(parent)
|
|
{
|
|
}
|
|
|
|
void ChanGroupDelegate::paint(QPainter * painter, const QStyleOptionViewItem & option, const QModelIndex & index) const
|
|
{
|
|
if (index.child(0, 0).isValid()) {
|
|
painter->setPen(Qt::blue);
|
|
QStyleOptionButton opt;
|
|
opt.rect = option.rect;
|
|
QApplication::style()->drawControl(QStyle::CE_PushButtonBevel, &opt, painter);
|
|
}
|
|
|
|
RSItemDelegate::paint(painter, option, index);
|
|
}
|