Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
BufferWidget Class Reference

#include </tmp/quassel/src/qtui/bufferwidget.h>

Inheritance diagram for BufferWidget:
Collaboration diagram for BufferWidget:

Public Slots

virtual void setMarkerLine (ChatView *view=0, bool allowGoingBack=true)
virtual void jumpToMarkerLine (ChatView *view=0, bool requestBacklog=true)

Signals

void currentChanged (BufferId)
void currentChanged (const QModelIndex &)

Public Member Functions

 BufferWidget (QWidget *parent)
 ~BufferWidget ()
virtual bool eventFilter (QObject *watched, QEvent *event)
ChatViewSearchBarsearchBar () const
void addActionsToMenu (QMenu *, const QPointF &pos)
virtual bool autoMarkerLineOnLostFocus () const
BufferId currentBuffer () const
QAbstractItemModel * model ()
void setModel (QAbstractItemModel *model)
QItemSelectionModel * selectionModel () const
void setSelectionModel (QItemSelectionModel *selectionModel)
QModelIndex currentIndex () const

Protected Slots

virtual void currentChanged (const QModelIndex &current, const QModelIndex &previous)
virtual void showChatView (BufferId)
virtual void rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
virtual void closeEditor (QWidget *, QAbstractItemDelegate::EndEditHint)
virtual void commitData (QWidget *)
virtual void dataChanged (const QModelIndex &, const QModelIndex &)
virtual void editorDestroyed (QObject *)
virtual void rowsInserted (const QModelIndex &, int, int)
virtual void selectionChanged (const QItemSelection &, const QItemSelection &)

Protected Member Functions

virtual AbstractChatViewcreateChatView (BufferId)
 Create an AbstractChatView for the given BufferId and add it to the UI if necessary.
virtual void removeChatView (BufferId)
 Remove a chat view from the UI and delete it.
virtual bool autoMarkerLine () const
 If true, the marker line will be set automatically on buffer switch.

Protected Attributes

QPointer< QAbstractItemModel > _model
QPointer< QItemSelectionModel > _selectionModel

Private Slots

void scrollToHighlight (QGraphicsItem *highlightItem)
void zoomIn ()
void zoomOut ()
void zoomOriginal ()
void setAutoMarkerLine (const QVariant &)
void setAutoMarkerLineOnLostFocus (const QVariant &)

Private Attributes

Ui::BufferWidget ui
QHash< BufferId, QWidget * > _chatViews
ChatViewSearchController_chatViewSearchController
bool _autoMarkerLine
bool _autoMarkerLineOnLostFocus

Detailed Description

Definition at line 33 of file bufferwidget.h.

Constructor & Destructor Documentation

Definition at line 107 of file bufferwidget.cpp.

References _chatViewSearchController.

Member Function Documentation

bool eventFilter ( QObject *  watched,
QEvent *  event 
)
virtual
ChatViewSearchBar* searchBar ( ) const
inline

Definition at line 43 of file bufferwidget.h.

References ui.

void addActionsToMenu ( QMenu *  menu,
const QPointF &  pos 
)
virtual bool autoMarkerLineOnLostFocus ( ) const
inlinevirtual

Definition at line 45 of file bufferwidget.h.

References _autoMarkerLineOnLostFocus.

void setMarkerLine ( ChatView view = 0,
bool  allowGoingBack = true 
)
virtualslot
void jumpToMarkerLine ( ChatView view = 0,
bool  requestBacklog = true 
)
virtualslot

Definition at line 292 of file bufferwidget.cpp.

References ChatView::jumpToMarkerLine(), and ui.

Referenced by BufferWidget().

AbstractChatView * createChatView ( BufferId  )
protectedvirtual

Create an AbstractChatView for the given BufferId and add it to the UI if necessary.

Implements AbstractBufferContainer.

Definition at line 125 of file bufferwidget.cpp.

References _chatViews, ChatView::setBufferContainer(), and ui.

void removeChatView ( BufferId  )
protectedvirtual

Remove a chat view from the UI and delete it.

This method shall remove the view from the UI (for example, from a QStackedWidget) if appropriate. It also shall delete the object afterwards.

Parameters
viewThe chat view to be removed and deleted

Implements AbstractBufferContainer.

Definition at line 137 of file bufferwidget.cpp.

References _chatViews, and ui.

virtual bool autoMarkerLine ( ) const
inlineprotectedvirtual

If true, the marker line will be set automatically on buffer switch.

Returns
Whether the marker line should be set on buffer switch

Reimplemented from AbstractBufferContainer.

Definition at line 54 of file bufferwidget.h.

References _autoMarkerLine.

Referenced by currentChanged().

void currentChanged ( const QModelIndex &  current,
const QModelIndex &  previous 
)
protectedvirtualslot
void showChatView ( BufferId  id)
protectedvirtualslot
void scrollToHighlight ( QGraphicsItem *  highlightItem)
privateslot

Definition at line 161 of file bufferwidget.cpp.

References ui.

Referenced by BufferWidget().

void zoomIn ( )
privateslot

Definition at line 170 of file bufferwidget.cpp.

References ui, and ChatView::zoomIn().

Referenced by BufferWidget().

void zoomOut ( )
privateslot

Definition at line 178 of file bufferwidget.cpp.

References ui, and ChatView::zoomOut().

Referenced by BufferWidget().

void zoomOriginal ( )
privateslot

Definition at line 186 of file bufferwidget.cpp.

References ui, and ChatView::zoomOriginal().

Referenced by BufferWidget().

void setAutoMarkerLine ( const QVariant &  v)
privateslot

Definition at line 114 of file bufferwidget.cpp.

References _autoMarkerLine.

Referenced by BufferWidget().

void setAutoMarkerLineOnLostFocus ( const QVariant &  v)
privateslot

Definition at line 119 of file bufferwidget.cpp.

References _autoMarkerLineOnLostFocus.

Referenced by BufferWidget().

void currentChanged ( BufferId  )
signalinherited
void currentChanged ( const QModelIndex &  )
signalinherited
void rowsAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
protectedvirtualslotinherited
virtual void closeEditor ( QWidget *  ,
QAbstractItemDelegate::EndEditHint   
)
inlineprotectedvirtualslotinherited

Definition at line 48 of file abstractitemview.h.

virtual void commitData ( QWidget *  )
inlineprotectedvirtualslotinherited

Definition at line 49 of file abstractitemview.h.

virtual void dataChanged ( const QModelIndex &  ,
const QModelIndex &   
)
inlineprotectedvirtualslotinherited

Definition at line 51 of file abstractitemview.h.

Referenced by AbstractItemView::setModel().

virtual void editorDestroyed ( QObject *  )
inlineprotectedvirtualslotinherited

Definition at line 52 of file abstractitemview.h.

virtual void rowsInserted ( const QModelIndex &  ,
int  ,
int   
)
inlineprotectedvirtualslotinherited

Definition at line 54 of file abstractitemview.h.

Referenced by AbstractItemView::setModel().

virtual void selectionChanged ( const QItemSelection &  ,
const QItemSelection &   
)
inlineprotectedvirtualslotinherited

Definition at line 55 of file abstractitemview.h.

Referenced by AbstractItemView::setSelectionModel().

Member Data Documentation

QHash<BufferId, QWidget *> _chatViews
private

Definition at line 71 of file bufferwidget.h.

Referenced by createChatView(), removeChatView(), and showChatView().

ChatViewSearchController* _chatViewSearchController
private

Definition at line 73 of file bufferwidget.h.

Referenced by BufferWidget(), showChatView(), and ~BufferWidget().

bool _autoMarkerLine
private

Definition at line 75 of file bufferwidget.h.

Referenced by autoMarkerLine(), and setAutoMarkerLine().

bool _autoMarkerLineOnLostFocus
private

Definition at line 76 of file bufferwidget.h.

Referenced by autoMarkerLineOnLostFocus(), and setAutoMarkerLineOnLostFocus().

QPointer<QAbstractItemModel> _model
protectedinherited

Definition at line 55 of file abstractitemview.h.

Referenced by AbstractItemView::model(), and AbstractItemView::setModel().

QPointer<QItemSelectionModel> _selectionModel
protectedinherited

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