Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void View::updateImage ( int  id,
const QString fileName 
) [private, slot]

[0]

[6]

[1]

[7]

Definition at line 145 of file view.cpp.

References QList< T >::empty(), QGraphicsView::items(), QGraphicsScene::items(), QGraphicsView::scene(), and QList< T >::takeFirst().

Referenced by showInformation().

{
    QList<QGraphicsItem *> items = scene->items();

    while(!items.empty()) {
        QGraphicsItem *item = items.takeFirst();

        if (ImageItem *image = qgraphicsitem_cast<ImageItem *>(item)) {
            if (image->id() == id){
                image->setPixmap(QPixmap(":/" +fileName));
                image->adjust();
                break;
            }
        }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index