KVIrc  4.9.2
DeveloperAPIs
Public Types | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Slots | List of all members
KviChannelWindow Class Reference

The class which manages a channel. More...

#include <KviChannelWindow.h>

+ Inheritance diagram for KviChannelWindow:

Public Types

enum  ActivityLimit {
  Ice = 5, VeryCold = 10, Cold = 20, Undefined = 30,
  Hot = 50, VeryHot = 70
}
 Holds the limits of the activity in a channel. More...
 
enum  StateFlag {
  HaveAllNames = 1, HaveWhoList = (1 << 2), DeadChan = (1 << 3), SentWhoRequest = (1 << 4),
  SentPart = (1 << 5), Synchronized = (1 << 6), NoCloseOnPart = (1 << 7), SentSyncWhoRequest = (1 << 8)
}
 Holds the state flags of the channel. More...
 
- Public Types inherited from KviWindow
enum  ActivityTemperature {
  Ice = 0, VeryCold = 1, Cold = 2, Undefined = 3,
  Hot = 4, VeryHot = 5, Fire = 6
}
 Holds the activity meter in temperature scale. More...
 
enum  ActivityValue {
  None = 0, VeryLow = 1, Low = 2, Medium = 3,
  High = 4, VeryHigh = 5
}
 Holds the activity meter in value scale. More...
 
enum  AttentionLevel { VisibleAndActive = 0, MainWindowIsVisible = 1 }
 attention levels usable in hasAttention() More...
 
enum  Type {
  Console = 0, Channel = 1, Query = 2, DeadChannel = 3,
  DeadQuery = 4, Editor = 5, Help = 6, Terminal = 7,
  SocketSpy = 8, Links = 9, List = 10, DccChat = 11,
  DccTransfer = 12, DccCanvas = 13, DccVoice = 14, DccVideo = 15,
  UserWindow = 16, Tool = 17, IOGraph = 18, DirBrowser = 19,
  ScriptEditor = 20, ScriptObject = 21, LogView = 22, Offer = 23,
  Debug = 24, Unknown = 25, TypeCount = 26
}
 Holds the types of a window; these are used by the KVIrc core and distributed modules. More...
 

Signals

void opStatusChanged ()
 Emitted when our op status change. More...
 
- Signals inherited from KviWindow
void windowNameChanged ()
 

Public Member Functions

virtual bool activityMeter (unsigned int *puActivityValue, unsigned int *puActivityTemperature)
 Colors the icon who tells how much activity there is. More...
 
void addHighlightedUser (const QString &szNick)
 Adds a user to the highlight list. More...
 
bool avatarChanged (const QString &szNick)
 Returns true if the avatar of a user is changed. More...
 
QFrame * buttonContainer ()
 Returns the button container object. More...
 
int chanAdminCount ()
 Returns the number of users with chanadmin status. More...
 
void channelAction (const QString &szNick, unsigned int uActionType, int iTemperature)
 Called when someone perform an action in the channel. More...
 
QString channelModeParam (char cMode) const
 Returns the value (parameter) for a channel mode (eg. the password for mode k) More...
 
int chanOwnerCount ()
 Returns the number of users with chanowner status. More...
 
void checkChannelSync ()
 Checks the channel synchronization time. More...
 
void clearSentSyncWhoRequest ()
 Clears the sync WHO request flag. More...
 
bool closeOnPart ()
 Returns true if the channel has to be closed on part. More...
 
unsigned int count ()
 Returns the number of users. More...
 
void enableUserListUpdates (bool bEnable)
 Enables or disable the userlist updates. More...
 
KviUserListEntryfindEntry (const QString &szNick)
 Searches for a user in the userlist. More...
 
QString * firstSelectedNickname ()
 Returns the first selected nickname in the userlist. More...
 
void getChannelActivityStats (KviChannelActivityStats *pStats)
 Gets the channel activity stats and put them in the buffer. More...
 
void getChannelModeString (QString &szBuffer)
 Fills szBuffer with all set channel modes, but without any parameters (eg: lkmi) More...
 
void getChannelModeStringWithEmbeddedParams (QString &szBuffer)
 Fills szBuffer with all set channel modes and any parameters (eg: mi l:10 k:password) More...
 
char getUserFlag (const QString &szNick)
 Returns the flag of a user. More...
 
virtual void getWindowListTipText (QString &szBuffer)
 Creates the tooltip over the channel treeview. More...
 
int halfOpCount ()
 Returns the number of users with halfop status. More...
 
bool hasAllNames ()
 Returns true if the channel has all names. More...
 
bool hasBanExceptionList ()
 Returns true if the channel has a ban exception list. More...
 
bool hasBanList ()
 Returns true if the channel has a ban list. More...
 
bool hasChannelMode (char cMode)
 Returns true if the channel has a mode with parameter set (eg. mode k) More...
 
bool hasInviteList ()
 Returns true if the channel has an invite list. More...
 
bool hasQuietBanList ()
 Returns true if the channel has a quiet ban list. More...
 
bool hasWhoList ()
 Returns true if the channel has a WHO list. More...
 
