"Fossies" - the Fresh Open Source Software Archive

Member "labplot-2.8.2/src/kdefrontend/dockwidgets/CustomPointDock.h" (24 Feb 2021, 3598 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 "CustomPointDock.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                 : CustomPointDock.h
    3     Project              : LabPlot
    4     Description          : Dock widget for the custom point on the plot
    5     --------------------------------------------------------------------
    6     Copyright            : (C) 2015-2020 Alexander Semke (alexander.semke@web.de)
    7  ***************************************************************************/
    8 
    9 /***************************************************************************
   10  *                                                                         *
   11  *  This program is free software; you can redistribute it and/or modify   *
   12  *  it under the terms of the GNU General Public License as published by   *
   13  *  the Free Software Foundation; either version 2 of the License, or      *
   14  *  (at your option) any later version.                                    *
   15  *                                                                         *
   16  *  This program is distributed in the hope that it will be useful,        *
   17  *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
   18  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
   19  *  GNU General Public License for more details.                           *
   20  *                                                                         *
   21  *   You should have received a copy of the GNU General Public License     *
   22  *   along with this program; if not, write to the Free Software           *
   23  *   Foundation, Inc., 51 Franklin Street, Fifth Floor,                    *
   24  *   Boston, MA  02110-1301  USA                                           *
   25  *                                                                         *
   26  ***************************************************************************/
   27 
   28 #ifndef CUSTOMPOINTDOCK_H
   29 #define CUSTOMPOINTDOCK_H
   30 
   31 #include "backend/worksheet/plots/cartesian/Symbol.h"
   32 #include "kdefrontend/dockwidgets/BaseDock.h"
   33 #include "ui_custompointdock.h"
   34 
   35 class AbstractAspect;
   36 class CustomPoint;
   37 class KConfig;
   38 
   39 class CustomPointDock : public BaseDock {
   40     Q_OBJECT
   41 
   42 public:
   43     explicit CustomPointDock(QWidget *);
   44     void setPoints(QList<CustomPoint*>);
   45     void updateLocale() override;
   46 
   47 private:
   48     Ui::CustomPointDock ui;
   49     QList<CustomPoint*> m_pointsList;
   50     CustomPoint* m_point{nullptr};
   51 
   52     void load();
   53     void loadConfig(KConfig&);
   54 
   55 private slots:
   56     void init();
   57 
   58     //SLOTs for changes triggered in CustomPointDock
   59     //General-Tab
   60     void positionXChanged();
   61     void positionXDateTimeChanged(const QDateTime&);
   62     void positionYChanged();
   63     void visibilityChanged(bool);
   64 
   65     //Symbol-tab
   66     void symbolStyleChanged(int);
   67     void symbolSizeChanged(double);
   68     void symbolRotationChanged(int);
   69     void symbolOpacityChanged(int);
   70     void symbolFillingStyleChanged(int);
   71     void symbolFillingColorChanged(const QColor&);
   72     void symbolBorderStyleChanged(int);
   73     void symbolBorderColorChanged(const QColor&);
   74     void symbolBorderWidthChanged(double);
   75 
   76     //SLOTs for changes triggered in CustomPoint
   77     //General-Tab
   78     void pointDescriptionChanged(const AbstractAspect*);
   79     void pointPositionChanged(QPointF);
   80     void pointVisibilityChanged(bool);
   81 
   82     //Symbol-Tab
   83     void pointSymbolStyleChanged(Symbol::Style);
   84     void pointSymbolSizeChanged(qreal);
   85     void pointSymbolRotationAngleChanged(qreal);
   86     void pointSymbolOpacityChanged(qreal);
   87     void pointSymbolBrushChanged(const QBrush&);
   88     void pointSymbolPenChanged(const QPen&);
   89 
   90     //load and save
   91     void loadConfigFromTemplate(KConfig&);
   92     void saveConfigAsTemplate(KConfig&);
   93 
   94 signals:
   95     void info(const QString&);
   96 };
   97 
   98 #endif