QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
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 clearCharacter ()
 Clears the currently selected character in the widget.
 
void setCharacter (QChar character)
 Sets the currently selected character in the widget.
 
void setColumns (int columns)
 Sets the number of columns of characters to show in the widget.
 
void setFont (const QFont &font)
 Sets the font to show in the widget.
 
void setFontSize (double fontSize)
 Sets the font size (in points) to render in the widget.
 
void setFontStyle (const QString &fontStyle)
 Sets the font style to show in the widget.
 
void updateFontMerging (bool enable)
 

Signals

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

Public Member Functions

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

Protected Member Functions

void keyPressEvent (QKeyEvent *event) override
 
void mouseMoveEvent (QMouseEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 
void paintEvent (QPaintEvent *event) override
 
void resizeEvent (QResizeEvent *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 69 of file characterwidget.h.

Constructor & Destructor Documentation

◆ CharacterWidget()

CharacterWidget::CharacterWidget ( QWidget *  parent = nullptr)

Constructor for CharacterWidget.

Definition at line 60 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 100 of file characterwidget.h.

◆ characterSelected

void CharacterWidget::characterSelected ( QChar  character)
signal

Emitted when a character is selected in the widget.

◆ clearCharacter

void CharacterWidget::clearCharacter ( )
slot

Clears the currently selected character in the widget.

See also
character()
setCharacter()

Definition at line 132 of file characterwidget.cpp.

◆ columns()

int CharacterWidget::columns ( ) const
inline

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

Definition at line 88 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 107 of file characterwidget.h.

◆ keyPressEvent()

void CharacterWidget::keyPressEvent ( QKeyEvent *  event)
overrideprotected

Definition at line 143 of file characterwidget.cpp.

◆ mouseMoveEvent()

void CharacterWidget::mouseMoveEvent ( QMouseEvent *  event)
overrideprotected

Definition at line 211 of file characterwidget.cpp.

◆ mousePressEvent()

void CharacterWidget::mousePressEvent ( QMouseEvent *  event)
overrideprotected

Definition at line 227 of file characterwidget.cpp.

◆ paintEvent()

void CharacterWidget::paintEvent ( QPaintEvent *  event)
overrideprotected

Definition at line 240 of file characterwidget.cpp.

◆ resizeEvent()

void CharacterWidget::resizeEvent ( QResizeEvent *  event)
overrideprotected

Definition at line 286 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 113 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 104 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 67 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 75 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 83 of file characterwidget.cpp.

◆ sizeHint()

QSize CharacterWidget::sizeHint ( ) const
override

Definition at line 138 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 93 of file characterwidget.h.

◆ updateFontMerging

void CharacterWidget::updateFontMerging ( bool  enable)
slot

Definition at line 94 of file characterwidget.cpp.

Property Documentation

◆ character

QChar CharacterWidget::character
readwrite

Definition at line 72 of file characterwidget.h.

◆ columns

int CharacterWidget::columns
readwrite

Definition at line 73 of file characterwidget.h.

◆ font

QFont CharacterWidget::font
readwrite

Definition at line 74 of file characterwidget.h.


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