tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / dataproviderdlg.hxx
blob127b6361abbd7883b70f94ec03ffcc844e711977
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/.
8 */
10 #pragma once
12 #include <datamapper.hxx>
14 #include <sal/config.h>
16 #include <com/sun/star/awt/XWindow.hpp>
17 #include <vcl/idle.hxx>
18 #include <vcl/weld.hxx>
19 #include "datatableview.hxx"
20 #include <memory>
22 class ScDocument;
23 class ScDataTransformationBaseControl;
24 class ScDBData;
26 class ScDataProviderDlg : public weld::GenericDialogController
28 private:
29 std::shared_ptr<ScDocument> mxDoc;
30 std::unique_ptr<weld::Container> mxBox;
31 css::uno::Reference<css::awt::XWindow> m_xTableParent;
32 VclPtr<ScDataTableView> mxTable;
33 std::unique_ptr<weld::Container> mxList;
34 std::unique_ptr<weld::ComboBox> mxDBRanges;
35 std::unique_ptr<weld::Button> mxOKBtn;
36 std::unique_ptr<weld::Button> mxCancelBtn;
37 std::unique_ptr<weld::Button> mxAddTransformationBtn;
38 std::unique_ptr<weld::ScrolledWindow> mxScroll;
39 std::unique_ptr<weld::Container> mxTransformationList;
40 std::unique_ptr<weld::ComboBox> mxTransformationBox;
41 std::unique_ptr<weld::ComboBox> mxProviderList;
42 std::unique_ptr<weld::Entry> mxEditURL;
43 std::unique_ptr<weld::Entry> mxEditID;
44 std::unique_ptr<weld::Button> mxApplyBtn;
45 std::unique_ptr<weld::Button> mxBrowseBtn;
47 OUString msApplyTooltip;
48 OUString msAddTransformationToolTip;
50 std::vector<std::unique_ptr<ScDataTransformationBaseControl>> maControls;
52 Idle maIdle;
54 sal_uInt32 mnIndex;
55 ScDBData* pDBData;
57 DECL_LINK(StartMenuHdl, const OString&, void);
58 DECL_LINK(ColumnMenuHdl, const weld::ComboBox&, void);
59 DECL_LINK(ScrollToEnd, Timer*, void);
60 DECL_LINK(ApplyQuitHdl, weld::Button&, void);
61 DECL_LINK(CancelQuitHdl, weld::Button&, void);
62 DECL_LINK(TransformationListHdl, weld::Button&, void);
63 DECL_LINK(ProviderSelectHdl, weld::ComboBox&, void);
64 DECL_LINK(TransformationSelectHdl, weld::ComboBox&, void);
65 DECL_LINK(IDEditHdl, weld::Entry&, void);
66 DECL_LINK(URLEditHdl, weld::Entry&, void);
67 DECL_LINK(ApplyBtnHdl, weld::Button&, void);
68 DECL_LINK(BrowseBtnHdl, weld::Button&, void);
70 public:
71 ScDataProviderDlg(weld::Window* pWindow, std::shared_ptr<ScDocument> pDoc,
72 const ScDocument* pDocument);
73 virtual ~ScDataProviderDlg() override;
75 void applyAndQuit();
76 void cancelAndQuit();
78 void deleteColumn();
79 void splitColumn();
80 void mergeColumns();
81 void textTransformation();
82 void sortTransformation();
83 void aggregateFunction();
84 void numberTransformation();
85 void deletefromList(sal_uInt32 nIndex);
86 void replaceNullTransformation();
87 void dateTimeTransformation();
88 void findReplaceTransformation();
89 void deleteRowTransformation();
90 void swapRowsTransformation();
92 void updateApplyBtn(bool bValidConfig);
93 void isValid();
95 sc::ExternalDataSource getDataSource(ScDocument* pDoc);
97 void import(ScDocument& rDoc, bool bInternal = false);
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */