Mantid
Loading...
Searching...
No Matches
Public Slots | Signals | Public Member Functions | Private Attributes | List of all members
MantidQt::API::SyncedCheckboxes Class Reference

QObject that links: More...

#include <SyncedCheckboxes.h>

Inheritance diagram for MantidQt::API::SyncedCheckboxes:

Public Slots

void on_button_toggled (bool)
 Slot called when the button is toggled. More...
 
void on_menu_toggled (bool)
 Slot called when the menu is toggled. More...
 

Signals

void toggled (bool)
 Signal emitted when the check box is toggled. More...
 

Public Member Functions

void setEnabled (bool val)
 Enable or disable both the menu and the checkboxes. More...
 
void setVisible (bool val)
 Set the visibility of both the menu and the checkboxes. More...
 
 SyncedCheckboxes (QAction *menu, QAbstractButton *button, bool checked=false)
 Constructor that links a menu and a button. More...
 
void toggle (bool val)
 Destructor. More...
 
 ~SyncedCheckboxes () override
 

Private Attributes

QAbstractButton * m_button
 
QAction * m_menu
 

Detailed Description

QObject that links:

so that their checked status is consistent. Emits a single "toggled" signal if either one is toggled.

Date
2011-12-06

Definition at line 28 of file SyncedCheckboxes.h.

Constructor & Destructor Documentation

◆ SyncedCheckboxes()

MantidQt::API::SyncedCheckboxes::SyncedCheckboxes ( QAction *  menu,
QAbstractButton *  button,
bool  checked = false 
)

Constructor that links a menu and a button.

Parameters
menu:: menu to link
button:: button to link
checked:: state (checked or not) that they start in

Definition at line 20 of file SyncedCheckboxes.cpp.

References m_button, m_menu, on_button_toggled(), on_menu_toggled(), and toggled().

◆ ~SyncedCheckboxes()

MantidQt::API::SyncedCheckboxes::~SyncedCheckboxes ( )
override

Member Function Documentation

◆ on_button_toggled

void MantidQt::API::SyncedCheckboxes::on_button_toggled ( bool  val)
slot

Slot called when the button is toggled.

Definition at line 85 of file SyncedCheckboxes.cpp.

References m_menu, and toggled().

Referenced by SyncedCheckboxes().

◆ on_menu_toggled

void MantidQt::API::SyncedCheckboxes::on_menu_toggled ( bool  val)
slot

Slot called when the menu is toggled.

Definition at line 74 of file SyncedCheckboxes.cpp.

References m_button, and toggled().

Referenced by SyncedCheckboxes().

◆ setEnabled()

void MantidQt::API::SyncedCheckboxes::setEnabled ( bool  val)

Enable or disable both the menu and the checkboxes.

Parameters
val:: true for Enabled

Definition at line 57 of file SyncedCheckboxes.cpp.

References m_button, and m_menu.

◆ setVisible()

void MantidQt::API::SyncedCheckboxes::setVisible ( bool  val)

Set the visibility of both the menu and the checkboxes.

Parameters
val:: true for visible

Definition at line 67 of file SyncedCheckboxes.cpp.

References m_button, and m_menu.

◆ toggle()

void MantidQt::API::SyncedCheckboxes::toggle ( bool  val)

Destructor.

Manually toggle the state of both checkboxes

Parameters
val:: True to check the boxes.

Definition at line 40 of file SyncedCheckboxes.cpp.

References m_button, m_menu, and toggled().

◆ toggled

void MantidQt::API::SyncedCheckboxes::toggled ( bool  )
signal

Signal emitted when the check box is toggled.

Referenced by on_button_toggled(), on_menu_toggled(), SyncedCheckboxes(), and toggle().

Member Data Documentation

◆ m_button

QAbstractButton* MantidQt::API::SyncedCheckboxes::m_button
private

Definition at line 48 of file SyncedCheckboxes.h.

Referenced by on_menu_toggled(), setEnabled(), setVisible(), SyncedCheckboxes(), and toggle().

◆ m_menu

QAction* MantidQt::API::SyncedCheckboxes::m_menu
private

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