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

List:       kde-commits
Subject:    kdelibs/kdeui
From:       Ingo Klöcker <kloecker () kde ! org>
Date:       2003-12-15 20:58:32
[Download RAW message or body]

CVS commit by kloecker: 

Make the private slot KMainWindow::saveAutoSaveSettings() a protected slot
so that is can be called from reimplementations of closeEvent(). Okay'd by
David Faure.


  M +26 -3     kmainwindow.h   1.98


--- kdelibs/kdeui/kmainwindow.h  #1.97:1.98
@@ -836,4 +836,29 @@ protected slots:
     virtual void showAboutApplication();
 
+   /**
+    * This slot should only be called in case you reimplement closeEvent() and
+    * if you are using the "auto-save" feature. In all other cases,
+    * setSettingsDirty() should be called instead to benefit from the delayed
+    * saving.
+    *
+    * @see setAutoSaveSettings
+    * @see setSettingsDirty
+    *
+    * @since 3.2
+    *
+    * Example:
+    * \code
+    *
+    * void MyMainWindow::closeEvent( QCloseEvent *e )
+    * {
+    *   // Save settings if auto-save is enabled, and settings have changed
+    *   if ( settingsDirty() && autoSaveSettings() )
+    *     saveAutoSaveSettings();
+    *   ..
+    * }
+    * \endcode
+    */ 
+    void saveAutoSaveSettings();
+
 private slots:
    /**
@@ -842,6 +867,4 @@ private slots:
     void shuttingDown();
 
-    void saveAutoSaveSettings();
-
 private:
     KMenuBar *internalMenuBar();


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

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