KVIrc  4.9.2
DeveloperAPIs
Public Types | Public Slots | Public Member Functions | Protected Slots | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends | List of all members
KviConsoleWindow Class Reference

#include <KviConsoleWindow.h>

+ Inheritance diagram for KviConsoleWindow:

Public Types

enum  OutputPrivmsgFlags { NoWindowFlashing = 1, NoNotifier = 2, NoHighlighting = 4, NoNotifications = 7 }
 
- 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 executeInternalCommand (int index)
 
void recentUrlsChanged ()
 
void updateUri ()
 
- Public Slots inherited from KviWindow
void autoRaise ()
 
void dock ()
 
void reloadImages ()
 
void savePropertiesAsDefault ()
 
void undock ()
 

Public Member Functions

KviWindowactiveWindow ()
 
void addHighlightedChannel (const QString &szChan)
 Adds a channel to the highlight list. More...
 
int applyHighlighting (KviWindow *wnd, int type, const QString &nick, const QString &user, const QString &host, const QString &szMsg)
 
void avatarChanged (KviAvatar *avatar, const QString &nick, const QString &user, const QString &host, const QString &textLine)
 
void avatarChangedUpdateWindows (const QString &nick, const QString &textLine)
 
void checkDefaultAvatar (KviIrcUserEntry *e, const QString &nick, const QString &user, const QString &host)
 
void completeChannel (const QString &word, KviPointerList< QString > *matches)
 
void completeServer (const QString &word, KviPointerList< QString > *matches)
 
void connectionAttached ()
 
void connectionDetached ()
 
bool connectionInProgress ()
 
KviIrcContextcontext ()
 
KviAvatarcurrentAvatar ()
 
QString currentNetworkName ()
 
KviAvatardefaultAvatarFromOptions ()
 
void getUserTipText (const QString &nick, KviIrcUserEntry *e, QString &buffer)
 
bool isConnected ()
 
bool isHighlightedChannel (const QString &szChan)
 Returns true if the channel is highlighted. More...
 
bool isIPv6Connection ()
 
bool isNotConnected ()
 
KviUserListViewnotifyListView ()
 
void outputPrivmsg (KviWindow *wnd, int type, const QString &nick, const QString &user, const QString &host, const QString &msg, int iFlags=0, const QString &prefix=QString(), const QString &suffix=QString(), const QDateTime &datetime=QDateTime())
 
void removeHighlightedChannel (const QString &szChan)
 Removes a channel from the highlight list. More...
 
void resetAvatarForMatchingUsers (KviRegisteredUser *u)
 
int selectedCount ()
 
KviAvatarsetAvatar (const QString &nick, const QString &user, const QString &host, const QString &szLocalPath, const QString &szName)
 
void setAvatarFromOptions ()
 
KviIrcContext::State state ()
 
const QString & statusString ()
 
void terminateConnectionRequest (bool bForce=false, const char *quitMsg=0)
 
 ~KviConsoleWindow ()
 
- Public Member Functions inherited from KviWindow
virtual bool activityMeter (unsigned int *puActivityValue, unsigned int *puActivityTemperature)
 
virtual QFrame * buttonContainer ()
 
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)
 
virtual void getConfigGroupName (QString &szBuffer)
 
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 void ownAction (const QString &)
 
virtual void ownMessage (const QString &, bool=true)
 
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...
 
virtual const QString & target ()
 
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 Slots

void ircUriChanged (const QString &)
 
void textViewRightClicked ()
 
void toggleNotifyView ()
 
- Protected Slots inherited from KviWindow
void childDestroyed ()
 
void cryptControllerFinished ()
 
void cryptSessionInfoDestroyed ()
 
void systemTextEncodingPopupActivated (QAction *pAction)
 
void textEncodingButtonClicked ()
 
void toggleCryptController ()
 

Protected Member Functions

virtual void applyOptions ()
 
virtual void closeEvent (QCloseEvent *e)
 
void destroyConnection ()
 
virtual void fillCaptionBuffers ()
 
void fillStatusString ()
 
virtual void getBaseLogFileName (QString &buffer)
 
virtual void getWindowListTipText (QString &buffer)
 
 KviConsoleWindow (int iFlags)
 
virtual void loadProperties (KviConfigurationFile *cfg)
 
virtual QPixmap * myIconPtr ()
 
virtual void resizeEvent (QResizeEvent *e)
 
virtual void saveProperties (KviConfigurationFile *cfg)
 
void showNotifyList (bool bShow, bool bIgnoreSizeChange=false)
 
virtual QSize sizeHint () const
 
virtual void triggerCreationEvents ()
 
int triggerOnHighlight (KviWindow *wnd, int type, const QString &nick, const QString &user, const QString &host, const QString &szMsg, const QString &trigger)
 
- 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 lostUserFocus ()
 
virtual void moveEvent (QMoveEvent *pEvent)
 
virtual void preprocessMessage (QString &szMessage)
 
void setType (Type eType)
 
virtual void triggerDestructionEvents ()
 
virtual void youAreDocked ()
 
virtual void youAreUndocked ()
 

Static Protected Member Functions

static int getSmartColorHashForNick (QString *szNick)
 

Protected Attributes

int m_iFlags
 
KviThemedComboBoxm_pAddressEdit
 
KviIrcContextm_pContext
 
KviUserListViewm_pNotifyListView
 
KviWindowToolPageButtonm_pNotifyViewButton
 
QStringList * m_pTmpHighLightedChannels
 
QList< int > m_SplitterSizesList
 
QString m_szOwnSmartColor
 
QString m_szStatusString
 
- 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
 

Friends

class KviChannelWindow
 
class KviIrcContext
 
class KviIrcSocket
 
class KviMainWindow
 
class KviQueryWindow
 

Additional Inherited Members

- Signals inherited from KviWindow
void windowNameChanged ()
 
- Static Protected Attributes inherited from KviWindow
static const char * m_typeTable [TypeCount]
 
- Properties inherited from KviWindow
int KviProperty_ChildFocusOwner
 

Member Enumeration Documentation

Enumerator
NoWindowFlashing 
NoNotifier 
NoHighlighting 
NoNotifications 

Constructor & Destructor Documentation

KviConsoleWindow::KviConsoleWindow ( int  iFlags)
protected
KviConsoleWindow::~KviConsoleWindow ( )

Member Function Documentation

KviWindow * KviConsoleWindow::activeWindow ( )

References KviWindow::console(), and g_pActiveWindow.

Referenced by KviIrcServerParser::echoCtcpReply(), KviIrcServerParser::echoCtcpRequest(), KviKvsCoreFunctions::KVSCF(), KviNotifyListManager::notifyOffLine(), KviNotifyListManager::notifyOnLine(), KviIrcServerParser::parseCtcpReplyPing(), KviIrcServerParser::parseCtcpRequestAction(), KviIrcServerParser::parseLiteralInvite(), KviIrcServerParser::parseLiteralMode(), KviIrcServerParser::parseLiteralNotice(), KviIrcServerParser::parseLiteralPrivmsg(), KviIrcServerParser::parseLiteralWallops(), KviIrcServerParser::parseNumeric367(), KviIrcServerParser::parseNumeric368(), KviIrcServerParser::parseNumeric486(), KviIrcServerParser::parseNumericAway(), KviIrcServerParser::parseNumericBackFromAway(), KviIrcServerParser::parseNumericChannelModeIs(), KviIrcServerParser::parseNumericChanUrl(), KviIrcServerParser::parseNumericCodePageScheme(), KviIrcServerParser::parseNumericCreationTime(), KviIrcServerParser::parseNumericEndOfNames(), KviIrcServerParser::parseNumericEndOfQuietList(), KviIrcServerParser::parseNumericEndOfWho(), KviIrcServerParser::parseNumericEndOfWhois(), KviIrcServerParser::parseNumericEndOfWhowas(), KviIrcServerParser::parseNumericForward(), KviIrcServerParser::parseNumericHiddenHost(), KviIrcServerParser::parseNumericIsOn(), KviIrcServerParser::parseNumericNames(), KviIrcServerParser::parseNumericNoSuchNick(), KviIrcServerParser::parseNumericNotEnoughParams(), KviIrcServerParser::parseNumericNoTopic(), KviIrcServerParser::parseNumericOftcEndOfQuietList(), KviIrcServerParser::parseNumericOftcQuietList(), KviIrcServerParser::parseNumericPasswordIncorrect(), KviIrcServerParser::parseNumericQuietList(), KviIrcServerParser::parseNumericSnomask(), KviIrcServerParser::parseNumericTopic(), KviIrcServerParser::parseNumericTopicWhoTime(), KviIrcServerParser::parseNumericTryAgain(), KviIrcServerParser::parseNumericUnknownCommand(), KviIrcServerParser::parseNumericUserhost(), KviIrcServerParser::parseNumericUserMode(), KviIrcServerParser::parseNumericUsersDontMatch(), KviIrcServerParser::parseNumericWatch(), KviIrcServerParser::parseNumericWhoisActually(), KviIrcServerParser::parseNumericWhoisAuth(), KviIrcServerParser::parseNumericWhoisAway(), KviIrcServerParser::parseNumericWhoisChannels(), KviIrcServerParser::parseNumericWhoisIdle(), KviIrcServerParser::parseNumericWhoisOther(), KviIrcServerParser::parseNumericWhoisRegistered(), KviIrcServerParser::parseNumericWhoisServer(), KviIrcServerParser::parseNumericWhoisUser(), KviIrcServerParser::parseNumericWhoReply(), KviIrcServerParser::parseNumericWhospcrpl(), KviIrcServerParser::parseNumericWhowasUser(), KviIrcConnection::sendData(), and KviIrcConnection::sendFmtData().

void KviConsoleWindow::addHighlightedChannel ( const QString &  szChan)

Adds a channel to the highlight list.

Parameters
szChanThe channel name
Returns
void

References m_pTmpHighLightedChannels.

int KviConsoleWindow::applyHighlighting ( KviWindow wnd,
int  type,
const QString &  nick,
const QString &  user,
const QString &  host,
const QString &  szMsg 
)
void KviConsoleWindow::applyOptions ( )
protectedvirtual
void KviConsoleWindow::avatarChanged ( KviAvatar avatar,
const QString &  nick,
const QString &  user,
const QString &  host,
const QString &  textLine 
)
void KviConsoleWindow::avatarChangedUpdateWindows ( const QString &  nick,
const QString &  textLine 
)
void KviConsoleWindow::checkDefaultAvatar ( KviIrcUserEntry e,
const QString &  nick,
const QString &  user,
const QString &  host 
)
void KviConsoleWindow::closeEvent ( QCloseEvent *  e)
protectedvirtual
void KviConsoleWindow::completeChannel ( const QString &  word,
KviPointerList< QString > *  matches 
)
void KviConsoleWindow::completeServer ( const QString &  word,
KviPointerList< QString > *  matches 
)
void KviConsoleWindow::connectionAttached ( )
void KviConsoleWindow::connectionDetached ( )
bool KviConsoleWindow::connectionInProgress ( )

References context(), KviIrcContext::Idle, and state().

Referenced by KviIrcUrl::run().

KviIrcContext* KviConsoleWindow::context ( )
inline
KviAvatar * KviConsoleWindow::currentAvatar ( )
QString KviConsoleWindow::currentNetworkName ( )
inline
KviAvatar * KviConsoleWindow::defaultAvatarFromOptions ( )
void KviConsoleWindow::destroyConnection ( )
protected
void KviConsoleWindow::executeInternalCommand ( int  index)
slot
void KviConsoleWindow::fillCaptionBuffers ( )
protectedvirtual
void KviConsoleWindow::fillStatusString ( )
protected
void KviConsoleWindow::getBaseLogFileName ( QString &  buffer)
protectedvirtual

Reimplemented from KviWindow.

References context().

static int KviConsoleWindow::getSmartColorHashForNick ( QString *  szNick)
staticprotected
void KviConsoleWindow::getUserTipText ( const QString &  nick,
KviIrcUserEntry e,
QString &  buffer 
)
void KviConsoleWindow::getWindowListTipText ( QString &  buffer)
protectedvirtual
void KviConsoleWindow::ircUriChanged ( const QString &  text)
protectedslot
bool KviConsoleWindow::isConnected ( )
inline
bool KviConsoleWindow::isHighlightedChannel ( const QString &  szChan)
inline

Returns true if the channel is highlighted.

Parameters
szChanThe channel name
Returns
bool

Referenced by applyHighlighting().

bool KviConsoleWindow::isIPv6Connection ( )
inline
bool KviConsoleWindow::isNotConnected ( )
inline
void KviConsoleWindow::loadProperties ( KviConfigurationFile cfg)
protectedvirtual
QPixmap * KviConsoleWindow::myIconPtr ( )
protectedvirtual
KviUserListView* KviConsoleWindow::notifyListView ( )
inline
void KviConsoleWindow::outputPrivmsg ( KviWindow wnd,
int  type,
const QString &  nick,
const QString &  user,
const QString &  host,
const QString &  msg,
int  iFlags = 0,
const QString &  prefix = QString(),
const QString &  suffix = QString(),
const QDateTime &  datetime = QDateTime() 
)

