LibreOffice Module sw (master)  1
swuilabimp.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SW_SOURCE_UI_ENVELP_SWUILABIMP_HXX
20 #define INCLUDED_SW_SOURCE_UI_ENVELP_SWUILABIMP_HXX
21 
22 #include <label.hxx>
23 #include <labimg.hxx>
24 #include <labrec.hxx>
25 #include <sfx2/tabdlg.hxx>
26 
27 class SwLabPage : public SfxTabPage
28 {
30  OUString sActDBName;
32 
33  std::unique_ptr<weld::Widget> m_xAddressFrame;
34  std::unique_ptr<weld::CheckButton> m_xAddrBox;
35  std::unique_ptr<weld::TextView> m_xWritingEdit;
36  std::unique_ptr<weld::ComboBox> m_xDatabaseLB;
37  std::unique_ptr<weld::ComboBox> m_xTableLB;
38  std::unique_ptr<weld::Button> m_xInsertBT;
39  std::unique_ptr<weld::ComboBox> m_xDBFieldLB;
40  std::unique_ptr<weld::RadioButton> m_xContButton;
41  std::unique_ptr<weld::RadioButton> m_xSheetButton;
42  std::unique_ptr<weld::ComboBox> m_xMakeBox;
43  std::unique_ptr<weld::ComboBox> m_xTypeBox;
44  std::unique_ptr<weld::ComboBox> m_xHiddenSortTypeBox;
45  std::unique_ptr<weld::Label> m_xFormatInfo;
46 
47  DECL_LINK(AddrHdl, weld::ToggleButton&, void);
48  DECL_LINK(DatabaseHdl, weld::ComboBox&, void);
49  DECL_LINK(FieldHdl, weld::Button&, void);
50  DECL_LINK(PageHdl, weld::ToggleButton&, void);
51  DECL_LINK(MakeHdl, weld::ComboBox&, void);
52  DECL_LINK(TypeHdl, weld::ComboBox&, void);
53 
54  void DisplayFormat();
56 
57 public:
58  SwLabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
59 
60  virtual ~SwLabPage() override;
61 
62  static std::unique_ptr<SfxTabPage>
63  Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
64 
65  virtual void ActivatePage(const SfxItemSet& rSet) override;
66  virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
67  void FillItem(SwLabItem& rItem);
68  virtual bool FillItemSet(SfxItemSet* rSet) override;
69  virtual void Reset(const SfxItemSet* rSet) override;
70 
71  SwLabDlg* GetParentSwLabDlg() { return static_cast<SwLabDlg*>(GetDialogController()); }
72 
73  void SetToBusinessCard();
74 
75  void InitDatabaseBox();
76  void SetDBManager(SwDBManager* pDBManager_) { pDBManager = pDBManager_; }
77  SwDBManager* GetDBManager() const { return pDBManager; }
78 };
79 
81 {
82  std::unique_ptr<weld::Entry> m_xFirstNameED;
83  std::unique_ptr<weld::Entry> m_xNameED;
84  std::unique_ptr<weld::Entry> m_xShortCutED;
85  std::unique_ptr<weld::Entry> m_xFirstName2ED;
86  std::unique_ptr<weld::Entry> m_xName2ED;
87  std::unique_ptr<weld::Entry> m_xShortCut2ED;
88  std::unique_ptr<weld::Entry> m_xStreetED;
89  std::unique_ptr<weld::Entry> m_xZipED;
90  std::unique_ptr<weld::Entry> m_xCityED;
91  std::unique_ptr<weld::Entry> m_xCountryED;
92  std::unique_ptr<weld::Entry> m_xStateED;
93  std::unique_ptr<weld::Entry> m_xTitleED;
94  std::unique_ptr<weld::Entry> m_xProfessionED;
95  std::unique_ptr<weld::Entry> m_xPhoneED;
96  std::unique_ptr<weld::Entry> m_xMobilePhoneED;
97  std::unique_ptr<weld::Entry> m_xFaxED;
98  std::unique_ptr<weld::Entry> m_xHomePageED;
99  std::unique_ptr<weld::Entry> m_xMailED;
100 
101 public:
103  const SfxItemSet& rSet);
104  virtual ~SwPrivateDataPage() override;
105 
106  static std::unique_ptr<SfxTabPage>
107  Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
108 
109  virtual void ActivatePage(const SfxItemSet& rSet) override;
110  virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
111  virtual bool FillItemSet(SfxItemSet* rSet) override;
112  virtual void Reset(const SfxItemSet* rSet) override;
113 };
114 
116 {
117  std::unique_ptr<weld::Entry> m_xCompanyED;
118  std::unique_ptr<weld::Entry> m_xCompanyExtED;
119  std::unique_ptr<weld::Entry> m_xSloganED;
120  std::unique_ptr<weld::Entry> m_xStreetED;
121  std::unique_ptr<weld::Entry> m_xZipED;
122  std::unique_ptr<weld::Entry> m_xCityED;
123  std::unique_ptr<weld::Entry> m_xCountryED;
124  std::unique_ptr<weld::Entry> m_xStateED;
125  std::unique_ptr<weld::Entry> m_xPositionED;
126  std::unique_ptr<weld::Entry> m_xPhoneED;
127  std::unique_ptr<weld::Entry> m_xMobilePhoneED;
128  std::unique_ptr<weld::Entry> m_xFaxED;
129  std::unique_ptr<weld::Entry> m_xHomePageED;
130  std::unique_ptr<weld::Entry> m_xMailED;
131 
132 public:
134  const SfxItemSet& rSet);
135  virtual ~SwBusinessDataPage() override;
136 
137  static std::unique_ptr<SfxTabPage>
138  Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
139 
140  virtual void ActivatePage(const SfxItemSet& rSet) override;
141  virtual DeactivateRC DeactivatePage(SfxItemSet* pSet) override;
142  virtual bool FillItemSet(SfxItemSet* rSet) override;
143  virtual void Reset(const SfxItemSet* rSet) override;
144 };
145 
146 #endif
147 
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::Entry > m_xCompanyED
Definition: swuilabimp.hxx:117
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: label1.cxx:453
SwLabRec * GetSelectedEntryPos()
Definition: label1.cxx:414
std::unique_ptr< weld::Widget > m_xAddressFrame
Definition: swuilabimp.hxx:33
const SfxItemSet * pSet
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: label1.cxx:571
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: label1.cxx:664
std::unique_ptr< weld::Entry > m_xStreetED
Definition: swuilabimp.hxx:88
std::unique_ptr< weld::Entry > m_xZipED
Definition: swuilabimp.hxx:121
void FillItem(SwLabItem &rItem)
Definition: label1.cxx:461
std::unique_ptr< weld::ComboBox > m_xDBFieldLB
Definition: swuilabimp.hxx:39
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: label1.cxx:669
std::unique_ptr< weld::Entry > m_xCompanyExtED
Definition: swuilabimp.hxx:118
std::unique_ptr< weld::TextView > m_xWritingEdit
Definition: swuilabimp.hxx:35
std::unique_ptr< weld::ComboBox > m_xHiddenSortTypeBox
Definition: swuilabimp.hxx:44
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: label1.cxx:581
std::unique_ptr< weld::ComboBox > m_xMakeBox
Definition: swuilabimp.hxx:42
DECL_LINK(AddrHdl, weld::ToggleButton &, void)
void DisplayFormat()
Definition: label1.cxx:390
std::unique_ptr< weld::CheckButton > m_xAddrBox
Definition: swuilabimp.hxx:34
OUString sActDBName
Definition: swuilabimp.hxx:30
SwLabItem aItem
Definition: swuilabimp.hxx:31
std::unique_ptr< weld::ComboBox > m_xTypeBox
Definition: swuilabimp.hxx:43
virtual ~SwLabPage() override
Definition: label1.cxx:269
std::unique_ptr< weld::Entry > m_xPositionED
Definition: swuilabimp.hxx:125
virtual void Reset(const SfxItemSet *rSet) override
Definition: label1.cxx:617
SwDBManager * pDBManager
Definition: swuilabimp.hxx:29
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: label1.cxx:448
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: label1.cxx:443
std::unique_ptr< weld::Entry > m_xShortCutED
Definition: swuilabimp.hxx:84
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: label1.cxx:576
std::unique_ptr< weld::Entry > m_xMobilePhoneED
Definition: swuilabimp.hxx:127
std::unique_ptr< weld::Entry > m_xName2ED
Definition: swuilabimp.hxx:86
void InitDatabaseBox()
Definition: label1.cxx:421
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: label1.cxx:588
virtual ~SwBusinessDataPage() override
Definition: label1.cxx:660
SwDBManager * GetDBManager() const
Definition: swuilabimp.hxx:77
std::unique_ptr< weld::Entry > m_xShortCut2ED
Definition: swuilabimp.hxx:87
std::unique_ptr< weld::Button > m_xInsertBT
Definition: swuilabimp.hxx:38
std::unique_ptr< weld::Entry > m_xCityED
Definition: swuilabimp.hxx:90
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: label1.cxx:681
std::unique_ptr< weld::Entry > m_xStreetED
Definition: swuilabimp.hxx:120
std::unique_ptr< weld::Entry > m_xZipED
Definition: swuilabimp.hxx:89
virtual void Reset(const SfxItemSet *rSet) override
Definition: label1.cxx:485
std::unique_ptr< weld::Entry > m_xNameED
Definition: swuilabimp.hxx:83
void SetToBusinessCard()
Definition: label1.cxx:273
void SetDBManager(SwDBManager *pDBManager_)
Definition: swuilabimp.hxx:76
virtual ~SwPrivateDataPage() override
Definition: label1.cxx:567
std::unique_ptr< weld::Entry > m_xProfessionED
Definition: swuilabimp.hxx:94
std::unique_ptr< weld::Entry > m_xPhoneED
Definition: swuilabimp.hxx:95
std::unique_ptr< weld::Entry > m_xCountryED
Definition: swuilabimp.hxx:123
std::unique_ptr< weld::Entry > m_xFirstNameED
Definition: swuilabimp.hxx:82
SwPrivateDataPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: label1.cxx:543
std::unique_ptr< weld::Entry > m_xCityED
Definition: swuilabimp.hxx:122
virtual void Reset(const SfxItemSet *rSet) override
Definition: label1.cxx:706
std::unique_ptr< weld::RadioButton > m_xContButton
Definition: swuilabimp.hxx:40
SwLabDlg * GetParentSwLabDlg()
Definition: swuilabimp.hxx:71
std::unique_ptr< weld::Entry > m_xMobilePhoneED
Definition: swuilabimp.hxx:96
std::unique_ptr< weld::Entry > m_xFaxED
Definition: swuilabimp.hxx:128
std::unique_ptr< weld::Entry > m_xMailED
Definition: swuilabimp.hxx:99
std::unique_ptr< weld::Label > m_xFormatInfo
Definition: swuilabimp.hxx:45
std::unique_ptr< weld::Entry > m_xTitleED
Definition: swuilabimp.hxx:93
std::unique_ptr< weld::Entry > m_xStateED
Definition: swuilabimp.hxx:124
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: label1.cxx:674
SfxOkDialogController * GetDialogController() const
std::unique_ptr< weld::Entry > m_xHomePageED
Definition: swuilabimp.hxx:98
SwBusinessDataPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: label1.cxx:640
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: label1.cxx:477
DeactivateRC
std::unique_ptr< weld::Entry > m_xCountryED
Definition: swuilabimp.hxx:91
std::unique_ptr< weld::Entry > m_xHomePageED
Definition: swuilabimp.hxx:129
std::unique_ptr< weld::Entry > m_xFaxED
Definition: swuilabimp.hxx:97
SwLabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: label1.cxx:218
std::unique_ptr< weld::Entry > m_xSloganED
Definition: swuilabimp.hxx:119
std::unique_ptr< weld::Entry > m_xPhoneED
Definition: swuilabimp.hxx:126
std::unique_ptr< weld::Entry > m_xFirstName2ED
Definition: swuilabimp.hxx:85
std::unique_ptr< weld::Entry > m_xStateED
Definition: swuilabimp.hxx:92
std::unique_ptr< weld::Entry > m_xMailED
Definition: swuilabimp.hxx:130
std::unique_ptr< weld::ComboBox > m_xDatabaseLB
Definition: swuilabimp.hxx:36
std::unique_ptr< weld::ComboBox > m_xTableLB
Definition: swuilabimp.hxx:37
std::unique_ptr< weld::RadioButton > m_xSheetButton
Definition: swuilabimp.hxx:41