MultiplotConfigWidget.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2015 by Ralf Kaestner *
3  * ralf.kaestner@gmail.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the Lesser GNU General Public License as published by*
7  * the Free Software Foundation; either version 3 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * Lesser GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the Lesser GNU General Public License *
16  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17  ******************************************************************************/
18 
19 #ifndef RQT_MULTIPLOT_MULTIPLOT_CONFIG_WIDGET_H
20 #define RQT_MULTIPLOT_MULTIPLOT_CONFIG_WIDGET_H
21 
22 #include <QStringList>
23 #include <QWidget>
24 
26 
27 namespace Ui {
28  class MultiplotConfigWidget;
29 };
30 
31 namespace rqt_multiplot {
33  public QWidget {
34  Q_OBJECT
35  public:
36  MultiplotConfigWidget(QWidget* parent = 0, size_t maxHistoryLength = 10);
37  virtual ~MultiplotConfigWidget();
38 
39  void setConfig(MultiplotConfig* config);
40  MultiplotConfig* getConfig() const;
41  void setCurrentConfigUrl(const QString& url, bool updateHistory = true);
42  QString getCurrentConfigUrl() const;
43  bool setCurrentConfigModified(bool modified);
44  bool isCurrentConfigModified() const;
45  void setMaxConfigUrlHistoryLength(size_t length);
46  size_t getMaxConfigUrlHistoryLength() const;
47  void setConfigUrlHistory(const QStringList& history);
48  QStringList getConfigUrlHistory() const;
49  bool isFile(const QString& url) const;
50 
51  bool loadConfig(const QString& url);
52  bool saveCurrentConfig();
53  bool saveConfig(const QString& url);
54  void resetConfig();
55 
56  bool confirmSave(bool canCancel = true);
57 
58  void addConfigUrlToHistory(const QString& url);
59  void clearConfigUrlHistory();
60 
61  signals:
62  void currentConfigModifiedChanged(bool modified);
63  void currentConfigUrlChanged(const QString& url);
64 
65  private:
66  Ui::MultiplotConfigWidget* ui_;
67 
69 
73 
74  private slots:
75  void configChanged();
76 
77  void configComboBoxEditTextChanged(const QString& text);
78  void configComboBoxCurrentUrlChanged(const QString& url);
79 
80  void pushButtonClearHistoryClicked();
81  void pushButtonNewClicked();
82  void pushButtonOpenClicked();
83  void pushButtonSaveClicked();
84  void pushButtonSaveAsClicked();
85  };
86 };
87 
88 #endif
config


rqt_multiplot_plugin
Author(s): Ralf Kaestner
autogenerated on Fri Jan 15 2021 03:47:53