Geometrize  1.0
An application for geometrizing images into geometric primitives
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros
Public Member Functions | Private Member Functions | Private Attributes | List of all members
geometrize::dialog::ElidedLabel::ElidedLabelImpl Class Reference
Collaboration diagram for geometrize::dialog::ElidedLabel::ElidedLabelImpl:
Collaboration graph
[legend]

Public Member Functions

 ElidedLabelImpl (ElidedLabel *pQ, const Qt::TextElideMode elideMode=Qt::ElideLeft, const ElidedLabel::TrimMode trimMode=TrimMode::None)
 
Qt::TextElideMode getElideMode () const
 
void setElideMode (const Qt::TextElideMode elideMode)
 
void setText (const QString &text)
 
QString getElidedText () const
 
void cacheElidedText (const QString &text, const int width)
 
void onLanguageChange ()
 

Private Member Functions

void populateUi ()
 

Private Attributes

ElidedLabelq
 
Qt::TextElideMode m_elideMode
 The current elision mode. More...
 
ElidedLabel::TrimMode m_trimMode
 The current post-elision trim mode. More...
 
QString m_elidedText
 The cached elided text. More...
 

Constructor & Destructor Documentation

geometrize::dialog::ElidedLabel::ElidedLabelImpl::ElidedLabelImpl ( ElidedLabel pQ,
const Qt::TextElideMode  elideMode = Qt::ElideLeft,
const ElidedLabel::TrimMode  trimMode = TrimMode::None 
)
inline
42  :
43  q{pQ}, m_elideMode{elideMode}, m_trimMode{trimMode}
44  {
45  populateUi();
46  }
void populateUi()
Definition: elidedlabel.cpp:87
Qt::TextElideMode m_elideMode
The current elision mode.
Definition: elidedlabel.cpp:93
ElidedLabel::TrimMode m_trimMode
The current post-elision trim mode.
Definition: elidedlabel.cpp:94
ElidedLabel * q
Definition: elidedlabel.cpp:92

Member Function Documentation

void geometrize::dialog::ElidedLabel::ElidedLabelImpl::cacheElidedText ( const QString &  text,
const int  width 
)
inline
70  {
71  QString elidedText{q->fontMetrics().elidedText(text, m_elideMode, width, Qt::TextShowMnemonic)};
72 
73  switch(m_trimMode) {
74  case TrimMode::None:
75  break;
76  }
77 
78  m_elidedText = elidedText;
79  }
Qt::TextElideMode m_elideMode
The current elision mode.
Definition: elidedlabel.cpp:93
ElidedLabel::TrimMode m_trimMode
The current post-elision trim mode.
Definition: elidedlabel.cpp:94
QString m_elidedText
The cached elided text.
Definition: elidedlabel.cpp:95
ElidedLabel * q
Definition: elidedlabel.cpp:92

Here is the caller graph for this function:

QString geometrize::dialog::ElidedLabel::ElidedLabelImpl::getElidedText ( ) const
inline
65  {
66  return m_elidedText;
67  }
QString m_elidedText
The cached elided text.
Definition: elidedlabel.cpp:95
Qt::TextElideMode geometrize::dialog::ElidedLabel::ElidedLabelImpl::getElideMode ( ) const
inline
49  {
50  return m_elideMode;
51  }
Qt::TextElideMode m_elideMode
The current elision mode.
Definition: elidedlabel.cpp:93
void geometrize::dialog::ElidedLabel::ElidedLabelImpl::onLanguageChange ( )
inline
82  {
83  populateUi();
84  }
void populateUi()
Definition: elidedlabel.cpp:87

Here is the call graph for this function:

void geometrize::dialog::ElidedLabel::ElidedLabelImpl::populateUi ( )
inlineprivate
88  {
89 
90  }

Here is the caller graph for this function:

void geometrize::dialog::ElidedLabel::ElidedLabelImpl::setElideMode ( const Qt::TextElideMode  elideMode)
inline
54  {
55  m_elideMode = elideMode;
56  q->updateGeometry();
57  }
Qt::TextElideMode m_elideMode
The current elision mode.
Definition: elidedlabel.cpp:93
ElidedLabel * q
Definition: elidedlabel.cpp:92
void geometrize::dialog::ElidedLabel::ElidedLabelImpl::setText ( const QString &  text)
inline
60  {
61  cacheElidedText(text, q->geometry().width());
62  }
void cacheElidedText(const QString &text, const int width)
Definition: elidedlabel.cpp:69
ElidedLabel * q
Definition: elidedlabel.cpp:92

Here is the call graph for this function:

Member Data Documentation

QString geometrize::dialog::ElidedLabel::ElidedLabelImpl::m_elidedText
private

The cached elided text.

Qt::TextElideMode geometrize::dialog::ElidedLabel::ElidedLabelImpl::m_elideMode
private

The current elision mode.

ElidedLabel::TrimMode geometrize::dialog::ElidedLabel::ElidedLabelImpl::m_trimMode
private

The current post-elision trim mode.

ElidedLabel* geometrize::dialog::ElidedLabel::ElidedLabelImpl::q
private

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