* split QtDirectoryListBox and QtStringListBox * renamed QtDirectoryListBox to QtPathListBox * extracted QtListItemWidget class to own file * renamed QtListItemWidget to QtListBoxItem * added SelectionPolicyType to QtPathListBox to allow for specifying if selecting files, directories or both should be allowed.
34 lines
590 B
C++
34 lines
590 B
C++
#ifndef QT_PATH_LIST_BOX_ITEM_H
|
|
#define QT_PATH_LIST_BOX_ITEM_H
|
|
|
|
#include "qt/element/QtListBoxItem.h"
|
|
|
|
class QPushButton;
|
|
class QListWidgetItem;
|
|
|
|
class FilePath;
|
|
class QtPathListBox;
|
|
|
|
class QtPathListBoxItem
|
|
: public QtListBoxItem
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
QtPathListBoxItem(QtPathListBox* listBox, QListWidgetItem* item, QWidget *parent = nullptr);
|
|
|
|
protected:
|
|
virtual QtListBox* getListBox() override;
|
|
|
|
private slots:
|
|
void handleButtonPress();
|
|
|
|
private:
|
|
virtual void onReadOnlyChanged() override;
|
|
|
|
QtPathListBox* m_listBox;
|
|
QPushButton* m_button;
|
|
};
|
|
|
|
#endif // QT_PATH_LIST_BOX_ITEM_H
|