1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 #ifndef INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_SCALE_HXX
20 #define INCLUDED_CHART2_SOURCE_CONTROLLER_DIALOGS_TP_SCALE_HXX
22 #include <sfx2/tabdlg.hxx>
23 #include <svtools/fmtfield.hxx>
24 #include <vcl/fixed.hxx>
25 #include <vcl/button.hxx>
26 #include <vcl/field.hxx>
27 #include <vcl/lstbox.hxx>
32 class ScaleTabPage
: public SfxTabPage
35 ScaleTabPage( vcl::Window
* pParent
, const SfxItemSet
& rInAttrs
);
36 virtual ~ScaleTabPage() override
;
37 virtual void dispose() override
;
39 static VclPtr
<SfxTabPage
> Create( TabPageParent pParent
, const SfxItemSet
* rInAttrs
);
40 virtual bool FillItemSet( SfxItemSet
* rOutAttrs
) override
;
41 virtual void Reset( const SfxItemSet
* rInAttrs
) override
;
42 using TabPage::DeactivatePage
;
43 virtual DeactivateRC
DeactivatePage( SfxItemSet
* pItemSet
) override
;
45 void SetNumFormatter( SvNumberFormatter
* pFormatter
);
48 void ShowAxisOrigin( bool bShowOrigin
);
51 VclPtr
<CheckBox
> m_pCbxReverse
;
52 VclPtr
<CheckBox
> m_pCbxLogarithm
;
54 VclPtr
<VclBox
> m_pBxType
;
55 VclPtr
<ListBox
> m_pLB_AxisType
;
57 VclPtr
<VclGrid
> m_pBxMinMax
;
58 VclPtr
<FormattedField
> m_pFmtFldMin
;
59 VclPtr
<CheckBox
> m_pCbxAutoMin
;
61 VclPtr
<FormattedField
> m_pFmtFldMax
;
62 VclPtr
<CheckBox
> m_pCbxAutoMax
;
64 VclPtr
<VclBox
> m_pBxResolution
;
65 VclPtr
<ListBox
> m_pLB_TimeResolution
;
66 VclPtr
<CheckBox
> m_pCbx_AutoTimeResolution
;
68 VclPtr
<FixedText
> m_pTxtMain
;
69 VclPtr
<FormattedField
> m_pFmtFldStepMain
;
70 VclPtr
<MetricField
> m_pMt_MainDateStep
;
71 VclPtr
<ListBox
> m_pLB_MainTimeUnit
;
72 VclPtr
<CheckBox
> m_pCbxAutoStepMain
;
74 VclPtr
<FixedText
> m_pTxtHelpCount
;
75 VclPtr
<FixedText
> m_pTxtHelp
;
76 VclPtr
<MetricField
> m_pMtStepHelp
;
77 VclPtr
<ListBox
> m_pLB_HelpTimeUnit
;
78 VclPtr
<CheckBox
> m_pCbxAutoStepHelp
;
80 VclPtr
<FormattedField
> m_pFmtFldOrigin
;
81 VclPtr
<CheckBox
> m_pCbxAutoOrigin
;
82 VclPtr
<VclBox
> m_pBxOrigin
;
89 sal_Int32 m_nTimeResolution
;
90 sal_Int32 m_nMainTimeUnit
;
91 sal_Int32 m_nHelpTimeUnit
;
93 bool m_bAllowDateAxis
;
94 SvNumberFormatter
* pNumFormatter
;
96 bool m_bShowAxisOrigin
;
98 void EnableControls();
100 DECL_LINK( SelectAxisTypeHdl
, ListBox
&, void );
101 DECL_LINK( EnableValueHdl
, Button
*, void );
102 DECL_STATIC_LINK( ScaleTabPage
, FmtFieldModifiedHdl
, Edit
&, void);
104 /** shows a warning window due to an invalid input.
107 The resource identifier that represents the localized warning text.
108 If this is nullptr, no warning is shown and false is returned.
111 If non-NULL, contains a pointer to the control in which the
112 errornous value was in. This method gives this control the focus
113 and selects its content.
115 @return false, if nResIdMessage was 0, true otherwise
117 bool ShowWarning(const char* pResIdMessage
, Control
* pControl
);
119 void HideAllControls();
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */