CurveCursor::CurveCursor(QGraphicsScene * scene, QObject *parent, QPen pen) :
    QObject(parent)
{
    inverseScale = QPointF(1,1);
    lastX = 0;
    lastY = 0;

    //save the pattern to be able to de-scale it
    dashPattern = pen.dashPattern();
    vertLine = new QGraphicsLineItem();
    vertLine->setPen(pen);

    horLine = new QGraphicsLineItem();
    horLine->setPen(pen);



    vertCoordText = new QGraphicsSimpleTextItem();
    vertCoordText->setBrush(QBrush(Qt::white));
    horCoordText = new QGraphicsSimpleTextItem();
    horCoordText->setBrush(QBrush(Qt::white));



    setScene(scene);
    showHor = false;
    showHorizontal(showHor);
}
Esempio n. 2
0
void AngleMeasure::loadSettings()
{
	enableAngleMeasure(conf->value("AngleMeasure/enable_at_startup", false).toBool());
	useDmsFormat(conf->value("AngleMeasure/angle_format_dms", false).toBool());
	showPositionAngle(conf->value("AngleMeasure/show_position_angle", false).toBool());
	textColor = StelUtils::strToVec3f(conf->value("AngleMeasure/text_color", "0,0.5,1").toString());
	lineColor = StelUtils::strToVec3f(conf->value("AngleMeasure/line_color", "0,0.5,1").toString());
	horTextColor = StelUtils::strToVec3f(conf->value("AngleMeasure/text_color_horizontal", "0.9,0.6,0.4").toString());
	horLineColor = StelUtils::strToVec3f(conf->value("AngleMeasure/line_color_horizontal", "0.9,0.6,0.4").toString());
	showPositionAngleHor(conf->value("AngleMeasure/show_position_angle_horizontal", false).toBool());
	showEquatorial(conf->value("AngleMeasure/show_equatorial", true).toBool());
	showHorizontal(conf->value("AngleMeasure/show_horizontal", false).toBool());
	showHorizontalStartSkylinked(conf->value("AngleMeasure/link_horizontal_start_to_sky", false).toBool());
	showHorizontalEndSkylinked(conf->value("AngleMeasure/link_horizontal_end_to_sky", false).toBool());
}