Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef CURVEBROWSER_H
00029 #define CURVEBROWSER_H
00030
00031 #include <QGpGuiTools.h>
00032
00033 #include "ui_CurveBrowser.h"
00034 #include "SciFigsDLLExport.h"
00035
00036 namespace SciFigs {
00037
00038 class LineLayer;
00039 class CurveBrowserProxy;
00040 class CurveProperties;
00041 class AxisWindow;
00042 class AbstractLine;
00043 class LegendProperties;
00044
00045 class SCIFIGS_EXPORT CurveBrowser : public QWidget, protected Ui::CurveBrowser
00046 {
00047 Q_OBJECT
00048 public:
00049 CurveBrowser(QWidget * parent=0);
00050 ~CurveBrowser();
00051
00052 void setProxy(CurveBrowserProxy * proxy);
00053 CurveBrowserProxy * proxy() {return _proxy;}
00054 QList<CurveProperties *> curves() const;
00055 void dock(QWidget * w);
00056
00057 QAction * addCurveAction(QString title, QString toolTip, bool editCurve);
00058 virtual void setEditable(bool e);
00059
00060 void initLayer(LineLayer * curveLayer);
00061 void setCurrentLayer(LineLayer * curveLayer);
00062 LineLayer * currentLayer() const {return _currentLayer;}
00063 CurveProperties * addLine(AbstractLine * line);
00064
00065 int count() const;
00066 int currentLine() const;
00067 void loadMultiColumns(QString fileName, bool lastFile, ColumnTextParser *& parser);
00068 public slots:
00069 virtual void load();
00070 void clear();
00071 void legend();
00072 void average();
00073 virtual void setLimits();
00074 void setCurveName(QString n);
00075 void showLog();
00076 void save();
00077 void remove();
00078 void resample();
00079 void cut();
00080 void smooth();
00081 private slots:
00082 void on_loadBut_clicked() {load();}
00083 void on_legendBut_clicked() {legend();}
00084 void on_clearBut_clicked();
00085 void newPickedLine(AbstractLine * line);
00086 void newPickedPoint(AbstractLine *, int);
00087 void commitLegend();
00088 signals:
00089 void curveModified();
00090 protected:
00091 static void curveRange(const QList<CurveProperties *> &list, double& min, double& max);
00092 QList<CurveProperties *> selectCurves();
00093 void closeEvent(QCloseEvent * e);
00094 virtual void loadMultiColumns(const ColumnTextParser * parser, QString fileName);
00095 void removeLine(int index);
00096 private:
00097 LineLayer * _currentLayer;
00098 int _currentCurve;
00099 CurveBrowserProxy * _proxy;
00100 LegendProperties * _legendEditor;
00101 bool _editable;
00102 };
00103
00104 }
00105
00106 #endif // CURVEBROWSER_H