Thanks for reply.....
Actually the flow is like this:
In view.h I have create a slot:
public slots:
void zoomIn();
This slot is connected to zoomIn icon on toolbar. When I clicked on it , a signal is fired and zoomIn slot is called and inside it I have used scaling as follow:
void View::zoomIn()
{
scale( 1.25,1.25 );
emit zoom();
}
void View::zoomIn()
{
scale( 1.25,1.25 );
emit zoom();
}
To copy to clipboard, switch view to plain text mode
emit zoom() is connected to the slot "DrawImages()" in Draw class.
In this function images are drawn one by one on particular coordinates.
The coordinates are used as follow:
vertex
= QPointF( coordinate x, coordinate Y
);
pixmapItem->setOffset ( vertex );
group->addToGroup( pixmapItem );
return group;
QGraphicsItemGroup *group = new QGraphicsItemGroup;
QPointF vertex;
const QPixmap *pic = new QPixmap( "/home/bargi/aa.png" );
QGraphicsPixmapItem *pixmapItem = new QGraphicsPixmapItem( pic );
vertex = QPointF( coordinate x, coordinate Y );
pixmapItem->setOffset ( vertex );
group->addToGroup( pixmapItem );
return group;
To copy to clipboard, switch view to plain text mode
And this return group is used in some function say Draw_item() and add to scene as follow:
m_scene->addItem( group );
m_scene->addItem( group );
To copy to clipboard, switch view to plain text mode
These are the things included in drawing Pixmap.
Hope this have clear the picture.If any doubts remain plz let me know .....
Thanks
Bookmarks