bool isChanAdmin (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is a chan admin. More...
 
bool isChanOwner (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is a chan owner. More...
 
bool isDeadChan ()
 Returns true if the channel is dead. More...
 
bool isHalfOp (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is a half operator. More...
 
bool isHighlightedUser (const QString &szNick)
 Returns true if the user is highlighted. More...
 
bool isMeChanAdmin (bool bAtLeast=false)
 Returns true if we are a chan admin. More...
 
bool isMeChanOwner (bool bAtLeast=false)
 Returns true if we are a chan owner. More...
 
bool isMeHalfOp (bool bAtLeast=false)
 Returns true if we are a half operator. More...
 
bool isMeIrcOp (bool bAtLeast=false)
 Returns true if we are an ircop. More...
 
bool isMeOp (bool bAtLeast=false)
 Returns true if we are an operator. More...
 
bool isMeUserOp (bool bAtLeast=false)
 Returns true if we are a user operator. More...
 
bool isMeVoice (bool bAtLeast=false)
 Returns true if we are a voice. More...
 
bool isOn (const QString &szNick)
 Returns true if the user is on the channel. More...
 
bool isOp (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is an operator. More...
 
bool isUserOp (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is a user operator. More...
 
bool isVoice (const QString &szNick, bool bAtLeast=false)
 Returns true if the user is a voice. More...
 
KviUserListEntryjoin (const QString &szNick, const QString &szUser=QString(), const QString &szHost=QString(), int iFlags=0)
 Called when a user joins the channel. More...
 
 KviChannelWindow (KviConsoleWindow *lpConsole, const QString &szName)
 Constructs the channel object. More...
 
kvi_time_t lastReceivedWhoReply ()
 Returns the time of the last received WHO reply. More...
 
QByteArray loadLogFile (const QString &szFileName, bool bGzip)
 Loads a log file. More...
 
virtual void lostUserFocus ()
 Called when the channel losts the focus by the user. More...
 
unsigned int maskCount (char cMode)
 Returns the number of masks is a channel mode list. More...
 
KviIrcViewmessageView () const
 Returns the irc view object. More...
 
KviPointerList< KviMaskEntry > * modeMasks (char cMode)
 Returns a list of masks for a specific mode. More...
 
int myFlags ()
 Returns our flags. More...
 
const QString & nameWithUserFlag ()
 Returns the name of the channel with user flags. More...
 
QString * nextSelectedNickname ()
 Returns the next selected nickname in the userlist. More...
 
bool nickChange (const QString &szOldNick, const QString &szNewNick)
 Called when someone changes his nick. More...
 
int opCount ()
 Returns the number of users with op status. More...
 
virtual void outputMessage (int iMsgType, const QString &szMsg, const QDateTime &datetime=QDateTime())
 Outputs a message to the channel window. More...
 
void ownAction (const QString &szBuffer)
 Called when we perform an action. More...
 
void ownMessage (const QString &szBuffer, bool bUserFeedback=true)
 Called when we send a message. More...
 
bool part (const QString &szNick)
 Called when someone parts the channel. More...
 
void partMessageSent (bool bCloseOnPart=true, bool bShowMessage=true)
 Called when we want to part a channel. More...
 
void pasteLastLog ()
 Pastes the most recent channel log into the buffer. More...
 
QString plainChannelMode ()
 Returns only the plain (parameter-less) channel modes (eg: mi) More...
 
void prependUserFlag (const QString &szNick, QString &szBuffer)
 Prepends the user flag to the nickname. More...
 
void removeHighlightedUser (const QString &szNick)
 Removes a user from the highlight list. More...
 
int selectedCount ()
 Returns the number of selected users. More...
 
bool sentListRequest (char cMode)
 Returns true if we have sent a list request for a specific channel mode. More...
 
bool sentSyncWhoRequest ()
 Returns true if we have sent the sync WHO request. More...
 
bool sentWhoRequest ()
 Returns true if we have sent the WHO request. More...
 
KviIrcConnectionServerInfoserverInfo ()
 Gets the KviIrcConnectionServerInfo structure associated to the current connection. More...
 
void setAliveChan ()
 Sets the channel as alive. More...
 
bool setChanAdmin (const QString &szNick, bool bChanAdmin)
 Sets the chan admin mode. More...
 
void setChannelMode (char cMode, bool bAdd)
 Sets a plain (parameter-less) channel mode, (eg: +m) More...
 
void setChannelModeWithParam (char cMode, QString &szParam)
 Sets a channel mode with a parameter; an empty parameter unsets the mode (eg: +k password) More...
 
bool setChanOwner (const QString &szNick, bool bChanOwner)
 Sets the chan owner mode. More...
 
void setDeadChan ()
 Sets the channel as dead. More...
 
bool setHalfOp (const QString &szNick, bool bHalfOp, bool)
 Sets the half operator mode. More...
 
void setHasAllNames ()
 Sets the existence of all names. More...
 
void setHasWhoList ()
 Sets the existence of the WHO list. More...
 
void setLastReceivedWhoReply (kvi_time_t tTime)
 Sets the time of the last received WHO reply. More...
 
void setListRequestDone (char cMode)
 Clears the "sent request" flag for a specific chanel mode. More...
 
void setModeInList (char cMode, const QString &szMask, bool bAdd, const QString &szSetBy, unsigned int uSetAt, QString szChangeMask=QString())
 Called when someone sets a channel mode that is stored in a list; these modes require a parameter that is tipically a mask. More...
 
bool setOp (const QString &szNick, bool bOp, bool bIsMe)
 Sets the operator mode. More...
 
void setSentListRequest (char cMode)
 Sets the "sent request" flag for a specific channel mode. More...
 
void setSentSyncWhoRequest ()
 Sets the sync WHO request flag. More...
 
void setSentWhoRequest ()
 Sets the WHO request flag. More...
 
bool setUserOp (const QString &szNick, bool bUserOp, bool)
 Sets the user operator mode. More...
 
bool setVoice (const QString &szNick, bool bVoice, bool)
 Sets the voice mode. More...
 
virtual QSize sizeHint () const
 Returns the size of the channel. More...
 
virtual const QString & target ()
 Returns the name of the channel. More...
 
KviTopicWidgettopicWidget ()
 Returns the topic widget object. More...
 
void unhighlight ()
 Unhighlights the windowlist item. More...
 
void updateModeLabel ()
 Updates the tooltip over the channel modes. More...
 
void userAction (KviIrcMask *user, unsigned int uActionType)
 Perform a user action in the channel. More...
 
void userAction (const QString &szNick, unsigned int uActionType)
 Perform a user action in the channel. More...
 
void userAction (const QString &szNick, const QString &szUser, const QString &szHost, unsigned int uActionType)
 Perform a user action in the channel. More...
 
KviUserListViewuserListView ()
 Returns the user listview object. More...
 
int userOpCount ()
 Returns the number of users with userop status. More...
 
int voiceCount ()
 Returns the number of users with voice status. More...
 
 ~KviChannelWindow ()
 Destroys the channel object. More...
 
- Public Member Functions inherited from KviWindow
KviIrcConnectionconnection ()
 Returns the current IRC connection (if any) More...
 
KviConsoleWindowconsole ()
 Returns the console that this window belongs to. More...
 
KviIrcContextcontext ()
 
void contextPopup ()
 
QString decodeText (const char *pcText)
 
virtual QTextCodec * defaultTextCodec ()
 
void delayedAutoRaise ()
 
void delayedClose ()
 
void demandAttention ()
 Notify the window manager that this window demands attention. More...
 
QByteArray encodeText (const QString &szText)
 
void forceTextCodec (QTextCodec *pCodec)
 
void getDefaultLogFileName (QString &szBuffer)
 
bool hasAttention (AttentionLevel eLevel=VisibleAndActive)
 Returns whether this window is the active one. More...
 
virtual bool highlightMe (unsigned int uValue)
 
virtual bool highlightMeter (unsigned int *puValue)
 
QString id ()
 Returns the global ID of this window. More...
 
KviInputinput ()
 
void internalOutput (KviIrcView *pView, int iMsgType, const kvi_wchar_t *pwText, int iFlags=0, const QDateTime &datetime=QDateTime())
 
bool isChannel () const
 
bool isConsole () const
 
bool isDocked ()
 
bool isQuery () const
 
 KviWindow (Type eType, const QString &szName, KviConsoleWindow *pConsole=0)
 Constructs the window object. More...
 
const QString & lastLineOfText ()
 
const QString & lastMessageText ()
 
void listWindowTypes ()
 
virtual const QString & localNick ()
 
QTextEncoder * makeEncoder ()
 
unsigned long int numericId ()
 Returns the global ID of this window. More...
 
virtual void output (int iMsgType, const char *pcFormat,...)
 
virtual void output (int iMsgType, const kvi_wchar_t *pwFormat,...)
 
virtual void output (int iMsgType, QString szFmt,...)
 
void output (int iMsgType, const QDateTime &datetime, const char *pcFormat,...)
 
void output (int iMsgType, const QDateTime &datetime, const kvi_wchar_t *pwFormat,...)
 
void output (int iMsgType, const QDateTime &datetime, QString szFmt,...)
 
virtual void outputNoFmt (int iMsgType, const char *pcText, int iFlags=0, const QDateTime &datetime=QDateTime())
 
virtual void outputNoFmt (int iMsgType, const kvi_wchar_t *pwText, int iFlags=0, const QDateTime &datetime=QDateTime())
 
virtual void outputNoFmt (int iMsgType, const QString &szText, int iFlags=0, const QDateTime &datetime=QDateTime())
 
virtual KviWindowoutputProxy ()
 
virtual const QString & plainTextCaption ()
 
void setFixedCaption (const QString &szCaption)
 
void setProgress (int iProgress)
 Sets the progress for the WindowList item. More...
 
bool setTextEncoding (const QString &szTextEncoding)
 
void setWindowName (const QString &szName)
 Sets the name of the window. More...
 
void setWindowTitle (QString &szTitle)
 
KviTalSplittersplitter ()
 Returns the splitter of this window. More...
 
QTextCodec * textCodec ()
 
const QString & textEncoding ()
 
virtual void toggleButtonContainer ()
 
Type type () const
 Returns the type of the window. More...
 
virtual const char * typeString ()
 Returns a descriptive name of the window type. More...
 
void unhighlight ()
 
void updateBackgrounds (QObject *pObj=0)
 
virtual void updateCaption ()
 
virtual void updateIcon ()
 
KviIrcViewview () const
 Returns the KviIrcView of this window. More...
 
KviWindowListItemwindowListItem ()
 Returns the windowList item. More...
 
const QString & windowName ()
 Returns the name of this window. More...
 
virtual ~KviWindow ()
 Destroys the window object. More...
 

Protected Member Functions

virtual void applyOptions ()
 Applies the options. More...
 
virtual void closeEvent (QCloseEvent *pEvent)
 
bool eventFilter (QObject *pObject, QEvent *pEvent)
 Filters the events. More...
 
virtual void fillCaptionBuffers ()
 Fills in the caption buffers. More...
 
void fixActionHistory ()
 Fixes the action history. More...
 
virtual void getBaseLogFileName (QString &szBuffer)
 Gets the base name for log file. More...
 
virtual void getConfigGroupName (QString &szBuffer)
 Gets the group name. More...
 
void getTalkingUsersStats (QString &szBuffer, QStringList &list, bool bPast)
 Gets the talking user stats to fill in the tooltip. More...
 
void internalMask (const QString &szMask, bool bAdd, const QString &szSetBy, unsigned int uSetAt, KviPointerList< KviMaskEntry > *l, KviMaskEditor **ppEd, QString &szChangeMask)
 Called when someone sets a mask in the channel's lists. More...
 
virtual void loadProperties (KviConfigurationFile *pCfg)
 Loads the properties from file. More...
 
virtual QPixmap * myIconPtr ()
 Returns the correct icon for the channel. More...
 
virtual void preprocessMessage (QString &szMessage)
 Preprocess message stripping control bytes. More...
 
virtual void resizeEvent (QResizeEvent *)
 
virtual void saveProperties (KviConfigurationFile *pCfg)
 Saves the properties to file. More...
 
void showDoubleView (bool bShow)
 Splits the channel view into two views. More...
 
virtual void triggerCreationEvents ()
 Trigger the OnChannelWindowCreated event. More...
 
- Protected Member Functions inherited from KviWindow
virtual void childEvent (QChildEvent *pEvent)
 
void childInserted (QWidget *pObject)
 
void childRemoved (QWidget *pObject)
 
virtual void childrenTreeChanged (QWidget *pAdded)
 
void createCryptControllerButton (QWidget *pPar)
 
void createSystemTextEncodingPopup ()
 
void createTextEncodingButton (QWidget *pPar)
 
QToolButton * createToolButton (QWidget *pPar, const char *pcName, KviIconManager::SmallIcon eIcon, const QString &szToolTip, bool bOn)
 
virtual void createWindowListItem ()
 
virtual void destroyWindowListItem ()
 
bool eventFilter (QObject *pObject, QEvent *pEvent)
 
void fillSingleColorCaptionBuffers (const QString &szName)
 
virtual void focusInEvent (QFocusEvent *)
 
virtual bool focusNextPrevChild (bool bNext)
 
virtual void inputMethodEvent (QInputMethodEvent *e)
 
virtual void moveEvent (QMoveEvent *pEvent)
 
void setType (Type eType)
 
virtual void triggerDestructionEvents ()
 
virtual void youAreDocked ()
 
virtual void youAreUndocked ()
 

Protected Attributes

int m_iStateFlags
 
QDateTime m_joinTime
 
KviPointerList
< KviChannelAction > * 
m_pActionHistory
 
KviTalHBoxm_pButtonContainer
 
QToolButton * m_pDoubleViewButton
 
QMap< char,
KviWindowToolPageButton * > 
m_pListEditorButtons
 
QMap< char, KviMaskEditor * > m_pListEditors
 
KviWindowToolPageButtonm_pListViewButton
 
KviIrcViewm_pMessageView
 
KviModeEditorm_pModeEditor
 
KviWindowToolPageButtonm_pModeEditorButton
 
QMap< char, KviPointerList
< KviMaskEntry > * > 
m_pModeLists
 
KviModeWidgetm_pModeWidget
 
KviPixmap m_privateBackground
 
QStringList * m_pTmpHighLighted
 
KviTopicWidgetm_pTopicWidget
 
KviTalSplitterm_pTopSplitter
 
KviUserListViewm_pUserListView
 
KviTalSplitterm_pVertSplitter
 
QList< int > m_SplitterSizesList
 
QString m_szChannelMode
 
QMap< char, QString > m_szChannelParameterModes
 
QString m_szNameWithUserFlag
 
QString m_szSentModeRequests
 
kvi_time_t m_tLastReceivedWhoReply
 
unsigned int m_uActionHistoryHotActionCount
 
QList< int > m_VertSplitterSizesList
 
- Protected Attributes inherited from KviWindow
bool m_bIsDocked
 
bool m_bProcessingInputEvent
 
Type m_eType
 
KviTalHBoxm_pButtonBox
 
KviConsoleWindowm_pConsole
 
QWidget * m_pFocusHandler
 
QToolButton * m_pHideToolsButton
 
KviInputm_pInput
 
KviIrcViewm_pIrcView
 
QWidget * m_pLastFocusedChild
 
KviTalSplitterm_pSplitter
 
QTextCodec * m_pTextCodec
 
QToolButton * m_pTextEncodingButton
 
KviWindowListItemm_pWindowListItem
 
QString m_szName
 
QString m_szPlainTextCaption
 
QString m_szTextEncoding
 
unsigned long int m_uId
 

Private Slots

void modeSelectorDone ()
 Called when we close the mode editor. More...
 
void removeMasks (KviMaskEditor *pEd, KviPointerList< KviMaskEntry > *pList)
 Removes the masks from the mask editor window. More...
 
void setMode (QString &szMode)
 Called when we select the modes from the mode editor. More...
 
void textViewRightClicked ()
 Called when we right-click the irc view. More...
 
void toggleDoubleView ()
 Toggles the double view mode. More...
 
void toggleListModeEditor ()
 Toggles a list mode editor. More...
 
void toggleListView ()
 Toggles the userlist view. More...
 
void toggleModeEditor ()
 Toggles the mode editor. More...
 
void toggleToolButtons ()
 Toggles tool buttons widget over the listview. More...
 
void topicSelected (const QString &szTopic)
 Called when we select the topic. More...
 

Additional Inherited Members

- Public Slots inherited from KviWindow
void autoRaise ()
 
void dock ()
 
void reloadImages ()
 
void savePropertiesAsDefault ()
 
void undock ()
 
- Protected Slots inherited from KviWindow
void childDestroyed ()
 
void cryptControllerFinished ()
 
void cryptSessionInfoDestroyed ()
 
void systemTextEncodingPopupActivated (QAction *pAction)
 
void textEncodingButtonClicked ()
 
void toggleCryptController ()
 
- Static Protected Attributes inherited from KviWindow
static const char * m_typeTable [TypeCount]
 
- Properties inherited from KviWindow
int KviProperty_ChildFocusOwner
 

Detailed Description

The class which manages a channel.

Member Enumeration Documentation

Holds the limits of the activity in a channel.

Enumerator
Ice 

The limit to be "ice"

VeryCold 

The limit to be "very cold"

Cold 

The limit to be "cold"

Undefined 

The limit to be "undefined"

Hot 

The limit to be "hot"

VeryHot 

The limit to be "very hot"

Holds the state flags of the channel.

Enumerator
HaveAllNames 

Flag for "have all names"

HaveWhoList 

Flag for "have WHO list"

DeadChan 

Flag for "dead channel"

SentWhoRequest 

Flag to set WHO request

SentPart 

Flag to set PART request

Synchronized 

Flag to set SYNC request

NoCloseOnPart 

Flag to set no close on part

SentSyncWhoRequest 

Flag for SYNC request

Constructor & Destructor Documentation

KviChannelWindow::KviChannelWindow ( KviConsoleWindow lpConsole,
const QString &  szName 
)

Constructs the channel object.

Parameters
lpConsoleThe console of the context
szNameThe name of the channel
Returns
KviChannelWindow

References __tr2qs, KviTalToolTip::add(), applyOptions(), KviIconManager::Ban, KviIconManager::BanExcept, KviIconManager::BanUnExcept, buttonContainer(), KviIconManager::ChanAdmin, KviIconManager::ChanMode, KviIconManager::ChanModeHide, KviIconManager::ChanUnAdmin, connect(), KviWindow::connection(), KviWindow::createCryptControllerButton(), KviWindow::createTextEncodingButton(), g_pIconManager, KviIconManager::getBigIcon(), KviIrcConnectionServerInfo::getChannelModeDescription(), KviIconManager::HideDoubleView, KviIconManager::HideListView, KviIconManager::InviteExcept, KviIconManager::InviteUnExcept, KviIconManager::Kick, KviIconManager::KickOff, KVI_CHANNEL_AVERAGE_USERS, KVI_OPTION_BOOL, kvi_time_t, KviWindow::KviInput, KviOption_boolAutoLogChannels, KviTalSplitter, m_iStateFlags, m_joinTime, m_pActionHistory, KviWindow::m_pButtonBox, m_pButtonContainer, m_pDoubleViewButton, KviWindow::m_pHideToolsButton, KviWindow::m_pInput, KviWindow::m_pIrcView, m_pListEditorButtons, m_pListViewButton, m_pMessageView, m_pModeEditor, m_pModeEditorButton, m_pModeWidget, KviWindow::m_pSplitter, m_pTmpHighLighted, m_pTopicWidget, m_pTopSplitter, m_pUserListView, m_pVertSplitter, m_tLastReceivedWhoReply, m_uActionHistoryHotActionCount, KviIrcConnection::registerChannel(), serverInfo(), KviTalHBox::setMargin(), setMode(), KviTalHBox::setSpacing(), KviIconManager::ShowDoubleView, KviIconManager::ShowListView, KviIrcView::startLogging(), KviIrcConnectionServerInfo::supportedListModes(), textViewRightClicked(), toggleDoubleView(), toggleListModeEditor(), toggleListView(), toggleModeEditor(), toggleToolButtons(), topicSelected(), and KviIconManager::UnBan.

KviChannelWindow::~KviChannelWindow ( )

Member Function Documentation

bool KviChannelWindow::activityMeter ( unsigned int *  puActivityValue,
unsigned int *  puActivityTemperature 
)
virtual
void KviChannelWindow::addHighlightedUser ( const QString &  szNick)

Adds a user to the highlight list.

Parameters
szNickThe nickname of the user
Returns
void

References KviUserListView::findEntry(), m_pTmpHighLighted, and m_pUserListView.

void KviChannelWindow::applyOptions ( )
protectedvirtual
bool KviChannelWindow::avatarChanged ( const QString &  szNick)
inline

Returns true if the avatar of a user is changed.

Parameters
szNickThe nickname of the user
Returns
bool

References KviUserListView::avatarChanged().

QFrame* KviChannelWindow::buttonContainer ( )
inlinevirtual

Returns the button container object.

Returns
QFrame *

Reimplemented from KviWindow.

Referenced by KviChannelWindow(), loadProperties(), saveProperties(), and toggleToolButtons().

int KviChannelWindow::chanAdminCount ( )
inline

Returns the number of users with chanadmin status.

Returns
int

References KviUserListView::chanAdminCount().

Referenced by chan_kvs_fnc_admincount().

void KviChannelWindow::channelAction ( const QString &  szNick,
unsigned int  uActionType,
int  iTemperature 
)

Called when someone perform an action in the channel.

Parameters
szNickThe nickname of the user who made the action
uActionTypeThe type of the action
iTemperatureThe temperature of the action
Returns
void

References fixActionHistory(), _KviChannelAction::iTemperature, kvi_unixTime, m_pActionHistory, m_uActionHistoryHotActionCount, _KviChannelAction::szNick, _KviChannelAction::tTime, and _KviChannelAction::uActionType.

Referenced by nickChange(), part(), and userAction().

QString KviChannelWindow::channelModeParam ( char  cMode) const
inline

Returns the value (parameter) for a channel mode (eg. the password for mode k)

Parameters
cModeThe mode
Returns
QString

Referenced by chan_kvs_fnc_getUrl(), chan_kvs_fnc_key(), chan_kvs_fnc_limit(), chan_kvs_fnc_modeParam(), KviModeEditor::commit(), KviModeWidget::editorReturnPressed(), KviModeEditor::KviModeEditor(), and KviIrcServerParser::parseLiteralKick().

int KviChannelWindow::chanOwnerCount ( )
inline

Returns the number of users with chanowner status.

Returns
int

References KviUserListView::chanOwnerCount().

Referenced by chan_kvs_fnc_ownercount().

void KviChannelWindow::checkChannelSync ( )
void KviChannelWindow::clearSentSyncWhoRequest ( )
inline

Clears the sync WHO request flag.

Returns
void

Referenced by KviIrcServerParser::parseNumericEndOfWho().

void KviChannelWindow::closeEvent ( QCloseEvent *  pEvent)
protectedvirtual
bool KviChannelWindow::closeOnPart ( )
inline

Returns true if the channel has to be closed on part.

Returns
bool

Referenced by KviIrcServerParser::parseLiteralPart().

unsigned int KviChannelWindow::count ( )
inline

Returns the number of users.

Returns
unsigned int

References KviUserListView::count().

Referenced by chan_kvs_fnc_usercount(), and KviIrcView::doLinkToolTip().

void KviChannelWindow::enableUserListUpdates ( bool  bEnable)
inline

Enables or disable the userlist updates.

Parameters
bEnableWhether to enable the updates
Returns
void

References KviUserListView::enableUpdates().

Referenced by KviIrcServerParser::parseNumericNames().

bool KviChannelWindow::eventFilter ( QObject *  pObject,
QEvent *  pEvent 
)
protected

Filters the events.

Parameters
pObjectThe object
pEventThe event
Returns
bool

References KviTopicWidget::deactivate(), KviWindow::eventFilter(), and m_pTopicWidget.

void KviChannelWindow::fillCaptionBuffers ( )
protectedvirtual
KviUserListEntry* KviChannelWindow::findEntry ( const QString &  szNick)
inline

Searches for a user in the userlist.

Parameters
szNickThe nickname of the user to find
Returns
KviUserListEntry *

References KviUserListView::findEntry().

Referenced by preprocessMessage().

QString* KviChannelWindow::firstSelectedNickname ( )
inline

Returns the first selected nickname in the userlist.

Returns
QString *

References KviUserListView::firstSelectedNickname().

void KviChannelWindow::fixActionHistory ( )
protected
void KviChannelWindow::getBaseLogFileName ( QString &  szBuffer)
protectedvirtual

Gets the base name for log file.

Parameters
szBufferThe buffer where to save data
Returns
void

Reimplemented from KviWindow.

References KviWindow::connection(), KviWindow::context(), and KviWindow::windowName().

void KviChannelWindow::getChannelActivityStats ( KviChannelActivityStats pStats)
void KviChannelWindow::getChannelModeString ( QString &  szBuffer)

Fills szBuffer with all set channel modes, but without any parameters (eg: lkmi)

Parameters
szBufferThe buffer :)
Returns
void

References m_szChannelMode, and m_szChannelParameterModes.

Referenced by chan_kvs_fnc_mode(), KviIrcView::doLinkToolTip(), fillCaptionBuffers(), and KviTopicWidget::switchMode().

void KviChannelWindow::getChannelModeStringWithEmbeddedParams ( QString &  szBuffer)

Fills szBuffer with all set channel modes and any parameters (eg: mi l:10 k:password)

Parameters
szBufferThe buffer :)
Returns
void

References m_szChannelMode, and m_szChannelParameterModes.

Referenced by KviModeWidget::editorReturnPressed(), and KviModeWidget::refreshModes().

void KviChannelWindow::getConfigGroupName ( QString &  szBuffer)
protectedvirtual

Gets the group name.

Parameters
szBufferThe buffer where to save the data
Returns
void

Reimplemented from KviWindow.

References KviWindow::connection(), KviRuntimeInfo::name(), target(), and KviWindow::windowName().

void KviChannelWindow::getTalkingUsersStats ( QString &  szBuffer,
QStringList &  list,
bool  bPast 
)
protected

Gets the talking user stats to fill in the tooltip.

Parameters
szBufferThe buffer where to store the data
listThe list of talking users
bPastWhether the activity is recent or in the past
Returns
void

References __tr2qs, and KviQString::toHtmlEscaped().

Referenced by getWindowListTipText().

char KviChannelWindow::getUserFlag ( const QString &  szNick)
inline

Returns the flag of a user.

Parameters
szNickThe nick of the user
Returns
char

References KviUserListView::getUserFlag().

Referenced by fillCaptionBuffers().

void KviChannelWindow::getWindowListTipText ( QString &  szBuffer)
virtual
int KviChannelWindow::halfOpCount ( )
inline

Returns the number of users with halfop status.

Returns
int

References KviUserListView::halfOpCount().

Referenced by chan_kvs_fnc_halfopcount().

bool KviChannelWindow::hasAllNames ( )
inline

Returns true if the channel has all names.

Returns
bool

Referenced by KviIrcServerParser::parseNumericEndOfNames(), and KviIrcServerParser::parseNumericNames().

bool KviChannelWindow::hasBanExceptionList ( )
inline

Returns true if the channel has a ban exception list.

Returns
bool
bool KviChannelWindow::hasBanList ( )
inline

Returns true if the channel has a ban list.

Returns
bool
bool KviChannelWindow::hasChannelMode ( char  cMode)
inline

Returns true if the channel has a mode with parameter set (eg. mode k)

Parameters
cModeThe mode
Returns
bool

Referenced by chan_kvs_fnc_getUrl(), chan_kvs_fnc_key(), chan_kvs_fnc_limit(), chan_kvs_fnc_modeParam(), KviModeEditor::commit(), KviModeWidget::editorReturnPressed(), KviModeEditor::KviModeEditor(), and KviIrcServerParser::parseLiteralKick().

bool KviChannelWindow::hasInviteList ( )
inline

Returns true if the channel has an invite list.

Returns
bool
bool KviChannelWindow::hasQuietBanList ( )
inline

Returns true if the channel has a quiet ban list.

Returns
bool
bool KviChannelWindow::hasWhoList ( )
inline
void KviChannelWindow::internalMask ( const QString &  szMask,
bool  bAdd,
const QString &  szSetBy,
unsigned int  uSetAt,
KviPointerList< KviMaskEntry > *  l,
KviMaskEditor **  ppEd,
QString &  szChangeMask 
)
protected

Called when someone sets a mask in the channel's lists.

Parameters
szMaskThe mask set
bAddWhether to add or remove the mask
szSetByWho set the mask
uSetAtThe datetime when the mask was set
lThe list of masks in the channel lists
ppEdThe mask editor window
szChangeMaskIf bAdd is false and this string is set, the mask will be updated instead that removed
Returns
void

References __tr2qs, KviPointerList< T >::append(), KviQString::equalCI(), KviPointerList< T >::first(), KviPointerList< T >::next(), KviPointerList< T >::removeRef(), _KviMaskEntry::szMask, _KviMaskEntry::szSetBy, and _KviMaskEntry::uSetAt.

Referenced by setModeInList().

bool KviChannelWindow::isChanAdmin ( const QString &  szNick,
bool  bAtLeast = false 
)
inline

Returns true if the user is a chan admin.

Parameters
szNickThe nickname of the user to check
bAtLeastWhether the user is at least a chan admin
Returns
bool

References KviUserListView::isChanAdmin().

bool KviChannelWindow::isChanOwner ( const QString &  szNick,
bool  bAtLeast = false 
)
inline

Returns true if the user is a chan owner.

Parameters
szNickThe nickname of the user to check
bAtLeastWhether the user is at least a chan owner
Returns
bool

References KviUserListView::isChanOwner().

bool KviChannelWindow::isDeadChan ( )
inline

Returns true if the channel is dead.

Returns
bool
bool KviChannelWindow::isHalfOp ( const QString &  szNick,
bool  bAtLeast = false 
)
inline

Returns true if the user is a half operator.

Parameters
szNickThe nickname of the user to check
bAtLeastWhether the user is at least a half operator
Returns
bool

References KviUserListView::isHalfOp().

bool KviChannelWindow::isHighlightedUser ( const QString &  szNick)
inline

Returns true if the user is highlighted.

Parameters
szNickThe nickname of the user
Returns
bool
bool KviChannelWindow::isMeChanAdmin ( bool  bAtLeast = false)

Returns true if we are a chan admin.

Parameters
bAtLeastWhether we are at least a chan admin
Returns
bool
bool KviChannelWindow::isMeChanOwner ( bool  bAtLeast = false)

Returns true if we are a chan owner.

Parameters
bAtLeastWhether we are at least a chan owner
Returns
bool
bool KviChannelWindow::isMeHalfOp ( bool  bAtLeast = false)

Returns true if we are a half operator.

Parameters
bAtLeastWhether we are at least a half operator
Returns
bool

Referenced by KviMaskEditor::addClicked(), KviMaskEditor::itemDoubleClicked(), KviModeWidget::mouseDoubleClickEvent(), KviTopicWidget::switchMode(), KviModeEditor::updateOpStatus(), and KviMaskEditor::updateOpStatus().

bool KviChannelWindow::isMeIrcOp ( bool  bAtLeast = false)

Returns true if we are an ircop.

Parameters
bAtLeastWhether we are at least an ircop
Returns
bool
bool KviChannelWindow::isMeOp ( bool  bAtLeast = false)

Returns true if we are an operator.

Parameters
bAtLeastWhether we are at least an operator
Returns
bool

Referenced by KviIrcConnectionRequestQueue::timerSlot().

bool KviChannelWindow::isMeUserOp ( bool  bAtLeast = false)

Returns true if we are a user operator.

Parameters
bAtLeastWhether we are at least a user operator
Returns
bool
bool KviChannelWindow::isMeVoice ( bool  bAtLeast = false)

Returns true if we are a voice.

Parameters
bAtLeastWhether we are at least a voice
Returns
bool
bool KviChannelWindow::isOn ( const QString &  szNick)
inline

Returns true if the user is on the channel.

Parameters
szNickThe nickname of the user
Returns
bool

References KviUserListView::findEntry().

Referenced by chan_kvs_fnc_ison(), KviInputEditor::checkWordSpelling(), and getChannelActivityStats().

bool KviChannelWindow::isOp ( const QString &  szNick,
bool  bAtLeast = false 
)
inline

Returns true if the user is an operator.

Parameters
szNickThe nickname of the user to check
bAtLeastWhether the user is at least an operator
Returns
bool

References KviUserListView::isOp().

bool KviChannelWindow::isUserOp ( const QString &  szNick,
bool  bAtLeast = false 
)
inline

Returns true if the user is a user operator.

Parameters
szNickThe nickname of the user to check
bAtLeastWhether the user is at least a user operator
Returns
bool

References KviUserListView::isUserOp().

bool KviChannelWindow::isVoice ( const QString &  szNick,
bool  bAtLeast = false 
)
inline

Returns true if the user is a voice.

Parameters
szNickThe nickname of the user to check
bAtLeastWhether the user is at least a voice
Returns
bool

References KviUserListView::isVoice().

KviUserListEntry* KviChannelWindow::join ( const QString &  szNick,
const QString &  szUser = QString(),
const QString &  szHost = QString(),
int  iFlags = 0 
)
inline

Called when a user joins the channel.

Parameters
szNickThe nickname of the user
szUserThe username of the user
szHostThe hostname of the user
iFlagsThe flags of the user
Returns
KviUserListEntry *

References KviUserListView::join(), and szHost.

Referenced by KviIrcServerParser::parseLiteralJoin(), and KviIrcServerParser::parseNumericNames().

kvi_time_t KviChannelWindow::lastReceivedWhoReply ( )
inline

Returns the time of the last received WHO reply.

Returns
kvi_time_t

Referenced by KviIrcConnection::heartbeat().

QByteArray KviChannelWindow::loadLogFile ( const QString &  szFileName,
bool  bGzip 
)

Loads a log file.

It opens a logfile, gzipped or not, and returns the content in a buffer

Parameters
szFileNameThe filename of the log file
bGzipWhether the log file is gzipped
Returns
QByteArray

Referenced by pasteLastLog().

void KviChannelWindow::loadProperties ( KviConfigurationFile pCfg)
protectedvirtual
void KviChannelWindow::lostUserFocus ( )
virtual

Called when the channel losts the focus by the user.

Returns
void

Reimplemented from KviWindow.

References KviIrcView::clearLineMark(), KviIrcView::hasLineMark(), KviWindow::lostUserFocus(), and m_pMessageView.

unsigned int KviChannelWindow::maskCount ( char  cMode)
inline

Returns the number of masks is a channel mode list.

Returns
unsigned int

Referenced by chan_kvs_fnc_bancount(), chan_kvs_fnc_banexceptioncount(), chan_kvs_fnc_invitecount(), and chan_kvs_fnc_maskcount().

KviIrcView* KviChannelWindow::messageView ( ) const
inline

Returns the irc view object.

Returns
KviIrcView *

Referenced by window_kvs_cmd_clearOutput().

KviPointerList<KviMaskEntry>* KviChannelWindow::modeMasks ( char  cMode)
inline
void KviChannelWindow::modeSelectorDone ( )
privateslot

Called when we close the mode editor.

References m_pModeEditor, and toggleModeEditor().

Referenced by toggleModeEditor().

int KviChannelWindow::myFlags ( )

Returns our flags.

Returns
int

Referenced by KviIrcServerParser::parseNumericNames().

QPixmap * KviChannelWindow::myIconPtr ( )
protectedvirtual

Returns the correct icon for the channel.

Returns
QPixmap *

Reimplemented from KviWindow.

References KviIconManager::Channel, DeadChan, KviIconManager::DeadChannel, g_pIconManager, KviIconManager::getSmallIcon(), and m_iStateFlags.

const QString& KviChannelWindow::nameWithUserFlag ( )
inline

Returns the name of the channel with user flags.

Returns
const QString &
QString* KviChannelWindow::nextSelectedNickname ( )
inline

Returns the next selected nickname in the userlist.

Returns
QString *

References KviUserListView::nextSelectedNickname().

bool KviChannelWindow::nickChange ( const QString &  szOldNick,
const QString &  szNewNick 
)

Called when someone changes his nick.

Parameters
szOldNickThe old nickname of the user
szNewNickThe new nickname of the user
Returns
bool

References channelAction(), kvi_getUserActionTemperature(), KVI_USERACTION_NICK, m_pModeLists, m_pUserListView, KviUserListView::nickChange(), and setModeInList().

int KviChannelWindow::opCount ( )
inline

Returns the number of users with op status.

Returns
int

References KviUserListView::opCount().

Referenced by chan_kvs_fnc_opcount().

void KviChannelWindow::opStatusChanged ( )
signal

Emitted when our op status change.

Returns
void

Referenced by setOp().

void KviChannelWindow::outputMessage ( int  iMsgType,
const QString &  szMsg,
const QDateTime &  datetime = QDateTime() 
)
virtual

Outputs a message to the channel window.

Parameters
iMsgTypeThe type of the message
szMsgThe message :)
Returns
void

References KviWindow::internalOutput(), KviWindow::m_pIrcView, m_pMessageView, KviIrcView::messageShouldGoToMessageView(), and preprocessMessage().

Referenced by ownAction(), and pasteLastLog().

void KviChannelWindow::ownAction ( const QString &  szBuffer)
virtual
void KviChannelWindow::ownMessage ( const QString &  szBuffer,
bool  bUserFeedback = true 
)
virtual
bool KviChannelWindow::part ( const QString &  szNick)

Called when someone parts the channel.

Parameters
szNickThe nickname of the user who parts
Returns
bool

References channelAction(), kvi_getUserActionTemperature(), KVI_USERACTION_PART, m_pModeLists, m_pUserListView, KviUserListView::part(), and setModeInList().

Referenced by KviIrcServerParser::parseLiteralKick(), and KviIrcServerParser::parseLiteralPart().

void KviChannelWindow::partMessageSent ( bool  bCloseOnPart = true,
bool  bShowMessage = true 
)

Called when we want to part a channel.

Parameters
bCloseOnPartWhether to leave channel open after part
bShowMessageWhether to show part message
Returns
void

References __tr2qs, KVI_OUT_SYSTEMMESSAGE, m_iStateFlags, NoCloseOnPart, KviWindow::outputNoFmt(), and SentPart.

Referenced by closeEvent(), and KviKvsCoreSimpleCommands::KVSCSC().

void KviChannelWindow::pasteLastLog ( )

Pastes the most recent channel log into the buffer.

It searches for the most recent channel log of the channel we have just joined, and pastes into the buffer the last N lines, where N is get from the options

Returns
void

References __tr2qs, KviWindow::console(), KviConsoleWindow::currentNetworkName(), g_pApp, KviApplication::getLocalKvircDirectory(), KVI_OPTION_UINT, KVI_OUT_CHANPRIVMSG, KviOption_uintDaysIntervalToPasteOnChannelJoin, KviOption_uintLinesToPasteOnChannelJoin, loadLogFile(), KviApplication::Log, outputMessage(), target(), and u.

Referenced by KviIrcConnection::createChannel().

QString KviChannelWindow::plainChannelMode ( )
inline

Returns only the plain (parameter-less) channel modes (eg: mi)

Returns
QString

Referenced by KviModeEditor::commit(), KviModeEditor::KviModeEditor(), and KviTopicWidget::switchMode().

void KviChannelWindow::prependUserFlag ( const QString &  szNick,
QString &  szBuffer 
)
inline

Prepends the user flag to the nickname.

Parameters
szNickThe nickname of the user
szBufferThe buffer :)
Returns
void

References KviUserListView::prependUserFlag().

void KviChannelWindow::preprocessMessage ( QString &  szMessage)
protectedvirtual

Preprocess message stripping control bytes.

Parameters
szMessageThe message :)
Returns
void

