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

KIO

  • sources
  • kde-4.14
  • kdelibs
  • 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 
25 using namespace std;
26 
27 class PredicateProperties::Private : public QSharedData {
28 public:
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 };
40 const QString PredicateProperties::Private::nullString;
41 const QStringList PredicateProperties::Private::nullStringList;
42 #ifndef KDE_NO_DEPRECATED
43 const PredicateProperties PredicateProperties::Private::nullPP;
44 #endif
45 
46 #ifndef KDE_NO_DEPRECATED
47 PredicateProperties::PredicateProperties(const QString& predicate) {
48  if (!predicate.isEmpty()) {
49  d = new Private();
50  d->key = predicate;
51  }
52 }
53 #endif
54 PredicateProperties::PredicateProperties(const PredicateProperties& pp)
55  : d(pp.d) {
56 }
57 PredicateProperties::~PredicateProperties() {
58 }
59 const PredicateProperties&
60 PredicateProperties::operator=(const PredicateProperties& pp) {
61  d = pp.d;
62  return pp;
63 }
64 const QString&
65 PredicateProperties::name() const {
66  if ( d == 0) return Private::nullString;
67  return ( d->name.isEmpty()) ? d->key : d->name;
68 }
69 
70 const QStringList&
71 PredicateProperties::suggestedValues() const {
72  return Private::nullStringList;
73 }
74 
75 uint
76 PredicateProperties::minCardinality() const {
77  return 0;
78 }
79 
80 uint
81 PredicateProperties::maxCardinality() const {
82  return 0;
83 }
84 
85 uint
86 PredicateProperties::attributes() const {
87  return ( d) ? d->attributes :0;
88 }
89 QVariant::Type
90 PredicateProperties::type() const {
91  return ( d) ? d->type :QVariant::Invalid;
92 }
93 QValidator*
94 PredicateProperties::createValidator() const {
95  return 0;
96 }
97 const PredicateProperties&
98 PredicateProperties::parent() const {
99 #ifndef KDE_NO_DEPRECATED
100  return ( d) ? d->parent :Private::nullPP;
101 #else
102  return d->parent;
103 #endif
104 }
105 bool
106 PredicateProperties::isValid() const {
107  return d;
108 }
PredicateProperties
A predicate is part of the RDF trinity: subject, predicate, object.
Definition: predicateproperties.h:36
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::parent
const PredicateProperties & parent() const
Definition: predicateproperties.cpp:98
PredicateProperties::attributes
uint attributes() const
Get the attributes of this group (see Attributes)
Definition: predicateproperties.cpp:86
PredicateProperties::createValidator
QValidator * createValidator() const
Definition: predicateproperties.cpp:94
name
const char * name(StandardAction id)
PredicateProperties::~PredicateProperties
~PredicateProperties()
Definition: predicateproperties.cpp:57
PredicateProperties::minCardinality
uint minCardinality() const
Definition: predicateproperties.cpp:76
QSharedData
QString::isEmpty
bool isEmpty() const
predicateproperties.h
QString
QStringList
PredicateProperties::operator=
const PredicateProperties & operator=(const PredicateProperties &p)
Definition: predicateproperties.cpp:60
PredicateProperties::PredicateProperties
PredicateProperties(const QString &predicate=QString())
Definition: predicateproperties.cpp:47
PredicateProperties::suggestedValues
const QStringList & suggestedValues() const
Definition: predicateproperties.cpp:71
PredicateProperties::isValid
bool isValid() const
Definition: predicateproperties.cpp:106
PredicateProperties::type
QVariant::Type type() const
The type for this field.
Definition: predicateproperties.cpp:90
QValidator
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:53 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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

Search



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