qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Public Slots | Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Attributes | List of all members
CroppingLabel Class Reference

#include <croppinglabel.h>

Inheritance diagram for CroppingLabel:
Inheritance graph
Collaboration diagram for CroppingLabel:
Collaboration graph

Public Slots

void editBegin ()
 
void setEditable (bool editable)
 
void setElideMode (Qt::TextElideMode elide)
 
QString fullText ()
 Get original full text. More...
 
void setText (const QString &text)
 
void setPlaceholderText (const QString &text)
 
void minimizeMaximumWidth ()
 

Signals

void editFinished (const QString &newText)
 
void editRemoved ()
 
void clicked ()
 

Public Member Functions

 CroppingLabel (QWidget *parent=nullptr)
 

Protected Member Functions

void paintEvent (QPaintEvent *paintEvent) override
 
void setElidedText ()
 
void hideTextEdit ()
 
void showTextEdit ()
 
void resizeEvent (QResizeEvent *ev) final
 
QSize sizeHint () const final
 
QSize minimumSizeHint () const final
 
void mouseReleaseEvent (QMouseEvent *e) final
 

Private Slots

void editingFinished ()
 

Private Attributes

QString origText
 
QLineEdit * textEdit
 
bool blockPaintEvents
 
bool editable
 
Qt::TextElideMode elideMode
 

Detailed Description

Definition at line 26 of file croppinglabel.h.

Constructor & Destructor Documentation

◆ CroppingLabel()

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

Definition at line 26 of file croppinglabel.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ clicked

void CroppingLabel::clicked ( )
signal
Here is the caller graph for this function:

◆ editBegin

void CroppingLabel::editBegin ( )
slot

Definition at line 60 of file croppinglabel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ editFinished

void CroppingLabel::editFinished ( const QString &  newText)
signal
Here is the caller graph for this function:

◆ editingFinished

void CroppingLabel::editingFinished ( )
privateslot

Definition at line 184 of file croppinglabel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ editRemoved

void CroppingLabel::editRemoved ( )
signal
Here is the caller graph for this function:

◆ fullText

QString CroppingLabel::fullText ( )
slot

Get original full text.

Returns
The un-cropped text.

Definition at line 168 of file croppinglabel.cpp.

Here is the caller graph for this function:

◆ hideTextEdit()

void CroppingLabel::hideTextEdit ( )
protected

Definition at line 149 of file croppinglabel.cpp.

Here is the caller graph for this function:

◆ minimizeMaximumWidth

void CroppingLabel::minimizeMaximumWidth ( )
slot

Definition at line 173 of file croppinglabel.cpp.

Here is the caller graph for this function:

◆ minimumSizeHint()

QSize CroppingLabel::minimumSizeHint ( ) const
finalprotected

Definition at line 106 of file croppinglabel.cpp.

◆ mouseReleaseEvent()

void CroppingLabel::mouseReleaseEvent ( QMouseEvent *  e)
finalprotected

Definition at line 115 of file croppinglabel.cpp.

Here is the call graph for this function:

◆ paintEvent()

void CroppingLabel::paintEvent ( QPaintEvent *  paintEvent)
overrideprotected

Definition at line 125 of file croppinglabel.cpp.

◆ resizeEvent()

void CroppingLabel::resizeEvent ( QResizeEvent *  ev)
finalprotected

Definition at line 93 of file croppinglabel.cpp.

Here is the call graph for this function:

◆ setEditable

void CroppingLabel::setEditable ( bool  editable)
slot

Definition at line 66 of file croppinglabel.cpp.

◆ setElidedText()

void CroppingLabel::setElidedText ( )
protected

Definition at line 134 of file croppinglabel.cpp.

Here is the caller graph for this function:

◆ setElideMode

void CroppingLabel::setElideMode ( Qt::TextElideMode  elide)
slot

Definition at line 76 of file croppinglabel.cpp.

◆ setPlaceholderText

void CroppingLabel::setPlaceholderText ( const QString &  text)
slot

Definition at line 87 of file croppinglabel.cpp.

Here is the call graph for this function:

◆ setText

void CroppingLabel::setText ( const QString &  text)
slot

Definition at line 81 of file croppinglabel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ showTextEdit()

void CroppingLabel::showTextEdit ( )
protected

Definition at line 155 of file croppinglabel.cpp.

Here is the caller graph for this function:

◆ sizeHint()

QSize CroppingLabel::sizeHint ( ) const
finalprotected

Definition at line 101 of file croppinglabel.cpp.

Member Data Documentation

◆ blockPaintEvents

bool CroppingLabel::blockPaintEvents
private

Definition at line 65 of file croppinglabel.h.

◆ editable

bool CroppingLabel::editable
private

Definition at line 66 of file croppinglabel.h.

◆ elideMode

Qt::TextElideMode CroppingLabel::elideMode
private

Definition at line 67 of file croppinglabel.h.

◆ origText

QString CroppingLabel::origText
private

Definition at line 63 of file croppinglabel.h.

◆ textEdit

QLineEdit* CroppingLabel::textEdit
private

Definition at line 64 of file croppinglabel.h.


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