QGIS API Documentation 3.41.0-Master (3440c17df1d)
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 61 of file characterwidget.cpp.

Member Function Documentation

◆ character()

QChar CharacterWidget::character ( ) const
inline

Returns the currently selected character in the widget.

See also
setCharacter()

Definition at line 99 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 133 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()

Definition at line 105 of file characterwidget.h.

◆ keyPressEvent()

void CharacterWidget::keyPressEvent ( QKeyEvent *  event)
overrideprotected

Definition at line 144 of file characterwidget.cpp.

◆ mouseMoveEvent()

void CharacterWidget::mouseMoveEvent ( QMouseEvent *  event)
overrideprotected

Definition at line 212 of file characterwidget.cpp.

◆ mousePressEvent()

void CharacterWidget::mousePressEvent ( QMouseEvent *  event)
overrideprotected

Definition at line 228 of file characterwidget.cpp.

◆ paintEvent()

void CharacterWidget::paintEvent ( QPaintEvent *  event)
overrideprotected

Definition at line 241 of file characterwidget.cpp.

◆ resizeEvent()

void CharacterWidget::resizeEvent ( QResizeEvent *  event)
overrideprotected

Definition at line 287 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 114 of file characterwidget.cpp.

◆ setColumns

void CharacterWidget::setColumns ( int  columns)
slot

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

Definition at line 105 of file characterwidget.cpp.

◆ setFont

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

Sets the font to show in the widget.

See also
font()

Definition at line 68 of file characterwidget.cpp.

◆ setFontSize

void CharacterWidget::setFontSize ( double  fontSize)
slot

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

Definition at line 76 of file characterwidget.cpp.

◆ setFontStyle

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

Sets the font style to show in the widget.

Definition at line 84 of file characterwidget.cpp.

◆ sizeHint()

QSize CharacterWidget::sizeHint ( ) const
override

Definition at line 139 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 95 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: