2007-12-01 10:47:15 +00:00
|
|
|
/*
|
2011-03-02 00:16:40 +00:00
|
|
|
Copyright 2006-2011 Xavier Guerrin
|
2007-12-01 10:47:15 +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/>.
|
|
|
|
*/
|
2007-06-30 17:41:07 +00:00
|
|
|
#ifndef STYLE_EDITOR_H
|
|
|
|
#define STYLE_EDITOR_H
|
|
|
|
#include <QtGui>
|
2007-08-25 03:43:05 +00:00
|
|
|
#include "elementitemeditor.h"
|
2007-06-30 17:41:07 +00:00
|
|
|
class CustomElementGraphicPart;
|
2007-10-21 16:10:21 +00:00
|
|
|
/**
|
|
|
|
Cette classe represente un widget d'edition des styles que peut comporter
|
|
|
|
une partie d'elements (couleur, epaisseur et style du trait, remplissage,
|
|
|
|
antialiasing). Elle peut accueillir un widget sous cette interface grace a
|
|
|
|
la methode appendWidget.
|
|
|
|
*/
|
2007-08-25 03:43:05 +00:00
|
|
|
class StyleEditor : public ElementItemEditor {
|
2007-06-30 17:41:07 +00:00
|
|
|
Q_OBJECT
|
|
|
|
// constructeurs, destructeur
|
|
|
|
public:
|
2010-02-18 00:42:41 +00:00
|
|
|
StyleEditor(QETElementEditor *, CustomElementGraphicPart * = 0, QWidget * = 0);
|
2007-06-30 17:41:07 +00:00
|
|
|
virtual ~StyleEditor();
|
|
|
|
|
|
|
|
private:
|
|
|
|
StyleEditor(const StyleEditor &);
|
|
|
|
|
|
|
|
// attributs
|
|
|
|
private:
|
|
|
|
CustomElementGraphicPart *part;
|
|
|
|
QVBoxLayout *main_layout;
|
|
|
|
QButtonGroup *color, *style, *weight, *filling;
|
2010-05-09 18:40:08 +00:00
|
|
|
QRadioButton *black_color, *white_color, *normal_style, *dashed_style, *dotted_style;
|
2007-06-30 17:41:07 +00:00
|
|
|
QRadioButton *none_weight, *thin_weight, *normal_weight, *no_filling;
|
|
|
|
QRadioButton *black_filling, *white_filling;
|
|
|
|
QCheckBox *antialiasing;
|
|
|
|
|
2010-02-18 00:42:41 +00:00
|
|
|
// methodes
|
2007-06-30 17:41:07 +00:00
|
|
|
public:
|
2010-02-18 00:42:41 +00:00
|
|
|
virtual bool setPart(CustomElementPart *);
|
|
|
|
virtual CustomElementPart *currentPart() const;
|
2007-06-30 17:41:07 +00:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
void updatePart();
|
|
|
|
void updateForm();
|
2007-08-25 03:43:05 +00:00
|
|
|
void updatePartAntialiasing();
|
|
|
|
void updatePartColor();
|
|
|
|
void updatePartLineStyle();
|
|
|
|
void updatePartLineWeight();
|
|
|
|
void updatePartFilling();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void activeConnections(bool);
|
2007-06-30 17:41:07 +00:00
|
|
|
};
|
|
|
|
#endif
|