1 | /* |
---|---|
2 | SPDX-FileCopyrightText: 2000 David Faure <faure@kde.org> |
3 | SPDX-License-Identifier: LGPL-2.0-or-later |
4 | */ |
5 | #include "kpropertiesdialogplugin.h" |
6 | |
7 | #include "kio_widgets_debug.h" |
8 | #include "kpropertiesdialog.h" |
9 | |
10 | class KPropertiesDialogPluginPrivate |
11 | { |
12 | public: |
13 | KPropertiesDialogPluginPrivate() |
14 | { |
15 | } |
16 | ~KPropertiesDialogPluginPrivate() |
17 | { |
18 | } |
19 | |
20 | bool m_bDirty; |
21 | int fontHeight; |
22 | }; |
23 | |
24 | KPropertiesDialogPlugin::KPropertiesDialogPlugin(QObject *_props) |
25 | : QObject(_props) |
26 | , properties(qobject_cast<KPropertiesDialog *>(object: _props)) |
27 | , d(new KPropertiesDialogPluginPrivate) |
28 | { |
29 | Q_ASSERT(properties); |
30 | d->fontHeight = 2 * properties->fontMetrics().height(); |
31 | d->m_bDirty = false; |
32 | } |
33 | |
34 | KPropertiesDialogPlugin::~KPropertiesDialogPlugin() = default; |
35 | |
36 | void KPropertiesDialogPlugin::setDirty(bool b) |
37 | { |
38 | d->m_bDirty = b; |
39 | } |
40 | |
41 | bool KPropertiesDialogPlugin::isDirty() const |
42 | { |
43 | return d->m_bDirty; |
44 | } |
45 | |
46 | void KPropertiesDialogPlugin::applyChanges() |
47 | { |
48 | qCWarning(KIO_WIDGETS) << "applyChanges() not implemented in page !"; |
49 | } |
50 | |
51 | int KPropertiesDialogPlugin::fontHeight() const |
52 | { |
53 | return d->fontHeight; |
54 | } |
55 | |
56 | #include "moc_kpropertiesdialogplugin.cpp" |
57 |