15#include <QGraphicsScene>
37 << m_context.
stateDump ().toLatin1().data();
42 QList<QGraphicsItem*>::iterator itr;
43 QList<QGraphicsItem*> items = m_context.guideline().scene().selectedItems();
44 for (itr = items.begin(); itr != items.end(); itr++) {
45 QGraphicsItem *item = *itr;
49 item->setSelected (
false);
73 return m_context.guideline().scene().sceneRect();
@ DATA_KEY_GRAPHICS_ITEM_TYPE
QColor ColorPaletteToQColor(ColorPalette color)
@ GRAPHICS_ITEM_TYPE_GUIDELINE
GuidelineState
Set of possible Guideline states. See class Guideline for more information.
log4cpp::Category * mainCat
Model for managing the coordinate values corresponding Guidelines.
double lineWidthInactive() const
Get method for line width when inactive.
ColorPalette lineColor() const
Get method for line color.
This class is a special case of the standard QGraphicsLineItem for guidelines, and serves as the base...
virtual void updateGeometry(double valueGraph)=0
Update the geometry so it passes through the specified coordinate value in graph coordinates.
void bindGuidelineVisibleToInvisible(GuidelineAbstract *guidelineVisible)
Bind a newly-created visible Guideline to this Guideline, and make this one invisible.
virtual void setGraphicsItemPen(const QColor &color, double lineWidth)=0
Wrapper for QGraphicsItem::setPen.
static QString next()
Create next identifier.
QRectF sceneRect() const
Scene rectangle in screen coordinates (=pixels)
void handleMousePressCommon(const QPointF &posAbsolute, GuidelineState stateHandle, GuidelineState stateDeployed)
Common mouse press handling.
GuidelineStateContext & context() const
Context in charge of the state classes.
virtual ~GuidelineStateAbstractBase()
GuidelineStateAbstractBase(GuidelineStateContext &context)
Single constructor.
Context class for state machine that belongs to the Guideline class.
QString stateDump() const
Dump state for debugging only.
GuidelineAbstract & guideline()
Guideline that owns this context class.
void requestStateTransition(GuidelineState guidelineState)
Request a state transition.
DocumentModelGuideline modelGuideline() const
Up-to-date guideline settings.
GuidelineAbstract * createGuideline(const QString &identifier, GuidelineState stateInitial) const
Factory method for creating a new Guideline.
#define LOG4CPP_INFO_S(logger)