Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
taskitemwidget.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <functional>
4 #include <memory>
5 
6 #include <QString>
7 #include <QWidget>
8 
9 class QContextMenuEvent;
10 class QEvent;
11 class QMouseEvent;
12 
13 namespace geometrize
14 {
15 
16 namespace dialog
17 {
18 
22 class TaskItemWidget : public QWidget
23 {
24  Q_OBJECT
25 
26 public:
27  explicit TaskItemWidget(const QString& taskItemId, const QString& taskItemDisplayName, const std::function<void(const QString&)>& openItemCb, const std::function<void(const QString&)>& removeItemCb);
28  virtual ~TaskItemWidget();
29 
30 protected:
31  void changeEvent(QEvent*) override;
32 
33 private:
34  virtual void contextMenuEvent(QContextMenuEvent* e) override;
35  virtual void mouseReleaseEvent(QMouseEvent* e) override;
36 
38  std::unique_ptr<TaskItemWidget::TaskItemWidgetImpl> d;
39 };
40 
41 }
42 
43 }
std::unique_ptr< TaskItemWidget::TaskItemWidgetImpl > d
Definition: taskitemwidget.h:37
virtual ~TaskItemWidget()
Definition: taskitemwidget.cpp:173
TaskItemWidget(const QString &taskItemId, const QString &taskItemDisplayName, const std::function< void(const QString &)> &openItemCb, const std::function< void(const QString &)> &removeItemCb)
Definition: taskitemwidget.cpp:168
virtual void contextMenuEvent(QContextMenuEvent *e) override
Definition: taskitemwidget.cpp:177
virtual void mouseReleaseEvent(QMouseEvent *e) override
Definition: taskitemwidget.cpp:184
The TaskItemWidget class is a button that opens/shows a task when pressed (such as a recently opened ...
Definition: taskitemwidget.h:22
void changeEvent(QEvent *) override
Definition: taskitemwidget.cpp:191