Virtual class implementing wordwrap for buttons.
More...
|
void | setPadding (int padding) |
| Set padding to use inside button.
|
|
const QString & | getText () const |
| Get button text.
|
|
int | getPadding () const |
| Get current padding to use.
|
|
|
void | setTextWordWrap (const QString &text) |
| Use to set button text.
|
|
void | paintTextWordWrap (QPainter *painter, const QRect &rect) |
|
QSize | calcSizeHintWordWrap (const QFontMetrics &fm, int width) const |
|
virtual void | updateGeometryBtn ()=0 |
|
virtual void | updateBtn ()=0 |
|
Virtual class implementing wordwrap for buttons.
Include with:
#include "toolboxqt/widgets/button.h"
Qt button classes doesn't allow to wordwrap text when button size is not enough (even when layout space allow it!). This class will manage this issue and properly use the available space.
- See also
- tbq::BtnPush, tbq::BtnTool
◆ getPadding()
int tbq::BtnAbstractWordWrap::getPadding |
( |
| ) |
const |
Get current padding to use.
- Returns
- Return current padding.
- See also
- setPadding()
◆ getText()
const QString & tbq::BtnAbstractWordWrap::getText |
( |
| ) |
const |
◆ setPadding()
void tbq::BtnAbstractWordWrap::setPadding |
( |
int |
padding | ) |
|
Set padding to use inside button.
- Parameters
-
[in] | padding | Padding to use.
By default, padding is set to 0 . |
- See also
- getPadding()
◆ setTextWordWrap()
void tbq::BtnAbstractWordWrap::setTextWordWrap |
( |
const QString & |
text | ) |
|
|
protected |
Use to set button text.
- Parameters
-
[in] | text | Text to display inside the button. |
The documentation for this class was generated from the following files:
- toolboxqt/widgets/button.h
- toolboxqt/widgets/button.cpp