File indexing completed on 2024-05-12 15:27:35
0001 /*************************************************************************** 0002 File : WorksheetPrivate.h 0003 Project : LabPlot 0004 Description : Private members of Worksheet. 0005 -------------------------------------------------------------------- 0006 Copyright : (C) 2012 by Alexander Semke (alexander.semke@web.de) 0007 0008 ***************************************************************************/ 0009 0010 /*************************************************************************** 0011 * * 0012 * This program is free software; you can redistribute it and/or modify * 0013 * it under the terms of the GNU General Public License as published by * 0014 * the Free Software Foundation; either version 2 of the License, or * 0015 * (at your option) any later version. * 0016 * * 0017 * This program is distributed in the hope that it will be useful, * 0018 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0019 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0020 * GNU General Public License for more details. * 0021 * * 0022 * You should have received a copy of the GNU General Public License * 0023 * along with this program; if not, write to the Free Software * 0024 * Foundation, Inc., 51 Franklin Street, Fifth Floor, * 0025 * Boston, MA 02110-1301 USA * 0026 * * 0027 ***************************************************************************/ 0028 0029 #ifndef WORKSHEETPRIVATE_H 0030 #define WORKSHEETPRIVATE_H 0031 0032 #include <backend/worksheet/Worksheet.h> 0033 0034 #include <QColor> 0035 0036 class QBrush; 0037 class Worksheet; 0038 class WorksheetElementContainer; 0039 class QGraphicsScene; 0040 class TreeModel; 0041 0042 class WorksheetPrivate { 0043 public: 0044 explicit WorksheetPrivate(Worksheet*); 0045 virtual ~WorksheetPrivate(); 0046 0047 Worksheet* const q; 0048 QRectF pageRect; 0049 QGraphicsScene* m_scene; 0050 bool useViewSize{false}; 0051 bool scaleContent{false}; 0052 0053 QString name() const; 0054 void update(); 0055 void updateLayout(bool undoable = true); 0056 void setContainerRect(WorksheetElementContainer*, float x, float y, float h, float w, bool undoable); 0057 void updatePageRect(); 0058 0059 PlotArea::BackgroundType backgroundType; 0060 PlotArea::BackgroundColorStyle backgroundColorStyle; 0061 PlotArea::BackgroundImageStyle backgroundImageStyle; 0062 Qt::BrushStyle backgroundBrushStyle; 0063 QColor backgroundFirstColor; 0064 QColor backgroundSecondColor; 0065 QString backgroundFileName; 0066 float backgroundOpacity{1.0}; 0067 0068 Worksheet::Layout layout{Worksheet::Layout::VerticalLayout}; 0069 bool suppressLayoutUpdate{false}; 0070 bool suppressCursorPosChanged{false}; 0071 float layoutTopMargin{0.0}; 0072 float layoutBottomMargin{0.0}; 0073 float layoutLeftMargin{0.0}; 0074 float layoutRightMargin{0.0}; 0075 float layoutVerticalSpacing{0.0}; 0076 float layoutHorizontalSpacing{0.0}; 0077 int layoutColumnCount{2}; 0078 int layoutRowCount{2}; 0079 QString theme; 0080 bool plotsLocked{false}; 0081 bool updateCompleteCursorModel{true}; 0082 Worksheet::CartesianPlotActionMode cartesianPlotActionMode{Worksheet::CartesianPlotActionMode::ApplyActionToSelection}; 0083 Worksheet::CartesianPlotActionMode cartesianPlotCursorMode{Worksheet::CartesianPlotActionMode::ApplyActionToAll}; 0084 0085 enum class TreeModelColumn { 0086 PLOTNAME = 0, 0087 SIGNALNAME = 0, 0088 CURSOR0, 0089 CURSOR1, 0090 CURSORDIFF 0091 }; 0092 0093 TreeModel* cursorData{nullptr}; 0094 }; 0095 0096 #endif