Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
imagetaskshapescriptingpanel.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <map>
4 #include <memory>
5 #include <string>
6 
7 #include <QWidget>
8 
9 class QEvent;
10 
11 namespace geometrize
12 {
13 
14 namespace dialog
15 {
16 class ScriptEditorWidget;
17 }
18 
19 namespace task
20 {
21 class ImageTask;
22 }
23 
24 }
25 
26 namespace geometrize
27 {
28 
29 namespace dialog
30 {
31 
35 class ImageTaskShapeScriptingPanel : public QWidget
36 {
37  Q_OBJECT
38 
39 public:
40  explicit ImageTaskShapeScriptingPanel(QWidget* parent = nullptr);
42 
47  void setImageTask(task::ImageTask* task);
48 
53  void syncUserInterface();
54 
55  std::map<std::string, std::string> getScripts() const;
56 
57 signals:
58  void signal_scriptingToggled(bool enabled);
59  void signal_scriptsReset();
60  void signal_scriptChanged(const std::string& functionName, const std::string& code);
61 
62 protected:
63  void changeEvent(QEvent*) override;
64 
65 private:
67  std::unique_ptr<ImageTaskShapeScriptingPanelImpl> d;
68 };
69 
70 }
71 
72 }
void signal_scriptChanged(const std::string &functionName, const std::string &code)
virtual ~ImageTaskShapeScriptingPanel()
Definition: imagetaskshapescriptingpanel.cpp:255
void changeEvent(QEvent *) override
Definition: imagetaskshapescriptingpanel.cpp:274
ImageTaskShapeScriptingPanel(QWidget *parent=nullptr)
Definition: imagetaskshapescriptingpanel.cpp:249
The ImageTaskShapeScriptingPanel models the UI for the script editors for controlling image task shap...
Definition: imagetaskshapescriptingpanel.h:35
The ImageTask class transforms a source image into a collection of shapes approximating the source im...
Definition: imagetask.h:50
std::unique_ptr< ImageTaskShapeScriptingPanelImpl > d
Definition: imagetaskshapescriptingpanel.h:66
void syncUserInterface()
syncUserInterface Syncs the user interface with the current image task. This should be called after s...
Definition: imagetaskshapescriptingpanel.cpp:264
void setImageTask(task::ImageTask *task)
setImageTask Sets the current image task manipulated by the scripting panel.
Definition: imagetaskshapescriptingpanel.cpp:259
std::map< std::string, std::string > getScripts() const
Definition: imagetaskshapescriptingpanel.cpp:269