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

Definition at line 53 of file ecvFontPropertyWidget.cpp.

◆ ~ecvFontPropertyWidget()

ecvFontPropertyWidget::~ecvFontPropertyWidget ( )
override

Definition at line 115 of file ecvFontPropertyWidget.cpp.

Member Function Documentation

◆ boldChanged

void ecvFontPropertyWidget::boldChanged ( bool  bold)
signal

◆ fontColor()

QColor ecvFontPropertyWidget::fontColor ( ) const

Definition at line 181 of file ecvFontPropertyWidget.cpp.

Referenced by fontProperties().

◆ fontColorChanged

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

Referenced by setFontColor().

◆ fontFamily()

QString ecvFontPropertyWidget::fontFamily ( ) const

Individual property getters

Definition at line 168 of file ecvFontPropertyWidget.cpp.

Referenced by fontProperties().

◆ fontFamilyChanged

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

Individual property change signals.

◆ fontFamilyIndex()

int ecvFontPropertyWidget::fontFamilyIndex ( ) const

Definition at line 173 of file ecvFontPropertyWidget.cpp.

◆ fontFamilyIndexChanged

void ecvFontPropertyWidget::fontFamilyIndexChanged ( int  index)
signal

◆ fontOpacity()

double ecvFontPropertyWidget::fontOpacity ( ) const

Definition at line 183 of file ecvFontPropertyWidget.cpp.

Referenced by fontProperties().

◆ fontOpacityChanged

void ecvFontPropertyWidget::fontOpacityChanged ( double  opacity)
signal

◆ fontProperties()

◆ fontPropertiesChanged

void ecvFontPropertyWidget::fontPropertiesChanged ( )
signal

◆ fontSize()

int ecvFontPropertyWidget::fontSize ( ) const

Definition at line 177 of file ecvFontPropertyWidget.cpp.

Referenced by fontProperties().

◆ fontSizeChanged

void ecvFontPropertyWidget::fontSizeChanged ( int  size)
signal

◆ hasShadow()

bool ecvFontPropertyWidget::hasShadow ( ) const

Definition at line 195 of file ecvFontPropertyWidget.cpp.

Referenced by fontProperties().

◆ horizontalJustification()

QString ecvFontPropertyWidget::horizontalJustification ( ) const

Definition at line 199 of file ecvFontPropertyWidget.cpp.

Referenced by fontProperties().

◆ horizontalJustificationChanged

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

◆ isBold()

bool ecvFontPropertyWidget::isBold ( ) const

Definition at line 187 of file ecvFontPropertyWidget.cpp.

Referenced by fontProperties().

◆ isItalic()

bool ecvFontPropertyWidget::isItalic ( ) const

Definition at line 191 of file ecvFontPropertyWidget.cpp.

Referenced by fontProperties().

◆ italicChanged

void ecvFontPropertyWidget::italicChanged ( bool  italic)
signal

◆ resizeEvent()

void ecvFontPropertyWidget::resizeEvent ( QResizeEvent *  event)
overrideprotected

Definition at line 407 of file ecvFontPropertyWidget.cpp.

References event.

◆ setBold()

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

Definition at line 277 of file ecvFontPropertyWidget.cpp.

Referenced by setFontProperties().

◆ setColorPickerVisible()

void ecvFontPropertyWidget::setColorPickerVisible ( bool  visible)

Show/hide the color picker button.

Definition at line 339 of file ecvFontPropertyWidget.cpp.

Referenced by ecvMeasurementTool::ecvMeasurementTool().

◆ setControlsEnabled()

void ecvFontPropertyWidget::setControlsEnabled ( bool  enabled)

Enable/disable all controls.

Definition at line 345 of file ecvFontPropertyWidget.cpp.

◆ setFontColor()

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

Definition at line 249 of file ecvFontPropertyWidget.cpp.

References color, fontColorChanged(), and fontPropertiesChanged().

Referenced by setFontProperties().

◆ setFontFamily()

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

Individual property setters (with signal blocking option)

Definition at line 207 of file ecvFontPropertyWidget.cpp.

Referenced by setFontProperties().

◆ setFontFamilyIndex()

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

Definition at line 223 of file ecvFontPropertyWidget.cpp.

◆ setFontOpacity()

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

Definition at line 265 of file ecvFontPropertyWidget.cpp.

Referenced by setFontProperties().

◆ setFontProperties()

◆ setFontSize()

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

Definition at line 237 of file ecvFontPropertyWidget.cpp.

References size.

Referenced by setFontProperties().

◆ setHorizontalJustification()

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

◆ setItalic()

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

Definition at line 289 of file ecvFontPropertyWidget.cpp.

Referenced by setFontProperties().

◆ setShadow()

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

Definition at line 301 of file ecvFontPropertyWidget.cpp.

Referenced by setFontProperties().

◆ setVerticalJustification()

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

◆ shadowChanged

void ecvFontPropertyWidget::shadowChanged ( bool  shadow)
signal

◆ verticalJustification()

QString ecvFontPropertyWidget::verticalJustification ( ) const

Definition at line 203 of file ecvFontPropertyWidget.cpp.

Referenced by fontProperties().

◆ verticalJustificationChanged

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

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