PlotTableWidget.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_PLOT_TABLE_WIDGET_H
20 #define RQT_MULTIPLOT_PLOT_TABLE_WIDGET_H
21 
22 #include <QGridLayout>
23 #include <QVector>
24 #include <QWidget>
25 
30 
31 namespace rqt_multiplot {
32  class PlotWidget;
33 
35  public QWidget {
36  Q_OBJECT
37  public:
38  PlotTableWidget(QWidget* parent = 0);
39  virtual ~PlotTableWidget();
40 
42  PlotTableConfig* getConfig() const;
43  size_t getNumRows() const;
44  size_t getNumColumns() const;
45  PlotWidget* getPlotWidget(size_t row, size_t column) const;
47  BagReader* getBagReader() const;
48 
49  void runPlots();
50  void pausePlots();
51  void clearPlots();
52 
53  void requestReplot();
54  void forceReplot();
55 
56  void renderToPixmap(QPixmap& pixmap);
57  void writeFormattedCurveAxisTitles(QStringList& formattedAxisTitles);
58  void writeFormattedCurveData(QList<QStringList>& formattedData);
59 
60  void loadFromBagFile(const QString& fileName);
61  void saveToImageFile(const QString& fileName);
62  void saveToTextFile(const QString& fileName);
63 
64  signals:
65  void plotPausedChanged();
66  void jobStarted(const QString& toolTip);
67  void jobProgressChanged(double progress);
68  void jobFinished(const QString& toolTip);
69  void jobFailed(const QString& toolTip);
70 
71  private:
72  QGridLayout* layout_;
73  QVector<QVector<PlotWidget*> > plotWidgets_;
74 
76 
79 
80  void updatePlotScale(const BoundingRectangle& bounds, PlotWidget*
81  excluded = 0);
82 
83  private slots:
84  void configBackgroundColorChanged(const QColor& color);
85  void configForegroundColorChanged(const QColor& color);
86  void configNumPlotsChanged(size_t numRows, size_t numColumns);
87  void configLinkScaleChanged(bool link);
88  void configTrackPointsChanged(bool track);
89 
90  void plotPreferredScaleChanged(const BoundingRectangle& bounds);
91  void plotCurrentScaleChanged(const BoundingRectangle& bounds);
92  void plotCursorActiveChanged(bool active);
93  void plotCursorCurrentPositionChanged(const QPointF& position);
94  void plotPausedChanged(bool paused);
95  void plotStateChanged(int state);
96 
98  void bagReaderReadingProgressChanged(double progress);
100  void bagReaderReadingFailed(const QString& error);
101  };
102 };
103 
104 #endif
MessageSubscriberRegistry * getRegistry() const
void bagReaderReadingFailed(const QString &error)
void saveToTextFile(const QString &fileName)
void setConfig(PlotTableConfig *config)
void plotCursorCurrentPositionChanged(const QPointF &position)
void configBackgroundColorChanged(const QColor &color)
config
void updatePlotScale(const BoundingRectangle &bounds, PlotWidget *excluded=0)
void jobProgressChanged(double progress)
void configForegroundColorChanged(const QColor &color)
void plotCursorActiveChanged(bool active)
void loadFromBagFile(const QString &fileName)
void writeFormattedCurveData(QList< QStringList > &formattedData)
void jobFinished(const QString &toolTip)
PlotWidget * getPlotWidget(size_t row, size_t column) const
PlotTableWidget(QWidget *parent=0)
void jobFailed(const QString &toolTip)
void plotPreferredScaleChanged(const BoundingRectangle &bounds)
void bagReaderReadingProgressChanged(double progress)
void renderToPixmap(QPixmap &pixmap)
void configNumPlotsChanged(size_t numRows, size_t numColumns)
void jobStarted(const QString &toolTip)
void saveToImageFile(const QString &fileName)
PlotTableConfig * getConfig() const
BagReader * getBagReader() const
MessageSubscriberRegistry * registry_
void writeFormattedCurveAxisTitles(QStringList &formattedAxisTitles)
QVector< QVector< PlotWidget * > > plotWidgets_
void configTrackPointsChanged(bool track)
void plotCurrentScaleChanged(const BoundingRectangle &bounds)


rqt_multiplot
Author(s): Ralf Kaestner
autogenerated on Wed Jul 10 2019 03:49:44