- qreal bound = maxBound? -99 : 99;
- QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
- if (l.size() > 0) {
- QList<QGraphicsItem*> lItems = graphicsView->scene()->items(l[0]->sceneBoundingRect(), Qt::IntersectsItemShape);
- if (lItems.size() > 0) {
- int n = lItems.size();
- qreal z;
- if (maxBound) {
- for (int i = 0; i < n; i++) {
- z = lItems[i]->zValue();
- if (z > bound && !lItems[i]->isSelected()) {
- bound = z;
- }
- }
- } else {
- // Get minimum z index.
- for (int i = 0; i < n; i++) {
- z = lItems[i]->zValue();
- if (z < bound && !lItems[i]->isSelected() && z > -999) {
- // There are items at the very bottom (background e.g.) with z-index < -1000.
- bound = z;
- }
- }
- }
- }
- }
- return bound;
-}
-
-void TitleWidget::slotZIndexUp()
+ qreal bound = maxBound ? -99 : 99;
+ QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
+ if (l.size() > 0) {
+ QList<QGraphicsItem*> lItems = graphicsView->scene()->items(l[0]->sceneBoundingRect(), Qt::IntersectsItemShape);
+ if (lItems.size() > 0) {
+ int n = lItems.size();
+ qreal z;
+ if (maxBound) {
+ for (int i = 0; i < n; i++) {
+ z = lItems[i]->zValue();
+ if (z > bound && !lItems[i]->isSelected()) {
+ bound = z;
+ }
+ }
+ } else {
+ // Get minimum z index.
+ for (int i = 0; i < n; i++) {
+ z = lItems[i]->zValue();
+ if (z < bound && !lItems[i]->isSelected() && z > -999) {
+ // There are items at the very bottom (background e.g.) with z-index < -1000.
+ bound = z;
+ }
+ }
+ }
+ }
+ }
+ return bound;
+}
+
+void TitleWidget::slotZIndexUp()