/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #pragma once #include #include "anyrefdg.hxx" #include "viewdata.hxx" #include #include class ColorListBox; namespace sc { /** Dialog to create or edit sparkline group attributes */ class SparklineDialog : public ScAnyRefDlgController { private: ScViewData& mrViewData; ScDocument& mrDocument; ScRange maInputRange; ScRange maOutputRange; formula::RefEdit* mpActiveEdit; bool mbDialogLostFocus; std::unique_ptr mxButtonOk; std::unique_ptr mxButtonCancel; std::unique_ptr mxFrameData; std::unique_ptr mxInputRangeLabel; std::unique_ptr mxInputRangeEdit; std::unique_ptr mxInputRangeButton; std::unique_ptr mxOutputRangeLabel; std::unique_ptr mxOutputRangeEdit; std::unique_ptr mxOutputRangeButton; std::unique_ptr mxColorSeries; std::unique_ptr mxColorNegative; std::unique_ptr mxColorMarker; std::unique_ptr mxColorHigh; std::unique_ptr mxColorLow; std::unique_ptr mxColorFirst; std::unique_ptr mxColorLast; std::unique_ptr mxCheckButtonNegative; std::unique_ptr mxCheckButtonMarker; std::unique_ptr mxCheckButtonHigh; std::unique_ptr mxCheckButtonLow; std::unique_ptr mxCheckButtonFirst; std::unique_ptr mxCheckButtonLast; std::unique_ptr mxSpinLineWidth; std::unique_ptr mxType; std::unique_ptr mxCheckDisplayXAxis; std::unique_ptr mxCheckDisplayHidden; std::unique_ptr mxCheckRightToLeft; std::unique_ptr mxDisplayEmptyGap; std::unique_ptr mxComboMinAxisType; std::unique_ptr mxComboMaxAxisType; std::unique_ptr mxSpinCustomMin; std::unique_ptr mxSpinCustomMax; DECL_LINK(ButtonClicked, weld::Button&, void); DECL_LINK(EditFocusHandler, formula::RefEdit&, void); DECL_LINK(ButtonFocusHandler, formula::RefButton&, void); DECL_LINK(LoseEditFocusHandler, formula::RefEdit&, void); DECL_LINK(LoseButtonFocusHandler, formula::RefButton&, void); DECL_LINK(RefInputModifyHandler, formula::RefEdit&, void); DECL_LINK(ToggleHandler, weld::Toggleable&, void); DECL_LINK(SelectSparklineType, weld::ComboBox&, void); DECL_LINK(ComboValueChanged, weld::ComboBox&, void); DECL_LINK(SpinLineWidthChanged, weld::SpinButton&, void); DECL_LINK(SpinCustomChanged, weld::FormattedSpinButton&, void); std::shared_ptr mpSparklineGroup; sc::SparklineAttributes maAttributes; bool mbEditMode; void setupValues(); void setInputSelection(); void perform(); bool checkValidInputOutput(); public: SparklineDialog(SfxBindings* pBindings, SfxChildWindow* pChildWindow, weld::Window* pWindow, ScViewData& rViewData); virtual ~SparklineDialog() override; virtual void SetReference(const ScRange& rRef, ScDocument& rDocument) override; virtual void SetActive() override; virtual void Close() override; }; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */