tdf#164749 make "Compare by: " label in Duplicates dialog translatable
[LibreOffice.git] / chart2 / source / controller / dialogs / tp_RangeChooser.hxx
blob428e8a127dd9c13a19e3a539bd0f9c6b5e0ac8bf
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 .
20 #pragma once
22 #include <RangeSelectionListener.hxx>
24 #include <vcl/wizardmachine.hxx>
26 namespace chart { class TabPageNotifiable; }
28 namespace chart
30 class ChartTypeTemplate;
31 class ChartTypeTemplateProvider;
32 class DialogModel;
34 class RangeChooserTabPage final : public vcl::OWizardPage, public RangeSelectionListenerParent
36 public:
38 RangeChooserTabPage(weld::Container* pPage, weld::DialogController* pController, DialogModel & rDialogModel,
39 ChartTypeTemplateProvider* pTemplateProvider,
40 bool bHideDescription = false);
41 virtual ~RangeChooserTabPage() override;
43 //RangeSelectionListenerParent
44 virtual void listeningFinished( const OUString & rNewRange ) override;
45 virtual void disposingRangeSelection() override;
47 virtual void Activate() override;
49 void commitPage();
51 private:
53 //OWizardPage
54 virtual bool commitPage( ::vcl::WizardTypes::CommitPageReason eReason ) override;
56 //TabPage
57 virtual void Deactivate() override;
59 void initControlsFromModel();
60 void changeDialogModelAccordingToControls();
61 bool isValid();
62 void setDirty();
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 );
70 sal_Int32 m_nChangingControlCalls;
71 bool m_bIsDirty;
73 OUString m_aLastValidRangeString;
74 rtl::Reference< ::chart::ChartTypeTemplate > m_xCurrentChartTypeTemplate;
75 ChartTypeTemplateProvider* m_pTemplateProvider;
77 DialogModel & m_rDialogModel;
78 TabPageNotifiable * m_pTabPageNotifiable;
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;
96 } //namespace chart
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */