tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / dbnamdlg.hxx
blob4958f121d821e187269fae33ee84aa80ea418a27
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 <vector>
23 #include "anyrefdg.hxx"
24 #include <dbdata.hxx>
26 class ScViewData;
27 class ScDocument;
29 class ScDbNameDlg : public ScAnyRefDlgController
31 public:
32 ScDbNameDlg(SfxBindings* pB, SfxChildWindow* pCW, weld::Window* pParent,
33 ScViewData& rViewData);
34 virtual ~ScDbNameDlg() override;
36 virtual void SetReference( const ScRange& rRef, ScDocument& rDoc ) override;
38 virtual bool IsRefInputMode() const override;
39 virtual void SetActive() override;
40 virtual void Close() override;
42 private:
43 bool bSaved;
44 bool bInvalid;
46 OUString aStrAdd;
47 OUString aStrModify;
48 OUString aStrInvalid;
50 OUString aStrSource;
51 OUString aStrOperations;
53 ScViewData& m_rViewData;
54 const ScDocument& rDoc;
55 bool bRefInputMode;
56 ScAddress::Details aAddrDetails;
58 ScDBCollection aLocalDbCol;
59 ScRange theCurArea;
60 std::vector<ScRange> aRemoveList;
62 std::unique_ptr<weld::EntryTreeView> m_xEdName;
64 std::unique_ptr<weld::Frame> m_xAssignFrame;
65 std::unique_ptr<formula::RefEdit> m_xEdAssign;
66 std::unique_ptr<formula::RefButton> m_xRbAssign;
68 std::unique_ptr<weld::Widget> m_xOptions;
69 std::unique_ptr<weld::CheckButton> m_xBtnHeader;
70 std::unique_ptr<weld::CheckButton> m_xBtnTotals;
71 std::unique_ptr<weld::CheckButton> m_xBtnDoSize;
72 std::unique_ptr<weld::CheckButton> m_xBtnKeepFmt;
73 std::unique_ptr<weld::CheckButton> m_xBtnStripData;
74 std::unique_ptr<weld::Label> m_xFTSource;
75 std::unique_ptr<weld::Label> m_xFTOperations;
77 std::unique_ptr<weld::Button> m_xBtnOk;
78 std::unique_ptr<weld::Button> m_xBtnCancel;
79 std::unique_ptr<weld::Button> m_xBtnAdd;
80 std::unique_ptr<weld::Button> m_xBtnRemove;
82 std::unique_ptr<weld::Button> m_xModifyPB;
83 std::unique_ptr<weld::Label> m_xInvalidFT;
85 std::unique_ptr<weld::Label> m_xFrameLabel;
86 std::unique_ptr<weld::Expander> m_xExpander;
87 private:
88 void Init();
89 void UpdateNames();
90 void UpdateDBData( const OUString& rStrName );
91 void SetInfoStrings( const ScDBData* pDBData );
93 DECL_LINK( CancelBtnHdl, weld::Button&, void );
94 DECL_LINK( OkBtnHdl, weld::Button&, void );
95 DECL_LINK( AddBtnHdl, weld::Button&, void );
96 DECL_LINK( RemoveBtnHdl, weld::Button&, void );
97 DECL_LINK( NameModifyHdl, weld::ComboBox&, void );
98 DECL_LINK( AssModifyHdl, formula::RefEdit&, void );
101 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */