Changeset View
Changeset View
Standalone View
Standalone View
core/app/views/tableview/tableview_treeview.h
Show All 32 Lines | |||||
33 | #include "digikam_export.h" | 33 | #include "digikam_export.h" | ||
34 | #include "dragdropimplementations.h" | 34 | #include "dragdropimplementations.h" | ||
35 | #include "imagealbummodel.h" | 35 | #include "imagealbummodel.h" | ||
36 | #include "imagefiltermodel.h" | 36 | #include "imagefiltermodel.h" | ||
37 | #include "statesavingobject.h" | 37 | #include "statesavingobject.h" | ||
38 | #include "tableview_columnfactory.h" | 38 | #include "tableview_columnfactory.h" | ||
39 | #include "tableview_shared.h" | 39 | #include "tableview_shared.h" | ||
40 | #include "thumbnailloadthread.h" | 40 | #include "thumbnailloadthread.h" | ||
41 | #include "groupingviewimplementation.h" | ||||
41 | 42 | | |||
42 | class QMenu; | 43 | class QMenu; | ||
43 | class QContextMenuEvent; | 44 | class QContextMenuEvent; | ||
44 | 45 | | |||
45 | namespace Digikam | 46 | namespace Digikam | ||
46 | { | 47 | { | ||
47 | 48 | | |||
48 | /// @todo For proper drag-and-drop support, we probably have to implement more | 49 | /// @todo For proper drag-and-drop support, we probably have to implement more | ||
49 | /// of DragDropModelImplementation's functions in the TableViewModel or | 50 | /// of DragDropModelImplementation's functions in the TableViewModel or | ||
50 | /// in the sort model. Subclassing DragDropModelImplementation would not | 51 | /// in the sort model. Subclassing DragDropModelImplementation would not | ||
51 | /// work there, because we want to re-use ImageDragDropHandler... | 52 | /// work there, because we want to re-use ImageDragDropHandler... | ||
52 | class TableViewTreeView : public QTreeView, public DragDropViewImplementation | 53 | class TableViewTreeView : public QTreeView, public DragDropViewImplementation, public GroupingViewImplementation | ||
53 | { | 54 | { | ||
54 | Q_OBJECT | 55 | Q_OBJECT | ||
55 | 56 | | |||
56 | public: | 57 | public: | ||
57 | 58 | | |||
58 | explicit TableViewTreeView(TableViewShared* const tableViewShared, QWidget* const parent = 0); | 59 | explicit TableViewTreeView(TableViewShared* const tableViewShared, QWidget* const parent = 0); | ||
59 | virtual ~TableViewTreeView(); | 60 | virtual ~TableViewTreeView(); | ||
60 | 61 | | |||
61 | Album* albumAt(const QPoint& pos) const; | 62 | Album* albumAt(const QPoint& pos) const; | ||
62 | 63 | | |||
63 | protected: | 64 | protected: | ||
64 | 65 | | |||
65 | virtual bool eventFilter(QObject* watched, QEvent* event); | 66 | virtual bool eventFilter(QObject* watched, QEvent* event); | ||
66 | 67 | | |||
67 | DECLARE_VIEW_DRAG_DROP_METHODS(QTreeView) | 68 | DECLARE_VIEW_DRAG_DROP_METHODS(QTreeView) | ||
68 | 69 | | |||
69 | virtual AbstractItemDragDropHandler* dragDropHandler() const; | 70 | virtual AbstractItemDragDropHandler* dragDropHandler() const; | ||
70 | virtual QModelIndex mapIndexForDragDrop(const QModelIndex& index) const; | 71 | virtual QModelIndex mapIndexForDragDrop(const QModelIndex& index) const; | ||
71 | virtual QPixmap pixmapForDrag(const QList<QModelIndex>& indexes) const; | 72 | virtual QPixmap pixmapForDrag(const QList<QModelIndex>& indexes) const; | ||
72 | virtual void wheelEvent(QWheelEvent* event); | 73 | virtual void wheelEvent(QWheelEvent* event); | ||
73 | 74 | | |||
75 | virtual bool hasHiddenGroupedImages(const ImageInfo& info) const; | ||||
76 | | ||||
74 | private: | 77 | private: | ||
75 | 78 | | |||
76 | void addColumnDescriptionsToMenu(const QList<TableViewColumnDescription>& columnDescriptions, QMenu* const menu); | 79 | void addColumnDescriptionsToMenu(const QList<TableViewColumnDescription>& columnDescriptions, QMenu* const menu); | ||
77 | void showHeaderContextMenu(QEvent* const event); | 80 | void showHeaderContextMenu(QEvent* const event); | ||
78 | 81 | | |||
79 | private Q_SLOTS: | 82 | private Q_SLOTS: | ||
80 | 83 | | |||
81 | void slotHeaderContextMenuAddColumn(); | 84 | void slotHeaderContextMenuAddColumn(); | ||
Show All 20 Lines |