tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / sc / source / ui / inc / mvtabdlg.hxx
blobc6e89ab9fed0f398c5575f75077aed050f737f6f
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 <types.hxx>
23 #include <vcl/weld.hxx>
25 class ScDocument;
27 class ScMoveTableDlg : public weld::GenericDialogController
29 public:
30 ScMoveTableDlg(weld::Window* pParent, OUString aDefault);
31 virtual ~ScMoveTableDlg() override;
33 sal_uInt16 GetSelectedDocument () const { return nDocument; }
34 SCTAB GetSelectedTable () const { return nTable; }
35 bool GetCopyTable () const { return bCopyTable; }
36 bool GetRenameTable () const { return bRenameTable; }
37 void GetTabNameString( OUString& rString ) const;
38 void SetForceCopyTable ();
39 void EnableRenameTable (bool bFlag);
40 void SetOkBtnLabel ();
42 private:
43 void ResetRenameInput();
44 void CheckNewTabName();
45 ScDocument* GetSelectedDoc();
47 private:
48 OUString msCurrentDoc;
49 OUString msNewDoc;
51 OUString msStrTabNameUsed;
52 OUString msStrTabNameEmpty;
53 OUString msStrTabNameInvalid;
55 const OUString maDefaultName;
57 sal_uInt16 mnCurrentDocPos;
58 sal_uInt16 nDocument;
59 SCTAB nTable;
60 bool bCopyTable:1;
61 bool bRenameTable:1;
62 bool mbEverEdited:1;
64 std::unique_ptr<weld::RadioButton> m_xBtnMove;
65 std::unique_ptr<weld::RadioButton> m_xBtnCopy;
66 std::unique_ptr<weld::Label> m_xFtDoc;
67 std::unique_ptr<weld::ComboBox> m_xLbDoc;
68 std::unique_ptr<weld::TreeView> m_xLbTable;
69 std::unique_ptr<weld::Entry> m_xEdTabName;
70 std::unique_ptr<weld::Label> m_xFtWarn;
71 std::unique_ptr<weld::Button> m_xBtnOk;
72 std::unique_ptr<weld::Label> m_xUnusedLabel;
73 std::unique_ptr<weld::Label> m_xEmptyLabel;
74 std::unique_ptr<weld::Label> m_xInvalidLabel;
76 void Init ();
77 void InitDocListBox ();
78 DECL_LINK(OkHdl, weld::Button&, void);
79 DECL_LINK(SelHdl, weld::ComboBox&, void);
80 DECL_LINK(CheckBtnHdl, weld::Toggleable&, void);
81 DECL_LINK(CheckNameHdl, weld::Entry&, void);
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */