File indexing completed on 2024-12-22 04:57:52

0001 /*
0002     SPDX-License-Identifier: BSD-2-Clause
0003 */
0004 
0005 #pragma once
0006 
0007 #include <QObject>
0008 #include <QString>
0009 
0010 /// Storage for strings.
0011 class O0AbstractStore : public QObject
0012 {
0013     Q_OBJECT
0014 
0015 public:
0016     explicit O0AbstractStore(QObject *parent = nullptr)
0017         : QObject(parent)
0018     {
0019     }
0020 
0021     /// Retrieve a string value by key.
0022     virtual QString value(const QString &key, const QString &defaultValue = QString()) = 0;
0023 
0024     /// Set a string value for a key.
0025     virtual void setValue(const QString &key, const QString &value) = 0;
0026 };