References KviQString::appendFormatted(), applyHighlighting(), KviControlCodes::Bold, KviWindow::Channel, KviWindow::connection(), KviWindow::demandAttention(), KviIrcUserDataBase::find(), g_pApp, KviNickColors::getSmartColor(), KviNickColors::getSmartColorForNick(), KviWindow::hasAttention(), KviIrcConnectionUserInfo::hostName(), KVI_OPTION_BOOL, KVI_OPTION_MSGTYPE, KVI_OPTION_STRING, KVI_OPTION_UINT, KVI_OUT_CHANNELNOTICE, KVI_OUT_CHANNELNOTICECRYPTED, KVI_OUT_HIGHLIGHT, KVI_OUT_QUERYNOTICE, KVI_OUT_QUERYNOTICECRYPTED, KviOption_boolBoldedNicks, KviOption_boolColorNicks, KviOption_boolFlashWindowOnHighlightedMessages, KviOption_boolPopupNotifierOnHighlightedMessages, KviOption_boolShowChannelUserFlagInPrivmsgView, KviOption_boolShowUserAndHostInPrivmsgView, KviOption_boolStripMircColorsInUserMessages, KviOption_boolUseExtendedPrivmsgView, KviOption_boolUseSpecifiedSmartColorForOwnNick, KviOption_stringExtendedPrivmsgPostfix, KviOption_stringExtendedPrivmsgPrefix, KviOption_uintNotifierAutoHideTime, m_szOwnSmartColor, KviWindow::MainWindowIsVisible, KviIrcConnectionUserInfo::nickName(), NoHighlighting, NoNotifier, KviApplication::notifierMessage(), NoWindowFlashing, KviIrcUserEntry::setSmartNickColor(), KviIrcUserEntry::smartNickColor(), KviControlCodes::stripControlBytes(), KviQString::toHtmlEscaped(), KviWindow::type(), KviIrcConnection::userDataBase(), KviIrcConnection::userInfo(), and KviIrcConnectionUserInfo::userName().

Referenced by DccChatWindow::event(), DccVideoWindow::event(), KviKvsCoreSimpleCommands::KVSCSC(), DccChatWindow::ownMessage(), DccVideoWindow::ownMessage(), KviQueryWindow::ownMessage(), KviChannelWindow::ownMessage(), KviIrcServerParser::parseLiteralNotice(), and KviIrcServerParser::parseLiteralPrivmsg().

void KviConsoleWindow::recentUrlsChanged ( )
slot
void KviConsoleWindow::removeHighlightedChannel ( const QString &  szChan)

Removes a channel from the highlight list.

Parameters
szChanThe channel name
Returns
void

References m_pTmpHighLightedChannels.

void KviConsoleWindow::resetAvatarForMatchingUsers ( KviRegisteredUser u)
void KviConsoleWindow::resizeEvent ( QResizeEvent *  e)
protectedvirtual
void KviConsoleWindow::saveProperties ( KviConfigurationFile cfg)
protectedvirtual
int KviConsoleWindow::selectedCount ( )
inline
KviAvatar * KviConsoleWindow::setAvatar ( const QString &  nick,
const QString &  user,
const QString &  host,
const QString &  szLocalPath,
const QString &  szName 
)
void KviConsoleWindow::setAvatarFromOptions ( )
void KviConsoleWindow::showNotifyList ( bool  bShow,
bool  bIgnoreSizeChange = false 
)
protected
QSize KviConsoleWindow::sizeHint ( ) const
protectedvirtual
KviIrcContext::State KviConsoleWindow::state ( )
inline
const QString& KviConsoleWindow::statusString ( )
inline
void KviConsoleWindow::terminateConnectionRequest ( bool  bForce = false,
const char *  quitMsg = 0 
)
void KviConsoleWindow::textViewRightClicked ( )
protectedslot
void KviConsoleWindow::toggleNotifyView ( )
protectedslot
void KviConsoleWindow::triggerCreationEvents ( )
protectedvirtual
int KviConsoleWindow::triggerOnHighlight ( KviWindow wnd,
int  type,
const QString &  nick,
const QString &  user,
const QString &  host,
const QString &  szMsg,
const QString &  trigger 
)
protected
void KviConsoleWindow::updateUri ( )
slot

Friends And Related Function Documentation

friend class KviChannelWindow
friend
friend class KviIrcContext
friend
friend class KviIrcSocket
friend
friend class KviMainWindow
friend
friend class KviQueryWindow
friend

Member Data Documentation

int KviConsoleWindow::m_iFlags
protected

Referenced by triggerCreationEvents().

KviThemedComboBox* KviConsoleWindow::m_pAddressEdit
protected
KviIrcContext* KviConsoleWindow::m_pContext
protected
KviUserListView* KviConsoleWindow::m_pNotifyListView
protected
KviWindowToolPageButton* KviConsoleWindow::m_pNotifyViewButton
protected

Referenced by saveProperties(), and showNotifyList().

QStringList* KviConsoleWindow::m_pTmpHighLightedChannels
protected
QList<int> KviConsoleWindow::m_SplitterSizesList
protected
QString KviConsoleWindow::m_szOwnSmartColor
protected

Referenced by applyOptions(), and outputPrivmsg().

QString KviConsoleWindow::m_szStatusString
protected

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