![]() |
LeechCraft Monocle 0.6.70-16373-g319c272718
Modular document viewer for LeechCraft
|
Interface to be implemented by button fields. More...
#include "iformfield.h"
Public Types | |
enum class | Type { Pushbutton , Checkbox , Radiobutton } |
Describes various types of button fields. More... | |
Public Member Functions | |
virtual | ~IFormFieldButton () |
Virtual destructor. | |
virtual Type | GetButtonType () const =0 |
Returns the exact type of this button field. | |
virtual QString | GetCaption () const =0 |
Returns the caption of this button. | |
virtual bool | IsChecked () const =0 |
Returns whether the button is checked. | |
virtual void | SetChecked (bool state)=0 |
Updates the check state of this button. | |
virtual QList< int > | GetButtonGroup () const =0 |
Returns the button group this button belongs to. | |
virtual LinkAction | GetActivationAction () const =0 |
Returns the action associated with this button. | |
Interface to be implemented by button fields.
If a field is of type FormType::Button, it should also implement this interface.
Definition at line 344 of file iformfield.h.
|
strong |
Describes various types of button fields.
Enumerator | |
---|---|
Pushbutton | A button that can be pushed.
|
Checkbox | A field that can be checked independently of others.
|
Radiobutton | A field that can be checked with respect to the check state of others.
|
Definition at line 355 of file iformfield.h.
|
inlinevirtual |
Virtual destructor.
Definition at line 349 of file iformfield.h.
|
pure virtual |
Returns the action associated with this button.
This method is invoked by Monocle when the corresponding field is triggered. Currently it only means that a field of Type::Pushbutton is activated by the user, and this method is never invoked for other types of fields.
|
pure virtual |
Returns the button group this button belongs to.
This method returns the list of IDs (returned by the IFormField::GetID() method) that form the same button group, where only one button at a time can be checked.
If an empty list is returned, it is interpreted as if the button doesn't belong to any button groups.
The returned list should be sorted and contain the self ID (the ID of the field that returns the list).
This method only makes sense for buttons of Type::Radiobutton.
|
pure virtual |
Returns the exact type of this button field.
|
pure virtual |
Returns the caption of this button.
This method should return the user-visible text on the button which may be way different form IFormField::GetName().
|
pure virtual |
Returns whether the button is checked.
This method doesn't make sense for Type::Pushbutton buttons.
|
pure virtual |
Updates the check state of this button.
If the type of this button is Type::Radiobutton and this radio button belongs to a group (GetButtonGroup() returns a non-empty list), setting the check state to code true leads to setting the check state of the previously checked radio button to false.
This method doesn't make sense for Type::Pushbutton and thus does nothing for push buttons.
[in] | state | The new check state of this radio button or check box. |