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#pragma once
20
21#include <label.hxx>
22#include <labimg.hxx>
23#include <labrec.hxx>
24#include <sfx2/tabdlg.hxx>
25
26class SwLabPage : public SfxTabPage
27{
29 OUString m_sActDBName;
31
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;
45
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);
52
53 void DisplayFormat();
55
56public:
57 SwLabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rSet);
58
59 virtual ~SwLabPage() override;
60
61 static std::unique_ptr<SfxTabPage>
62 Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
63
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;
69
71
72 void SetToBusinessCard();
73
74 void InitDatabaseBox();
75 void SetDBManager(SwDBManager* pDBManager_) { m_pDBManager = pDBManager_; }
77};
78
80{
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;
99
100public:
102 const SfxItemSet& rSet);
103 virtual ~SwPrivateDataPage() override;
104
105 static std::unique_ptr<SfxTabPage>
106 Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
107
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;
112};
113
115{
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;
130
131public:
133 const SfxItemSet& rSet);
134 virtual ~SwBusinessDataPage() override;
135
136 static std::unique_ptr<SfxTabPage>
137 Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rSet);
138
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;
143};
144
145/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SfxOkDialogController * GetDialogController() const
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: label1.cxx:673
std::unique_ptr< weld::Entry > m_xStateED
Definition: swuilabimp.hxx:123
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: label1.cxx:661
std::unique_ptr< weld::Entry > m_xFaxED
Definition: swuilabimp.hxx:127
std::unique_ptr< weld::Entry > m_xCountryED
Definition: swuilabimp.hxx:122
SwBusinessDataPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: label1.cxx:632
std::unique_ptr< weld::Entry > m_xMailED
Definition: swuilabimp.hxx:129
std::unique_ptr< weld::Entry > m_xPositionED
Definition: swuilabimp.hxx:124
std::unique_ptr< weld::Entry > m_xCompanyExtED
Definition: swuilabimp.hxx:117
std::unique_ptr< weld::Entry > m_xCityED
Definition: swuilabimp.hxx:121
std::unique_ptr< weld::Entry > m_xZipED
Definition: swuilabimp.hxx:120
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: label1.cxx:666
virtual ~SwBusinessDataPage() override
Definition: label1.cxx:652
std::unique_ptr< weld::Entry > m_xPhoneED
Definition: swuilabimp.hxx:125
std::unique_ptr< weld::Entry > m_xSloganED
Definition: swuilabimp.hxx:118
std::unique_ptr< weld::Entry > m_xMobilePhoneED
Definition: swuilabimp.hxx:126
std::unique_ptr< weld::Entry > m_xHomePageED
Definition: swuilabimp.hxx:128
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: label1.cxx:656
std::unique_ptr< weld::Entry > m_xStreetED
Definition: swuilabimp.hxx:119
std::unique_ptr< weld::Entry > m_xCompanyED
Definition: swuilabimp.hxx:116
virtual void Reset(const SfxItemSet *rSet) override
Definition: label1.cxx:698
std::unique_ptr< weld::ComboBox > m_xTypeBox
Definition: swuilabimp.hxx:42
std::unique_ptr< weld::ComboBox > m_xHiddenSortTypeBox
Definition: swuilabimp.hxx:43
SwLabDlg * GetParentSwLabDlg()
Definition: swuilabimp.hxx:70
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: label1.cxx:469
void SetDBManager(SwDBManager *pDBManager_)
Definition: swuilabimp.hxx:75
SwLabPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: label1.cxx:210
SwLabItem m_aItem
Definition: swuilabimp.hxx:30
std::unique_ptr< weld::RadioButton > m_xContButton
Definition: swuilabimp.hxx:39
std::unique_ptr< weld::ComboBox > m_xMakeBox
Definition: swuilabimp.hxx:41
std::unique_ptr< weld::Label > m_xFormatInfo
Definition: swuilabimp.hxx:44
SwLabRec * GetSelectedEntryPos()
Definition: label1.cxx:406
std::unique_ptr< weld::Widget > m_xAddressFrame
Definition: swuilabimp.hxx:32
void InitDatabaseBox()
Definition: label1.cxx:413
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: label1.cxx:435
std::unique_ptr< weld::RadioButton > m_xSheetButton
Definition: swuilabimp.hxx:40
std::unique_ptr< weld::TextView > m_xWritingEdit
Definition: swuilabimp.hxx:34
DECL_LINK(DatabaseHdl, weld::ComboBox &, void)
std::unique_ptr< weld::ComboBox > m_xTableLB
Definition: swuilabimp.hxx:36
virtual ~SwLabPage() override
Definition: label1.cxx:261
OUString m_sActDBName
Definition: swuilabimp.hxx:29
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: label1.cxx:445
void DisplayFormat()
Definition: label1.cxx:381
SwDBManager * GetDBManager() const
Definition: swuilabimp.hxx:76
std::unique_ptr< weld::CheckButton > m_xAddrBox
Definition: swuilabimp.hxx:33
DECL_LINK(AddrHdl, weld::Toggleable &, void)
DECL_LINK(TypeHdl, weld::ComboBox &, void)
SwDBManager * m_pDBManager
Definition: swuilabimp.hxx:28
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: label1.cxx:440
DECL_LINK(FieldHdl, weld::Button &, void)
std::unique_ptr< weld::ComboBox > m_xDatabaseLB
Definition: swuilabimp.hxx:35
void FillItem(SwLabItem &rItem)
Definition: label1.cxx:453
DECL_LINK(PageHdl, weld::Toggleable &, void)
DECL_LINK(MakeHdl, weld::ComboBox &, void)
virtual void Reset(const SfxItemSet *rSet) override
Definition: label1.cxx:477
std::unique_ptr< weld::ComboBox > m_xDBFieldLB
Definition: swuilabimp.hxx:38
void SetToBusinessCard()
Definition: label1.cxx:265
std::unique_ptr< weld::Button > m_xInsertBT
Definition: swuilabimp.hxx:37
std::unique_ptr< weld::Entry > m_xStreetED
Definition: swuilabimp.hxx:87
std::unique_ptr< weld::Entry > m_xMailED
Definition: swuilabimp.hxx:98
std::unique_ptr< weld::Entry > m_xMobilePhoneED
Definition: swuilabimp.hxx:95
virtual void Reset(const SfxItemSet *rSet) override
Definition: label1.cxx:609
virtual void ActivatePage(const SfxItemSet &rSet) override
Definition: label1.cxx:568
std::unique_ptr< weld::Entry > m_xZipED
Definition: swuilabimp.hxx:88
SwPrivateDataPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: label1.cxx:535
std::unique_ptr< weld::Entry > m_xCityED
Definition: swuilabimp.hxx:89
std::unique_ptr< weld::Entry > m_xNameED
Definition: swuilabimp.hxx:82
std::unique_ptr< weld::Entry > m_xPhoneED
Definition: swuilabimp.hxx:94
std::unique_ptr< weld::Entry > m_xShortCutED
Definition: swuilabimp.hxx:83
virtual bool FillItemSet(SfxItemSet *rSet) override
Definition: label1.cxx:580
std::unique_ptr< weld::Entry > m_xStateED
Definition: swuilabimp.hxx:91
std::unique_ptr< weld::Entry > m_xProfessionED
Definition: swuilabimp.hxx:93
std::unique_ptr< weld::Entry > m_xHomePageED
Definition: swuilabimp.hxx:97
std::unique_ptr< weld::Entry > m_xFirstNameED
Definition: swuilabimp.hxx:81
std::unique_ptr< weld::Entry > m_xName2ED
Definition: swuilabimp.hxx:85
virtual DeactivateRC DeactivatePage(SfxItemSet *pSet) override
Definition: label1.cxx:573
std::unique_ptr< weld::Entry > m_xFirstName2ED
Definition: swuilabimp.hxx:84
virtual ~SwPrivateDataPage() override
Definition: label1.cxx:559
std::unique_ptr< weld::Entry > m_xShortCut2ED
Definition: swuilabimp.hxx:86
std::unique_ptr< weld::Entry > m_xFaxED
Definition: swuilabimp.hxx:96
std::unique_ptr< weld::Entry > m_xTitleED
Definition: swuilabimp.hxx:92
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rSet)
Definition: label1.cxx:563
std::unique_ptr< weld::Entry > m_xCountryED
Definition: swuilabimp.hxx:90
DeactivateRC