File indexing completed on 2024-12-22 04:17:44

0001 /***************************************************************************
0002  *                                                                         *
0003  *   copyright : (C) 2008  Barth Netterfield                               *
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 RANGETAB_H
0014 #define RANGETAB_H
0015 
0016 #include "dialogtab.h"
0017 #include "plotitem.h"
0018 #include "plotaxis.h"
0019 #include "ui_rangetab.h"
0020 
0021 #include "kst_export.h"
0022 
0023 namespace Kst {
0024 
0025 class RangeTab : public DialogTab, Ui::RangeTab {
0026   Q_OBJECT
0027   public:
0028     explicit RangeTab(PlotItem* plotItem, QWidget *parent = 0);
0029     virtual ~RangeTab();
0030 
0031     void setupRange();
0032 
0033     bool xAuto() {return _xAuto->isChecked();}
0034     bool xSpike() {return _xSpike->isChecked();}
0035     bool xBorder() {return _xBorder->isChecked();}
0036     bool xMean() {return _xMean->isChecked();}
0037     bool xFixed() { return _xFixed->isChecked();}
0038     bool xModeDirty() const;
0039 
0040     double xRange() {return _xRange->text().toDouble();}
0041     bool xRangeDirty() const;
0042 
0043     double xMin() {return _xMin->text().toDouble();}
0044     bool xMinDirty() const;
0045 
0046     double xMax() {return _xMax->text().toDouble();}
0047     bool xMaxDirty() const;
0048 
0049     bool yAuto() {return _yAuto->isChecked();}
0050     bool ySpike() {return _ySpike->isChecked();}
0051     bool yBorder() {return _yBorder->isChecked();}   
0052     bool yMean() {return _yMean->isChecked();}
0053     bool yFixed() { return _yFixed->isChecked();}
0054     bool yModeDirty() const;
0055 
0056     double yRange() {return _yRange->text().toDouble();}
0057     bool yRangeDirty() const;
0058 
0059     double yMin() {return _yMin->text().toDouble();}
0060     bool yMinDirty() const;
0061 
0062     double yMax() {return _yMax->text().toDouble();}
0063     bool yMaxDirty() const;
0064 
0065     void clearTabValues();
0066 
0067   private:
0068     PlotItem *_plotItem;
0069 
0070   private Q_SLOTS:
0071     void modified();
0072     void updateButtons();
0073 
0074   Q_SIGNALS:
0075     void tabModified();
0076 };
0077 
0078 }
0079 
0080 
0081 #endif
0082 
0083 // vim: ts=2 sw=2 et