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();
37 virtual void dispose() SAL_OVERRIDE
;
39 static VclPtr
<SfxTabPage
> Create( vcl::Window
* pParent
, const SfxItemSet
* rInAttrs
);
40 virtual bool FillItemSet( SfxItemSet
* rOutAttrs
) SAL_OVERRIDE
;
41 virtual void Reset( const SfxItemSet
* rInAttrs
) SAL_OVERRIDE
;
42 using TabPage::DeactivatePage
;
43 virtual sfxpg
DeactivatePage( SfxItemSet
* pItemSet
= NULL
) SAL_OVERRIDE
;
45 void SetNumFormatter( SvNumberFormatter
* pFormatter
);
48 void ShowAxisOrigin( bool bShowOrigin
);
50 virtual void StateChanged( StateChangedType nType
) SAL_OVERRIDE
;
53 VclPtr
<CheckBox
> m_pCbxReverse
;
54 VclPtr
<CheckBox
> m_pCbxLogarithm
;
56 VclPtr
<VclBox
> m_pBxType
;
57 VclPtr
<ListBox
> m_pLB_AxisType
;
59 VclPtr
<VclGrid
> m_pBxMinMax
;
60 VclPtr
<FormattedField
> m_pFmtFldMin
;
61 VclPtr
<CheckBox
> m_pCbxAutoMin
;
63 VclPtr
<FormattedField
> m_pFmtFldMax
;
64 VclPtr
<CheckBox
> m_pCbxAutoMax
;
66 VclPtr
<VclBox
> m_pBxResolution
;
67 VclPtr
<ListBox
> m_pLB_TimeResolution
;
68 VclPtr
<CheckBox
> m_pCbx_AutoTimeResolution
;
70 VclPtr
<FixedText
> m_pTxtMain
;
71 VclPtr
<FormattedField
> m_pFmtFldStepMain
;
72 VclPtr
<MetricField
> m_pMt_MainDateStep
;
73 VclPtr
<ListBox
> m_pLB_MainTimeUnit
;
74 VclPtr
<CheckBox
> m_pCbxAutoStepMain
;
76 VclPtr
<FixedText
> m_pTxtHelpCount
;
77 VclPtr
<FixedText
> m_pTxtHelp
;
78 VclPtr
<MetricField
> m_pMtStepHelp
;
79 VclPtr
<ListBox
> m_pLB_HelpTimeUnit
;
80 VclPtr
<CheckBox
> m_pCbxAutoStepHelp
;
82 VclPtr
<FormattedField
> m_pFmtFldOrigin
;
83 VclPtr
<CheckBox
> m_pCbxAutoOrigin
;
84 VclPtr
<VclBox
> m_pBxOrigin
;
91 sal_Int32 m_nTimeResolution
;
92 sal_Int32 m_nMainTimeUnit
;
93 sal_Int32 m_nHelpTimeUnit
;
95 bool m_bAllowDateAxis
;
96 SvNumberFormatter
* pNumFormatter
;
98 bool m_bShowAxisOrigin
;
100 void EnableControls();
102 DECL_LINK( SelectAxisTypeHdl
, void* );
103 DECL_LINK( EnableValueHdl
, CheckBox
* );
104 DECL_STATIC_LINK( ScaleTabPage
, FmtFieldModifiedHdl
, FormattedField
* );
106 /** shows a warning window due to an invalid input.
109 The resource identifier that represents the localized warning text.
110 If this is 0, no warning is shown and false is returned.
113 If non-NULL, contains a pointer to the control in which the
114 errornous value was in. This method gives this control the focus
115 and selects its content.
117 @return false, if nResIdMessage was 0, true otherwise
119 bool ShowWarning( sal_uInt16 nResIdMessage
, Control
* pControl
= NULL
);
121 void HideAllControls();
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */