Back to index

Public Member Functions | Public Attributes | Private Attributes
qt_toggle_command_rep Class Reference

Ad-hoc command to be used with toggle widgets. More...

Inheritance diagram for qt_toggle_command_rep:
Inheritance graph
Collaboration diagram for qt_toggle_command_rep:
Collaboration graph

List of all members.

Public Member Functions

 qt_toggle_command_rep (QCheckBox *w, command c)
void apply ()
tm_ostreamprint (tm_ostream &out)
virtual void apply (object args)

Public Attributes

int ref_count

Private Attributes

QPointer< QCheckBox > qwid
command cmd

Detailed Description

Ad-hoc command to be used with toggle widgets.

The command associated with a qt_ui_element::toggle_widget has as a parameter the state of the QCheckBox. Since it is assumed everywhere else that commands injected into the gui's queue accept no parameters, and changes would be too big, we choose to encapsulate the original command in a new one which will execute the first with its argument.

See also:
qt_ui_element, , qt_ui_element_rep::as_qwidget, qt_ui_element_rep::toggle_widget

Definition at line 899 of file qt_ui_element.cpp.

Constructor & Destructor Documentation

qt_toggle_command_rep::qt_toggle_command_rep ( QCheckBox *  w,
command  c 
) [inline]

Definition at line 904 of file qt_ui_element.cpp.

: qwid(w), cmd(c) { }

Member Function Documentation

void command_rep::apply ( object  args) [virtual, inherited]

Reimplemented in object_command_rep.

Definition at line 20 of file command.cpp.

  (void) args;
  apply ();

Here is the call graph for this function:

void qt_toggle_command_rep::apply ( ) [inline, virtual]

Implements command_rep.

Definition at line 905 of file qt_ui_element.cpp.

{ if(qwid) cmd (list_object (object (qwid->isChecked()))); }

Here is the call graph for this function:

tm_ostream& qt_toggle_command_rep::print ( tm_ostream out) [inline, virtual]

Reimplemented from command_rep.

Definition at line 906 of file qt_ui_element.cpp.

    return out << "Toggle"; }

Member Data Documentation

Definition at line 901 of file qt_ui_element.cpp.

QPointer<QCheckBox> qt_toggle_command_rep::qwid [private]

Definition at line 900 of file qt_ui_element.cpp.

int abstract_struct::ref_count [inherited]

Definition at line 142 of file basic.hpp.

The documentation for this class was generated from the following file: