Inherited by QwtLegendButton.
A push button that allows alignment of button labels, and use of rich texts, as provided by QLabel.
Warning:
Definition at line 24 of file qwt_push_button.h.
QwtPushButton (QWidget *=NULL, const char *name=NULL)
QwtPushButton (const QString &text, QWidget *=NULL, const char *name=NULL)
QwtPushButton (const QIconSet &, const QString &, QWidget *=NULL, const char *name=NULL)
TextFormat textFormat () const
void setTextFormat (TextFormat)
virtual Qt::TextFormat usedTextFormat () const
int alignment () const
virtual void setAlignment (int alignment)
void setIndent (int)
int indent () const
virtual QSize sizeHint () const
virtual int heightForWidth (int) const
virtual void drawButtonLabel (QPainter *)
Constructs a push button with no text. Definition at line 217 of file qwt_push_button.cpp.
Constructs a push button called name with the parent parent and the text text. Definition at line 227 of file qwt_push_button.cpp.
Constructs a push button with an icon and a text. Definition at line 237 of file qwt_push_button.cpp.
Returns:
See also:
Definition at line 301 of file qwt_push_button.cpp.
Referenced by QwtLegendButton::titleText().
Draws the button text or pixmap.
Definition at line 417 of file qwt_push_button.cpp.
Find the preferred height, given the width w.
Parameters:
Returns:
Definition at line 352 of file qwt_push_button.cpp.
References QwtText::boundingRect(), QwtText::heightForWidth(), QwtText::makeText(), sizeHint(), and usedTextFormat().
Returns:
See also:
Definition at line 325 of file qwt_push_button.cpp.
Sets the alignment of the button label´s contents.
The default format is Qt::AlignCenter | Qt::ExpandTabs | Qt::WordBreak.
Parameters:
See also:
Definition at line 315 of file qwt_push_button.cpp.
Sets the button label's contents indent in pixels.
The default value is 4 pixels.
Parameters:
See also:
Definition at line 340 of file qwt_push_button.cpp.
Sets the button label's text format. The default format is AutoText.
Parameters:
See also:
Definition at line 291 of file qwt_push_button.cpp.
Return sizeHint.
Definition at line 370 of file qwt_push_button.cpp.
References QwtRichText::boundingRect(), textFormat(), and usedTextFormat().
Referenced by heightForWidth().
Returns:
See also:
Definition at line 277 of file qwt_push_button.cpp.
Find the text format that is used for painting the button label.
In case of Qt::AutoText the format is found by evaluating text(), otherwise it is textFormat()
Returns:
See also:
Definition at line 262 of file qwt_push_button.cpp.
Referenced by heightForWidth(), sizeHint(), and QwtLegendButton::titleText().
Generated automatically by Doxygen for Qwt User's Guide from the source code.