itom  4.1.0
FontButton Class Reference
Inheritance diagram for FontButton:

Public Slots

void browseFont ()
 

Signals

void currentFontChanged (const QFont &)
 

Public Member Functions

 FontButton (QWidget *parent=0)
 
 FontButton (const QFont &currentFont, QWidget *parent=0)
 
virtual ~FontButton ()
 Destructor.
 
void setCurrentFont (const QFont &newFont)
 Set/get the current font.
 
QFont currentFont () const
 
void setFontTextFormat (const QString &fontTextFormat)
 
QString fontTextFormat () const
 

Protected Attributes

QScopedPointer< FontButtonPrivated_ptr
 

Properties

QFont currentFont
 Application QFont by default.
 
QString fontTextFormat
 

Private Member Functions

 Q_DECLARE_PRIVATE (FontButton)
 
 Q_DISABLE_COPY (FontButton)
 

Constructor & Destructor Documentation

FontButton::FontButton ( QWidget *  parent = 0)

Constructor Creates a default FontButton initialized with QApplication font

FontButton::FontButton ( const QFont &  currentFont,
QWidget *  parent = 0 
)

Constructor Creates a FontButton with a given font

Member Function Documentation

void FontButton::browseFont ( )
slot

browse() opens a pop up where the user can select a new font. browse() is automatically called when the button is clicked.

void FontButton::currentFontChanged ( const QFont &  )
signal

Fired anytime the current font changed. Programatically or by the user via the file dialog that pop up when clicking on the button.

QString FontButton::fontTextFormat ( ) const

Get the font text format

See also
fontTextFormat, setFontTextFormat()
void FontButton::setFontTextFormat ( const QString &  fontTextFormat)

Set the font text format

See also
fontTextFormat, fontTextFormat()

Property Documentation

QString FontButton::fontTextFormat
readwrite

This property holds the format of the text of the pushbutton. These expressions may be used in place of the current font:

  • fff family
  • sss pointSize with suffix "pt". e.g. "9pt"
  • ss pointSize with no suffix. e.g. "9"
  • www full name weight e.g. Bold (if font is bold)
  • ww weight. e.g. 50 (if font is normal)
  • biu 3 character string where the first character is 'b' if bold or - otherwise, the second character is 'i' if the font italic or - otherwise and the third characis is 'u' if the font is underline or '-' otherwise. e.g. "bi-" if the font is bold and italic but not underline
  • bbb 'bold' if bold, nothing otherwise
  • bb 'b' if bold, nothing otherwise
  • iii 'italic' if italic, nothing otherwise
  • ii 'i' if italic, nothing otherwise
  • uuu 'underline' if underline, nothing otherwise
  • uu 'u' if underline, nothing otherwise Note that the listing order matches the replacement order. fff-sss by default.

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