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

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/paged
From:       Sebastian Sauer <mail () dipe ! org>
Date:       2010-04-18 22:33:57
Message-ID: 20100418223357.15E75AC89D () svn ! kde ! org
[Download RAW message or body]

SVN commit 1116238 by sebsauer:

Allow to set the pagewidget rather then only allowing to pass the pagewidget in the \
ctor. This makes it possible to change the default pagewidget-implementation also in \
classes like KConfigDialog that inherit from KPageDialog but do not reimpl the \
protected ctor.

 M  +7 -0      kpagedialog.cpp  
 M  +10 -0     kpagedialog.h  


--- trunk/KDE/kdelibs/kdeui/paged/kpagedialog.cpp #1116237:1116238
@@ -120,6 +120,13 @@
     return d_func()->mPageWidget;
 }
 
+void KPageDialog::setPageWidget(KPageWidget *widget)
+{
+    delete d_func()->mPageWidget;
+    d_func()->mPageWidget = widget;
+    d_func()->init();
+}
+
 const KPageWidget* KPageDialog::pageWidget() const
 {
     return d_func()->mPageWidget;
--- trunk/KDE/kdelibs/kdeui/paged/kpagedialog.h #1116237:1116238
@@ -216,6 +216,16 @@
     KPageWidget *pageWidget();
 
     /**
+     * Set the page widget of the dialog.
+     * 
+     * @note the previous pageWidget will be deleted.
+     *
+     * @param widget The KPageWidget object will be reparented to this object, so \
you can create +     * it without parent and you are not allowed to delete it.
+     */
+    void setPageWidget(KPageWidget *widget);
+
+    /**
      * Returns the page widget of the dialog or 0 if no page widget is set.
      */
     const KPageWidget *pageWidget() const;


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

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