X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fqt4%2FButtonPolicy.h;h=87742551772ccf0a089bf1d7aad8c2b2d16c64d9;hb=1f10969bb5c5f36017bf5ba8671381b09945cf57;hp=93f03ed0aa649d4c3a45725a029a17ed18e236cf;hpb=8c3e90ef670693aacb2d99968fa43d50f3893b04;p=lyx.git diff --git a/src/frontends/qt4/ButtonPolicy.h b/src/frontends/qt4/ButtonPolicy.h index 93f03ed0aa..8774255177 100644 --- a/src/frontends/qt4/ButtonPolicy.h +++ b/src/frontends/qt4/ButtonPolicy.h @@ -23,7 +23,7 @@ namespace frontend { dialogs. Only the policy is implemented here. Separate ButtonController classes are needed for each GUI implementation. - Policy | ReadOnly | Apply Button | Repeated Apply + Policy | ReadOnly | Apply Button | Repeated Apply ======================================================================== OkCancel | N | N | - OkCancelReadOnly | Y | N | - @@ -31,6 +31,7 @@ namespace frontend { OkApplyCancelReadOnly | Y | Y | Y NoRepeatedApply | N | Y | N NoRepeatedApplyReadOnly | Y | Y | N + OkApplyCancelAutoReadOnly | Y | Y | Y Preferences | N | Y | No (Ok-Close) Ignorant | N/A | N/A | N/A ======================================================================== @@ -72,7 +73,7 @@ public: This is based on the value of the bool state of the Button::CANCEL. true == Cancel, false == Close */ - OkCancelPolicy, + OkCancelPolicy, /** Ok and Cancel buttons for dialogs where read-only operation is blocked. @@ -121,7 +122,7 @@ public: OkApplyCancelReadOnlyPolicy, /** Ok, Apply and Cancel buttons for dialogs where repeated - * Apply is allowed. + Apply is allowed. Note: This scheme supports the relabelling of Cancel to Close and vice versa. This is based on the value of the bool state of the Button::CANCEL. @@ -137,6 +138,14 @@ public: */ NoRepeatedApplyPolicy, + /** Ok, Apply and Cancel buttons and an AutoApply checkbox. + Note: This scheme supports the relabelling of Cancel to Close + and vice versa. + This is based on the value of the bool state of the Button::CANCEL. + true == Cancel, false == Close + */ + OkApplyCancelAutoReadOnlyPolicy, + /** Defines the policy used by the Preferences dialog. Four buttons: Ok (Save), Apply, Cancel/Close, Restore. Note: This scheme supports the relabelling of Cancel to Close @@ -152,7 +161,7 @@ public: to minimise problems to users by supplying an anything-goes policy via a preprocessor directive. */ - IgnorantPolicy, + IgnorantPolicy }; /// Constructor @@ -176,6 +185,10 @@ public: /// APPLIED, /// + AUTOAPPLY_INITIAL, + /// + AUTOAPPLY_CHANGED, + /// RO_INITIAL, /// RO_VALID, @@ -184,25 +197,29 @@ public: /// RO_APPLIED, /// + RO_AUTOAPPLY, + /// BOGUS = 55 }; /// The various button types. enum Button { /// - CLOSE = 0, // Not a real button, but effectively !CANCEL + CLOSE = 0, // Not a real button, but effectively !CANCEL + /// + OKAY = 1, /// - OKAY = 1, + APPLY = 2, /// - APPLY = 2, + CANCEL = 4, /// - CANCEL = 4, + RESTORE = 8, /// - RESTORE = 8 + AUTOAPPLY = 16 // This is usually a checkbox }; /// static const Button ALL_BUTTONS = - Button(OKAY | APPLY | CANCEL | RESTORE); + Button(OKAY | APPLY | CANCEL | RESTORE | AUTOAPPLY); /** State machine inputs. All the policies so far have both CANCEL and HIDE always going to @@ -225,6 +242,8 @@ public: SMI_CANCEL, /// a restore action has happened SMI_RESTORE, + /// apply auto-apply + SMI_AUTOAPPLY, /// the dialog has been hidden SMI_HIDE, /// the dialog contents are read-only