Summary: | Annotation object dialogs should have apply button | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Andrew Walker <arwalker> |
Component: | general | Assignee: | George Staikos <staikos> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | HI | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | patch |
Description
Andrew Walker
2005-12-20 01:20:57 UTC
We're moving away from an apply button for Kst dialogs. See the new data dialogs. 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? Apply would be nice. Created attachment 14000 [details]
patch
This implements an apply button
Should be fixed for 1.2.1 release 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>&Cancel</string> - </property> - </widget> <spacer row="1" column="0"> <property name="name"> <cstring>spacer6</cstring> @@ -41,8 +33,24 @@ <string>&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>&Apply</string> + </property> + </widget> + <widget class="QPushButton" row="1" column="3"> + <property name="name"> + <cstring>_cancel</cstring> + </property> + <property name="text"> + <string>&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(); }; |