Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
recenttaskslist.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
5 #include <QListWidget>
6 
7 class QEvent;
8 
9 namespace geometrize
10 {
11 class RecentItems;
12 }
13 
14 namespace geometrize
15 {
16 
17 namespace dialog
18 {
19 
23 class RecentTasksList : public QListWidget
24 {
25  Q_OBJECT
26 
27 public:
28  explicit RecentTasksList(QWidget* parent = nullptr);
29  virtual ~RecentTasksList();
30 
35  void setRecentItems(RecentItems* items);
36 
42  static QString getDisplayNameForTaskPath(const QUrl& url);
43 
44 protected:
45  void changeEvent(QEvent*) override;
46 
47 private:
48  virtual void keyPressEvent(QKeyEvent* e) override;
49 
51  std::unique_ptr<RecentTasksListImpl> d;
52 };
53 
54 }
55 
56 }
static QString getDisplayNameForTaskPath(const QUrl &url)
getDisplayNameForTaskPath Extracts a display name suitable for displaying to the user from the task U...
Definition: recenttaskslist.cpp:186
virtual ~RecentTasksList()
Definition: recenttaskslist.cpp:177
The RecentItems class encapsulates a list of items that were recently interacted with. The class keeps a record of these items stored in preferences. Useful for keeping track of recently opened files.
Definition: recentitems.h:16
RecentTasksList(QWidget *parent=nullptr)
Definition: recenttaskslist.cpp:173
void setRecentItems(RecentItems *items)
setRecentItems Sets the items that the list will keep track of.
Definition: recenttaskslist.cpp:181
virtual void keyPressEvent(QKeyEvent *e) override
Definition: recenttaskslist.cpp:191
The RecentTasksList class models the UI for a list of recently opened tasks.
Definition: recenttaskslist.h:23
std::unique_ptr< RecentTasksListImpl > d
Definition: recenttaskslist.h:50
void changeEvent(QEvent *) override
Definition: recenttaskslist.cpp:208