Debian Codegraph @

chart2/source/controller/dialogs/tp_3D_SceneGeometry.hxx

raw
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19 #pragma once
20
21 #include <vcl/timer.hxx>
22 #include <vcl/weld.hxx>
23 #include <rtl/ref.hxx>
24
25 namespace chart { class ControllerLockHelper; }
26
27 namespace chart
28 {
29 class Diagram;
30
31 class ThreeD_SceneGeometry_TabPage
32 {
33 public:
34 ThreeD_SceneGeometry_TabPage(weld::Container* pWindow,
35 rtl::Reference< ::chart::Diagram > xDiagram,
36 ControllerLockHelper & rControllerLockHelper);
37 ~ThreeD_SceneGeometry_TabPage();
38
39 // has to be called in case the dialog was closed with OK
40 void commitPendingChanges();
41
42 // is called by timer to apply changes to model
43 DECL_LINK( AngleChanged, Timer *, void);
44 // is called immediately when a field changes
45 DECL_LINK( AngleEdited, weld::MetricSpinButton&, void );
46
47 // is called by timer to apply changes to model
48 DECL_LINK( PerspectiveChanged, Timer *, void);
49 // is called immediately when a field changes
50 DECL_LINK( PerspectiveEdited, weld::MetricSpinButton&, void );
51 DECL_LINK( PerspectiveToggled, weld::Toggleable&, void );
52 DECL_LINK( RightAngledAxesToggled, weld::Toggleable&, void );
53
54 private:
55 void applyAnglesToModel();
56 void applyPerspectiveToModel();
57
58 rtl::Reference< ::chart::Diagram > m_xDiagram;
59
60 Timer m_aAngleTimer;
61 Timer m_aPerspectiveTimer;
62
63 //to keep old values when switching to right angled axes
64 sal_Int64 m_nXRotation;
65 sal_Int64 m_nYRotation;
66 sal_Int64 m_nZRotation;
67
68 bool m_bAngleChangePending;
69 bool m_bPerspectiveChangePending;
70
71 ControllerLockHelper & m_rControllerLockHelper;
72
73 std::unique_ptr<weld::Builder> m_xBuilder;
74 std::unique_ptr<weld::Container> m_xContainer;
75 std::unique_ptr<weld::CheckButton> m_xCbxRightAngledAxes;
76 std::unique_ptr<weld::MetricSpinButton> m_xMFXRotation;
77 std::unique_ptr<weld::MetricSpinButton> m_xMFYRotation;
78 std::unique_ptr<weld::Label> m_xFtZRotation;
79 std::unique_ptr<weld::MetricSpinButton> m_xMFZRotation;
80 std::unique_ptr<weld::CheckButton> m_xCbxPerspective;
81 std::unique_ptr<weld::MetricSpinButton> m_xMFPerspective;
82 };
83
84 } //namespace chart
85
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */