2008-08-14 22:51:08 +00:00
|
|
|
/*
|
2012-01-01 22:51:51 +00:00
|
|
|
Copyright 2006-2012 Xavier Guerrin
|
2008-08-14 22:51:08 +00: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_WIDGET_H
|
|
|
|
#define BORDER_PROPERTIES_WIDGET_H
|
|
|
|
#include <QWidget>
|
|
|
|
#include "borderproperties.h"
|
2008-08-15 12:46:22 +00:00
|
|
|
class QCheckBox;
|
2008-08-14 22:51:08 +00:00
|
|
|
class QSpinBox;
|
|
|
|
/**
|
2012-11-09 21:09:24 +00:00
|
|
|
This class provides a widget to edit dimensions and display properties of a
|
|
|
|
diagram, title block excluded.
|
2010-12-20 02:45:36 +00:00
|
|
|
@see TitleBlockPropertiesWidget
|
2008-08-14 22:51:08 +00:00
|
|
|
*/
|
|
|
|
class BorderPropertiesWidget : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
2012-11-09 21:09:24 +00:00
|
|
|
// constructors, destructor
|
2008-08-14 22:51:08 +00:00
|
|
|
public:
|
|
|
|
BorderPropertiesWidget(const BorderProperties &, QWidget * = 0);
|
|
|
|
virtual ~BorderPropertiesWidget();
|
|
|
|
private:
|
|
|
|
BorderPropertiesWidget(const BorderPropertiesWidget &);
|
|
|
|
|
2012-11-09 21:09:24 +00:00
|
|
|
// methods
|
2008-08-14 22:51:08 +00:00
|
|
|
public:
|
|
|
|
const BorderProperties &borderProperties();
|
2010-02-28 16:13:45 +00:00
|
|
|
bool isReadOnly() const;
|
|
|
|
void setReadOnly(bool);
|
2012-06-29 05:21:37 +00:00
|
|
|
void setEditedBorder(const BorderProperties &);
|
2008-08-14 22:51:08 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
void build();
|
|
|
|
|
2012-11-09 21:09:24 +00:00
|
|
|
// attributes
|
2008-08-14 22:51:08 +00:00
|
|
|
private:
|
2012-11-09 21:09:24 +00:00
|
|
|
BorderProperties border_; ///< Edited properties
|
|
|
|
QSpinBox *columns_count; ///< Widget to edit the columns count
|
|
|
|
QSpinBox *columns_width; ///< Widget to edit the columns width
|
|
|
|
QCheckBox *display_columns; ///< Checkbox stating whether to display column headers
|
|
|
|
QSpinBox *rows_count; ///< Widget to edit the rows count
|
|
|
|
QSpinBox *rows_height; ///< Widget to edit the rows height
|
|
|
|
QCheckBox *display_rows; ///< Checkbox stating whether to display row headers
|
2008-08-14 22:51:08 +00:00
|
|
|
};
|
|
|
|
#endif
|