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

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 AXISTAB_H
0014 #define AXISTAB_H
0015 
0016 #include "dialogtab.h"
0017 #include "plotitem.h"
0018 #include "plotaxis.h"
0019 #include "plotdefines.h"
0020 #include "ui_axistab.h"
0021 
0022 #include "kst_export.h"
0023 
0024 namespace Kst {
0025 
0026 class AxisTab : public DialogTab, Ui::AxisTab {
0027   Q_OBJECT
0028   public:
0029     explicit AxisTab(QWidget *parent = 0);
0030     virtual ~AxisTab();
0031 
0032     bool drawAxisMajorTicks() const;
0033     bool drawAxisMajorTicksDirty() const;
0034     void setDrawAxisMajorTicks(const bool enabled);
0035 
0036     bool drawAxisMajorGridLines() const;
0037     bool drawAxisMajorGridLinesDirty() const;
0038     void setDrawAxisMajorGridLines(const bool enabled);
0039 
0040     bool drawAxisMinorTicks() const;
0041     bool drawAxisMinorTicksDirty() const;
0042     void setDrawAxisMinorTicks(const bool enabled);
0043 
0044     bool drawAxisMinorGridLines() const;
0045     bool drawAxisMinorGridLinesDirty() const;
0046     void setDrawAxisMinorGridLines(const bool enabled);
0047 
0048     MajorTickMode axisMajorTickSpacing() const;
0049     bool axisMajorTickSpacingDirty() const;
0050     void setAxisMajorTickSpacing(MajorTickMode spacing);
0051 
0052     Qt::PenStyle axisMajorGridLineStyle() const;
0053     bool axisMajorGridLineStyleDirty() const;
0054     void setAxisMajorGridLineStyle(Qt::PenStyle style);
0055 
0056     QColor axisMajorGridLineColor() const;
0057     bool axisMajorGridLineColorDirty() const;
0058     void setAxisMajorGridLineColor(const QColor &color);
0059 
0060     qreal axisMajorGridLineWidth() const;
0061     bool axisMajorGridLineWidthDirty() const;
0062     void setAxisMajorGridLineWidth(qreal width);
0063 
0064     Qt::PenStyle axisMinorGridLineStyle() const;
0065     bool axisMinorGridLineStyleDirty() const;
0066     void setAxisMinorGridLineStyle(Qt::PenStyle style);
0067 
0068     QColor axisMinorGridLineColor() const;
0069     bool axisMinorGridLineColorDirty() const;
0070     void setAxisMinorGridLineColor(const QColor &color);
0071 
0072     qreal axisMinorGridLineWidth() const;
0073     bool axisMinorGridLineWidthDirty() const;
0074     void setAxisMinorGridLineWidth(qreal width);
0075 
0076     bool isAutoMinorTickCount() const;
0077     bool isAutoMinorTickCountDirty() const;
0078     void setAutoMinorTickCount(const bool enabled);
0079 
0080     int axisMinorTickCount() const;
0081     bool axisMinorTickCountDirty() const;
0082     void setAxisMinorTickCount(const int count);
0083 
0084     int significantDigits() const;
0085     bool significantDigitsDirty() const;
0086     void setSignificantDigits(const int digits);
0087 
0088     bool isLog() const;
0089     bool isLogDirty() const;
0090     void setLog(const bool enabled);
0091 
0092     bool isAutoBaseOffset() const;
0093     bool isAutoBaseOffsetDirty() const;
0094 
0095     bool isBaseOffset() const;
0096     bool isBaseOffsetDirty() const;
0097 
0098     bool isForceOffsetMin() const;
0099     bool isForceOffsetMinDirty() const;
0100     void setForceOffsetMin(bool enabled);
0101 
0102     void setBaseOffsetMode(bool auto_on, bool on);
0103 
0104     bool isReversed() const;
0105     bool isReversedDirty() const;
0106     void setReversed(const bool enabled);
0107 
0108     bool isInterpret() const;
0109     bool isInterpretDirty() const;
0110     void setInterpret(const bool enabled);
0111 
0112     AxisDisplayType axisDisplay() const;
0113     bool axisDisplayDirty() const;
0114     void setAxisDisplay(AxisDisplayType display);
0115 
0116     QString axisDisplayFormatString() const;
0117     bool axisDisplayFormatStringDirty() const;
0118     void setAxisDisplayFormatString(const QString& formatString);
0119 
0120     QString timezone() const;
0121     bool timezoneDirty() const;
0122     void setTimezone(QString timezone);
0123 
0124     AxisInterpretationType axisInterpretation() const;
0125     bool axisInterpretationDirty() const;
0126     void setAxisInterpretation(AxisInterpretationType interpretation);
0127 
0128     int labelRotation() const;
0129     bool labelRotationDirty() const;
0130     void setLabelRotation(const int rotation);
0131 
0132     bool hideTopRight() const;
0133     bool hideTopRightDirty() const;
0134     void setHideTopRight( bool hide);
0135 
0136     bool hideBottomLeft() const;
0137     bool hideBottomLeftDirty() const;
0138     void setHideBottomLeft( bool hide);
0139 
0140     void enableSingleEditOptions(bool enabled);
0141     void clearTabValues();
0142 
0143     void setAsYAxis();
0144 
0145   public Q_SLOTS:
0146     void updateButtons();
0147     void updateFormatString();
0148     void offsetAutoPressed();
0149     void offsetOnPressed();
0150     void offsetOffPressed();
0151 
0152 };
0153 
0154 }
0155 
0156 #endif
0157 
0158 // vim: ts=2 sw=2 et