QElectroTech  0.8-dev
propertiesinterface.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef PROPERTIESINTERFACE_H
19 #define PROPERTIESINTERFACE_H
20 
21 #include <QString>
22 #include <QSettings>
23 #include <QDomElement>
24 
31 {
32  public:
34  virtual ~PropertiesInterface();
42  virtual void toSettings (QSettings &settings,
43  const QString = QString()) const =0;
51  virtual void fromSettings (const QSettings &settings,
52  const QString = QString()) =0;
59  virtual QDomElement toXml (QDomDocument &xml_document) const =0;
66  virtual bool fromXml (const QDomElement &xml_element) =0;
67 };
68 
69 #endif // PROPERTIESINTERFACE_H
PropertiesInterface::fromXml
virtual bool fromXml(const QDomElement &xml_element)=0
fromXml load properties to xml element
propertiesinterface.h
PropertiesInterface::toSettings
virtual void toSettings(QSettings &settings, const QString=QString()) const =0
toSettings Save properties to setting file.
PropertiesInterface::PropertiesInterface
PropertiesInterface()
PropertiesInterface::PropertiesInterface.
Definition: propertiesinterface.cpp:23
PropertiesInterface::fromSettings
virtual void fromSettings(const QSettings &settings, const QString=QString())=0
fromSettings load properties to setting file.
PropertiesInterface::~PropertiesInterface
virtual ~PropertiesInterface()
PropertiesInterface::~PropertiesInterface.
Definition: propertiesinterface.cpp:29
PropertiesInterface
The PropertiesInterface class This class is an interface for have common way to use properties in QEl...
Definition: propertiesinterface.h:31
PropertiesInterface::toXml
virtual QDomElement toXml(QDomDocument &xml_document) const =0
toXml Save properties to xml element