connect(buttonAlignRight, SIGNAL(clicked()), this, SLOT(slotUpdateText()));
connect(buttonAlignCenter, SIGNAL(clicked()), this, SLOT(slotUpdateText()));
connect(buttonAlignNone, SIGNAL(clicked()), this, SLOT(slotUpdateText()));
- //connect(buttonInsertUnicode, SIGNAL(clicked()), this, SLOT(slotInsertUnicode()));
connect(displayBg, SIGNAL(stateChanged(int)), this, SLOT(displayBackgroundFrame()));
connect(m_unicodeDialog, SIGNAL(charSelected(QString)), this, SLOT(slotInsertUnicodeString(QString)));
zDown->setDefaultAction(m_zDown);
m_zTop = new QAction(KIcon("kdenlive-zindex-top"), QString(), this);
- m_zTop->setShortcut(Qt::Key_Home);
+ // TODO mbt 1414: Shortcut should change z index only if
+ // cursor is NOT in a text field ...
+ //m_zTop->setShortcut(Qt::Key_Home);
m_zTop->setToolTip(i18n("Raise object to top"));
connect(m_zTop, SIGNAL(triggered()), this, SLOT(slotZIndexTop()));
zTop->setDefaultAction(m_zTop);
m_zBottom = new QAction(KIcon("kdenlive-zindex-bottom"), QString(), this);
- m_zBottom->setShortcut(Qt::Key_End);
+ // TODO mbt 1414
+ //m_zBottom->setShortcut(Qt::Key_End);
m_zBottom->setToolTip(i18n("Lower object to bottom"));
connect(m_zBottom, SIGNAL(triggered()), this, SLOT(slotZIndexBottom()));
zBottom->setDefaultAction(m_zBottom);
origin_y_top->setToolTip(i18n("Invert y axis and change 0 point"));
rectBColor->setToolTip(i18n("Select fill color"));
rectFColor->setToolTip(i18n("Select border color"));
- rectBAlpha->setToolTip(i18n("Fill transparency"));
- rectFAlpha->setToolTip(i18n("Border transparency"));
+ rectBAlpha->setToolTip(i18n("Fill opacity"));
+ rectFAlpha->setToolTip(i18n("Border opacity"));
zoom_slider->setToolTip(i18n("Zoom"));
buttonRealSize->setToolTip(i18n("Original size (1:1)"));
buttonFitZoom->setToolTip(i18n("Fit zoom"));
backgroundColor->setToolTip(i18n("Select background color"));
- backgroundAlpha->setToolTip(i18n("Background Transparency"));
+ backgroundAlpha->setToolTip(i18n("Background opacity"));
itemhcenter->setIcon(KIcon("kdenlive-align-hor"));
itemhcenter->setToolTip(i18n("Align item horizontally"));
x.rotatez = rotlist[2].toDouble();
// Try to adjust zoom
- t.rotate(x.rotatex * (-1), Qt::XAxis);
- t.rotate(x.rotatey * (-1), Qt::YAxis);
- t.rotate(x.rotatez * (-1), Qt::ZAxis);
+ t.rotate(x.rotatex *(-1), Qt::XAxis);
+ t.rotate(x.rotatey *(-1), Qt::YAxis);
+ t.rotate(x.rotatez *(-1), Qt::ZAxis);
x.scalex = t.m11();
x.scaley = t.m22();
} else {
#endif
}
-qreal TitleWidget::zIndexBounds(bool maxBound)
+qreal TitleWidget::zIndexBounds(bool maxBound, bool intersectingOnly)
{
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);
+ QList<QGraphicsItem*> lItems;
+ // Get items (all or intersecting only)
+ if (intersectingOnly) {
+ lItems = graphicsView->scene()->items(l[0]->sceneBoundingRect(), Qt::IntersectsItemShape);
+ } else {
+ lItems = graphicsView->scene()->items();
+ }
if (lItems.size() > 0) {
int n = lItems.size();
qreal z;
QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
if (l.size() >= 1) {
qreal currentZ = l[0]->zValue();
- qreal max = zIndexBounds(true);
+ qreal max = zIndexBounds(true, true);
if (currentZ <= max) {
l[0]->setZValue(currentZ + 1);
updateDimension(l[0]);
QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
if (l.size() >= 1) {
qreal currentZ = l[0]->zValue();
- qreal max = zIndexBounds(true);
+ qreal max = zIndexBounds(true, false);
if (currentZ <= max) {
l[0]->setZValue(max + 1);
updateDimension(l[0]);
QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
if (l.size() >= 1) {
qreal currentZ = l[0]->zValue();
- qreal min = zIndexBounds(false);
+ qreal min = zIndexBounds(false, true);
if (currentZ >= min) {
l[0]->setZValue(currentZ - 1);
updateDimension(l[0]);
QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
if (l.size() >= 1) {
qreal currentZ = l[0]->zValue();
- qreal min = zIndexBounds(false);
+ qreal min = zIndexBounds(false, false);
if (currentZ >= min) {
l[0]->setZValue(min - 1);
updateDimension(l[0]);