LibreOffice Module chart2 (master) 1
dlg_DataSource.hxx
Go to the documentation of this file.
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 "TabPageNotifiable.hxx"
22#include <vcl/weld.hxx>
23#include <memory>
24
25namespace com::sun::star::chart2 { class XChartDocument; }
26namespace com::sun::star::uno { class XComponentContext; }
27class BuilderPage;
28
29namespace chart
30{
31class ChartModel;
32class ChartTypeTemplateProvider;
33class DataSourceTabPage;
34class DialogModel;
35class RangeChooserTabPage;
36
37class DataSourceDialog final :
39 public TabPageNotifiable
40{
41public:
42 explicit DataSourceDialog(
43 weld::Window * pParent,
44 const rtl::Reference<::chart::ChartModel> & xChartDocument );
45 virtual ~DataSourceDialog() override;
46
47 // from GenericDialogController base
48 virtual short run() override;
49
50 // TabPageNotifiable
51 virtual void setInvalidPage( BuilderPage * pTabPage ) override;
52 virtual void setValidPage( BuilderPage * pTabPage ) override;
53
54private:
55 DECL_LINK(ActivatePageHdl, const OUString&, void);
56 DECL_LINK(DeactivatePageHdl, const OUString&, bool);
57
58 std::unique_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider;
59 std::unique_ptr< DialogModel > m_apDialogModel;
60
61 std::unique_ptr<RangeChooserTabPage> m_xRangeChooserTabPage;
62 std::unique_ptr<DataSourceTabPage> m_xDataSourceTabPage;
66
67 std::unique_ptr<weld::Notebook> m_xTabControl;
68 std::unique_ptr<weld::Button> m_xBtnOK;
69
70 static sal_uInt16 m_nLastPageId;
71};
72
73} // namespace chart
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
DECL_LINK(DeactivatePageHdl, const OUString &, bool)
virtual short run() override
std::unique_ptr< weld::Button > m_xBtnOK
std::unique_ptr< weld::Notebook > m_xTabControl
virtual void setInvalidPage(BuilderPage *pTabPage) override
std::unique_ptr< DataSourceTabPage > m_xDataSourceTabPage
std::unique_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider
static sal_uInt16 m_nLastPageId
std::unique_ptr< DialogModel > m_apDialogModel
virtual ~DataSourceDialog() override
DECL_LINK(ActivatePageHdl, const OUString &, void)
DataSourceDialog(weld::Window *pParent, const rtl::Reference<::chart::ChartModel > &xChartDocument)
std::unique_ptr< RangeChooserTabPage > m_xRangeChooserTabPage
virtual void setValidPage(BuilderPage *pTabPage) override