Version 6.1.4.1, tag libreoffice-6.1.4.1
[LibreOffice.git] / chart2 / source / controller / inc / dlg_DataSource.hxx
blob1e5c4fee95fbad833a6f1e2a0e994d11d5a8ea46
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATASOURCE_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATASOURCE_HXX
22 #include <vcl/tabdlg.hxx>
23 #include <vcl/tabctrl.hxx>
24 #include <vcl/button.hxx>
26 #include "TabPageNotifiable.hxx"
27 #include <com/sun/star/uno/XComponentContext.hpp>
28 #include <com/sun/star/chart2/XChartDocument.hpp>
30 #include <memory>
32 namespace chart
35 class DataSourceTabControl;
36 class RangeChooserTabPage;
37 class DataSourceTabPage;
38 class ChartTypeTemplateProvider;
39 class DialogModel;
41 class DataSourceDialog final :
42 public TabDialog,
43 public TabPageNotifiable
45 public:
46 explicit DataSourceDialog(
47 vcl::Window * pParent,
48 const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument,
49 const css::uno::Reference< css::uno::XComponentContext > & xContext );
50 virtual ~DataSourceDialog() override;
51 virtual void dispose() override;
53 // from Dialog (base of TabDialog)
54 virtual short Execute() override;
56 // TabPageNotifiable
57 virtual void setInvalidPage( TabPage * pTabPage ) override;
58 virtual void setValidPage( TabPage * pTabPage ) override;
60 private:
61 std::unique_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider;
62 std::unique_ptr< DialogModel > m_apDialogModel;
64 VclPtr<DataSourceTabControl> m_pTabControl;
65 VclPtr<OKButton> m_pBtnOK;
67 VclPtr<RangeChooserTabPage> m_pRangeChooserTabPage;
68 VclPtr<DataSourceTabPage> m_pDataSourceTabPage;
69 bool m_bRangeChooserTabIsValid;
70 bool m_bDataSourceTabIsValid;
72 static sal_uInt16 m_nLastPageId;
75 } // namespace chart
77 // INCLUDED_CHART2_SOURCE_CONTROLLER_INC_DLG_DATASOURCE_HXX
78 #endif
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */