/usr/include/qgis/qgsobjectcustomproperties.h is in libqgis-dev 2.8.6+dfsg-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 | /***************************************************************************
qgsobjectcustomproperties.h
-------------------
begin : April 2014
copyright : (C) 2014 by Martin Dobias
email : wonder.sk at gmail dot com
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSOBJECTCUSTOMPROPERTIES_H
#define QGSOBJECTCUSTOMPROPERTIES_H
#include <QMap>
#include <QVariant>
class QDomDocument;
class QDomNode;
/**
* Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML
* in \verbatim <customproperties> \endverbatim element.
*
* \note added in 2.4
*/
class CORE_EXPORT QgsObjectCustomProperties
{
public:
QgsObjectCustomProperties();
//! Return list of stored keys
QStringList keys() const;
//! Add an entry to the store. If the entry with the keys exists already, it will be overwritten
void setValue( const QString& key, const QVariant& value );
//! Return value for the given key. If the key is not stored, default value will be used
QVariant value( const QString& key, const QVariant& defaultValue = QVariant() ) const;
//! Remove a key (entry) from the store
void remove( const QString& key );
/** Read store contents from XML
@param parentNode node to read from
@param keyStartsWith reads only properties starting with the specified string (or all if the string is empty)
*/
void readXml( const QDomNode& parentNode, const QString& keyStartsWith = QString() );
/** Write store contents to XML */
void writeXml( QDomNode& parentNode, QDomDocument& doc ) const;
protected:
QMap<QString, QVariant> mMap;
};
#endif // QGSOBJECTCUSTOMPROPERTIES_H
|