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

#include <chatlinecontentproxy.h>

Inheritance diagram for ChatLineContentProxy:
Inheritance graph
Collaboration diagram for ChatLineContentProxy:
Collaboration graph

Public Types

enum  ChatLineContentProxyType { GenericType, FileTransferWidgetType = 0 }
 Type tag to avoid dynamic_cast of contained QWidget*. More...
 
- Public Types inherited from ChatLineContent
enum  GraphicsItemType { ChatLineContentType = QGraphicsItem::UserType + 1 }
 

Public Member Functions

 ChatLineContentProxy (QWidget *widget, int minWidth, float widthInPercent=1.0f)
 
 ChatLineContentProxy (FileTransferWidget *widget, int minWidth, float widthInPercent=1.0f)
 
QRectF boundingRect () const override
 
void setWidth (qreal width) override
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
 
qreal getAscent () const override
 
QWidget * getWidget () const
 
ChatLineContentProxyType getWidgetType () const
 
- Public Member Functions inherited from ChatLineContent
int getColumn () const
 
int type () const final
 
virtual void selectionMouseMove (QPointF scenePos)
 
virtual void selectionStarted (QPointF scenePos)
 
virtual void selectionCleared ()
 
virtual void selectionDoubleClick (QPointF scenePos)
 
virtual void selectionTripleClick (QPointF scenePos)
 
virtual void selectionFocusChanged (bool focusIn)
 
virtual bool isOverSelection (QPointF scenePos) const
 
virtual QString getSelectedText () const
 
virtual void fontChanged (const QFont &font)
 
virtual QString getText () const
 
virtual void visibilityChanged (bool visible)
 
virtual void reloadTheme ()
 

Protected Member Functions

 ChatLineContentProxy (QWidget *widget, ChatLineContentProxyType type, int minWidth, float widthInPercent)
 

Private Attributes

QGraphicsProxyWidget * proxy
 
float widthPercent
 
int widthMin
 
const ChatLineContentProxyType widgetType
 

Detailed Description

Definition at line 27 of file chatlinecontentproxy.h.

Member Enumeration Documentation

◆ ChatLineContentProxyType

Type tag to avoid dynamic_cast of contained QWidget*.

@value GenericType @value FileTransferWidgetType = 0

Enumerator
GenericType 
FileTransferWidgetType 

Definition at line 32 of file chatlinecontentproxy.h.

Constructor & Destructor Documentation

◆ ChatLineContentProxy() [1/3]

ChatLineContentProxy::ChatLineContentProxy ( QWidget *  widget,
int  minWidth,
float  widthInPercent = 1.0f 
)

Definition at line 45 of file chatlinecontentproxy.cpp.

◆ ChatLineContentProxy() [2/3]

ChatLineContentProxy::ChatLineContentProxy ( FileTransferWidget widget,
int  minWidth,
float  widthInPercent = 1.0f 
)

Definition at line 50 of file chatlinecontentproxy.cpp.

◆ ChatLineContentProxy() [3/3]

ChatLineContentProxy::ChatLineContentProxy ( QWidget *  widget,
ChatLineContentProxyType  type,
int  minWidth,
float  widthInPercent 
)
protected

Definition at line 35 of file chatlinecontentproxy.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ boundingRect()

QRectF ChatLineContentProxy::boundingRect ( ) const
overridevirtual

Implements ChatLineContent.

Definition at line 55 of file chatlinecontentproxy.cpp.

Here is the caller graph for this function:

◆ getAscent()

qreal ChatLineContentProxy::getAscent ( ) const
overridevirtual

Reimplemented from ChatLineContent.

Definition at line 69 of file chatlinecontentproxy.cpp.

◆ getWidget()

QWidget * ChatLineContentProxy::getWidget ( ) const

Definition at line 74 of file chatlinecontentproxy.cpp.

Here is the caller graph for this function:

◆ getWidgetType()

ChatLineContentProxy::ChatLineContentProxyType ChatLineContentProxy::getWidgetType ( ) const

Definition at line 85 of file chatlinecontentproxy.cpp.

◆ paint()

void ChatLineContentProxy::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)
overridevirtual

Implements ChatLineContent.

Definition at line 62 of file chatlinecontentproxy.cpp.

Here is the call graph for this function:

◆ setWidth()

void ChatLineContentProxy::setWidth ( qreal  width)
overridevirtual

Implements ChatLineContent.

Definition at line 79 of file chatlinecontentproxy.cpp.

Member Data Documentation

◆ proxy

QGraphicsProxyWidget* ChatLineContentProxy::proxy
private

Definition at line 55 of file chatlinecontentproxy.h.

◆ widgetType

const ChatLineContentProxyType ChatLineContentProxy::widgetType
private

Definition at line 58 of file chatlinecontentproxy.h.

◆ widthMin

int ChatLineContentProxy::widthMin
private

Definition at line 57 of file chatlinecontentproxy.h.

◆ widthPercent

float ChatLineContentProxy::widthPercent
private

Definition at line 56 of file chatlinecontentproxy.h.


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