Qt Utilities  5.12.1
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::ClearPlainTextEdit Class Reference

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

#include <clearplaintextedit.h>

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

Public Member Functions

 ClearPlainTextEdit (QWidget *parent=nullptr)
 Constructs a clear plain text edit. More...
 
 ~ClearPlainTextEdit () override
 Destroys the clear plain text edit. 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 QPlainTextEdit with an embedded button for clearing its contents.

Definition at line 10 of file clearplaintextedit.h.

Constructor & Destructor Documentation

◆ ClearPlainTextEdit()

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

Constructs a clear plain text edit.

Definition at line 18 of file clearplaintextedit.cpp.

◆ ~ClearPlainTextEdit()

Widgets::ClearPlainTextEdit::~ClearPlainTextEdit ( )
override

Destroys the clear plain text edit.

Definition at line 34 of file clearplaintextedit.cpp.

Member Function Documentation

◆ isCleared()

bool Widgets::ClearPlainTextEdit::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 59 of file clearplaintextedit.cpp.


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