File indexing completed on 2024-03-24 15:43:16

0001 // Copyright (c) 2003 Rob Kaper <cap@capsi.com>
0002 //
0003 // This library is free software; you can redistribute it and/or
0004 // modify it under the terms of the GNU Lesser General Public
0005 // License version 2.1 as published by the Free Software Foundation.
0006 //
0007 // This library is distributed in the hope that it will be useful,
0008 // but WITHOUT ANY WARRANTY; without even the implied warranty of
0009 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0010 // Lesser General Public License for more details.
0011 //
0012 // You should have received a copy of the GNU Lesser General Public License
0013 // along with this library; see the file COPYING.LIB.  If not, write to
0014 // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0015 // Boston, MA 02110-1301, USA.
0016 
0017 #ifndef LIBATLANTIC_CONFIGOPTION_H
0018 #define LIBATLANTIC_CONFIGOPTION_H
0019 
0020 #include <QObject>
0021 
0022 #include "libatlantic_export.h"
0023 
0024 class LIBATLANTIC_EXPORT ConfigOption : public QObject
0025 {
0026 Q_OBJECT
0027 
0028 public:
0029     ConfigOption(int configId);
0030     int id() const;
0031     void setName(const QString &name);
0032     QString name() const;
0033     void setDescription(const QString &description);
0034     QString description() const;
0035     void setEdit(bool edit);
0036     bool edit() const;
0037     void setType(const QString &type);
0038     QString type() const;
0039     void setValue(const QString &value);
0040     QString value() const;
0041     void update(bool force = false);
0042 
0043 Q_SIGNALS:
0044     void changed(ConfigOption *configOption);
0045 
0046 private:
0047     int m_id;
0048     bool m_changed : 1, m_edit : 1;
0049     QString m_name, m_description, m_type, m_value;
0050 };
0051 
0052 #endif