"Fossies" - the Fresh Open Source Software Archive

Member "labplot-2.8.2/src/kdefrontend/dockwidgets/HistogramDock.h" (24 Feb 2021, 7452 Bytes) of package /linux/privat/labplot-2.8.2.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "HistogramDock.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 2.8.1_vs_2.8.2.

    1 /***************************************************************************
    2     File                 : HistogramDock.h
    3     Project              : LabPlot
    4     Description          : widget for histogram plot properties
    5     --------------------------------------------------------------------
    6     Copyright            : (C) 2016 Anu Mittal (anu22mittal@gmail.com)
    7 
    8  ***************************************************************************/
    9 
   10 /***************************************************************************
   11  *                                                                         *
   12  *  This program is free software; you can redistribute it and/or modify   *
   13  *  it under the terms of the GNU General Public License as published by   *
   14  *  the Free Software Foundation; either version 2 of the License, or      *
   15  *  (at your option) any later version.                                    *
   16  *                                                                         *
   17  *  This program is distributed in the hope that it will be useful,        *
   18  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
   19  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
   20  *  GNU General Public License for more details.                           *
   21  *                                                                         *
   22  *   You should have received a copy of the GNU General Public License     *
   23  *   along with this program; if not, write to the Free Software           *
   24  *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
   25  *   Boston, MA  02110-1301  USA                                           *
   26  *                                                                         *
   27  ***************************************************************************/
   28 
   29 #ifndef HISTOGRAMDOCK_H
   30 #define HISTOGRAMDOCK_H
   31 
   32 #include "backend/worksheet/plots/cartesian/Histogram.h"
   33 #include "kdefrontend/dockwidgets/BaseDock.h"
   34 #include "ui_histogramdock.h"
   35 
   36 class Histogram;
   37 class TreeViewComboBox;
   38 class AspectTreeModel;
   39 class Column;
   40 
   41 class HistogramDock : public BaseDock {
   42     Q_OBJECT
   43 
   44 public:
   45     explicit HistogramDock(QWidget*);
   46     ~HistogramDock() override;
   47 
   48     void setCurves(QList<Histogram*>);
   49 
   50 private:
   51     QStringList dateStrings;
   52     QStringList timeStrings;
   53 
   54     TreeViewComboBox* cbDataColumn;
   55     TreeViewComboBox* cbValuesColumn;
   56 
   57     void updateValuesWidgets();
   58     void loadConfig(KConfig&);
   59 
   60 protected:
   61     Ui::HistogramDock ui;
   62     QList<Histogram*> m_curvesList;
   63     Histogram* m_curve{nullptr};
   64     AspectTreeModel* m_aspectTreeModel{nullptr};
   65 
   66     virtual void setModel();
   67     void setModelIndexFromColumn(TreeViewComboBox*, const AbstractColumn*);
   68 
   69 private slots:
   70     void init();
   71     void retranslateUi();
   72 
   73     //SLOTs for changes triggered in HistogramDock
   74 
   75     //General-Tab
   76     void dataColumnChanged(const QModelIndex&);
   77     void visibilityChanged(bool);
   78     void typeChanged(int);
   79     void orientationChanged(int);
   80     void binningMethodChanged(int);
   81     void binCountChanged(int);
   82     void binWidthChanged();
   83     void autoBinRangesChanged(int);
   84     void binRangesMinChanged(const QString&);
   85     void binRangesMaxChanged(const QString&);
   86     void binRangesMinDateTimeChanged(const QDateTime&);
   87     void binRangesMaxDateTimeChanged(const QDateTime&);
   88 
   89     //Lines-Tab
   90     void lineTypeChanged(int);
   91     void lineStyleChanged(int);
   92     void lineColorChanged(const QColor&);
   93     void lineWidthChanged(double);
   94     void lineOpacityChanged(int);
   95 
   96     //Symbol-tab
   97     void symbolsStyleChanged(int);
   98     void symbolsSizeChanged(double);
   99     void symbolsRotationChanged(int);
  100     void symbolsOpacityChanged(int);
  101     void symbolsFillingStyleChanged(int);
  102     void symbolsFillingColorChanged(const QColor&);
  103     void symbolsBorderStyleChanged(int);
  104     void symbolsBorderColorChanged(const QColor&);
  105     void symbolsBorderWidthChanged(double);
  106 
  107     //Values-Tab
  108     void valuesTypeChanged(int);
  109     void valuesColumnChanged(const QModelIndex&);
  110     void valuesPositionChanged(int);
  111     void valuesDistanceChanged(double);
  112     void valuesRotationChanged(int);
  113     void valuesOpacityChanged(int);
  114     void valuesNumericFormatChanged(int);
  115     void valuesPrecisionChanged(int);
  116     void valuesDateTimeFormatChanged(const QString&);
  117     void valuesPrefixChanged();
  118     void valuesSuffixChanged();
  119     void valuesFontChanged(const QFont&);
  120     void valuesColorChanged(const QColor&);
  121 
  122     //Filling-tab
  123     void fillingEnabledChanged(int);
  124     void fillingTypeChanged(int);
  125     void fillingColorStyleChanged(int);
  126     void fillingImageStyleChanged(int);
  127     void fillingBrushStyleChanged(int);
  128     void fillingFirstColorChanged(const QColor&);
  129     void fillingSecondColorChanged(const QColor&);
  130     void selectFile();
  131     void fileNameChanged();
  132     void fillingOpacityChanged(int);
  133 
  134     //"Error bars"-Tab
  135     void errorTypeChanged(int) const;
  136     void errorBarsTypeChanged(int) const;
  137     void errorBarsCapSizeChanged(double) const;
  138     void errorBarsStyleChanged(int) const;
  139     void errorBarsColorChanged(const QColor&);
  140     void errorBarsWidthChanged(double) const;
  141     void errorBarsOpacityChanged(int) const;
  142 
  143     //SLOTs for changes triggered in Histogram
  144     //General-Tab
  145     void curveDescriptionChanged(const AbstractAspect*);
  146     void curveDataColumnChanged(const AbstractColumn*);
  147     void curveTypeChanged(Histogram::HistogramType);
  148     void curveOrientationChanged(Histogram::HistogramOrientation);
  149     void curveBinningMethodChanged(Histogram::BinningMethod);
  150     void curveBinCountChanged(int);
  151     void curveBinWidthChanged(double);
  152     void curveAutoBinRangesChanged(bool);
  153     void curveBinRangesMinChanged(double);
  154     void curveBinRangesMaxChanged(double);
  155     void curveVisibilityChanged(bool);
  156 
  157     //Line-tab
  158     void curveLineTypeChanged(Histogram::LineType);
  159     void curveLinePenChanged(const QPen&);
  160     void curveLineOpacityChanged(qreal);
  161 
  162     //Symbol-Tab
  163     void curveSymbolsStyleChanged(Symbol::Style);
  164     void curveSymbolsSizeChanged(qreal);
  165     void curveSymbolsRotationAngleChanged(qreal);
  166     void curveSymbolsOpacityChanged(qreal);
  167     void curveSymbolsBrushChanged(const QBrush&);
  168     void curveSymbolsPenChanged(const QPen&);
  169 
  170     //Values-Tab
  171     void curveValuesTypeChanged(Histogram::ValuesType);
  172     void curveValuesColumnChanged(const AbstractColumn*);
  173     void curveValuesPositionChanged(Histogram::ValuesPosition);
  174     void curveValuesDistanceChanged(qreal);
  175     void curveValuesOpacityChanged(qreal);
  176     void curveValuesRotationAngleChanged(qreal);
  177     void curveValuesNumericFormatChanged(char);
  178     void curveValuesPrecisionChanged(int);
  179     void curveValuesDateTimeFormatChanged(const QString&);
  180     void curveValuesPrefixChanged(const QString&);
  181     void curveValuesSuffixChanged(const QString&);
  182     void curveValuesFontChanged(QFont);
  183     void curveValuesColorChanged(QColor);
  184 
  185     //Filling-Tab
  186     void curveFillingEnabledChanged(bool);
  187     void curveFillingTypeChanged(PlotArea::BackgroundType);
  188     void curveFillingColorStyleChanged(PlotArea::BackgroundColorStyle);
  189     void curveFillingImageStyleChanged(PlotArea::BackgroundImageStyle);
  190     void curveFillingBrushStyleChanged(Qt::BrushStyle);
  191     void curveFillingFirstColorChanged(QColor&);
  192     void curveFillingSecondColorChanged(QColor&);
  193     void curveFillingFileNameChanged(QString&);
  194     void curveFillingOpacityChanged(double);
  195 
  196     //"Error bars"-Tab
  197     void curveErrorTypeChanged(Histogram::ErrorType);
  198     void curveErrorBarsTypeChanged(XYCurve::ErrorBarsType);
  199     void curveErrorBarsPenChanged(const QPen&);
  200     void curveErrorBarsCapSizeChanged(qreal);
  201     void curveErrorBarsOpacityChanged(qreal);
  202 
  203     //load and save
  204     void loadConfigFromTemplate(KConfig&);
  205     void saveConfigAsTemplate(KConfig&);
  206 
  207 signals:
  208     void info(const QString&);
  209 };
  210 
  211 #endif