File indexing completed on 2025-07-06 04:09:39

0001 /***************************************************************************
0002  *                                                                         *
0003  *   copyright : (C) 2007 The University of Toronto                        *
0004  *                   netterfield@astro.utoronto.ca                         *
0005  *                                                                         *
0006  *   This program is free software; you can redistribute it and/or modify  *
0007  *   it under the terms of the GNU General Public License as published by  *
0008  *   the Free Software Foundation; either version 2 of the License, or     *
0009  *   (at your option) any later version.                                   *
0010  *                                                                         *
0011  ***************************************************************************/
0012 
0013 #ifndef MARKERSTAB_H
0014 #define MARKERSTAB_H
0015 
0016 #include "dialogtab.h"
0017 #include "plotitem.h"
0018 #include "ui_markerstab.h"
0019 
0020 #include "kst_export.h"
0021 
0022 namespace Kst {
0023 
0024 class MarkersTab : public DialogTab, Ui::MarkersTab {
0025   Q_OBJECT
0026   public:
0027     explicit MarkersTab(QWidget *parent = 0);
0028     virtual ~MarkersTab();
0029 
0030     void setObjectStore(ObjectStore *store);
0031 
0032     QList<double> markers() const;
0033     void setMarkers(const QList<double> &markers);
0034 
0035     Qt::PenStyle lineStyle() const;
0036     void setLineStyle(Qt::PenStyle style);
0037 
0038     QColor lineColor() const;
0039     void setLineColor(const QColor &color);
0040 
0041     double lineWidth() const;
0042     void setLineWidth(const double width);
0043 
0044     bool isCurveSource() const;
0045     void setCurveSource(const bool enabled);
0046 
0047     bool isVectorSource() const;
0048     void setVectorSource(const bool enabled);
0049 
0050     VectorPtr vector() const;
0051     void setVector(VectorPtr vector);
0052     void setVector(const QString &vector);
0053 
0054     CurvePtr curve() const;
0055     void setCurve(CurvePtr curve);
0056 
0057     PlotMarkers::CurveMarkerMode curveMarkerMode() const;
0058     void setCurveMarkerMode(const PlotMarkers::CurveMarkerMode mode);
0059 
0060     PlotMarkers plotMarkers() const;
0061     void setPlotMarkers(const PlotMarkers &plotMarkers);
0062 
0063     bool markersDirty() const { return _dirty; }
0064     void enableSingleEditOptions(bool enabled);
0065     void clearTabValues();
0066 
0067   public Q_SLOTS:
0068     void add();
0069     void remove();
0070     void clear();
0071     void update();
0072     void setDirty() { _dirty = true; }
0073 
0074   private:
0075     PlotMarkers _plotMarkers;
0076     bool _dirty;
0077 };
0078 
0079 }
0080 
0081 #endif
0082 
0083 // vim: ts=2 sw=2 et