File indexing completed on 2025-01-05 03:35:30

0001 /*
0002     File                 : InfoElement.cpp
0003     Project              : LabPlot
0004     Description          : Dock widget for InfoElemnt
0005     --------------------------------------------------------------------
0006     SPDX-FileCopyrightText: 2020 Martin Marmsoler <martin.marmsoler@gmail.com>
0007     SPDX-FileCopyrightText: 2020-2022 Alexander Semke <alexander.semke@web.de>
0008     SPDX-License-Identifier: GPL-2.0-or-later
0009 */
0010 
0011 #ifndef INFOELEMENTDOCK_H
0012 #define INFOELEMENTDOCK_H
0013 
0014 #include "kdefrontend/dockwidgets/BaseDock.h"
0015 
0016 class InfoElement;
0017 class LineWidget;
0018 class LabelWidget;
0019 
0020 namespace Ui {
0021 class InfoElementDock;
0022 }
0023 
0024 class InfoElementDock : public BaseDock {
0025     Q_OBJECT
0026 
0027 public:
0028     explicit InfoElementDock(QWidget* parent = nullptr);
0029     ~InfoElementDock();
0030     void setInfoElements(QList<InfoElement*>);
0031 
0032 public Q_SLOTS:
0033     void elementCurveRemoved(const QString&);
0034 
0035 private Q_SLOTS:
0036     void gluePointChanged(int index);
0037     void curveChanged();
0038     void positionChanged(double);
0039     void positionDateTimeChanged(qint64);
0040     void curveSelectionChanged(bool);
0041 
0042     // slots triggered in the InfoElement
0043     void elementPositionChanged(double pos);
0044     void elementGluePointIndexChanged(const int);
0045     void elementConnectionLineCurveChanged(const QString&);
0046     void elementLabelBorderShapeChanged();
0047 
0048 private:
0049     Ui::InfoElementDock* ui;
0050     InfoElement* m_element{nullptr};
0051     QList<InfoElement*> m_elements;
0052     bool m_sameParent{false};
0053     LabelWidget* m_labelWidget{nullptr};
0054     LineWidget* m_verticalLineWidget{nullptr};
0055     LineWidget* m_connectionLineWidget{nullptr};
0056 };
0057 
0058 #endif // INFOELEMENTDOCK_H