Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
templatebutton.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
5 #include <QPushButton>
6 #include <QString>
7 
9 
10 class QEvent;
11 
12 namespace chaiscript
13 {
14 class ChaiScript;
15 }
16 
17 namespace geometrize
18 {
19 
20 namespace dialog
21 {
22 
26 class TemplateButton : public QPushButton
27 {
28  Q_OBJECT
29 
30 public:
31  explicit TemplateButton(chaiscript::ChaiScript* const templateLoader, const QString& templateFolder);
32  virtual ~TemplateButton();
33 
39 
40 signals:
41  void signal_templateLoaded(QString, bool);
42 
43 protected:
44  void changeEvent(QEvent*) override;
45 
46 private:
47  virtual void contextMenuEvent(QContextMenuEvent* e) override;
48 
50  std::unique_ptr<TemplateButtonImpl> d;
51 };
52 
53 }
54 
55 }
void signal_templateLoaded(QString, bool)
virtual ~TemplateButton()
Definition: templatebutton.cpp:151
virtual void contextMenuEvent(QContextMenuEvent *e) override
Definition: templatebutton.cpp:155
std::unique_ptr< TemplateButtonImpl > d
Definition: templatebutton.h:49
void changeEvent(QEvent *) override
Definition: templatebutton.cpp:165
The TemplateButton class is a button that opens a task template when clicked.
Definition: templatebutton.h:26
The TemplateManifest class represents the metadata for a task template.
Definition: templatemanifest.h:13
TemplateButton(chaiscript::ChaiScript *const templateLoader, const QString &templateFolder)
Definition: templatebutton.cpp:145
TemplateManifest getTemplateManifest() const
getTemplateManifest Get the manifest data of the template this item corresponds to.
Definition: templatebutton.cpp:160