Reimplemented from KviWindow.

References findEntry(), serverInfo(), KviControlCodes::stripControlBytes(), and KviIrcConnectionServerInfo::supportedChannelTypes().

Referenced by outputMessage().

void KviChannelWindow::removeHighlightedUser ( const QString &  szNick)

Removes a user from the highlight list.

Parameters
szNickThe nickname of the user
Returns
void

References m_pTmpHighLighted.

void KviChannelWindow::removeMasks ( KviMaskEditor pEd,
KviPointerList< KviMaskEntry > *  pList 
)
privateslot
void KviChannelWindow::resizeEvent ( QResizeEvent *  )
protectedvirtual
void KviChannelWindow::saveProperties ( KviConfigurationFile pCfg)
protectedvirtual
int KviChannelWindow::selectedCount ( )
inline

Returns the number of selected users.

Returns
int

References KviUserListView::selectedCount().

bool KviChannelWindow::sentListRequest ( char  cMode)
inline
bool KviChannelWindow::sentSyncWhoRequest ( )
inline

Returns true if we have sent the sync WHO request.

Returns
bool

Referenced by KviIrcServerParser::parseNumericEndOfWho(), KviIrcServerParser::parseNumericWhoReply(), and KviIrcServerParser::parseNumericWhospcrpl().

bool KviChannelWindow::sentWhoRequest ( )
inline

Returns true if we have sent the WHO request.

Returns
bool
KviIrcConnectionServerInfo * KviChannelWindow::serverInfo ( )
void KviChannelWindow::setAliveChan ( )
bool KviChannelWindow::setChanAdmin ( const QString &  szNick,
bool  bChanAdmin 
)
inline

Sets the chan admin mode.

Parameters
szNickThe nick to set the mode on
bChanAdminWhether to set or unset the mode on the user
Returns
bool

References KviUserListView::setChanAdmin().

Referenced by KviIrcServerParser::parseChannelMode().

void KviChannelWindow::setChannelMode ( char  cMode,
bool  bAdd 
)

Sets a plain (parameter-less) channel mode, (eg: +m)

Parameters
cModeThe mode to set
bAddWhether to add or remove the mode
Returns
void

References m_szChannelMode, KviWindow::updateCaption(), and updateModeLabel().

Referenced by KviIrcServerParser::parseChannelMode().

void KviChannelWindow::setChannelModeWithParam ( char  cMode,
QString &  szParam 
)

Sets a channel mode with a parameter; an empty parameter unsets the mode (eg: +k password)

Parameters
cModeThe mode
szParamThe parameter for the mode
Returns
void

References m_szChannelParameterModes, KviWindow::updateCaption(), and updateModeLabel().

Referenced by KviIrcServerParser::parseChannelMode().

bool KviChannelWindow::setChanOwner ( const QString &  szNick,
bool  bChanOwner 
)
inline

Sets the chan owner mode.

Parameters
szNickThe nick to set the mode on
bChanOwnerWhether to set or unset the mode on the user
Returns
bool

References KviUserListView::setChanOwner().

Referenced by KviIrcServerParser::parseChannelMode().

void KviChannelWindow::setDeadChan ( )
bool KviChannelWindow::setHalfOp ( const QString &  szNick,
bool  bHalfOp,
bool   
)
inline

Sets the half operator mode.

Parameters
szNickThe nick to set the mode on
bHalfOpWhether to set or unset the mode on the user
Returns
bool

References KviUserListView::setHalfOp().

void KviChannelWindow::setHasAllNames ( )
inline

Sets the existence of all names.

Returns
void

Referenced by KviIrcServerParser::parseNumericEndOfNames().

void KviChannelWindow::setHasWhoList ( )
inline

Sets the existence of the WHO list.

Returns
void

Referenced by KviIrcServerParser::parseNumericEndOfWho().

void KviChannelWindow::setLastReceivedWhoReply ( kvi_time_t  tTime)
inline

Sets the time of the last received WHO reply.

Parameters
tTimeThe source time
Returns
void

Referenced by KviIrcServerParser::parseNumericEndOfWho().

void KviChannelWindow::setListRequestDone ( char  cMode)
inline

Clears the "sent request" flag for a specific chanel mode.

Returns
void

Referenced by KviIrcServerParser::parseNumeric368(), KviIrcServerParser::parseNumericEndOfQuietList(), and KviIrcServerParser::parseNumericOftcEndOfQuietList().

void KviChannelWindow::setMode ( QString &  szMode)
privateslot

Called when we select the modes from the mode editor.

Parameters
szModeThe modes selected, including any plus/minus sign and parameters
Returns
void

References KviWindow::connection(), KviIrcConnection::encodeText(), KviWindow::m_szName, and KviIrcConnection::sendFmtData().

Referenced by KviChannelWindow(), and toggleModeEditor().

void KviChannelWindow::setModeInList ( char  cMode,
const QString &  szMask,
bool  bAdd,
const QString &  szSetBy,
unsigned int  uSetAt,
QString  szChangeMask = QString() 
)

Called when someone sets a channel mode that is stored in a list; these modes require a parameter that is tipically a mask.

Examples:

  • b: ban with mask
  • e: ban exception with mask
  • I: invite exception with mask
  • q: channel owner with nick (unreal) or quiet ban (ircd-seven)
  • g: spam filter word (inspircd)
    Parameters
    cModeThe type of the mask
    szMaskThe mask set (more generically, the parameter)
    bAddWhether to add or remove the mask
    szSetByWho set the mask
    uSetAtThe datetime when the mask was set
    szChangeMaskIf bAdd is false and this string is set, the mask will be updated instead that removed
    Returns
    void

References KviWindow::connection(), KviPointerList< T >::count(), internalMask(), m_pListEditors, m_pModeLists, m_pUserListView, KviPointerList< T >::setAutoDelete(), and KviUserListView::setMaskEntries().

Referenced by nickChange(), KviIrcServerParser::parseChannelMode(), KviIrcServerParser::parseNumeric367(), KviIrcServerParser::parseNumericOftcQuietList(), KviIrcServerParser::parseNumericQuietList(), and part().

bool KviChannelWindow::setOp ( const QString &  szNick,
bool  bOp,
bool  bIsMe 
)

Sets the operator mode.

Parameters
szNickThe nick to set the mode on
bOpWhether to set or unset the mode on the user
bIsMeWhether the user opped is us
Returns
bool

References m_pUserListView, opStatusChanged(), and KviUserListView::setOp().

void KviChannelWindow::setSentListRequest ( char  cMode)
inline

Sets the "sent request" flag for a specific channel mode.

Returns
void

Referenced by KviIrcConnectionRequestQueue::timerSlot().

void KviChannelWindow::setSentSyncWhoRequest ( )
inline

Sets the sync WHO request flag.

Returns
void

Referenced by KviIrcConnection::heartbeat().

void KviChannelWindow::setSentWhoRequest ( )
inline

Sets the WHO request flag.

Returns
void

Referenced by KviIrcConnectionRequestQueue::timerSlot().

bool KviChannelWindow::setUserOp ( const QString &  szNick,
bool  bUserOp,
bool   
)
inline

Sets the user operator mode.

Parameters
szNickThe nick to set the mode on
bUserOpWhether to set or unset the mode on the user
Returns
bool

References KviUserListView::setUserOp().

bool KviChannelWindow::setVoice ( const QString &  szNick,
bool  bVoice,
bool   
)
inline

Sets the voice mode.

Parameters
szNickThe nick to set the mode on
bVoiceWhether to set or unset the mode on the user
Returns
bool

References KviUserListView::setVoice().

void KviChannelWindow::showDoubleView ( bool  bShow)
protected

Splits the channel view into two views.

The upper one will be used to show all system messages like join, parts, quits, topics and so on, while the lower one will be used to show the users messages.

Parameters
bShowWhether to show the double view
Returns
void

References connect(), KviIrcView::joinMessagesFrom(), m_pDoubleViewButton, KviWindow::m_pIrcView, m_pMessageView, m_privateBackground, m_pVertSplitter, m_VertSplitterSizesList, KviPixmap::pixmap(), KviIrcView::setMasterView(), KviIrcView::setPrivateBackgroundPixmap(), KviIrcView::splitMessagesTo(), and textViewRightClicked().

Referenced by loadProperties(), and toggleDoubleView().

QSize KviChannelWindow::sizeHint ( ) const
virtual
virtual const QString& KviChannelWindow::target ( )
inlinevirtual

Returns the name of the channel.

Returns
const QString &

Reimplemented from KviWindow.

References KviWindow::windowName().

Referenced by KviMaskInputDialog::accept(), getConfigGroupName(), pasteLastLog(), and KviIrcConnectionRequestQueue::timerSlot().

void KviChannelWindow::textViewRightClicked ( )
privateslot

Called when we right-click the irc view.

Trigger the OnChannelPopupRequest event

Returns
void

References KviEvent_OnChannelPopupRequest, and KVS_TRIGGER_EVENT_0.

Referenced by KviChannelWindow(), and showDoubleView().

void KviChannelWindow::toggleDoubleView ( )
privateslot

Toggles the double view mode.

Returns
void

References m_pDoubleViewButton, m_pMessageView, and showDoubleView().

Referenced by KviChannelWindow().

void KviChannelWindow::toggleListModeEditor ( )
privateslot
void KviChannelWindow::toggleListView ( )
privateslot

Toggles the userlist view.

Returns
void

References m_pListViewButton, KviWindow::m_pSplitter, m_pUserListView, and m_SplitterSizesList.

Referenced by KviChannelWindow().

void KviChannelWindow::toggleModeEditor ( )
privateslot
void KviChannelWindow::toggleToolButtons ( )
privateslot

Toggles tool buttons widget over the listview.

Returns
void

References buttonContainer(), g_pIconManager, KviIconManager::getBigIcon(), KviWindow::m_pHideToolsButton, and KviWindow::toggleButtonContainer().

Referenced by KviChannelWindow(), and loadProperties().

void KviChannelWindow::topicSelected ( const QString &  szTopic)
privateslot
KviTopicWidget* KviChannelWindow::topicWidget ( )
inline
void KviChannelWindow::triggerCreationEvents ( )
protectedvirtual

Trigger the OnChannelWindowCreated event.

Returns
void

Reimplemented from KviWindow.

References KviEvent_OnChannelWindowCreated, and KVS_TRIGGER_EVENT_0.

void KviChannelWindow::unhighlight ( )

Unhighlights the windowlist item.

Returns
void

References KviWindow::m_pWindowListItem, and KviWindowListItem::unhighlight().

void KviChannelWindow::updateModeLabel ( )
void KviChannelWindow::userAction ( KviIrcMask user,
unsigned int  uActionType 
)
void KviChannelWindow::userAction ( const QString &  szNick,
unsigned int  uActionType 
)

Perform a user action in the channel.

Parameters
szNickThe nickname of the user who made the action
uActionTypeThe type of the action
Returns
void

References channelAction(), kvi_getUserActionTemperature(), m_pUserListView, and KviUserListView::userAction().

void KviChannelWindow::userAction ( const QString &  szNick,
const QString &  szUser,
const QString &  szHost,
unsigned int  uActionType 
)

Perform a user action in the channel.

Parameters
szNickThe nickname of the user who made the action
szUserThe username of the user who made the action
szHostThe hostname of the user who made the action
uActionTypeThe type of the action
Returns
void

References channelAction(), kvi_getUserActionTemperature(), m_pUserListView, and KviUserListView::userAction().

KviUserListView* KviChannelWindow::userListView ( )
inline
int KviChannelWindow::userOpCount ( )
inline

Returns the number of users with userop status.

Returns
int

References KviUserListView::userOpCount().

Referenced by chan_kvs_fnc_useropcount().

int KviChannelWindow::voiceCount ( )
inline

Returns the number of users with voice status.

Returns
int

References KviUserListView::voiceCount().

Referenced by chan_kvs_fnc_voicecount().

Member Data Documentation

int KviChannelWindow::m_iStateFlags
protected
QDateTime KviChannelWindow::m_joinTime
protected
KviPointerList<KviChannelAction>* KviChannelWindow::m_pActionHistory
protected
KviTalHBox* KviChannelWindow::m_pButtonContainer
protected

Referenced by KviChannelWindow().

QToolButton* KviChannelWindow::m_pDoubleViewButton
protected
QMap<char, KviWindowToolPageButton *> KviChannelWindow::m_pListEditorButtons
protected
QMap<char, KviMaskEditor *> KviChannelWindow::m_pListEditors
protected
KviWindowToolPageButton* KviChannelWindow::m_pListViewButton
protected
KviIrcView* KviChannelWindow::m_pMessageView
protected
KviModeEditor* KviChannelWindow::m_pModeEditor
protected
KviWindowToolPageButton* KviChannelWindow::m_pModeEditorButton
protected
QMap<char, KviPointerList<KviMaskEntry> *> KviChannelWindow::m_pModeLists
protected
KviModeWidget* KviChannelWindow::m_pModeWidget
protected
KviPixmap KviChannelWindow::m_privateBackground
protected
QStringList* KviChannelWindow::m_pTmpHighLighted
protected
KviTopicWidget* KviChannelWindow::m_pTopicWidget
protected
KviTalSplitter* KviChannelWindow::m_pTopSplitter
protected
KviUserListView* KviChannelWindow::m_pUserListView
protected
KviTalSplitter* KviChannelWindow::m_pVertSplitter
protected
QList<int> KviChannelWindow::m_SplitterSizesList
protected
QString KviChannelWindow::m_szChannelMode
protected
QMap<char, QString> KviChannelWindow::m_szChannelParameterModes
protected
QString KviChannelWindow::m_szNameWithUserFlag
protected

Referenced by fillCaptionBuffers().

QString KviChannelWindow::m_szSentModeRequests
protected
kvi_time_t KviChannelWindow::m_tLastReceivedWhoReply
protected

Referenced by KviChannelWindow().

unsigned int KviChannelWindow::m_uActionHistoryHotActionCount
protected
QList<int> KviChannelWindow::m_VertSplitterSizesList
protected

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