KVIrc  4.9.2
DeveloperAPIs
Macros | Functions
KviIrcView.cpp File Reference
#include "KviIrcView.h"
#include "KviIrcView_tools.h"
#include "KviIrcView_private.h"
#include "kvi_debug.h"
#include "KviApplication.h"
#include "kvi_settings.h"
#include "KviOptions.h"
#include "KviControlCodes.h"
#include "kvi_defaults.h"
#include "KviWindow.h"
#include "KviLocale.h"
#include "KviMainWindow.h"
#include "KviMemory.h"
#include "KviIconManager.h"
#include "kvi_out.h"
#include "KviParameterList.h"
#include "KviConsoleWindow.h"
#include "KviIrcUserDataBase.h"
#include "KviChannelWindow.h"
#include "KviFileDialog.h"
#include "KviMessageBox.h"
#include "KviTextIconManager.h"
#include "KviIrcConnection.h"
#include "KviWindowStack.h"
#include "KviUserInput.h"
#include "KviAnimatedPixmap.h"
#include "KviPixmapUtils.h"
#include "KviTrayIcon.h"
#include <QBitmap>
#include <QPainter>
#include <QRegExp>
#include <QFontMetrics>
#include <QApplication>
#include <QMessageBox>
#include <QPaintEvent>
#include <QDateTime>
#include <QCursor>
#include <QScrollBar>
#include <QFontDialog>
#include <QByteArray>
#include <QMenu>
#include <time.h>

Macros

#define DRAW_NORMAL_TEXT(_text_str, _text_idx, _text_len, _text_width)
 
#define DRAW_SELECTED_TEXT(_text_str, _text_idx, _text_len, _text_width)
 
#define IRCVIEW_WCHARWIDTH(c)   (((c).unicode() < 0xff) ? m_iFontCharacterWidth[(c).unicode()] : m_pFm->width(c))
 
#define KVI_DEF_BACK   200
 
#define KVI_IRCVIEW_BLOCK_SELECTION_CENTRAL   3
 
#define KVI_IRCVIEW_BLOCK_SELECTION_ICON   4
 
#define KVI_IRCVIEW_BLOCK_SELECTION_LEFT   1
 
#define KVI_IRCVIEW_BLOCK_SELECTION_RIGHT   2
 
#define KVI_IRCVIEW_BLOCK_SELECTION_TOTAL   0
 
#define KVI_IRCVIEW_DOUBLEBORDER_WIDTH   8
 
#define KVI_IRCVIEW_ESCAPE_TAG_GENERICESCAPE   '['
 
#define KVI_IRCVIEW_ESCAPE_TAG_HOSTLINK   'h'
 
#define KVI_IRCVIEW_ESCAPE_TAG_NICKLINK   'n'
 
#define KVI_IRCVIEW_ESCAPE_TAG_SERVERLINK   's'
 
#define KVI_IRCVIEW_ESCAPE_TAG_URLLINK   'u'
 
#define KVI_IRCVIEW_MINIMUM_HEIGHT   22
 
#define KVI_IRCVIEW_MINIMUM_WIDTH   22
 
#define KVI_IRCVIEW_PIXMAP_AND_SEPARATOR   20
 
#define KVI_IRCVIEW_PIXMAP_SIZE   16
 
#define KVI_IRCVIEW_SIZEHINT_HEIGHT   150
 
#define KVI_IRCVIEW_SIZEHINT_WIDTH   150
 
#define SET_PEN(_color, _custom)
 

Functions

static void delete_text_line (KviIrcViewLine *line, QHash< KviIrcViewLine *, KviAnimatedPixmap * > *animatedSmiles)
 

Macro Definition Documentation

#define DRAW_NORMAL_TEXT (   _text_str,
  _text_idx,
  _text_len,
  _text_width 
)
Value:
SET_PEN(curFore, block->pChunk ? block->pChunk->customFore : QColor()); \
{ \
int theWdth = _text_width; \
if(theWdth < 0) \
theWdth = width() - (curLeftCoord + KVI_IRCVIEW_HORIZONTAL_BORDER + scrollbarWidth); \
pa.fillRect(curLeftCoord, curBottomCoord - m_iFontLineSpacing + m_iFontDescent, theWdth, m_iFontLineSpacing, KVI_OPTION_MIRCCOLOR((unsigned char)curBack)); \
} \
pa.drawText(curLeftCoord, curBottomCoord, _text_str.mid(_text_idx, _text_len)); \
if(curBold) \
pa.drawText(curLeftCoord + 1, curBottomCoord, _text_str.mid(_text_idx, _text_len)); \
if(curUnderline) \
{ \
int theWdth = _text_width; \
if(theWdth < 0) \
theWdth = width() - (curLeftCoord + KVI_IRCVIEW_HORIZONTAL_BORDER + scrollbarWidth); \
pa.drawLine(curLeftCoord, curBottomCoord + 2, curLeftCoord + theWdth, curBottomCoord + 2); \
} \
curLeftCoord += _text_width;
#define KVI_OPTION_MIRCCOLOR(_idx)
Definition: KviOptions.h:661
if(m_pFile) delete m_pFile
#define SET_PEN(_color, _custom)
#define KVI_IRCVIEW_HORIZONTAL_BORDER
COMPILE_ON_WINDOWS.
Definition: KviIrcView_private.h:49
Definition: KviControlCodes.h:143

Referenced by KviIrcView::paintEvent().

#define DRAW_SELECTED_TEXT (   _text_str,
  _text_idx,
  _text_len,
  _text_width 
)
Value:
SET_PEN(KVI_OPTION_MSGTYPE(KVI_OUT_SELECT).fore(), block->pChunk ? block->pChunk->customFore : QColor()); \
{ \
int theWdth = _text_width; \
if(theWdth < 0) \
theWdth = width() - (curLeftCoord + KVI_IRCVIEW_HORIZONTAL_BORDER + scrollbarWidth); \
pa.fillRect(curLeftCoord, curBottomCoord - m_iFontLineSpacing + m_iFontDescent, theWdth, m_iFontLineSpacing, KVI_OPTION_MIRCCOLOR(KVI_OPTION_MSGTYPE(KVI_OUT_SELECT).back())); \
} \
pa.drawText(curLeftCoord, curBottomCoord, _text_str.mid(_text_idx, _text_len)); \
curLeftCoord += _text_width;
#define KVI_OPTION_MIRCCOLOR(_idx)
Definition: KviOptions.h:661
#define KVI_OUT_SELECT
Definition: kvi_out.h:28
if(m_pFile) delete m_pFile
#define KVI_OPTION_MSGTYPE(_idx)
Definition: KviOptions.h:660
#define SET_PEN(_color, _custom)
#define KVI_IRCVIEW_HORIZONTAL_BORDER
COMPILE_ON_WINDOWS.
Definition: KviIrcView_private.h:49

Referenced by KviIrcView::paintEvent().

#define IRCVIEW_WCHARWIDTH (   c)    (((c).unicode() < 0xff) ? m_iFontCharacterWidth[(c).unicode()] : m_pFm->width(c))
#define KVI_DEF_BACK   200

Referenced by KviIrcView::paintEvent().

#define KVI_IRCVIEW_BLOCK_SELECTION_CENTRAL   3
#define KVI_IRCVIEW_BLOCK_SELECTION_ICON   4
#define KVI_IRCVIEW_BLOCK_SELECTION_LEFT   1
#define KVI_IRCVIEW_BLOCK_SELECTION_RIGHT   2
#define KVI_IRCVIEW_BLOCK_SELECTION_TOTAL   0
#define KVI_IRCVIEW_DOUBLEBORDER_WIDTH   8
#define KVI_IRCVIEW_ESCAPE_TAG_GENERICESCAPE   '['
#define KVI_IRCVIEW_ESCAPE_TAG_HOSTLINK   'h'
#define KVI_IRCVIEW_ESCAPE_TAG_NICKLINK   'n'
#define KVI_IRCVIEW_ESCAPE_TAG_SERVERLINK   's'
#define KVI_IRCVIEW_ESCAPE_TAG_URLLINK   'u'
#define KVI_IRCVIEW_MINIMUM_HEIGHT   22

Referenced by KviIrcView::KviIrcView().

#define KVI_IRCVIEW_MINIMUM_WIDTH   22

Referenced by KviIrcView::KviIrcView().

#define KVI_IRCVIEW_PIXMAP_AND_SEPARATOR   20
#define KVI_IRCVIEW_PIXMAP_SIZE   16
#define KVI_IRCVIEW_SIZEHINT_HEIGHT   150

Referenced by KviIrcView::sizeHint().

#define KVI_IRCVIEW_SIZEHINT_WIDTH   150

Referenced by KviIrcView::sizeHint().

#define SET_PEN (   _color,
  _custom 
)

Referenced by KviIrcView::paintEvent().

Function Documentation

static void delete_text_line ( KviIrcViewLine line,
QHash< KviIrcViewLine *, KviAnimatedPixmap * > *  animatedSmiles 
)
inlinestatic