]> git.sesse.net Git - kdenlive/commitdiff
title improvements (bold, italic, move items with arrow keys)
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 2 Apr 2008 21:03:33 +0000 (21:03 +0000)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Wed, 2 Apr 2008 21:03:33 +0000 (21:03 +0000)
svn path=/branches/KDE4/; revision=2155

src/graphicsscenerectmove.cpp
src/graphicsscenerectmove.h
src/projectlist.cpp
src/titlewidget.cpp
src/titlewidget.h
src/widgets/titlewidget_ui.ui

index e5590cbaf203140db816141fdb5e74f56c173ce4..0f425d1fd27b784052c647f9066e3e3c10dd0ffc 100644 (file)
@@ -5,6 +5,7 @@
 #include <QGraphicsView>
 #include <QCursor>
 #include <QList>
+#include <QKeyEvent>
 
 #include "graphicsscenerectmove.h"
 
@@ -13,6 +14,38 @@ GraphicsSceneRectMove::GraphicsSceneRectMove(QObject *parent): QGraphicsScene(pa
     zoom = 1.0;
 }
 
+void GraphicsSceneRectMove::setSelectedItem(QGraphicsItem *item) {
+    m_selectedItem = item;
+    item->setSelected(true);
+}
+
+//virtual
+void GraphicsSceneRectMove::keyPressEvent(QKeyEvent * keyEvent) {
+    if (m_selectedItem == NULL) {
+        QGraphicsScene::keyPressEvent(keyEvent);
+        return;
+    }
+    int diff = 1;
+    if (keyEvent->modifiers() & Qt::ControlModifier) diff = 10;
+    switch (keyEvent->key()) {
+    case Qt::Key_Left:
+        m_selectedItem->setPos(m_selectedItem->pos() - QPointF(diff, 0));
+        break;
+    case Qt::Key_Right:
+        m_selectedItem->setPos(m_selectedItem->pos() + QPointF(diff, 0));
+        break;
+    case Qt::Key_Up:
+        m_selectedItem->setPos(m_selectedItem->pos() - QPointF(0, diff));
+        break;
+    case Qt::Key_Down:
+        m_selectedItem->setPos(m_selectedItem->pos() + QPointF(0, diff));
+        break;
+    default:
+        QGraphicsScene::keyPressEvent(keyEvent);
+    }
+    emit itemMoved();
+}
+
 //virtual
 void GraphicsSceneRectMove::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* e) {
     QPointF p = e->scenePos();
@@ -170,13 +203,13 @@ void GraphicsSceneRectMove::mouseMoveEvent(QGraphicsSceneMouseEvent* e) {
         QPointF p = e->scenePos();
         p += QPoint(-2, -2);
         resizeMode = NoResize;
-       bool itemFound = false;
+        bool itemFound = false;
         foreach(QGraphicsItem* g, items(QRectF(p , QSizeF(4, 4)).toRect())) {
             if (g->type() == 3) {
                 QGraphicsRectItem *gi = (QGraphicsRectItem*)g;
                 QRectF r = gi->rect();
                 r.translate(gi->scenePos());
-               itemFound = true;
+                itemFound = true;
                 if ((r.toRect().topLeft() - e->scenePos().toPoint()).manhattanLength() < 6 / zoom) {
                     setCursor(QCursor(Qt::SizeFDiagCursor));
                 } else if ((r.toRect().bottomLeft() - e->scenePos().toPoint()).manhattanLength() < 6 / zoom) {
@@ -194,9 +227,9 @@ void GraphicsSceneRectMove::mouseMoveEvent(QGraphicsSceneMouseEvent* e) {
                 } else if (qAbs(r.toRect().bottom() - e->scenePos().toPoint().y()) < 3 / zoom) {
                     setCursor(Qt::SizeVerCursor);
                 } else setCursor(QCursor(Qt::ArrowCursor));
-               break;
+                break;
             }
-           if (!itemFound) setCursor(QCursor(Qt::ArrowCursor));
+            if (!itemFound) setCursor(QCursor(Qt::ArrowCursor));
         }
         QGraphicsScene::mouseMoveEvent(e);
     }
index 662a746028b7e6b250404072056669d7b385702b..6549a8b12916da9e3c4192f1fa309923d02e118f 100644 (file)
@@ -10,9 +10,12 @@ class GraphicsSceneRectMove: public QGraphicsScene {
 public:
     GraphicsSceneRectMove(QObject* parent = 0);
 
+    void setSelectedItem(QGraphicsItem *item);
     void setScale(double s);
     void setZoom(double s);
 
+protected:
+    virtual void keyPressEvent(QKeyEvent * keyEvent);
     virtual void mousePressEvent(QGraphicsSceneMouseEvent*);
     virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent* e);
     virtual void mouseMoveEvent(QGraphicsSceneMouseEvent*);
index 6c7d3f63cce64468d5300281fe39fab006c01410..cee7dbd01f773532314cb3a421936e536929c623 100644 (file)
@@ -414,8 +414,8 @@ void ProjectList::slotAddTitleClip() {
     int groupId = -1;
     ProjectItem *item = static_cast <ProjectItem*>(listView->currentItem());
     if (item && item->clipType() != FOLDER) {
-       while (item->parent()) {
-           item = static_cast <ProjectItem*>(item->parent());
+        while (item->parent()) {
+            item = static_cast <ProjectItem*>(item->parent());
             if (item->clipType() == FOLDER) break;
         }
     }
index 6e19ff1f9340462143b2f67b80aaa5529809bec2..4a71f114e5e65bde1b71c61123db5e1a36d179d2 100644 (file)
@@ -33,7 +33,7 @@
 
 int settingUp = false;
 
-TitleWidget::TitleWidget(Render *render, QWidget *parent): QDialog(parent) {
+TitleWidget::TitleWidget(Render *render, QWidget *parent): QDialog(parent), m_frameImage(NULL), m_render(render), m_count(0) {
     setupUi(this);
     frame_properties->setFont(KGlobalSettings::toolBarFont());
     toolBox->setFont(KGlobalSettings::toolBarFont());
@@ -49,8 +49,8 @@ TitleWidget::TitleWidget(Render *render, QWidget *parent): QDialog(parent) {
 
     ktextedit->setHidden(true);
     connect(fontColorButton, SIGNAL(clicked()), this, SLOT(slotUpdateText())) ;
-    connect(font_family, SIGNAL(currentFontChanged (const QFont &)), this, SLOT(slotUpdateText())) ;
-    connect(font_size, SIGNAL(valueChanged (int)), this, SLOT(slotUpdateText())) ;
+    connect(font_family, SIGNAL(currentFontChanged(const QFont &)), this, SLOT(slotUpdateText())) ;
+    connect(font_size, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateText())) ;
     connect(textAlpha, SIGNAL(valueChanged(int)), this, SLOT(slotUpdateText()));
     //connect (ktextedit, SIGNAL(selectionChanged()), this , SLOT (textChanged()));
 
@@ -78,9 +78,17 @@ TitleWidget::TitleWidget(Render *render, QWidget *parent): QDialog(parent) {
     connect(value_h, SIGNAL(valueChanged(int)), this, SLOT(slotAdjustSelectedItem()));
     connect(buttonFitZoom, SIGNAL(clicked()), this, SLOT(slotAdjustZoom()));
     connect(buttonRealSize, SIGNAL(clicked()), this, SLOT(slotZoomOneToOne()));
+    connect(buttonBold, SIGNAL(clicked()), this, SLOT(slotUpdateText()));
+    connect(buttonItalic, SIGNAL(clicked()), this, SLOT(slotUpdateText()));
+    connect(buttonUnder, SIGNAL(clicked()), this, SLOT(slotUpdateText()));
+    connect(displayBg, SIGNAL(stateChanged(int)), this, SLOT(displayBackgroundFrame()));
 
     buttonFitZoom->setIcon(KIcon("zoom-fit-best"));
     buttonRealSize->setIcon(KIcon("zoom-original"));
+    buttonBold->setIcon(KIcon("format-text-bold"));
+    buttonItalic->setIcon(KIcon("format-text-italic"));
+    buttonUnder->setIcon(KIcon("format-text-underline"));
+
     m_scene = new GraphicsSceneRectMove(this);
 
     // a gradient background
@@ -101,12 +109,7 @@ TitleWidget::TitleWidget(Render *render, QWidget *parent): QDialog(parent) {
     framepen.setColor(Qt::red);
     m_frameWidth = render->renderWidth();
     m_frameHeight = render->renderHeight();
-    QPixmap bg = render->extractFrame((int) render->seekPosition().frames(render->fps()), m_frameWidth, m_frameHeight);
 
-    QGraphicsPixmapItem *fb = new QGraphicsPixmapItem(bg);
-    fb->setZValue(-1000);
-    fb->setFlags(QGraphicsItem::ItemClipsToShape);
-    graphicsView->scene()->addItem(fb);
 
     m_frameBorder = new QGraphicsRectItem(QRectF(0, 0, m_frameWidth, m_frameHeight));
     m_frameBorder->setPen(framepen);
@@ -134,6 +137,20 @@ void TitleWidget::resizeEvent(QResizeEvent * event) {
     //slotAdjustZoom();
 }
 
+void TitleWidget::displayBackgroundFrame() {
+    if (m_frameImage) delete m_frameImage;
+    m_frameImage = NULL;
+    if (!displayBg->isChecked()) return;
+    QPixmap bg = m_render->extractFrame((int) m_render->seekPosition().frames(m_render->fps()), m_frameWidth / 2, m_frameHeight / 2);
+    m_frameImage = new QGraphicsPixmapItem(bg);
+    QTransform qtrans;
+    qtrans.scale(2.0, 2.0);
+    m_frameImage->setTransform(qtrans);
+    m_frameImage->setZValue(-1100);
+    m_frameImage->setFlags(QGraphicsItem::ItemClipsToShape);
+    graphicsView->scene()->addItem(m_frameImage);
+}
+
 void TitleWidget::initViewports() {
     startViewport = new QGraphicsPolygonItem(QPolygonF(QRectF(0, 0, 0, 0)));
     endViewport = new QGraphicsPolygonItem(QPolygonF(QRectF(0, 0, 0, 0)));
@@ -197,6 +214,9 @@ void TitleWidget::slotNewRect() {
     QColor b = rectBColor->color();
     b.setAlpha(rectBAlpha->value());
     ri->setBrush(QBrush(b));
+    ri->setZValue(m_count++);
+    setCurrentItem(ri);
+    graphicsView->setFocus();
 }
 
 void TitleWidget::slotNewText() {
@@ -205,15 +225,26 @@ void TitleWidget::slotNewText() {
     tt->setTextInteractionFlags(Qt::NoTextInteraction);
     tt->setPos(m_frameWidth / 2, m_frameHeight / 2);
     QFont font = font_family->currentFont();
-    font.setPointSize (font_size->value());
+    font.setPointSize(font_size->value());
     tt->setFont(font);
-    connect(tt->document(), SIGNAL(contentsChanged()), this, SLOT(selectionChanged()));
+    tt->setZValue(m_count++);
+    setCurrentItem(tt);
+    graphicsView->setFocus();
+    //connect(tt->document(), SIGNAL(contentsChanged()), this, SLOT(selectionChanged()));
     kDebug() << tt->metaObject()->className();
     /*QGraphicsRectItem * ri=graphicsView->scene()->addRect(-50,-50,100,100);
     ri->setFlags(QGraphicsItem::ItemIsMovable|QGraphicsItem::ItemIsSelectable);*/
 
 }
 
+void TitleWidget::setCurrentItem(QGraphicsItem *item) {
+    QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
+    if (l.size() >= 1) {
+        l[0]->setSelected(false);
+    }
+    m_scene->setSelectedItem(item);
+}
+
 void TitleWidget::zIndexChanged(int v) {
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() >= 1) {
@@ -236,6 +267,19 @@ void TitleWidget::selectionChanged() {
                 ktextedit->setHtml(i->toHtml());
             toolBox->setCurrentIndex(2);
             toolBox->setItemEnabled(2, true);
+
+
+            QFont font = i->font();
+            font_family->setCurrentFont(font);
+            font_size->setValue(font.pointSize());
+            buttonBold->setChecked(font.bold());
+            buttonItalic->setChecked(font.italic());
+            buttonUnder->setChecked(font.underline());
+
+            QColor color = i->defaultTextColor();
+            fontColorButton->setColor(color);
+            textAlpha->setValue(color.alpha());
+
             value_x->setValue((int) i->pos().x());
             value_y->setValue((int) i->pos().y());
             value_w->setValue((int) i->boundingRect().width());
@@ -313,24 +357,27 @@ void TitleWidget::textChanged() {
 
 void TitleWidget::slotUpdateText() {
     QFont font = font_family->currentFont();
-    font.setPointSize (font_size->value());
+    font.setPointSize(font_size->value());
+    font.setBold(buttonBold->isChecked());
+    font.setItalic(buttonItalic->isChecked());
+    font.setUnderline(buttonUnder->isChecked());
     QColor color = fontColorButton->color();
     color.setAlpha(textAlpha->value());
 
     QGraphicsTextItem* item = NULL;
     QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() == 1 && (l[0])->type() == 8) {
-       item = (QGraphicsTextItem*)l[0];
+        item = (QGraphicsTextItem*)l[0];
     }
     if (!item) return;
-    if (item->textCursor().selection ().isEmpty()) 
+    //if (item->textCursor().selection ().isEmpty())
     {
-       item->setFont(font);
-       item->setDefaultTextColor(color);
+        item->setFont(font);
+        item->setDefaultTextColor(color);
     }
     /*else {
-       QTextDocumentFragment selec = item->textCursor().selection ();
-       selec.set
+    QTextDocumentFragment selec = item->textCursor().selection ();
+    selec.set
     }*/
     //if (ktextedit->textCursor().selectedText().isEmpty()) ktextedit->selectAll();
 
@@ -338,8 +385,8 @@ void TitleWidget::slotUpdateText() {
     //ktextedit->setTextColor(color);
     /*QList<QGraphicsItem*> l = graphicsView->scene()->selectedItems();
     if (l.size() == 1 && (l[0])->type() == 8 && l[0]->hasFocus()) {
-       QGraphicsTextItem* item = static_cast <QGraphicsTextItem*> (l[0]);
-       //item-
+    QGraphicsTextItem* item = static_cast <QGraphicsTextItem*> (l[0]);
+    //item-
     }*/
 }
 
index 59b0f8205c3729561384f7c401264b5371fce13f..6a1771cdcc673125c1b12946ea0d3e44ec2e2d6c 100644 (file)
@@ -20,6 +20,7 @@
 
 
 #include <QDialog>
+
 #include <QMap>
 
 #include "ui_titlewidget_ui.h"
@@ -53,8 +54,11 @@ private:
     QMap<QGraphicsItem*, Transform > transformations;
     TitleDocument m_titledocument;
     QGraphicsRectItem *m_frameBorder;
+    QGraphicsPixmapItem *m_frameImage;
     int m_frameWidth;
     int m_frameHeight;
+    Render *m_render;
+    int m_count;
 
 public slots:
     void slotNewText();
@@ -79,6 +83,8 @@ private slots:
     void slotAdjustZoom();
     void slotZoomOneToOne();
     void slotUpdateText();
+    void displayBackgroundFrame();
+    void setCurrentItem(QGraphicsItem *item);
 };
 
 
index ce90114ff22ab7d1769a24be0dd0e7b3f0b16342..418552489684dacde1f4a11dd2a3abd220bacf5f 100644 (file)
@@ -6,7 +6,7 @@
     <x>0</x>
     <y>0</y>
     <width>771</width>
-    <height>510</height>
+    <height>612</height>
    </rect>
   </property>
   <property name="sizePolicy" >
@@ -19,7 +19,7 @@
    <string>Dialog</string>
   </property>
   <layout class="QGridLayout" name="gridLayout_4" >
-   <item row="0" column="0" colspan="5" >
+   <item row="0" column="0" colspan="6" >
     <layout class="QHBoxLayout" >
      <item>
       <widget class="QPushButton" name="newRectButton" >
@@ -71,7 +71,7 @@
      </item>
     </layout>
    </item>
-   <item row="1" column="0" colspan="5" >
+   <item row="1" column="0" colspan="6" >
     <widget class="QFrame" name="frame_properties" >
      <property name="frameShape" >
       <enum>QFrame::StyledPanel</enum>
        </layout>
       </item>
      </layout>
-     <zorder>splitter</zorder>
     </widget>
    </item>
-   <item row="2" column="0" colspan="5" >
+   <item row="3" column="0" >
+    <widget class="QToolButton" name="buttonFitZoom" >
+     <property name="text" >
+      <string>V</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="1" >
+    <widget class="QToolButton" name="buttonRealSize" >
+     <property name="text" >
+      <string>V</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="2" >
+    <widget class="QSlider" name="zoom_slider" >
+     <property name="minimumSize" >
+      <size>
+       <width>100</width>
+       <height>0</height>
+      </size>
+     </property>
+     <property name="maximumSize" >
+      <size>
+       <width>150</width>
+       <height>16777215</height>
+      </size>
+     </property>
+     <property name="minimum" >
+      <number>1</number>
+     </property>
+     <property name="maximum" >
+      <number>10</number>
+     </property>
+     <property name="pageStep" >
+      <number>2</number>
+     </property>
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="3" >
+    <widget class="QLabel" name="zoom_label" >
+     <property name="text" >
+      <string>x1</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="5" >
+    <widget class="QDialogButtonBox" name="buttonBox" >
+     <property name="orientation" >
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="standardButtons" >
+      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="0" colspan="6" >
     <widget class="QSplitter" name="splitter" >
      <property name="sizePolicy" >
       <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
         <rect>
          <x>0</x>
          <y>0</y>
-         <width>297</width>
-         <height>185</height>
+         <width>395</width>
+         <height>279</height>
         </rect>
        </property>
        <attribute name="label" >
         <rect>
          <x>0</x>
          <y>0</y>
-         <width>297</width>
-         <height>185</height>
+         <width>395</width>
+         <height>279</height>
         </rect>
        </property>
        <attribute name="label" >
         <rect>
          <x>0</x>
          <y>0</y>
-         <width>267</width>
-         <height>177</height>
+         <width>395</width>
+         <height>279</height>
         </rect>
        </property>
        <attribute name="label" >
         <item row="0" column="0" >
          <widget class="QFontComboBox" name="font_family" />
         </item>
-        <item row="1" column="0" >
-         <layout class="QHBoxLayout" name="horizontalLayout" >
-          <item>
-           <widget class="QSpinBox" name="font_size" >
-            <property name="minimum" >
-             <number>8</number>
-            </property>
-            <property name="maximum" >
-             <number>1000</number>
-            </property>
-            <property name="value" >
-             <number>20</number>
-            </property>
-           </widget>
-          </item>
-          <item>
-           <widget class="KColorButton" name="fontColorButton" />
-          </item>
-          <item>
-           <widget class="QSlider" name="textAlpha" >
-            <property name="maximum" >
-             <number>255</number>
-            </property>
-            <property name="value" >
-             <number>255</number>
-            </property>
-            <property name="orientation" >
-             <enum>Qt::Horizontal</enum>
-            </property>
-           </widget>
-          </item>
-         </layout>
+        <item row="3" column="0" >
+         <widget class="KTextEdit" name="ktextedit" />
         </item>
         <item row="2" column="0" >
          <layout class="QHBoxLayout" name="horizontalLayout_2" >
           <item>
-           <widget class="QToolButton" name="toolButton_6" >
+           <widget class="QToolButton" name="buttonBold" >
             <property name="text" >
              <string>...</string>
             </property>
+            <property name="checkable" >
+             <bool>true</bool>
+            </property>
+            <property name="checked" >
+             <bool>false</bool>
+            </property>
            </widget>
           </item>
           <item>
-           <widget class="QToolButton" name="toolButton_5" >
+           <widget class="QToolButton" name="buttonItalic" >
             <property name="text" >
              <string>...</string>
             </property>
+            <property name="checkable" >
+             <bool>true</bool>
+            </property>
            </widget>
           </item>
           <item>
-           <widget class="QToolButton" name="toolButton_4" >
+           <widget class="QToolButton" name="buttonUnder" >
             <property name="text" >
              <string>...</string>
             </property>
+            <property name="checkable" >
+             <bool>true</bool>
+            </property>
            </widget>
           </item>
           <item>
           </item>
          </layout>
         </item>
-        <item row="3" column="0" >
-         <widget class="KTextEdit" name="ktextedit" />
+        <item row="1" column="0" >
+         <layout class="QHBoxLayout" name="horizontalLayout" >
+          <item>
+           <widget class="QSpinBox" name="font_size" >
+            <property name="minimum" >
+             <number>8</number>
+            </property>
+            <property name="maximum" >
+             <number>1000</number>
+            </property>
+            <property name="value" >
+             <number>20</number>
+            </property>
+           </widget>
+          </item>
+          <item>
+           <widget class="KColorButton" name="fontColorButton" />
+          </item>
+          <item>
+           <widget class="QSlider" name="textAlpha" >
+            <property name="maximum" >
+             <number>255</number>
+            </property>
+            <property name="value" >
+             <number>255</number>
+            </property>
+            <property name="orientation" >
+             <enum>Qt::Horizontal</enum>
+            </property>
+           </widget>
+          </item>
+         </layout>
+        </item>
+        <item row="4" column="0" >
+         <spacer name="verticalSpacer" >
+          <property name="orientation" >
+           <enum>Qt::Vertical</enum>
+          </property>
+          <property name="sizeHint" stdset="0" >
+           <size>
+            <width>20</width>
+            <height>40</height>
+           </size>
+          </property>
+         </spacer>
         </item>
        </layout>
       </widget>
         <rect>
          <x>0</x>
          <y>0</y>
-         <width>278</width>
-         <height>249</height>
+         <width>395</width>
+         <height>279</height>
         </rect>
        </property>
        <attribute name="label" >
         <rect>
          <x>0</x>
          <y>0</y>
-         <width>297</width>
-         <height>185</height>
+         <width>395</width>
+         <height>279</height>
         </rect>
        </property>
        <attribute name="label" >
         <rect>
          <x>0</x>
          <y>0</y>
-         <width>278</width>
-         <height>224</height>
+         <width>395</width>
+         <height>279</height>
         </rect>
        </property>
        <attribute name="label" >
      </widget>
     </widget>
    </item>
-   <item row="3" column="0" >
-    <widget class="QToolButton" name="buttonFitZoom" >
-     <property name="text" >
-      <string>V</string>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="1" >
-    <widget class="QToolButton" name="buttonRealSize" >
-     <property name="text" >
-      <string>V</string>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="2" >
-    <widget class="QSlider" name="zoom_slider" >
-     <property name="minimumSize" >
-      <size>
-       <width>100</width>
-       <height>0</height>
-      </size>
-     </property>
-     <property name="maximumSize" >
-      <size>
-       <width>150</width>
-       <height>16777215</height>
-      </size>
-     </property>
-     <property name="minimum" >
-      <number>1</number>
-     </property>
-     <property name="maximum" >
-      <number>10</number>
-     </property>
-     <property name="pageStep" >
-      <number>2</number>
-     </property>
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-    </widget>
-   </item>
-   <item row="3" column="3" >
-    <widget class="QLabel" name="zoom_label" >
-     <property name="text" >
-      <string>x1</string>
-     </property>
-    </widget>
-   </item>
    <item row="3" column="4" >
-    <widget class="QDialogButtonBox" name="buttonBox" >
-     <property name="orientation" >
-      <enum>Qt::Horizontal</enum>
-     </property>
-     <property name="standardButtons" >
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
+    <widget class="QCheckBox" name="displayBg" >
+     <property name="text" >
+      <string>Show background</string>
      </property>
     </widget>
    </item>