KIO

kpropertiesdialogplugin.cpp
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
10class KPropertiesDialogPluginPrivate
11{
12public:
13 KPropertiesDialogPluginPrivate()
14 {
15 }
16 ~KPropertiesDialogPluginPrivate()
17 {
18 }
19
20 bool m_bDirty;
21 int fontHeight;
22};
23
25 : QObject(_props)
26 , properties(qobject_cast<KPropertiesDialog *>(_props))
27 , d(new KPropertiesDialogPluginPrivate)
28{
29 Q_ASSERT(properties);
30 d->fontHeight = 2 * properties->fontMetrics().height();
31 d->m_bDirty = false;
32}
33
34KPropertiesDialogPlugin::~KPropertiesDialogPlugin() = default;
35
36void KPropertiesDialogPlugin::setDirty(bool b)
37{
38 d->m_bDirty = b;
39}
40
41bool KPropertiesDialogPlugin::isDirty() const
42{
43 return d->m_bDirty;
44}
45
47{
48 qCWarning(KIO_WIDGETS) << "applyChanges() not implemented in page !";
49}
50
52{
53 return d->fontHeight;
54}
55
56#include "moc_kpropertiesdialogplugin.cpp"
KPropertiesDialogPlugin(QObject *parent)
Constructor whos parent will be cast to KPropertiesDialog To insert tabs into the properties dialog,...
virtual void applyChanges()
Applies all changes to the file.
int fontHeight() const
Returns the font height.
KPropertiesDialog *const properties
Pointer to the dialog.
The main properties dialog class.
int height() const const
QFontMetrics fontMetrics() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Apr 27 2024 22:13:16 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.