summaryrefslogtreecommitdiffstats
path: root/domino/eventfilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'domino/eventfilter.cpp')
-rw-r--r--domino/eventfilter.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/domino/eventfilter.cpp b/domino/eventfilter.cpp
index 69be358..d3ec418 100644
--- a/domino/eventfilter.cpp
+++ b/domino/eventfilter.cpp
@@ -27,12 +27,12 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
case TQEvent::Paint: {
TQComboBox* cb = dynamic_cast<TQComboBox*>(obj);
- bool khtmlWidget = khtmlWidgets.contains(cb);
+ bool tdehtmlWidget = tdehtmlWidgets.contains(cb);
const TQColorGroup & g = cb->colorGroup();
TQPixmap buffer;
TQPainter p;
- if(khtmlWidget)
+ if(tdehtmlWidget)
p.begin(cb);
else {
buffer.resize(cb->width(), cb->height());
@@ -42,7 +42,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
p.setFont(cb->font());
- if(!khtmlWidget && cb->parentWidget() && cb->parentWidget()->backgroundPixmap()){
+ if(!tdehtmlWidget && cb->parentWidget() && cb->parentWidget()->backgroundPixmap()){
TQPoint point = cb->backgroundOffset();
p.drawTiledPixmap( 0, 0, cb->width(), cb->height(),
@@ -154,7 +154,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
}
}
p.end();
- if(!khtmlWidget) {
+ if(!tdehtmlWidget) {
p.begin(cb);
p.drawPixmap(0, 0, buffer);
}
@@ -187,7 +187,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
return false;
}
case TQEvent::ApplicationPaletteChange: {
- if(!khtmlWidgets.contains(static_cast<TQWidget*>(obj)))
+ if(!tdehtmlWidgets.contains(static_cast<TQWidget*>(obj)))
setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Application);
return true;
}
@@ -219,11 +219,11 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
if (dynamic_cast<TQLineEdit*>(obj) || (dynamic_cast<TQFrame*>(obj) && dynamic_cast<TQFrame*>(obj)->frameShape() == TQFrame::LineEditPanel) || obj->isA("TQDateTimeEditor")) {
TQWidget* lineEdit = dynamic_cast<TQWidget*>(obj);
- bool khtmlMode = khtmlWidgets.contains(lineEdit);
+ bool tdehtmlMode = tdehtmlWidgets.contains(lineEdit);
bool isLineEdit = dynamic_cast<TQLineEdit*>(obj);
bool isReadOnly = isLineEdit && dynamic_cast<TQLineEdit*>(obj)->isReadOnly();
TQFrame* frame = dynamic_cast<TQFrame*>(obj);
- if((isReadOnly || khtmlMode) && frame->frameWidth() <= 0) {
+ if((isReadOnly || tdehtmlMode) && frame->frameWidth() <= 0) {
return false;
}
@@ -256,7 +256,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
switch(ev->type()) {
case TQEvent::Show:
- if(khtmlMode)
+ if(tdehtmlMode)
return true;
case TQEvent::Resize: {
if(noFrame) return false;
@@ -335,8 +335,8 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
// normal lineEdit
const TQPixmap* parentBgPix = lineEdit->parentWidget() ? lineEdit->parentWidget()->paletteBackgroundPixmap() : 0;
TQPixmap* lineEditEdges = 0;
- if(khtmlMode || parentBgPix || !(lineEditEdges = TQPixmapCache::find(TQString::number(bg.pixel(), 16)+TQString::number(cg.background().pixel(), 16)+"lEditEdges"))) {
- if(khtmlMode) {
+ if(tdehtmlMode || parentBgPix || !(lineEditEdges = TQPixmapCache::find(TQString::number(bg.pixel(), 16)+TQString::number(cg.background().pixel(), 16)+"lEditEdges"))) {
+ if(tdehtmlMode) {
TQPixmap insidePix = tintImage(qembed_findImage("lineedit4inside"), bg);
bitBlt(lineEdit, x, y, &insidePix, 0, 0, 4, 4);
@@ -379,7 +379,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
TQPixmap* lineEditPix = 0;
- if(khtmlMode)
+ if(tdehtmlMode)
p.begin(lineEdit);
else {
lineEditPix = new TQPixmap(w, h);
@@ -422,7 +422,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
p.end();
- if(!khtmlMode) {
+ if(!tdehtmlMode) {
if(isLineEdit) {
// simply drawing the pixmap would be faster, but the problem with the base color as erase color for disabled lineEdits would remain.
@@ -443,24 +443,24 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
case TQEvent::MouseButtonPress:
case 6/*TQEvent::KeyPress*/: {
// it will be reseted in TQLineEdit::mouseMoveEvent()
- if(isLineEdit && !khtmlMode && isEnabled && !isReadOnly && !isDateTimeEditor)
+ if(isLineEdit && !tdehtmlMode && isEnabled && !isReadOnly && !isDateTimeEditor)
static_cast<TQWidget*>(obj)->setCursor(TQt::blankCursor);
return false;
}
case TQEvent::ApplicationPaletteChange:
- if(!khtmlMode) {
+ if(!tdehtmlMode) {
lineEdit->setBackgroundMode(TQWidget::PaletteBase);
lineEdit->setPalette(tqApp->palette());
}
return true;
case TQEvent::ParentPaletteChange:
- if(!khtmlMode) {
+ if(!tdehtmlMode) {
lineEdit->setBackgroundMode(TQWidget::PaletteBase);
lineEdit->setPalette(lineEdit->parentWidget()->palette());
}
return true;
case TQEvent::PaletteChange:
- if(!khtmlMode) {
+ if(!tdehtmlMode) {
lineEdit->setBackgroundMode(TQWidget::PaletteBase);
lineEdit->setPalette(lineEdit->palette());
}
@@ -507,7 +507,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
rubber->destroy();
}
-#if KDE_VERSION >= 0x30506
+#if TDE_VERSION >= 0x30506
case TQEvent::Show: {
char selectionName[64];
snprintf(selectionName, 64, "_NET_WM_CM_S%d", DefaultScreen(tqt_xdisplay()));
@@ -1017,18 +1017,18 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
}
return false;
}
- if(::tqt_cast<KToolBarButton*>(obj)) {
+ if(::tqt_cast<TDEToolBarButton*>(obj)) {
switch(ev->type()) {
case TQEvent::Paint: {
- KToolBar *bar = dynamic_cast<KToolBar*>(obj->parent());
+ TDEToolBar *bar = dynamic_cast<TDEToolBar*>(obj->parent());
if(!bar) return false; // KMyMoney2
- KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
+ TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
int index = bar->itemIndex(btn->id());
if(_toolBtnAsBtn && sideRepaint == false) {
sideRepaint = true;
- KToolBarButton* sideBtn;
+ TDEToolBarButton* sideBtn;
if((sideBtn = bar->getButton(bar->idAt(index-1)))) {
sideBtn->repaint(false);
}
@@ -1065,7 +1065,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
case TQEvent::MouseButtonPress: {
if(((TQMouseEvent*)ev)->button() == TQt::RightButton)
return false;
- KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
+ TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
btn->setUpdatesEnabled(false);
if(!btn->isOn()) btn->setOn(true);
btn->setUpdatesEnabled(true);
@@ -1075,7 +1075,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
case TQEvent::MouseButtonRelease: {
if(((TQMouseEvent*)ev)->button() == TQt::RightButton)
return false;
- KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
+ TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
btn->setUpdatesEnabled(false);
if(btn->isOn()) btn->setOn(false);
btn->setUpdatesEnabled(true);
@@ -1086,13 +1086,13 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
case TQEvent::MouseButtonDblClick: {
if(((TQMouseEvent*)ev)->button() == TQt::RightButton)
return false;
- KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
+ TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
if(!btn->isOn()) btn->setOn(true);
hoverWidget = 0;
return false;
}
case TQEvent::Enter: {
- KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
+ TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
if(btn->isEnabled()) {
hoverWidget = btn;
btn->repaint(false);
@@ -1100,7 +1100,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
return false;
}
case TQEvent::Leave: {
- KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
+ TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
if(btn == hoverWidget) {
hoverWidget = 0;
btn->repaint(false);
@@ -1109,7 +1109,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
}
case TQEvent::Move: {
if(_toolBtnAsBtn) {
- KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
+ TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj);
btn->repaint(false);
}
return false;
@@ -1149,7 +1149,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
drawControl(CE_RadioButton, &p, rb, TQRect(0,0,17,17), rb->palette().active(), flags);
return true;
}
- if (ev->type() == TQEvent::Show && !strcmp(obj->name(), "__khtml")) {
+ if (ev->type() == TQEvent::Show && !strcmp(obj->name(), "__tdehtml")) {
TQRadioButton* rb = static_cast<TQRadioButton*>(obj);
TQBitmap bm(rb->size());
bm.fill(color0);
@@ -1192,9 +1192,9 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
if (ev->type() == TQEvent::Paint) {
TQCheckBox* cb = static_cast<TQCheckBox*>(obj);
- bool khtmlWidget = !strcmp(obj->name(), "__khtml");
- if(khtmlWidget || cb->paletteBackgroundPixmap()) {
- if(khtmlWidget) {
+ bool tdehtmlWidget = !strcmp(obj->name(), "__tdehtml");
+ if(tdehtmlWidget || cb->paletteBackgroundPixmap()) {
+ if(tdehtmlWidget) {
// this prevents the checkbox been erased before the rest of the html page
TQBitmap bm(cb->size());
bm.fill(color0);
@@ -1287,14 +1287,14 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
}
case TQEvent::MouseMove: {
TQMouseEvent* e = (TQMouseEvent*)ev;
- if(dynamic_cast<TQToolButton*>(obj) && popupTimer->isActive() && ((e->pos()-popupMousePressPos).manhattanLength() > 4 /*KGlobalSettings::dndEventDelay()*/))
+ if(dynamic_cast<TQToolButton*>(obj) && popupTimer->isActive() && ((e->pos()-popupMousePressPos).manhattanLength() > 4 /*TDEGlobalSettings::dndEventDelay()*/))
popupToolMenu();
return false;
}
case TQEvent::ParentPaletteChange: {
if(obj->isA("TQToolButton")) {
- if(w->parentWidget() && !khtmlWidgets.contains(w)) {
+ if(w->parentWidget() && !tdehtmlWidgets.contains(w)) {
w->setUpdatesEnabled(false);
if(w->parentWidget()->paletteBackgroundPixmap()) {
w->setBackgroundOrigin(setPixmapOrigin(w->parentWidget()->backgroundOrigin()));
@@ -1364,12 +1364,12 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
return false;
}
- if(dynamic_cast<KPopupTitle*>(obj)) {
+ if(dynamic_cast<TDEPopupTitle*>(obj)) {
switch(ev->type()) {
case TQEvent::Paint: {
- KPopupTitle* pt = static_cast<KPopupTitle*>(obj);
+ TDEPopupTitle* pt = static_cast<TDEPopupTitle*>(obj);
TQRect r = pt->rect();
TQPainter p(pt);
@@ -1770,7 +1770,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
p.fillRect(r.width()-16, r.height()-16, 15, 15, tqApp->palette().active().background()); // 15x15 scrollview cornerwidget gap
return true;
}
- else if(konquerorMode && f->isA("KHTMLView")) {
+ else if(konquerorMode && f->isA("TDEHTMLView")) {
TQPainter p(f);
p.setPen(tqApp->palette().active().background().dark(120));
p.drawRect(f->rect());
@@ -1796,7 +1796,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
f->setMargin(0);
TQWidget* w = f->parentWidget();
- for(int i=0; i<3; i++) { // the third parentcheck is for the tabWidget on kcm khtml_plugins
+ for(int i=0; i<3; i++) { // the third parentcheck is for the tabWidget on kcm tdehtml_plugins
if(!w) break;
if(dynamic_cast<TQGroupBox*>(w)) {
f->setPaletteBackgroundColor(tqApp->palette().active().background());