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

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

Collaboration diagram for BufferViewFilter:

Public Types

enum  Mode {
  NoActive = 0x01, NoInactive = 0x02, SomeNets = 0x04, AllNets = 0x08,
  NoChannels = 0x10, NoQueries = 0x20, NoServers = 0x40, FullCustom = 0x80
}

Public Slots

void checkPreviousCurrentForRemoval (const QModelIndex &current, const QModelIndex &previous)
void checkItemForRemoval (const QModelIndex &index)
void checkItemsForRemoval (const QModelIndex &topLeft, const QModelIndex &bottomRight)

Signals

void _dataChanged (const QModelIndex &source_topLeft, const QModelIndex &source_bottomRight)
void configChanged ()

Public Member Functions

 Q_DECLARE_FLAGS (Modes, Mode) BufferViewFilter(QAbstractItemModel *model
virtual Qt::ItemFlags flags (const QModelIndex &index) const
virtual bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
QVariant data (const QModelIndex &index, int role) const
QVariant checkedState (const QModelIndex &index) const
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
bool setCheckedState (const QModelIndex &index, Qt::CheckState state)
void setConfig (BufferViewConfig *config)
BufferViewConfigconfig () const
virtual void sort (int column, Qt::SortOrder order=Qt::AscendingOrder)
QList< QAction * > actions (const QModelIndex &index)

Public Attributes

BufferViewConfigconfig = 0)

Protected Member Functions

bool filterAcceptsRow (int source_row, const QModelIndex &source_parent) const
bool lessThan (const QModelIndex &source_left, const QModelIndex &source_right) const
bool bufferLessThan (const QModelIndex &source_left, const QModelIndex &source_right) const
bool networkLessThan (const QModelIndex &source_left, const QModelIndex &source_right) const
virtual void customEvent (QEvent *event)

Private Slots

void configInitialized ()
void enableEditMode (bool enable)
void showServerQueriesChanged ()

Private Member Functions

bool filterAcceptBuffer (const QModelIndex &) const
bool filterAcceptNetwork (const QModelIndex &) const
void addBuffer (const BufferId &bufferId) const
void addBuffers (const QList< BufferId > &bufferIds) const

Static Private Member Functions

static bool bufferIdLessThan (const BufferId &, const BufferId &)

Private Attributes

QPointer< BufferViewConfig_config
Qt::SortOrder _sortOrder
bool _showServerQueries
bool _editMode
QAction _enableEditMode
QSet< BufferId_toAdd
QSet< BufferId_toTempRemove
QSet< BufferId_toRemove

Detailed Description

Definition at line 37 of file bufferviewfilter.h.

Member Enumeration Documentation

enum Mode
Enumerator:
NoActive 
NoInactive 
SomeNets 
AllNets 
NoChannels 
NoQueries 
NoServers 
FullCustom 

Definition at line 42 of file bufferviewfilter.h.

Member Function Documentation

Q_DECLARE_FLAGS ( Modes  ,
Mode   
)
Qt::ItemFlags flags ( const QModelIndex &  index) const
virtual
QVariant data ( const QModelIndex &  index,
int  role 
) const
bool setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)

Definition at line 503 of file bufferviewfilter.cpp.

References setCheckedState().

bool setCheckedState ( const QModelIndex &  index,
Qt::CheckState  state 
)

Definition at line 514 of file bufferviewfilter.cpp.

References _toAdd, _toRemove, _toTempRemove, NetworkModel::BufferIdRole, and SignedId::isValid().

Referenced by setData().

void sort ( int  column,
Qt::SortOrder  order = Qt::AscendingOrder 
)
virtual

Definition at line 264 of file bufferviewfilter.cpp.

References _sortOrder.

QList< QAction * > actions ( const QModelIndex &  index)

Definition at line 142 of file bufferviewfilter.cpp.

References _enableEditMode.

Referenced by BufferView::addFilterActions().

void checkPreviousCurrentForRemoval ( const QModelIndex &  current,
const QModelIndex &  previous 
)
slot

Definition at line 545 of file bufferviewfilter.cpp.

void checkItemForRemoval ( const QModelIndex &  index)
inlineslot

Definition at line 74 of file bufferviewfilter.h.

References checkItemsForRemoval().

Referenced by customEvent().

void checkItemsForRemoval ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
slot

Definition at line 565 of file bufferviewfilter.cpp.

References _dataChanged().

Referenced by checkItemForRemoval().

bool filterAcceptsRow ( int  source_row,
const QModelIndex &  source_parent 
) const
protected
bool lessThan ( const QModelIndex &  source_left,
const QModelIndex &  source_right 
) const
protected
bool bufferLessThan ( const QModelIndex &  source_left,
const QModelIndex &  source_right 
) const
protected
bool networkLessThan ( const QModelIndex &  source_left,
const QModelIndex &  source_right 
) const
protected

Definition at line 447 of file bufferviewfilter.cpp.

References lessThan().

Referenced by lessThan().

void customEvent ( QEvent *  event)
protectedvirtual

Definition at line 553 of file bufferviewfilter.cpp.

References checkItemForRemoval(), and CheckRemovalEvent::index.

void _dataChanged ( const QModelIndex &  source_topLeft,
const QModelIndex &  source_bottomRight 
)
signal

Referenced by checkItemsForRemoval().

void configChanged ( )
signal

Referenced by configInitialized().

void configInitialized ( )
privateslot

Definition at line 102 of file bufferviewfilter.cpp.

References config(), and configChanged().

Referenced by setConfig().

void showServerQueriesChanged ( )
privateslot
bool filterAcceptNetwork ( const QModelIndex &  source_index) const
private
void addBuffer ( const BufferId bufferId) const
private
void addBuffers ( const QList< BufferId > &  bufferIds) const
private
bool bufferIdLessThan ( const BufferId left,
const BufferId right 
)
staticprivate

Member Data Documentation

BufferViewConfig* config = 0)

Definition at line 54 of file bufferviewfilter.h.

Referenced by BufferViewSettingsPage::cloneConfig().

QPointer<BufferViewConfig> _config
private

Definition at line 94 of file bufferviewfilter.h.

Referenced by config(), and setConfig().

Qt::SortOrder _sortOrder
private

Definition at line 95 of file bufferviewfilter.h.

Referenced by dropMimeData(), and sort().

bool _showServerQueries
private

Definition at line 97 of file bufferviewfilter.h.

Referenced by filterAcceptBuffer(), and showServerQueriesChanged().

bool _editMode
private

Definition at line 98 of file bufferviewfilter.h.

Referenced by checkedState(), enableEditMode(), filterAcceptBuffer(), and flags().

QAction _enableEditMode
private

Definition at line 99 of file bufferviewfilter.h.

Referenced by actions().

QSet<BufferId> _toAdd
private

Definition at line 100 of file bufferviewfilter.h.

Referenced by checkedState(), enableEditMode(), and setCheckedState().

QSet<BufferId> _toTempRemove
private

Definition at line 101 of file bufferviewfilter.h.

Referenced by checkedState(), enableEditMode(), and setCheckedState().

QSet<BufferId> _toRemove
private

Definition at line 102 of file bufferviewfilter.h.

Referenced by checkedState(), enableEditMode(), and setCheckedState().


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