2008-10-14 18:25:38 +00:00
|
|
|
/***************************************************************************
|
|
|
|
|
* 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 <fielditem.h>
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
@author Peter Dahlberg <pdahlberg@gmail.com>
|
|
|
|
|
*/
|
2008-10-14 19:31:02 +00:00
|
|
|
class QWidget;
|
2008-10-14 18:25:38 +00:00
|
|
|
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;
|
2008-10-14 19:31:02 +00:00
|
|
|
QWidget* getDockWidget() const;
|
2008-10-14 18:25:38 +00:00
|
|
|
|
|
|
|
|
double getOuterPenWidth() const;
|
2008-10-14 21:22:24 +00:00
|
|
|
bool getIsDirectionIntoPlane() const;
|
2008-10-14 18:25:38 +00:00
|
|
|
public slots:
|
|
|
|
|
void setOuterPenWidth ( double theValue );
|
|
|
|
|
void setFieldLineDistance ( int theValue );
|
2008-10-14 21:22:24 +00:00
|
|
|
void setIsDirectionIntoPlane ( bool theValue );
|
|
|
|
|
signals:
|
|
|
|
|
void directionChanged(bool theValue);
|
2008-10-14 18:25:38 +00:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
//! Abstand der Feldlinien in der Zeichnung
|
|
|
|
|
int fieldLineDistance;
|
2008-10-14 21:22:24 +00:00
|
|
|
|
2008-10-14 18:25:38 +00:00
|
|
|
double outerPenWidth;
|
|
|
|
|
|
2008-10-14 21:22:24 +00:00
|
|
|
//! Gibt an, ob das Feld in die Ebene Zeigt oder heraus (true == in die Ebene)
|
|
|
|
|
bool isDirectionIntoPlane;
|
|
|
|
|
|
2008-10-14 18:25:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|