Qt Utilities  5.12.0
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
Public Member Functions | List of all members
Widgets::ClearComboBox Class Reference

A QComboBox with an embedded button for clearing its contents. More...

#include <clearcombobox.h>

Inheritance diagram for Widgets::ClearComboBox:
[legend]
Collaboration diagram for Widgets::ClearComboBox:
[legend]

Public Member Functions

 ClearComboBox (QWidget *parent=nullptr)
 Constructs a clear combo box. More...
 
 ~ClearComboBox () override
 Destroys the clear combo box. More...
 
bool isCleared () const override
 Returns whether the related widget is cleared. More...
 
- Public Member Functions inherited from Widgets::ButtonOverlay
 ButtonOverlay (QWidget *widget)
 Constructs a button overlay for the specified widget. More...
 
virtual ~ButtonOverlay ()
 Destroys the button overlay. More...
 
QHBoxLayout * buttonLayout ()
 Returns the layout manager holding the buttons. More...
 
bool isClearButtonEnabled () const
 Returns whether the clear button is enabled. More...
 
void setClearButtonEnabled (bool enabled)
 Sets whether the clear button is enabled. More...
 
bool isInfoButtonEnabled () const
 Returns whether the info button is enabled. More...
 
void enableInfoButton (const QPixmap &pixmap, const QString &infoText)
 Shows an info button with the specified pixmap and infoText. More...
 
void disableInfoButton ()
 Hides an info button if one is shown. More...
 
void addCustomButton (QWidget *button)
 Adds a custom button. More...
 
void insertCustomButton (int index, QWidget *button)
 Inserts a custom button at the specified index. More...
 
void removeCustomButton (QWidget *button)
 Removes the specified custom button. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Widgets::ButtonOverlay
void updateClearButtonVisibility (bool visible)
 Updates the visibility of the clear button. More...
 
virtual void handleClearButtonClicked ()
 Clears the related widget. More...
 

Detailed Description

A QComboBox with an embedded button for clearing its contents.

Definition at line 10 of file clearcombobox.h.

Constructor & Destructor Documentation

◆ ClearComboBox()

Widgets::ClearComboBox::ClearComboBox ( QWidget *  parent = nullptr)
explicit

Constructs a clear combo box.

Definition at line 17 of file clearcombobox.cpp.

◆ ~ClearComboBox()

Widgets::ClearComboBox::~ClearComboBox ( )
override

Destroys the clear combo box.

Definition at line 36 of file clearcombobox.cpp.

Member Function Documentation

◆ isCleared()

bool Widgets::ClearComboBox::isCleared ( ) const
overridevirtual

Returns whether the related widget is cleared.

This method is meant to be implemented when subclassing.

Reimplemented from Widgets::ButtonOverlay.

Definition at line 53 of file clearcombobox.cpp.


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