示例#1
0
/*!
  \brief Specify the borders of the paint device interval
  \param p1 first border
  \param p2 second border
*/
void QwtScaleMap::setPaintInterval( double p1, double p2 )
{
    d_p1 = p1;
    d_p2 = p2;

    updateFactor();
}
示例#2
0
void QG_ImageOptions::setAction(RS_ActionInterface* a, bool update) {
    if (a!=NULL && a->rtti()==RS2::ActionDrawImage) {
        action = (RS_ActionDrawImage*)a;

        QString sAngle;
        QString sFactor;
        if (update) {
            sAngle = QString("%1").arg(RS_Math::rad2deg(action->getAngle()));
            sFactor = QString("%1").arg(action->getFactor());
        } else {
            RS_SETTINGS->beginGroup("/Image");
            sAngle = RS_SETTINGS->readEntry("/ImageAngle", "0.0");
            sFactor = RS_SETTINGS->readEntry("/ImageFactor", "1.0");
            RS_SETTINGS->endGroup();
        }
    leAngle->setText(sAngle);
    leFactor->setText(sFactor);
        updateData();
        updateFactor();
    } else {
        RS_DEBUG->print(RS_Debug::D_ERROR, 
			"QG_ImageOptions::setAction: wrong action type");
        action = NULL;
    }
}
示例#3
0
/*!
  \brief Specify the borders of the scale interval
  \param s1 first border
  \param s2 second border
  \warning scales might be aligned to
           transformation depending boundaries
*/
void QwtScaleMap::setScaleInterval( double s1, double s2 )
{
    d_s1 = s1;
    d_s2 = s2;

    if ( d_transform )
    {
        d_s1 = d_transform->bounded( d_s1 );
        d_s2 = d_transform->bounded( d_s2 );
    }

    updateFactor();
}