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.
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QCheckBox>
|
|
|
|
|
#include <QComboBox>
|
|
|
|
|
#include <QListWidget>
|
|
|
|
|
|
|
|
|
|
#include "iPlugin_global.h"
|
|
|
|
|
|
|
|
|
|
// 为了QCombobox下拉列表添加QCheckBox复选框创建QListViewEx
|
|
|
|
|
class I_PLUGIN_EXPORT ZxTableHeaderViewCbxView : public QListWidget
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
ZxTableHeaderViewCbxView(QWidget* parent, \
|
|
|
|
|
QComboBox* pComboBox, \
|
|
|
|
|
QStringList* listItemAlls);
|
|
|
|
|
|
|
|
|
|
// 返回用户选择项的用户自定义数据(如果单选,只返回一项)
|
|
|
|
|
virtual bool getSelectItems(QStringList& listItems);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
bool m_bMultiSelMode; //是否多选模式
|
|
|
|
|
|
|
|
|
|
// 相关的变量,主要为控制
|
|
|
|
|
QComboBox* m_pComboBox;
|
|
|
|
|
// QStringList m_listItems;
|
|
|
|
|
// QList<bool> m_listChecked;
|
|
|
|
|
// QList<QVariant> m_listItemData;
|
|
|
|
|
// QList<QCheckBox*> m_listCheckBoxes;
|
|
|
|
|
// bool m_bAllConsider;
|
|
|
|
|
// bool m_bByAll;
|
|
|
|
|
QMap<QCheckBox*, bool> m_mapRawStates;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// QList<QRadioButton*> m_listRadioButtons;
|
|
|
|
|
|
|
|
|
|
bool m_bUnableSP;
|
|
|
|
|
|
|
|
|
|
};
|