2021-09-19 17:07:54 +00:00
|
|
|
#pragma once
|
|
|
|
|
2022-06-16 19:29:55 +00:00
|
|
|
#include <QEvent>
|
2022-09-22 18:26:05 +00:00
|
|
|
#include <QHeaderView>
|
2021-09-19 17:07:54 +00:00
|
|
|
|
|
|
|
namespace CSVWorld
|
|
|
|
{
|
2022-09-22 18:26:05 +00:00
|
|
|
class DragRecordTable;
|
2021-09-19 17:07:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
class TableHeaderMouseEventHandler : public QWidget
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
explicit TableHeaderMouseEventHandler(DragRecordTable* parent);
|
2021-09-19 17:07:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
void showContextMenu(const QPoint&);
|
2021-09-19 17:07:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
private:
|
|
|
|
DragRecordTable& table;
|
|
|
|
QHeaderView& header;
|
2021-09-19 17:07:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
QMenu& createContextMenu();
|
|
|
|
bool eventFilter(QObject*, QEvent*) override;
|
2021-09-19 17:07:54 +00:00
|
|
|
|
2022-09-22 18:26:05 +00:00
|
|
|
}; // class TableHeaderMouseEventHandler
|
2021-09-19 17:07:54 +00:00
|
|
|
} // namespace CSVWorld
|