ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvFontPropertyWidget Class Reference

A reusable font property widget matching ParaView's font editor style. More...

#include <ecvFontPropertyWidget.h>

Inheritance diagram for ecvFontPropertyWidget:
Collaboration diagram for ecvFontPropertyWidget:

Classes

struct  FontProperties
 Font property structure for convenience. More...
 

Signals

void fontPropertiesChanged ()
 Emitted when any font property changes. More...
 
void fontFamilyChanged (const QString &family)
 Individual property change signals. More...
 
void fontFamilyIndexChanged (int index)
 
void fontSizeChanged (int size)
 
void fontColorChanged (const QColor &color)
 
void fontOpacityChanged (double opacity)
 
void boldChanged (bool bold)
 
void italicChanged (bool italic)
 
void shadowChanged (bool shadow)
 
void horizontalJustificationChanged (const QString &justification)
 
void verticalJustificationChanged (const QString &justification)
 

Public Member Functions

 ecvFontPropertyWidget (QWidget *parent=nullptr)
 
 ~ecvFontPropertyWidget () override
 
void setColorPickerVisible (bool visible)
 Show/hide the color picker button. More...
 
void setControlsEnabled (bool enabled)
 Enable/disable all controls. More...
 
FontProperties fontProperties () const
 
void setFontProperties (const FontProperties &props)
 
QString fontFamily () const
 
int fontFamilyIndex () const
 
int fontSize () const
 
QColor fontColor () const
 
double fontOpacity () const
 
bool isBold () const
 
bool isItalic () const
 
bool hasShadow () const
 
QString horizontalJustification () const
 
QString verticalJustification () const
 
void setFontFamily (const QString &family, bool blockSignal=false)
 
void setFontFamilyIndex (int index, bool blockSignal=false)
 
void setFontSize (int size, bool blockSignal=false)
 
void setFontColor (const QColor &color, bool blockSignal=false)
 
void setFontOpacity (double opacity, bool blockSignal=false)
 
void setBold (bool bold, bool blockSignal=false)
 
void setItalic (bool italic, bool blockSignal=false)
 
void setShadow (bool shadow, bool blockSignal=false)
 
void setHorizontalJustification (const QString &justification, bool blockSignal=false)
 
void setVerticalJustification (const QString &justification, bool blockSignal=false)
 

Protected Member Functions

void resizeEvent (QResizeEvent *event) override
 

Detailed Description

A reusable font property widget matching ParaView's font editor style.

This widget provides controls for:

  • Font Family (Arial, Courier, Times)
  • Font Size (1-999)
  • Font Color (optional)
  • Opacity (0.0-1.0)
  • Bold toggle
  • Italic toggle
  • Shadow toggle

The widget can be used with or without color picker. When color picker is hidden, only font styling properties are shown.

Usage:

this, &MyClass::onFontChanged);
// Optionally hide color picker
fontWidget->setColorPickerVisible(false);
A reusable font property widget matching ParaView's font editor style.
void setColorPickerVisible(bool visible)
Show/hide the color picker button.
ecvFontPropertyWidget(QWidget *parent=nullptr)
void fontPropertiesChanged()
Emitted when any font property changes.

Definition at line 48 of file ecvFontPropertyWidget.h.

Constructor & Destructor Documentation

◆ ecvFontPropertyWidget()

ecvFontPropertyWidget::ecvFontPropertyWidget ( QWidget *  parent = nullptr)
explicit

◆ ~ecvFontPropertyWidget()

ecvFontPropertyWidget::~ecvFontPropertyWidget ( )
override

Member Function Documentation

◆ boldChanged

void ecvFontPropertyWidget::boldChanged ( bool  bold)
signal

◆ fontColor()

QColor ecvFontPropertyWidget::fontColor ( ) const

◆ fontColorChanged

void ecvFontPropertyWidget::fontColorChanged ( const QColor &  color)
signal

◆ fontFamily()

QString ecvFontPropertyWidget::fontFamily ( ) const

Individual property getters

◆ fontFamilyChanged

void ecvFontPropertyWidget::fontFamilyChanged ( const QString &  family)
signal

Individual property change signals.

◆ fontFamilyIndex()

int ecvFontPropertyWidget::fontFamilyIndex ( ) const

◆ fontFamilyIndexChanged

void ecvFontPropertyWidget::fontFamilyIndexChanged ( int  index)
signal

◆ fontOpacity()

double ecvFontPropertyWidget::fontOpacity ( ) const

◆ fontOpacityChanged

void ecvFontPropertyWidget::fontOpacityChanged ( double  opacity)
signal

◆ fontProperties()

FontProperties ecvFontPropertyWidget::fontProperties ( ) const

Get/Set all font properties at once

Referenced by ecvMeasurementTool::applyFontToTools().

◆ fontPropertiesChanged

void ecvFontPropertyWidget::fontPropertiesChanged ( )
signal

Emitted when any font property changes.

Referenced by ecvMeasurementTool::ecvMeasurementTool().

◆ fontSize()

int ecvFontPropertyWidget::fontSize ( ) const

◆ fontSizeChanged

void ecvFontPropertyWidget::fontSizeChanged ( int  size)
signal

◆ hasShadow()

bool ecvFontPropertyWidget::hasShadow ( ) const

◆ horizontalJustification()

QString ecvFontPropertyWidget::horizontalJustification ( ) const

◆ horizontalJustificationChanged

void ecvFontPropertyWidget::horizontalJustificationChanged ( const QString &  justification)
signal

◆ isBold()

bool ecvFontPropertyWidget::isBold ( ) const

◆ isItalic()

bool ecvFontPropertyWidget::isItalic ( ) const

◆ italicChanged

void ecvFontPropertyWidget::italicChanged ( bool  italic)
signal

◆ resizeEvent()

void ecvFontPropertyWidget::resizeEvent ( QResizeEvent *  event)
overrideprotected

◆ setBold()

void ecvFontPropertyWidget::setBold ( bool  bold,
bool  blockSignal = false 
)

◆ setColorPickerVisible()

void ecvFontPropertyWidget::setColorPickerVisible ( bool  visible)

Show/hide the color picker button.

Referenced by ecvMeasurementTool::ecvMeasurementTool().

◆ setControlsEnabled()

void ecvFontPropertyWidget::setControlsEnabled ( bool  enabled)

Enable/disable all controls.

◆ setFontColor()

void ecvFontPropertyWidget::setFontColor ( const QColor &  color,
bool  blockSignal = false 
)

◆ setFontFamily()

void ecvFontPropertyWidget::setFontFamily ( const QString &  family,
bool  blockSignal = false 
)

Individual property setters (with signal blocking option)

◆ setFontFamilyIndex()

void ecvFontPropertyWidget::setFontFamilyIndex ( int  index,
bool  blockSignal = false 
)

◆ setFontOpacity()

void ecvFontPropertyWidget::setFontOpacity ( double  opacity,
bool  blockSignal = false 
)

◆ setFontProperties()

void ecvFontPropertyWidget::setFontProperties ( const FontProperties props)

◆ setFontSize()

void ecvFontPropertyWidget::setFontSize ( int  size,
bool  blockSignal = false 
)

◆ setHorizontalJustification()

void ecvFontPropertyWidget::setHorizontalJustification ( const QString &  justification,
bool  blockSignal = false 
)

◆ setItalic()

void ecvFontPropertyWidget::setItalic ( bool  italic,
bool  blockSignal = false 
)

◆ setShadow()

void ecvFontPropertyWidget::setShadow ( bool  shadow,
bool  blockSignal = false 
)

◆ setVerticalJustification()

void ecvFontPropertyWidget::setVerticalJustification ( const QString &  justification,
bool  blockSignal = false 
)

◆ shadowChanged

void ecvFontPropertyWidget::shadowChanged ( bool  shadow)
signal

◆ verticalJustification()

QString ecvFontPropertyWidget::verticalJustification ( ) const

◆ verticalJustificationChanged

void ecvFontPropertyWidget::verticalJustificationChanged ( const QString &  justification)
signal

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