tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / chart2 / source / controller / inc / dlg_DataSource.hxx
blobc6b10d1dd213d26fb0378ab4fc3a9ebbe6072b52
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 #pragma once
21 #include "TabPageNotifiable.hxx"
22 #include <vcl/weld.hxx>
23 #include <memory>
25 namespace com::sun::star::chart2 { class XChartDocument; }
26 namespace com::sun::star::uno { class XComponentContext; }
27 class BuilderPage;
29 namespace chart
31 class ChartModel;
32 class ChartTypeTemplateProvider;
33 class DataSourceTabPage;
34 class DialogModel;
35 class RangeChooserTabPage;
37 class DataSourceDialog final :
38 public weld::GenericDialogController,
39 public TabPageNotifiable
41 public:
42 explicit DataSourceDialog(
43 weld::Window * pParent,
44 const rtl::Reference<::chart::ChartModel> & xChartDocument );
45 virtual ~DataSourceDialog() override;
47 // TabPageNotifiable
48 virtual void setInvalidPage( BuilderPage * pTabPage ) override;
49 virtual void setValidPage( BuilderPage * pTabPage ) override;
51 private:
52 DECL_LINK(ActivatePageHdl, const OUString&, void);
53 DECL_LINK(DeactivatePageHdl, const OUString&, bool);
54 DECL_LINK(OkHdl, weld::Button&, void);
55 void commitPages();
57 std::unique_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider;
58 std::unique_ptr< DialogModel > m_apDialogModel;
60 std::unique_ptr<RangeChooserTabPage> m_xRangeChooserTabPage;
61 std::unique_ptr<DataSourceTabPage> m_xDataSourceTabPage;
62 bool m_bRangeChooserTabIsValid;
63 bool m_bDataSourceTabIsValid;
64 bool m_bTogglingEnabled;
66 std::unique_ptr<weld::Notebook> m_xTabControl;
67 std::unique_ptr<weld::Button> m_xBtnOK;
69 static sal_uInt16 m_nLastPageId;
72 } // namespace chart
74 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */