summaryrefslogtreecommitdiffstats
path: root/src/modules/notifier
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/notifier')
-rw-r--r--src/modules/notifier/libkvinotifier.cpp12
-rw-r--r--src/modules/notifier/notifiermessage.cpp34
-rw-r--r--src/modules/notifier/notifiermessage.h38
-rw-r--r--src/modules/notifier/notifiersettings.h2
-rw-r--r--src/modules/notifier/notifierwindow.cpp350
-rw-r--r--src/modules/notifier/notifierwindow.h117
-rw-r--r--src/modules/notifier/notifierwindowbody.cpp22
-rw-r--r--src/modules/notifier/notifierwindowbody.h88
-rw-r--r--src/modules/notifier/notifierwindowborder.cpp28
-rw-r--r--src/modules/notifier/notifierwindowborder.h116
-rw-r--r--src/modules/notifier/notifierwindowprogressbar.cpp10
-rw-r--r--src/modules/notifier/notifierwindowprogressbar.h10
-rw-r--r--src/modules/notifier/notifierwindowtabs.cpp102
-rw-r--r--src/modules/notifier/notifierwindowtabs.h133
14 files changed, 532 insertions, 530 deletions
diff --git a/src/modules/notifier/libkvinotifier.cpp b/src/modules/notifier/libkvinotifier.cpp
index edc27f0f..deaf6a34 100644
--- a/src/modules/notifier/libkvinotifier.cpp
+++ b/src/modules/notifier/libkvinotifier.cpp
@@ -36,7 +36,7 @@
#include "kvi_time.h"
#include "kvi_options.h"
-#include <qsplitter.h>
+#include <tqsplitter.h>
KviNotifierWindow * g_pNotifierWindow = 0;
kvi_time_t g_tNotifierDisabledUntil = 0;
@@ -114,7 +114,7 @@ kvi_time_t g_tNotifierDisabledUntil = 0;
static bool notifier_kvs_cmd_message(KviKvsModuleCommandCall * c)
{
- QString szMessage;
+ TQString szMessage;
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("message",KVS_PT_STRING,0,szMessage)
KVSM_PARAMETERS_END(c)
@@ -122,8 +122,8 @@ static bool notifier_kvs_cmd_message(KviKvsModuleCommandCall * c)
if(!g_pNotifierWindow)
g_pNotifierWindow = new KviNotifierWindow();
- QString szIco="";
- QString szWnd="";
+ TQString szIco="";
+ TQString szWnd="";
KviWindow * pWnd = c->window();
@@ -287,8 +287,8 @@ static bool notifier_module_can_unload(KviModule *m)
typedef struct _NotifierMessageSupaDupaParameterStruct
{
KviWindow * pWindow;
- QString szIcon;
- QString szMessage;
+ TQString szIcon;
+ TQString szMessage;
unsigned int uMessageLifetime; // 0 means no hide
} NotifierMessageSupaDupaParameterStruct;
diff --git a/src/modules/notifier/notifiermessage.cpp b/src/modules/notifier/notifiermessage.cpp
index 1e91b5de..d57d2019 100644
--- a/src/modules/notifier/notifiermessage.cpp
+++ b/src/modules/notifier/notifiermessage.cpp
@@ -45,24 +45,24 @@
#endif
*/
-#include <qapplication.h>
-#include <qpainter.h>
-#include <qimage.h>
-#include <qdesktopwidget.h>
-#include <qtooltip.h>
+#include <tqapplication.h>
+#include <tqpainter.h>
+#include <tqimage.h>
+#include <tqdesktopwidget.h>
+#include <tqtooltip.h>
#ifdef COMPILE_USE_QT4
- #define QPopupMenu Q3PopupMenu
- #include <q3popupmenu.h>
+ #define TQPopupMenu Q3PopupMenu
+ #include <tq3popupmenu.h>
#else
- #include <qpopupmenu.h>
+ #include <tqpopupmenu.h>
#endif
extern kvi_time_t g_tNotifierDisabledUntil;
-KviNotifierMessage::KviNotifierMessage(KviNotifierWindow * pNotifierWindow, QPixmap * pImage, const QString &szText)
+KviNotifierMessage::KviNotifierMessage(KviNotifierWindow * pNotifierWindow, TQPixmap * pImage, const TQString &szText)
{
- m_pText = new QSimpleRichText(KviMircCntrl::stripControlBytes(szText),pNotifierWindow->defaultFont());
+ m_pText = new TQSimpleRichText(KviMircCntrl::stripControlBytes(szText),pNotifierWindow->defaultFont());
m_pText->setWidth(pNotifierWindow->textWidth());
m_pImage = pImage;
m_bHistoric = false;
@@ -74,20 +74,20 @@ KviNotifierMessage::~KviNotifierMessage()
if(m_pImage)delete m_pImage;
}
-static void increase_transparency(QImage &buffer,QImage &srcimg,int iDivisor)
+static void increase_transparency(TQImage &buffer,TQImage &srcimg,int iDivisor)
{
buffer.create(srcimg.width(),srcimg.height(),32);
buffer.setAlphaBuffer(true);
for(int y = 0;y < buffer.height();y++)
{
- QRgb * dst = (QRgb *)buffer.scanLine(y);
- QRgb * end = dst + buffer.width();
- QRgb * src = (QRgb *)srcimg.scanLine(y);
+ TQRgb * dst = (TQRgb *)buffer.scanLine(y);
+ TQRgb * end = dst + buffer.width();
+ TQRgb * src = (TQRgb *)srcimg.scanLine(y);
while(dst < end)
{
- *dst = qRgba(qRed(*src),qGreen(*src),qBlue(*src),qAlpha(*src) / iDivisor);
+ *dst = tqRgba(tqRed(*src),tqGreen(*src),tqBlue(*src),tqAlpha(*src) / iDivisor);
dst++;
src++;
}
@@ -99,8 +99,8 @@ void KviNotifierMessage::setHistoric()
m_bHistoric = true;
if(!m_pImage)return;
if(!m_pImage->hasAlphaChannel())return;
- QImage tmp;
- QImage out = m_pImage->convertToImage();
+ TQImage tmp;
+ TQImage out = m_pImage->convertToImage();
increase_transparency(tmp,out,2);
m_pImage->convertFromImage(tmp);
}
diff --git a/src/modules/notifier/notifiermessage.h b/src/modules/notifier/notifiermessage.h
index da4a6df2..19af4966 100644
--- a/src/modules/notifier/notifiermessage.h
+++ b/src/modules/notifier/notifiermessage.h
@@ -28,38 +28,38 @@
#include "kvi_settings.h"
-#include <qwidget.h>
-#include <qrect.h>
-#include <qtimer.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qfont.h>
-#include <qcolor.h>
-#include <qlineedit.h>
+#include <tqwidget.h>
+#include <tqrect.h>
+#include <tqtimer.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqfont.h>
+#include <tqcolor.h>
+#include <tqlineedit.h>
#include "kvi_qstring.h"
#include "kvi_pointerlist.h"
#include "kvi_time.h"
#ifdef COMPILE_USE_QT4
- #define QSimpleRichText Q3SimpleRichText
- #define QPopupMenu Q3PopupMenu
- #include <q3popupmenu.h>
- #include <q3simplerichtext.h>
+ #define TQSimpleRichText Q3SimpleRichText
+ #define TQPopupMenu Q3PopupMenu
+ #include <tq3popupmenu.h>
+ #include <tq3simplerichtext.h>
#else
- #include <qsimplerichtext.h>
+ #include <tqsimplerichtext.h>
#endif
class KviWindow;
class KviNotifierWindow;
-class QPopupMenu;
+class TQPopupMenu;
class KviNotifierMessage
{
friend class KviNotifierWindow;
public:
- KviNotifierMessage(KviNotifierWindow * pNotifierWindow, QPixmap * pImage, const QString &szText);
+ KviNotifierMessage(KviNotifierWindow * pNotifierWindow, TQPixmap * pImage, const TQString &szText);
~KviNotifierMessage();
// ================================
@@ -71,8 +71,8 @@ public:
protected:
KviWindow * m_pWindow;
- QPixmap * m_pImage;
- QSimpleRichText * m_pText;
+ TQPixmap * m_pImage;
+ TQSimpleRichText * m_pText;
bool m_bHistoric;
// ================================
@@ -84,8 +84,8 @@ public:
bool historic(){ return m_bHistoric; };
void setHistoric();
void setWindow(KviWindow * pWnd){ m_pWindow = pWnd; };
- QPixmap * image(){ return m_pImage; };
- QSimpleRichText * text(){ return m_pText; };
+ TQPixmap * image(){ return m_pImage; };
+ TQSimpleRichText * text(){ return m_pText; };
protected:
diff --git a/src/modules/notifier/notifiersettings.h b/src/modules/notifier/notifiersettings.h
index b694dc59..dea98523 100644
--- a/src/modules/notifier/notifiersettings.h
+++ b/src/modules/notifier/notifiersettings.h
@@ -58,7 +58,7 @@
#define WDG_SX 7
#define WDG_DX 8
-#define m_mac_bkgColor QColor(236,233,216) // Light-brown color of notifier background widget
+#define m_mac_bkgColor TQColor(236,233,216) // Light-brown color of notifier background widget
enum State { Hidden, Showing, Visible, Hiding , FocusingOff, FocusingOn };
enum TabState { Normal, Highlighted, Changed };
diff --git a/src/modules/notifier/notifierwindow.cpp b/src/modules/notifier/notifierwindow.cpp
index d275be23..91583241 100644
--- a/src/modules/notifier/notifierwindow.cpp
+++ b/src/modules/notifier/notifierwindow.cpp
@@ -24,17 +24,17 @@
#include "kvi_settings.h"
#ifdef COMPILE_USE_QT4
- #define QPopupMenu Q3PopupMenu
- #define QSimpleRichText Q3SimpleRichText
+ #define TQPopupMenu Q3PopupMenu
+ #define TQSimpleRichText Q3SimpleRichText
- #include <q3popupmenu.h>
- #include <q3simplerichtext.h>
+ #include <tq3popupmenu.h>
+ #include <tq3simplerichtext.h>
#else
- #include <qpopupmenu.h>
- #include <qsimplerichtext.h>
+ #include <tqpopupmenu.h>
+ #include <tqsimplerichtext.h>
#endif
- #include <qpainter.h>
+ #include <tqpainter.h>
#include "notifiermessage.h"
#include "notifierwindow.h"
@@ -50,14 +50,14 @@
#include "kvi_options.h"
#include "kvi_userinput.h"
-#include <qapplication.h>
-#include <qimage.h>
-#include <qdesktopwidget.h>
-#include <qtooltip.h>
-#include <qevent.h>
-#include <qpen.h>
-#include <qfontmetrics.h>
-#include <qregexp.h>
+#include <tqapplication.h>
+#include <tqimage.h>
+#include <tqdesktopwidget.h>
+#include <tqtooltip.h>
+#include <tqevent.h>
+#include <tqpen.h>
+#include <tqfontmetrics.h>
+#include <tqregexp.h>
#include "notifierwindowbody.h"
#include "notifierwindowborder.h"
@@ -67,20 +67,20 @@
extern KviNotifierWindow * g_pNotifierWindow;
KviNotifierWindow::KviNotifierWindow()
-: QWidget(0,"kvirc_notifier_window",
+: TQWidget(0,"kvirc_notifier_window",
#ifdef COMPILE_ON_WINDOWS
- Qt::WStyle_Customize |
- Qt::WStyle_NoBorder |
- Qt::WStyle_Tool |
- Qt::WStyle_StaysOnTop)
+ TQt::WStyle_Customize |
+ TQt::WStyle_NoBorder |
+ TQt::WStyle_Tool |
+ TQt::WStyle_StaysOnTop)
#else
- Qt::WStyle_Customize |
- Qt::WStyle_NoBorder |
+ TQt::WStyle_Customize |
+ TQt::WStyle_NoBorder |
#ifndef Q_OS_MACX
- Qt::WStyle_Tool |
- Qt::WX11BypassWM |
+ TQt::WStyle_Tool |
+ TQt::WX11BypassWM |
#endif
- Qt::WStyle_StaysOnTop)
+ TQt::WStyle_StaysOnTop)
#endif
{
@@ -106,19 +106,19 @@ KviNotifierWindow::KviNotifierWindow()
cfg.setGroup("NotifierSkin");
- QString szFamily = cfg.readEntry("TextFontFamily","Arial");
- m_pDefaultFont = new QFont(szFamily,cfg.readIntEntry("TextFontSize",9));
+ TQString szFamily = cfg.readEntry("TextFontFamily","Arial");
+ m_pDefaultFont = new TQFont(szFamily,cfg.readIntEntry("TextFontSize",9));
szFamily = cfg.readEntry("TitleFontFamily","Arial");
- m_pTitleFont = new QFont(szFamily,cfg.readIntEntry("TitleFontSize",9));
+ m_pTitleFont = new TQFont(szFamily,cfg.readIntEntry("TitleFontSize",9));
- m_clrCurText = cfg.readColorEntry("CurTextColor",QColor(40,0,0));
- m_clrHistoricText = cfg.readColorEntry("HistoricTextColor",QColor(125,125,125));
- m_clrTitle = QColor(255,255,255); //cfg.readColorEntry("TitleColor",QColor(0,0,0));
+ m_clrCurText = cfg.readColorEntry("CurTextColor",TQColor(40,0,0));
+ m_clrHistoricText = cfg.readColorEntry("HistoricTextColor",TQColor(125,125,125));
+ m_clrTitle = TQColor(255,255,255); //cfg.readColorEntry("TitleColor",TQColor(0,0,0));
for(int i=0;i<NUM_OLD_COLORS;i++)
{
KviStr szKey;
szKey.sprintf("OldTextColor%d",i + 1);
- m_clrOldText[i] = cfg.readColorEntry(szKey.ptr(),QColor(90,90,90));
+ m_clrOldText[i] = cfg.readColorEntry(szKey.ptr(),TQColor(90,90,90));
}
m_iBlinkTimeout = cfg.readIntEntry("BlinkTimeout",650);
@@ -126,24 +126,24 @@ KviNotifierWindow::KviNotifierWindow()
m_iInputHeight = cfg.readIntEntry("InputHeight",20);
if(m_iInputHeight < 10)m_iInputHeight = 10;
- setBackgroundMode(Qt::NoBackground);
+ setBackgroundMode(TQt::NoBackground);
#ifdef COMPILE_USE_QT4
- setFocusPolicy(Qt::NoFocus);
+ setFocusPolicy(TTQ_NoFocus);
#else
- setFocusPolicy(QWidget::NoFocus);
+ setFocusPolicy(TQ_NoFocus);
#endif
setMouseTracking(true);
//setCursor(m_cursor);
hide();
- m_pLineEdit = new QLineEdit(this);
+ m_pLineEdit = new TQLineEdit(this);
m_pLineEdit->setGeometry(0,0,0,0);
m_pLineEdit->hide();
m_pLineEdit->installEventFilter(this);
- connect(m_pLineEdit,SIGNAL(returnPressed()),this,SLOT(returnPressed()));
+ connect(m_pLineEdit,TQT_SIGNAL(returnPressed()),this,TQT_SLOT(returnPressed()));
szFamily = cfg.readEntry("InputFontFamily","Arial");
- m_pLineEdit->setFont(QFont(szFamily,cfg.readIntEntry("InputFontSize",9)));
+ m_pLineEdit->setFont(TQFont(szFamily,cfg.readIntEntry("InputFontSize",9)));
m_bBlinkOn = false;
@@ -168,8 +168,8 @@ KviNotifierWindow::KviNotifierWindow()
// Positioning the notifier bottom-right
int iWidth = m_pixBackground.width();
int iHeight = m_pixBackground.height();
- QDesktopWidget * w = QApplication::desktop();
- QRect r = w->availableGeometry(w->primaryScreen()); //w->screenGeometry(w->primaryScreen());
+ TQDesktopWidget * w = TQApplication::desktop();
+ TQRect r = w->availableGeometry(w->primaryScreen()); //w->screenGeometry(w->primaryScreen());
/*debug("r.x(),r.y(): %d,%d",r.x(),r.y());
debug("r.width(),r.height(): %d,%d",r.width(),r.height());*/
@@ -183,10 +183,10 @@ KviNotifierWindow::KviNotifierWindow()
m_pProgressBar = new KviNotifierWindowProgressBar(m_pWndBorder->progressRect());
// FIXME: Ugly global-font initialization..
- QFontMetrics titleFontMetrics(*m_pTitleFont);
+ TQFontMetrics titleFontMetrics(*m_pTitleFont);
m_pWndBorder->centerTitle(titleFontMetrics.height());
- connect(g_pApp,SIGNAL(reloadImages()),this,SLOT(reloadImages()));
+ connect(g_pApp,TQT_SIGNAL(reloadImages()),this,TQT_SLOT(reloadImages()));
}
KviNotifierWindow::~KviNotifierWindow()
@@ -216,15 +216,15 @@ void KviNotifierWindow::reloadImages()
}
-void KviNotifierWindow::addMessage(KviWindow * pWnd,const QString &szImageId,const QString &szText,unsigned int uMessageTime)
+void KviNotifierWindow::addMessage(KviWindow * pWnd,const TQString &szImageId,const TQString &szText,unsigned int uMessageTime)
{
- QPixmap * pIcon;
- QString szMessage=szText;
- szMessage.replace( QRegExp("\r([^\r])*\r([^\r])+\r"), "\\2" );
+ TQPixmap * pIcon;
+ TQString szMessage=szText;
+ szMessage.tqreplace( TQRegExp("\r([^\r])*\r([^\r])+\r"), "\\2" );
if(szImageId.isEmpty())pIcon = 0;
else pIcon = g_pIconManager->getImage(szImageId);
- KviNotifierMessage * m = new KviNotifierMessage(this,pIcon ? new QPixmap(*pIcon) : 0,szMessage);
+ KviNotifierMessage * m = new KviNotifierMessage(this,pIcon ? new TQPixmap(*pIcon) : 0,szMessage);
m_pWndTabs->addMessage(pWnd, m); // Adds a tab about the sender pWnd
@@ -289,7 +289,7 @@ void KviNotifierWindow::computeRect()
{
int iWidth = m_pixBackground.width();
int iHeight = m_pixBackground.height();
- m_pWndBorder->setGeometry(QPoint(x(),y()), QSize(iWidth,iHeight));
+ m_pWndBorder->setGeometry(TQPoint(x(),y()), TQSize(iWidth,iHeight));
update();
}
@@ -326,21 +326,21 @@ void KviNotifierWindow::doShow(bool bDoAnimate)
m_bWriteDown = false;
m_bBlinkOn = false;
#if (!defined COMPILE_USE_QT4) || !(defined(COMPILE_USE_QT4) && (defined(COMPILE_ON_WINDOWS) || defined(Q_OS_MACX)))
- m_imgDesktop = QPixmap::grabWindow(
- QApplication::desktop()->winId(),
+ m_imgDesktop = TQPixmap(TQPixmap::grabWindow(
+ TQApplication::desktop()->winId(),
m_wndRect.x(),
m_wndRect.y(),
m_wndRect.width(),
- m_wndRect.height()).convertToImage();
+ m_wndRect.height())).convertToImage();
#endif
- // QPixmap tmp = QPixmap::grabWindow( QApplication::desktop()->winId(),m_wndRect.x(), m_wndRect.y(), m_wndRect.width(), m_wndRect.height());
+ // TQPixmap tmp = TQPixmap::grabWindow( TQApplication::desktop()->winId(),m_wndRect.x(), m_wndRect.y(), m_wndRect.width(), m_wndRect.height());
// tmp.save("/root/pix.png","PNG");
m_pixForeground.resize(m_pixBackground.size());
m_imgBuffer.create(m_pixBackground.width(),m_pixBackground.height(),32);
if(bDoAnimate)
{
- m_pShowHideTimer = new QTimer();
- connect(m_pShowHideTimer,SIGNAL(timeout()),this,SLOT(heartbeat()));
+ m_pShowHideTimer = new TQTimer();
+ connect(m_pShowHideTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat()));
m_dOpacity = OPACITY_STEP;
m_eState = Showing;
m_bCrashShowWorkAround=true;
@@ -526,8 +526,8 @@ void KviNotifierWindow::doHide(bool bDoAnimate)
hideNow();
} else {
//debug ("starting hide animation notifier x() %d and notifier y() % - WBorderx() %d and WBordery() %d and bDoanimate %d",x(),y(),m_pWndBorder->x(),m_pWndBorder->y(),bDoAnimate);
- m_pShowHideTimer = new QTimer();
- connect(m_pShowHideTimer,SIGNAL(timeout()),this,SLOT(heartbeat()));
+ m_pShowHideTimer = new TQTimer();
+ connect(m_pShowHideTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat()));
m_dOpacity = 1.0 - OPACITY_STEP;
m_eState = Hiding;
#if defined(COMPILE_USE_QT4) && (defined(COMPILE_ON_WINDOWS) || defined(Q_OS_MACX))
@@ -545,14 +545,14 @@ void KviNotifierWindow::doHide(bool bDoAnimate)
}
}
-void KviNotifierWindow::showEvent(QShowEvent *e)
+void KviNotifierWindow::showEvent(TQShowEvent *e)
{
computeRect();
setGeometry(m_wndRect); // w_win = w_wndRect
}
-void KviNotifierWindow::hideEvent(QHideEvent * e)
+void KviNotifierWindow::hideEvent(TQHideEvent * e)
{
if (m_bCrashShowWorkAround) return;
stopBlinkTimer();
@@ -572,8 +572,8 @@ void KviNotifierWindow::startBlinking()
if(!KVI_OPTION_BOOL(KviOption_boolDisableNotifierFlashing))
{
- m_pBlinkTimer = new QTimer();
- connect(m_pBlinkTimer,SIGNAL(timeout()),this,SLOT(blink()));
+ m_pBlinkTimer = new TQTimer();
+ connect(m_pBlinkTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(blink()));
m_iBlinkCount = 0;
m_pBlinkTimer->start(m_iBlinkTimeout);
}
@@ -588,12 +588,12 @@ void KviNotifierWindow::startAutoHideTimer()
int nSecs = m_tAutoHideAt - m_tStartedAt;
if(nSecs < 5)nSecs = 5;
- m_pAutoHideTimer = new QTimer();
- connect(m_pAutoHideTimer,SIGNAL(timeout()),this,SLOT(autoHide()));
+ m_pAutoHideTimer = new TQTimer();
+ connect(m_pAutoHideTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(autoHide()));
m_pAutoHideTimer->start(nSecs * 1000);
- m_pProgressTimer= new QTimer();
- connect(m_pProgressTimer,SIGNAL(timeout()),this,SLOT(progressUpdate()));
+ m_pProgressTimer= new TQTimer();
+ connect(m_pProgressTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(progressUpdate()));
m_pProgressTimer->start(60);
}
@@ -633,23 +633,23 @@ void KviNotifierWindow::markAllMessagesAsHistoric()
}
-static void blend_images(QImage &buffer,QImage &background,QImage &foreground,double dValue)
+static void blend_images(TQImage &buffer,TQImage &background,TQImage &foreground,double dValue)
{
for(int y = 0;y < buffer.height();y++)
{
- QRgb * dst = (QRgb *)buffer.scanLine(y);
- QRgb * end = dst + buffer.width();
- QRgb * bkg = (QRgb *)background.scanLine(y);
- QRgb * fgn = (QRgb *)foreground.scanLine(y);
+ TQRgb * dst = (TQRgb *)buffer.scanLine(y);
+ TQRgb * end = dst + buffer.width();
+ TQRgb * bkg = (TQRgb *)background.scanLine(y);
+ TQRgb * fgn = (TQRgb *)foreground.scanLine(y);
double dRemaining = 1.0 - dValue;
while(dst < end)
{
- *dst = qRgb(
- (int)((qRed(*bkg) * dRemaining) + (qRed(*fgn) * dValue)),
- (int)((qGreen(*bkg) * dRemaining) + (qGreen(*fgn) * dValue)),
- (int)((qBlue(*bkg) * dRemaining) + (qBlue(*fgn) * dValue))
+ *dst = tqRgb(
+ (int)((tqRed(*bkg) * dRemaining) + (tqRed(*fgn) * dValue)),
+ (int)((tqGreen(*bkg) * dRemaining) + (tqGreen(*fgn) * dValue)),
+ (int)((tqBlue(*bkg) * dRemaining) + (tqBlue(*fgn) * dValue))
);
dst++;
bkg++;
@@ -659,44 +659,44 @@ static void blend_images(QImage &buffer,QImage &background,QImage &foreground,do
}
}
-void KviNotifierWindow::paintEvent(QPaintEvent * e)
+void KviNotifierWindow::paintEvent(TQPaintEvent * e)
{
/*
if(m_bBlinkOn)
- bitBlt(&m_pixForeground,QPoint(0,0),&m_pixBackgroundHighlighted);
+ bitBlt(&m_pixForeground,TQPoint(0,0),&m_pixBackgroundHighlighted);
else
- bitBlt(&m_pixForeground,QPoint(0,0),&m_pixBackground);
+ bitBlt(&m_pixForeground,TQPoint(0,0),&m_pixBackground);
- QPainter p(&m_pixForeground);
+ TQPainter p(&m_pixForeground);
*/
redrawWindow();
redrawText();
if(m_dOpacity < 1.0)
{
- QPainter px(this);
+ TQPainter px(this);
#if defined(COMPILE_USE_QT4) && (defined(COMPILE_ON_WINDOWS) || defined(Q_OS_MACX))
px.drawPixmap(0,0,m_pixForeground);
#else
- QImage temp_image = m_pixForeground.convertToImage();
+ TQImage temp_image = m_pixForeground.convertToImage();
blend_images(m_imgBuffer,m_imgDesktop,temp_image,m_dOpacity);
px.drawImage(0,0,m_imgBuffer);
#endif
px.end();
} else {
#ifdef COMPILE_USE_QT4
- QPainter px(this);
+ TQPainter px(this);
px.drawPixmap(0,0,m_pixForeground);
#else
- bitBlt(this,QPoint(0,0),&m_pixForeground);
+ bitBlt(this,TQPoint(0,0),&m_pixForeground);
#endif
}
}
void KviNotifierWindow::redrawText()
{
- QPainter p(&m_pixForeground);
+ TQPainter p(&m_pixForeground);
// the current tab
KviNotifierWindowTab * tab = m_pWndTabs->currentTab();
@@ -715,19 +715,19 @@ void KviNotifierWindow::redrawText()
KviNotifierMessage * last = l->last();
// make sure that we can loop
- int iIdx = l->findRef(cur);
+ int iIdx = l->tqfindRef(cur);
if(iIdx == -1)
{
tab->setCurrentMessage(last);
cur = last;
- iIdx = l->findRef(cur);
+ iIdx = l->tqfindRef(cur);
}
int y = m_pWndBody->textRect().y() + m_pWndBody->textRect().height();
if(m_pLineEdit->isVisible())y -= (m_pLineEdit->height() + 4);
- QColorGroup grp = colorGroup();
+ TQColorGroup grp = tqcolorGroup();
int idx = iIdx;
KviNotifierMessage * m = cur;
@@ -738,19 +738,19 @@ void KviNotifierWindow::redrawText()
y -= iHeight;
if(m->historic())
{
- grp.setColor(QColorGroup::Text,m_clrHistoricText);
+ grp.setColor(TQColorGroup::Text,m_clrHistoricText);
} else {
if(m == last)
- grp.setColor(QColorGroup::Text,m_clrCurText);
+ grp.setColor(TQColorGroup::Text,m_clrCurText);
else {
int iClrIdx = l->count() - (idx + 2);
if(iClrIdx < 0)iClrIdx = 0;
else if(iClrIdx >= NUM_OLD_COLORS)iClrIdx = (NUM_OLD_COLORS - 1);
- grp.setColor(QColorGroup::Text,m_clrOldText[iClrIdx]);
+ grp.setColor(TQColorGroup::Text,m_clrOldText[iClrIdx]);
}
}
int iMaxY = y > m_pWndBody->textRect().y() ? y : m_pWndBody->textRect().y();
- QRect clip(m_pWndBody->textRect().x() + 20,iMaxY,m_pWndBody->textRect().width() - 20,iHeight);
+ TQRect clip(m_pWndBody->textRect().x() + 20,iMaxY,m_pWndBody->textRect().width() - 20,iHeight);
m->text()->draw(&p,m_pWndBody->textRect().x() + 20,y,clip,grp); //
if(y > m_pWndBody->textRect().y())
@@ -762,21 +762,21 @@ void KviNotifierWindow::redrawText()
idx--;
}
- p.setPen(QPen(m_clrTitle));
+ p.setPen(TQPen(m_clrTitle));
p.setFont(*m_pTitleFont);
- QString title;
- KviQString::sprintf(title,"[%d/%d]",iIdx + 1,l->count());
+ TQString title;
+ KviTQString::sprintf(title,"[%d/%d]",iIdx + 1,l->count());
if(tab->window())
{
title += " ";
title += tab->window()->plainTextCaption();
}
- p.drawText(m_pWndBorder->titleRect(),Qt::AlignLeft | Qt::SingleLine,title);
+ p.drawText(m_pWndBorder->titleRect(),TQt::AlignLeft | TQt::SingleLine,title);
p.end();
}
-void KviNotifierWindow::mouseMoveEvent(QMouseEvent * e)
+void KviNotifierWindow::mouseMoveEvent(TQMouseEvent * e)
{
//debug ("move on x,y: %d,%d", e->pos().x(), e->pos().y());
@@ -786,8 +786,8 @@ void KviNotifierWindow::mouseMoveEvent(QMouseEvent * e)
if(checkResizing(e->pos())) goto sartelo;
/* ### MOUSE-MOVE-EVENT -> m_pWndBorder ### */
- if (m_pWndBorder->captionRect().contains(e->pos())) {
- if (m_pWndBorder->closeRect().contains(e->pos())) {
+ if (m_pWndBorder->captionRect().tqcontains(e->pos())) {
+ if (m_pWndBorder->closeRect().tqcontains(e->pos())) {
m_pWndBorder->setCloseIcon(WDG_ICON_OVER);
} else {
m_pWndBorder->setCloseIcon(WDG_ICON_OUT);
@@ -798,14 +798,14 @@ void KviNotifierWindow::mouseMoveEvent(QMouseEvent * e)
if(m_pWndTabs->currentTab())
{
/* ### MOUSE-MOVE-EVENT -> m_pWndTabs ### */
- if (m_pWndTabs->rect().contains(e->pos())) {
+ if (m_pWndTabs->rect().tqcontains(e->pos())) {
m_pWndTabs->mouseMoveEvent(e);
goto sartelo;
}
/* ### MOUSE-MOVE-EVENT -> m_pWndBody ### */
- if (m_pWndBody->rect().contains(e->pos())) {
- if (m_pWndBody->rctWriteIcon().contains(e->pos())) {
+ if (m_pWndBody->rect().tqcontains(e->pos())) {
+ if (m_pWndBody->rctWriteIcon().tqcontains(e->pos())) {
m_pWndBody->setWriteIcon(WDG_ICON_ON);
} else {
m_pWndBody->setWriteIcon(WDG_ICON_OFF);
@@ -822,7 +822,7 @@ sartelo:
}
if(m_bDragging) {
- setCursor(Qt::SizeAllCursor);
+ setCursor(TQt::SizeAllCursor);
int w = m_wndRect.width();
int h = m_wndRect.height();
@@ -842,7 +842,7 @@ sartelo:
}
-void KviNotifierWindow::mousePressEvent(QMouseEvent * e)
+void KviNotifierWindow::mousePressEvent(TQMouseEvent * e)
{
// stop blinking first of all :)
@@ -867,15 +867,15 @@ void KviNotifierWindow::mousePressEvent(QMouseEvent * e)
if(checkResizing(m_pntClick)) goto sartelo;
- if(m_pWndTabs->rect().contains(e->pos()))
+ if(m_pWndTabs->rect().tqcontains(e->pos()))
{
m_pWndTabs->mousePressEvent(e);
goto sartelo;
}
- if(m_pWndBorder->captionRect().contains(e->pos())) {
+ if(m_pWndBorder->captionRect().tqcontains(e->pos())) {
//debug ("Clicked on m_pWndBorder->rect()");
- if(m_pWndBorder->closeRect().contains(e->pos())) {
+ if(m_pWndBorder->closeRect().tqcontains(e->pos())) {
//debug ("\tClicked on m_pWndBorder->closeRect()");
m_bCloseDown = true;
m_pWndBorder->setCloseIcon(WDG_ICON_CLICKED);
@@ -892,24 +892,24 @@ void KviNotifierWindow::mousePressEvent(QMouseEvent * e)
//debug ("x,y: %d,%d - width,height: %d,%d", m_pWndBorder->rect().x(),m_pWndBorder->rect().y(),m_pWndBorder->rect().width(),m_pWndBorder->rect().height());
- if (m_pWndBorder->rect().contains(e->pos())) {
+ if (m_pWndBorder->rect().tqcontains(e->pos())) {
if(m_pWndTabs->currentTab())
{
//debug ("Clicked on m_pWndBody->textRect()");
- if(m_pWndBody->rctWriteIcon().contains(e->pos()))
+ if(m_pWndBody->rctWriteIcon().tqcontains(e->pos()))
{
m_pWndBody->setWriteIcon(WDG_ICON_CLICKED);
showLineEdit(!(m_pLineEdit->isVisible()));
}
- if(m_pWndBody->rctPrevIcon().contains(e->pos()) && m_pWndBody->prevIconState()!=WDG_ICON_OFF)
+ if(m_pWndBody->rctPrevIcon().tqcontains(e->pos()) && m_pWndBody->prevIconState()!=WDG_ICON_OFF)
{
m_bPrevDown = true;
m_pWndBody->setPrevIcon(WDG_ICON_CLICKED);
prevButtonClicked();
}
- if(m_pWndBody->rctNextIcon().contains(e->pos()) && m_pWndBody->nextIconState()!=WDG_ICON_OFF)
+ if(m_pWndBody->rctNextIcon().tqcontains(e->pos()) && m_pWndBody->nextIconState()!=WDG_ICON_OFF)
{
m_bNextDown = true;
m_pWndBody->setNextIcon(WDG_ICON_CLICKED);
@@ -926,7 +926,7 @@ sartelo:
}
-void KviNotifierWindow::mouseReleaseEvent(QMouseEvent * e)
+void KviNotifierWindow::mouseReleaseEvent(TQMouseEvent * e)
{
m_bWriteDown = false;
m_bNextDown = false;
@@ -943,13 +943,13 @@ void KviNotifierWindow::mouseReleaseEvent(QMouseEvent * e)
if(m_bDragging)
{
m_bDragging = false;
- if(QApplication::overrideCursor()) QApplication::restoreOverrideCursor();
+ if(TQApplication::overrideCursor()) TQApplication::restoreOverrideCursor();
return;
}
- if(m_pWndBorder->captionRect().contains(e->pos())) {
+ if(m_pWndBorder->captionRect().tqcontains(e->pos())) {
- if(m_pWndBorder->closeRect().contains(e->pos())) {
+ if(m_pWndBorder->closeRect().tqcontains(e->pos())) {
//debug ("hide now from release event");
hideNow();
} else {
@@ -958,7 +958,7 @@ void KviNotifierWindow::mouseReleaseEvent(QMouseEvent * e)
}
- if(m_pWndTabs->rect().contains(e->pos()))
+ if(m_pWndTabs->rect().tqcontains(e->pos()))
{
m_pWndTabs->mouseReleaseEvent(e);
}
@@ -967,11 +967,11 @@ void KviNotifierWindow::mouseReleaseEvent(QMouseEvent * e)
}
-void KviNotifierWindow::mouseDoubleClickEvent(QMouseEvent * e)
+void KviNotifierWindow::mouseDoubleClickEvent(TQMouseEvent * e)
{
- if(!m_pWndBody->textRect().contains(e->pos()))
+ if(!m_pWndBody->textRect().tqcontains(e->pos()))
{
- QWidget::mouseDoubleClickEvent(e);
+ TQWidget::mouseDoubleClickEvent(e);
return;
}
@@ -984,31 +984,31 @@ void KviNotifierWindow::mouseDoubleClickEvent(QMouseEvent * e)
delayedRaise(tab->window());
}
-void KviNotifierWindow::keyPressEvent(QKeyEvent * e)
+void KviNotifierWindow::keyPressEvent(TQKeyEvent * e)
{
- if (e->key()==Qt::Key_Shift) {
+ if (e->key()==TQt::Key_Shift) {
m_bKeyShiftPressed = true;
return;
}
- if (e->key()==Qt::Key_Left && m_bKeyShiftPressed) {
+ if (e->key()==TQt::Key_Left && m_bKeyShiftPressed) {
m_pWndTabs->prev();
return;
}
- if (e->key()==Qt::Key_Right && m_bKeyShiftPressed) {
+ if (e->key()==TQt::Key_Right && m_bKeyShiftPressed) {
m_pWndTabs->next();
return;
}
- if (e->key()==Qt::Key_Escape) {
+ if (e->key()==TQt::Key_Escape) {
hideNow();
return;
}
}
-void KviNotifierWindow::keyReleaseEvent(QKeyEvent * e)
+void KviNotifierWindow::keyReleaseEvent(TQKeyEvent * e)
{
- if (e->key()==Qt::Key_Shift) {
+ if (e->key()==TQt::Key_Shift) {
m_bKeyShiftPressed = false;
}
}
@@ -1016,7 +1016,7 @@ void KviNotifierWindow::keyReleaseEvent(QKeyEvent * e)
void KviNotifierWindow::delayedRaise(KviWindow * pWnd)
{
m_pWindowToRaise = pWnd;
- QTimer::singleShot(0,this,SLOT(delayedRaiseSlot()));
+ TQTimer::singleShot(0,this,TQT_SLOT(delayedRaiseSlot()));
}
void KviNotifierWindow::delayedRaiseSlot()
@@ -1030,33 +1030,33 @@ void KviNotifierWindow::delayedRaiseSlot()
m_pWindowToRaise->frame()->show();
m_pWindowToRaise->frame()->raise();
- //((QWidget *)(m_pWindowToRaise->frame()))->setActiveWindow();
+ //((TQWidget *)(m_pWindowToRaise->frame()))->setActiveWindow();
m_pWindowToRaise->frame()->setFocus();
}
m_pWindowToRaise->delayedAutoRaise();
}
-bool KviNotifierWindow::checkResizing(QPoint e)
+bool KviNotifierWindow::checkResizing(TQPoint e)
{
if (e.y()<WDG_BORDER_THICKNESS) {
if (e.x()<WDG_BORDER_THICKNESS) {
//// UP LEFT CORNER ////
- setCursor(Qt::SizeFDiagCursor);
+ setCursor(TQt::SizeFDiagCursor);
if (m_bLeftButtonIsPressed) {
m_bResizing = true;
m_whereResizing = WDG_UPSX;
}
} else if (e.x() > (size().width()-WDG_BORDER_THICKNESS)) {
//// UP RIGHT CORNER ////
- setCursor(Qt::SizeBDiagCursor);
+ setCursor(TQt::SizeBDiagCursor);
if (m_bLeftButtonIsPressed) {
m_bResizing = true;
m_whereResizing = WDG_UPDX;
}
} else {
//// UP SIDE ////
- setCursor(Qt::SizeVerCursor);
+ setCursor(TQt::SizeVerCursor);
if (m_bLeftButtonIsPressed) {
m_bResizing = true;
m_whereResizing = WDG_UP;
@@ -1064,21 +1064,21 @@ bool KviNotifierWindow::checkResizing(QPoint e)
} else if (e.y() > (size().height()-WDG_BORDER_THICKNESS)) {
if (e.x()<WDG_BORDER_THICKNESS) {
//// DOWN LEFT CORNER ////
- setCursor(Qt::SizeBDiagCursor);
+ setCursor(TQt::SizeBDiagCursor);
if (m_bLeftButtonIsPressed) {
m_bResizing = true;
m_whereResizing = WDG_DWNSX;
}
} else if (e.x() > (size().width()-WDG_BORDER_THICKNESS)) {
//// DOWN RIGHT CORNER ////
- setCursor(Qt::SizeFDiagCursor);
+ setCursor(TQt::SizeFDiagCursor);
if (m_bLeftButtonIsPressed) {
m_bResizing = true;
m_whereResizing = WDG_DWNDX;
}
} else {
//// DOWN SIDE ////
- setCursor(Qt::SizeVerCursor);
+ setCursor(TQt::SizeVerCursor);
if (m_bLeftButtonIsPressed) {
m_bResizing = true;
m_whereResizing = WDG_DWN;
@@ -1087,14 +1087,14 @@ bool KviNotifierWindow::checkResizing(QPoint e)
} else {
if (e.x()<WDG_BORDER_THICKNESS) {
//// LEFT SIZE ////
- setCursor(Qt::SizeHorCursor);
+ setCursor(TQt::SizeHorCursor);
if (m_bLeftButtonIsPressed) {
m_bResizing = true;
m_whereResizing = WDG_SX;
}
} else if (e.x() > (size().width()-WDG_BORDER_THICKNESS)) {
//// RIGHT SIZE ////
- setCursor(Qt::SizeHorCursor);
+ setCursor(TQt::SizeHorCursor);
if (m_bLeftButtonIsPressed) {
m_bResizing = true;
m_whereResizing = WDG_DX;
@@ -1111,9 +1111,9 @@ bool KviNotifierWindow::checkResizing(QPoint e)
-void KviNotifierWindow::resize(QPoint p, bool up)
+void KviNotifierWindow::resize(TQPoint p, bool up)
{
- //QPoint aux = mapToGlobal(p);
+ //TQPoint aux = mapToGlobal(p);
if (m_whereResizing==WDG_UPSX || m_whereResizing==WDG_SX || m_whereResizing==WDG_DWNSX) {
if ((x() + width() - cursor().pos().x()) < WDG_MIN_WIDTH)
@@ -1162,7 +1162,7 @@ void KviNotifierWindow::redrawWindow()
m_pProgressBar->setHeight(m_pWndBorder->bodyRect().height() + m_pWndBorder->tabsRect().height());
}
- QPainter paint;
+ TQPainter paint;
if(m_bBlinkOn)
{
m_pWndBorder->touch();
@@ -1191,27 +1191,27 @@ void KviNotifierWindow::redrawWindow()
}
inline void KviNotifierWindow::setCursor(int cur) {
- if (m_cursor.shape() != cur) {
- if(QApplication::overrideCursor()) QApplication::restoreOverrideCursor();
+ if (m_cursor.tqshape() != cur) {
+ if(TQApplication::overrideCursor()) TQApplication::restoreOverrideCursor();
m_cursor.setShape((Qt::CursorShape)cur);
- QApplication::setOverrideCursor(m_cursor);
+ TQApplication::setOverrideCursor(m_cursor);
} else if (cur==-1)
- if(QApplication::overrideCursor()) QApplication::restoreOverrideCursor();
+ if(TQApplication::overrideCursor()) TQApplication::restoreOverrideCursor();
}
-void KviNotifierWindow::enterEvent(QEvent * e)
+void KviNotifierWindow::enterEvent(TQEvent * e)
{
#ifdef COMPILE_USE_QT4
if(!m_pShowHideTimer) {
- m_pShowHideTimer = new QTimer();
- connect(m_pShowHideTimer,SIGNAL(timeout()),this,SLOT(heartbeat()));
+ m_pShowHideTimer = new TQTimer();
+ connect(m_pShowHideTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat()));
}
m_eState = FocusingOn;
m_pShowHideTimer->start(40);
#endif
}
-void KviNotifierWindow::leaveEvent(QEvent * e)
+void KviNotifierWindow::leaveEvent(TQEvent * e)
{
// Leaving the widget area, restore default cursor
m_pWndBorder->resetIcons();
@@ -1220,21 +1220,21 @@ void KviNotifierWindow::leaveEvent(QEvent * e)
setCursor(-1);
#ifdef COMPILE_USE_QT4
if(!m_pShowHideTimer) {
- m_pShowHideTimer = new QTimer();
- connect(m_pShowHideTimer,SIGNAL(timeout()),this,SLOT(heartbeat()));
+ m_pShowHideTimer = new TQTimer();
+ connect(m_pShowHideTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(heartbeat()));
}
m_eState = FocusingOff;
m_pShowHideTimer->start(40);
#endif
}
-void KviNotifierWindow::contextPopup(const QPoint &pos)
+void KviNotifierWindow::contextPopup(const TQPoint &pos)
{
if(!m_pContextPopup)
{
- m_pContextPopup = new QPopupMenu(this);
- connect(m_pContextPopup,SIGNAL(aboutToShow()),this,SLOT(fillContextPopup()));
- m_pDisablePopup = new QPopupMenu(this);
+ m_pContextPopup = new TQPopupMenu(this);
+ connect(m_pContextPopup,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(fillContextPopup()));
+ m_pDisablePopup = new TQPopupMenu(this);
}
m_pContextPopup->popup(pos);
@@ -1244,19 +1244,19 @@ void KviNotifierWindow::fillContextPopup()
{
m_pContextPopup->clear();
- m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)),__tr2qs_ctx("Hide","notifier"),this,SLOT(hideNow()));
+ m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_CLOSE)),__tr2qs_ctx("Hide","notifier"),this,TQT_SLOT(hideNow()));
m_pContextPopup->insertSeparator();
m_pDisablePopup->clear();
- m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("1 Minute","notifier"),this,SLOT(disableFor1Minute()));
- m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("5 Minutes","notifier"),this,SLOT(disableFor5Minutes()));
- m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("15 Minutes","notifier"),this,SLOT(disableFor15Minutes()));
- m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("30 Minutes","notifier"),this,SLOT(disableFor30Minutes()));
- m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("1 Hour","notifier"),this,SLOT(disableFor60Minutes()));
+ m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("1 Minute","notifier"),this,TQT_SLOT(disableFor1Minute()));
+ m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("5 Minutes","notifier"),this,TQT_SLOT(disableFor5Minutes()));
+ m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("15 Minutes","notifier"),this,TQT_SLOT(disableFor15Minutes()));
+ m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("30 Minutes","notifier"),this,TQT_SLOT(disableFor30Minutes()));
+ m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TIME)),__tr2qs_ctx("1 Hour","notifier"),this,TQT_SLOT(disableFor60Minutes()));
m_pDisablePopup->insertSeparator();
- m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)),__tr2qs_ctx("Until KVIrc is Restarted","notifier"),this,SLOT(disableUntilKVIrcRestarted()));
- m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)),__tr2qs_ctx("Permanently (Until Explicitly Enabled)","notifier"),this,SLOT(disablePermanently()));
+ m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)),__tr2qs_ctx("Until KVIrc is Restarted","notifier"),this,TQT_SLOT(disableUntilKVIrcRestarted()));
+ m_pDisablePopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)),__tr2qs_ctx("Permanently (Until Explicitly Enabled)","notifier"),this,TQT_SLOT(disablePermanently()));
- m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_QUIT)),__tr2qs_ctx("Disable","notifier"),m_pDisablePopup);
+ m_pContextPopup->insertItem(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_TQUIT)),__tr2qs_ctx("Disable","notifier"),m_pDisablePopup);
}
void KviNotifierWindow::disableFor15Minutes()
@@ -1316,7 +1316,7 @@ void KviNotifierWindow::disablePermanently()
hideNow();
}
-void KviNotifierWindow::wheelEvent(QWheelEvent * e)
+void KviNotifierWindow::wheelEvent(TQWheelEvent * e)
{
if(e->delta() > 0)prevButtonClicked();
else nextButtonClicked();
@@ -1346,12 +1346,12 @@ void KviNotifierWindow::showLineEdit(bool bShow)
//if(m_pLineEdit->isVisible())return;
if(!m_pWndTabs->currentMessage())return;
if(!m_pWndTabs->currentTab()->window())return;
- QToolTip::remove(m_pLineEdit);
- QString tip = __tr2qs_ctx("Write text or commands to window","notifier");
+ TQToolTip::remove(m_pLineEdit);
+ TQString tip = __tr2qs_ctx("Write text or commands to window","notifier");
tip += " \"";
tip += m_pWndTabs->currentTab()->window()->plainTextCaption();
tip += "\"";
- QToolTip::add(m_pLineEdit,tip);
+ TQToolTip::add(m_pLineEdit,tip);
m_pLineEdit->setGeometry(m_pWndBody->textRect().x(),m_pWndBody->textRect().y() + m_pWndBody->textRect().height() - m_iInputHeight,m_pWndBody->textRect().width(),m_iInputHeight);
m_pLineEdit->show();
m_pLineEdit->setFocus();
@@ -1367,11 +1367,11 @@ void KviNotifierWindow::showLineEdit(bool bShow)
}
}
-bool KviNotifierWindow::eventFilter(QObject * pEdit,QEvent * e)
+bool KviNotifierWindow::eventFilter(TQObject * pEdit,TQEvent * e)
{
- if(pEdit != (QObject *)m_pLineEdit)return false; // huh ?
+ if(pEdit != (TQObject *)m_pLineEdit)return false; // huh ?
if(!m_pLineEdit->isVisible())return false;
- if(e->type() == QEvent::MouseButtonPress)
+ if(e->type() == TQEvent::MouseButtonPress)
{
bool bWasBlinkOn = m_bBlinkOn;
m_bBlinkOn = false;
@@ -1383,9 +1383,9 @@ bool KviNotifierWindow::eventFilter(QObject * pEdit,QEvent * e)
if(bWasBlinkOn)update();
return true;
}
- if(e->type() == QEvent::KeyPress)
+ if(e->type() == TQEvent::KeyPress)
{
- if(((QKeyEvent *)e)->key() == Qt::Key_Escape)
+ if(((TQKeyEvent *)e)->key() == TQt::Key_Escape)
{
hideNow();
return true;
@@ -1403,16 +1403,16 @@ void KviNotifierWindow::returnPressed()
if(!tab->currentMessage())return;
if(!tab->window())return;
- QString txt = m_pLineEdit->text();
+ TQString txt = m_pLineEdit->text();
if(txt.isEmpty())return;
- QString html = txt;
- html.replace("<","&lt;");
- html.replace(">","&gt;");
+ TQString html = txt;
+ html.tqreplace("<","&lt;");
+ html.tqreplace(">","&gt;");
KviStr tmp(KviStr::Format,"%d",KVI_SMALLICON_OWNPRIVMSG);
addMessage(tab->window(),tmp.ptr(),html,0); //m_pCurrentFocusedWindowTab on place of m_pCurrentMessage->window()
m_pLineEdit->setText("");
- KviUserInput::parse(txt,tab->window(),QString::null,1);
+ KviUserInput::parse(txt,tab->window(),TQString(),1);
}
void KviNotifierWindow::progressUpdate()
@@ -1420,7 +1420,7 @@ void KviNotifierWindow::progressUpdate()
double dProgress = m_qtStartedAt.elapsed()/(m_tAutoHideAt - m_tStartedAt);
dProgress/=1000;
m_pProgressBar->setProgress(dProgress);
- QPainter p(this);
+ TQPainter p(this);
m_pProgressBar->draw(&p);
}
#include "m_notifierwindow.moc"
diff --git a/src/modules/notifier/notifierwindow.h b/src/modules/notifier/notifierwindow.h
index be5e3b6e..dfc9d6de 100644
--- a/src/modules/notifier/notifierwindow.h
+++ b/src/modules/notifier/notifierwindow.h
@@ -26,17 +26,17 @@
#include "kvi_settings.h"
-#include <qbitmap.h>
-#include <qcolor.h>
-#include <qcursor.h>
-#include <qdatetime.h>
-#include <qfont.h>
-#include <qimage.h>
-#include <qlineedit.h>
-#include <qpixmap.h>
-#include <qrect.h>
-#include <qtimer.h>
-#include <qwidget.h>
+#include <tqbitmap.h>
+#include <tqcolor.h>
+#include <tqcursor.h>
+#include <tqdatetime.h>
+#include <tqfont.h>
+#include <tqimage.h>
+#include <tqlineedit.h>
+#include <tqpixmap.h>
+#include <tqrect.h>
+#include <tqtimer.h>
+#include <tqwidget.h>
#include "kvi_qstring.h"
#include "kvi_pointerlist.h"
@@ -52,34 +52,35 @@ class KviNotifierWindowBorder;
class KviNotifierWindowProgressBar;
class KviNotifierWindowTabs;
-class QPainter;
-class QPopupMenu;
+class TQPainter;
+class TQPopupMenu;
extern kvi_time_t g_tNotifierDisabledUntil;
-class KviNotifierWindow : public QWidget
+class KviNotifierWindow : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
KviNotifierWindow();
~KviNotifierWindow();
protected:
- QTimer * m_pShowHideTimer;
- QTimer * m_pProgressTimer;
- QTimer * m_pBlinkTimer;
- QTimer * m_pAutoHideTimer;
+ TQTimer * m_pShowHideTimer;
+ TQTimer * m_pProgressTimer;
+ TQTimer * m_pBlinkTimer;
+ TQTimer * m_pAutoHideTimer;
State m_eState;
bool m_bBlinkOn;
double m_dOpacity;
- QImage m_imgDesktop; // the desktop screenshot
- QPixmap m_pixBackground; // our background image
- QPixmap m_pixBackgroundHighlighted;
- QPixmap m_pixForeground; // we paint the stuff HERE
+ TQImage m_imgDesktop; // the desktop screenshot
+ TQPixmap m_pixBackground; // our background image
+ TQPixmap m_pixBackgroundHighlighted;
+ TQPixmap m_pixForeground; // we paint the stuff HERE
- // Notifier graphic layout
- QPixmap m_pixBckgrnd;
+ // Notifier graphic tqlayout
+ TQPixmap m_pixBckgrnd;
- QImage m_imgBuffer; // here we merge the two images
+ TQImage m_imgBuffer; // here we merge the two images
bool m_bCloseDown;
bool m_bPrevDown;
@@ -89,18 +90,18 @@ protected:
bool m_bKeyShiftPressed;
- QFont * m_pDefaultFont;
- QFont * m_pTitleFont;
+ TQFont * m_pDefaultFont;
+ TQFont * m_pTitleFont;
- QRect m_wndRect;
+ TQRect m_wndRect;
- QColor m_clrCurText;
- QColor m_clrOldText[NUM_OLD_COLORS];
- QColor m_clrHistoricText;
- QColor m_clrTitle;
+ TQColor m_clrCurText;
+ TQColor m_clrOldText[NUM_OLD_COLORS];
+ TQColor m_clrHistoricText;
+ TQColor m_clrTitle;
KviNotifierMessage * m_pCurrentMessage;
- QLineEdit * m_pLineEdit;
+ TQLineEdit * m_pLineEdit;
bool m_bDragging;
bool m_bLeftButtonIsPressed;
@@ -109,22 +110,22 @@ protected:
int m_whereResizing;
- QPoint m_pntDrag;
- QPoint m_pntPos;
- QPoint m_pntClick;
+ TQPoint m_pntDrag;
+ TQPoint m_pntPos;
+ TQPoint m_pntClick;
int m_iInputHeight;
int m_iBlinkTimeout;
int m_iBlinkCount;
- QPopupMenu * m_pContextPopup;
- QPopupMenu * m_pDisablePopup;
+ TQPopupMenu * m_pContextPopup;
+ TQPopupMenu * m_pDisablePopup;
KviWindow * m_pWindowToRaise;
kvi_time_t m_tAutoHideAt;
kvi_time_t m_tStartedAt;
- QTime m_qtStartedAt;
+ TQTime m_qtStartedAt;
bool m_bDisableHideOnMainWindowGotAttention;
//bool m_bForceShowing;
- QCursor m_cursor;
+ TQCursor m_cursor;
KviNotifierWindowTabs * m_pWndTabs;
KviNotifierWindowProgressBar * m_pProgressBar;
@@ -133,27 +134,27 @@ protected:
public:
void doShow(bool bDoAnimate);
void doHide(bool bDoAnimate);
- const QFont & defaultFont(){ return *m_pDefaultFont; };
+ const TQFont & defaultFont(){ return *m_pDefaultFont; };
int textWidth();
- void addMessage(KviWindow * pWnd,const QString &szImageId,const QString &szText,unsigned int uMessageTime);
+ void addMessage(KviWindow * pWnd,const TQString &szImageId,const TQString &szText,unsigned int uMessageTime);
State state() { return m_eState; };
void setDisableHideOnMainWindowGotAttention(bool b){ m_bDisableHideOnMainWindowGotAttention = b; };
int countTabs();
void showLineEdit(bool bShow);
protected:
- virtual void showEvent(QShowEvent *e);
- virtual void hideEvent(QHideEvent * e);
- virtual void paintEvent(QPaintEvent * e);
- virtual void mousePressEvent(QMouseEvent * e);
- virtual void mouseReleaseEvent(QMouseEvent * e);
- virtual void mouseMoveEvent(QMouseEvent * e);
- virtual void leaveEvent(QEvent * e);
- virtual void enterEvent(QEvent * e);
- virtual void mouseDoubleClickEvent(QMouseEvent * e);
- virtual void wheelEvent(QWheelEvent * e);
- virtual bool eventFilter(QObject * pEdit,QEvent * e);
- virtual void keyPressEvent ( QKeyEvent * e );
- virtual void keyReleaseEvent ( QKeyEvent * e );
+ virtual void showEvent(TQShowEvent *e);
+ virtual void hideEvent(TQHideEvent * e);
+ virtual void paintEvent(TQPaintEvent * e);
+ virtual void mousePressEvent(TQMouseEvent * e);
+ virtual void mouseReleaseEvent(TQMouseEvent * e);
+ virtual void mouseMoveEvent(TQMouseEvent * e);
+ virtual void leaveEvent(TQEvent * e);
+ virtual void enterEvent(TQEvent * e);
+ virtual void mouseDoubleClickEvent(TQMouseEvent * e);
+ virtual void wheelEvent(TQWheelEvent * e);
+ virtual bool eventFilter(TQObject * pEdit,TQEvent * e);
+ virtual void keyPressEvent ( TQKeyEvent * e );
+ virtual void keyReleaseEvent ( TQKeyEvent * e );
protected slots:
void blink();
void heartbeat();
@@ -172,7 +173,7 @@ protected slots:
void autoHide();
void progressUpdate();
private:
- void contextPopup(const QPoint &pos);
+ void contextPopup(const TQPoint &pos);
void startBlinking();
void markAllMessagesAsHistoric();
void computeRect();
@@ -185,10 +186,10 @@ private:
void nextButtonClicked();
bool shouldHideIfMainWindowGotAttention();
void setCursor(int);
- void resize(QPoint p, bool = true);
+ void resize(TQPoint p, bool = true);
void redrawWindow();
void redrawText();
- bool checkResizing(QPoint);
+ bool checkResizing(TQPoint);
};
#endif //_NOTIFIERWINDOW_H_
diff --git a/src/modules/notifier/notifierwindowbody.cpp b/src/modules/notifier/notifierwindowbody.cpp
index 7449aa9e..397068cd 100644
--- a/src/modules/notifier/notifierwindowbody.cpp
+++ b/src/modules/notifier/notifierwindowbody.cpp
@@ -26,19 +26,19 @@
#include "kvi_iconmanager.h"
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qpainter.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqpainter.h>
/*
#ifdef QT3_SUPPORT
#include <Q3Painter>
#else
- #include <qpainter.h>
+ #include <tqpainter.h>
#endif
*/
-KviNotifierWindowBody::KviNotifierWindowBody(QRect r)
+KviNotifierWindowBody::KviNotifierWindowBody(TQRect r)
{
loadImages();
setHeight(r.height());
@@ -55,7 +55,7 @@ KviNotifierWindowBody::~KviNotifierWindowBody()
void KviNotifierWindowBody::loadImages()
{
- QPixmap * p;
+ TQPixmap * p;
if((p = g_pIconManager->getPixmap("notifier_pix_body_dx.png")))
m_pixDX = *p;
if((p = g_pIconManager->getPixmap("notifier_pix_body_sx.png")))
@@ -189,11 +189,11 @@ void KviNotifierWindowBody::setWriteIcon(int state) {
}
};
-void KviNotifierWindowBody::draw(QPainter * p) {
+void KviNotifierWindowBody::draw(TQPainter * p) {
if (m_bNeedToRedraw) {
- p->fillRect(QRect(m_pnt,m_rct.size()),m_mac_bkgColor);
+ p->fillRect(TQRect(m_pnt,m_rct.size()),m_mac_bkgColor);
// Autotiled borders
p->drawTiledPixmap(m_pnt.x(), m_pnt.y(), m_pixSX.width(), m_rct.height() - m_pixDWNSX.height() - m_pixKVIrcSX.height(), m_pixSX);
@@ -219,14 +219,14 @@ void KviNotifierWindowBody::draw(QPainter * p) {
}
}
-void KviNotifierWindowBody::mouseMoveEvent(QMouseEvent * e) {
+void KviNotifierWindowBody::mouseMoveEvent(TQMouseEvent * e) {
}
-void KviNotifierWindowBody::mousePressEvent(QMouseEvent * e) {
+void KviNotifierWindowBody::mousePressEvent(TQMouseEvent * e) {
}
-void KviNotifierWindowBody::mouseReleaseEvent(QMouseEvent * e) {
+void KviNotifierWindowBody::mouseReleaseEvent(TQMouseEvent * e) {
}
diff --git a/src/modules/notifier/notifierwindowbody.h b/src/modules/notifier/notifierwindowbody.h
index e59df9f9..dafde1d0 100644
--- a/src/modules/notifier/notifierwindowbody.h
+++ b/src/modules/notifier/notifierwindowbody.h
@@ -24,65 +24,65 @@
//
//=============================================================================
-#include <qevent.h>
-#include <qrect.h>
-#include <qpoint.h>
-#include <qpixmap.h>
+#include <tqevent.h>
+#include <tqrect.h>
+#include <tqpoint.h>
+#include <tqpixmap.h>
#include "notifiersettings.h"
/*
#ifdef QT3_SUPPORT
- #define QPainter Q3Painter
+ #define TQPainter Q3Painter
#endif
*/
-class QPainter;
+class TQPainter;
class KviNotifierWindowBody
{
public:
- KviNotifierWindowBody(QRect r);
+ KviNotifierWindowBody(TQRect r);
~KviNotifierWindowBody();
// ================================
// Put members declaration below...
// ================================
private:
- QRect m_rct;
- QPoint m_pnt;
+ TQRect m_rct;
+ TQPoint m_pnt;
- QRect m_textRect;
+ TQRect m_textRect;
- QRect m_rctWriteIcon;
- QRect m_rctPrevIcon;
- QRect m_rctNextIcon;
- QRect m_rctCloseTabIcon;
+ TQRect m_rctWriteIcon;
+ TQRect m_rctPrevIcon;
+ TQRect m_rctNextIcon;
+ TQRect m_rctCloseTabIcon;
// Pictures
- QPixmap m_pixDX;
- QPixmap m_pixSX;
- QPixmap m_pixDWNSX;
- QPixmap m_pixDWNDX;
- QPixmap m_pixDWN;
- QPixmap m_pixKVIrcSX;
- QPixmap m_pixKVIrcDWN;
- QPixmap m_pixKVIrc;
+ TQPixmap m_pixDX;
+ TQPixmap m_pixSX;
+ TQPixmap m_pixDWNSX;
+ TQPixmap m_pixDWNDX;
+ TQPixmap m_pixDWN;
+ TQPixmap m_pixKVIrcSX;
+ TQPixmap m_pixKVIrcDWN;
+ TQPixmap m_pixKVIrc;
- QPixmap m_pixIconPrev;
- QPixmap m_pixIconPrev_off;
- QPixmap m_pixIconPrev_on;
- QPixmap m_pixIconPrev_clicked;
+ TQPixmap m_pixIconPrev;
+ TQPixmap m_pixIconPrev_off;
+ TQPixmap m_pixIconPrev_on;
+ TQPixmap m_pixIconPrev_clicked;
- QPixmap m_pixIconNext;
- QPixmap m_pixIconNext_off;
- QPixmap m_pixIconNext_on;
- QPixmap m_pixIconNext_clicked;
+ TQPixmap m_pixIconNext;
+ TQPixmap m_pixIconNext_off;
+ TQPixmap m_pixIconNext_on;
+ TQPixmap m_pixIconNext_clicked;
- QPixmap m_pixIconWrite;
- QPixmap m_pixIconWrite_off;
- QPixmap m_pixIconWrite_on;
- QPixmap m_pixIconWrite_clicked;
+ TQPixmap m_pixIconWrite;
+ TQPixmap m_pixIconWrite_off;
+ TQPixmap m_pixIconWrite_on;
+ TQPixmap m_pixIconWrite_clicked;
bool m_bNeedToRedraw;
@@ -105,7 +105,7 @@ public:
void setWidth(int w);
void setHeight(int h);
void resize(int w, int h) { setWidth(w); setHeight(h); };
- void resize(QRect r) { setWidth(r.width()); setHeight(r.height()); };
+ void resize(TQRect r) { setWidth(r.width()); setHeight(r.height()); };
void setPoint(int x, int y) { m_pnt.setX(x); m_pnt.setY(y); };
void setPrevIcon(int state);
@@ -122,21 +122,21 @@ public:
int height() { return m_rct.height(); };
int baseLine() { return (y()+height()); };
- QRect rect() { return m_rct; };
- QRect textRect() { return m_textRect; };
- QRect rctPrevIcon() { return m_rctPrevIcon; };
- QRect rctNextIcon() { return m_rctNextIcon; };
- QRect rctWriteIcon() { return m_rctWriteIcon; };
+ TQRect rect() { return m_rct; };
+ TQRect textRect() { return m_textRect; };
+ TQRect rctPrevIcon() { return m_rctPrevIcon; };
+ TQRect rctNextIcon() { return m_rctNextIcon; };
+ TQRect rctWriteIcon() { return m_rctWriteIcon; };
void needToRedraw() { m_bNeedToRedraw = true; };
void recalculatePositions();
void touch() { m_bNeedToRedraw = true; };
- void draw(QPainter *);
+ void draw(TQPainter *);
- void mouseMoveEvent(QMouseEvent * e);
- void mousePressEvent(QMouseEvent * e);
- void mouseReleaseEvent(QMouseEvent * e);
+ void mouseMoveEvent(TQMouseEvent * e);
+ void mousePressEvent(TQMouseEvent * e);
+ void mouseReleaseEvent(TQMouseEvent * e);
diff --git a/src/modules/notifier/notifierwindowborder.cpp b/src/modules/notifier/notifierwindowborder.cpp
index efd9ec0d..9ff4c29e 100644
--- a/src/modules/notifier/notifierwindowborder.cpp
+++ b/src/modules/notifier/notifierwindowborder.cpp
@@ -26,9 +26,9 @@
#include "notifierwindowtabs.h"
#include "kvi_iconmanager.h"
-#include <qpainter.h>
+#include <tqpainter.h>
-KviNotifierWindowBorder::KviNotifierWindowBorder(QSize s)
+KviNotifierWindowBorder::KviNotifierWindowBorder(TQSize s)
{
loadImages();
resize(s);
@@ -42,7 +42,7 @@ void KviNotifierWindowBorder::loadImages() {
// Normal Border
- QPixmap * p;
+ TQPixmap * p;
if((p = g_pIconManager->getPixmap("notifier_pix_wnd_sx.png")))
m_pixSX_N = *p;
@@ -153,7 +153,7 @@ void KviNotifierWindowBorder::recalculatePositions()
{
m_rct.setHeight(m_iRctHeight);
m_rct.setWidth(m_iRctWidth);
- m_rct.setTopLeft(QPoint(0,0));
+ m_rct.setTopLeft(TQPoint(0,0));
m_closeIconRect.setX(m_rct.width()-m_pixCaptionDX->width()-m_pixIconClose->width());
m_closeIconRect.setY(2);
@@ -161,19 +161,19 @@ void KviNotifierWindowBorder::recalculatePositions()
m_closeIconRect.setHeight(m_pixIconClose->height());
m_captionRect.setTopLeft( m_rct.topLeft() );
- m_captionRect.setSize( QSize(m_rct.width(),m_pixCaptionDX->height()) );
+ m_captionRect.setSize( TQSize(m_rct.width(),m_pixCaptionDX->height()) );
- m_tabsRect.setTopLeft( QPoint(m_pixCaptionDX->width()+7,m_captionRect.height()) );
- m_tabsRect.setSize( QSize(m_captionRect.width()-(2*m_pixCaptionDX->width())-7,m_iTabsHeight) );
+ m_tabsRect.setTopLeft( TQPoint(m_pixCaptionDX->width()+7,m_captionRect.height()) );
+ m_tabsRect.setSize( TQSize(m_captionRect.width()-(2*m_pixCaptionDX->width())-7,m_iTabsHeight) );
- m_bodyRect.setTopLeft( QPoint(m_pixCaptionDX->width()+7,m_captionRect.height()+m_tabsRect.height()) );
- m_bodyRect.setSize( QSize(m_captionRect.width()-(2*m_pixCaptionDX->width())-7,m_rct.height()-m_captionRect.height()-m_pixDWN->height()-m_tabsRect.height()) );
+ m_bodyRect.setTopLeft( TQPoint(m_pixCaptionDX->width()+7,m_captionRect.height()+m_tabsRect.height()) );
+ m_bodyRect.setSize( TQSize(m_captionRect.width()-(2*m_pixCaptionDX->width())-7,m_rct.height()-m_captionRect.height()-m_pixDWN->height()-m_tabsRect.height()) );
- m_titleRect.setTopLeft( QPoint(m_pixCaptionSX->width(), (m_captionRect.height()-m_iTitleFontHeight)/2 ) );
- m_titleRect.setSize( QSize(m_rct.width()-m_pixCaptionSX->width()-m_pixCaptionDX->width(),m_iTitleFontHeight) );
+ m_titleRect.setTopLeft( TQPoint(m_pixCaptionSX->width(), (m_captionRect.height()-m_iTitleFontHeight)/2 ) );
+ m_titleRect.setSize( TQSize(m_rct.width()-m_pixCaptionSX->width()-m_pixCaptionDX->width(),m_iTitleFontHeight) );
- m_progressRect.setTopLeft( QPoint(m_pixCaptionDX->width(),m_pixCaptionDX->height()));
- m_progressRect.setSize( QSize(6,m_iRctHeight-m_pixCaptionDX->height()-m_pixDWN->height()));
+ m_progressRect.setTopLeft( TQPoint(m_pixCaptionDX->width(),m_pixCaptionDX->height()));
+ m_progressRect.setSize( TQSize(6,m_iRctHeight-m_pixCaptionDX->height()-m_pixDWN->height()));
m_bNeedToRedraw = true;
}
@@ -191,7 +191,7 @@ void KviNotifierWindowBorder::resetIcons() {
setCloseIcon(WDG_ICON_OUT);
}
-void KviNotifierWindowBorder::draw(QPainter * p, bool b) {
+void KviNotifierWindowBorder::draw(TQPainter * p, bool b) {
if (m_bNeedToRedraw) {
setPics(b);
diff --git a/src/modules/notifier/notifierwindowborder.h b/src/modules/notifier/notifierwindowborder.h
index 5c36827b..9bbd68fd 100644
--- a/src/modules/notifier/notifierwindowborder.h
+++ b/src/modules/notifier/notifierwindowborder.h
@@ -26,71 +26,71 @@
#include "notifiersettings.h"
-#include <qsize.h>
-#include <qrect.h>
-#include <qpixmap.h>
+#include <tqsize.h>
+#include <tqrect.h>
+#include <tqpixmap.h>
-class QPainter;
+class TQPainter;
class KviNotifierWindowBorder
{
public:
- KviNotifierWindowBorder(QSize = QSize(WDG_MIN_WIDTH,WDG_MIN_HEIGHT));
+ KviNotifierWindowBorder(TQSize = TQSize(WDG_MIN_WIDTH,WDG_MIN_HEIGHT));
~KviNotifierWindowBorder();
// ================================
// Put members declaration below...
// ================================
private:
- QRect m_rct;
- QPoint m_pnt;
+ TQRect m_rct;
+ TQPoint m_pnt;
- QRect m_closeIconRect;
+ TQRect m_closeIconRect;
- QRect m_captionRect;
- QRect m_bodyRect;
- QRect m_tabsRect;
- QRect m_titleRect;
+ TQRect m_captionRect;
+ TQRect m_bodyRect;
+ TQRect m_tabsRect;
+ TQRect m_titleRect;
- QRect m_progressRect;
+ TQRect m_progressRect;
// Pictures
- QPixmap * m_pixSX;
- QPixmap * m_pixDX;
- QPixmap * m_pixDWN;
- QPixmap * m_pixDWNSX;
- QPixmap * m_pixDWNDX;
- QPixmap * m_pixCaptionSX;
- QPixmap * m_pixCaptionDX;
- QPixmap * m_pixCaptionBKG;
- QPixmap * m_pixIconClose_out;
- QPixmap * m_pixIconClose_over;
- QPixmap * m_pixIconClose_clicked;
- QPixmap * m_pixIconClose;
+ TQPixmap * m_pixSX;
+ TQPixmap * m_pixDX;
+ TQPixmap * m_pixDWN;
+ TQPixmap * m_pixDWNSX;
+ TQPixmap * m_pixDWNDX;
+ TQPixmap * m_pixCaptionSX;
+ TQPixmap * m_pixCaptionDX;
+ TQPixmap * m_pixCaptionBKG;
+ TQPixmap * m_pixIconClose_out;
+ TQPixmap * m_pixIconClose_over;
+ TQPixmap * m_pixIconClose_clicked;
+ TQPixmap * m_pixIconClose;
- QPixmap m_pixSX_N;
- QPixmap m_pixDX_N;
- QPixmap m_pixDWN_N;
- QPixmap m_pixDWNSX_N;
- QPixmap m_pixDWNDX_N;
- QPixmap m_pixCaptionSX_N;
- QPixmap m_pixCaptionDX_N;
- QPixmap m_pixCaptionBKG_N;
- QPixmap m_pixIconClose_out_N;
- QPixmap m_pixIconClose_over_N;
- QPixmap m_pixIconClose_clicked_N;
+ TQPixmap m_pixSX_N;
+ TQPixmap m_pixDX_N;
+ TQPixmap m_pixDWN_N;
+ TQPixmap m_pixDWNSX_N;
+ TQPixmap m_pixDWNDX_N;
+ TQPixmap m_pixCaptionSX_N;
+ TQPixmap m_pixCaptionDX_N;
+ TQPixmap m_pixCaptionBKG_N;
+ TQPixmap m_pixIconClose_out_N;
+ TQPixmap m_pixIconClose_over_N;
+ TQPixmap m_pixIconClose_clicked_N;
- QPixmap m_pixSX_HL;
- QPixmap m_pixDX_HL;
- QPixmap m_pixDWN_HL;
- QPixmap m_pixDWNSX_HL;
- QPixmap m_pixDWNDX_HL;
- QPixmap m_pixCaptionSX_HL;
- QPixmap m_pixCaptionDX_HL;
- QPixmap m_pixCaptionBKG_HL;
- QPixmap m_pixIconClose_out_HL;
- QPixmap m_pixIconClose_over_HL;
- QPixmap m_pixIconClose_clicked_HL;
+ TQPixmap m_pixSX_HL;
+ TQPixmap m_pixDX_HL;
+ TQPixmap m_pixDWN_HL;
+ TQPixmap m_pixDWNSX_HL;
+ TQPixmap m_pixDWNDX_HL;
+ TQPixmap m_pixCaptionSX_HL;
+ TQPixmap m_pixCaptionDX_HL;
+ TQPixmap m_pixCaptionBKG_HL;
+ TQPixmap m_pixIconClose_out_HL;
+ TQPixmap m_pixIconClose_over_HL;
+ TQPixmap m_pixIconClose_clicked_HL;
int m_iTabsHeight;
int m_iTitleFontHeight;
@@ -116,9 +116,9 @@ public:
void setWidth(int w);
void setHeight(int h);
void resize(int w, int h) { setWidth(w); setHeight(h); };
- void resize(QSize r) { setWidth(r.width()); setHeight(r.height()); };
- void setGeometry(QRect r) { r.topLeft(); r.size(); /*debug("x,y: %d,%d", r.x(), r.y()); debug("w,h: %d,%d", r.width(), r.height());*/ };
- void setGeometry(QPoint p, QSize s) { setPoint (p.x(), p.y()); setWidth (s.width()); setHeight (s.height()); };
+ void resize(TQSize r) { setWidth(r.width()); setHeight(r.height()); };
+ void setGeometry(TQRect r) { r.topLeft(); r.size(); /*debug("x,y: %d,%d", r.x(), r.y()); debug("w,h: %d,%d", r.width(), r.height());*/ };
+ void setGeometry(TQPoint p, TQSize s) { setPoint (p.x(), p.y()); setWidth (s.width()); setHeight (s.height()); };
void setPoint(int x, int y) { m_pnt.setX(x); m_pnt.setY(y); m_rct.setX(x); m_rct.setY(y); };
@@ -132,19 +132,19 @@ public:
int height() { return m_rct.height(); };
int baseLine() { return (y()+height()); };
- QRect bodyRect() { return m_bodyRect; };
- QRect tabsRect() { return m_tabsRect; };
- QRect captionRect() { return m_captionRect; };
- QRect rect() { return m_rct; };
- QRect closeRect() { return m_closeIconRect; };
- QRect titleRect() { return m_titleRect; };
- QRect progressRect() { return m_progressRect; };
+ TQRect bodyRect() { return m_bodyRect; };
+ TQRect tabsRect() { return m_tabsRect; };
+ TQRect captionRect() { return m_captionRect; };
+ TQRect rect() { return m_rct; };
+ TQRect closeRect() { return m_closeIconRect; };
+ TQRect titleRect() { return m_titleRect; };
+ TQRect progressRect() { return m_progressRect; };
void centerTitle(int h) { m_iTitleFontHeight = h; };
void touch() { m_bNeedToRedraw = true; };
- void draw(QPainter *, bool b = false);
+ void draw(TQPainter *, bool b = false);
void setPics(bool b = false);
protected:
diff --git a/src/modules/notifier/notifierwindowprogressbar.cpp b/src/modules/notifier/notifierwindowprogressbar.cpp
index 72bbdecf..f4f77b01 100644
--- a/src/modules/notifier/notifierwindowprogressbar.cpp
+++ b/src/modules/notifier/notifierwindowprogressbar.cpp
@@ -24,7 +24,7 @@
#include "notifierwindowprogressbar.h"
-KviNotifierWindowProgressBar::KviNotifierWindowProgressBar(QRect r)
+KviNotifierWindowProgressBar::KviNotifierWindowProgressBar(TQRect r)
: m_rect(r)
{
@@ -35,17 +35,17 @@ KviNotifierWindowProgressBar::~KviNotifierWindowProgressBar()
m_dProgress = 0;
}
-void KviNotifierWindowProgressBar::draw(QPainter *p)
+void KviNotifierWindowProgressBar::draw(TQPainter *p)
{
- p->fillRect(m_rect, QColor(236, 233, 216));
+ p->fillRect(m_rect, TQColor(236, 233, 216));
p->fillRect(
- QRect(
+ TQRect(
m_rect.x()+1,
m_rect.y()+1 + m_rect.height() * (1 - m_dProgress),
m_rect.width() - 2,
(m_rect.height() - 2) * m_dProgress
),
- QColor(175, 28, 95)
+ TQColor(175, 28, 95)
);
p->drawRect(m_rect);
}
diff --git a/src/modules/notifier/notifierwindowprogressbar.h b/src/modules/notifier/notifierwindowprogressbar.h
index ec527d2e..cba33e59 100644
--- a/src/modules/notifier/notifierwindowprogressbar.h
+++ b/src/modules/notifier/notifierwindowprogressbar.h
@@ -24,13 +24,13 @@
//
//=============================================================================
-#include <qrect.h>
-#include <qpainter.h>
+#include <tqrect.h>
+#include <tqpainter.h>
class KviNotifierWindowProgressBar
{
public:
- KviNotifierWindowProgressBar(QRect r);
+ KviNotifierWindowProgressBar(TQRect r);
~KviNotifierWindowProgressBar();
// ================================
@@ -41,7 +41,7 @@ private:
public:
protected:
- QRect m_rect;
+ TQRect m_rect;
double m_dProgress;
// ================================
@@ -57,7 +57,7 @@ public:
void setHeight(int p_iHeight) { m_rect.setHeight(p_iHeight); };
void setProgress(double progress) { m_dProgress=progress; };
- void draw(QPainter *);
+ void draw(TQPainter *);
protected:
diff --git a/src/modules/notifier/notifierwindowtabs.cpp b/src/modules/notifier/notifierwindowtabs.cpp
index 9eaa2f12..7455049f 100644
--- a/src/modules/notifier/notifierwindowtabs.cpp
+++ b/src/modules/notifier/notifierwindowtabs.cpp
@@ -30,11 +30,11 @@
#include "kvi_options.h"
#include "kvi_window.h"
-#include <qevent.h>
-#include <qpainter.h>
-#include <qbrush.h>
-#include <qcolor.h>
-#include <qfontmetrics.h>
+#include <tqevent.h>
+#include <tqpainter.h>
+#include <tqbrush.h>
+#include <tqcolor.h>
+#include <tqfontmetrics.h>
#include "notifiermessage.h"
#include "notifierwindowtabs.h"
@@ -45,7 +45,7 @@ KviNotifierWindowTabs * g_pTabs;
// --- tab object definition class
-KviNotifierWindowTab::KviNotifierWindowTab(KviWindow * pWnd, QString label)
+KviNotifierWindowTab::KviNotifierWindowTab(KviWindow * pWnd, TQString label)
{
m_pWnd = pWnd;
m_label = label;
@@ -58,14 +58,14 @@ KviNotifierWindowTab::KviNotifierWindowTab(KviWindow * pWnd, QString label)
g_pApp->getReadOnlyConfigPath(buffer,"libkvinotifier.kvc",KviApp::ConfigPlugins,true);
KviConfig cfg(buffer.ptr(),KviConfig::Read);
cfg.setGroup("NotifierSkin");
- m_clrHighlightedLabel = cfg.readColorEntry("HighlightedTabLablerColor",QColor(200,0,0));
- m_clrNormalLabel = cfg.readColorEntry("NormalTabLablerColor",QColor(0,0,0));
- m_clrChangedLabel = cfg.readColorEntry("ChangedTabLablerColor",QColor(0,0,100));
+ m_clrHighlightedLabel = cfg.readColorEntry("HighlightedTabLablerColor",TQColor(200,0,0));
+ m_clrNormalLabel = cfg.readColorEntry("NormalTabLablerColor",TQColor(0,0,0));
+ m_clrChangedLabel = cfg.readColorEntry("ChangedTabLablerColor",TQColor(0,0,100));
if(pWnd)
{
- connect(pWnd,SIGNAL(windowNameChanged()),this,SLOT(labelChanged()));
- connect(pWnd,SIGNAL(destroyed()),this,SLOT(closeMe()));
+ connect(pWnd,TQT_SIGNAL(windowNameChanged()),this,TQT_SLOT(labelChanged()));
+ connect(pWnd,TQT_SIGNAL(destroyed()),this,TQT_SLOT(closeMe()));
}
}
@@ -77,7 +77,7 @@ KviNotifierWindowTab::~KviNotifierWindowTab()
void KviNotifierWindowTab::setNextMessageAsCurrent()
{
if(!m_pCurrentMessage)return;
- if(m_pMessageList->findRef(m_pCurrentMessage) == -1)return;
+ if(m_pMessageList->tqfindRef(m_pCurrentMessage) == -1)return;
m_pCurrentMessage = m_pMessageList->next();
if(!m_pCurrentMessage)m_pCurrentMessage = m_pMessageList->last();
}
@@ -85,7 +85,7 @@ void KviNotifierWindowTab::setNextMessageAsCurrent()
void KviNotifierWindowTab::setPrevMessageAsCurrent()
{
if(!m_pCurrentMessage)return;
- if(!m_pMessageList->findRef(m_pCurrentMessage) == -1)return;
+ if(!m_pMessageList->tqfindRef(m_pCurrentMessage) == -1)return;
m_pCurrentMessage = m_pMessageList->prev();
if(!m_pCurrentMessage)m_pCurrentMessage = m_pMessageList->first();
}
@@ -149,10 +149,10 @@ void KviNotifierWindowTab::setState(TabState state)
int KviNotifierWindowTab::width(bool b) {
int width = 0;
- QFont * font;
+ TQFont * font;
- QPixmap * sx;
- QPixmap * dx;
+ TQPixmap * sx;
+ TQPixmap * dx;
if (focused()) {
font = g_pTabs->fontFocused();
@@ -164,7 +164,7 @@ int KviNotifierWindowTab::width(bool b) {
font = g_pTabs->fontUnfocused();
}
- QFontMetrics fm(*font);
+ TQFontMetrics fm(*font);
width = fm.width(label())+2;
if (!b) width += sx->width() + dx->width();
@@ -176,11 +176,11 @@ int KviNotifierWindowTab::width(bool b) {
// ##################################################################################à
-KviNotifierWindowTabs::KviNotifierWindowTabs(QRect r)
+KviNotifierWindowTabs::KviNotifierWindowTabs(TQRect r)
{
g_pTabs = this;
- m_pPixmap = new QPixmap();
- m_pPainter = new QPainter();
+ m_pPixmap = new TQPixmap();
+ m_pPainter = new TQPainter();
m_pTabFocused = 0;
m_pWndTabFocused = 0;
m_iTabToStartFrom = 0;
@@ -195,7 +195,7 @@ KviNotifierWindowTabs::KviNotifierWindowTabs(QRect r)
KviNotifierWindowTabs::~KviNotifierWindowTabs()
{
- QMap<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
+ TQMap<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
for(tab = m_tabMap.begin(); tab != m_tabMap.end(); tab++ )
delete tab.data();
m_tabMap.clear();
@@ -214,16 +214,16 @@ void KviNotifierWindowTabs::initConfig()
cfg.setGroup("NotifierSkin");
- QString szFamily = cfg.readEntry("TextFontFocusedTab","Arial");
- m_pFocusedFont = new QFont(szFamily,cfg.readIntEntry("TextFocusedFontSize",10));
+ TQString szFamily = cfg.readEntry("TextFontFocusedTab","Arial");
+ m_pFocusedFont = new TQFont(szFamily,cfg.readIntEntry("TextFocusedFontSize",10));
m_pFocusedFont->setBold(true);
szFamily = cfg.readEntry("TextFontUnfocusedTab","Arial");
- m_pUnfocusedFont = new QFont(szFamily,cfg.readIntEntry("TextUnfocusedFontSize",9));
+ m_pUnfocusedFont = new TQFont(szFamily,cfg.readIntEntry("TextUnfocusedFontSize",9));
}
void KviNotifierWindowTabs::loadImages()
{
- QPixmap * p;
+ TQPixmap * p;
if((p = g_pIconManager->getPixmap("notifier_pix_tab_dx.png")))
m_pixDX = *p;
if((p = g_pIconManager->getPixmap("notifier_pix_tab_sx.png")))
@@ -278,14 +278,14 @@ void KviNotifierWindowTabs::loadImages()
void KviNotifierWindowTabs::addMessage(KviWindow * pWnd, KviNotifierMessage * message)
{
- QString sender = pWnd ? pWnd->windowName() : "----";
+ TQString sender = pWnd ? pWnd->windowName() : "----";
// Qui servirebbe anche una lista... perche' quando si inserisce
// un tab lui lo piazza dove gli pare nell'ordine
// e quindi iterando i tab nuovi possono trovarsi PRIMA dei tab vecchi
// il che' confonde un po
KviNotifierWindowTab * tab;
- if (!m_tabMap.contains(pWnd)) {
+ if (!m_tabMap.tqcontains(pWnd)) {
m_tabMap.insert(pWnd, tab = new KviNotifierWindowTab(pWnd, sender));
m_tabPtrList.append(tab);
} else {
@@ -302,7 +302,7 @@ void KviNotifierWindowTabs::addMessage(KviWindow * pWnd, KviNotifierMessage * me
}
}
-void KviNotifierWindowTabs::resize(QRect r)
+void KviNotifierWindowTabs::resize(TQRect r)
{
m_rct.setX(r.x());
m_rct.setY(r.y());
@@ -411,37 +411,37 @@ void KviNotifierWindowTabs::next()
}
-void KviNotifierWindowTabs::mousePressEvent(QMouseEvent * e) {
+void KviNotifierWindowTabs::mousePressEvent(TQMouseEvent * e) {
- if (m_bIsOverRightBound && m_rctNextIcon.contains(e->pos())) {
+ if (m_bIsOverRightBound && m_rctNextIcon.tqcontains(e->pos())) {
return;
}
- if (m_bIsOverLeftBound && m_rctPrevIcon.contains(e->pos())) {
+ if (m_bIsOverLeftBound && m_rctPrevIcon.tqcontains(e->pos())) {
return;
}
- if(m_rctTabs.contains(e->pos()))
+ if(m_rctTabs.tqcontains(e->pos()))
{
- QMap<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
+ TQMap<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
for (tab = m_tabMap.begin(); tab != m_tabMap.end(); tab++ ) {
- if (tab.data()->rect().contains(e->pos())) {
+ if (tab.data()->rect().tqcontains(e->pos())) {
setFocusOn(tab.data());
return;
}
}
}
- if (m_rctCloseTabIconHotArea.contains(e->pos())) {
+ if (m_rctCloseTabIconHotArea.tqcontains(e->pos())) {
setCloseTabIcon(WDG_ICON_CLICKED);
return;
}
}
-void KviNotifierWindowTabs::mouseMoveEvent(QMouseEvent * e)
+void KviNotifierWindowTabs::mouseMoveEvent(TQMouseEvent * e)
{
- if (m_rctCloseTabIconHotArea.contains(e->pos()))
+ if (m_rctCloseTabIconHotArea.tqcontains(e->pos()))
{
setCloseTabIcon(WDG_ICON_ON);
} else {
@@ -450,22 +450,22 @@ void KviNotifierWindowTabs::mouseMoveEvent(QMouseEvent * e)
}
}
-void KviNotifierWindowTabs::mouseReleaseEvent(QMouseEvent * e)
+void KviNotifierWindowTabs::mouseReleaseEvent(TQMouseEvent * e)
{
- if (m_bIsOverRightBound && m_rctNextIcon.contains(e->pos())) {
+ if (m_bIsOverRightBound && m_rctNextIcon.tqcontains(e->pos())) {
scrollTabsLeft();
return;
}
- if (m_bIsOverLeftBound && m_rctPrevIcon.contains(e->pos())) {
+ if (m_bIsOverLeftBound && m_rctPrevIcon.tqcontains(e->pos())) {
scrollTabsRight();
return;
}
if(currentTab())
{
- if (rctCloseTabIconHotArea().contains(e->pos()))
+ if (rctCloseTabIconHotArea().tqcontains(e->pos()))
{
closeCurrentTab();
g_pNotifierWindow->update();
@@ -524,7 +524,7 @@ void KviNotifierWindowTabs::setFocusOn(KviNotifierWindowTab * tab)
g_pNotifierWindow->update();
}
-void KviNotifierWindowTabs::draw(QPainter * p)
+void KviNotifierWindowTabs::draw(TQPainter * p)
{
if(!m_bNeedToRedraw)return;
@@ -532,12 +532,12 @@ void KviNotifierWindowTabs::draw(QPainter * p)
m_pPainter->begin(m_pPixmap);
- QFont tmpFont;
+ TQFont tmpFont;
tmpFont = p->font();
m_pPainter->setFont(tmpFont);
- QString str;
+ TQString str;
bool isBigger = false;
@@ -555,9 +555,9 @@ void KviNotifierWindowTabs::draw(QPainter * p)
KviPointerListIterator<KviNotifierWindowTab> tabIterator (m_tabPtrList);
- //m_tabPtrList.findRef(m_tabMap[m_pTabFocused->wnd()]);
+ //m_tabPtrList.tqfindRef(m_tabMap[m_pTabFocused->wnd()]);
-// QMap<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
+// TQMap<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
KviNotifierWindowTab * tab;
//for (tab = m_tabMap.begin(); tab != m_tabMap.end() && !isBigger; tab++ )
tabIterator.moveFirst();
@@ -581,7 +581,7 @@ void KviNotifierWindowTabs::draw(QPainter * p)
m_pPainter->drawPixmap(offset,0,m_pixSXFocused);
m_pPainter->drawTiledPixmap(offset+m_pixSXFocused.width(),0,tab->width(true),m_rctTabs.height(),m_pixBKGFocused);
m_pPainter->drawPixmap(offset+m_pixSXFocused.width()+tab->width(true),0,m_pixDXFocused);
- QPen tmpP = m_pPainter->pen(); m_pPainter->setPen(tab->labelColor());
+ TQPen tmpP = m_pPainter->pen(); m_pPainter->setPen(tab->labelColor());
m_pPainter->drawText(offset+m_pixSXFocused.width()+1,m_rctTabs.height()-NTF_TABS_FONT_BASELINE,tab->label());
m_pPainter->setPen(tmpP);
@@ -596,7 +596,7 @@ void KviNotifierWindowTabs::draw(QPainter * p)
m_pPainter->drawPixmap(offset, 0, m_pixSXUnfocused);
m_pPainter->drawTiledPixmap(offset+m_pixSXUnfocused.width(), 0, tab->width(true), m_rctTabs.height(), m_pixBKGUnfocused);
m_pPainter->drawPixmap(offset+m_pixSXUnfocused.width()+tab->width(true), 0, m_pixDXUnfocused);
- QPen tmpP = m_pPainter->pen(); m_pPainter->setPen(tab->labelColor());
+ TQPen tmpP = m_pPainter->pen(); m_pPainter->setPen(tab->labelColor());
m_pPainter->drawText(offset+m_pixSXUnfocused.width()+1,m_rctTabs.height()-NTF_TABS_FONT_BASELINE+1,tab->label());
m_pPainter->setPen(tmpP);
offset += tab->width();
@@ -634,7 +634,7 @@ void KviNotifierWindowTabs::draw(QPainter * p)
void KviNotifierWindowTabs::markAllMessagesAsHistoric()
{
/*
- QMap<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
+ TQMap<KviWindow *, KviNotifierWindowTab *>::Iterator tab;
// Iterating every tab
for (tab = m_tabMap.begin(); tab != m_tabMap.end(); ++tab) {
@@ -654,7 +654,7 @@ void KviNotifierWindowTabs::markAllMessagesAsHistoric()
void KviNotifierWindowTabs::closeTab(KviWindow * pWnd)
{
- KviNotifierWindowTab * pTab = m_tabMap.find(pWnd).data();
+ KviNotifierWindowTab * pTab = m_tabMap.tqfind(pWnd).data();
closeTab(pWnd, pTab);
}
@@ -671,7 +671,7 @@ void KviNotifierWindowTabs::closeCurrentTab()
KviNotifierWindowTab * pTab = m_pTabFocused;
if (m_tabMap.isEmpty()) return; // Empty??? The World is ending...
KviWindow * pWnd = pTab->wnd();
- if (!m_tabMap.contains(pWnd)) return; // The current tab is not on the map??? Call 911!!
+ if (!m_tabMap.tqcontains(pWnd)) return; // The current tab is not on the map??? Call 911!!
// End paranoic stuff, go back to sanity...
closeTab(pWnd, pTab);
diff --git a/src/modules/notifier/notifierwindowtabs.h b/src/modules/notifier/notifierwindowtabs.h
index 555906b8..42501dab 100644
--- a/src/modules/notifier/notifierwindowtabs.h
+++ b/src/modules/notifier/notifierwindowtabs.h
@@ -24,12 +24,12 @@
//
//=============================================================================
-#include <qfont.h>
-#include <qmap.h>
-#include <qobject.h>
-#include <qpixmap.h>
-#include <qpoint.h>
-#include <qrect.h>
+#include <tqfont.h>
+#include <tqmap.h>
+#include <tqobject.h>
+#include <tqpixmap.h>
+#include <tqpoint.h>
+#include <tqrect.h>
#include "kvi_settings.h"
#include "kvi_pointerlist.h"
#include "notifiersettings.h"
@@ -38,7 +38,7 @@
#include "notifiermessage.h"
-class QPainter;
+class TQPainter;
class KviWindow;
class KviNotifierWindowTab;
@@ -47,11 +47,12 @@ typedef struct wndTabPair_s {
KviWindow * pWnd;
} wndTabPair;
-class KviNotifierWindowTab : public QObject // this class defines an object for every single tab about the tabs area
+class KviNotifierWindowTab : public TQObject // this class defines an object for every single tab about the tabs area
{
Q_OBJECT
+ TQ_OBJECT
public:
- KviNotifierWindowTab(KviWindow *, QString);
+ KviNotifierWindowTab(KviWindow *, TQString);
~KviNotifierWindowTab();
// ================================
@@ -60,14 +61,14 @@ public:
private:
bool m_bFocused;
- QColor m_cLabel;
- QColor m_clrHighlightedLabel;
- QColor m_clrNormalLabel;
- QColor m_clrChangedLabel;
+ TQColor m_cLabel;
+ TQColor m_clrHighlightedLabel;
+ TQColor m_clrNormalLabel;
+ TQColor m_clrChangedLabel;
- QRect m_rect;
+ TQRect m_rect;
- QString m_label;
+ TQString m_label;
KviPointerList<KviNotifierMessage> * m_pMessageList;
KviWindow * m_pWnd;
@@ -104,9 +105,9 @@ public:
void setState(TabState state);
void setRect(int x, int y, int w, int h) { m_rect.setX(x); m_rect.setY(y); m_rect.setWidth(w); m_rect.setHeight(h); };
- QColor labelColor() {return m_cLabel; }
- QRect rect() { return m_rect; };
- QString label() { return m_label; };
+ TQColor labelColor() {return m_cLabel; }
+ TQRect rect() { return m_rect; };
+ TQString label() { return m_label; };
KviNotifierMessage * currentMessage() { return m_pCurrentMessage; };
KviPointerList<KviNotifierMessage> * messageList() { return m_pMessageList; };
@@ -130,59 +131,59 @@ protected:
class KviNotifierWindowTabs // this class defines the tabs area
{
public:
- KviNotifierWindowTabs(QRect r);
+ KviNotifierWindowTabs(TQRect r);
~KviNotifierWindowTabs();
// ================================
// Put members declaration below...
// ================================
private:
- QRect m_rct;
- QPoint m_pnt;
+ TQRect m_rct;
+ TQPoint m_pnt;
- QMap<KviWindow *, KviNotifierWindowTab *> m_tabMap;
+ TQMap<KviWindow *, KviNotifierWindowTab *> m_tabMap;
KviPointerList<KviNotifierWindowTab> m_tabPtrList;
KviPointerList<KviNotifierWindowTab> m_lastVisitedTabPtrList;
- QFont * m_pFocusedFont;
- QFont * m_pUnfocusedFont;
+ TQFont * m_pFocusedFont;
+ TQFont * m_pUnfocusedFont;
KviNotifierWindowTab * m_pTabFocused;
KviWindow * m_pWndTabFocused;
- QRect m_rctNextIcon;
- QRect m_rctPrevIcon;
- QRect m_rctCloseTabIcon;
- QRect m_rctCloseTabIconHotArea;
- QRect m_rctTabs;
+ TQRect m_rctNextIcon;
+ TQRect m_rctPrevIcon;
+ TQRect m_rctCloseTabIcon;
+ TQRect m_rctCloseTabIconHotArea;
+ TQRect m_rctTabs;
- QPainter * m_pPainter;
- QPixmap * m_pPixmap;
+ TQPainter * m_pPainter;
+ TQPixmap * m_pPixmap;
- QPixmap m_pixDX;
- QPixmap m_pixSX;
- QPixmap m_pixBKG;
- QPixmap m_pixSXFocused;
- QPixmap m_pixDXFocused;
- QPixmap m_pixBKGFocused;
- QPixmap m_pixSXUnfocused;
- QPixmap m_pixDXUnfocused;
- QPixmap m_pixBKGUnfocused;
-
- QPixmap m_pixIconTabPrev;
- QPixmap m_pixIconTabPrev_out;
- QPixmap m_pixIconTabPrev_over;
- QPixmap m_pixIconTabPrev_clicked;
+ TQPixmap m_pixDX;
+ TQPixmap m_pixSX;
+ TQPixmap m_pixBKG;
+ TQPixmap m_pixSXFocused;
+ TQPixmap m_pixDXFocused;
+ TQPixmap m_pixBKGFocused;
+ TQPixmap m_pixSXUnfocused;
+ TQPixmap m_pixDXUnfocused;
+ TQPixmap m_pixBKGUnfocused;
+
+ TQPixmap m_pixIconTabPrev;
+ TQPixmap m_pixIconTabPrev_out;
+ TQPixmap m_pixIconTabPrev_over;
+ TQPixmap m_pixIconTabPrev_clicked;
- QPixmap m_pixIconTabNext;
- QPixmap m_pixIconTabNext_out;
- QPixmap m_pixIconTabNext_over;
- QPixmap m_pixIconTabNext_clicked;
+ TQPixmap m_pixIconTabNext;
+ TQPixmap m_pixIconTabNext_out;
+ TQPixmap m_pixIconTabNext_over;
+ TQPixmap m_pixIconTabNext_clicked;
- QPixmap m_pixIconCloseTab;
- QPixmap m_pixIconCloseTab_off;
- QPixmap m_pixIconCloseTab_on;
- QPixmap m_pixIconCloseTab_clicked;
+ TQPixmap m_pixIconCloseTab;
+ TQPixmap m_pixIconCloseTab_off;
+ TQPixmap m_pixIconCloseTab_on;
+ TQPixmap m_pixIconCloseTab_clicked;
int m_closeTabIconState;
int m_iTabToStartFrom;
@@ -209,17 +210,17 @@ public:
void closeTab(KviWindow * pWnd); // referes to void closeTab(KviWindow * pWnd, KviNotifierWindowTab * pTab);
void closeTab(KviNotifierWindowTab * pTab); // referes to void closeTab(KviWindow * pWnd, KviNotifierWindowTab * pTab);
void closeTab(KviWindow * pWnd, KviNotifierWindowTab * pTab);
- void draw(QPainter *);
+ void draw(TQPainter *);
void needToRedraw() { m_bNeedToRedraw = true; };
void markAllMessagesAsHistoric();
- void mouseMoveEvent(QMouseEvent * e);
- void mousePressEvent(QMouseEvent * e);
- void mouseReleaseEvent(QMouseEvent * e);
+ void mouseMoveEvent(TQMouseEvent * e);
+ void mousePressEvent(TQMouseEvent * e);
+ void mouseReleaseEvent(TQMouseEvent * e);
void next();
void prev();
void recalculatePositions();
void resetIcons();
- void resize(QRect);
+ void resize(TQRect);
void scrollTabsLeft();
void scrollTabsRight();
void setCloseTabIcon(int state);
@@ -237,16 +238,16 @@ public:
int x() { return m_pnt.x(); };
int y() { return m_pnt.y(); };
- QFont * fontFocused() { return m_pFocusedFont; };
- QFont * fontUnfocused() { return m_pUnfocusedFont; };
+ TQFont * fontFocused() { return m_pFocusedFont; };
+ TQFont * fontUnfocused() { return m_pUnfocusedFont; };
- QPixmap * tabFocusedPixSx() {return &m_pixSXFocused; };
- QPixmap * tabFocusedPixDx() {return &m_pixDXFocused; };
- QPixmap * tabUnfocusedPixSx() {return &m_pixSXUnfocused; };
- QPixmap * tabUnfocusedPixDx() {return &m_pixDXUnfocused; };
+ TQPixmap * tabFocusedPixSx() {return &m_pixSXFocused; };
+ TQPixmap * tabFocusedPixDx() {return &m_pixDXFocused; };
+ TQPixmap * tabUnfocusedPixSx() {return &m_pixSXUnfocused; };
+ TQPixmap * tabUnfocusedPixDx() {return &m_pixDXUnfocused; };
- QRect rect() {return m_rct;};
- QRect rctCloseTabIconHotArea() {return m_rctCloseTabIconHotArea; };
+ TQRect rect() {return m_rct;};
+ TQRect rctCloseTabIconHotArea() {return m_rctCloseTabIconHotArea; };
KviNotifierWindowTab * currentTab() { return m_pTabFocused; };