45 #include <QToolButton>
46 #include <QTextEncoder>
63 #ifdef COMPILE_CRYPT_SUPPORT
64 class KviCryptController;
65 class KviCryptSessionInfo;
68 #define KVI_WINDOW_TYPE_USER 10000
84 Q_PROPERTY(
int KviProperty_ChildFocusOwner READ
type)
122 VisibleAndActive = 0,
123 MainWindowIsVisible = 1
189 #ifdef COMPILE_CRYPT_SUPPORT
191 KviCryptController * m_pCryptController;
192 KviCryptSessionInfo * m_pCryptSessionInfo;
197 static const char * m_typeTable[TypeCount];
214 inline QString
id() {
return QString(
"%1").arg(m_uId); };
235 void setWindowName(
const QString & szName);
244 void setProgress(
int iProgress);
260 inline bool isQuery()
const {
return m_eType == Query; };
265 inline bool isConsole()
const {
return m_eType == Console; };
271 virtual const char * typeString();
273 inline QTextCodec *
textCodec() {
return m_pTextCodec ? m_pTextCodec : defaultTextCodec(); };
274 void forceTextCodec(QTextCodec * pCodec);
318 virtual void toggleButtonContainer();
332 #ifdef COMPILE_CRYPT_SUPPORT
333 KviCryptSessionInfo * cryptSessionInfo()
335 return m_pCryptSessionInfo;
337 void setCryptSessionInfo(KviCryptSessionInfo * pInfo);
340 virtual bool activityMeter(
unsigned int * puActivityValue,
unsigned int * puActivityTemperature);
343 virtual bool highlightMeter(
unsigned int * puValue);
344 virtual bool highlightMe(
unsigned int uValue);
351 const QString & lastLineOfText();
352 const QString & lastMessageText();
356 bool setTextEncoding(
const QString & szTextEncoding);
358 virtual QTextCodec * defaultTextCodec();
360 inline QByteArray encodeText(
const QString & szText);
361 inline QString decodeText(
const char * pcText);
363 QTextEncoder * makeEncoder();
367 void delayedAutoRaise();
370 void getDefaultLogFileName(QString &
szBuffer);
375 virtual void getConfigGroupName(QString &
szBuffer);
376 virtual void getBaseLogFileName(QString &
szBuffer);
377 virtual void updateCaption();
378 virtual void applyOptions();
379 virtual void updateIcon();
384 void internalOutput(
KviIrcView * pView,
int iMsgType,
const kvi_wchar_t * pwText,
int iFlags = 0,
const QDateTime & datetime = QDateTime());
386 virtual void output(
int iMsgType,
const char * pcFormat, ...);
387 virtual void output(
int iMsgType,
const kvi_wchar_t * pwFormat, ...);
388 virtual void output(
int iMsgType, QString szFmt, ...);
389 void output(
int iMsgType,
const QDateTime & datetime,
const char * pcFormat, ...);
390 void output(
int iMsgType,
const QDateTime & datetime,
const kvi_wchar_t * pwFormat, ...);
391 void output(
int iMsgType,
const QDateTime & datetime, QString szFmt, ...);
392 virtual void outputNoFmt(
int iMsgType,
const char * pcText,
int iFlags = 0,
const QDateTime & datetime = QDateTime());
393 virtual void outputNoFmt(
int iMsgType,
const kvi_wchar_t * pwText,
int iFlags = 0,
const QDateTime & datetime = QDateTime()) { internalOutput(m_pIrcView, iMsgType, pwText, iFlags, datetime); };
394 virtual void outputNoFmt(
int iMsgType,
const QString & szText,
int iFlags = 0,
const QDateTime & datetime = QDateTime());
396 void updateBackgrounds(QObject * pObj = 0);
406 void demandAttention();
419 bool hasAttention(AttentionLevel eLevel = VisibleAndActive);
422 void listWindowTypes();
427 inline void setFixedCaption(
const QString & szCaption) { m_szPlainTextCaption = szCaption; };
429 void setWindowTitle(QString & szTitle);
440 virtual void createWindowListItem();
441 virtual void destroyWindowListItem();
444 virtual void lostUserFocus();
446 virtual void fillCaptionBuffers();
450 virtual void youAreDocked();
451 virtual void youAreUndocked();
453 virtual QPixmap * myIconPtr();
457 bool eventFilter(QObject * pObject, QEvent * pEvent);
460 virtual void moveEvent(QMoveEvent * pEvent);
461 virtual void closeEvent(QCloseEvent * pEvent);
462 virtual void childEvent(QChildEvent * pEvent);
463 virtual void focusInEvent(QFocusEvent *);
464 virtual void inputMethodEvent(QInputMethodEvent *
e);
466 void childInserted(QWidget * pObject);
467 void childRemoved(QWidget * pObject);
470 void createCryptControllerButton(QWidget * pPar);
471 void createTextEncodingButton(QWidget * pPar);
472 void createSystemTextEncodingPopup();
474 QToolButton * createToolButton(QWidget * pPar,
const char * pcName,
KviIconManager::SmallIcon eIcon,
const QString & szToolTip,
bool bOn);
476 virtual void childrenTreeChanged(QWidget * pAdded);
478 virtual bool focusNextPrevChild(
bool bNext);
480 virtual void preprocessMessage(QString & szMessage);
486 void savePropertiesAsDefault();
488 void toggleCryptController();
489 void cryptControllerFinished();
490 void cryptSessionInfoDestroyed();
491 void textEncodingButtonClicked();
492 void systemTextEncodingPopupActivated(QAction * pAction);
493 void childDestroyed();
495 void windowNameChanged();
498 #ifndef _KVI_WINDOW_CPP_
524 #endif //_KVI_WINDOW_H_
virtual void triggerDestructionEvents()
Definition: KviWindow.h:438
Toolkit Abstraction Layer: hbox class.
Definition: KviTalHBox.h:44
unsigned long int m_uId
Definition: KviWindow.h:187
AttentionLevel
attention levels usable in hasAttention()
Definition: KviWindow.h:120
Definition: KviMainWindow.h:60
Definition: KviConsoleWindow.h:75
#define KVIRC_API
Definition: kvi_settings.h:128
Class for horizontal box.
An abstraction of a connection to an IRC server.
Definition: KviIrcConnection.h:95
bool m_bProcessingInputEvent
Definition: KviWindow.h:203
Definition: KviConfigurationFile.h:48
bool isDocked()
Definition: KviWindow.h:206
void fillSingleColorCaptionBuffers(const QString &szName)
Definition: KviWindow.h:448
virtual void outputNoFmt(int iMsgType, const kvi_wchar_t *pwText, int iFlags=0, const QDateTime &datetime=QDateTime())
Definition: KviWindow.h:393
KviTalSplitter * m_pSplitter
Definition: KviWindow.h:185
QTextCodec * textCodec()
Definition: KviWindow.h:273
kvi_u16_t kvi_wchar_t
Definition: KviCString.h:87
KviTalHBox * m_pButtonBox
Definition: KviWindow.h:186
QWidget * m_pLastFocusedChild
Definition: KviWindow.h:196
KviIrcView * m_pIrcView
Definition: KviWindow.h:183
ActivityTemperature
Holds the activity meter in temperature scale.
Definition: KviWindow.h:105
QString type()
Definition: KviRuntimeInfo.cpp:646
const QString & windowName()
Returns the name of this window.
Definition: KviWindow.h:228
KviWindowListItem * windowListItem()
Returns the windowList item.
Definition: KviWindow.h:314
virtual const QString & target()
Definition: KviWindow.h:327
QByteArray encodeText(const QString &szText)
Definition: KviWindow.h:508
#define e
Definition: detector.cpp:69
void setFixedCaption(const QString &szCaption)
Definition: KviWindow.h:427
char Channel
Definition: KviIrcNumericCodes.h:391
KviWindowListItem * m_pWindowListItem
Definition: KviWindow.h:180
QString m_szTextEncoding
Definition: KviWindow.h:188
KVIRC_API KviWindow * g_pActiveWindow
Definition: KviWindow.cpp:85
QString id()
Returns the global ID of this window.
Definition: KviWindow.h:214
Type m_eType
Definition: KviWindow.h:179
SmallIcon
Contains all KVIrc's small icons.
Definition: KviIconManager.h:168
An abstraction of a connection to an IRC server.
bool isQuery() const
Definition: KviWindow.h:260
Definition: KviTreeWindowList.h:120
KviIrcView * view() const
Returns the KviIrcView of this window.
Definition: KviWindow.h:282
const QString Empty
A global empty string (note that this is ALSO NULL under Qt 3.x)
Definition: KviQString.cpp:49
virtual void ownMessage(const QString &, bool=true)
Definition: KviWindow.h:380
virtual QTextCodec * defaultTextCodec()
Definition: KviWindow.cpp:1353
const QString & textEncoding()
Definition: KviWindow.h:354
Definition: KviWindowToolWidget.h:47
virtual void triggerCreationEvents()
Definition: KviWindow.h:437
Type type() const
Returns the type of the window.
Definition: KviWindow.h:250
KviTalSplitter * splitter()
Returns the splitter of this window.
Definition: KviWindow.h:306
Handles all docked KviWindow windows.
Definition: KviWindowStack.h:46
Definition: KviIrcView.h:57
virtual void getWindowListTipText(QString &szBuffer)
Definition: KviWindow.h:348
virtual void ownAction(const QString &)
Definition: KviWindow.h:381
KviInput * input()
Definition: KviWindow.h:324
QToolButton * m_pHideToolsButton
Definition: KviWindow.h:195
Definition: UserWindow.h:30
Definition: KviTreeWindowList.h:86
QToolButton * m_pTextEncodingButton
Definition: KviWindow.h:194
bool isConsole() const
Definition: KviWindow.h:265
unsigned long int numericId()
Returns the global ID of this window.
Definition: KviWindow.h:222
void setType(Type eType)
Definition: KviWindow.h:455
Type
Holds the types of a window; these are used by the KVIrc core and distributed modules.
Definition: KviWindow.h:130
Base class for all windows in KVIrc.
Definition: KviWindow.h:74
QTextCodec * m_pTextCodec
Definition: KviWindow.h:200
ActivityValue
Holds the activity meter in value scale.
Definition: KviWindow.h:91
Class used to workaround unwanted behaviours in QSplitter.
KviInput * m_pInput
Definition: KviWindow.h:184
Definition: KviTreeWindowList.h:35
KviConsoleWindow * m_pConsole
Definition: KviWindow.h:178
#define KviTalSplitter
Definition: KviTalSplitter.h:35
virtual const QString & localNick()
Definition: KviWindow.h:330
char szBuffer[4096]
Definition: winamp.cpp:77
virtual const QString & plainTextCaption()
Definition: KviWindow.h:382
QString decodeText(const char *pcText)
Definition: KviWindow.h:516
QWidget * m_pFocusHandler
Definition: KviWindow.h:181
This file contains compile time settings.
bool isChannel() const
Definition: KviWindow.h:255
virtual QFrame * buttonContainer()
Definition: KviWindow.h:317
Definition: KviWindowListBase.h:49
Definition: KviIrcContext.h:58
bool m_bIsDocked
Definition: KviWindow.h:202
KviConsoleWindow * console()
Returns the console that this window belongs to.
Definition: KviWindow.h:290
Helper functions for the QString class.
QString m_szName
Definition: KviWindow.h:177
QString m_szPlainTextCaption
Definition: KviWindow.h:182