File indexing completed on 2025-07-13 04:10:14
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 CURVEPLACEMENT_H 0014 #define CURVEPLACEMENT_H 0015 0016 #include <QWidget> 0017 #include "ui_curveplacement.h" 0018 0019 #include "kstwidgets_export.h" 0020 0021 namespace Kst { 0022 0023 class PlotItemInterface; 0024 0025 class KSTWIDGETS_EXPORT CurvePlacement : public QWidget, public Ui::CurvePlacement { 0026 Q_OBJECT 0027 public: 0028 enum Place { NewPlot, ExistingPlot, NoPlot, NewPlotNewTab }; 0029 enum Layout { Auto, Custom, Protect }; 0030 explicit CurvePlacement(QWidget *parent = 0); 0031 virtual ~CurvePlacement(); 0032 0033 Place place() const; 0034 void setPlace(Place place); 0035 0036 bool scaleFonts() const; 0037 0038 PlotItemInterface *existingPlot() const; 0039 void setExistingPlots(const QList<PlotItemInterface*> &existingPlots); 0040 void setCurrentPlot(const PlotItemInterface *currentPlot); 0041 void updatePlotListCombo(); 0042 0043 Layout layout() const; 0044 void setLayout(Layout layout); 0045 0046 int gridColumns() const; 0047 void setGridColumns(int gridColumns); 0048 0049 virtual bool event(QEvent * event); 0050 public Q_SLOTS: 0051 void updateButtons(); 0052 private: 0053 QList<PlotItemInterface*> _plots; 0054 }; 0055 0056 } 0057 0058 #endif 0059 0060 // vim: ts=2 sw=2 et