tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / tpsubt.hxx
blob42eed5e4046e83a87c2a141bb6df54c7ddfe0d47
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include <sfx2/tabdlg.hxx>
23 #include <global.hxx>
25 class ScViewData;
26 class ScDocument;
27 struct ScSubTotalParam;
28 class ScSubTotalItem;
30 class ScTpSubTotalGroup : public SfxTabPage
32 protected:
33 ScTpSubTotalGroup(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rArgSet, const sal_uInt16& nTabNumber);
35 public:
36 virtual ~ScTpSubTotalGroup() override;
38 bool DoReset ( sal_uInt16 nGroupNo,
39 const SfxItemSet& rArgSet );
40 bool DoFillItemSet ( sal_uInt16 nGroupNo,
41 SfxItemSet& rArgSet );
42 private:
43 void Init ();
44 void FillListBoxes ();
45 static ScSubTotalFunc LbPosToFunc ( sal_uInt16 nPos );
46 static sal_uInt16 FuncToLbPos ( ScSubTotalFunc eFunc );
47 sal_uInt16 GetFieldSelPos ( SCCOL nField );
49 // Handler ------------------------
50 DECL_LINK( SelectListBoxHdl, weld::ComboBox&, void );
51 DECL_LINK( SelectTreeListBoxHdl, weld::TreeView&, void );
52 DECL_LINK(CheckHdl, const weld::TreeView::iter_col&, void);
53 DECL_LINK(CheckBoxHdl, weld::Toggleable&, void);
54 void SelectHdl(const weld::Widget*);
56 const OUString aStrNone;
57 const OUString aStrColumn;
59 ScViewData* pViewData;
60 ScDocument* pDoc;
62 const TypedWhichId<ScSubTotalItem> nWhichSubTotals;
63 const ScSubTotalParam& rSubTotalData;
64 std::vector<SCCOL> mnFieldArr;
65 sal_uInt16 nFieldCount;
67 std::unique_ptr<weld::ComboBox> mxLbGroup;
68 std::unique_ptr<weld::TreeView> mxLbColumns;
69 std::unique_ptr<weld::TreeView> mxLbFunctions;
70 std::unique_ptr<weld::CheckButton> mxLbSelectAllColumns;
73 class ScTpSubTotalGroup1 final : public ScTpSubTotalGroup
75 public:
76 ScTpSubTotalGroup1( weld::Container* pPage, weld::DialogController* pController,
77 const SfxItemSet& rArgSet );
78 static std::unique_ptr<SfxTabPage> Create ( weld::Container* pPage, weld::DialogController* pController,
79 const SfxItemSet* rArgSet );
80 virtual ~ScTpSubTotalGroup1() override;
82 virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
83 virtual void Reset ( const SfxItemSet* rArgSet ) override;
86 class ScTpSubTotalGroup2 final : public ScTpSubTotalGroup
88 public:
89 ScTpSubTotalGroup2( weld::Container* pPage, weld::DialogController* pController,
90 const SfxItemSet& rArgSet );
91 static std::unique_ptr<SfxTabPage> Create ( weld::Container* pPage, weld::DialogController* pController,
92 const SfxItemSet* rArgSet );
93 virtual ~ScTpSubTotalGroup2() override;
95 virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
96 virtual void Reset ( const SfxItemSet* rArgSet ) override;
99 class ScTpSubTotalGroup3 final : public ScTpSubTotalGroup
101 public:
102 ScTpSubTotalGroup3( weld::Container* pPage, weld::DialogController* pController,
103 const SfxItemSet& rArgSet );
104 static std::unique_ptr<SfxTabPage> Create ( weld::Container* pPage, weld::DialogController* pController,
105 const SfxItemSet* rArgSet );
106 virtual ~ScTpSubTotalGroup3() override;
108 virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
109 virtual void Reset ( const SfxItemSet* rArgSet ) override;
112 class ScTpSubTotalOptions final : public SfxTabPage
114 public:
115 ScTpSubTotalOptions(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rArgSet);
116 static std::unique_ptr<SfxTabPage> Create ( weld::Container* pPage, weld::DialogController* pController,
117 const SfxItemSet* rArgSet );
118 virtual ~ScTpSubTotalOptions() override;
120 virtual bool FillItemSet ( SfxItemSet* rArgSet ) override;
121 virtual void Reset ( const SfxItemSet* rArgSet ) override;
123 private:
124 void Init ();
125 void FillUserSortListBox ();
127 // Handler ------------------------
128 DECL_LINK(CheckHdl, weld::Toggleable&, void);
130 ScViewData* pViewData;
131 ScDocument* pDoc;
132 const TypedWhichId<ScSubTotalItem> nWhichSubTotals;
133 const ScSubTotalParam& rSubTotalData;
135 std::unique_ptr<weld::CheckButton> m_xBtnPagebreak;
136 std::unique_ptr<weld::CheckButton> m_xBtnCase;
137 std::unique_ptr<weld::CheckButton> m_xBtnSort;
138 std::unique_ptr<weld::CheckButton> m_xBtnSummary;
139 std::unique_ptr<weld::Label> m_xFlSort;
140 std::unique_ptr<weld::RadioButton> m_xBtnAscending;
141 std::unique_ptr<weld::RadioButton> m_xBtnDescending;
142 std::unique_ptr<weld::CheckButton> m_xBtnFormats;
143 std::unique_ptr<weld::CheckButton> m_xBtnUserDef;
144 std::unique_ptr<weld::ComboBox> m_xLbUserDef;
147 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */