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

List:       kde-commits
Subject:    kdevelop/lib/qextmdi
From:       Falk Brettschneider <falk.brettschneider () gmx ! de>
Date:       2003-08-20 21:02:22
[Download RAW message or body]

CVS commit by falkbr: 

compile fix on KDE-3.1


  M +15 -0     include/kdockwidget_compat.h   1.2
  M +3661 -3643 src/kdockwidget_compat.cpp   1.2


--- kdevelop/lib/qextmdi/include/kdockwidget_compat.h  #1.1:1.2
@@ -635,4 +635,19 @@ public:
   KDockWidget *findNearestDockWidget(DockPosition pos);
 
+  /**
+   * Allows changing the pixmap which is used for the caption or dock tabs
+   *
+   * @param pixmap is the pixmap to set
+   * @since 3.2
+   */
+   void setPixmap(const QPixmap& pixmap=QPixmap());
+                    
+  /**
+   * Returns the dockwidget's associated caption/dock tab pixmap
+   *
+   * @since 3.2
+   */
+   const QPixmap& pixmap() const;
+                                     
 public slots:
   /**

--- kdevelop/lib/qextmdi/src/kdockwidget_compat.cpp  #1.1:1.2
@@ -636,4 +636,22 @@ KDockWidget::KDockWidget( KDockManager* 
 }
 
+void KDockWidget::setPixmap(const QPixmap& pixmap) {
+        delete pix;
+        pix=new QPixmap(pixmap);
+        setIcon(*pix);
+        KDockTabGroup *dtg=parentDockTabGroup();
+        if (dtg)
+                dtg->changeTab(this,pixmap,dtg->tabLabel(this));
+         QWidget *contWid=parentDockContainer();
+         if (contWid)
+                dynamic_cast<KDockContainer*>(contWid)->setPixmap(this,pixmap);
+
+
+}
+
+const QPixmap& KDockWidget::pixmap() const {
+        return *pix;
+}
+
 KDockWidget::~KDockWidget()
 {


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

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