function tr(s)
{
return s;
}
function Trace( parent )
{
this.setData( 0, 1000 );
this.setData( 1, 0 );
this.setData( 2, tr("След на нижней чаÑти чашки затвора") );
this.
normalPen = new QPen( new QColor( 0,
0,
0,
255 ),
2 );
this.
selectedPen = new QPen( new QColor( 0,
0,
255,
150 ),
2 );
Qt.Scene.addItem( this );
}
Trace.prototype.boundingRect = function()
{
return new QRectF( 0,
0,
50,
25 );
}
Trace.prototype.paint = function( painter, styleOptionGraphicsItem, widget )
{
if (this.isSelected())
painter.setPen( this.selectedPen );
else
painter.setPen( this.normalPen );
painter.drawArc( 0, 0, 50, 50, 2750, -2600 );
}
Trace.prototype.type = function()
{
return UserType + 1;
}
Trace.prototype.mouseMove = function( angle, x, y )
{
if (this.isSelected())
this.setRotation( -angle - 90 );
}
function addTrace()
{
var z = new Trace( Qt.Scene );
z.setPos( 275, 525 );
z.setTransformOriginPoint( z.mapFromParent( 300, 460 ) );
}
function getInfo()
{
return tr("След на нижней чаÑти чашки затвора");
}
function getData()
{
return 0;
}
function tr(s)
{
return s;
}
function Trace( parent )
{
QGraphicsItem.call( this, parent );
this.setData( 0, 1000 );
this.setData( 1, 0 );
this.setData( 2, tr("След на нижней чаÑти чашки затвора") );
this.setFlag( QGraphicsItem.ItemIsSelectable );
this.normalPen = new QPen( new QColor( 0, 0, 0, 255 ), 2 );
this.selectedPen = new QPen( new QColor( 0, 0, 255, 150 ), 2 );
Qt.Scene.addItem( this );
}
Trace.prototype = new QGraphicsItem();
Trace.prototype.boundingRect = function()
{
return new QRectF( 0, 0, 50, 25 );
}
Trace.prototype.paint = function( painter, styleOptionGraphicsItem, widget )
{
if (this.isSelected())
painter.setPen( this.selectedPen );
else
painter.setPen( this.normalPen );
painter.drawArc( 0, 0, 50, 50, 2750, -2600 );
}
Trace.prototype.type = function()
{
return UserType + 1;
}
Trace.prototype.mouseMove = function( angle, x, y )
{
if (this.isSelected())
this.setRotation( -angle - 90 );
}
function addTrace()
{
var z = new Trace( Qt.Scene );
z.setPos( 275, 525 );
z.setTransformOriginPoint( z.mapFromParent( 300, 460 ) );
}
function getInfo()
{
return tr("След на нижней чаÑти чашки затвора");
}
function getData()
{
return 0;
}
To copy to clipboard, switch view to plain text mode
Bookmarks