LibreOffice Module cui (master) 1
optchart.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
20#pragma once
21
22#include <sfx2/tabdlg.hxx>
23#include <svtools/valueset.hxx>
24#include <svx/xtable.hxx>
26#include <vcl/customweld.hxx>
27
28#include "cfgchart.hxx"
29
30typedef std::vector<Color> ImpColorList;
31
33{
34private:
35 std::unique_ptr<SvxChartOptions> m_SvxChartOptionsUniquePtr;
36 // no reason to use a cloned SfxItem here (SvxChartColorTableItem)
37 // that just leads to non-const SfxItem and potential trouble
38 std::unique_ptr<SvxChartColorTable> m_SvxChartColorTableUniquePtr;
39
42
43 std::unique_ptr<weld::TreeView> m_xLbChartColors;
44 std::unique_ptr<weld::ComboBox> m_xLbPaletteSelector;
45 std::unique_ptr<weld::Button> m_xPBDefault;
46 std::unique_ptr<weld::Button> m_xPBAdd;
47 std::unique_ptr<weld::Button> m_xPBRemove;
48 std::unique_ptr<SvxColorValueSet> m_xValSetColorBox;
49 std::unique_ptr<weld::CustomWeld> m_xValSetColorBoxWin;
50
51 DECL_LINK(ResetToDefaults, weld::Button&, void);
52 DECL_LINK(AddChartColor, weld::Button&, void);
53 DECL_LINK(RemoveChartColor, weld::Button&, void);
54 DECL_LINK(BoxClickedHdl, ValueSet*, void);
55 DECL_LINK(SelectPaletteLbHdl, weld::ComboBox&, void);
56
57 void FillPaletteLB();
58
59private:
60 void InsertColorEntry(const XColorEntry& rEntry, sal_Int32 nPos = -1);
61 void RemoveColorEntry(sal_Int32 nPos);
62 void ModifyColorEntry(const XColorEntry& rEntry, sal_Int32 nPos);
63 void ClearColorEntries();
65
66public:
67 SvxDefaultColorOptPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
68 virtual ~SvxDefaultColorOptPage() override;
69
70 void Construct();
71
72 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rInAttrs );
73 virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override;
74 virtual void Reset( const SfxItemSet* rInAttrs ) override;
75
76 void SaveChartOptions();
77};
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Reset(const SfxItemSet *rInAttrs) override
Definition: optchart.cxx:158
std::unique_ptr< weld::Button > m_xPBDefault
Definition: optchart.hxx:45
void InsertColorEntry(const XColorEntry &rEntry, sal_Int32 nPos=-1)
Definition: optchart.cxx:30
virtual bool FillItemSet(SfxItemSet *rOutAttrs) override
Definition: optchart.cxx:148
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
Definition: optchart.cxx:143
SvxDefaultColorOptPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: optchart.cxx:91
std::unique_ptr< SvxChartOptions > m_SvxChartOptionsUniquePtr
Definition: optchart.hxx:35
DECL_LINK(AddChartColor, weld::Button &, void)
void RemoveColorEntry(sal_Int32 nPos)
Definition: optchart.cxx:58
DECL_LINK(ResetToDefaults, weld::Button &, void)
DECL_LINK(BoxClickedHdl, ValueSet *, void)
std::unique_ptr< weld::TreeView > m_xLbChartColors
Definition: optchart.hxx:43
std::unique_ptr< weld::CustomWeld > m_xValSetColorBoxWin
Definition: optchart.hxx:49
void ModifyColorEntry(const XColorEntry &rEntry, sal_Int32 nPos)
Definition: optchart.cxx:72
std::unique_ptr< SvxColorValueSet > m_xValSetColorBox
Definition: optchart.hxx:48
std::unique_ptr< weld::Button > m_xPBAdd
Definition: optchart.hxx:46
virtual ~SvxDefaultColorOptPage() override
Definition: optchart.cxx:129
PaletteManager aPaletteManager
Definition: optchart.hxx:41
DECL_LINK(SelectPaletteLbHdl, weld::ComboBox &, void)
std::unique_ptr< weld::ComboBox > m_xLbPaletteSelector
Definition: optchart.hxx:44
std::unique_ptr< SvxChartColorTable > m_SvxChartColorTableUniquePtr
Definition: optchart.hxx:38
ImpColorList aColorList
Definition: optchart.hxx:40
std::unique_ptr< weld::Button > m_xPBRemove
Definition: optchart.hxx:47
DECL_LINK(RemoveChartColor, weld::Button &, void)
std::vector< Color > ImpColorList
Definition: optchart.hxx:30