KVIrc 5.2.6
Developer APIs
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...
 

Public Slots

void toggleDoubleView ()
 Toggles the double view mode.
 
- Public Slots inherited from KviWindow
void autoRaise ()
 
void dock ()
 
void reloadImages ()
 
void savePropertiesAsDefault ()
 
void undock ()
 

Signals

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

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

int m_iStateFlags
 
QDateTime m_joinTime
 
QList< KviChannelAction * > m_lActionHistory
 
std::map< char, KviWindowToolPageButton * > m_ListEditorButtons
 
std::map< char, KviMaskEditor * > m_ListEditors
 
std::map< char, std::vector< KviMaskEntry * > > m_ModeLists
 
KviTalHBoxm_pButtonContainer
 
QToolButton * m_pDoubleViewButton
 
KviWindowToolPageButtonm_pListViewButton
 
KviIrcViewm_pMessageView
 
KviModeEditorm_pModeEditor
 
KviWindowToolPageButtonm_pModeEditorButton
 
KviModeWidgetm_pModeWidget
 
KviPixmap m_privateBackground
 
QStringList * m_pTmpHighLighted
 
KviTopicWidgetm_pTopicWidget
 
KviTalSplitterm_pTopSplitter
 
KviUserListViewm_pUserListView
 
KviTalSplitterm_pVertSplitter
 
QList< int > m_SplitterSizesList
 
QString m_szChannelMode
 
std::map< 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.
 
void removeMasks (KviMaskEditor *pEd, const std::vector< KviMaskEntry * > &pList)
 Removes the masks from the mask editor window.
 
void setMode (const QString &szMode)
 Called when we select the modes from the mode editor.
 
void textViewRightClicked ()
 Called when we right-click the irc view.
 
void toggleListModeEditor ()
 Toggles a list mode editor.
 
void toggleListView ()
 Toggles the userlist view.
 
void toggleModeEditor ()
 Toggles the mode editor.
 
void toggleToolButtons ()
 Toggles tool buttons widget over the listview.
 
void topicSelected (const QString &szTopic)
 Called when we select the topic.
 

Additional Inherited Members

- 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

◆ ActivityLimit

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"

◆ StateFlag

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::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, KviWindow::Channel, KviIconManager::ChanUnAdmin, connect(), KviWindow::connection(), KviWindow::createCryptControllerButton(), KviWindow::createTextEncodingButton(), g_pIconManager, 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, KviOption_boolPasteLastLogOnChannelJoin, KviTalSplitter, KviWindow::KviWindow(), m_iStateFlags, m_joinTime, m_ListEditorButtons, KviWindow::m_pButtonBox, m_pButtonContainer, m_pDoubleViewButton, KviWindow::m_pHideToolsButton, KviWindow::m_pInput, KviWindow::m_pIrcView, 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, KviWindow::pasteLastLog(), KviIrcConnection::registerChannel(), serverInfo(), setMode(), KviIconManager::ShowDoubleView, KviIconManager::ShowListView, KviIrcConnectionServerInfo::supportedListModes(), textViewRightClicked(), toggleDoubleView(), toggleListModeEditor(), toggleListView(), toggleModeEditor(), toggleToolButtons(), topicSelected(), and KviIconManager::UnBan.

Referenced by myFlags().

◆ ~KviChannelWindow()

Member Function Documentation

◆ activityMeter()

bool KviChannelWindow::activityMeter ( unsigned int * puActivityValue,
unsigned int * puActivityTemperature )
overridevirtual

◆ addHighlightedUser()

void KviChannelWindow::addHighlightedUser ( const QString & szNick)

Adds a user to the highlight list.

Parameters
szNickThe nickname of the user
Returns
void

References m_pTmpHighLighted, and m_pUserListView.

◆ applyOptions()

void KviChannelWindow::applyOptions ( )
overrideprotectedvirtual

Applies the options.

Returns
void

Reimplemented from KviWindow.

References KviWindow::applyOptions(), m_pMessageView, m_pModeWidget, m_pTopicWidget, and m_pUserListView.

Referenced by KviChannelWindow().

◆ avatarChanged()

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

◆ buttonContainer()

QFrame * KviChannelWindow::buttonContainer ( )
inlineoverridevirtual

Returns the button container object.

Returns
QFrame *

Reimplemented from KviWindow.

References m_pButtonContainer.

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

◆ chanAdminCount()

int KviChannelWindow::chanAdminCount ( )
inline

Returns the number of users with chanadmin status.

Returns
int

References m_pUserListView.

Referenced by chan_kvs_fnc_admincount().

◆ channelAction()

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_lActionHistory, m_uActionHistoryHotActionCount, KviChannelAction::szNick, KviChannelAction::tTime, and KviChannelAction::uActionType.

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

◆ channelModeParam()

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

References m_szChannelParameterModes.

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

◆ chanOwnerCount()

int KviChannelWindow::chanOwnerCount ( )
inline

Returns the number of users with chanowner status.

Returns
int

References m_pUserListView.

Referenced by chan_kvs_fnc_ownercount().

◆ checkChannelSync()

◆ clearSentSyncWhoRequest()

void KviChannelWindow::clearSentSyncWhoRequest ( )
inline

Clears the sync WHO request flag.

Returns
void

References m_iStateFlags, and SentSyncWhoRequest.

Referenced by KviIrcServerParser::parseNumericEndOfWho().

◆ closeEvent()

◆ closeOnPart()

bool KviChannelWindow::closeOnPart ( )
inline

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

Returns
bool

References m_iStateFlags, and NoCloseOnPart.

Referenced by KviIrcServerParser::parseLiteralPart().

◆ count()

unsigned int KviChannelWindow::count ( )
inline

Returns the number of users.

Returns
unsigned int

References m_pUserListView.

Referenced by chan_kvs_fnc_usercount().

◆ enableUserListUpdates()

void KviChannelWindow::enableUserListUpdates ( bool bEnable)
inline

Enables or disable the userlist updates.

Parameters
bEnableWhether to enable the updates
Returns
void

References m_pUserListView.

Referenced by KviIrcServerParser::parseNumericNames().

◆ eventFilter()

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

Filters the events.

Parameters
pObjectThe object
pEventThe event
Returns
bool

References KviWindow::eventFilter(), and m_pTopicWidget.

◆ fillCaptionBuffers()

void KviChannelWindow::fillCaptionBuffers ( )
overrideprotectedvirtual

◆ findEntry()

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

Referenced by preprocessMessage().

◆ firstSelectedNickname()

QString * KviChannelWindow::firstSelectedNickname ( )
inline

Returns the first selected nickname in the userlist.

Returns
QString *

References m_pUserListView.

◆ fixActionHistory()

◆ getBaseLogFileName()

void KviChannelWindow::getBaseLogFileName ( QString & szBuffer)
overrideprotectedvirtual

Gets the base name for log file.

Parameters
szBufferThe buffer where to save data
Returns
void

Reimplemented from KviWindow.

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

◆ getChannelActivityStats()

◆ getChannelModeString()

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, m_szChannelParameterModes, and szBuffer.

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

◆ getChannelModeStringWithEmbeddedParams()

QString KviChannelWindow::getChannelModeStringWithEmbeddedParams ( )

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

Parameters
szBufferThe buffer :)
Returns
void

References m_szChannelMode, m_szChannelParameterModes, and szBuffer.

◆ getConfigGroupName()

void KviChannelWindow::getConfigGroupName ( QString & szBuffer)
overrideprotectedvirtual

Gets the group name.

Parameters
szBufferThe buffer where to save the data
Returns
void

Reimplemented from KviWindow.

References KviWindow::connection(), szBuffer, target(), and KviWindow::windowName().

◆ getTalkingUsersStats()

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, szBuffer, and KviQString::toHtmlEscaped().

Referenced by getWindowListTipText().

◆ getUserFlag()

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

Returns the flag of a user.

Parameters
szNickThe nick of the user
Returns
char

References m_pUserListView.

Referenced by fillCaptionBuffers().

◆ getWindowListTipText()

◆ halfOpCount()

int KviChannelWindow::halfOpCount ( )
inline

Returns the number of users with halfop status.

Returns
int

References m_pUserListView.

Referenced by chan_kvs_fnc_halfopcount().

◆ hasAllNames()

bool KviChannelWindow::hasAllNames ( )
inline

Returns true if the channel has all names.

Returns
bool

References HaveAllNames, and m_iStateFlags.

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

