COPASI API
4.16.103
|
#include <QtGui/QGraphicsItem>
#include <QtCore/QSharedPointer>
#include <QtGui/QPen>
#include <QtGui/QFont>
#include <QtGui/QFontMetrics>
#include <QtGui/QPixmap>
#include <QtCore/QFile>
#include <QtGui/QGraphicsScene>
#include <qlayout/CQRenderConverter.h>
#include <qlayout/CQRoundedRect.h>
#include <layout/CLStyle.h>
#include <layout/CLEllipse.h>
#include <layout/CLRectangle.h>
#include <layout/CLImage.h>
#include <layout/CLPolygon.h>
#include <layout/CLText.h>
#include <layout/CLCurve.h>
#include <layout/CLRenderCurve.h>
#include <layout/CLRenderCubicBezier.h>
#include <layout/CLRenderPoint.h>
#include <layout/CLLinearGradient.h>
#include <layout/CLRadialGradient.h>
#include <layout/CLRenderResolver.h>
#include <layout/CLGraphicalPrimitive1D.h>
#include <report/CCopasiRootContainer.h>
#include <CopasiDataModel/CCopasiDataModel.h>
#include <math.h>
Go to the source code of this file.
Functions | |
void | addLineEndingToItem (QGraphicsPathItem *item, const CLLineEnding *ending, const CLGroup *group, const CLRenderResolver *resolver, QPointF point, QPointF second, QGraphicsItemGroup *itemGroup) |
void | addToPath (QPainterPath &path, const CLRenderCubicBezier *cubic, const CLBoundingBox *pBB) |
void | addToPath (QPainterPath &path, const CLRenderPoint *current, const CLBoundingBox *pBB) |
void | adjustPosition (QGraphicsTextItem *item, const CLBoundingBox *pBB, const CLText *pText, const CLGroup *group) |
void | applyRotationalMapping (QPainterPath &linePath, const CLLineEnding *ending, QPointF point, QPointF second) |
void | fillItemFromCurve (QGraphicsItemGroup *item, const CLBoundingBox *pBB, const CLCurve *pCurve, const CLGroup *group, const CLRenderResolver *resolver) |
void | fillItemFromEllipse (QGraphicsItemGroup *item, const CLBoundingBox *pBB, const CLEllipse *pEllipse, const CLGroup *group, const CLRenderResolver *resolver) |
void | fillItemFromGroup (QGraphicsItemGroup *item, const CLBoundingBox *bounds, const CLGroup *group, const CLRenderResolver *resolver) |
void | fillItemFromImage (QGraphicsItemGroup *item, const CLBoundingBox *pBB, const CLImage *pImage, const CLGroup *group, const CLRenderResolver *) |
void | fillItemFromPolygon (QGraphicsItemGroup *item, const CLBoundingBox *pBB, const CLPolygon *pPoly, const CLGroup *group, const CLRenderResolver *resolver) |
void | fillItemFromRectangle (QGraphicsItemGroup *item, const CLBoundingBox *pBB, const CLRectangle *pRect, const CLGroup *group, const CLRenderResolver *resolver) |
void | fillItemFromRenderCurve (QGraphicsItemGroup *item, const CLBoundingBox *pBB, const CLRenderCurve *pCurve, const CLGroup *group, const CLRenderResolver *resolver) |
void | fillItemFromText (QGraphicsItemGroup *item, const CLBoundingBox *pBB, const CLText *pText, const CLGroup *group, const CLRenderResolver *resolver) |
QSharedPointer< QBrush > | getBrush (const CLGraphicalPrimitive2D *item, const CLGroup *group, const CLRenderResolver *resolver, const CLBoundingBox *pBB) |
QColor | getColor (const CLColorDefinition *cd) |
QColor | getColor (const std::string &color, const CLRenderResolver *resolver) |
QSharedPointer< QFont > | getFont (const CLText *item, const CLGroup *group, const CLRenderResolver *, const CLBoundingBox *pBB) |
QSharedPointer< QGradient > | getGradient (const CLGradientBase *base, const CLBoundingBox *bounds, const CLRenderResolver *resolver) |
QSharedPointer< QLinearGradient > | getLinearGradient (const CLLinearGradient *linear, const CLBoundingBox *bounds, const CLRenderResolver *resolver) |
QSharedPointer< QPainterPath > | getPath (const CLPolygon *pCurve, const CLBoundingBox *pBB) |
QSharedPointer< QPainterPath > | getPath (const CLRectangle *pRect, const CLBoundingBox *pBB) |
QSharedPointer< QPainterPath > | getPath (const CLEllipse *pEllipse, const CLBoundingBox *pBB) |
QSharedPointer< QPainterPath > | getPath (const CLRenderCurve *pCurve, const CLBoundingBox *pBB) |
QSharedPointer< QPen > | getPen (const CLGraphicalPrimitive1D *item, const CLGroup *group, const CLRenderResolver *resolver, const CLBoundingBox *) |
QSharedPointer< QRadialGradient > | getRadialGradient (const CLRadialGradient *radial, const CLBoundingBox *bounds, const CLRenderResolver *resolver) |
void | moveToPoint (QPainterPath &path, const CLRenderPoint *current, const CLBoundingBox *pBB) |
QPointF | normalizePoint (const QPointF &vector) |
void | transform (QGraphicsItem *item, const CLTransformation2D *trans, const CLGroup *group) |
void addLineEndingToItem | ( | QGraphicsPathItem * | item, |
const CLLineEnding * | ending, | ||
const CLGroup * | group, | ||
const CLRenderResolver * | resolver, | ||
QPointF | point, | ||
QPointF | second, | ||
QGraphicsItemGroup * | itemGroup | ||
) |
Definition at line 604 of file CQRenderConverter.cpp.
References applyRotationalMapping(), CLGraphicalPrimitive2D::EVENODD, CLLineEnding::getBoundingBox(), getBrush(), CLGroup::getElement(), CLGraphicalPrimitive2D::getFillRule(), CLLineEnding::getGroup(), CLGroup::getNumElements(), getPath(), getPen(), CLGraphicalPrimitive2D::isSetFill(), CLGraphicalPrimitive2D::isSetFillRule(), and CLGraphicalPrimitive2D::NONZERO.
Referenced by CQRenderConverter::applyStyle(), and fillItemFromRenderCurve().
void addToPath | ( | QPainterPath & | path, |
const CLRenderCubicBezier * | cubic, | ||
const CLBoundingBox * | pBB | ||
) |
Definition at line 441 of file CQRenderConverter.cpp.
References CLRenderCubicBezier::basePoint1_X(), CLRenderCubicBezier::basePoint1_Y(), CLRenderCubicBezier::basePoint2_X(), CLRenderCubicBezier::basePoint2_Y(), CLRelAbsVector::getAbsoluteValue(), CLBoundingBox::getDimensions(), CLDimensions::getHeight(), CLBoundingBox::getPosition(), CLRelAbsVector::getRelativeValue(), CLDimensions::getWidth(), CLPoint::getX(), CLRenderPoint::getXOffset(), CLPoint::getY(), and CLRenderPoint::getYOffset().
Referenced by getPath().
void addToPath | ( | QPainterPath & | path, |
const CLRenderPoint * | current, | ||
const CLBoundingBox * | pBB | ||
) |
Definition at line 453 of file CQRenderConverter.cpp.
References CLRelAbsVector::getAbsoluteValue(), CLBoundingBox::getDimensions(), CLDimensions::getHeight(), CLBoundingBox::getPosition(), CLRelAbsVector::getRelativeValue(), CLDimensions::getWidth(), CLPoint::getX(), CLRenderPoint::getXOffset(), CLPoint::getY(), and CLRenderPoint::getYOffset().
void adjustPosition | ( | QGraphicsTextItem * | item, |
const CLBoundingBox * | pBB, | ||
const CLText * | pText, | ||
const CLGroup * | group | ||
) |
Definition at line 805 of file CQRenderConverter.cpp.
References CLText::ANCHOR_BOTTOM, CLText::ANCHOR_END, CLText::ANCHOR_MIDDLE, CLText::ANCHOR_START, CLText::ANCHOR_TOP, CLBoundingBox::getDimensions(), CLDimensions::getHeight(), CLBoundingBox::getPosition(), CLGroup::getTextAnchor(), CLText::getTextAnchor(), CLGroup::getVTextAnchor(), CLText::getVTextAnchor(), CLDimensions::getWidth(), CLPoint::getX(), CLPoint::getY(), CLGroup::isSetTextAnchor(), CLText::isSetTextAnchor(), CLGroup::isSetVTextAnchor(), and CLText::isSetVTextAnchor().
Referenced by CQRenderConverter::applyStyle(), and fillItemFromText().
void applyRotationalMapping | ( | QPainterPath & | linePath, |
const CLLineEnding * | ending, | ||
QPointF | point, | ||
QPointF | second | ||
) |
Definition at line 577 of file CQRenderConverter.cpp.
References CLLineEnding::getIsEnabledRotationalMapping(), and normalizePoint().
Referenced by addLineEndingToItem().
void fillItemFromCurve | ( | QGraphicsItemGroup * | item, |
const CLBoundingBox * | pBB, | ||
const CLCurve * | pCurve, | ||
const CLGroup * | group, | ||
const CLRenderResolver * | resolver | ||
) |
Definition at line 381 of file CQRenderConverter.cpp.
References CLLineSegment::getBase1(), CLLineSegment::getBase2(), CLLineSegment::getEnd(), CLCurve::getListOfPoints(), CLCurve::getNumCurveSegments(), getPen(), CLCurve::getSegmentAt(), CLLineSegment::getStart(), CLPoint::getX(), CLPoint::getY(), CLLineSegment::isBezier(), and CLCurve::isContinuous().
Referenced by fillItemFromGroup().
void fillItemFromEllipse | ( | QGraphicsItemGroup * | item, |
const CLBoundingBox * | pBB, | ||
const CLEllipse * | pEllipse, | ||
const CLGroup * | group, | ||
const CLRenderResolver * | resolver | ||
) |
Definition at line 362 of file CQRenderConverter.cpp.
References CLRelAbsVector::getAbsoluteValue(), getBrush(), CLEllipse::getCX(), CLEllipse::getCY(), CLBoundingBox::getDimensions(), CLDimensions::getHeight(), getPen(), CLBoundingBox::getPosition(), CLRelAbsVector::getRelativeValue(), CLEllipse::getRX(), CLEllipse::getRY(), CLDimensions::getWidth(), CLPoint::getX(), CLPoint::getY(), and transform().
Referenced by fillItemFromGroup().
void fillItemFromGroup | ( | QGraphicsItemGroup * | item, |
const CLBoundingBox * | bounds, | ||
const CLGroup * | group, | ||
const CLRenderResolver * | resolver | ||
) |
Definition at line 983 of file CQRenderConverter.cpp.
References fillItemFromCurve(), fillItemFromEllipse(), fillItemFromImage(), fillItemFromPolygon(), fillItemFromRectangle(), fillItemFromRenderCurve(), fillItemFromText(), CLGroup::getElement(), CLGroup::getNumElements(), and transform().
Referenced by CQRenderConverter::fillGroupFromStyle().
void fillItemFromImage | ( | QGraphicsItemGroup * | item, |
const CLBoundingBox * | pBB, | ||
const CLImage * | pImage, | ||
const CLGroup * | group, | ||
const CLRenderResolver * | |||
) |
Definition at line 929 of file CQRenderConverter.cpp.
References CLRelAbsVector::getAbsoluteValue(), CCopasiRootContainer::getDatamodelList(), CLBoundingBox::getDimensions(), CLImage::getHeight(), CLDimensions::getHeight(), CLImage::getImageReference(), CLBoundingBox::getPosition(), CLRelAbsVector::getRelativeValue(), CLImage::getWidth(), CLDimensions::getWidth(), CLPoint::getX(), CLImage::getX(), CLPoint::getY(), CLImage::getY(), and transform().
Referenced by fillItemFromGroup().
void fillItemFromPolygon | ( | QGraphicsItemGroup * | item, |
const CLBoundingBox * | pBB, | ||
const CLPolygon * | pPoly, | ||
const CLGroup * | group, | ||
const CLRenderResolver * | resolver | ||
) |
Definition at line 759 of file CQRenderConverter.cpp.
References CLGraphicalPrimitive2D::EVENODD, getBrush(), CLGraphicalPrimitive2D::getFillRule(), getPath(), getPen(), CLGraphicalPrimitive2D::isSetFillRule(), CLGraphicalPrimitive2D::NONZERO, and transform().
Referenced by fillItemFromGroup().
void fillItemFromRectangle | ( | QGraphicsItemGroup * | item, |
const CLBoundingBox * | pBB, | ||
const CLRectangle * | pRect, | ||
const CLGroup * | group, | ||
const CLRenderResolver * | resolver | ||
) |
Definition at line 962 of file CQRenderConverter.cpp.
References CLRelAbsVector::getAbsoluteValue(), getBrush(), CLBoundingBox::getDimensions(), CLRectangle::getHeight(), CLDimensions::getHeight(), getPen(), CLBoundingBox::getPosition(), CLRectangle::getRadiusX(), CLRectangle::getRadiusY(), CLRelAbsVector::getRelativeValue(), CLRectangle::getWidth(), CLDimensions::getWidth(), CLPoint::getX(), CLRectangle::getX(), CLPoint::getY(), CLRectangle::getY(), and transform().
Referenced by fillItemFromGroup().
void fillItemFromRenderCurve | ( | QGraphicsItemGroup * | item, |
const CLBoundingBox * | pBB, | ||
const CLRenderCurve * | pCurve, | ||
const CLGroup * | group, | ||
const CLRenderResolver * | resolver | ||
) |
Definition at line 718 of file CQRenderConverter.cpp.
References addLineEndingToItem(), CLRenderCurve::getEndHead(), CLGroup::getEndHead(), CLLineEnding::getGroup(), CLRenderResolver::getLineEnding(), getPath(), getPen(), CLRenderCurve::getStartHead(), CLGroup::getStartHead(), CLRenderCurve::isSetEndHead(), CLGroup::isSetEndHead(), CLRenderCurve::isSetStartHead(), and transform().
Referenced by fillItemFromGroup().
void fillItemFromText | ( | QGraphicsItemGroup * | item, |
const CLBoundingBox * | pBB, | ||
const CLText * | pText, | ||
const CLGroup * | group, | ||
const CLRenderResolver * | resolver | ||
) |
Definition at line 899 of file CQRenderConverter.cpp.
References adjustPosition(), CLRelAbsVector::getAbsoluteValue(), getColor(), CLBoundingBox::getDimensions(), getFont(), CLDimensions::getHeight(), CLBoundingBox::getPosition(), CLRelAbsVector::getRelativeValue(), CLGraphicalPrimitive1D::getStroke(), CLText::getText(), CLDimensions::getWidth(), CLPoint::getX(), CLText::getX(), CLPoint::getY(), CLText::getY(), CLGraphicalPrimitive1D::isSetStroke(), and transform().
Referenced by fillItemFromGroup().
QSharedPointer<QBrush> getBrush | ( | const CLGraphicalPrimitive2D * | item, |
const CLGroup * | group, | ||
const CLRenderResolver * | resolver, | ||
const CLBoundingBox * | pBB | ||
) |
Definition at line 272 of file CQRenderConverter.cpp.
References getColor(), CLGraphicalPrimitive2D::getFillColor(), getGradient(), CLRenderResolver::getGradientBase(), and CLGraphicalPrimitive2D::isSetFill().
Referenced by addLineEndingToItem(), fillItemFromEllipse(), fillItemFromPolygon(), and fillItemFromRectangle().
QColor getColor | ( | const CLColorDefinition * | cd | ) |
Definition at line 84 of file CQRenderConverter.cpp.
References CLColorDefinition::getAlpha(), CLColorDefinition::getBlue(), CLColorDefinition::getGreen(), and CLColorDefinition::getRed().
Referenced by CQRenderConverter::applyStyle(), fillItemFromText(), getBrush(), getColor(), getLinearGradient(), getPen(), getRadialGradient(), CQRenderConverter::setBackground(), CQEffectDescriptionEdit::slotSelectColorEnd(), and CQEffectDescriptionEdit::slotSelectColorStart().
QColor getColor | ( | const std::string & | color, |
const CLRenderResolver * | resolver | ||
) |
Definition at line 91 of file CQRenderConverter.cpp.
References getColor(), CLRenderResolver::getColorDefinition(), CLRenderResolver::getGradientBase(), and CLColorDefinition::setColorValue().
QSharedPointer<QFont> getFont | ( | const CLText * | item, |
const CLGroup * | group, | ||
const CLRenderResolver * | , | ||
const CLBoundingBox * | pBB | ||
) |
Definition at line 193 of file CQRenderConverter.cpp.
References CLRelAbsVector::getAbsoluteValue(), CLBoundingBox::getDimensions(), CLGroup::getFontFamily(), CLText::getFontFamily(), CLGroup::getFontSize(), CLText::getFontSize(), CLGroup::getFontStyle(), CLText::getFontStyle(), CLGroup::getFontWeight(), CLText::getFontWeight(), CLDimensions::getHeight(), CLRelAbsVector::getRelativeValue(), CLText::isSetFontFamily(), CLGroup::isSetFontFamily(), CLText::isSetFontSize(), CLGroup::isSetFontSize(), CLText::isSetFontStyle(), CLGroup::isSetFontStyle(), CLText::isSetFontWeight(), CLGroup::isSetFontWeight(), CLText::STYLE_ITALIC, CLText::WEIGHT_BOLD, and CLText::WEIGHT_NORMAL.
Referenced by CQRenderConverter::applyStyle(), fillItemFromText(), and CopasiUI3Window::slotFontSelection().
QSharedPointer<QGradient> getGradient | ( | const CLGradientBase * | base, |
const CLBoundingBox * | bounds, | ||
const CLRenderResolver * | resolver | ||
) |
Definition at line 178 of file CQRenderConverter.cpp.
References getLinearGradient(), getRadialGradient(), and linear().
Referenced by getBrush().
QSharedPointer<QLinearGradient> getLinearGradient | ( | const CLLinearGradient * | linear, |
const CLBoundingBox * | bounds, | ||
const CLRenderResolver * | resolver | ||
) |
Definition at line 105 of file CQRenderConverter.cpp.
References CLRelAbsVector::getAbsoluteValue(), getColor(), CLBoundingBox::getDimensions(), CLGradientBase::getGradientStop(), CLDimensions::getHeight(), CLGradientBase::getNumGradientStops(), CLGradientStop::getOffset(), CLBoundingBox::getPosition(), CLRelAbsVector::getRelativeValue(), CLGradientBase::getSpreadMethod(), CLGradientStop::getStopColor(), CLDimensions::getWidth(), CLPoint::getX(), CLLinearGradient::getXPoint1(), CLLinearGradient::getXPoint2(), CLPoint::getY(), CLLinearGradient::getYPoint1(), CLLinearGradient::getYPoint2(), CLGradientBase::PAD, CLGradientBase::REFLECT, and CLGradientBase::REPEAT.
Referenced by getGradient().
QSharedPointer<QPainterPath> getPath | ( | const CLPolygon * | pCurve, |
const CLBoundingBox * | pBB | ||
) |
Definition at line 468 of file CQRenderConverter.cpp.
References addToPath(), CLPolygon::getListOfElements(), and moveToPoint().
Referenced by addLineEndingToItem(), fillItemFromPolygon(), and fillItemFromRenderCurve().
QSharedPointer<QPainterPath> getPath | ( | const CLRectangle * | pRect, |
const CLBoundingBox * | pBB | ||
) |
Definition at line 503 of file CQRenderConverter.cpp.
References CLRelAbsVector::getAbsoluteValue(), CLBoundingBox::getDimensions(), CLRectangle::getHeight(), CLDimensions::getHeight(), CLBoundingBox::getPosition(), CLRectangle::getRadiusX(), CLRectangle::getRadiusY(), CLRelAbsVector::getRelativeValue(), CLRectangle::getWidth(), CLDimensions::getWidth(), CLPoint::getX(), CLRectangle::getX(), CLPoint::getY(), and CLRectangle::getY().
QSharedPointer<QPainterPath> getPath | ( | const CLEllipse * | pEllipse, |
const CLBoundingBox * | pBB | ||
) |
Definition at line 520 of file CQRenderConverter.cpp.
References CLRelAbsVector::getAbsoluteValue(), CLEllipse::getCX(), CLEllipse::getCY(), CLBoundingBox::getDimensions(), CLDimensions::getHeight(), CLBoundingBox::getPosition(), CLRelAbsVector::getRelativeValue(), CLEllipse::getRX(), CLEllipse::getRY(), CLDimensions::getWidth(), CLPoint::getX(), and CLPoint::getY().
QSharedPointer<QPainterPath> getPath | ( | const CLRenderCurve * | pCurve, |
const CLBoundingBox * | pBB | ||
) |
Definition at line 535 of file CQRenderConverter.cpp.
References addToPath(), CLRenderCurve::getListOfCurveElements(), and moveToPoint().
QSharedPointer<QPen> getPen | ( | const CLGraphicalPrimitive1D * | item, |
const CLGroup * | group, | ||
const CLRenderResolver * | resolver, | ||
const CLBoundingBox * | |||
) |
Definition at line 302 of file CQRenderConverter.cpp.
References getColor(), CLGraphicalPrimitive1D::getDashArray(), CLGraphicalPrimitive1D::getStroke(), CLGraphicalPrimitive1D::getStrokeWidth(), CLGraphicalPrimitive1D::isSetDashArray(), CLGraphicalPrimitive1D::isSetStroke(), and CLGraphicalPrimitive1D::isSetStrokeWidth().
Referenced by addLineEndingToItem(), CQRenderConverter::applyStyle(), fillItemFromCurve(), fillItemFromEllipse(), fillItemFromPolygon(), fillItemFromRectangle(), and fillItemFromRenderCurve().
QSharedPointer<QRadialGradient> getRadialGradient | ( | const CLRadialGradient * | radial, |
const CLBoundingBox * | bounds, | ||
const CLRenderResolver * | resolver | ||
) |
Definition at line 141 of file CQRenderConverter.cpp.
References CLRelAbsVector::getAbsoluteValue(), CLRadialGradient::getCenterX(), CLRadialGradient::getCenterY(), getColor(), CLBoundingBox::getDimensions(), CLRadialGradient::getFocalPointX(), CLRadialGradient::getFocalPointY(), CLGradientBase::getGradientStop(), CLDimensions::getHeight(), CLGradientBase::getNumGradientStops(), CLGradientStop::getOffset(), CLBoundingBox::getPosition(), CLRadialGradient::getRadius(), CLRelAbsVector::getRelativeValue(), CLGradientBase::getSpreadMethod(), CLGradientStop::getStopColor(), CLDimensions::getWidth(), CLPoint::getX(), CLPoint::getY(), CLGradientBase::PAD, CLGradientBase::REFLECT, and CLGradientBase::REPEAT.
Referenced by getGradient().
void moveToPoint | ( | QPainterPath & | path, |
const CLRenderPoint * | current, | ||
const CLBoundingBox * | pBB | ||
) |
Definition at line 460 of file CQRenderConverter.cpp.
References CLRelAbsVector::getAbsoluteValue(), CLBoundingBox::getDimensions(), CLDimensions::getHeight(), CLBoundingBox::getPosition(), CLRelAbsVector::getRelativeValue(), CLDimensions::getWidth(), CLPoint::getX(), CLRenderPoint::getXOffset(), CLPoint::getY(), and CLRenderPoint::getYOffset().
Referenced by getPath().
QPointF normalizePoint | ( | const QPointF & | vector | ) |
Definition at line 568 of file CQRenderConverter.cpp.
Referenced by applyRotationalMapping().
void transform | ( | QGraphicsItem * | item, |
const CLTransformation2D * | trans, | ||
const CLGroup * | group | ||
) |
Definition at line 36 of file CQRenderConverter.cpp.
References CLTransformation2D::getMatrix2D(), and CLTransformation::isSetMatrix().
Referenced by CCellDesignerImporter::classToEnum(), CCellDesignerImporter::connectionPolicyToEnum(), CLSimpleImageTexturizer::create_texture_for_image(), CCellDesignerImporter::directionToEnum(), fillItemFromEllipse(), fillItemFromGroup(), fillItemFromImage(), fillItemFromPolygon(), fillItemFromRectangle(), fillItemFromRenderCurve(), fillItemFromText(), CCellDesignerImporter::modificationLinkTypeToEnum(), CCellDesignerImporter::modificationTypeToEnum(), CQQtImageTexturizer::operator()(), CCellDesignerImporter::paintSchemeToEnum(), CCellDesignerImporter::parseLine(), CCellDesignerImporter::parsePaint(), CCellDesignerImporter::parseProteins(), CCellDesignerImporter::positionToCompartmentToEnum(), CCellDesignerImporter::positionToEnum(), CCellDesignerImporter::reactionTypeToEnum(), and CCellDesignerImporter::speciesModificationTypeToEnum().