2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#ifndef PROPERTY_H
|
|
|
|
#define PROPERTY_H
|
|
|
|
|
2012-09-06 10:21:38 +00:00
|
|
|
#include "library/proitems.h"
|
2021-03-09 15:32:02 +00:00
|
|
|
#include "propertyprinter.h"
|
2012-09-06 10:21:38 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
#include <qglobal.h>
|
|
|
|
#include <qstring.h>
|
2012-02-29 13:02:48 +00:00
|
|
|
#include <qhash.h>
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
|
|
|
|
class QSettings;
|
|
|
|
|
2021-03-09 15:32:02 +00:00
|
|
|
class QMakeProperty final
|
2011-04-27 10:05:43 +00:00
|
|
|
{
|
|
|
|
QSettings *settings;
|
|
|
|
void initSettings();
|
2012-02-29 13:02:48 +00:00
|
|
|
|
2012-09-06 10:21:38 +00:00
|
|
|
QHash<ProKey, ProString> m_values;
|
2012-02-29 13:02:48 +00:00
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
public:
|
|
|
|
QMakeProperty();
|
|
|
|
~QMakeProperty();
|
|
|
|
|
2016-11-24 17:41:48 +00:00
|
|
|
void reload();
|
|
|
|
|
2012-09-06 10:21:38 +00:00
|
|
|
bool hasValue(const ProKey &);
|
|
|
|
ProString value(const ProKey &);
|
|
|
|
|
2011-04-27 10:05:43 +00:00
|
|
|
void setValue(QString, const QString &);
|
|
|
|
void remove(const QString &);
|
|
|
|
|
2021-03-09 15:32:02 +00:00
|
|
|
int queryProperty(const QStringList &optionProperties = QStringList(),
|
|
|
|
const PropertyPrinter &printer = qmakePropertyPrinter);
|
|
|
|
int setProperty(const QStringList &optionProperties);
|
|
|
|
void unsetProperty(const QStringList &optionProperties);
|
2011-04-27 10:05:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
#endif // PROPERTY_H
|