[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [calligra] krita/plugins/extensions/dockers/defaultdockers:
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2011-07-24 14:30:48
Message-ID: 20110724143048.C4564A60DA () git ! kde ! org
[Download RAW message or body]

Git commit 1f4a9a8190be7388bdb83aa1da0bfbf93d5de109 by Boudewijn Rempt.
Committed on 23/07/2011 at 13:02.
Pushed by rempt into branch 'master'.

Implement node conversion, step 1

Basic design: remove the node creation dropdown button and add a button
for every node type. The buttons are drop targets, and send out a signal
that can be used to create/create & replace a node based on data from the
dropped node.

M  +1    -12   krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.h
A  +51   -0    krita/plugins/extensions/dockers/defaultdockers/kis_drop_button.h     \
[License: LGPL (v2+)] M  +475  -64   \
krita/plugins/extensions/dockers/defaultdockers/wdglayerbox.ui M  +49   -57   \
krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp A  +98   -0    \
krita/plugins/extensions/dockers/defaultdockers/kis_drop_button.cpp     [License: \
LGPL (v2+)] M  +2    -0    \
krita/plugins/extensions/dockers/defaultdockers/CMakeLists.txt

http://commits.kde.org/calligra/1f4a9a8190be7388bdb83aa1da0bfbf93d5de109

diff --git a/krita/plugins/extensions/dockers/defaultdockers/CMakeLists.txt \
b/krita/plugins/extensions/dockers/defaultdockers/CMakeLists.txt index \
                5865ab2..7e6f224 100644
--- a/krita/plugins/extensions/dockers/defaultdockers/CMakeLists.txt
+++ b/krita/plugins/extensions/dockers/defaultdockers/CMakeLists.txt
@@ -3,6 +3,7 @@ set(kritadefaultdockers_PART_SRCS
     kis_birdeye_box.cc
     kis_layer_box.cpp
     defaultdockers.cpp
+    kis_drop_button.cpp
 )
 
 set(kritadefaultdockers_PART_HEADERS
@@ -10,6 +11,7 @@ set(kritadefaultdockers_PART_HEADERS
     kis_birdeye_box.h
     kis_layer_box.h
     defaultdockers.h
+    kis_drop_button.h
 )
 
 kde4_add_ui_files(kritadefaultdockers_PART_SRCS
diff --git a/krita/plugins/extensions/dockers/defaultdockers/kis_drop_button.cpp \
b/krita/plugins/extensions/dockers/defaultdockers/kis_drop_button.cpp new file mode \
100644 index 0000000..177df0b
--- /dev/null
+++ b/krita/plugins/extensions/dockers/defaultdockers/kis_drop_button.cpp
@@ -0,0 +1,98 @@
+/*
+ *  Copyright (c) 2010 Boudewijn Rempt <boud@valdyas.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "kis_drop_button.h"
+
+#include <QDragEnterEvent>
+#include <QDropEvent>
+#include <QMimeData>
+#include <QDebug>
+
+#include <KoColorSpace.h>
+#include <KoColorSpaceRegistry.h>
+
+#include <kis_types.h>
+#include <kis_image.h>
+#include <kis_paint_device.h>
+#include <kis_doc2.h>
+#include <kis_group_layer.h>
+#include <kis_paint_layer.h>
+#include <kis_node.h>
+#include <kis_mimedata.h>
+
+KisDropButton::KisDropButton(QWidget *parent)
+  : QToolButton(parent)
+{
+    setAcceptDrops(true);
+}
+
+
+void KisDropButton::dragEnterEvent(QDragEnterEvent *event)
+{
+    if (event->mimeData()->hasImage()
+            || event->mimeData()->hasFormat("application/x-krita-node")) {
+        event->accept();
+    } else {
+        event->ignore();
+    }
+}
+
+void KisDropButton::dropEvent(QDropEvent *event)
+{
+    qDebug() << "DROP EVENT" << event->mimeData()->formats();
+    
+    KisNodeSP node;
+    
+    const KisMimeData *mimedata = qobject_cast<const \
KisMimeData*>(event->mimeData()); +
+    if (mimedata) {
+        qDebug() << "internal move";
+        node = mimedata->node();
+    }
+    else if (event->mimeData()->hasFormat("application/x-krita-node") ) {
+        
+        qDebug() << "going to deserialize the dropped node";
+        
+        QByteArray ba = event->mimeData()->data("application/x-krita-node");
+        
+        KisDoc2 tmpDoc;
+        tmpDoc.loadNativeFormatFromStore(ba);
+        
+        node = tmpDoc.image()->rootLayer()->firstChild();
+    }
+    else if (event->mimeData()->hasImage()) {
+        
+        qDebug() << "got an image";
+        
+        QImage qimage = qvariant_cast<QImage>(event->mimeData()->imageData());
+        KisPaintDeviceSP device = new \
KisPaintDevice(KoColorSpaceRegistry::instance()->rgb8()); +        \
device->convertFromQImage(qimage, ""); +        node = new KisPaintLayer(0, "node \
creaed from dropped image", OPACITY_OPAQUE_U8, device); +    }
+    
+    if (node) {
+        if (event->keyboardModifiers() & Qt::ShiftModifier) {
+            replaceFromNode(node);
+        }
+        else {
+            createFromNode(node);
+        }        
+
+    }
+}
diff --git a/krita/plugins/extensions/dockers/defaultdockers/kis_drop_button.h \
b/krita/plugins/extensions/dockers/defaultdockers/kis_drop_button.h new file mode \
100644 index 0000000..e806f40
--- /dev/null
+++ b/krita/plugins/extensions/dockers/defaultdockers/kis_drop_button.h
@@ -0,0 +1,51 @@
+/*
+ *  Copyright (c) 2010 Boudewijn Rempt <boud@valdyas.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; see the file COPYING.LIB.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef KIS_DROP_BUTTON_H
+#define KIS_DROP_BUTTON_H
+
+#include <QToolButton>
+
+class KisView2;
+
+#include <kis_node.h>
+
+/**
+ * A toolbutton that implements a drop target.
+ */
+class KisDropButton : public QToolButton
+{
+    Q_OBJECT
+public:
+    explicit KisDropButton(QWidget *parent = 0);
+
+signals:
+
+    void createFromNode(const KisNodeSP node);
+    void replaceFromNode(const KisNodeSP node);
+
+protected:
+    
+    void dragEnterEvent(QDragEnterEvent *event);
+    void dropEvent(QDropEvent *event);
+
+    
+};
+
+#endif // KIS_DROP_BUTTON_H
diff --git a/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp \
b/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp index \
                c35ba43..f36b95f 100644
--- a/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp
+++ b/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp
@@ -51,6 +51,7 @@
 #include <klocale.h>
 #include <khbox.h>
 #include <kicon.h>
+#include <kaction.h>
 
 #include <KoDocumentSectionView.h>
 #include <KoColorSpace.h>
@@ -74,7 +75,7 @@
 #include "kis_doc2.h"
 
 #include "ui_wdglayerbox.h"
-#include <KAction>
+
 
 KisLayerBox::KisLayerBox()
         : QDockWidget(i18n("Layers"))
@@ -115,13 +116,11 @@ KisLayerBox::KisLayerBox()
     actions[1]->trigger(); //TODO save/load previous state
 
     m_wdgLayerBox->bnViewMode->setMenu(m_viewModeMenu);
+    m_wdgLayerBox->bnViewMode->setIconSize(QSize(22,22));
     m_wdgLayerBox->bnViewMode->setPopupMode(QToolButton::InstantPopup);
     m_wdgLayerBox->bnViewMode->setIcon(KIcon("view-choose"));
     m_wdgLayerBox->bnViewMode->setText(i18n("View mode"));
 
-    m_wdgLayerBox->bnAdd->setIcon(BarIcon("list-add"));
-    m_wdgLayerBox->bnAdd->setIconSize(QSize(22, 22));
-
     m_wdgLayerBox->bnDelete->setIcon(BarIcon("list-remove"));
     m_wdgLayerBox->bnDelete->setIconSize(QSize(22, 22));
 
@@ -147,7 +146,6 @@ KisLayerBox::KisLayerBox()
     m_wdgLayerBox->bnDuplicate->setIcon(BarIcon("edit-copy"));
     m_wdgLayerBox->bnDuplicate->setIconSize(QSize(22, 22));
 
-    connect(m_wdgLayerBox->bnAdd, SIGNAL(clicked()), SLOT(slotNewPaintLayer()));
     connect(m_wdgLayerBox->bnDelete, SIGNAL(clicked()), SLOT(slotRmClicked()));
     // NOTE: this is _not_ a mistake. The layerbox shows the layers in the reverse \
                order
     connect(m_wdgLayerBox->bnRaise, SIGNAL(clicked()), SLOT(slotLowerClicked()));
@@ -164,44 +162,42 @@ KisLayerBox::KisLayerBox()
 
     connect(m_wdgLayerBox->cmbComposite, SIGNAL(activated(int)), \
SLOT(slotCompositeOpChanged(int)));  
-    m_newPainterLayerAction = new KAction(KIcon("document-new"), i18n("&Paint \
                Layer"), this);
-    connect(m_newPainterLayerAction, SIGNAL(triggered(bool)), this, \
                SLOT(slotNewPaintLayer()));
-    m_newGroupLayerAction = new KAction(KIcon("folder-new"), i18n("&Group Layer"), \
                this);
-    connect(m_newGroupLayerAction, SIGNAL(triggered(bool)), this, \
                SLOT(slotNewGroupLayer()));
-    m_newCloneLayerAction = new KAction(KIcon("edit-copy"), i18n("&Clone Layer"), \
                this);
-    connect(m_newCloneLayerAction, SIGNAL(triggered(bool)), this, \
                SLOT(slotNewCloneLayer()));
-    m_newShapeLayerAction = new KAction(KIcon("bookmark-new"), i18n("&Shape Layer"), \
                this);
-    connect(m_newShapeLayerAction, SIGNAL(triggered(bool)), this, \
                SLOT(slotNewShapeLayer()));
-    m_newAdjustmentLayerAction = new KAction(KIcon("view-filter"), i18n("&Filter \
                Layer..."), this);
-    connect(m_newAdjustmentLayerAction, SIGNAL(triggered(bool)), this, \
                SLOT(slotNewAdjustmentLayer()));
-    m_newGeneratorLayerAction = new KAction(KIcon("view-filter"), i18n("&Generated \
                Layer..."), this);
-    connect(m_newGeneratorLayerAction, SIGNAL(triggered(bool)), this, \
                SLOT(slotNewGeneratorLayer()));
-    m_newTransparencyMaskAction = new KAction(KIcon("edit-copy"), \
                i18n("&Transparency Mask"), this);
-    connect(m_newTransparencyMaskAction, SIGNAL(triggered(bool)), this, \
                SLOT(slotNewTransparencyMask()));
-    m_newEffectMaskAction = new KAction(KIcon("bookmarks"), i18n("&Filter Mask..."), \
                this);
-    connect(m_newEffectMaskAction, SIGNAL(triggered(bool)), this, \
                SLOT(slotNewEffectMask()));
-    m_newSelectionMaskAction = new KAction(KIcon("edit-paste"), i18n("&Local \
                Selection"), this);
-    connect(m_newSelectionMaskAction, SIGNAL(triggered(bool)), this, \
                SLOT(slotNewSelectionMask()));
-
-    m_newLayerMenu = new KMenu(this);
-    m_wdgLayerBox->bnAdd->setMenu(m_newLayerMenu);
-    m_wdgLayerBox->bnAdd->setPopupMode(QToolButton::MenuButtonPopup);
-
-    m_newLayerMenu->addAction(m_newPainterLayerAction);
-    m_newLayerMenu->addAction(m_newGroupLayerAction);
-    m_newLayerMenu->addAction(m_newCloneLayerAction);
-    m_newLayerMenu->addAction(m_newShapeLayerAction);
-    m_newLayerMenu->addAction(m_newAdjustmentLayerAction);
-    m_newLayerMenu->addAction(m_newGeneratorLayerAction);
-    m_newLayerMenu->addSeparator();
-    m_newLayerMenu->addAction(m_newTransparencyMaskAction);
-    m_newLayerMenu->addAction(m_newEffectMaskAction);
-#if 0 // XXX_2.0
-    m_newLayerMenu->addAction(KIcon("view-filter"), i18n("&Transformation Mask..."), \
                this, SLOT(slotNewTransformationMask()));
-#endif
-    m_newLayerMenu->addAction(m_newSelectionMaskAction);
-
-
+    m_wdgLayerBox->bnAddPaintLayer->setIcon(BarIcon("document-new"));
+    m_wdgLayerBox->bnAddPaintLayer->setIconSize(QSize(22,22));
+    connect(m_wdgLayerBox->bnAddPaintLayer, SIGNAL(clicked()), \
SLOT(slotNewPaintLayer())); +    
+    m_wdgLayerBox->bnAddGroupLayer->setIcon(BarIcon("folder-new"));
+    m_wdgLayerBox->bnAddGroupLayer->setIconSize(QSize(22,22));
+    connect(m_wdgLayerBox->bnAddGroupLayer, SIGNAL(clicked()), \
SLOT(slotNewGroupLayer())); +    
+    m_wdgLayerBox->bnAddCloneLayer->setIcon(BarIcon("edit-copy"));
+    m_wdgLayerBox->bnAddCloneLayer->setIconSize(QSize(22,22));
+    connect(m_wdgLayerBox->bnAddCloneLayer, SIGNAL(clicked()), \
SLOT(slotNewCloneLayer())); +    
+    m_wdgLayerBox->bnAddShapeLayer->setIcon(BarIcon("bookmaer-new"));
+    m_wdgLayerBox->bnAddShapeLayer->setIconSize(QSize(22,22));
+    connect(m_wdgLayerBox->bnAddShapeLayer, SIGNAL(clicked()), \
SLOT(slotNewShapeLayer())); +    
+    m_wdgLayerBox->bnAddFilterLayer->setIcon(BarIcon("view-filter"));
+    m_wdgLayerBox->bnAddFilterLayer->setIconSize(QSize(22,22));
+    connect(m_wdgLayerBox->bnAddFilterLayer, SIGNAL(clicked()), \
SLOT(slotNewAdjustmentLayer())); +    
+    m_wdgLayerBox->bnAddGeneratedLayer->setIcon(BarIcon("view-filter"));
+    m_wdgLayerBox->bnAddGeneratedLayer->setIconSize(QSize(22,22));
+    connect(m_wdgLayerBox->bnAddGeneratedLayer, SIGNAL(clicked()), \
SLOT(slotNewGeneratorLayer())); +    
+    m_wdgLayerBox->bnAddTransparencyMask->setIcon(BarIcon("edit-copy"));
+    m_wdgLayerBox->bnAddTransparencyMask->setIconSize(QSize(22,22));
+    connect(m_wdgLayerBox->bnAddTransparencyMask, SIGNAL(clicked()), \
SLOT(slotNewTransparencyMask())); +    
+    m_wdgLayerBox->bnAddFilterMask->setIcon(BarIcon("bookmarks"));
+    m_wdgLayerBox->bnAddFilterMask->setIconSize(QSize(22,22));
+    connect(m_wdgLayerBox->bnAddFilterMask, SIGNAL(clicked()), \
SLOT(slotNewEffectMask())); +    
+    m_wdgLayerBox->bnAddLocalSelectionMask->setIcon(BarIcon("edit-paste"));
+    m_wdgLayerBox->bnAddLocalSelectionMask->setIconSize(QSize(22,22));
+    connect(m_wdgLayerBox->bnAddLocalSelectionMask, SIGNAL(clicked()), \
SLOT(slotNewSelectionMask())); +    
     m_nodeModel = new KisNodeModel(this);
 
     // connect model updateUI() to enable/disable controls
@@ -231,6 +227,12 @@ void KisLayerBox::setCanvas(KoCanvasBase *canvas)
         connect(m_canvas, SIGNAL(imageChanged(KisImageWSP)), \
SLOT(setImage(KisImageWSP)));  setImage(m_canvas->view()->image());
     }
+}    
+
+
+void KisLayerBox::unsetCanvas()
+{
+    m_canvas = 0;
 }
 
 void KisLayerBox::setImage(KisImageWSP image)
@@ -312,10 +314,10 @@ void KisLayerBox::updateUI()
             slotSetCompositeOp(l->compositeOp());
         }
     }
-    m_newTransparencyMaskAction->setEnabled(active);
-    m_newEffectMaskAction->setEnabled(active);
-    m_newSelectionMaskAction->setEnabled(active);
-    m_newCloneLayerAction->setEnabled(active && !active->inherits("KisGroupLayer"));
+    m_wdgLayerBox->bnAddTransparencyMask->setEnabled(active);
+    m_wdgLayerBox->bnAddFilterMask->setEnabled(active);
+    m_wdgLayerBox->bnAddLocalSelectionMask->setEnabled(active);
+    m_wdgLayerBox->bnAddCloneLayer->setEnabled(active && \
!active->inherits("KisGroupLayer"));  }
 
 void KisLayerBox::setCurrentNode(KisNodeSP node)
@@ -364,10 +366,6 @@ void KisLayerBox::slotContextMenuRequested(const QPoint &pos, \
                const QModelIndex
         if (!index.sibling(index.row() + 1, 0).isValid()) \
mergeLayerDown->setEnabled(false);  menu.addSeparator();
     }
-    menu.addSeparator();
-    menu.addAction(m_newTransparencyMaskAction);
-    menu.addAction(m_newEffectMaskAction);
-    menu.addAction(m_newSelectionMaskAction);
 
     menu.exec(pos);
 }
@@ -435,12 +433,6 @@ void KisLayerBox::slotNewEffectMask()
 }
 
 
-void KisLayerBox::slotNewTransformationMask()
-{
-    m_nodeManager->createNode("KisTransformationMask");
-}
-
-
 void KisLayerBox::slotNewSelectionMask()
 {
     m_nodeManager->createNode("KisSelectionMask");
diff --git a/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.h \
b/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.h index \
                d7d3d73..0564fc1 100644
--- a/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.h
+++ b/krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.h
@@ -65,7 +65,7 @@ public:
 
     /// reimplemented from KoCanvasObserverBase
     virtual void setCanvas(KoCanvasBase *canvas);
-    virtual void unsetCanvas() { m_canvas = 0; }
+    virtual void unsetCanvas();
 private slots:
 
     void setImage(KisImageWSP image);
@@ -103,7 +103,6 @@ private slots:
     void slotNewShapeLayer();
     void slotNewTransparencyMask();
     void slotNewEffectMask();
-    void slotNewTransformationMask();
     void slotNewSelectionMask();
     void slotCompositeOpChanged(int index);
     void slotOpacityChanged();
@@ -120,16 +119,6 @@ private:
     Ui_WdgLayerBox* m_wdgLayerBox;
     QTimer m_delayTimer;
     int m_newOpacity;
-
-    KAction* m_newPainterLayerAction;
-    KAction* m_newGroupLayerAction;
-    KAction* m_newCloneLayerAction;
-    KAction* m_newShapeLayerAction;
-    KAction* m_newAdjustmentLayerAction;
-    KAction* m_newGeneratorLayerAction;
-    KAction* m_newTransparencyMaskAction;
-    KAction* m_newEffectMaskAction;
-    KAction* m_newSelectionMaskAction;
 };
 
 class KisLayerBoxFactory : public KoDockFactoryBase
diff --git a/krita/plugins/extensions/dockers/defaultdockers/wdglayerbox.ui \
b/krita/plugins/extensions/dockers/defaultdockers/wdglayerbox.ui index \
                719e7bd..db0c3cc 100644
--- a/krita/plugins/extensions/dockers/defaultdockers/wdglayerbox.ui
+++ b/krita/plugins/extensions/dockers/defaultdockers/wdglayerbox.ui
@@ -6,39 +6,36 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>287</width>
-    <height>348</height>
+    <width>258</width>
+    <height>470</height>
    </rect>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
-   <property name="spacing">
-    <number>2</number>
-   </property>
-   <property name="margin">
-    <number>0</number>
-   </property>
-   <item>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="0" column="0">
     <layout class="QHBoxLayout" name="hbox2">
      <property name="margin">
       <number>0</number>
      </property>
      <item>
-      <widget class="KisCompositeOpComboBox" name="cmbComposite"/>
+      <widget class="KisCompositeOpComboBox" name="cmbComposite">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="toolTip">
+        <string>Blending Mode</string>
+       </property>
+       <property name="whatsThis">
+        <string>Select the blending mode for the layer.</string>
+       </property>
+      </widget>
      </item>
-    </layout>
-   </item>
-   <item>
-    <layout class="QHBoxLayout" name="hbox3">
-     <property name="topMargin">
-      <number>2</number>
-     </property>
-     <property name="bottomMargin">
-      <number>2</number>
-     </property>
      <item>
       <widget class="KisDoubleSliderSpinBox" name="doubleOpacity" native="true">
        <property name="sizePolicy">
-        <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Minimum">
          <horstretch>0</horstretch>
          <verstretch>0</verstretch>
         </sizepolicy>
@@ -49,51 +46,404 @@
          <height>15</height>
         </size>
        </property>
+       <property name="toolTip">
+        <string>Layer Opacity</string>
+       </property>
+       <property name="whatsThis">
+        <string>Adjust the transparency of the layer</string>
+       </property>
       </widget>
      </item>
+    </layout>
+   </item>
+   <item row="1" column="0">
+    <layout class="QHBoxLayout" name="horizontalLayout">
      <item>
-      <widget class="QToolButton" name="bnViewMode"/>
+      <widget class="KoDocumentSectionView" name="listLayers" native="true">
+       <property name="sizePolicy">
+        <sizepolicy hsizetype="MinimumExpanding" vsizetype="Expanding">
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QVBoxLayout" name="verticalLayout">
+       <item>
+        <widget class="QToolButton" name="bnViewMode">
+         <property name="minimumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="text">
+          <string>...</string>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>22</width>
+           <height>22</height>
+          </size>
+         </property>
+         <property name="autoRaise">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="Line" name="line_2">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KisDropButton" name="bnAddPaintLayer">
+         <property name="minimumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="toolTip">
+          <string>Add a New Paint Layer</string>
+         </property>
+         <property name="whatsThis">
+          <string>Add a New Paint Layer. Press to create an empty paint layer. Drop \
an existing layer or mask to create a new paint layer based on the layer or \
mask.</string> +         </property>
+         <property name="text">
+          <string>...</string>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>22</width>
+           <height>22</height>
+          </size>
+         </property>
+         <property name="autoRaise">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KisDropButton" name="bnAddGroupLayer">
+         <property name="minimumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="toolTip">
+          <string>Add a Group Layer</string>
+         </property>
+         <property name="statusTip">
+          <string/>
+         </property>
+         <property name="whatsThis">
+          <string>Add a Group Layer. Press to create an empty group layer, or drop a \
layer to create a new group containing that layer.</string> +         </property>
+         <property name="text">
+          <string>...</string>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>22</width>
+           <height>22</height>
+          </size>
+         </property>
+         <property name="autoRaise">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KisDropButton" name="bnAddFilterLayer">
+         <property name="minimumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="toolTip">
+          <string>Add a Filter Layer</string>
+         </property>
+         <property name="whatsThis">
+          <string>Add a Filter Layer. Press to create an empty filter layer or a \
filter layer with the current selection. Drop a layer or mask to create a filter \
layer based on that layer or mask.</string> +         </property>
+         <property name="text">
+          <string>...</string>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>22</width>
+           <height>22</height>
+          </size>
+         </property>
+         <property name="autoRaise">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KisDropButton" name="bnAddCloneLayer">
+         <property name="minimumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="toolTip">
+          <string>Add a Clone Layer</string>
+         </property>
+         <property name="whatsThis">
+          <string>Add a Clone Layer. Press to clone the current layer, or drop any \
layer to create a clone.</string> +         </property>
+         <property name="text">
+          <string>...</string>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>22</width>
+           <height>22</height>
+          </size>
+         </property>
+         <property name="autoRaise">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KisDropButton" name="bnAddGeneratedLayer">
+         <property name="minimumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="toolTip">
+          <string>Add a Generated Layer</string>
+         </property>
+         <property name="whatsThis">
+          <string>Add a Generated Layer. Press to create an empty generated layer or \
a generated layer with the current selection. Drop a layer or mask to create a \
generated layer based on that layer or mask.</string> +         </property>
+         <property name="text">
+          <string>...</string>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>22</width>
+           <height>22</height>
+          </size>
+         </property>
+         <property name="autoRaise">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KisDropButton" name="bnAddShapeLayer">
+         <property name="minimumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="toolTip">
+          <string>Create a new Shape Layer</string>
+         </property>
+         <property name="whatsThis">
+          <string>Create a new Shape Layer. Shape layers contain vector objects such \
as text or vector graphics. Drop vector objecs from the shape selector on the canvas \
after selecting a shape layer.</string> +         </property>
+         <property name="text">
+          <string>...</string>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>22</width>
+           <height>22</height>
+          </size>
+         </property>
+         <property name="autoRaise">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="Line" name="line">
+         <property name="orientation">
+          <enum>Qt::Horizontal</enum>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KisDropButton" name="bnAddTransparencyMask">
+         <property name="minimumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="toolTip">
+          <string>Add a Transparency Mask</string>
+         </property>
+         <property name="whatsThis">
+          <string>Add a New Transparency Mask. Press to create an emtpy transparency \
mask or a transparency mask based on the current global selection. Drop a layer or \
mask to create a new transparency mask based on a layer, a layer's channels or the \
mask.</string> +         </property>
+         <property name="text">
+          <string>...</string>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>22</width>
+           <height>22</height>
+          </size>
+         </property>
+         <property name="autoRaise">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KisDropButton" name="bnAddFilterMask">
+         <property name="minimumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="toolTip">
+          <string>Add a Filter Mask</string>
+         </property>
+         <property name="whatsThis">
+          <string>Add a Filter Mask. Press to create an empty filter mask or a \
filter mask with the current selection. Drop a layer or mask to create a filter mask \
based on that layer or mask.</string> +         </property>
+         <property name="text">
+          <string>...</string>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>22</width>
+           <height>22</height>
+          </size>
+         </property>
+         <property name="autoRaise">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="KisDropButton" name="bnAddLocalSelectionMask">
+         <property name="minimumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="maximumSize">
+          <size>
+           <width>32</width>
+           <height>32</height>
+          </size>
+         </property>
+         <property name="toolTip">
+          <string>Add a New Local Selection Mask</string>
+         </property>
+         <property name="whatsThis">
+          <string>Add a New Local Selection Mask. Press to create an emtpy local \
selection or a local selection based on the current global selection. Drop a layer or \
mask to create a new local selection based on a layer, a layer's channels or the \
mask.</string> +         </property>
+         <property name="text">
+          <string>...</string>
+         </property>
+         <property name="iconSize">
+          <size>
+           <width>22</width>
+           <height>22</height>
+          </size>
+         </property>
+         <property name="autoRaise">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <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>
      </item>
     </layout>
    </item>
