2019-08-19 13:35:25 +00:00
|
|
|
#ifndef LISTDOCKWIDGET_H
|
|
|
|
#define LISTDOCKWIDGET_H
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
#include <QAbstractItemModel>
|
|
|
|
#include <QSortFilterProxyModel>
|
|
|
|
#include <QMenu>
|
|
|
|
|
|
|
|
#include "core/Cutter.h"
|
|
|
|
#include "common/AddressableItemModel.h"
|
|
|
|
#include "CutterDockWidget.h"
|
|
|
|
#include "CutterTreeWidget.h"
|
|
|
|
#include "menus/AddressableItemContextMenu.h"
|
|
|
|
|
|
|
|
class MainWindow;
|
|
|
|
class QTreeWidgetItem;
|
|
|
|
class CommentsWidget;
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ListDockWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class ListDockWidget : public CutterDockWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
enum class SearchBarPolicy {
|
|
|
|
ShowByDefault,
|
|
|
|
HideByDefault,
|
|
|
|
Hide,
|
|
|
|
};
|
|
|
|
|
2020-05-22 11:49:34 +00:00
|
|
|
explicit ListDockWidget(MainWindow *main, SearchBarPolicy searchBarPolicy = SearchBarPolicy::ShowByDefault);
|
2019-08-19 13:35:25 +00:00
|
|
|
~ListDockWidget() override;
|
|
|
|
|
|
|
|
void showCount(bool show);
|
|
|
|
protected:
|
|
|
|
void setModels(AddressableFilterProxyModel *objectFilterProxyModel);
|
|
|
|
|
|
|
|
std::unique_ptr<Ui::ListDockWidget> ui;
|
|
|
|
private:
|
2020-06-06 16:02:24 +00:00
|
|
|
AddressableFilterProxyModel *objectFilterProxyModel = nullptr;
|
2019-08-19 13:35:25 +00:00
|
|
|
CutterTreeWidget *tree;
|
|
|
|
SearchBarPolicy searchBarPolicy;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LISTDOCKWIDGET_H
|