| 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 |
|
| 25 |
namespace chart |
| 26 |
{ |
| 27 |
class ChartModel; |
| 28 |
class ChartTypeTemplateProvider; |
| 29 |
class DataSourceTabPage; |
| 30 |
class DialogModel; |
| 31 |
class RangeChooserTabPage; |
| 32 |
|
| 33 |
class DataSourceDialog final : |
| 34 |
public weld::GenericDialogController, |
| 35 |
public TabPageNotifiable |
| 36 |
{ |
| 37 |
public: |
| 38 |
explicit DataSourceDialog( |
| 39 |
weld::Window * pParent, |
| 40 |
const rtl::Reference<::chart::ChartModel> & xChartDocument ); |
| 41 |
virtual ~DataSourceDialog() override; |
| 42 |
|
| 43 |
// TabPageNotifiable |
| 44 |
virtual void setInvalidPage( BuilderPage * pTabPage ) override; |
| 45 |
virtual void setValidPage( BuilderPage * pTabPage ) override; |
| 46 |
|
| 47 |
private: |
| 48 |
DECL_LINK(ActivatePageHdl, const OUString&, void); |
| 49 |
DECL_LINK(DeactivatePageHdl, const OUString&, bool); |
| 50 |
DECL_LINK(OkHdl, weld::Button&, void); |
| 51 |
void commitPages(); |
| 52 |
|
| 53 |
std::unique_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider; |
| 54 |
std::unique_ptr< DialogModel > m_apDialogModel; |
| 55 |
|
| 56 |
std::unique_ptr<RangeChooserTabPage> m_xRangeChooserTabPage; |
| 57 |
std::unique_ptr<DataSourceTabPage> m_xDataSourceTabPage; |
| 58 |
bool m_bRangeChooserTabIsValid; |
| 59 |
bool m_bDataSourceTabIsValid; |
| 60 |
bool m_bTogglingEnabled; |
| 61 |
|
| 62 |
std::unique_ptr<weld::Notebook> m_xTabControl; |
| 63 |
std::unique_ptr<weld::Button> m_xBtnOK; |
| 64 |
|
| 65 |
static sal_uInt16 m_nLastPageId; |
| 66 |
}; |
| 67 |
|
| 68 |
} // namespace chart |
| 69 |
|
| 70 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |