qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Attributes | Friends | List of all members
ChatLine Class Reference

#include <chatline.h>

Inheritance diagram for ChatLine:
Inheritance graph
Collaboration diagram for ChatLine:
Collaboration graph

Public Types

using Ptr = std::shared_ptr< ChatLine >
 

Public Member Functions

 ChatLine ()
 
virtual ~ChatLine ()
 
QRectF sceneBoundingRect () const
 
void replaceContent (int col, ChatLineContent *lineContent)
 
void layout (qreal width, QPointF scenePos)
 
void moveBy (qreal deltaY)
 
void removeFromScene ()
 
void addToScene (QGraphicsScene *scene)
 
void setVisible (bool visible)
 
void selectionCleared ()
 
void selectionFocusChanged (bool focusIn)
 
void fontChanged (const QFont &font)
 
void reloadTheme ()
 
int getColumnCount ()
 
ChatLineContentgetContent (int col) const
 
ChatLineContentgetContent (QPointF scenePos) const
 
bool isOverSelection (QPointF scenePos)
 

Static Public Member Functions

static bool lessThanBSRectTop (const ChatLine::Ptr &lhs, const qreal &rhs)
 
static bool lessThanBSRectBottom (const ChatLine::Ptr &lhs, const qreal &rhs)
 

Protected Member Functions

QPointF mapToContent (ChatLineContent *c, QPointF pos)
 
void addColumn (ChatLineContent *item, ColumnFormat fmt)
 
void updateBBox ()
 
void visibilityChanged (bool visible)
 

Private Attributes

int row = -1
 
QVector< ChatLineContent * > content
 
QVector< ColumnFormatformat
 
qreal width = 100.0
 
qreal columnSpacing = 15.0
 
QRectF bbox
 
bool isVisible = false
 

Friends

class ChatWidget
 

Detailed Description

Definition at line 65 of file chatline.h.

Member Typedef Documentation

◆ Ptr

using ChatLine::Ptr = std::shared_ptr<ChatLine>

Definition at line 68 of file chatline.h.

Constructor & Destructor Documentation

◆ ChatLine()

ChatLine::ChatLine ( )

Definition at line 26 of file chatline.cpp.

◆ ~ChatLine()

ChatLine::~ChatLine ( )
virtual

Definition at line 30 of file chatline.cpp.

Member Function Documentation

◆ addColumn()

void ChatLine::addColumn ( ChatLineContent item,
ColumnFormat  fmt 
)
protected

Definition at line 136 of file chatline.cpp.

Here is the call graph for this function:

◆ addToScene()

void ChatLine::addToScene ( QGraphicsScene *  scene)

Definition at line 76 of file chatline.cpp.

◆ fontChanged()

void ChatLine::fontChanged ( const QFont &  font)

Definition at line 103 of file chatline.cpp.

◆ getColumnCount()

int ChatLine::getColumnCount ( )

Definition at line 116 of file chatline.cpp.

◆ getContent() [1/2]

ChatLineContent * ChatLine::getContent ( int  col) const

Definition at line 50 of file chatline.cpp.

Here is the caller graph for this function:

◆ getContent() [2/2]

ChatLineContent * ChatLine::getContent ( QPointF  scenePos) const

Definition at line 58 of file chatline.cpp.

◆ isOverSelection()

bool ChatLine::isOverSelection ( QPointF  scenePos)

◆ layout()

void ChatLine::layout ( qreal  width,
QPointF  scenePos 
)

Definition at line 164 of file chatline.cpp.

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

◆ lessThanBSRectBottom()

bool ChatLine::lessThanBSRectBottom ( const ChatLine::Ptr lhs,
const qreal &  rhs 
)
static

Definition at line 249 of file chatline.cpp.

Here is the caller graph for this function:

◆ lessThanBSRectTop()

bool ChatLine::lessThanBSRectTop ( const ChatLine::Ptr lhs,
const qreal &  rhs 
)
static

Definition at line 244 of file chatline.cpp.

Here is the caller graph for this function:

◆ mapToContent()

QPointF ChatLine::mapToContent ( ChatLineContent c,
QPointF  pos 
)
protected

◆ moveBy()

void ChatLine::moveBy ( qreal  deltaY)

Definition at line 235 of file chatline.cpp.

◆ reloadTheme()

void ChatLine::reloadTheme ( )

Definition at line 109 of file chatline.cpp.

◆ removeFromScene()

void ChatLine::removeFromScene ( )

Definition at line 68 of file chatline.cpp.

◆ replaceContent()

void ChatLine::replaceContent ( int  col,
ChatLineContent lineContent 
)

Definition at line 146 of file chatline.cpp.

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

◆ sceneBoundingRect()

QRectF ChatLine::sceneBoundingRect ( ) const

Definition at line 131 of file chatline.cpp.

Here is the caller graph for this function:

◆ selectionCleared()

void ChatLine::selectionCleared ( )

Definition at line 91 of file chatline.cpp.

◆ selectionFocusChanged()

void ChatLine::selectionFocusChanged ( bool  focusIn)

Definition at line 97 of file chatline.cpp.

◆ setVisible()

void ChatLine::setVisible ( bool  visible)

Definition at line 85 of file chatline.cpp.

◆ updateBBox()

void ChatLine::updateBBox ( )
protected

Definition at line 121 of file chatline.cpp.

Here is the caller graph for this function:

◆ visibilityChanged()

void ChatLine::visibilityChanged ( bool  visible)
protected

Definition at line 40 of file chatline.cpp.

Friends And Related Function Documentation

◆ ChatWidget

friend class ChatWidget
friend

Definition at line 98 of file chatline.h.

Member Data Documentation

◆ bbox

QRectF ChatLine::bbox
private

Definition at line 112 of file chatline.h.

◆ columnSpacing

qreal ChatLine::columnSpacing = 15.0
private

Definition at line 111 of file chatline.h.

◆ content

QVector<ChatLineContent*> ChatLine::content
private

Definition at line 108 of file chatline.h.

◆ format

QVector<ColumnFormat> ChatLine::format
private

Definition at line 109 of file chatline.h.

◆ isVisible

bool ChatLine::isVisible = false
private

Definition at line 113 of file chatline.h.

◆ row

int ChatLine::row = -1
private

Definition at line 107 of file chatline.h.

◆ width

qreal ChatLine::width = 100.0
private

Definition at line 110 of file chatline.h.


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