◆ hasBanExceptionList()

bool KviChannelWindow::hasBanExceptionList ( )
inline

Returns true if the channel has a ban exception list.

Returns
bool

References m_ModeLists.

◆ hasBanList()

bool KviChannelWindow::hasBanList ( )
inline

Returns true if the channel has a ban list.

Returns
bool

References m_ModeLists.

◆ hasChannelMode()

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

References m_szChannelParameterModes.

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

◆ hasInviteList()

bool KviChannelWindow::hasInviteList ( )
inline

Returns true if the channel has an invite list.

Returns
bool

References m_ModeLists.

◆ hasQuietBanList()

bool KviChannelWindow::hasQuietBanList ( )
inline

Returns true if the channel has a quiet ban list.

Returns
bool

References m_ModeLists.

◆ hasWhoList()

bool KviChannelWindow::hasWhoList ( )
inline

Returns true if the channel has a WHO list.

Returns
bool

References HaveWhoList, and m_iStateFlags.

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

◆ internalMask()

void KviChannelWindow::internalMask ( const QString & szMask,
bool bAdd,
const QString & szSetBy,
unsigned int uSetAt,
std::vector< 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, e, KviQString::equalCI(), KviMaskEntry::szMask, KviMaskEntry::szSetBy, and KviMaskEntry::uSetAt.

Referenced by setModeInList().

◆ isChanAdmin()

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

◆ isChanOwner()

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

◆ isDeadChan()

bool KviChannelWindow::isDeadChan ( )
inline

Returns true if the channel is dead.

Returns
bool

References DeadChan, and m_iStateFlags.

◆ isHalfOp()

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

◆ isHighlightedUser()

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

Returns true if the user is highlighted.

Parameters
szNickThe nickname of the user
Returns
bool

References m_pTmpHighLighted.

◆ isMeChanAdmin()

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

◆ isMeChanOwner()

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

◆ isMeHalfOp()

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 KviTopicWidget::switchMode().

◆ isMeIrcOp()

bool KviChannelWindow::isMeIrcOp ( bool bAtLeast = false)

Returns true if we are an ircop.

Parameters
bAtLeastWhether we are at least an ircop
Returns
bool

◆ isMeOp()

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().

◆ isMeUserOp()

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

References channelAction(), nickChange(), part(), szHost, and userAction().

◆ isMeVoice()

bool KviChannelWindow::isMeVoice ( bool bAtLeast = false)

Returns true if we are a voice.

Parameters
bAtLeastWhether we are at least a voice
Returns
bool

◆ isOn()

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

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

◆ isOp()

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

◆ isUserOp()

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

◆ isVoice()

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

◆ join()

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 m_pUserListView, and szHost.

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

◆ lastClickedView()

KviIrcView * KviChannelWindow::lastClickedView ( ) const
overridevirtual

Returns the KviIrcView that was last clicked in this window.

Acts as view() except for split view windows See also: view()

Returns
KviIrcView *

Reimplemented from KviWindow.

References KviWindow::m_pIrcView, and m_pMessageView.

◆ lastReceivedWhoReply()

kvi_time_t KviChannelWindow::lastReceivedWhoReply ( )
inline

Returns the time of the last received WHO reply.

Returns
kvi_time_t

References kvi_time_t, and m_tLastReceivedWhoReply.

Referenced by KviIrcConnection::heartbeat().

◆ loadProperties()

◆ lostUserFocus()

void KviChannelWindow::lostUserFocus ( )
overridevirtual

Called when the channel losts the focus by the user.

Returns
void

Reimplemented from KviWindow.

References KviWindow::lostUserFocus(), and m_pMessageView.

◆ maskCount()

size_t KviChannelWindow::maskCount ( char cMode) const
inline

Returns the number of masks is a channel mode list.

Returns
size_t

References modeMasks().

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

◆ messageView()

KviIrcView * KviChannelWindow::messageView ( ) const
inline

◆ modeMasks()

const std::vector< KviMaskEntry * > & KviChannelWindow::modeMasks ( char cMode) const
inline

◆ modeSelectorDone

void KviChannelWindow::modeSelectorDone ( )
privateslot

Called when we close the mode editor.

References m_pModeEditor, and toggleModeEditor().

Referenced by toggleModeEditor().

◆ myFlags()

int KviChannelWindow::myFlags ( )

Returns our flags.

Returns
int

References KviWindow::connection(), KviChannelWindow(), m_pUserListView, and myFlags().

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

◆ myIconPtr()

QPixmap * KviChannelWindow::myIconPtr ( )
overrideprotectedvirtual

Returns the correct icon for the channel.

Returns
QPixmap *

Reimplemented from KviWindow.

References KviIconManager::Channel, DeadChan, KviIconManager::DeadChannel, g_pIconManager, and m_iStateFlags.

◆ nameWithUserFlag()

const QString & KviChannelWindow::nameWithUserFlag ( )
inline

Returns the name of the channel with user flags.

Returns
const QString &

References m_szNameWithUserFlag.

◆ nextSelectedNickname()

QString * KviChannelWindow::nextSelectedNickname ( )
inline

Returns the next selected nickname in the userlist.

Returns
QString *

References m_pUserListView.

◆ nickChange()

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_ModeLists, m_pUserListView, and setModeInList().

Referenced by isMeUserOp().

◆ opCount()

int KviChannelWindow::opCount ( )
inline

Returns the number of users with op status.

Returns
int

References m_pUserListView.

Referenced by chan_kvs_fnc_opcount().

◆ opStatusChanged

void KviChannelWindow::opStatusChanged ( )
signal

Emitted when our op status change.

Returns
void

Referenced by setOp().

◆ outputMessage()

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, and preprocessMessage().

Referenced by ownAction().

◆ ownAction()

◆ ownMessage()

◆ part()

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_ModeLists, m_pUserListView, and setModeInList().

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

◆ partMessageSent()

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().

◆ plainChannelMode()

QString KviChannelWindow::plainChannelMode ( )
inline

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

Returns
QString

References m_szChannelMode.

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

◆ prependUserFlag()

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 m_pUserListView, and szBuffer.

◆ preprocessMessage()

void KviChannelWindow::preprocessMessage ( QString & szMessage)
overrideprotectedvirtual

Preprocess message stripping control bytes.

Parameters
szMessageThe message :)
Returns
void

Reimplemented from KviWindow.

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

Referenced by outputMessage().

◆ removeHighlightedUser()

void KviChannelWindow::removeHighlightedUser ( const QString & szNick)

Removes a user from the highlight list.

Parameters
szNickThe nickname of the user
Returns
void

References m_pTmpHighLighted.

◆ removeMasks

void KviChannelWindow::removeMasks ( KviMaskEditor * pEd,
const std::vector< KviMaskEntry * > & pList )
privateslot

Removes the masks from the mask editor window.

Parameters
pEdThe mask editor
pListThe list of masks to remove
Returns
void

References KviWindow::connection(), KviIrcConnection::encodeText(), KviWindow::encodeText(), KviMaskEditor::flag(), i, KviWindow::m_szName, KviIrcConnectionServerInfo::maxModeChanges(), KviIrcConnection::sendFmtData(), serverInfo(), and KviMaskEntry::szMask.

Referenced by toggleListModeEditor().

◆ resizeEvent()

void KviChannelWindow::resizeEvent ( QResizeEvent * )
overrideprotected

◆ saveProperties()

void KviChannelWindow::saveProperties ( KviConfigurationFile * pCfg)
overrideprotectedvirtual

◆ selectedCount()

int KviChannelWindow::selectedCount ( )
inline

Returns the number of selected users.

Returns
int

References m_pUserListView.

◆ sentListRequest()

◆ sentSyncWhoRequest()

bool KviChannelWindow::sentSyncWhoRequest ( )
inline

Returns true if we have sent the sync WHO request.

Returns
bool

References m_iStateFlags, and SentSyncWhoRequest.

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

◆ sentWhoRequest()

bool KviChannelWindow::sentWhoRequest ( )
inline

Returns true if we have sent the WHO request.

Returns
bool

References m_iStateFlags, and SentWhoRequest.

◆ serverInfo()

KviIrcConnectionServerInfo * KviChannelWindow::serverInfo ( )

Gets the KviIrcConnectionServerInfo structure associated to the current connection.

Returns
KviIrcConnectionServerInfo*

References KviWindow::connection(), and KviIrcConnection::serverInfo().

Referenced by KviChannelWindow(), preprocessMessage(), removeMasks(), KviIrcConnectionRequestQueue::timerSlot(), and updateModeLabel().

◆ setAliveChan()

◆ setChanAdmin()

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

Referenced by KviIrcServerParser::parseChannelMode().

◆ setChannelMode()

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().

◆ setChannelModeWithParam()

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().

◆ setChanOwner()

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

Referenced by KviIrcServerParser::parseChannelMode().

◆ setDeadChan()

◆ setHalfOp()

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

◆ setHasAllNames()

void KviChannelWindow::setHasAllNames ( )
inline

Sets the existence of all names.

Returns
void

References checkChannelSync(), HaveAllNames, and m_iStateFlags.

Referenced by KviIrcServerParser::parseNumericEndOfNames().

◆ setHasWhoList()

void KviChannelWindow::setHasWhoList ( )
inline

Sets the existence of the WHO list.

Returns
void

References checkChannelSync(), HaveWhoList, and m_iStateFlags.

Referenced by KviIrcServerParser::parseNumericEndOfWho().

◆ setLastReceivedWhoReply()

void KviChannelWindow::setLastReceivedWhoReply ( kvi_time_t tTime)
inline

Sets the time of the last received WHO reply.

Parameters
tTimeThe source time
Returns
void

References kvi_time_t, and m_tLastReceivedWhoReply.

Referenced by KviIrcServerParser::parseNumericEndOfWho().

◆ setListRequestDone()

void KviChannelWindow::setListRequestDone ( char cMode)
inline

◆ setMode

void KviChannelWindow::setMode ( const 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().

◆ setModeInList()

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(), internalMask(), m_ListEditors, m_ModeLists, and m_pUserListView.

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

◆ setOp()

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, and opStatusChanged().

◆ setSentListRequest()

void KviChannelWindow::setSentListRequest ( char cMode)
inline

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

Returns
void

References m_szSentModeRequests.

Referenced by KviIrcConnectionRequestQueue::timerSlot().

◆ setSentSyncWhoRequest()

void KviChannelWindow::setSentSyncWhoRequest ( )
inline

Sets the sync WHO request flag.

Returns
void

References m_iStateFlags, and SentSyncWhoRequest.

Referenced by KviIrcConnection::heartbeat().

◆ setSentWhoRequest()

void KviChannelWindow::setSentWhoRequest ( )
inline

Sets the WHO request flag.

Returns
void

References m_iStateFlags, and SentWhoRequest.

Referenced by KviIrcConnectionRequestQueue::timerSlot().

◆ setUserOp()

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

◆ setVoice()

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

◆ showDoubleView()

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(), m_pDoubleViewButton, KviWindow::m_pIrcView, m_pMessageView, m_pVertSplitter, m_VertSplitterSizesList, and textViewRightClicked().

Referenced by loadProperties(), and toggleDoubleView().

◆ sizeHint()

QSize KviChannelWindow::sizeHint ( ) const
override

Returns the size of the channel.

Returns
QSize

References KviWindow::m_pButtonBox, KviWindow::m_pInput, KviWindow::m_pIrcView, and KviWindow::m_pSplitter.

◆ target()

const QString & KviChannelWindow::target ( )
inlineoverridevirtual

Returns the name of the channel.

Returns
const QString &

Reimplemented from KviWindow.

References KviWindow::windowName().

Referenced by getConfigGroupName(), and KviIrcConnectionRequestQueue::timerSlot().

◆ textViewRightClicked

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().

◆ toggleDoubleView

void KviChannelWindow::toggleDoubleView ( )
slot

Toggles the double view mode.

Returns
void

References m_pDoubleViewButton, m_pMessageView, and showDoubleView().

Referenced by KviChannelWindow(), window_kvs_cmd_splitView(), and window_kvs_cmd_unsplitView().

◆ toggleListModeEditor

void KviChannelWindow::toggleListModeEditor ( )
privateslot

◆ toggleListView

void KviChannelWindow::toggleListView ( )
privateslot

Toggles the userlist view.

Returns
void

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

Referenced by KviChannelWindow().

◆ toggleModeEditor

void KviChannelWindow::toggleModeEditor ( )
privateslot

◆ toggleToolButtons

void KviChannelWindow::toggleToolButtons ( )
privateslot

Toggles tool buttons widget over the listview.

Returns
void

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

Referenced by KviChannelWindow(), and loadProperties().

◆ topicSelected

void KviChannelWindow::topicSelected ( const QString & szTopic)
privateslot

◆ topicWidget()

◆ triggerCreationEvents()

void KviChannelWindow::triggerCreationEvents ( )
overrideprotectedvirtual

Trigger the OnChannelWindowCreated event.

Returns
void

Reimplemented from KviWindow.

References KviEvent_OnChannelWindowCreated, and KVS_TRIGGER_EVENT_0.

◆ unhighlight()

void KviChannelWindow::unhighlight ( )

Unhighlights the windowlist item.

Returns
void

References KviWindow::m_pWindowListItem.

Referenced by KviIrcConnection::unhighlightAllChannels().

◆ updateModeLabel()

◆ userAction() [1/3]

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

◆ userAction() [2/3]

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(), and m_pUserListView.

◆ userAction() [3/3]

void KviChannelWindow::userAction ( KviIrcMask * user,
unsigned int uActionType )

◆ userListView()

◆ userOpCount()

int KviChannelWindow::userOpCount ( )
inline

Returns the number of users with userop status.

Returns
int

References m_pUserListView.

Referenced by chan_kvs_fnc_useropcount().

◆ voiceCount()

int KviChannelWindow::voiceCount ( )
inline

Returns the number of users with voice status.

Returns
int

References m_pUserListView.

Referenced by chan_kvs_fnc_voicecount().

Member Data Documentation

◆ m_iStateFlags

◆ m_joinTime

QDateTime KviChannelWindow::m_joinTime
protected

◆ m_lActionHistory

QList<KviChannelAction *> KviChannelWindow::m_lActionHistory
protected

◆ m_ListEditorButtons

std::map<char, KviWindowToolPageButton *> KviChannelWindow::m_ListEditorButtons
protected

◆ m_ListEditors

std::map<char, KviMaskEditor *> KviChannelWindow::m_ListEditors
protected

◆ m_ModeLists

◆ m_pButtonContainer

KviTalHBox* KviChannelWindow::m_pButtonContainer
protected

◆ m_pDoubleViewButton

QToolButton* KviChannelWindow::m_pDoubleViewButton
protected

◆ m_pListViewButton

KviWindowToolPageButton* KviChannelWindow::m_pListViewButton
protected

◆ m_pMessageView

◆ m_pModeEditor

KviModeEditor* KviChannelWindow::m_pModeEditor
protected

◆ m_pModeEditorButton

KviWindowToolPageButton* KviChannelWindow::m_pModeEditorButton
protected

◆ m_pModeWidget

KviModeWidget* KviChannelWindow::m_pModeWidget
protected

◆ m_privateBackground

KviPixmap KviChannelWindow::m_privateBackground
protected

Referenced by loadProperties(), and saveProperties().

◆ m_pTmpHighLighted

QStringList* KviChannelWindow::m_pTmpHighLighted
protected

◆ m_pTopicWidget

KviTopicWidget* KviChannelWindow::m_pTopicWidget
protected

◆ m_pTopSplitter

KviTalSplitter* KviChannelWindow::m_pTopSplitter
protected

◆ m_pUserListView

◆ m_pVertSplitter

KviTalSplitter* KviChannelWindow::m_pVertSplitter
protected

◆ m_SplitterSizesList

QList<int> KviChannelWindow::m_SplitterSizesList
protected

◆ m_szChannelMode

◆ m_szChannelParameterModes

std::map<char, QString> KviChannelWindow::m_szChannelParameterModes
protected

◆ m_szNameWithUserFlag

QString KviChannelWindow::m_szNameWithUserFlag
protected

◆ m_szSentModeRequests

QString KviChannelWindow::m_szSentModeRequests
protected

◆ m_tLastReceivedWhoReply

kvi_time_t KviChannelWindow::m_tLastReceivedWhoReply
protected

◆ m_uActionHistoryHotActionCount

unsigned int KviChannelWindow::m_uActionHistoryHotActionCount
protected

◆ m_VertSplitterSizesList

QList<int> KviChannelWindow::m_VertSplitterSizesList
protected

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