37 lines
812 B
C++
37 lines
812 B
C++
#ifndef CBOXTREEWIDGET_H
|
|
#define CBOXTREEWIDGET_H
|
|
|
|
#include "Export.h"
|
|
#include "QTreeWidget"
|
|
|
|
class CBoxListView;
|
|
class DLL_CLASS CBoxTreeWidget : public QTreeWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
CBoxTreeWidget(QWidget *parent = Q_NULLPTR);
|
|
|
|
bool isExist(const QString &name);
|
|
QString currentName();
|
|
|
|
CBoxListView *addListView(QTreeWidgetItem *parent, bool iconMode);
|
|
CBoxListView *getListView(QTreeWidgetItem *parent);
|
|
void adjustSubListSize(QTreeWidgetItem *cat_item);
|
|
|
|
protected:
|
|
void resizeEvent(QResizeEvent *e);
|
|
void mousePressEvent(QMouseEvent *event);
|
|
|
|
private slots:
|
|
void filter(const QString &text);
|
|
|
|
private:
|
|
void slotItemWidgetSelected();
|
|
void initHeaderView();
|
|
|
|
private:
|
|
QMap<QWidget *, QTreeWidgetItem *> m_itemWidgetMap;
|
|
};
|
|
|
|
#endif // CBOXTREEWIDGET_H
|