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 00034 class KIO_EXPORT PredicateProperties { 00035 friend class PredicatePropertyProvider; 00036 public: 00037 PredicateProperties(const QString& predicate = QString()); 00038 PredicateProperties(const PredicateProperties& p); 00039 ~PredicateProperties(); 00040 const PredicateProperties& operator=(const PredicateProperties& p); 00045 enum Attributes 00046 { 00047 Addable = 1, 00048 Removable = 2, 00049 Modifiable = 4, 00050 Cumulative = 8, 00053 Averaged = 16, 00055 MultiLine = 32, 00059 SqueezeText = 64 00063 }; 00069 uint attributes() const; 00073 const QString& key() const; 00077 QVariant::Type type() const; 00081 const QString& name() const; 00085 const QString& description() const; 00086 QValidator* createValidator() const; 00087 const QStringList& suggestedValues() const; 00088 uint minCardinality() const; 00089 uint maxCardinality() const; 00090 const PredicateProperties& parent() const; 00095 const QString& unit() const; 00096 bool isValid() const; 00097 private: 00098 class Private; 00099 QSharedDataPointer<Private> p; 00100 }; 00101 00102 #endif