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 // no reason to use a cloned SfxItem here (SvxChartColorTableItem)
36 // that just leads to non-const SfxItem and potential trouble
37 std::unique_ptr<SvxChartColorTable> m_SvxChartColorTableUniquePtr;
38
41
42 std::unique_ptr<weld::TreeView> m_xLbChartColors;
43 std::unique_ptr<weld::ComboBox> m_xLbPaletteSelector;
44 std::unique_ptr<weld::Button> m_xPBDefault;
45 std::unique_ptr<weld::Button> m_xPBAdd;
46 std::unique_ptr<weld::Button> m_xPBRemove;
47 std::unique_ptr<SvxColorValueSet> m_xValSetColorBox;
48 std::unique_ptr<weld::CustomWeld> m_xValSetColorBoxWin;
49
50 DECL_LINK(ResetToDefaults, weld::Button&, void);
51 DECL_LINK(AddChartColor, weld::Button&, void);
52 DECL_LINK(RemoveChartColor, weld::Button&, void);
53 DECL_LINK(BoxClickedHdl, ValueSet*, void);
54 DECL_LINK(SelectPaletteLbHdl, weld::ComboBox&, void);
55
56 void FillPaletteLB();
57
58private:
59 void InsertColorEntry(const XColorEntry& rEntry, sal_Int32 nPos = -1);
60 void RemoveColorEntry(sal_Int32 nPos);
61 void ModifyColorEntry(const XColorEntry& rEntry, sal_Int32 nPos);
62 void ClearColorEntries();
64
65public:
66 SvxDefaultColorOptPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rInAttrs);
67 virtual ~SvxDefaultColorOptPage() override;
68
69 void Construct();
70
71 static std::unique_ptr<SfxTabPage> Create( weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rInAttrs );
72 virtual bool FillItemSet( SfxItemSet* rOutAttrs ) override;
73 virtual void Reset( const SfxItemSet* rInAttrs ) override;
74
75 void SaveChartOptions();
76};
77
78/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual void Reset(const SfxItemSet *rInAttrs) override
Definition: optchart.cxx:156
std::unique_ptr< weld::Button > m_xPBDefault
Definition: optchart.hxx:44
void InsertColorEntry(const XColorEntry &rEntry, sal_Int32 nPos=-1)
Definition: optchart.cxx:30
virtual bool FillItemSet(SfxItemSet *rOutAttrs) override
Definition: optchart.cxx:146
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rInAttrs)
Definition: optchart.cxx:141
SvxDefaultColorOptPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rInAttrs)
Definition: optchart.cxx:91
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:42
std::unique_ptr< weld::CustomWeld > m_xValSetColorBoxWin
Definition: optchart.hxx:48
void ModifyColorEntry(const XColorEntry &rEntry, sal_Int32 nPos)
Definition: optchart.cxx:72
std::unique_ptr< SvxColorValueSet > m_xValSetColorBox
Definition: optchart.hxx:47
std::unique_ptr< weld::Button > m_xPBAdd
Definition: optchart.hxx:45
virtual ~SvxDefaultColorOptPage() override
Definition: optchart.cxx:127
PaletteManager aPaletteManager
Definition: optchart.hxx:40
DECL_LINK(SelectPaletteLbHdl, weld::ComboBox &, void)
std::unique_ptr< weld::ComboBox > m_xLbPaletteSelector
Definition: optchart.hxx:43
std::unique_ptr< SvxChartColorTable > m_SvxChartColorTableUniquePtr
Definition: optchart.hxx:37
ImpColorList aColorList
Definition: optchart.hxx:39
std::unique_ptr< weld::Button > m_xPBRemove
Definition: optchart.hxx:46
DECL_LINK(RemoveChartColor, weld::Button &, void)
std::vector< Color > ImpColorList
Definition: optchart.hxx:30