vcl: allow for overriding the default PDF rendering resolution
[LibreOffice.git] / chart2 / source / controller / dialogs / tp_Scale.hxx
blobb0e308845bc498e5740c3730066a98a71d8d2494
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 .
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>
24 namespace chart
27 class ScaleTabPage : public SfxTabPage
29 public:
30 ScaleTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
31 virtual ~ScaleTabPage() override;
33 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rInAttrs );
34 virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override;
35 virtual void Reset( const SfxItemSet* rInAttrs ) override;
36 virtual DeactivateRC DeactivatePage( SfxItemSet* pItemSet ) override;
38 void SetNumFormatter( SvNumberFormatter* pFormatter );
39 void SetNumFormat();
41 void ShowAxisOrigin( bool bShowOrigin );
43 private:
44 double fMin;
45 double fMax;
46 double fStepMain;
47 sal_Int32 nStepHelp;
48 double fOrigin;
49 sal_Int32 m_nTimeResolution;
50 sal_Int32 m_nMainTimeUnit;
51 sal_Int32 m_nHelpTimeUnit;
52 int m_nAxisType;
53 bool m_bAllowDateAxis;
54 SvNumberFormatter* pNumFormatter;
56 bool m_bShowAxisOrigin;
58 std::unique_ptr<weld::CheckButton> m_xCbxReverse;
59 std::unique_ptr<weld::CheckButton> m_xCbxLogarithm;
60 std::unique_ptr<weld::Widget> m_xBxType;
61 std::unique_ptr<weld::ComboBox> m_xLB_AxisType;
62 std::unique_ptr<weld::Widget> m_xBxMinMax;
63 std::unique_ptr<weld::FormattedSpinButton> m_xFmtFldMin;
64 std::unique_ptr<weld::CheckButton> m_xCbxAutoMin;
65 std::unique_ptr<weld::FormattedSpinButton> m_xFmtFldMax;
66 std::unique_ptr<weld::CheckButton> m_xCbxAutoMax;
67 std::unique_ptr<weld::Widget> m_xBxResolution;
68 std::unique_ptr<weld::ComboBox> m_xLB_TimeResolution;
69 std::unique_ptr<weld::CheckButton> m_xCbx_AutoTimeResolution;
70 std::unique_ptr<weld::Label> m_xTxtMain;
71 std::unique_ptr<weld::FormattedSpinButton> m_xFmtFldStepMain;
72 std::unique_ptr<weld::SpinButton> m_xMt_MainDateStep;
73 std::unique_ptr<weld::ComboBox> m_xLB_MainTimeUnit;
74 std::unique_ptr<weld::CheckButton> m_xCbxAutoStepMain;
75 std::unique_ptr<weld::Label> m_xTxtHelpCount;
76 std::unique_ptr<weld::Label> m_xTxtHelp;
77 std::unique_ptr<weld::SpinButton> m_xMtStepHelp;
78 std::unique_ptr<weld::ComboBox> m_xLB_HelpTimeUnit;
79 std::unique_ptr<weld::CheckButton> m_xCbxAutoStepHelp;
80 std::unique_ptr<weld::FormattedSpinButton> m_xFmtFldOrigin;
81 std::unique_ptr<weld::CheckButton> m_xCbxAutoOrigin;
82 std::unique_ptr<weld::Widget> m_xBxOrigin;
84 void EnableControls();
86 DECL_LINK(SelectAxisTypeHdl, weld::ComboBox&, void);
87 DECL_LINK(EnableValueHdl, weld::ToggleButton&, void);
89 /** shows a warning window due to an invalid input.
91 @param pResIdMessage
92 The resource identifier that represents the localized warning text.
93 If this is nullptr, no warning is shown and false is returned.
95 @param pControl
96 If non-NULL, contains a pointer to the control in which the
97 erroneous value was in. This method gives this control the focus
98 and selects its content.
100 @return false, if nResIdMessage was 0, true otherwise
102 bool ShowWarning(const char* pResIdMessage, weld::Widget* pControl);
104 void HideAllControls();
107 } //namespace chart
109 #endif
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */