QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
TerminalStripLayoutPattern Class Reference

The TerminalStripLayoutPattern class A class with all values used to define how a terminal strip must be drawn. Most of the value are public, some values are private and have getter / setter because when these values change we need to compute the change. More...

#include <terminalstriplayoutpattern.h>

Collaboration diagram for TerminalStripLayoutPattern:
Collaboration graph

Public Member Functions

 TerminalStripLayoutPattern ()
 
void setHeaderTextAlignment (const Qt::Alignment &alignment)
 
Qt::Alignment headerTextAlignment () const
 
QTextOption headerTextOption () const
 
void setTerminalsTextAlignment (const QVector< Qt::Alignment > &alignment)
 
QVector< Qt::Alignment > terminalsTextAlignment () const
 
QVector< QTextOption > terminalsTextOption () const
 

Public Attributes

QRect m_header_rect {0,30,50,130}
 
Qt::Orientation m_header_text_orientation {Qt::Horizontal}
 
QRect m_spacer_rect {0, 50, 10, 90}
 
QVector< QRect > m_terminal_rect
 
QVector< QRect > m_terminals_text_rect
 
QVector< Qt::Orientation > m_terminals_text_orientation
 
int m_bridge_point_d {5}
 
QVector< int > m_bridge_point_y_offset {50,70,90,110}
 
QUuid m_uuid {QUuid::createUuid()}
 
QString m_name
 

Private Member Functions

void updateHeaderTextOption ()
 
void updateTerminalsTextOption ()
 

Private Attributes

Qt::Alignment m_header_text_alignment {Qt::AlignCenter}
 
QTextOption m_header_text_option
 
QVector< Qt::Alignment > m_terminals_text_alignment
 
QVector< QTextOption > m_terminals_text_option
 

Detailed Description

The TerminalStripLayoutPattern class A class with all values used to define how a terminal strip must be drawn. Most of the value are public, some values are private and have getter / setter because when these values change we need to compute the change.

The values with name '_y_offset' mean offset is relating to the top of the QGraphicsItem used to display the terminal strip.

The terminal strip can display up to 4 terminal level, the value used for multilevel terminal are stored in several QVector (m_terminal_y_offset, m_terminal_height, m_bridge_point_y_offset). The order of the values are from the most back terminal to the front terminal.

Constructor & Destructor Documentation

◆ TerminalStripLayoutPattern()

TerminalStripLayoutPattern::TerminalStripLayoutPattern ( )
Here is the call graph for this function:

Member Function Documentation

◆ headerTextAlignment()

Qt::Alignment TerminalStripLayoutPattern::headerTextAlignment ( ) const

◆ headerTextOption()

QTextOption TerminalStripLayoutPattern::headerTextOption ( ) const

◆ setHeaderTextAlignment()

void TerminalStripLayoutPattern::setHeaderTextAlignment ( const Qt::Alignment &  alignment)
Here is the call graph for this function:

◆ setTerminalsTextAlignment()

void TerminalStripLayoutPattern::setTerminalsTextAlignment ( const QVector< Qt::Alignment > &  alignment)
Here is the call graph for this function:

◆ terminalsTextAlignment()

QVector< Qt::Alignment > TerminalStripLayoutPattern::terminalsTextAlignment ( ) const

◆ terminalsTextOption()

QVector< QTextOption > TerminalStripLayoutPattern::terminalsTextOption ( ) const

◆ updateHeaderTextOption()

void TerminalStripLayoutPattern::updateHeaderTextOption ( )
private
Here is the caller graph for this function:

◆ updateTerminalsTextOption()

void TerminalStripLayoutPattern::updateTerminalsTextOption ( )
private
Here is the caller graph for this function:

Member Data Documentation

◆ m_bridge_point_d

int TerminalStripLayoutPattern::m_bridge_point_d {5}

◆ m_bridge_point_y_offset

QVector<int> TerminalStripLayoutPattern::m_bridge_point_y_offset {50,70,90,110}

◆ m_header_rect

QRect TerminalStripLayoutPattern::m_header_rect {0,30,50,130}

◆ m_header_text_alignment

Qt::Alignment TerminalStripLayoutPattern::m_header_text_alignment {Qt::AlignCenter}
private

◆ m_header_text_option

QTextOption TerminalStripLayoutPattern::m_header_text_option
private

◆ m_header_text_orientation

Qt::Orientation TerminalStripLayoutPattern::m_header_text_orientation {Qt::Horizontal}

◆ m_name

QString TerminalStripLayoutPattern::m_name

◆ m_spacer_rect

QRect TerminalStripLayoutPattern::m_spacer_rect {0, 50, 10, 90}

◆ m_terminal_rect

QVector<QRect> TerminalStripLayoutPattern::m_terminal_rect
Initial value:
{
QRect{0, 0, 20, 190},
QRect{0, 10, 20, 170},
QRect{0, 20, 20, 150},
QRect{0, 30, 20, 130}
}

◆ m_terminals_text_alignment

QVector<Qt::Alignment> TerminalStripLayoutPattern::m_terminals_text_alignment
private
Initial value:
{
Qt::AlignRight | Qt::AlignVCenter,
Qt::AlignRight | Qt::AlignVCenter,
Qt::AlignRight | Qt::AlignVCenter,
Qt::AlignRight | Qt::AlignVCenter
}

◆ m_terminals_text_option

QVector<QTextOption> TerminalStripLayoutPattern::m_terminals_text_option
private
Initial value:
{
QTextOption(),
QTextOption(),
QTextOption(),
QTextOption()
}

◆ m_terminals_text_orientation

QVector<Qt::Orientation> TerminalStripLayoutPattern::m_terminals_text_orientation
Initial value:
{
Qt::Vertical,
Qt::Vertical,
Qt::Vertical,
Qt::Vertical
}

◆ m_terminals_text_rect

QVector<QRect> TerminalStripLayoutPattern::m_terminals_text_rect
Initial value:
{
QRect{0,35,20,50},
QRect{0,35,20,50},
QRect{0,35,20,50},
QRect{0,35,20,50}
}

◆ m_uuid

QUuid TerminalStripLayoutPattern::m_uuid {QUuid::createUuid()}

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