Debian Codegraph @

chart2/source/controller/dialogs/tp_ChartType.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
20 #pragma once
21
22 #include <vector>
23
24 #include <ChartTypeDialogController.hxx>
25 #include <ChartTypeTemplateProvider.hxx>
26 #include <TimerTriggeredControllerLock.hxx>
27
28 #include <vcl/wizardmachine.hxx>
29
30 namespace weld { class CustomWeld; }
31
32 class ValueSet;
33
34 namespace chart
35 {
36
37 class Dim3DLookResourceGroup;
38 class StackingResourceGroup;
39 class SplineResourceGroup;
40 class GeometryResourceGroup;
41 class SortByXValuesResourceGroup;
42
43 class ChartTypeTabPage final : public ResourceChangeListener, public vcl::OWizardPage, public ChartTypeTemplateProvider
44 {
45 public:
46 ChartTypeTabPage( weld::Container* pPage, weld::DialogController* pController
47 , rtl::Reference<::chart::ChartModel> xChartModel
48 , bool bShowDescription = true );
49 virtual ~ChartTypeTabPage() override;
50
51 virtual void initializePage() override;
52 virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason eReason ) override;
53
54 virtual rtl::Reference< ::chart::ChartTypeTemplate > getCurrentTemplate() const override;
55
56 private:
57 ChartTypeDialogController* getSelectedMainType();
58 void showAllControls( ChartTypeDialogController& rTypeController );
59 void fillAllControls( const ChartTypeParameter& rParameter, bool bAlsoResetSubTypeList=true );
60 ChartTypeParameter getCurrentParamter() const;
61
62 virtual void stateChanged() override;
63
64 void commitToModel( const ChartTypeParameter& rParameter );
65 void selectMainType();
66
67 DECL_LINK(SelectMainTypeHdl, weld::TreeView&, void);
68 DECL_LINK(SelectSubTypeHdl, ValueSet*, void );
69
70 std::unique_ptr<Dim3DLookResourceGroup> m_pDim3DLookResourceGroup;
71 std::unique_ptr<StackingResourceGroup> m_pStackingResourceGroup;
72 std::unique_ptr<SplineResourceGroup> m_pSplineResourceGroup;
73 std::unique_ptr<GeometryResourceGroup> m_pGeometryResourceGroup;
74 std::unique_ptr<SortByXValuesResourceGroup> m_pSortByXValuesResourceGroup;
75
76 rtl::Reference<::chart::ChartModel> m_xChartModel;
77
78 std::vector< std::unique_ptr<ChartTypeDialogController> > m_aChartTypeDialogControllerList;
79 ChartTypeDialogController* m_pCurrentMainType;
80
81 sal_Int32 m_nChangingCalls;
82
83 TimerTriggeredControllerLock m_aTimerTriggeredControllerLock;
84
85 std::unique_ptr<weld::Label> m_xFT_ChooseType;
86 std::unique_ptr<weld::TreeView> m_xMainTypeList;
87 std::unique_ptr<ValueSet> m_xSubTypeList;
88 std::unique_ptr<weld::CustomWeld> m_xSubTypeListWin;
89 };
90
91 } //namespace chart
92
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */