function_editor.h
Go to the documentation of this file.
1 #ifndef AddCustomPlotDialog_H
2 #define AddCustomPlotDialog_H
3 
4 #include <QDialog>
5 #include <QListWidgetItem>
6 #include <unordered_map>
7 #include "PlotJuggler/plotdata.h"
8 #include "custom_function.h"
9 #include "qwt_plot_curve.h"
10 #include "ui_function_editor.h"
11 
12 
13 class AddCustomPlotDialog : public QDialog
14 {
15  Q_OBJECT
16 
17 public:
18  explicit AddCustomPlotDialog(PlotDataMapRef &plotMapData,
19  const CustomPlotMap& mapped_custom_plots,
20  QWidget *parent);
21  virtual ~AddCustomPlotDialog() override;
22 
23  void setLinkedPlotName(const QString &linkedPlotName);
24 
25  enum EditorMode{
29  };
30 
31  void setEditorMode(EditorMode mode);
32 
33  QString getLinkedData() const;
34  QString getGlobalVars() const;
35  QString getEquation() const;
36  QString getName() const;
37  const PlotData& getPlotData() const;
40 
41 private slots:
42 
43  void on_curvesListWidget_doubleClicked(const QModelIndex &index);
44 
45  void on_snippetsListSaved_currentRowChanged(int currentRow);
46 
47  void on_snippetsListSaved_doubleClicked(const QModelIndex &index);
48 
49  void on_snippetsListRecent_currentRowChanged(int currentRow);
50 
51  void on_snippetsListRecent_doubleClicked(const QModelIndex &index);
52 
53  void on_nameLineEdit_textChanged(const QString &arg1);
54 
55  void recentContextMenu(const QPoint &pos);
56 
57  void savedContextMenu(const QPoint &pos);
58 
60 
62 
64 
65  void onRenameSaved();
66 
68 
69  void on_lineEditFilter_textChanged(const QString &arg1);
70 
71 private:
72  void importSnippets(const QByteArray &xml_text);
73 
74  QByteArray exportSnippets() const;
75 
76  bool addToSaved(const QString& name, const SnippetData &snippet);
77 
80  Ui::FunctionEditor *ui;
81 
83  bool _is_new;
84  int _v_count;
85 
88 };
89 
90 #endif // AddCustomPlotDialog_H
QByteArray exportSnippets() const
Ui::FunctionEditor * ui
void on_snippetsListSaved_currentRowChanged(int currentRow)
SnippetsMap _snipped_recent
std::map< QString, SnippetData > SnippetsMap
void setLinkedPlotName(const QString &linkedPlotName)
void setEditorMode(EditorMode mode)
void on_snippetsListSaved_doubleClicked(const QModelIndex &index)
const CustomPlotMap & _custom_plots
void recentContextMenu(const QPoint &pos)
void on_lineEditFilter_textChanged(const QString &arg1)
void on_nameLineEdit_textChanged(const QString &arg1)
CustomPlotPtr getCustomPlotData() const
QString getGlobalVars() const
std::shared_ptr< CustomFunction > CustomPlotPtr
QString getLinkedData() const
AddCustomPlotDialog(PlotDataMapRef &plotMapData, const CustomPlotMap &mapped_custom_plots, QWidget *parent)
bool addToSaved(const QString &name, const SnippetData &snippet)
PlotDataMapRef & _plot_map_data
QString getEquation() const
std::unordered_map< std::string, CustomPlotPtr > CustomPlotMap
const PlotData & getPlotData() const
void editExistingPlot(CustomPlotPtr data)
CustomPlotPtr _plot
void on_curvesListWidget_doubleClicked(const QModelIndex &index)
void on_snippetsListRecent_currentRowChanged(int currentRow)
void importSnippets(const QByteArray &xml_text)
virtual ~AddCustomPlotDialog() override
SnippetsMap _snipped_saved
QString getName() const
void on_snippetsListRecent_doubleClicked(const QModelIndex &index)
void savedContextMenu(const QPoint &pos)


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17