KIO
predicateproperties.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 00003 Copyright (c) 2007 Jos van den Oever <jos@vandenoever.info> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License (LGPL) as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 Boston, MA 02110-1301, USA. 00019 */ 00020 #ifndef PREDICATEPROPERTIES_H 00021 #define PREDICATEPROPERTIES_H 00022 00023 #include <kio/kio_export.h> 00024 #include <QtCore/QSharedData> 00025 #include <QtCore/QVariant> 00026 class QValidator; 00027 00036 class KIO_EXPORT PredicateProperties { 00037 friend class PredicatePropertyProvider; 00038 public: 00039 #ifndef KDE_NO_DEPRECATED 00040 KDE_DEPRECATED PredicateProperties(const QString& predicate = QString()); 00041 #endif 00042 PredicateProperties(const PredicateProperties& p); 00043 ~PredicateProperties(); 00044 const PredicateProperties& operator=(const PredicateProperties& p); 00049 enum Attributes 00050 { 00051 Addable = 1, 00052 Removable = 2, 00053 Modifiable = 4, 00054 Cumulative = 8, 00057 Averaged = 16, 00059 MultiLine = 32, 00063 SqueezeText = 64 00067 }; 00073 uint attributes() const; 00077 const QString& key() const; 00081 QVariant::Type type() const; 00085 const QString& name() const; 00089 const QString& description() const; 00090 QValidator* createValidator() const; 00091 const QStringList& suggestedValues() const; 00092 uint minCardinality() const; 00093 uint maxCardinality() const; 00094 const PredicateProperties& parent() const; 00099 const QString& unit() const; 00100 bool isValid() const; 00101 private: 00102 class Private; 00103 QSharedDataPointer<Private> d; 00104 }; 00105 00106 #endif
KDE 4.6 API Reference