LibreOffice Module sc (master) 1
SparklineDialog.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
10#pragma once
11
12#include <address.hxx>
13#include "anyrefdg.hxx"
14#include "viewdata.hxx"
15
16#include <SparklineGroup.hxx>
18
19class ColorListBox;
20
21namespace sc
22{
25{
26private:
29
32
35
36 std::unique_ptr<weld::Button> mxButtonOk;
37 std::unique_ptr<weld::Button> mxButtonCancel;
38
39 std::unique_ptr<weld::Frame> mxFrameData;
40
41 std::unique_ptr<weld::Label> mxInputRangeLabel;
42 std::unique_ptr<formula::RefEdit> mxInputRangeEdit;
43 std::unique_ptr<formula::RefButton> mxInputRangeButton;
44
45 std::unique_ptr<weld::Label> mxOutputRangeLabel;
46 std::unique_ptr<formula::RefEdit> mxOutputRangeEdit;
47 std::unique_ptr<formula::RefButton> mxOutputRangeButton;
48
49 std::unique_ptr<ColorListBox> mxColorSeries;
50 std::unique_ptr<ColorListBox> mxColorNegative;
51 std::unique_ptr<ColorListBox> mxColorMarker;
52 std::unique_ptr<ColorListBox> mxColorHigh;
53 std::unique_ptr<ColorListBox> mxColorLow;
54 std::unique_ptr<ColorListBox> mxColorFirst;
55 std::unique_ptr<ColorListBox> mxColorLast;
56
57 std::unique_ptr<weld::CheckButton> mxCheckButtonNegative;
58 std::unique_ptr<weld::CheckButton> mxCheckButtonMarker;
59 std::unique_ptr<weld::CheckButton> mxCheckButtonHigh;
60 std::unique_ptr<weld::CheckButton> mxCheckButtonLow;
61 std::unique_ptr<weld::CheckButton> mxCheckButtonFirst;
62 std::unique_ptr<weld::CheckButton> mxCheckButtonLast;
63
64 std::unique_ptr<weld::SpinButton> mxSpinLineWidth;
65 std::unique_ptr<weld::ComboBox> mxType;
66
67 std::unique_ptr<weld::CheckButton> mxCheckDisplayXAxis;
68 std::unique_ptr<weld::CheckButton> mxCheckDisplayHidden;
69 std::unique_ptr<weld::CheckButton> mxCheckRightToLeft;
70
71 std::unique_ptr<weld::ComboBox> mxDisplayEmptyGap;
72
73 std::unique_ptr<weld::ComboBox> mxComboMinAxisType;
74 std::unique_ptr<weld::ComboBox> mxComboMaxAxisType;
75
76 std::unique_ptr<weld::FormattedSpinButton> mxSpinCustomMin;
77 std::unique_ptr<weld::FormattedSpinButton> mxSpinCustomMax;
78
79 DECL_LINK(ButtonClicked, weld::Button&, void);
80 DECL_LINK(EditFocusHandler, formula::RefEdit&, void);
81 DECL_LINK(ButtonFocusHandler, formula::RefButton&, void);
82 DECL_LINK(LoseEditFocusHandler, formula::RefEdit&, void);
83 DECL_LINK(LoseButtonFocusHandler, formula::RefButton&, void);
84 DECL_LINK(RefInputModifyHandler, formula::RefEdit&, void);
85 DECL_LINK(ToggleHandler, weld::Toggleable&, void);
86 DECL_LINK(SelectSparklineType, weld::ComboBox&, void);
87 DECL_LINK(ComboValueChanged, weld::ComboBox&, void);
88 DECL_LINK(SpinLineWidthChanged, weld::SpinButton&, void);
89 DECL_LINK(SpinCustomChanged, weld::FormattedSpinButton&, void);
90
91 std::shared_ptr<sc::SparklineGroup> mpSparklineGroup;
93
95
96 void setupValues();
97 void setInputSelection();
98
99 void perform();
101
102public:
103 SparklineDialog(SfxBindings* pBindings, SfxChildWindow* pChildWindow, weld::Window* pWindow,
104 ScViewData& rViewData);
105 virtual ~SparklineDialog() override;
106
107 virtual void SetReference(const ScRange& rRef, ScDocument& rDocument) override;
108 virtual void SetActive() override;
109 virtual void Close() override;
110};
111}
112
113/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Common properties for a group of sparklines.
Dialog to create or edit sparkline group attributes.
DECL_LINK(ComboValueChanged, weld::ComboBox &, void)
std::unique_ptr< weld::CheckButton > mxCheckButtonHigh
std::unique_ptr< weld::Label > mxInputRangeLabel
DECL_LINK(EditFocusHandler, formula::RefEdit &, void)
std::unique_ptr< weld::CheckButton > mxCheckDisplayXAxis
std::unique_ptr< weld::FormattedSpinButton > mxSpinCustomMin
DECL_LINK(ButtonClicked, weld::Button &, void)
DECL_LINK(ButtonFocusHandler, formula::RefButton &, void)
DECL_LINK(RefInputModifyHandler, formula::RefEdit &, void)
DECL_LINK(SpinCustomChanged, weld::FormattedSpinButton &, void)
std::unique_ptr< ColorListBox > mxColorMarker
std::unique_ptr< weld::SpinButton > mxSpinLineWidth
DECL_LINK(LoseEditFocusHandler, formula::RefEdit &, void)
std::unique_ptr< formula::RefButton > mxInputRangeButton
std::unique_ptr< ColorListBox > mxColorFirst
std::unique_ptr< formula::RefButton > mxOutputRangeButton
std::unique_ptr< weld::CheckButton > mxCheckDisplayHidden
virtual ~SparklineDialog() override
SparklineDialog(SfxBindings *pBindings, SfxChildWindow *pChildWindow, weld::Window *pWindow, ScViewData &rViewData)
std::unique_ptr< weld::FormattedSpinButton > mxSpinCustomMax
std::unique_ptr< weld::ComboBox > mxType
std::unique_ptr< ColorListBox > mxColorNegative
DECL_LINK(SelectSparklineType, weld::ComboBox &, void)
std::unique_ptr< ColorListBox > mxColorHigh
std::unique_ptr< weld::CheckButton > mxCheckButtonMarker
std::unique_ptr< ColorListBox > mxColorSeries
DECL_LINK(LoseButtonFocusHandler, formula::RefButton &, void)
DECL_LINK(ToggleHandler, weld::Toggleable &, void)
std::unique_ptr< weld::Label > mxOutputRangeLabel
DECL_LINK(SpinLineWidthChanged, weld::SpinButton &, void)
std::unique_ptr< weld::Frame > mxFrameData
std::unique_ptr< weld::CheckButton > mxCheckButtonNegative
std::unique_ptr< formula::RefEdit > mxOutputRangeEdit
std::unique_ptr< formula::RefEdit > mxInputRangeEdit
std::unique_ptr< weld::ComboBox > mxComboMinAxisType
std::unique_ptr< weld::ComboBox > mxComboMaxAxisType
std::unique_ptr< weld::CheckButton > mxCheckButtonLast
std::unique_ptr< weld::CheckButton > mxCheckButtonFirst
std::unique_ptr< weld::ComboBox > mxDisplayEmptyGap
std::shared_ptr< sc::SparklineGroup > mpSparklineGroup
std::unique_ptr< weld::CheckButton > mxCheckRightToLeft
formula::RefEdit * mpActiveEdit
virtual void SetReference(const ScRange &rRef, ScDocument &rDocument) override
std::unique_ptr< weld::Button > mxButtonOk
std::unique_ptr< weld::Button > mxButtonCancel
virtual void Close() override
sc::SparklineAttributes maAttributes
std::unique_ptr< ColorListBox > mxColorLow
std::unique_ptr< weld::CheckButton > mxCheckButtonLow
virtual void SetActive() override
std::unique_ptr< ColorListBox > mxColorLast
CAUTION! The following defines must be in the same namespace as the respective type.
Definition: broadcast.cxx:15