You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWTAI-Platform/Include/iBase/iPlugin/ZxListWidgetItemDelegate.h

42 lines
1018 B
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include <QStyledItemDelegate>
#include "iPlugin_global.h"
class ZxListWidgetItem;
// 类似QTreeWidget的QListWidget采用的自定义ZxListWidgetItemDelegate代理类
class I_PLUGIN_EXPORT ZxListWidgetItemDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
explicit ZxListWidgetItemDelegate(QObject* parent = 0);
bool isSimpleMode();
void setSimpleMode(bool bSimpleMode);
public:
void paint(QPainter* painter, \
const QStyleOptionViewItem& option, \
const QModelIndex& index) const;
QSize sizeHint(const QStyleOptionViewItem& option, \
const QModelIndex& index) const;
protected:
// 模拟图标样式
void drawIconStyle(ZxListWidgetItem* pItem, \
QPainter* painter, \
QRect rtBgn, QRect rtIcons, \
int nNetWH) const;
protected:
bool m_bSimpleMode; //是否普通模式,比如对于干扰,则不考虑分组与缩进
};