/*************************************************************************** * Copyright (C) 2008 by Peter Dahlberg * * pdahlberg@gmail.com * * * * This program 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. * * * * This program 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 this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef HOMOBFIELDITEM_H #define HOMOBFIELDITEM_H #include /** @author Peter Dahlberg */ class HomoBFieldWidget; class QWidget; class HomoBFieldItem : public FieldItem { Q_OBJECT public: enum {Type = UserType + 2}; enum {MinimumWidth = 20}; enum {MinimumHeight = 30}; HomoBFieldItem(QRectF sizeRect); virtual ~HomoBFieldItem(); virtual QRectF boundingRect() const; virtual QRectF getRectF() const; virtual void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget); int type() const; int getFieldLineDistance() const; QWidget* getDockWidget() const; double getOuterPenWidth() const; bool getIsDirectionIntoPlane() const; public slots: void setOuterPenWidth ( double theValue ); void setFieldLineDistance ( int theValue ); void setIsDirectionIntoPlane ( bool theValue ); signals: void directionChanged(bool theValue); private: //! Abstand der Feldlinien in der Zeichnung int fieldLineDistance; double outerPenWidth; //! Gibt an, ob das Feld in die Ebene Zeigt oder heraus (true == in die Ebene) bool isDirectionIntoPlane; HomoBFieldWidget* dockWidget; }; #endif