QGIS API Documentation  3.2.0-Bonn (bc43194)
Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
CharacterWidget Class Reference

A widget for displaying characters available in a preset font, and allowing users to select an individual character. More...

#include <characterwidget.h>

Inheritance diagram for CharacterWidget:
Inheritance graph
[legend]

Public Slots

void setCharacter (QChar character)
 Sets the currently selected character in the widget. More...
 
void setColumns (int columns)
 Sets the number of columns of characters to show in the widget. More...
 
void setFont (const QFont &font)
 Sets the font to show in the widget. More...
 
void setFontSize (double fontSize)
 Sets the font size (in points) to render in the widget. More...
 
void setFontStyle (const QString &fontStyle)
 Sets the font style to show in the widget. More...
 
void updateFontMerging (bool enable)
 

Signals

void characterSelected (QChar character)
 Emitted when a character is selected in the widget. More...
 

Public Member Functions

 CharacterWidget (QWidget *parent=nullptr)
 Constructor for CharacterWidget. More...
 
QChar character () const
 Returns the currently selected character in the widget. More...
 
int columns () const
 Returns the number of columns of characters shown in the widget. More...
 
QFont font () const
 Returns the font shown in the widget. More...
 
QSize sizeHint () const override
 
int squareSize () const
 Returns the size (in pixels) of the square used to render each character preview. More...
 

Protected Member Functions

void mouseMoveEvent (QMouseEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 
void paintEvent (QPaintEvent *event) override
 

Properties

QChar character
 
int columns
 
QFont font
 

Detailed Description

A widget for displaying characters available in a preset font, and allowing users to select an individual character.

Definition at line 67 of file characterwidget.h.

Constructor & Destructor Documentation

◆ CharacterWidget()

CharacterWidget::CharacterWidget ( QWidget *  parent = nullptr)

Constructor for CharacterWidget.

Definition at line 56 of file characterwidget.cpp.

Member Function Documentation

◆ character()

QChar CharacterWidget::character ( ) const
inline

Returns the currently selected character in the widget.

See also
setCharacter()
Since
QGIS 3.0

Definition at line 98 of file characterwidget.h.

◆ characterSelected

void CharacterWidget::characterSelected ( QChar  character)
signal

Emitted when a character is selected in the widget.

◆ columns()

int CharacterWidget::columns ( ) const
inline

Returns the number of columns of characters shown in the widget.

Definition at line 86 of file characterwidget.h.

◆ font()

QFont CharacterWidget::font ( ) const
inline

Returns the font shown in the widget.

See also
setFont()
Since
QGIS 3.0

Definition at line 105 of file characterwidget.h.

◆ mouseMoveEvent()

void CharacterWidget::mouseMoveEvent ( QMouseEvent *  event)
overrideprotected

Definition at line 119 of file characterwidget.cpp.

◆ mousePressEvent()

void CharacterWidget::mousePressEvent ( QMouseEvent *  event)
overrideprotected

Definition at line 131 of file characterwidget.cpp.

◆ paintEvent()

void CharacterWidget::paintEvent ( QPaintEvent *  event)
overrideprotected

Definition at line 144 of file characterwidget.cpp.

◆ setCharacter

void CharacterWidget::setCharacter ( QChar  character)
slot

Sets the currently selected character in the widget.

See also
character()
characterSelected()

Definition at line 108 of file characterwidget.cpp.

◆ setColumns

void CharacterWidget::setColumns ( int  columns)
slot

Sets the number of columns of characters to show in the widget.

Since
QGIS 3.0

Definition at line 99 of file characterwidget.cpp.

◆ setFont

void CharacterWidget::setFont ( const QFont &  font)
slot

Sets the font to show in the widget.

See also
font()
Since
QGIS 3.0

Definition at line 62 of file characterwidget.cpp.

◆ setFontSize

void CharacterWidget::setFontSize ( double  fontSize)
slot

Sets the font size (in points) to render in the widget.

Since
QGIS 3.0

Definition at line 70 of file characterwidget.cpp.

◆ setFontStyle

void CharacterWidget::setFontStyle ( const QString &  fontStyle)
slot

Sets the font style to show in the widget.

Since
QGIS 3.0

Definition at line 78 of file characterwidget.cpp.

◆ sizeHint()

QSize CharacterWidget::sizeHint ( ) const
override

Definition at line 114 of file characterwidget.cpp.

◆ squareSize()

int CharacterWidget::squareSize ( ) const
inline

Returns the size (in pixels) of the square used to render each character preview.

Definition at line 91 of file characterwidget.h.

◆ updateFontMerging

void CharacterWidget::updateFontMerging ( bool  enable)
slot

Definition at line 89 of file characterwidget.cpp.

Property Documentation

◆ character

QChar CharacterWidget::character
readwrite

Definition at line 70 of file characterwidget.h.

◆ columns

int CharacterWidget::columns
readwrite

Definition at line 71 of file characterwidget.h.

◆ font

QFont CharacterWidget::font
readwrite

Definition at line 72 of file characterwidget.h.


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