function_editor.h
Go to the documentation of this file.
1 #ifndef AddCustomPlotDialog_H
2 #define AddCustomPlotDialog_H
3 
4 #include <QDialog>
5 #include <QTimer>
6 #include <QListWidgetItem>
7 #include <unordered_map>
8 #include "PlotJuggler/plotdata.h"
9 #include "custom_function.h"
10 #include "qwt_plot_curve.h"
11 #include "ui_function_editor.h"
12 #include "plotwidget.h"
14 
15 #include "QLuaCompleter"
16 #include "QSyntaxStyle"
17 
18 class FunctionEditorWidget : public QWidget
19 {
20  Q_OBJECT
21 
22 public:
23  explicit FunctionEditorWidget(PlotDataMapRef& plotMapData,
24  const TransformsMap& mapped_custom_plots,
25  QWidget* parent);
26 
27  virtual ~FunctionEditorWidget() override;
28 
29  void setLinkedPlotName(const QString& linkedPlotName);
30 
32  {
35  };
36 
37  void clear();
38 
39  QString getLinkedData() const;
40 
41  const PlotData& getPlotData() const;
42 
43  void createNewPlot();
44 
46 
47  bool eventFilter(QObject* obj, QEvent* event) override;
48 
49  void saveSettings();
50 
51 public slots:
52  void on_stylesheetChanged(QString theme);
53 
54 private slots:
55 
56  void on_snippetsListSaved_currentRowChanged(int currentRow);
57 
58  void on_snippetsListSaved_doubleClicked(const QModelIndex& index);
59 
60  void on_nameLineEdit_textChanged(const QString& arg1);
61 
62  void savedContextMenu(const QPoint& pos);
63 
65 
67 
69 
70  void onRenameSaved();
71 
73 
75 
77 
79 
80  void on_listSourcesChanged();
81 
82  void on_lineEditSource_textChanged(const QString& text);
83 
84  void onUpdatePreview();
85 
86  void onUpdatePreviewBatch();
87 
89 
91 
93 
94  void on_lineEditTab2Filter_textChanged(const QString& arg1);
95 
97 
98  void on_suffixLineEdit_textChanged(const QString& arg1);
99 
101 
103 
105 
107 
108 private:
109  void importSnippets(const QByteArray& xml_text);
110 
111  QByteArray exportSnippets() const;
112 
113  bool addToSaved(const QString& name, const SnippetData& snippet);
114 
115  void updatePreview();
116 
117  // QTimer _update_preview_timer;
118 
121  Ui::FunctionEditor* ui;
122 
123  int _v_count;
124 
126 
127  QStringList _dragging_curves;
128 
131 
133 
136 
138 
141 
142  void setSemaphore(QLabel* semaphore, QString errors);
143 
144 signals:
145  void accept(std::vector<CustomPlotPtr> plot);
146  void closed();
147 };
148 
149 #endif // AddCustomPlotDialog_H
FunctionEditorWidget(PlotDataMapRef &plotMapData, const TransformsMap &mapped_custom_plots, QWidget *parent)
void accept(std::vector< CustomPlotPtr > plot)
void setLinkedPlotName(const QString &linkedPlotName)
void setSemaphore(QLabel *semaphore, QString errors)
void importSnippets(const QByteArray &xml_text)
void on_stylesheetChanged(QString theme)
std::map< QString, SnippetData > SnippetsMap
void on_nameLineEdit_textChanged(const QString &arg1)
std::unordered_map< std::string, std::shared_ptr< TransformFunction > > TransformsMap
QString getLinkedData() const
void on_lineEditSource_textChanged(const QString &text)
void savedContextMenu(const QPoint &pos)
Class, that describes completer with glsl specific types and functions.
virtual ~FunctionEditorWidget() override
QStringList _dragging_curves
DelayedCallback _update_preview_tab1
void editExistingPlot(CustomPlotPtr data)
DelayedCallback _update_preview_tab2
Ui::FunctionEditor * ui
void on_globalVarsTextBatch_textChanged()
const TransformsMap & _transform_maps
void on_tabWidget_currentChanged(int index)
bool addToSaved(const QString &name, const SnippetData &snippet)
std::shared_ptr< CustomFunction > CustomPlotPtr
PlotDataMapRef _local_plot_data
void on_snippetsListSaved_currentRowChanged(int currentRow)
PlotWidget * _preview_widget
void on_suffixLineEdit_textChanged(const QString &arg1)
void on_snippetsListSaved_doubleClicked(const QModelIndex &index)
bool eventFilter(QObject *obj, QEvent *event) override
DelayedCallback _tab2_filter
QByteArray exportSnippets() const
SnippetsMap _snipped_saved
QLuaCompleter * lua_completer_
PlotDataMapRef & _plot_map_data
const PlotData & getPlotData() const
QLuaCompleter * lua_completer_batch_
void on_lineEditTab2Filter_textChanged(const QString &arg1)
void on_listAdditionalSources_itemSelectionChanged()
void on_pushButtonDeleteCurves_clicked()
Definition: format.h:895


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:01:02