qelectrotech-source-mirror/sources/borderproperties.h

60 lines
2.0 KiB
C
Raw Normal View History

/*
2021-02-20 12:13:46 +01:00
Copyright 2006-2021 The QElectroTech Team
2020-10-17 20:25:30 +02:00
This file is part of QElectroTech.
QElectroTech 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.
QElectroTech is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BORDER_PROPERTIES_H
#define BORDER_PROPERTIES_H
#include <QtCore>
#include <QtXml>
2021-02-24 18:48:59 +01:00
#include "properties/propertiesinterface.h"
/**
2020-10-17 20:25:30 +02:00
@brief The BorderProperties class
This class is a container for dimensions and display properties of a
diagram.
@remark Attributes are public
*/
class BorderProperties : public PropertiesInterface {
2020-10-17 20:25:30 +02:00
public:
// constructor, destructor, operators
BorderProperties();
virtual ~BorderProperties();
bool operator==(const BorderProperties &);
bool operator!=(const BorderProperties &);
2021-03-04 19:18:28 +01:00
void toXmlPriv(QDomElement&) const override;
bool fromXmlPriv(const QDomElement &) override;
2020-10-17 20:25:30 +02:00
static bool valideXml(QDomElement& e);
2020-10-19 11:07:04 +02:00
void toSettings(QSettings &, const QString & = QString()) const override;
void fromSettings(QSettings &, const QString & = QString()) override;
2020-10-17 20:25:30 +02:00
static BorderProperties defaultProperties();
// attributes
int columns_count{17}; ///< Columns count
qreal columns_width{60.0}; ///< Columns width
qreal columns_header_height{20.0}; ///< Column headers height
bool display_columns{true}; ///< Whether to display column headers
int rows_count{8}; ///< Rows count
qreal rows_height{80.0}; ///< Rows height
qreal rows_header_width{20.0}; ///< Row headers width
bool display_rows{true}; ///< Whether to display row headers
};
#endif