File indexing completed on 2025-07-13 03:32:43
0001 /* 0002 File : CursorDock.cpp 0003 Project : LabPlot 0004 Description : This dock represents the data from the cursors in the cartesian plots 0005 -------------------------------------------------------------------- 0006 SPDX-FileCopyrightText: 2019 Martin Marmsoler <martin.marmsoler@gmail.com> 0007 SPDX-FileCopyrightText: 2019-2020 Alexander Semke <alexander.semke@web.de> 0008 SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 0011 #ifndef CURSORDOCK_H 0012 #define CURSORDOCK_H 0013 0014 #include <QWidget> 0015 0016 namespace Ui { 0017 class CursorDock; 0018 } 0019 class Worksheet; 0020 class CartesianPlot; 0021 0022 /*! 0023 * \brief The CursorDock class 0024 * This class represents the data from the cursors from the cartesian plots in a treeview 0025 */ 0026 class CursorDock : public QWidget { 0027 Q_OBJECT 0028 0029 public: 0030 explicit CursorDock(QWidget* parent = nullptr); 0031 ~CursorDock(); 0032 void setWorksheet(Worksheet*); 0033 0034 Q_SIGNALS: 0035 void cursorUsed(); 0036 0037 public Q_SLOTS: 0038 void plotCursor0EnableChanged(bool); 0039 void plotCursor1EnableChanged(bool); 0040 0041 private: 0042 void collapseAll(); 0043 void expandAll(); 0044 void cursor0EnableChanged(bool); 0045 void cursor1EnableChanged(bool); 0046 bool eventFilter(QObject*, QEvent*) override; 0047 0048 Ui::CursorDock* ui; 0049 bool m_initializing{false}; 0050 QVector<CartesianPlot*> m_plotList; 0051 CartesianPlot* m_plot{nullptr}; 0052 QList<QMetaObject::Connection> selectedPlotsConnection; 0053 0054 private Q_SLOTS: 0055 void contextMenuRequested(QPoint); 0056 void resultCopy(); 0057 void resultCopyAll(); 0058 }; 0059 0060 #endif // CURSORDOCK_H