#pragma once #include #include #include #include #include #include #include #include #include // 为了QCombobox下拉列表添加QCheckBox复选框创建QListViewEx class I_PLUGIN_EXPORT QListViewEx : public QListWidget { Q_OBJECT public: QListViewEx(QWidget* parent, QStringList *listItems, QStringList *listItemAlls, QComboBox* pComboBox); //返回用户选择项的用户自定义数据 bool getSelectItems(QStringList &data); private slots: // Check状态改变 void slotCheckBoxChanged(int state); private: // 相关的变量,主要为控制 QComboBox* m_pComboBox; QStringList m_listItems; QStringList m_listItemAlls; QList m_listChecked; QList m_listItemData; QList m_listCheckBoxes; bool m_bAllConsider; bool m_bByAll; QMap m_mapRawStates; };