tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / pfiltdlg.hxx
blob892d8655255fa8c86287933dd4736c1989eecfa3
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 <vcl/weld.hxx>
23 #include <address.hxx>
24 #include <queryparam.hxx>
25 #include <array>
26 #include <memory>
28 class ScViewData;
29 class ScDocument;
30 class ScQueryItem;
31 class SfxItemSet;
32 struct ScFilterEntries;
34 class ScPivotFilterDlg : public weld::GenericDialogController
36 public:
37 ScPivotFilterDlg(weld::Window* pParent, const SfxItemSet& rArgSet, SCTAB nSourceTab);
38 virtual ~ScPivotFilterDlg() override;
40 const ScQueryItem& GetOutputItem();
42 private:
43 const OUString aStrNone;
44 const OUString aStrEmpty;
45 const OUString aStrNotEmpty;
46 const OUString aStrColumn;
48 const sal_uInt16 nWhichQuery;
49 const ScQueryParam theQueryData;
50 std::unique_ptr<ScQueryItem> pOutItem;
51 ScViewData* pViewData;
52 ScDocument* pDoc;
53 SCTAB nSrcTab;
55 std::unique_ptr<weld::ComboBox> m_xLbField1;
56 std::unique_ptr<weld::ComboBox> m_xLbCond1;
57 std::unique_ptr<weld::ComboBox> m_xEdVal1;
59 std::unique_ptr<weld::ComboBox> m_xLbConnect1;
60 std::unique_ptr<weld::ComboBox> m_xLbField2;
61 std::unique_ptr<weld::ComboBox> m_xLbCond2;
62 std::unique_ptr<weld::ComboBox> m_xEdVal2;
64 std::unique_ptr<weld::ComboBox> m_xLbConnect2;
65 std::unique_ptr<weld::ComboBox> m_xLbField3;
66 std::unique_ptr<weld::ComboBox> m_xLbCond3;
67 std::unique_ptr<weld::ComboBox> m_xEdVal3;
69 std::unique_ptr<weld::CheckButton> m_xBtnCase;
70 std::unique_ptr<weld::CheckButton> m_xBtnRegExp;
71 std::unique_ptr<weld::CheckButton> m_xBtnUnique;
72 std::unique_ptr<weld::Label> m_xFtDbArea;
74 weld::ComboBox* aValueEdArr[3];
75 weld::ComboBox* aFieldLbArr[3];
76 weld::ComboBox* aCondLbArr[3];
78 std::array<std::unique_ptr<ScFilterEntries>, MAXCOLCOUNT> m_pEntryLists;
80 private:
81 void Init ( const SfxItemSet& rArgSet );
82 void FillFieldLists ();
83 void UpdateValueList ( sal_uInt16 nList );
84 void ClearValueList ( sal_uInt16 nList );
85 sal_uInt16 GetFieldSelPos ( SCCOL nField );
87 // Handler:
88 DECL_LINK( LbSelectHdl, weld::ComboBox&, void );
89 DECL_LINK( ValModifyHdl, weld::ComboBox&, void );
90 DECL_LINK( CheckBoxHdl, weld::Toggleable&, void );
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */