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

#include </tmp/quassel/src/uisupport/bufferview.h>

Inheritance diagram for BufferView:

Public Types

enum  Direction { Forward = 1, Backward = -1 }

Public Slots

void setRootIndexForNetworkId (const NetworkId &networkId)
void removeSelectedBuffers (bool permanently=false)
void menuActionTriggered (QAction *)
void nextBuffer ()
void previousBuffer ()
void hideCurrentBuffer ()

Signals

void removeBuffer (const QModelIndex &)
void removeBufferPermanently (const QModelIndex &)

Public Member Functions

 BufferView (QWidget *parent=0)
void init ()
void setModel (QAbstractItemModel *model)
void setFilteredModel (QAbstractItemModel *model, BufferViewConfig *config)
virtual void setSelectionModel (QItemSelectionModel *selectionModel)
void setConfig (BufferViewConfig *config)
BufferViewConfigconfig ()
void addActionsToMenu (QMenu *menu, const QModelIndex &index)
void addFilterActions (QMenu *contextMenu, const QModelIndex &index)

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *)
virtual void dropEvent (QDropEvent *event)
virtual void rowsInserted (const QModelIndex &parent, int start, int end)
virtual void wheelEvent (QWheelEvent *)
virtual QSize sizeHint () const
virtual void focusInEvent (QFocusEvent *event)
virtual void contextMenuEvent (QContextMenuEvent *event)
virtual void dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)

Private Types

enum  ExpandedState { WasExpanded = 0x01, WasActive = 0x02 }

Private Slots

void joinChannel (const QModelIndex &index)
void toggleHeader (bool checked)
void storeExpandedState (const QModelIndex &networkIdx)
void setExpandedState (const QModelIndex &networkIdx)
void on_configChanged ()
void on_layoutChanged ()
void changeBuffer (Direction direction)

Private Attributes

QPointer< BufferViewConfig_config
QHash< NetworkId, short > _expandedState

Detailed Description

Definition at line 40 of file bufferview.h.

Member Enumeration Documentation

enum Direction
Enumerator:
Forward 
Backward 

Definition at line 45 of file bufferview.h.

enum ExpandedState
private
Enumerator:
WasExpanded 
WasActive 

Definition at line 105 of file bufferview.h.

Constructor & Destructor Documentation

BufferView ( QWidget *  parent = 0)

Definition at line 49 of file bufferview.cpp.

References storeExpandedState().

Member Function Documentation

void init ( )

Definition at line 64 of file bufferview.cpp.

References joinChannel().

Referenced by setModel().

void setModel ( QAbstractItemModel *  model)

Definition at line 103 of file bufferview.cpp.

References init(), on_layoutChanged(), and toggleHeader().

Referenced by setFilteredModel().

void setFilteredModel ( QAbstractItemModel *  model,
BufferViewConfig config 
)
void setSelectionModel ( QItemSelectionModel *  selectionModel)
virtual

Definition at line 161 of file bufferview.cpp.

void setConfig ( BufferViewConfig config)

Definition at line 176 of file bufferview.cpp.

References _config, config(), BufferViewConfig::networkId, and setRootIndexForNetworkId().

Referenced by setFilteredModel().

void addActionsToMenu ( QMenu *  menu,
const QModelIndex &  index 
)
void addFilterActions ( QMenu *  contextMenu,
const QModelIndex &  index 
)

Definition at line 450 of file bufferview.cpp.

References BufferViewFilter::actions().

Referenced by contextMenuEvent().

void setRootIndexForNetworkId ( const NetworkId networkId)
slot

Definition at line 197 of file bufferview.cpp.

References SignedId::isValid(), and NetworkModel::NetworkIdRole.

Referenced by setConfig().

void menuActionTriggered ( QAction *  result)
slot
void nextBuffer ( )
slot

Definition at line 481 of file bufferview.cpp.

References changeBuffer(), and Forward.

Referenced by MainWin::nextBuffer().

void previousBuffer ( )
slot

Definition at line 487 of file bufferview.cpp.

References Backward, and changeBuffer().

Referenced by MainWin::previousBuffer().

void removeBuffer ( const QModelIndex &  )
signal
void removeBufferPermanently ( const QModelIndex &  )
signal
void keyPressEvent ( QKeyEvent *  event)
protectedvirtual

Reimplemented in PreviewBufferView.

Definition at line 229 of file bufferview.cpp.

References removeSelectedBuffers().

void rowsInserted ( const QModelIndex &  parent,
int  start,
int  end 
)
protectedvirtual
void wheelEvent ( QWheelEvent *  event)
protectedvirtual

Definition at line 535 of file bufferview.cpp.

References changeBuffer().

QSize sizeHint ( ) const
protectedvirtual

Definition at line 567 of file bufferview.cpp.

virtual void focusInEvent ( QFocusEvent *  event)
inlineprotectedvirtual

Definition at line 81 of file bufferview.h.

void contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

Reimplemented in PreviewBufferView.

Definition at line 420 of file bufferview.cpp.

References addActionsToMenu(), and addFilterActions().

void dataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
protectedvirtual
void joinChannel ( const QModelIndex &  index)
privateslot
void toggleHeader ( bool  checked)
privateslot

Definition at line 413 of file bufferview.cpp.

References toInt().

Referenced by setModel().

void storeExpandedState ( const QModelIndex &  networkIdx)
privateslot
void on_configChanged ( )
privateslot
void on_layoutChanged ( )
privateslot

Definition at line 316 of file bufferview.cpp.

References setExpandedState().

Referenced by setModel().

void changeBuffer ( Direction  direction)
privateslot

Definition at line 493 of file bufferview.cpp.

References Backward.

Referenced by hideCurrentBuffer(), nextBuffer(), previousBuffer(), and wheelEvent().

Member Data Documentation

QPointer<BufferViewConfig> _config
private

Definition at line 103 of file bufferview.h.

Referenced by config(), and setConfig().

QHash<NetworkId, short> _expandedState
private

Definition at line 109 of file bufferview.h.

Referenced by setExpandedState(), and storeExpandedState().


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