-   <item>
-    <widget class="KoDocumentSectionView" name="listLayers" native="true">
-     <property name="sizePolicy">
-      <sizepolicy hsizetype="Preferred" vsizetype="Expanding">
-       <horstretch>0</horstretch>
-       <verstretch>0</verstretch>
-      </sizepolicy>
-     </property>
-    </widget>
-   </item>
-   <item>
+   <item row="2" column="0">
     <layout class="QHBoxLayout" name="hbox1">
      <property name="topMargin">
       <number>0</number>
      </property>
      <item>
-      <widget class="KisToolButton" name="bnAdd">
-       <property name="minimumSize">
-        <size>
-         <width>41</width>
-         <height>28</height>
-        </size>
-       </property>
-       <property name="toolTip">
-        <string>Create a new mask or layer</string>
-       </property>
-       <property name="text">
-        <string/>
-       </property>
-       <property name="popupMode">
-        <enum>QToolButton::MenuButtonPopup</enum>
-       </property>
-       <property name="autoRaise">
-        <bool>true</bool>
-       </property>
-      </widget>
-     </item>
-     <item>
       <widget class="QToolButton" name="bnDuplicate">
        <property name="minimumSize">
         <size>
@@ -111,7 +461,13 @@
         <string>Duplicate the currently selected layer or mask</string>
        </property>
        <property name="text">
