LibreOffice Module chart2 (master) 1
tp_Scale.hxx
Go to the documentation of this file.
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#pragma once
20
21#include <sfx2/tabdlg.hxx>
22#include <unotools/resmgr.hxx>
23
24namespace chart
25{
26
28{
29public:
30 ScaleTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
31 virtual ~ScaleTabPage() override;
32
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;
37
38 void SetNumFormatter( SvNumberFormatter* pFormatter );
39 void SetNumFormat();
40
41 void ShowAxisOrigin( bool bShowOrigin );
42
43private:
44 double fMin;
45 double fMax;
46 double fStepMain;
47 sal_Int32 nStepHelp;
48 double fOrigin;
50 sal_Int32 m_nMainTimeUnit;
51 sal_Int32 m_nHelpTimeUnit;
55
57
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;
83
84 void EnableControls();
85
86 DECL_LINK(SelectAxisTypeHdl, weld::ComboBox&, void);
87 DECL_LINK(EnableValueHdl, weld::Toggleable&, void);
88
102 bool ShowWarning(TranslateId pResIdMessage, weld::Widget* pControl);
103
104 void HideAllControls();
105};
106
107} //namespace chart
108
109/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::Widget > m_xBxMinMax
Definition: tp_Scale.hxx:62
sal_Int32 nStepHelp
Definition: tp_Scale.hxx:47
virtual DeactivateRC DeactivatePage(SfxItemSet *pItemSet) override
Definition: tp_Scale.cxx:380
std::unique_ptr< weld::FormattedSpinButton > m_xFmtFldOrigin
Definition: tp_Scale.hxx:80
std::unique_ptr< weld::CheckButton > m_xCbxAutoMin
Definition: tp_Scale.hxx:64
SvNumberFormatter * pNumFormatter
Definition: tp_Scale.hxx:54
std::unique_ptr< weld::SpinButton > m_xMt_MainDateStep
Definition: tp_Scale.hxx:72
std::unique_ptr< weld::Label > m_xTxtMain
Definition: tp_Scale.hxx:70
ScaleTabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: tp_Scale.cxx:56
sal_Int32 m_nTimeResolution
Definition: tp_Scale.hxx:49
std::unique_ptr< weld::CheckButton > m_xCbxAutoOrigin
Definition: tp_Scale.hxx:81
std::unique_ptr< weld::SpinButton > m_xMtStepHelp
Definition: tp_Scale.hxx:77
sal_Int32 m_nHelpTimeUnit
Definition: tp_Scale.hxx:51
virtual ~ScaleTabPage() override
Definition: tp_Scale.cxx:121
std::unique_ptr< weld::FormattedSpinButton > m_xFmtFldStepMain
Definition: tp_Scale.hxx:71
void SetNumFormatter(SvNumberFormatter *pFormatter)
Definition: tp_Scale.cxx:499
std::unique_ptr< weld::ComboBox > m_xLB_HelpTimeUnit
Definition: tp_Scale.hxx:78
std::unique_ptr< weld::ComboBox > m_xLB_MainTimeUnit
Definition: tp_Scale.hxx:73
void ShowAxisOrigin(bool bShowOrigin)
Definition: tp_Scale.cxx:586
sal_Int32 m_nMainTimeUnit
Definition: tp_Scale.hxx:50
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
Definition: tp_Scale.cxx:229
std::unique_ptr< weld::CheckButton > m_xCbxAutoMax
Definition: tp_Scale.hxx:66
std::unique_ptr< weld::CheckButton > m_xCbxAutoStepMain
Definition: tp_Scale.hxx:74
std::unique_ptr< weld::Widget > m_xBxOrigin
Definition: tp_Scale.hxx:82
std::unique_ptr< weld::CheckButton > m_xCbxReverse
Definition: tp_Scale.hxx:58
std::unique_ptr< weld::Widget > m_xBxType
Definition: tp_Scale.hxx:60
DECL_LINK(SelectAxisTypeHdl, weld::ComboBox &, void)
std::unique_ptr< weld::FormattedSpinButton > m_xFmtFldMin
Definition: tp_Scale.hxx:63
std::unique_ptr< weld::CheckButton > m_xCbx_AutoTimeResolution
Definition: tp_Scale.hxx:69
virtual void Reset(const SfxItemSet *rInAttrs) override
Definition: tp_Scale.cxx:269
std::unique_ptr< weld::CheckButton > m_xCbxAutoStepHelp
Definition: tp_Scale.hxx:79
std::unique_ptr< weld::ComboBox > m_xLB_AxisType
Definition: tp_Scale.hxx:61
std::unique_ptr< weld::Label > m_xTxtHelp
Definition: tp_Scale.hxx:76
std::unique_ptr< weld::Widget > m_xBxResolution
Definition: tp_Scale.hxx:67
bool ShowWarning(TranslateId pResIdMessage, weld::Widget *pControl)
shows a warning window due to an invalid input.
Definition: tp_Scale.cxx:593
std::unique_ptr< weld::FormattedSpinButton > m_xFmtFldMax
Definition: tp_Scale.hxx:65
DECL_LINK(EnableValueHdl, weld::Toggleable &, void)
std::unique_ptr< weld::Label > m_xTxtHelpCount
Definition: tp_Scale.hxx:75
std::unique_ptr< weld::CheckButton > m_xCbxLogarithm
Definition: tp_Scale.hxx:59
virtual bool FillItemSet(SfxItemSet *rOutAttrs) override
Definition: tp_Scale.cxx:234
std::unique_ptr< weld::ComboBox > m_xLB_TimeResolution
Definition: tp_Scale.hxx:68
DeactivateRC