| 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 <RangeSelectionListener.hxx> |
| 23 |
|
| 24 |
#include <vcl/wizardmachine.hxx> |
| 25 |
|
| 26 |
namespace chart { class TabPageNotifiable; } |
| 27 |
|
| 28 |
namespace chart |
| 29 |
{ |
| 30 |
class ChartTypeTemplate; |
| 31 |
class ChartTypeTemplateProvider; |
| 32 |
class DialogModel; |
| 33 |
|
| 34 |
class RangeChooserTabPage final : public vcl::OWizardPage, public RangeSelectionListenerParent |
| 35 |
{ |
| 36 |
public: |
| 37 |
|
| 38 |
RangeChooserTabPage(weld::Container* pPage, weld::DialogController* pController, DialogModel & rDialogModel, |
| 39 |
ChartTypeTemplateProvider* pTemplateProvider, |
| 40 |
bool bHideDescription = false); |
| 41 |
virtual ~RangeChooserTabPage() override; |
| 42 |
|
| 43 |
//RangeSelectionListenerParent |
| 44 |
virtual void listeningFinished( const OUString & rNewRange ) override; |
| 45 |
virtual void disposingRangeSelection() override; |
| 46 |
|
| 47 |
virtual void Activate() override; |
| 48 |
|
| 49 |
void commitPage(); |
| 50 |
|
| 51 |
private: |
| 52 |
|
| 53 |
//OWizardPage |
| 54 |
virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason eReason ) override; |
| 55 |
|
| 56 |
//TabPage |
| 57 |
virtual void Deactivate() override; |
| 58 |
|
| 59 |
void initControlsFromModel(); |
| 60 |
void changeDialogModelAccordingToControls(); |
| 61 |
bool isValid(); |
| 62 |
void setDirty(); |
| 63 |
|
| 64 |
DECL_LINK( ChooseRangeHdl, weld::Button&, void ); |
| 65 |
DECL_LINK( ControlChangedHdl, weld::Entry&, void ); |
| 66 |
DECL_LINK( ControlChangedCheckBoxHdl, weld::Toggleable&, void ); |
| 67 |
DECL_LINK( ControlChangedRadioHdl, weld::Toggleable&, void ); |
| 68 |
DECL_LINK( ControlEditedHdl, weld::Entry&, void ); |
| 69 |
|
| 70 |
sal_Int32 m_nChangingControlCalls; |
| 71 |
bool m_bIsDirty; |
| 72 |
|
| 73 |
OUString m_aLastValidRangeString; |
| 74 |
rtl::Reference< ::chart::ChartTypeTemplate > m_xCurrentChartTypeTemplate; |
| 75 |
ChartTypeTemplateProvider* m_pTemplateProvider; |
| 76 |
|
| 77 |
DialogModel & m_rDialogModel; |
| 78 |
TabPageNotifiable * m_pTabPageNotifiable; |
| 79 |
|
| 80 |
std::unique_ptr<weld::Label> m_xFT_Caption; |
| 81 |
std::unique_ptr<weld::Entry> m_xED_Range; |
| 82 |
std::unique_ptr<weld::Button> m_xIB_Range; |
| 83 |
std::unique_ptr<weld::RadioButton> m_xRB_Rows; |
| 84 |
std::unique_ptr<weld::RadioButton> m_xRB_Columns; |
| 85 |
std::unique_ptr<weld::CheckButton> m_xCB_FirstRowAsLabel; |
| 86 |
std::unique_ptr<weld::CheckButton> m_xCB_FirstColumnAsLabel; |
| 87 |
std::unique_ptr<weld::Label> m_xFTTitle; |
| 88 |
std::unique_ptr<weld::Widget> m_xFL_TimeBased; |
| 89 |
std::unique_ptr<weld::CheckButton> m_xCB_TimeBased; |
| 90 |
std::unique_ptr<weld::Label> m_xFT_TimeStart; |
| 91 |
std::unique_ptr<weld::Entry> m_xEd_TimeStart; |
| 92 |
std::unique_ptr<weld::Label> m_xFT_TimeEnd; |
| 93 |
std::unique_ptr<weld::Entry> m_xEd_TimeEnd; |
| 94 |
}; |
| 95 |
|
| 96 |
} //namespace chart |
| 97 |
|
| 98 |
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |