Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / sw / source / ui / envelp / swuilabimp.hxx
blob222c9fd911ccae5a5d9137e9140e03ce51999d35
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 .
19 #pragma once
21 #include <label.hxx>
22 #include <labimg.hxx>
23 #include <labrec.hxx>
24 #include <sfx2/tabdlg.hxx>
26 class SwLabPage : public SfxTabPage
28 SwDBManager* m_pDBManager;
29 OUString m_sActDBName;
30 SwLabItem m_aItem;
32 std::unique_ptr<weld::Widget> m_xAddressFrame;
33 std::unique_ptr<weld::CheckButton> m_xAddrBox;
34 std::unique_ptr<weld::TextView> m_xWritingEdit;
35 std::unique_ptr<weld::ComboBox> m_xDatabaseLB;
36 std::unique_ptr<weld::ComboBox> m_xTableLB;
37 std::unique_ptr<weld::Button> m_xInsertBT;
38 std::unique_ptr<weld::ComboBox> m_xDBFieldLB;
39 std::unique_ptr<weld::RadioButton> m_xContButton;
40 std::unique_ptr<weld::RadioButton> m_xSheetButton;
41 std::unique_ptr<weld::ComboBox> m_xMakeBox;
42 std::unique_ptr<weld::ComboBox> m_xTypeBox;
43 std::unique_ptr<weld::ComboBox> m_xHiddenSortTypeBox;
44 std::unique_ptr<weld::Label> m_xFormatInfo;
46 DECL_LINK(AddrHdl, weld::Toggleable&, void);
47 DECL_LINK(DatabaseHdl, weld::ComboBox&, void);
48 DECL_LINK(FieldHdl, weld::Button&, void);
49 DECL_LINK(PageHdl, weld::Toggleable&, void);
50 DECL_LINK(MakeHdl, weld::ComboBox&, void);
51 DECL_LINK(TypeHdl, weld::ComboBox&, void);
53 void DisplayFormat();
54 SwLabRec* GetSelectedEntryPos();
56 public:
57 SwLabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
59 virtual ~SwLabPage() override;
61 static std::unique_ptr<SfxTabPage>
62 Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
64 virtual void ActivatePage(const SfxItemSet& rSet) override;
65 virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
66 void FillItem(SwLabItem& rItem);
67 virtual bool FillItemSet(SfxItemSet* rSet) override;
68 virtual void Reset(const SfxItemSet* rSet) override;
70 SwLabDlg* GetParentSwLabDlg() { return static_cast<SwLabDlg*>(GetDialogController()); }
72 void SetToBusinessCard();
74 void InitDatabaseBox();
75 void SetDBManager(SwDBManager* pDBManager_) { m_pDBManager = pDBManager_; }
76 SwDBManager* GetDBManager() const { return m_pDBManager; }
79 class SwPrivateDataPage : public SfxTabPage
81 std::unique_ptr<weld::Entry> m_xFirstNameED;
82 std::unique_ptr<weld::Entry> m_xNameED;
83 std::unique_ptr<weld::Entry> m_xShortCutED;
84 std::unique_ptr<weld::Entry> m_xFirstName2ED;
85 std::unique_ptr<weld::Entry> m_xName2ED;
86 std::unique_ptr<weld::Entry> m_xShortCut2ED;
87 std::unique_ptr<weld::Entry> m_xStreetED;
88 std::unique_ptr<weld::Entry> m_xZipED;
89 std::unique_ptr<weld::Entry> m_xCityED;
90 std::unique_ptr<weld::Entry> m_xCountryED;
91 std::unique_ptr<weld::Entry> m_xStateED;
92 std::unique_ptr<weld::Entry> m_xTitleED;
93 std::unique_ptr<weld::Entry> m_xProfessionED;
94 std::unique_ptr<weld::Entry> m_xPhoneED;
95 std::unique_ptr<weld::Entry> m_xMobilePhoneED;
96 std::unique_ptr<weld::Entry> m_xFaxED;
97 std::unique_ptr<weld::Entry> m_xHomePageED;
98 std::unique_ptr<weld::Entry> m_xMailED;
100 public:
101 SwPrivateDataPage(weld::Container* pPage, weld::DialogController* pController,
102 const SfxItemSet& rSet);
103 virtual ~SwPrivateDataPage() override;
105 static std::unique_ptr<SfxTabPage>
106 Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
108 virtual void ActivatePage(const SfxItemSet& rSet) override;
109 virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
110 virtual bool FillItemSet(SfxItemSet* rSet) override;
111 virtual void Reset(const SfxItemSet* rSet) override;
114 class SwBusinessDataPage : public SfxTabPage
116 std::unique_ptr<weld::Entry> m_xCompanyED;
117 std::unique_ptr<weld::Entry> m_xCompanyExtED;
118 std::unique_ptr<weld::Entry> m_xSloganED;
119 std::unique_ptr<weld::Entry> m_xStreetED;
120 std::unique_ptr<weld::Entry> m_xZipED;
121 std::unique_ptr<weld::Entry> m_xCityED;
122 std::unique_ptr<weld::Entry> m_xCountryED;
123 std::unique_ptr<weld::Entry> m_xStateED;
124 std::unique_ptr<weld::Entry> m_xPositionED;
125 std::unique_ptr<weld::Entry> m_xPhoneED;
126 std::unique_ptr<weld::Entry> m_xMobilePhoneED;
127 std::unique_ptr<weld::Entry> m_xFaxED;
128 std::unique_ptr<weld::Entry> m_xHomePageED;
129 std::unique_ptr<weld::Entry> m_xMailED;
131 public:
132 SwBusinessDataPage(weld::Container* pPage, weld::DialogController* pController,
133 const SfxItemSet& rSet);
134 virtual ~SwBusinessDataPage() override;
136 static std::unique_ptr<SfxTabPage>
137 Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
139 virtual void ActivatePage(const SfxItemSet& rSet) override;
140 virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
141 virtual bool FillItemSet(SfxItemSet* rSet) override;
142 virtual void Reset(const SfxItemSet* rSet) override;
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */