LibreOffice Module extensions (master) 1
general.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
20#pragma once
21
22#include <sal/config.h>
23
26
27
28class BibDataManager;
29#define TYPE_COUNT 22
30#define FIELD_COUNT 31
31
32class ChangeListener;
33
35 , public BibShortCutHandler
36{
37 std::unique_ptr<weld::ScrolledWindow> xScrolledWindow;
38 std::unique_ptr<weld::Widget> xGrid;
39
40 std::unique_ptr<weld::Label> xIdentifierFT;
41 std::unique_ptr<weld::Entry> xIdentifierED;
42
43 std::unique_ptr<weld::Label> xAuthTypeFT;
44 std::unique_ptr<weld::ComboBox> xAuthTypeLB;
45 std::unique_ptr<weld::Label> xYearFT;
46 std::unique_ptr<weld::Entry> xYearED;
47
48 std::unique_ptr<weld::Label> xAuthorFT;
49 std::unique_ptr<weld::Entry> xAuthorED;
50 std::unique_ptr<weld::Label> xTitleFT;
51 std::unique_ptr<weld::Entry> xTitleED;
52
53 std::unique_ptr<weld::Label> xPublisherFT;
54 std::unique_ptr<weld::Entry> xPublisherED;
55 std::unique_ptr<weld::Label> xAddressFT;
56 std::unique_ptr<weld::Entry> xAddressED;
57 std::unique_ptr<weld::Label> xISBNFT;
58 std::unique_ptr<weld::Entry> xISBNED;
59
60 std::unique_ptr<weld::Label> xChapterFT;
61 std::unique_ptr<weld::Entry> xChapterED;
62 std::unique_ptr<weld::Label> xPagesFT;
63 std::unique_ptr<weld::Entry> xPagesED;
64
65 std::unique_ptr<weld::Label> xEditorFT;
66 std::unique_ptr<weld::Entry> xEditorED;
67 std::unique_ptr<weld::Label> xEditionFT;
68 std::unique_ptr<weld::Entry> xEditionED;
69
70 std::unique_ptr<weld::Label> xBooktitleFT;
71 std::unique_ptr<weld::Entry> xBooktitleED;
72 std::unique_ptr<weld::Label> xVolumeFT;
73 std::unique_ptr<weld::Entry> xVolumeED;
74 std::unique_ptr<weld::Label> xHowpublishedFT;
75 std::unique_ptr<weld::Entry> xHowpublishedED;
76
77 std::unique_ptr<weld::Label> xOrganizationsFT;
78 std::unique_ptr<weld::Entry> xOrganizationsED;
79 std::unique_ptr<weld::Label> xInstitutionFT;
80 std::unique_ptr<weld::Entry> xInstitutionED;
81 std::unique_ptr<weld::Label> xSchoolFT;
82 std::unique_ptr<weld::Entry> xSchoolED;
83
84 std::unique_ptr<weld::Label> xReportTypeFT;
85 std::unique_ptr<weld::Entry> xReportTypeED;
86 std::unique_ptr<weld::Label> xMonthFT;
87 std::unique_ptr<weld::Entry> xMonthED;
88
89 std::unique_ptr<weld::Label> xJournalFT;
90 std::unique_ptr<weld::Entry> xJournalED;
91 std::unique_ptr<weld::Label> xNumberFT;
92 std::unique_ptr<weld::Entry> xNumberED;
93 std::unique_ptr<weld::Label> xSeriesFT;
94 std::unique_ptr<weld::Entry> xSeriesED;
95
96 std::unique_ptr<weld::Label> xAnnoteFT;
97 std::unique_ptr<weld::Entry> xAnnoteED;
98 std::unique_ptr<weld::Label> xNoteFT;
99 std::unique_ptr<weld::Entry> xNoteED;
100 std::unique_ptr<weld::Label> xURLFT;
101 std::unique_ptr<weld::Entry> xURLED;
102
103 std::unique_ptr<weld::Label> xCustom1FT;
104 std::unique_ptr<weld::Entry> xCustom1ED;
105 std::unique_ptr<weld::Label> xCustom2FT;
106 std::unique_ptr<weld::Entry> xCustom2ED;
107 std::unique_ptr<weld::Label> xCustom3FT;
108 std::unique_ptr<weld::Entry> xCustom3ED;
109 std::unique_ptr<weld::Label> xCustom4FT;
110 std::unique_ptr<weld::Entry> xCustom4ED;
111 std::unique_ptr<weld::Label> xCustom5FT;
112 std::unique_ptr<weld::Entry> xCustom5ED;
113 std::unique_ptr<weld::Label> m_xLocalURLFT;
114 std::unique_ptr<weld::Entry> m_xLocalURLED;
115 std::unique_ptr<weld::Button> m_xLocalBrowseButton;
116 std::unique_ptr<weld::CheckButton> m_xLocalPageCB;
117 std::unique_ptr<weld::SpinButton> m_xLocalPageSB;
118
120
121 std::vector<rtl::Reference<ChangeListener>> maChangeListeners;
123
125
126 bool AddXControl(const OUString& rName, weld::Entry& rEntry);
127 bool AddXControl(const OUString& rName, weld::ComboBox& rList);
128
129 template<class Target> void AddControlWithError(const OUString& rColumnName, const OUString& rColumnUIName,
130 Target& rWidget, OUString& rErrorString, const OUString& rHelpId);
131
132 void SaveChanges();
133
134 DECL_LINK(GainFocusHdl, weld::Widget&, void);
135
136 DECL_LINK(FirstElementKeyInputHdl, const KeyEvent&, bool);
137 DECL_LINK(LastElementKeyInputHdl, const KeyEvent&, bool);
138 DECL_LINK(BrowseHdl, weld::Button&, void);
139 DECL_LINK(PageNumHdl, weld::Toggleable&, void);
140 DECL_LINK(LosePageFocusHdl, weld::Widget&, void);
141
142public:
144 virtual ~BibGeneralPage() override;
145 virtual void dispose() override;
146
147 const OUString& GetErrorString() const
148 {
149 return sTableErrorString;
150 }
151
155};
156
157
158/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
std::unique_ptr< weld::Label > xSchoolFT
Definition: general.hxx:81
DECL_LINK(LastElementKeyInputHdl, const KeyEvent &, bool)
std::unique_ptr< weld::CheckButton > m_xLocalPageCB
Definition: general.hxx:116
std::unique_ptr< weld::Label > xReportTypeFT
Definition: general.hxx:84
std::unique_ptr< weld::Entry > xSchoolED
Definition: general.hxx:82
std::unique_ptr< weld::ScrolledWindow > xScrolledWindow
Definition: general.hxx:37
std::unique_ptr< weld::Entry > xCustom2ED
Definition: general.hxx:106
std::unique_ptr< weld::Entry > xTitleED
Definition: general.hxx:51
std::unique_ptr< weld::Label > xCustom5FT
Definition: general.hxx:111
std::unique_ptr< weld::Label > xBooktitleFT
Definition: general.hxx:70
std::unique_ptr< weld::Label > xIdentifierFT
Definition: general.hxx:40
std::unique_ptr< weld::Label > xNoteFT
Definition: general.hxx:98
std::unique_ptr< weld::SpinButton > m_xLocalPageSB
Definition: general.hxx:117
std::vector< rtl::Reference< ChangeListener > > maChangeListeners
Definition: general.hxx:121
std::unique_ptr< weld::Label > xURLFT
Definition: general.hxx:100
std::unique_ptr< weld::Entry > xNumberED
Definition: general.hxx:92
std::unique_ptr< weld::Label > xAuthTypeFT
Definition: general.hxx:43
std::unique_ptr< weld::Label > xISBNFT
Definition: general.hxx:57
std::unique_ptr< weld::Label > xNumberFT
Definition: general.hxx:91
std::unique_ptr< weld::Label > xSeriesFT
Definition: general.hxx:93
virtual ~BibGeneralPage() override
Definition: general.cxx:472
std::unique_ptr< weld::Entry > xCustom3ED
Definition: general.hxx:108
std::unique_ptr< weld::Label > xOrganizationsFT
Definition: general.hxx:77
std::unique_ptr< weld::Entry > xMonthED
Definition: general.hxx:87
std::unique_ptr< weld::Label > xAnnoteFT
Definition: general.hxx:96
std::unique_ptr< weld::Entry > xCustom4ED
Definition: general.hxx:110
std::unique_ptr< weld::Label > xYearFT
Definition: general.hxx:45
std::unique_ptr< weld::Entry > xReportTypeED
Definition: general.hxx:85
std::unique_ptr< weld::Entry > xYearED
Definition: general.hxx:46
std::unique_ptr< weld::Entry > xVolumeED
Definition: general.hxx:73
std::unique_ptr< weld::Label > xInstitutionFT
Definition: general.hxx:79
std::unique_ptr< weld::Label > xVolumeFT
Definition: general.hxx:72
std::unique_ptr< weld::Entry > xCustom1ED
Definition: general.hxx:104
std::unique_ptr< weld::Entry > xJournalED
Definition: general.hxx:90
std::unique_ptr< weld::Label > xEditionFT
Definition: general.hxx:67
std::unique_ptr< weld::Entry > xISBNED
Definition: general.hxx:58
std::unique_ptr< weld::Entry > xEditionED
Definition: general.hxx:68
std::unique_ptr< weld::Label > xAuthorFT
Definition: general.hxx:48
void SaveChanges()
Definition: general.cxx:420
std::unique_ptr< weld::Entry > xHowpublishedED
Definition: general.hxx:75
weld::CheckButton & GetLocalPageCB()
Definition: general.cxx:770
std::unique_ptr< weld::Entry > xPublisherED
Definition: general.hxx:54
std::unique_ptr< weld::Entry > xIdentifierED
Definition: general.hxx:41
std::unique_ptr< weld::Label > xMonthFT
Definition: general.hxx:86
std::unique_ptr< weld::Entry > xEditorED
Definition: general.hxx:66
std::unique_ptr< weld::Label > xChapterFT
Definition: general.hxx:60
std::unique_ptr< weld::Entry > m_xLocalURLED
Definition: general.hxx:114
weld::Entry & GetLocalURLED()
Definition: general.cxx:768
const OUString & GetErrorString() const
Definition: general.hxx:147
std::unique_ptr< weld::Entry > xAnnoteED
Definition: general.hxx:97
std::unique_ptr< weld::Widget > xGrid
Definition: general.hxx:38
std::unique_ptr< weld::ComboBox > xAuthTypeLB
Definition: general.hxx:44
std::unique_ptr< weld::Label > xCustom3FT
Definition: general.hxx:107
virtual void dispose() override
Definition: general.cxx:688
std::unique_ptr< weld::Entry > xOrganizationsED
Definition: general.hxx:78
DECL_LINK(FirstElementKeyInputHdl, const KeyEvent &, bool)
std::unique_ptr< weld::Label > xEditorFT
Definition: general.hxx:65
std::unique_ptr< weld::Label > xCustom4FT
Definition: general.hxx:109
std::unique_ptr< weld::Label > xAddressFT
Definition: general.hxx:55
std::unique_ptr< weld::Label > xTitleFT
Definition: general.hxx:50
std::unique_ptr< weld::Label > xPagesFT
Definition: general.hxx:62
std::unique_ptr< weld::Entry > xAddressED
Definition: general.hxx:56
std::unique_ptr< weld::Label > xPublisherFT
Definition: general.hxx:53
BibDataManager * pDatMan
Definition: general.hxx:124
bool AddXControl(const OUString &rName, weld::Entry &rEntry)
Definition: general.cxx:774
std::unique_ptr< weld::Entry > xChapterED
Definition: general.hxx:61
DECL_LINK(BrowseHdl, weld::Button &, void)
DECL_LINK(GainFocusHdl, weld::Widget &, void)
std::unique_ptr< weld::Entry > xNoteED
Definition: general.hxx:99
std::unique_ptr< weld::Entry > xSeriesED
Definition: general.hxx:94
DECL_LINK(LosePageFocusHdl, weld::Widget &, void)
std::unique_ptr< weld::Entry > xAuthorED
Definition: general.hxx:49
void AddControlWithError(const OUString &rColumnName, const OUString &rColumnUIName, Target &rWidget, OUString &rErrorString, const OUString &rHelpId)
Definition: general.cxx:825
weld::SpinButton & GetLocalPageSB()
Definition: general.cxx:772
std::unique_ptr< weld::Button > m_xLocalBrowseButton
Definition: general.hxx:115
std::unique_ptr< weld::Label > m_xLocalURLFT
Definition: general.hxx:113
std::unique_ptr< weld::Label > xCustom1FT
Definition: general.hxx:103
DECL_LINK(PageNumHdl, weld::Toggleable &, void)
std::unique_ptr< weld::Entry > xPagesED
Definition: general.hxx:63
std::unique_ptr< weld::Label > xJournalFT
Definition: general.hxx:89
std::unique_ptr< weld::Label > xCustom2FT
Definition: general.hxx:105
rtl::Reference< ChangeListener > m_aURLListener
Definition: general.hxx:122
std::unique_ptr< weld::Entry > xInstitutionED
Definition: general.hxx:80
std::unique_ptr< weld::Entry > xBooktitleED
Definition: general.hxx:71
std::unique_ptr< weld::Entry > xURLED
Definition: general.hxx:101
std::unique_ptr< weld::Label > xHowpublishedFT
Definition: general.hxx:74
OUString sTableErrorString
Definition: general.hxx:119
std::unique_ptr< weld::Entry > xCustom5ED
Definition: general.hxx:112
BibGeneralPage(vcl::Window *pParent, BibDataManager *pDatMan)
Definition: general.cxx:128