tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / datafdlg.hxx
blobcb61d0cc3cc551dc5ceb6d52c83cfc86762ccd0a
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 <vcl/weld.hxx>
13 #include <types.hxx>
14 #include "viewfunc.hxx"
16 class ScTabViewShell;
17 class ScDocument;
19 #define MAX_DATAFORM_COLS 32
20 #define MAX_DATAFORM_ROWS 32000
22 class ScDataFormDlg : public weld::GenericDialogController
24 private:
25 OUString sNewRecord;
27 ScTabViewShell* pTabViewShell;
28 ScDocument* pDoc;
29 sal_uInt16 aColLength;
30 SCROW nCurrentRow;
31 SCCOL nStartCol;
32 SCCOL nEndCol;
33 SCROW nStartRow;
34 SCROW nEndRow;
35 SCTAB nTab;
37 std::unique_ptr<weld::Button> m_xBtnNew;
38 std::unique_ptr<weld::Button> m_xBtnDelete;
39 std::unique_ptr<weld::Button> m_xBtnRestore;
40 std::unique_ptr<weld::Button> m_xBtnPrev;
41 std::unique_ptr<weld::Button> m_xBtnNext;
42 std::unique_ptr<weld::Button> m_xBtnClose;
43 std::unique_ptr<weld::ScrolledWindow> m_xSlider;
44 std::unique_ptr<weld::Container> m_xGrid;
45 std::unique_ptr<weld::Label> m_xFixedText;
46 std::vector<std::unique_ptr<ScDataFormFragment>> m_aEntries;
48 public:
49 ScDataFormDlg(weld::Window* pParent, ScTabViewShell* pTabViewShell);
50 virtual ~ScDataFormDlg() override;
52 void FillCtrls();
53 private:
55 void SetButtonState();
57 // Handler:
58 DECL_LINK(Impl_NewHdl, weld::Button&, void);
59 DECL_LINK(Impl_PrevHdl, weld::Button&, void);
60 DECL_LINK(Impl_NextHdl, weld::Button&, void);
62 DECL_LINK(Impl_RestoreHdl, weld::Button&, void);
63 DECL_LINK(Impl_DeleteHdl, weld::Button&, void);
64 DECL_LINK(Impl_CloseHdl, weld::Button&, void);
66 DECL_LINK(Impl_ScrollHdl, weld::ScrolledWindow&, void);
67 DECL_LINK(Impl_DataModifyHdl, weld::Entry&, void);
70 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */