Ejemplo n.º 1
0
void KReportDesignerSectionScene::raiseSelected()
{
    QGraphicsItemList list = selectedItems();
    for (QGraphicsItemList::iterator it = list.begin();
            it != list.end(); ++it) {
        (*it)->setZValue(highestZValue() + 1);
    }
}
Ejemplo n.º 2
0
qreal KReportDesignerSectionScene::highestZValue()
{
    qreal z;
    qreal zz;
    z = 0;
    QGraphicsItemList list = items();
    for (QGraphicsItemList::iterator it = list.begin(); it != list.end(); ++it) {
        zz = (*it)->zValue();
        if (zz > z) {
            z = zz;
        }
    }
    return z;
}
Ejemplo n.º 3
0
void ReportSection::buildXML(QDomDocument & doc, QDomElement & section)
{
    int dpiY = KoGlobal::dpiY();
    qreal f = INCH_TO_POINT(m_scene->height() / dpiY);
    //f = ( ( f - ( int ) f ) > .5 ? f : f + 1 );
    QDomElement height = doc.createElement("height");
    height.appendChild(doc.createTextNode(QString::number(f)));
    section.appendChild(height);

    QDomElement bgcolor = doc.createElement("bgcolor");
    bgcolor.appendChild(doc.createTextNode(m_sectionData->bgColor().name()));
    section.appendChild(bgcolor);

    // now get a list of all the QCanvasItems on this scene and output them.
    QGraphicsItemList list = m_scene->items();
    for (QGraphicsItemList::iterator it = list.begin();
            it != list.end(); it++) {
        ReportEntity::buildXML((*it), doc, section);
    }


}
Ejemplo n.º 4
0
QGraphicsItemList KReportDesignerSectionScene::itemsOrdered() const
{
    QGraphicsItemList r;
    QGraphicsItemList list = items();
    for (QGraphicsItemList::iterator it = list.begin(); it != list.end(); ++it) {
        for (QGraphicsItemList::iterator rit = r.begin(); rit != r.end(); ++rit) {

        }
    }

    return r;
}