##// END OF EJS Templates
New Plugin Manager and interface to remove all the previous crap!...
New Plugin Manager and interface to remove all the previous crap! Let's use Qt plugin API and make it much simpler.

File last commit:

r74:7e54838aea98 default
r118:de85e8465e67 tip 1.0
Show More
SocExplorerPlot.h
70 lines | 2.1 KiB | text/x-c | CLexer
/ src / common / SocExplorerPlot.h
Jeandet Alexis
First init of SocExplorer Repository.
r0 #ifndef SOCEXPLORERPLOT_H
#define SOCEXPLORERPLOT_H
#include <QWidget>
#include <QGridLayout>
#include <qcustomplot.h>
Improved zoom features on SocExplorer Plot.
r74 #include <QRubberBand>
#include <QPoint>
Jeandet Alexis
First init of SocExplorer Repository.
r0
class SocExplorerPlot : public QWidget
{
Improved zoom features on SocExplorer Plot.
r74 Q_OBJECT
Jeandet Alexis
First init of SocExplorer Repository.
r0 public:
Improved zoom features on SocExplorer Plot.
r74 explicit SocExplorerPlot(QWidget *parent = 0);
~SocExplorerPlot();
void setTitle(QString title);
void setXaxisLabel(QString label);
void setXaxisRange(double lower, double upper);
void setYaxisLabel(QString label);
void setYaxisRange(double lower, double upper);
void rescaleAxis();
void setLegendFont(QFont font);
void setLegendSelectedFont(QFont font);
void setAdaptativeSampling(int graphIndex,bool enable);
int addGraph();
bool removeGraph(int graphIndex);
void removeAllGraphs();
void setGraphName(int graphIndex,QString name);
void setGraphData(int graphIndex, QList<QVariant> x, QList<QVariant> y);
void setGraphData(int graphIndex, QCPDataMap* data,bool copy = true,bool replot=true);
void addGraphData(int graphIndex, QList<QVariant> x, QList<QVariant> y);
void addGraphData(int graphIndex, QVariant x, QVariant y);
void setGraphPen(int graphIndex,QPen pen);
QPen getGraphPen(int graphIndex);
void setGraphLineStyle(int graphIndex,QString lineStyle);
void setGraphScatterStyle(int graphIndex,QString scatterStyle);
void setXaxisTickLabelType(QCPAxis::LabelType type);
void setXaxisDateTimeFormat(const QString &format);
void show();
void replot();
Jeandet Alexis
First init of SocExplorer Repository.
r0
signals:
Improved zoom features on SocExplorer Plot.
r74
Jeandet Alexis
First init of SocExplorer Repository.
r0 public slots:
protected:
Improved zoom features on SocExplorer Plot.
r74 void keyPressEvent(QKeyEvent *);
void keyReleaseEvent(QKeyEvent *);
void wheelEvent(QWheelEvent *);
void mousePressEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
void mouseReleaseEvent(QMouseEvent *);
Jeandet Alexis
First init of SocExplorer Repository.
r0
private:
Improved zoom features on SocExplorer Plot.
r74 void zoom(double factor, int center, Qt::Orientation orientation);
void move(double factor, Qt::Orientation orientation);
QCustomPlot* m_plot;
QGridLayout* m_mainlayout;
bool ctrl_hold;
bool shift_hold;
bool mouse_hold;
QCPRange DragStartHorzRange;
QCPRange DragStartVertRange;
QPoint mDragStart;
bool mZoomMode;
QRubberBand * mRubberBand;
QPoint mOrigin;
Jeandet Alexis
First init of SocExplorer Repository.
r0 };
#endif // SOCEXPLORERPLOT_H