• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KIO

  • kio
  • kio
predicateproperties.cpp
Go to the documentation of this file.
1/* This file is part of the KDE libraries
2
3 Copyright (c) 2007 Jos van den Oever <jos@vandenoever.info>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License (LGPL) as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#include "predicateproperties.h"
22
23#include <QtCore/QStringList>
24
25using namespace std;
26
27class PredicateProperties::Private : public QSharedData {
28public:
29 static const QString nullString;
30 static const QStringList nullStringList;
31#ifndef KDE_NO_DEPRECATED
32 static const PredicateProperties nullPP;
33#endif
34 PredicateProperties parent;
35 QString key;
36 QString name;
37 QVariant::Type type;
38 uint attributes;
39};
40const QString PredicateProperties::Private::nullString;
41const QStringList PredicateProperties::Private::nullStringList;
42#ifndef KDE_NO_DEPRECATED
43const PredicateProperties PredicateProperties::Private::nullPP;
44#endif
45
46#ifndef KDE_NO_DEPRECATED
47PredicateProperties::PredicateProperties(const QString& predicate) {
48 if (!predicate.isEmpty()) {
49 d = new Private();
50 d->key = predicate;
51 }
52}
53#endif
54PredicateProperties::PredicateProperties(const PredicateProperties& pp)
55 : d(pp.d) {
56}
57PredicateProperties::~PredicateProperties() {
58}
59const PredicateProperties&
60PredicateProperties::operator=(const PredicateProperties& pp) {
61 d = pp.d;
62 return pp;
63}
64const QString&
65PredicateProperties::name() const {
66 if ( d == 0) return Private::nullString;
67 return ( d->name.isEmpty()) ? d->key : d->name;
68}
69
70const QStringList&
71PredicateProperties::suggestedValues() const {
72 return Private::nullStringList;
73}
74
75uint
76PredicateProperties::minCardinality() const {
77 return 0;
78}
79
80uint
81PredicateProperties::maxCardinality() const {
82 return 0;
83}
84
85uint
86PredicateProperties::attributes() const {
87 return ( d) ? d->attributes :0;
88}
89QVariant::Type
90PredicateProperties::type() const {
91 return ( d) ? d->type :QVariant::Invalid;
92}
93QValidator*
94PredicateProperties::createValidator() const {
95 return 0;
96}
97const PredicateProperties&
98PredicateProperties::parent() const {
99#ifndef KDE_NO_DEPRECATED
100 return ( d) ? d->parent :Private::nullPP;
101#else
102 return d->parent;
103#endif
104}
105bool
106PredicateProperties::isValid() const {
107 return d;
108}
PredicateProperties
A predicate is part of the RDF trinity: subject, predicate, object.
Definition: predicateproperties.h:36
PredicateProperties::createValidator
QValidator * createValidator() const
Definition: predicateproperties.cpp:94
PredicateProperties::name
const QString & name() const
Localized name of the predicate.
Definition: predicateproperties.cpp:65
PredicateProperties::maxCardinality
uint maxCardinality() const
Definition: predicateproperties.cpp:81
PredicateProperties::operator=
const PredicateProperties & operator=(const PredicateProperties &p)
Definition: predicateproperties.cpp:60
PredicateProperties::~PredicateProperties
~PredicateProperties()
Definition: predicateproperties.cpp:57
PredicateProperties::PredicateProperties
PredicateProperties(const QString &predicate=QString())
Definition: predicateproperties.cpp:47
PredicateProperties::parent
const PredicateProperties & parent() const
Definition: predicateproperties.cpp:98
PredicateProperties::isValid
bool isValid() const
Definition: predicateproperties.cpp:106
PredicateProperties::suggestedValues
const QStringList & suggestedValues() const
Definition: predicateproperties.cpp:71
PredicateProperties::minCardinality
uint minCardinality() const
Definition: predicateproperties.cpp:76
PredicateProperties::attributes
uint attributes() const
Get the attributes of this group (see Attributes)
Definition: predicateproperties.cpp:86
PredicateProperties::type
QVariant::Type type() const
The type for this field.
Definition: predicateproperties.cpp:90
QValidator
name
const char * name(StandardAction id)
predicateproperties.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

Skip menu "KIO"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal