PolkitQt-1

polkitqt1-details.h
1/*
2 This file is part of the Polkit-qt project
3 SPDX-FileCopyrightText: 2009 Radek Novacek <rnovacek@redhat.com>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef POLKITQT1_DETAILS_H
9#define POLKITQT1_DETAILS_H
10
11#include "polkitqt1-core-export.h"
12
13#include <QObject>
14#include <QSharedData>
15
16typedef struct _PolkitDetails PolkitDetails;
17
18/**
19 * \namespace PolkitQt1 PolkitQt
20 *
21 * \brief Namespace wrapping Polkit-Qt classes
22 *
23 * This namespace wraps all Polkit-Qt classes.
24 */
25namespace PolkitQt1
26{
27
28/**
29 * \class Details polkitqt1-details.h Details
30 * \author Radek Novacek <rnovacek@redhat.com>
31 *
32 * \brief Class used for passing details around.
33 */
34class POLKITQT1_CORE_EXPORT Details
35{
36public:
37 /**
38 * Creates a new Details object
39 */
40 Details();
41
42 /**
43 * Creates Details object from PolkitDetails
44 *
45 * \warning Use this only if you are completely aware of what are you doing!
46 *
47 * \param pkDetails PolkitDetails object
48 */
49 explicit Details(PolkitDetails *pkDetails);
50
51 /**
52 * Copy constructor.
53 */
54 Details(const Details &other);
55
56 ~Details();
57
58 Details &operator=(const Details &other);
59
60 /**
61 * Get the value for \p key
62 *
63 * \param key A key
64 * \return Value of the key \p key, otherwise empty QString.
65 */
66 QString lookup(const QString &key) const;
67
68 /**
69 * Inserts key \p key with value \p value.
70 *
71 * \param key A key.
72 * \param value A value.
73 */
74 void insert(const QString &key, const QString &value);
75
76 /**
77 * Gets a list of all keys.
78 *
79 * \return List of all keys.
80 */
81 QStringList keys() const;
82private:
83 class Data;
85};
86
87}
88
89#endif // DETAILS_H
Class used for passing details around.
Details(const Details &other)
Copy constructor.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.