Bug 118679 - Annotation object dialogs should have apply button
Summary: Annotation object dialogs should have apply button
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: unspecified Linux
: HI wishlist
Target Milestone: ---
Assignee: George Staikos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-20 01:20 UTC by Andrew Walker
Modified: 2006-02-15 16:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
patch (4.24 KB, patch)
2005-12-20 18:12 UTC, George Staikos
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Walker 2005-12-20 01:20:57 UTC
Version:           HEAD (using KDE KDE 3.4.0)
OS:                Linux

As there are with most other objects in Kst that the user can interact with, it would be nice if there were an apply button on the Edit Box, Edit Ellipse etc. dialogs.
Comment 1 George Staikos 2005-12-20 01:30:32 UTC
We're moving away from an apply button for Kst dialogs.  See the new data dialogs.
Comment 2 Andrew Walker 2005-12-20 01:41:47 UTC
That is unfortunate. In all cases where you can see the impact of the settings you have just changed an Apply button makes sense. It can be a lot of effort to launch the dialog again. Why not give the user the option?
Comment 3 Netterfield 2005-12-20 04:40:33 UTC
Apply would be nice.
Comment 4 George Staikos 2005-12-20 18:12:17 UTC
Created attachment 14000 [details]
patch

This implements an apply button
Comment 5 Andrew Walker 2006-01-26 19:49:06 UTC
Should be fixed for 1.2.1 release
Comment 6 George Staikos 2006-02-15 16:23:01 UTC
SVN commit 509704 by staikos:

Add an apply button to view object dialogs

BUG: 118679


 M  +19 -9     editviewobjectdialog.ui  
 M  +17 -7     ksteditviewobjectdialog_i.cpp  
 M  +4 -0      ksteditviewobjectdialog_i.h  


--- trunk/extragear/graphics/kst/src/libkstapp/editviewobjectdialog.ui #509703:509704
@@ -8,14 +8,6 @@
         <property name="name">
             <cstring>unnamed</cstring>
         </property>
-        <widget class="QPushButton" row="1" column="2">
-            <property name="name">
-                <cstring>_cancel</cstring>
-            </property>
-            <property name="text">
-                <string>&amp;Cancel</string>
-            </property>
-        </widget>
         <spacer row="1" column="0">
             <property name="name">
                 <cstring>spacer6</cstring>
@@ -41,8 +33,24 @@
                 <string>&amp;OK</string>
             </property>
         </widget>
-        <widget class="QButtonGroup" row="0" column="0" rowspan="1" colspan="3">
+        <widget class="QPushButton" row="1" column="2">
             <property name="name">
+                <cstring>_apply</cstring>
+            </property>
+            <property name="text">
+                <string>&amp;Apply</string>
+            </property>
+        </widget>
+        <widget class="QPushButton" row="1" column="3">
+            <property name="name">
+                <cstring>_cancel</cstring>
+            </property>
+            <property name="text">
+                <string>&amp;Cancel</string>
+            </property>
+        </widget>
+        <widget class="QButtonGroup" row="0" column="0" rowspan="1" colspan="4">
+            <property name="name">
                 <cstring>_propertiesGroup</cstring>
             </property>
             <property name="title">
@@ -71,7 +79,9 @@
     </grid>
 </widget>
 <tabstops>
+    <tabstop>_propertiesFrame</tabstop>
     <tabstop>_OK</tabstop>
+    <tabstop>_apply</tabstop>
     <tabstop>_cancel</tabstop>
 </tabstops>
 <layoutdefaults spacing="6" margin="11"/>
--- trunk/extragear/graphics/kst/src/libkstapp/ksteditviewobjectdialog_i.cpp #509703:509704
@@ -15,6 +15,8 @@
  *                                                                         *
  ***************************************************************************/
 
+#include "ksteditviewobjectdialog_i.h"
+
 #include <qbutton.h>
 #include <qbuttongroup.h>
 #include <qcheckbox.h>
@@ -32,7 +34,7 @@
 #include <knuminput.h>
 #include <kurlrequester.h>
   
-#include "ksteditviewobjectdialog_i.h"
+#include "kst.h"
 
 #include <klocale.h>
 #include <stdio.h>
@@ -40,6 +42,7 @@
 KstEditViewObjectDialogI::KstEditViewObjectDialogI(QWidget* parent, const char* name, bool modal, WFlags fl) 
 : KstEditViewObjectDialog(parent, name, modal, fl) {
   connect(_cancel, SIGNAL(clicked()), this, SLOT(close()));
+  connect(_apply, SIGNAL(clicked()), this, SLOT(applyClicked()));
   connect(_OK, SIGNAL(clicked()), this, SLOT(okClicked()));
 
   _grid = 0L;
@@ -273,12 +276,7 @@
 }
 
 
-void KstEditViewObjectDialogI::okClicked() {
-  if (!_viewObject) {
-    QDialog::reject();
-    return;
-  }
-
+void KstEditViewObjectDialogI::applyClicked() {
   if (_customWidget) {
     // FILL ME IN TODO
     _viewObject->readConfigWidget(_customWidget);
@@ -307,6 +305,18 @@
     }
 #endif
   }
+  KstApp::inst()->paintAll(KstPainter::P_PAINT);
+}
+
+
+void KstEditViewObjectDialogI::okClicked() {
+  if (!_viewObject) {
+    QDialog::reject();
+    return;
+  }
+
+  applyClicked();
+
   QDialog::accept();
 }
 
--- trunk/extragear/graphics/kst/src/libkstapp/ksteditviewobjectdialog_i.h #509703:509704
@@ -24,6 +24,9 @@
 #include "kst_export.h"
 #include <qguardedptr.h>
 
+class QComboBox;
+class QGridLayout;
+
 class KST_EXPORT KstEditViewObjectDialogI : public KstEditViewObjectDialog {
   Q_OBJECT
   public:
@@ -56,6 +59,7 @@
     bool _isNew;
     
   private slots:
+    void applyClicked();
     void okClicked();
 };