#include <SelectableLabel.h>

Inheritance diagram for SelectableLabel:
Inheritance graph
Collaboration diagram for SelectableLabel:
Collaboration graph

Public Slots

void setSelected (bool)
 
void toggle ()
 

Signals

void selectionChanged ()
 
void doubleClicked ()
 

Public Member Functions

 SelectableLabel (QWidget *parent=0)
 
virtual ~SelectableLabel ()
 
void setSelectedText (QString)
 
void setUnselectedText (QString)
 
bool isSelected () const
 

Protected Member Functions

void mousePressEvent (QMouseEvent *e) override
 
void mouseReleaseEvent (QMouseEvent *e) override
 
void mouseDoubleClickEvent (QMouseEvent *e) override
 
void enterEvent (QEvent *) override
 
void leaveEvent (QEvent *) override
 
void setupStyle ()
 

Protected Attributes

QString m_selectedText
 
QString m_unselectedText
 
bool m_selected
 
bool m_swallowRelease
 

Detailed Description

Definition at line 21 of file SelectableLabel.h.

Constructor & Destructor Documentation

SelectableLabel::SelectableLabel ( QWidget *  parent = 0)

Definition at line 21 of file SelectableLabel.cpp.

References setupStyle().

SelectableLabel::~SelectableLabel ( )
virtual

Definition at line 32 of file SelectableLabel.cpp.

Member Function Documentation

void SelectableLabel::setSelectedText ( QString  text)

Definition at line 48 of file SelectableLabel.cpp.

References m_selected, and m_selectedText.

void SelectableLabel::setUnselectedText ( QString  text)

Definition at line 37 of file SelectableLabel.cpp.

References m_selected, and m_unselectedText.

void SelectableLabel::selectionChanged ( )
signal

Referenced by isSelected(), and mousePressEvent().

void SelectableLabel::doubleClicked ( )
signal
void SelectableLabel::setSelected ( bool  s)
slot

Definition at line 89 of file SelectableLabel.cpp.

References m_selected, m_selectedText, m_unselectedText, and setupStyle().

Referenced by isSelected(), mousePressEvent(), and toggle().

void SelectableLabel::toggle ( )
slot

Definition at line 103 of file SelectableLabel.cpp.

References m_selected, and setSelected().

Referenced by isSelected().

void SelectableLabel::mousePressEvent ( QMouseEvent *  e)
overrideprotected

Definition at line 109 of file SelectableLabel.cpp.

References m_selected, m_swallowRelease, selectionChanged(), and setSelected().

Referenced by isSelected().

void SelectableLabel::mouseReleaseEvent ( QMouseEvent *  e)
overrideprotected

Definition at line 125 of file SelectableLabel.cpp.

References m_swallowRelease.

Referenced by isSelected().

void SelectableLabel::mouseDoubleClickEvent ( QMouseEvent *  e)
overrideprotected

Definition at line 118 of file SelectableLabel.cpp.

References doubleClicked().

Referenced by isSelected().

void SelectableLabel::enterEvent ( QEvent *  )
overrideprotected

Definition at line 132 of file SelectableLabel.cpp.

Referenced by isSelected().

void SelectableLabel::leaveEvent ( QEvent *  )
overrideprotected

Definition at line 142 of file SelectableLabel.cpp.

Referenced by isSelected().

void SelectableLabel::setupStyle ( )
protected

Definition at line 59 of file SelectableLabel.cpp.

References m_selected.

Referenced by isSelected(), SelectableLabel(), and setSelected().

Member Data Documentation

QString SelectableLabel::m_selectedText
protected

Definition at line 49 of file SelectableLabel.h.

Referenced by setSelected(), and setSelectedText().

QString SelectableLabel::m_unselectedText
protected

Definition at line 50 of file SelectableLabel.h.

Referenced by setSelected(), and setUnselectedText().

bool SelectableLabel::m_selected
protected
bool SelectableLabel::m_swallowRelease
protected

Definition at line 52 of file SelectableLabel.h.

Referenced by mousePressEvent(), and mouseReleaseEvent().


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