-        <string/>
+        <string>...</string>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>22</width>
+         <height>22</height>
+        </size>
        </property>
        <property name="autoRaise">
         <bool>true</bool>
@@ -130,7 +486,13 @@
         <string>Move layer or mask down</string>
        </property>
        <property name="text">
-        <string/>
+        <string>...</string>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>22</width>
+         <height>22</height>
+        </size>
        </property>
        <property name="autoRaise">
         <bool>true</bool>
@@ -149,7 +511,13 @@
         <string>Move layer or mask up</string>
        </property>
        <property name="text">
-        <string/>
+        <string>...</string>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>22</width>
+         <height>22</height>
+        </size>
        </property>
        <property name="autoRaise">
         <bool>true</bool>
@@ -168,7 +536,13 @@
         <string>Move layer out of group</string>
        </property>
        <property name="text">
-        <string/>
+        <string>...</string>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>22</width>
+         <height>22</height>
+        </size>
        </property>
        <property name="autoRaise">
         <bool>true</bool>
@@ -187,7 +561,13 @@
         <string>Move layer into group</string>
        </property>
        <property name="text">
-        <string/>
+        <string>...</string>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>22</width>
+         <height>22</height>
+        </size>
        </property>
        <property name="autoRaise">
         <bool>true</bool>
@@ -208,6 +588,12 @@
        <property name="text">
         <string>...</string>
        </property>
+       <property name="iconSize">
+        <size>
+         <width>22</width>
+         <height>22</height>
+        </size>
+       </property>
        <property name="autoRaise">
         <bool>true</bool>
        </property>
@@ -241,7 +627,13 @@
         <string>Delete the layer or mask</string>
        </property>
        <property name="text">
-        <string/>
+        <string>...</string>
+       </property>
+       <property name="iconSize">
+        <size>
+         <width>22</width>
+         <height>22</height>
+        </size>
        </property>
        <property name="autoRaise">
         <bool>true</bool>
@@ -270,11 +662,30 @@
    <header location="global">KoDocumentSectionView.h</header>
   </customwidget>
   <customwidget>
-   <class>KisToolButton</class>
+   <class>KisDropButton</class>
    <extends>QToolButton</extends>
-   <header>kis_tool_button.h</header>
+   <header>kis_drop_button.h</header>
   </customwidget>
  </customwidgets>
+ <tabstops>
+  <tabstop>cmbComposite</tabstop>
+  <tabstop>bnAddLocalSelectionMask</tabstop>
+  <tabstop>bnAddFilterMask</tabstop>
+  <tabstop>bnAddTransparencyMask</tabstop>
+  <tabstop>bnAddShapeLayer</tabstop>
+  <tabstop>bnAddGeneratedLayer</tabstop>
+  <tabstop>bnAddCloneLayer</tabstop>
+  <tabstop>bnAddFilterLayer</tabstop>
+  <tabstop>bnAddGroupLayer</tabstop>
+  <tabstop>bnAddPaintLayer</tabstop>
+  <tabstop>bnDuplicate</tabstop>
+  <tabstop>bnLower</tabstop>
+  <tabstop>bnRaise</tabstop>
+  <tabstop>bnLeft</tabstop>
+  <tabstop>bnRight</tabstop>
+  <tabstop>bnProperties</tabstop>
+  <tabstop>bnDelete</tabstop>
+ </tabstops>
  <resources/>
  <connections/>
 </ui>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic