cutter/src/widgets/ListDockWidget.h
karliss 76773eadd6
Reduce amount of warnings (#2233)
* Deal with QT depracated warnings
2020-06-06 19:02:24 +03:00

50 lines
1.1 KiB
C++

#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,
};
explicit ListDockWidget(MainWindow *main, SearchBarPolicy searchBarPolicy = SearchBarPolicy::ShowByDefault);
~ListDockWidget() override;
void showCount(bool show);
protected:
void setModels(AddressableFilterProxyModel *objectFilterProxyModel);
std::unique_ptr<Ui::ListDockWidget> ui;
private:
AddressableFilterProxyModel *objectFilterProxyModel = nullptr;
CutterTreeWidget *tree;
SearchBarPolicy searchBarPolicy;
};
#endif // LISTDOCKWIDGET_H