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

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

Inheritance diagram for InputWidget:
Collaboration diagram for InputWidget:

Classes

struct  HistoryState

Public Member Functions

 InputWidget (QWidget *parent=0)
virtual ~InputWidget ()
const NetworkcurrentNetwork () const
MultiLineEditinputLine () 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 rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end)
virtual void dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
virtual void closeEditor (QWidget *, QAbstractItemDelegate::EndEditHint)
virtual void commitData (QWidget *)
virtual void editorDestroyed (QObject *)
virtual void rowsInserted (const QModelIndex &, int, int)
virtual void selectionChanged (const QItemSelection &, const QItemSelection &)

Protected Member Functions

virtual bool eventFilter (QObject *watched, QEvent *event)

Protected Attributes

QPointer< QAbstractItemModel > _model
QPointer< QItemSelectionModel > _selectionModel

Private Slots

void setCustomFont (const QVariant &font)
void setUseCustomFont (const QVariant &)
void setEnableSpellCheck (const QVariant &)
void setEnableEmacsMode (const QVariant &)
void setShowNickSelector (const QVariant &)
void setShowStyleButtons (const QVariant &)
void setEnablePerChatHistory (const QVariant &)
void setMaxLines (const QVariant &)
void setLineWrapEnabled (const QVariant &)
void setMultiLineEnabled (const QVariant &)
void setScrollBarsEnabled (const QVariant &)
void onTextEntered (const QString &text)
void changeNick (const QString &newNick) const
void setNetwork (NetworkId networkId)
void setIdentity (IdentityId identityId)
void connectMyIrcUser ()
void updateNickSelector () const
void updateEnabledState ()
BufferInfo currentBufferInfo () const
void currentCharFormatChanged (const QTextCharFormat &format)
void on_showStyleButton_toggled (bool checked)
void on_boldButton_clicked (bool checked)
void on_italicButton_clicked (bool checked)
void on_underlineButton_clicked (bool checked)
void colorChosen (QAction *action)
void colorHighlightChosen (QAction *action)

Private Member Functions

void mergeFormatOnSelection (const QTextCharFormat &format)
void fontChanged (const QFont &f)
QIcon createColorToolButtonIcon (const QIcon &icon, const QColor &color)
QTextCharFormat getFormatOfWordOrSelection ()
void setFormatOnSelection (const QTextCharFormat &format)

Private Attributes

Ui::InputWidget ui
NetworkId _networkId
IdentityId _identityId
QMenu * _colorMenu
QMenu * _colorFillMenu
bool _perChatHistory
QMap< BufferId, HistoryStatehistoryMap

Detailed Description

Definition at line 35 of file inputwidget.h.

Constructor & Destructor Documentation

~InputWidget ( )
virtual

Definition at line 145 of file inputwidget.cpp.

Member Function Documentation

const Network * currentNetwork ( ) const

Definition at line 362 of file inputwidget.cpp.

References _networkId, and Client::network().

Referenced by changeNick(), connectMyIrcUser(), and updateNickSelector().

bool eventFilter ( QObject *  watched,
QEvent *  event 
)
protectedvirtual
void rowsAboutToBeRemoved ( const QModelIndex &  parent,
int  start,
int  end 
)
protectedvirtualslot
void dataChanged ( const QModelIndex &  topLeft,
const QModelIndex &  bottomRight 
)
protectedvirtualslot
void setCustomFont ( const QVariant &  font)
privateslot

Definition at line 161 of file inputwidget.cpp.

References ui.

Referenced by InputWidget(), and setUseCustomFont().

void setUseCustomFont ( const QVariant &  v)
privateslot

Definition at line 150 of file inputwidget.cpp.

References setCustomFont(), and UiSettings::value().

Referenced by InputWidget().

void setEnableSpellCheck ( const QVariant &  v)
privateslot

Definition at line 175 of file inputwidget.cpp.

References ui.

Referenced by InputWidget().

void setEnableEmacsMode ( const QVariant &  v)
privateslot

Definition at line 181 of file inputwidget.cpp.

References ui.

Referenced by InputWidget().

void setShowNickSelector ( const QVariant &  v)
privateslot

Definition at line 187 of file inputwidget.cpp.

References ui.

Referenced by InputWidget().

void setShowStyleButtons ( const QVariant &  v)
privateslot

Definition at line 193 of file inputwidget.cpp.

References ui.

Referenced by InputWidget().

void setEnablePerChatHistory ( const QVariant &  v)
privateslot

Definition at line 199 of file inputwidget.cpp.

References _perChatHistory.

Referenced by InputWidget().

void setMaxLines ( const QVariant &  v)
privateslot

Definition at line 205 of file inputwidget.cpp.

References ui.

Referenced by InputWidget().

void setLineWrapEnabled ( const QVariant &  v)
privateslot

Definition at line 217 of file inputwidget.cpp.

References ui.

Referenced by InputWidget().

void setMultiLineEnabled ( const QVariant &  v)
privateslot

Definition at line 223 of file inputwidget.cpp.

References MultiLineEdit::MultiLine, MultiLineEdit::SingleLine, and ui.

Referenced by InputWidget().

void setScrollBarsEnabled ( const QVariant &  v)
privateslot

Definition at line 211 of file inputwidget.cpp.

References ui.

Referenced by InputWidget().

void onTextEntered ( const QString &  text)
privateslot

Definition at line 493 of file inputwidget.cpp.

References currentBufferInfo(), inputLine(), ui, and Client::userInput().

Referenced by InputWidget().

void changeNick ( const QString &  newNick) const
privateslot
void setNetwork ( NetworkId  networkId)
privateslot
void setIdentity ( IdentityId  identityId)
privateslot

Definition at line 418 of file inputwidget.cpp.

References _identityId, Client::identity(), and updateNickSelector().

Referenced by setNetwork().

void connectMyIrcUser ( )
privateslot

Definition at line 400 of file inputwidget.cpp.

References currentNetwork(), Network::me(), and updateNickSelector().

Referenced by setNetwork().

BufferInfo currentBufferInfo ( ) const
privateslot

Definition at line 368 of file inputwidget.cpp.

References NetworkModel::BufferInfoRole, and AbstractItemView::selectionModel().

Referenced by onTextEntered().

void currentCharFormatChanged ( const QTextCharFormat &  format)
privateslot

Definition at line 539 of file inputwidget.cpp.

References fontChanged().

Referenced by InputWidget().

void on_showStyleButton_toggled ( bool  checked)
privateslot

Definition at line 617 of file inputwidget.cpp.

References ui.

void on_boldButton_clicked ( bool  checked)
privateslot

Definition at line 545 of file inputwidget.cpp.

References mergeFormatOnSelection().

void on_italicButton_clicked ( bool  checked)
privateslot

Definition at line 561 of file inputwidget.cpp.

References mergeFormatOnSelection().

void on_underlineButton_clicked ( bool  checked)
privateslot

Definition at line 553 of file inputwidget.cpp.

References mergeFormatOnSelection().

void colorChosen ( QAction *  action)
privateslot
void colorHighlightChosen ( QAction *  action)
privateslot
void mergeFormatOnSelection ( const QTextCharFormat &  format)
private
void fontChanged ( const QFont &  f)
private

Definition at line 569 of file inputwidget.cpp.

References ui.

Referenced by currentCharFormatChanged().

QIcon createColorToolButtonIcon ( const QIcon &  icon,
const QColor &  color 
)
private

Definition at line 629 of file inputwidget.cpp.

Referenced by colorChosen(), and colorHighlightChosen().

QTextCharFormat getFormatOfWordOrSelection ( )
private

Definition at line 532 of file inputwidget.cpp.

References inputLine().

Referenced by colorChosen(), and colorHighlightChosen().

void setFormatOnSelection ( const QTextCharFormat &  format)
private

Definition at line 524 of file inputwidget.cpp.

References inputLine().

Referenced by colorChosen(), and colorHighlightChosen().

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 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

NetworkId _networkId
private

Definition at line 89 of file inputwidget.h.

Referenced by currentChanged(), currentNetwork(), rowsAboutToBeRemoved(), and setNetwork().

IdentityId _identityId
private

Definition at line 90 of file inputwidget.h.

Referenced by setIdentity().

QMenu* _colorMenu
private

Definition at line 91 of file inputwidget.h.

Referenced by InputWidget().

QMenu * _colorFillMenu
private

Definition at line 91 of file inputwidget.h.

Referenced by InputWidget().

bool _perChatHistory
private

Definition at line 99 of file inputwidget.h.

Referenced by currentChanged(), and setEnablePerChatHistory().

QMap<BufferId, HistoryState> historyMap
private

Definition at line 108 of file inputwidget.h.

Referenced by currentChanged().

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: