summaryrefslogtreecommitdiffstats
path: root/domino/eventfilter.cpp
diff options
context:
space:
mode:
authorSlávek Banko <[email protected]>2016-04-08 03:06:39 +0200
committerSlávek Banko <[email protected]>2016-04-08 03:06:39 +0200
commit96603e8acb744f86139b900e45d030ad684b6a4d (patch)
treebc983a53582ffe8f32e3fa9320eff557f239ea01 /domino/eventfilter.cpp
parent5d3112684ba2b692a07b0328ad308c402276e51e (diff)
downloadtde-style-domino-96603e8acb744f86139b900e45d030ad684b6a4d.tar.gz
tde-style-domino-96603e8acb744f86139b900e45d030ad684b6a4d.zip
Initial TQt conversion
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'domino/eventfilter.cpp')
-rw-r--r--domino/eventfilter.cpp1136
1 files changed, 568 insertions, 568 deletions
diff --git a/domino/eventfilter.cpp b/domino/eventfilter.cpp
index a3dce1c..69be358 100644
--- a/domino/eventfilter.cpp
+++ b/domino/eventfilter.cpp
@@ -16,22 +16,22 @@
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
-bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
+bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev)
{
-// qDebug("className: %s -- name: %s", obj->className(), obj->name());
+// tqDebug("className: %s -- name: %s", obj->className(), obj->name());
- if(dynamic_cast<QComboBox*>(obj)) {
+ if(dynamic_cast<TQComboBox*>(obj)) {
switch(ev->type()) {
- case QEvent::Paint: {
+ case TQEvent::Paint: {
- QComboBox* cb = dynamic_cast<QComboBox*>(obj);
+ TQComboBox* cb = dynamic_cast<TQComboBox*>(obj);
bool khtmlWidget = khtmlWidgets.contains(cb);
- const QColorGroup & g = cb->colorGroup();
+ const TQColorGroup & g = cb->colorGroup();
- QPixmap buffer;
- QPainter p;
+ TQPixmap buffer;
+ TQPainter p;
if(khtmlWidget)
p.begin(cb);
else {
@@ -44,30 +44,30 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
if(!khtmlWidget && cb->parentWidget() && cb->parentWidget()->backgroundPixmap()){
- QPoint point = cb->backgroundOffset();
+ TQPoint point = cb->backgroundOffset();
p.drawTiledPixmap( 0, 0, cb->width(), cb->height(),
*cb->parentWidget()->backgroundPixmap(),
point.x(), point.y() );
}
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if (cb->isEnabled())
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if (cb->hasFocus())
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
if(!cb->listBox()) {
- drawComplexControl( QStyle::CC_ComboBox, &p, cb, cb->rect(), g,
- flags, (uint)QStyle::SC_All, /*(cb->arrowDown ? */QStyle::SC_ComboBoxArrow /*: QStyle::SC_None )*/);
+ drawComplexControl( TQStyle::CC_ComboBox, &p, cb, cb->rect(), g,
+ flags, (uint)TQStyle::SC_All, /*(cb->arrowDown ? */TQStyle::SC_ComboBoxArrow /*: TQStyle::SC_None )*/);
- QRect re = querySubControlMetrics( QStyle::CC_ComboBox, cb, QStyle::SC_ComboBoxEditField );
- re = QStyle::visualRect(re, cb);
+ TQRect re = querySubControlMetrics( TQStyle::CC_ComboBox, cb, TQStyle::SC_ComboBoxEditField );
+ re = TQStyle::visualRect(re, cb);
p.setClipRect( re );
- QString str = 0;
- const QPixmap *pix = 0;
+ TQString str = 0;
+ const TQPixmap *pix = 0;
if(cb->count() > 0) {
str = cb->text(cb->currentItem());
cb->pixmap(cb->currentItem());
@@ -75,7 +75,7 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
if ( !str.isNull() ) {
// p.save();
// p.setFont(cb->font());
-// QFontMetrics fm(cb->font());
+// TQFontMetrics fm(cb->font());
// int x = re.x(), y = re.y() + fm.ascent();
// if( pix )
// x += pix->width() + 5;
@@ -87,22 +87,22 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
if ( pix ) {
p.fillRect( re.x(), re.y(), pix->width() + 4, re.height(),
- cb->colorGroup().brush( QColorGroup::Base ) );
+ cb->colorGroup().brush( TQColorGroup::Base ) );
p.drawPixmap( re.x() + 2, re.y() +
( re.height() - pix->height() ) / 2, *pix );
}
}
else {
- drawComplexControl( QStyle::CC_ComboBox, &p, cb, cb->rect(), g,
- flags, (uint)QStyle::SC_All, /*(d->arrowDown ? */QStyle::SC_ComboBoxArrow/* : QStyle::SC_None )*/);
- QRect re = querySubControlMetrics( QStyle::CC_ComboBox, cb, QStyle::SC_ComboBoxEditField );
- re = QStyle::visualRect(re, cb);
+ drawComplexControl( TQStyle::CC_ComboBox, &p, cb, cb->rect(), g,
+ flags, (uint)TQStyle::SC_All, /*(d->arrowDown ? */TQStyle::SC_ComboBoxArrow/* : TQStyle::SC_None )*/);
+ TQRect re = querySubControlMetrics( TQStyle::CC_ComboBox, cb, TQStyle::SC_ComboBoxEditField );
+ re = TQStyle::visualRect(re, cb);
p.setClipRect( re );
if ( !cb->editable() ) {
- QString str = 0;
- const QPixmap *pix = 0;
+ TQString str = 0;
+ const TQPixmap *pix = 0;
if(cb->count() > 0) {
str = cb->text(cb->currentItem());
pix = cb->pixmap(cb->currentItem());
@@ -110,16 +110,16 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
re.addCoords(+2, 0, 0, -1);
if(pix) {
- drawItem( &p, QRect(re.left()+1, re.top(), re.width(), re.height()-1), AlignLeft|AlignVCenter, cb->colorGroup(),
+ drawItem( &p, TQRect(re.left()+1, re.top(), re.width(), re.height()-1), AlignLeft|AlignVCenter, cb->colorGroup(),
cb->isEnabled(), pix, 0, -1, &cb->colorGroup().buttonText() );
re.setX(re.x()+pix->width()+2);
}
if(!str.isNull()) {
- dominoDrawItem( &p, QRect(re.left(), re.top(), re.width(), re.height()), AlignLeft|AlignVCenter, cb->colorGroup(),
+ dominoDrawItem( &p, TQRect(re.left(), re.top(), re.width(), re.height()), AlignLeft|AlignVCenter, cb->colorGroup(),
cb->isEnabled(), 0, str, -1, &cb->colorGroup().buttonText(), textEffectSettings.mode > 0 ? 1 : 0 );
}
else if(!pix) {
- DominoQListBoxItem * item = (DominoQListBoxItem*)cb->listBox()->item( cb->currentItem() );
+ DominoTQListBoxItem * item = (DominoTQListBoxItem*)cb->listBox()->item( cb->currentItem() );
if ( item ) {
int itemh = item->height( cb->listBox() );
p.translate( re.x(), re.y() +(re.height()- itemh)/2);
@@ -129,22 +129,22 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
else if ( cb->listBox() && cb->listBox()->item( cb->currentItem() ) ) {
- QListBoxItem * item = cb->listBox()->item( cb->currentItem() );
- const QPixmap *pix = item->pixmap();
+ TQListBoxItem * item = cb->listBox()->item( cb->currentItem() );
+ const TQPixmap *pix = item->pixmap();
if ( pix ) {
if(re.width() < pix->width())
return true;
- QColor color = cb->isEnabled() ? cb->lineEdit()->paletteBackgroundColor() : cb->lineEdit()->palette().active().background();
- QPixmap* shadowPix = renderLineEditShadow(cb, QRect(0, 0, pix->width() + 3, re.height()), color, Draw_Left, QApplication::reverseLayout());
+ TQColor color = cb->isEnabled() ? cb->lineEdit()->paletteBackgroundColor() : cb->lineEdit()->palette().active().background();
+ TQPixmap* shadowPix = renderLineEditShadow(cb, TQRect(0, 0, pix->width() + 3, re.height()), color, Draw_Left, TQApplication::reverseLayout());
- if(!QApplication::reverseLayout()) {
+ if(!TQApplication::reverseLayout()) {
int x = re.x();
int y = re.y();
int w = pix->width() + 4;
int h = re.height()+re.y();
- QRegion mask(x+3, y, w+3, h);
- mask += QRegion(x, y+3, 3, h-9);
+ TQRegion mask(x+3, y, w+3, h);
+ mask += TQRegion(x, y+3, 3, h-9);
p.setClipRegion(mask);
}
bitBlt(shadowPix, 3, ( shadowPix->height() - pix->height() ) / 2, pix);
@@ -162,33 +162,33 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
return true;
}
- case QEvent::Enter: {
- QButton* btn = static_cast<QButton*>(obj);
+ case TQEvent::Enter: {
+ TQButton* btn = static_cast<TQButton*>(obj);
if(btn->isEnabled()) {
hoverWidget = btn;
btn->repaint(false);
}
return false;
}
- case QEvent::Leave: {
- QButton* btn = static_cast<QButton*>(obj);
+ case TQEvent::Leave: {
+ TQButton* btn = static_cast<TQButton*>(obj);
if(btn->isEnabled()) {
hoverWidget = 0;
btn->repaint(false);
}
return false;
}
- case QEvent::PaletteChange: {
- setDominoButtonPalette(static_cast<QWidget*>(obj), Palette_Widget);
+ case TQEvent::PaletteChange: {
+ setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Widget);
return true;
}
- case QEvent::ParentPaletteChange: {
- setDominoButtonPalette(dynamic_cast<QWidget*>(obj), Palette_Parent);
+ case TQEvent::ParentPaletteChange: {
+ setDominoButtonPalette(dynamic_cast<TQWidget*>(obj), Palette_Parent);
return false;
}
- case QEvent::ApplicationPaletteChange: {
- if(!khtmlWidgets.contains(static_cast<QWidget*>(obj)))
- setDominoButtonPalette(static_cast<QWidget*>(obj), Palette_Application);
+ case TQEvent::ApplicationPaletteChange: {
+ if(!khtmlWidgets.contains(static_cast<TQWidget*>(obj)))
+ setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Application);
return true;
}
default:
@@ -197,17 +197,17 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
// don't repaint the combobox if the mouse moves over the listbox.
- if(dynamic_cast<QListBox*>(obj) && dynamic_cast<QComboBox*>(obj->parent())) {
+ if(dynamic_cast<TQListBox*>(obj) && dynamic_cast<TQComboBox*>(obj->parent())) {
- if(dynamic_cast<QComboBox*>(obj->parent())) {
- if(ev->type() == QEvent::Show) {
- QComboBox* cb = dynamic_cast<QComboBox*>(obj->parent());
+ if(dynamic_cast<TQComboBox*>(obj->parent())) {
+ if(ev->type() == TQEvent::Show) {
+ TQComboBox* cb = dynamic_cast<TQComboBox*>(obj->parent());
cb->repaint(false);
cb->setUpdatesEnabled(false);
return false;
}
- if(ev->type() == QEvent::Hide) {
- QComboBox* cb = dynamic_cast<QComboBox*>(obj->parent());
+ if(ev->type() == TQEvent::Hide) {
+ TQComboBox* cb = dynamic_cast<TQComboBox*>(obj->parent());
cb->setUpdatesEnabled(true);
cb->repaint(false);
return false;
@@ -216,13 +216,13 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
// don't return here
}
- if (dynamic_cast<QLineEdit*>(obj) || (dynamic_cast<QFrame*>(obj) && dynamic_cast<QFrame*>(obj)->frameShape() == QFrame::LineEditPanel) || obj->isA("QDateTimeEditor")) {
+ if (dynamic_cast<TQLineEdit*>(obj) || (dynamic_cast<TQFrame*>(obj) && dynamic_cast<TQFrame*>(obj)->frameShape() == TQFrame::LineEditPanel) || obj->isA("TQDateTimeEditor")) {
- QWidget* lineEdit = dynamic_cast<QWidget*>(obj);
+ TQWidget* lineEdit = dynamic_cast<TQWidget*>(obj);
bool khtmlMode = khtmlWidgets.contains(lineEdit);
- bool isLineEdit = dynamic_cast<QLineEdit*>(obj);
- bool isReadOnly = isLineEdit && dynamic_cast<QLineEdit*>(obj)->isReadOnly();
- QFrame* frame = dynamic_cast<QFrame*>(obj);
+ 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) {
return false;
}
@@ -233,36 +233,36 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
bool isDateTimeEditor = false;
bool hasPixmap = false;
bool noFrame = false;
- QRect r = lineEdit->rect();
+ TQRect r = lineEdit->rect();
- if(dynamic_cast<QComboBox*>(lineEdit->parentWidget())) {
+ if(dynamic_cast<TQComboBox*>(lineEdit->parentWidget())) {
isComboBox = true;
- QComboBox* cb = dynamic_cast<QComboBox*>(lineEdit->parentWidget());
+ TQComboBox* cb = dynamic_cast<TQComboBox*>(lineEdit->parentWidget());
if(cb->count() > 0 && cb->pixmap(cb->currentItem()))
hasPixmap = true;
}
- else if(obj->isA("QDateTimeEditor"))
+ else if(obj->isA("TQDateTimeEditor"))
isDateTimeEditor = true;
- else if(dynamic_cast<QSpinWidget*>(lineEdit->parentWidget()))
+ else if(dynamic_cast<TQSpinWidget*>(lineEdit->parentWidget()))
isSpinWidget = true;
- else if(isLineEdit && frame->frameShape() == QFrame::NoFrame)
+ else if(isLineEdit && frame->frameShape() == TQFrame::NoFrame)
noFrame = true;
-// if(isSpinWidget && !isComboBox && frame->frameShape() == QFrame::NoFrame)
+// if(isSpinWidget && !isComboBox && frame->frameShape() == TQFrame::NoFrame)
// return false;
int x, y, w, h;
r.rect(&x, &y, &w, &h);
switch(ev->type()) {
- case QEvent::Show:
+ case TQEvent::Show:
if(khtmlMode)
return true;
- case QEvent::Resize: {
+ case TQEvent::Resize: {
if(noFrame) return false;
if(isLineEdit) {
- QRect frameRect(r.x()+1, r.y(), r.width()-1, r.height());
+ TQRect frameRect(r.x()+1, r.y(), r.width()-1, r.height());
if(frame->frameRect() != frameRect)
frame->setFrameRect(frameRect);
@@ -270,14 +270,14 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
if(isSpinWidget || isComboBox) {
- if(!hasPixmap && !QApplication::reverseLayout()) {
- QRegion mask(x+3, y, w-3, h);
- mask += QRegion(x, y+3, 3, h-6);
+ if(!hasPixmap && !TQApplication::reverseLayout()) {
+ TQRegion mask(x+3, y, w-3, h);
+ mask += TQRegion(x, y+3, 3, h-6);
lineEdit->setMask(mask);
}
- else if(QApplication::reverseLayout()) {
- QRegion mask(x, y, w-3, h);
- mask += QRegion(w-3, y+3, 3, h-6);
+ else if(TQApplication::reverseLayout()) {
+ TQRegion mask(x, y, w-3, h);
+ mask += TQRegion(w-3, y+3, 3, h-6);
lineEdit->setMask(mask);
}
else if(isComboBox)
@@ -285,16 +285,16 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
else if(isDateTimeEditor) {
- if(!QApplication::reverseLayout()) {
- QRegion mask(x+2, y, w-2, h);
- mask += QRegion(x+1, y+1, 1, h-2);
- mask += QRegion(x, y+2, 1, h-4);
+ if(!TQApplication::reverseLayout()) {
+ TQRegion mask(x+2, y, w-2, h);
+ mask += TQRegion(x+1, y+1, 1, h-2);
+ mask += TQRegion(x, y+2, 1, h-4);
lineEdit->setMask(mask);
}
else {
- QRegion mask(x, y, w-2, h);
- mask += QRegion(w-2, y+1, 1, h-2);
- mask += QRegion(w-1, y+2, 1, h-4);
+ TQRegion mask(x, y, w-2, h);
+ mask += TQRegion(w-2, y+1, 1, h-2);
+ mask += TQRegion(w-1, y+2, 1, h-4);
lineEdit->setMask(mask);
}
}
@@ -305,27 +305,27 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
return false;
}
- case QEvent::Paint: {
+ case TQEvent::Paint: {
if(noFrame)
return false;
- const QColorGroup cg = lineEdit->colorGroup();
- const QColor bg = !isEnabled ? cg.background() : lineEdit->paletteBackgroundColor();
- QPainter p;
+ const TQColorGroup cg = lineEdit->colorGroup();
+ const TQColor bg = !isEnabled ? cg.background() : lineEdit->paletteBackgroundColor();
+ TQPainter p;
if(isSpinWidget || isComboBox || isDateTimeEditor) {
- // QDateTimeEditor doesn't respect background pixmaps :(
+ // TQDateTimeEditor doesn't respect background pixmaps :(
if(w <1 || h <1 || isDateTimeEditor)
return false;
uint flags = hasPixmap ? Draw_Right : Draw_Left|Draw_Right;
- QPixmap* lineEditPix = renderLineEditShadow(lineEdit, lineEdit->rect(), bg, flags, QApplication::reverseLayout());
+ TQPixmap* lineEditPix = renderLineEditShadow(lineEdit, lineEdit->rect(), bg, flags, TQApplication::reverseLayout());
lineEdit->setUpdatesEnabled(false);
lineEdit->setErasePixmap(*lineEditPix);
// update the gap which resulted from the altered frame rect...
- lineEdit->erase(QRect(x, y, 1, h));
+ lineEdit->erase(TQRect(x, y, 1, h));
lineEdit->setUpdatesEnabled(true);
delete lineEditPix;
return false;
@@ -333,18 +333,18 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
// normal lineEdit
- const QPixmap* parentBgPix = lineEdit->parentWidget() ? lineEdit->parentWidget()->paletteBackgroundPixmap() : 0;
- QPixmap* lineEditEdges = 0;
- if(khtmlMode || parentBgPix || !(lineEditEdges = QPixmapCache::find(QString::number(bg.pixel(), 16)+QString::number(cg.background().pixel(), 16)+"lEditEdges"))) {
+ 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) {
- QPixmap insidePix = tintImage(qembed_findImage("lineedit4inside"), bg);
+ TQPixmap insidePix = tintImage(qembed_findImage("lineedit4inside"), bg);
bitBlt(lineEdit, x, y, &insidePix, 0, 0, 4, 4);
bitBlt(lineEdit, w-4, y, &insidePix, 4, 0, 4, 4);
bitBlt(lineEdit, x, h-4, &insidePix, 0, 4, 4, 4);
bitBlt(lineEdit, w-4, h-4, &insidePix, 4, 4, 4, 4);
- QPixmap edgesPix = qembed_findImage("lineedit4edges");
+ TQPixmap edgesPix = qembed_findImage("lineedit4edges");
bitBlt(lineEdit, x, y, &edgesPix, 0, 0, 4, 4);
bitBlt(lineEdit, w-4, y, &edgesPix, 4, 0, 4, 4);
bitBlt(lineEdit, x, h-4, &edgesPix, 0, 4, 4, 4);
@@ -352,11 +352,11 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
else {
- lineEditEdges = new QPixmap(8, 8);
+ lineEditEdges = new TQPixmap(8, 8);
if(parentBgPix) {
- QPoint offset = lineEdit->parentWidget()->backgroundOffset();
- offset += QPoint(lineEdit->geometry().x(), lineEdit->geometry().y());
- QPainter painter(lineEditEdges);
+ TQPoint offset = lineEdit->parentWidget()->backgroundOffset();
+ offset += TQPoint(lineEdit->geometry().x(), lineEdit->geometry().y());
+ TQPainter painter(lineEditEdges);
painter.drawTiledPixmap(0, 0, 4, 4, *parentBgPix, offset.x(), offset.y());
painter.drawTiledPixmap(4, 0, 4, 4, *parentBgPix, offset.x()+r.width()-4, offset.y());
painter.drawTiledPixmap(0, 4, 4, 4, *parentBgPix, offset.x(), offset.y()+r.height()-4);
@@ -365,24 +365,24 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
else
lineEditEdges->fill(cg.background());
- QPixmap tmpPix = tintImage(qembed_findImage("lineedit4inside"), bg);
+ TQPixmap tmpPix = tintImage(qembed_findImage("lineedit4inside"), bg);
bitBlt(lineEditEdges, 0, 0, &tmpPix, 0, 0, 8, 8);
- QPixmap tmpPix2 = qembed_findImage("lineedit4edges");
+ TQPixmap tmpPix2 = qembed_findImage("lineedit4edges");
bitBlt(lineEditEdges, 0, 0, &tmpPix2, 0, 0, 8, 8);
if(!parentBgPix)
- QPixmapCache::insert(QString::number(bg.pixel(), 16)+QString::number(cg.background().pixel(), 16)+"lEditEdges", *lineEditEdges);
+ TQPixmapCache::insert(TQString::number(bg.pixel(), 16)+TQString::number(cg.background().pixel(), 16)+"lEditEdges", *lineEditEdges);
}
}
- QPixmap* lineEditPix = 0;
+ TQPixmap* lineEditPix = 0;
if(khtmlMode)
p.begin(lineEdit);
else {
- lineEditPix = new QPixmap(w, h);
+ lineEditPix = new TQPixmap(w, h);
p.begin(lineEditPix);
bitBlt(lineEditPix, x, y, lineEditEdges, 0, 0, 4, 4);
@@ -392,17 +392,17 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
- p.fillRect(QRect(x+4, y, w-8, h), bg);
- p.fillRect(QRect(x, y+4, 4, h-8), bg);
- p.fillRect(QRect(w-4, y+4, 4, h-8), bg);
+ p.fillRect(TQRect(x+4, y, w-8, h), bg);
+ p.fillRect(TQRect(x, y+4, 4, h-8), bg);
+ p.fillRect(TQRect(w-4, y+4, 4, h-8), bg);
- QColor top_1 = alphaBlendColors(QColor(26, 26, 26), bg, 125);
- QColor top_2 = alphaBlendColors(QColor(18, 18, 18), bg, 50);
- QColor top_3 = alphaBlendColors(QColor(16, 16, 16), bg, 6);
- QColor bottom = alphaBlendColors(QColor(0, 0, 0), bg, 30);
+ TQColor top_1 = alphaBlendColors(TQColor(26, 26, 26), bg, 125);
+ TQColor top_2 = alphaBlendColors(TQColor(18, 18, 18), bg, 50);
+ TQColor top_3 = alphaBlendColors(TQColor(16, 16, 16), bg, 6);
+ TQColor bottom = alphaBlendColors(TQColor(0, 0, 0), bg, 30);
- QColor left_1 = alphaBlendColors(QColor(0, 0, 0), bg, 78);
- QColor left_2 = alphaBlendColors(QColor(0, 0, 0), bg, 10);
+ TQColor left_1 = alphaBlendColors(TQColor(0, 0, 0), bg, 78);
+ TQColor left_2 = alphaBlendColors(TQColor(0, 0, 0), bg, 10);
p.setPen(top_1);
p.drawLine(x+4, y, w-5, y);
@@ -440,34 +440,34 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
return false;
}
- case QEvent::MouseButtonPress:
- case 6/*QEvent::KeyPress*/: {
- // it will be reseted in QLineEdit::mouseMoveEvent()
+ case TQEvent::MouseButtonPress:
+ case 6/*TQEvent::KeyPress*/: {
+ // it will be reseted in TQLineEdit::mouseMoveEvent()
if(isLineEdit && !khtmlMode && isEnabled && !isReadOnly && !isDateTimeEditor)
- static_cast<QWidget*>(obj)->setCursor(Qt::blankCursor);
+ static_cast<TQWidget*>(obj)->setCursor(TQt::blankCursor);
return false;
}
- case QEvent::ApplicationPaletteChange:
+ case TQEvent::ApplicationPaletteChange:
if(!khtmlMode) {
- lineEdit->setBackgroundMode(QWidget::PaletteBase);
- lineEdit->setPalette(qApp->palette());
+ lineEdit->setBackgroundMode(TQWidget::PaletteBase);
+ lineEdit->setPalette(tqApp->palette());
}
return true;
- case QEvent::ParentPaletteChange:
+ case TQEvent::ParentPaletteChange:
if(!khtmlMode) {
- lineEdit->setBackgroundMode(QWidget::PaletteBase);
+ lineEdit->setBackgroundMode(TQWidget::PaletteBase);
lineEdit->setPalette(lineEdit->parentWidget()->palette());
}
return true;
- case QEvent::PaletteChange:
+ case TQEvent::PaletteChange:
if(!khtmlMode) {
- lineEdit->setBackgroundMode(QWidget::PaletteBase);
+ lineEdit->setBackgroundMode(TQWidget::PaletteBase);
lineEdit->setPalette(lineEdit->palette());
}
return true;
- case QEvent::Wheel:
- case QEvent::Hide:
- case 7/*QEvent::KeyRelease*/:
+ case TQEvent::Wheel:
+ case TQEvent::Hide:
+ case 7/*TQEvent::KeyRelease*/:
// jump to smoothscrolling
if(_smoothScrolling)
break;
@@ -482,37 +482,37 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
// argb rubberBand
if(!strcmp(obj->name(), "qt_viewport") && rubberBandType == ArgbRubber) {
switch(ev->type()) {
- case QEvent::ChildRemoved:
- case QEvent::DragMove:
- case QEvent::DragEnter: {
+ case TQEvent::ChildRemoved:
+ case TQEvent::DragMove:
+ case TQEvent::DragEnter: {
if(rubber) {
viewPortPressed = false;
- oldRubberRect = QRect();
+ oldRubberRect = TQRect();
rubber->destroy();
}
return false;
}
- case QEvent::MouseButtonPress: {
+ case TQEvent::MouseButtonPress: {
viewPortPressed = true;
- rubberViewPort = static_cast<const QWidget*>(obj);
+ rubberViewPort = static_cast<const TQWidget*>(obj);
break;
}
- case QEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonRelease:
if(rubber) {
viewPortPressed = false;
rubberViewPort = 0;
- oldRubberRect = QRect();
- if(dynamic_cast<QListView*>(obj->parent()) && rubber->window)
+ oldRubberRect = TQRect();
+ if(dynamic_cast<TQListView*>(obj->parent()) && rubber->window)
ignoreNextFocusRect = true;
rubber->destroy();
}
#if KDE_VERSION >= 0x30506
- case QEvent::Show: {
+ case TQEvent::Show: {
char selectionName[64];
- snprintf(selectionName, 64, "_NET_WM_CM_S%d", DefaultScreen(qt_xdisplay()));
- Atom compSelection = XInternAtom(qt_xdisplay(), selectionName, False);
- if(XGetSelectionOwner(qt_xdisplay(), compSelection)) {
+ snprintf(selectionName, 64, "_NET_WM_CM_S%d", DefaultScreen(tqt_xdisplay()));
+ Atom compSelection = XInternAtom(tqt_xdisplay(), selectionName, False);
+ if(XGetSelectionOwner(tqt_xdisplay(), compSelection)) {
compositeManagerRunning = true;
}
else {
@@ -527,19 +527,19 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
// smoothscrolling
- if(dynamic_cast<QScrollView*>(obj) && _smoothScrolling) {
+ if(dynamic_cast<TQScrollView*>(obj) && _smoothScrolling) {
switch(ev->type()) {
- case QEvent::Wheel: {
- QWheelEvent* e = (QWheelEvent*)ev;
- QScrollView* sv = dynamic_cast<QScrollView*>(obj);
+ case TQEvent::Wheel: {
+ TQWheelEvent* e = (TQWheelEvent*)ev;
+ TQScrollView* sv = dynamic_cast<TQScrollView*>(obj);
bool pageSteps = false;
int pageStep = sv->verticalScrollBar()->pageStep();
int lineStep = sv->verticalScrollBar()->lineStep();
- scrollVertical = e->orientation() == Qt::Vertical;
+ scrollVertical = e->orientation() == TQt::Vertical;
- QScrollBar* scrollBar = scrollVertical ? sv->verticalScrollBar() : sv->horizontalScrollBar();
+ TQScrollBar* scrollBar = scrollVertical ? sv->verticalScrollBar() : sv->horizontalScrollBar();
- int step = QMIN( QApplication::wheelScrollLines()*lineStep, pageStep );
+ int step = TQMIN( TQApplication::wheelScrollLines()*lineStep, pageStep );
if ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) {
step = pageStep;
pageSteps = true;
@@ -552,13 +552,13 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
// don't accumulate to much
if(scrollDistance < 0) {
- scrollDistance = pageSteps? QMAX(scrollDistance, pageStep*2-(pageStep*4)): scrollDistance;
+ scrollDistance = pageSteps? TQMAX(scrollDistance, pageStep*2-(pageStep*4)): scrollDistance;
int minDistance = scrollBar->maxValue() - scrollBar->value();
- scrollDistance = QMAX(scrollDistance, minDistance-(minDistance*2));
+ scrollDistance = TQMAX(scrollDistance, minDistance-(minDistance*2));
}
else {
- scrollDistance = pageSteps? QMIN(scrollDistance, pageStep*2): scrollDistance;
- scrollDistance = QMIN(scrollDistance, scrollBar->value());
+ scrollDistance = pageSteps? TQMIN(scrollDistance, pageStep*2): scrollDistance;
+ scrollDistance = TQMIN(scrollDistance, scrollBar->value());
}
if(scrollDistance != 0) {
@@ -567,20 +567,20 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
return true;
}
- case 7: { // ?? 7 = QEvent::KeyRelease
- QKeyEvent* ke = (QKeyEvent*)ev;
- if(scrollTimer->isActive() && (ke->key() == Qt::Key_Shift || ke->key() == Qt::Key_Control)) {
+ case 7: { // ?? 7 = TQEvent::KeyRelease
+ TQKeyEvent* ke = (TQKeyEvent*)ev;
+ if(scrollTimer->isActive() && (ke->key() == TQt::Key_Shift || ke->key() == TQt::Key_Control)) {
scrollTimer->stop();
scrollDistance = 0;
}
return false;
}
- case QEvent::WindowActivate:
- case QEvent::WindowDeactivate:
+ case TQEvent::WindowActivate:
+ case TQEvent::WindowDeactivate:
// fixes the scrollbar flicker
return true;
- case QEvent::Hide:
- case QEvent::Show:
+ case TQEvent::Hide:
+ case TQEvent::Show:
scrollDistance = 0;
// don't return here (because of konqframe and ?)
default:
@@ -589,66 +589,66 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
- if ( dynamic_cast<QScrollBar*>(obj) ) {
+ if ( dynamic_cast<TQScrollBar*>(obj) ) {
switch(ev->type()) {
- case QEvent::WindowActivate: {
- QScrollBar* sb = dynamic_cast<QScrollBar*>(obj);
- if(sb->backgroundMode() == Qt::NoBackground && !sb->testWState(WState_HasMouse)) {
- sb->setBackgroundMode(Qt::PaletteButton);
+ case TQEvent::WindowActivate: {
+ TQScrollBar* sb = dynamic_cast<TQScrollBar*>(obj);
+ if(sb->backgroundMode() == TQt::NoBackground && !sb->testWState(WState_HasMouse)) {
+ sb->setBackgroundMode(TQt::PaletteButton);
}
return true;
}
- case QEvent::Show: {
+ case TQEvent::Show: {
// no flicker in konqi and konsole, hits maybe others, too.
if(obj->parent()->parent() && (!strcmp(obj->parent()->parent()->name(), "KonqFrame") || !strcmp(obj->parent()->parent()->name(), "tab pages"))) {
- dynamic_cast<QScrollBar*>(obj)->setBackgroundMode(Qt::NoBackground);
+ dynamic_cast<TQScrollBar*>(obj)->setBackgroundMode(TQt::NoBackground);
}
scrollDistance = 0;
return true;
}
- case QEvent::Hide:
+ case TQEvent::Hide:
scrollDistance = 0;
return true;
- case QEvent::Resize: {
- QScrollBar* sb = dynamic_cast<QScrollBar*>(obj);
- if(sb->backgroundMode() != Qt::NoBackground && sb->isVisible()) {
- sb->setBackgroundMode(Qt::NoBackground);
+ case TQEvent::Resize: {
+ TQScrollBar* sb = dynamic_cast<TQScrollBar*>(obj);
+ if(sb->backgroundMode() != TQt::NoBackground && sb->isVisible()) {
+ sb->setBackgroundMode(TQt::NoBackground);
}
return false;
}
- case QEvent::ParentPaletteChange: {
- QScrollBar* sb = dynamic_cast<QScrollBar*>(obj);
- sb->setBackgroundMode(Qt::PaletteButton);
+ case TQEvent::ParentPaletteChange: {
+ TQScrollBar* sb = dynamic_cast<TQScrollBar*>(obj);
+ sb->setBackgroundMode(TQt::PaletteButton);
sb->setPalette(sb->parentWidget()->palette());
return true;
}
- case QEvent::PaletteChange: {
- QScrollBar* sb = dynamic_cast<QScrollBar*>(obj);
- sb->setBackgroundMode(Qt::PaletteButton);
+ case TQEvent::PaletteChange: {
+ TQScrollBar* sb = dynamic_cast<TQScrollBar*>(obj);
+ sb->setBackgroundMode(TQt::PaletteButton);
sb->setPalette(sb->palette());
return true;
}
- case QEvent::ApplicationPaletteChange: { // ###
- QScrollBar* sb = dynamic_cast<QScrollBar*>(obj);
+ case TQEvent::ApplicationPaletteChange: { // ###
+ TQScrollBar* sb = dynamic_cast<TQScrollBar*>(obj);
removeCachedSbPix(sb->paletteBackgroundColor());
- sb->setBackgroundMode(Qt::PaletteButton);
+ sb->setBackgroundMode(TQt::PaletteButton);
// sb->update();
return false;
}
- case QEvent::Wheel: {
+ case TQEvent::Wheel: {
if(!_smoothScrolling)
return false;
- QWheelEvent* e = (QWheelEvent*)ev;
- QScrollBar* sb = dynamic_cast<QScrollBar*>(obj);
- if(!dynamic_cast<QScrollView*>(sb->parentWidget()))
+ TQWheelEvent* e = (TQWheelEvent*)ev;
+ TQScrollBar* sb = dynamic_cast<TQScrollBar*>(obj);
+ if(!dynamic_cast<TQScrollView*>(sb->parentWidget()))
return false;
bool pageSteps = false;
int pageStep = sb->pageStep();
int lineStep = sb->lineStep();
- int step = QMIN( QApplication::wheelScrollLines()*lineStep, pageStep );
+ int step = TQMIN( TQApplication::wheelScrollLines()*lineStep, pageStep );
if ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) {
step = pageStep;
pageSteps = true;
@@ -656,30 +656,30 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
int dy = (e->delta()*step)/120;
e->accept();
- scrollWidget = dynamic_cast<QScrollView*>(sb->parentWidget());
+ scrollWidget = dynamic_cast<TQScrollView*>(sb->parentWidget());
scrollDistance += dy;
// don't accumulate to much
if(scrollDistance < 0) {
- scrollDistance = pageSteps? QMAX(scrollDistance, pageStep*2-(pageStep*4)): scrollDistance;
+ scrollDistance = pageSteps? TQMAX(scrollDistance, pageStep*2-(pageStep*4)): scrollDistance;
int minDistance = sb->maxValue() - sb->value();
- scrollDistance = QMAX(scrollDistance, minDistance-(minDistance*2));
+ scrollDistance = TQMAX(scrollDistance, minDistance-(minDistance*2));
}
else {
- scrollDistance = pageSteps? QMIN(scrollDistance, pageStep*2): scrollDistance;
- scrollDistance = QMIN(scrollDistance, sb->value());
+ scrollDistance = pageSteps? TQMIN(scrollDistance, pageStep*2): scrollDistance;
+ scrollDistance = TQMIN(scrollDistance, sb->value());
}
- scrollVertical = sb->orientation() == Qt::Vertical;
+ scrollVertical = sb->orientation() == TQt::Vertical;
if(scrollDistance != 0) {
scrollTimer->start(pageSteps? 4: 14);
}
return true;
}
- case 7: { // ?? 7 = QEvent::KeyRelease
- QKeyEvent* ke = (QKeyEvent*)ev;
- if(scrollTimer->isActive() && (ke->key() == Qt::Key_Shift || ke->key() == Qt::Key_Control)) {
+ case 7: { // ?? 7 = TQEvent::KeyRelease
+ TQKeyEvent* ke = (TQKeyEvent*)ev;
+ if(scrollTimer->isActive() && (ke->key() == TQt::Key_Shift || ke->key() == TQt::Key_Control)) {
scrollTimer->stop();
scrollDistance = 0;
}
@@ -691,78 +691,78 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
- if ( dynamic_cast<QProgressBar*>(obj) && _animateProgressBar)
+ if ( dynamic_cast<TQProgressBar*>(obj) && _animateProgressBar)
{
switch(ev->type()) {
- case QEvent::Show:
+ case TQEvent::Show:
if(!animationTimer->isActive())
animationTimer->start( 50, false );
return true;
- case QEvent::Hide:
+ case TQEvent::Hide:
if(animationTimer->isActive())
animationTimer->stop();
return true;
- case QEvent::ApplicationPaletteChange:
- setDominoButtonPalette(static_cast<QWidget*>(obj), Palette_Application);
+ case TQEvent::ApplicationPaletteChange:
+ setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Application);
return true;
- case QEvent::ParentPaletteChange:
- setDominoButtonPalette(static_cast<QWidget*>(obj), Palette_Parent);
+ case TQEvent::ParentPaletteChange:
+ setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Parent);
return true;
- case QEvent::PaletteChange:
- setDominoButtonPalette(static_cast<QWidget*>(obj), Palette_Widget);
+ case TQEvent::PaletteChange:
+ setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Widget);
return true;
default:
return false;
}
}
- if (dynamic_cast<QStatusBar*>(obj)) {
- if(ev->type() == QEvent::PaletteChange) {
- QStatusBar* sb = dynamic_cast<QStatusBar*>(obj);
- sb->setPaletteBackgroundColor(qApp->palette().active().background());
- sb->setPaletteForegroundColor(qApp->palette().active().foreground());
+ if (dynamic_cast<TQStatusBar*>(obj)) {
+ if(ev->type() == TQEvent::PaletteChange) {
+ TQStatusBar* sb = dynamic_cast<TQStatusBar*>(obj);
+ sb->setPaletteBackgroundColor(tqApp->palette().active().background());
+ sb->setPaletteForegroundColor(tqApp->palette().active().foreground());
return true;
}
return false;
}
- if (dynamic_cast<QGroupBox*>(obj) && dynamic_cast<QFrame*>(obj)->frameShape() == QFrame::GroupBoxPanel) {
- QGroupBox* gb = dynamic_cast<QGroupBox*>(obj);
- QRect r = gb->rect();
+ if (dynamic_cast<TQGroupBox*>(obj) && dynamic_cast<TQFrame*>(obj)->frameShape() == TQFrame::GroupBoxPanel) {
+ TQGroupBox* gb = dynamic_cast<TQGroupBox*>(obj);
+ TQRect r = gb->rect();
switch(ev->type()) {
- case QEvent::Paint: {
+ case TQEvent::Paint: {
// if(y+16 > h || 16 > w) // don't overlap the pixmaps
// return false;
renderGroupBox(obj, ev);
return true;
}
- case QEvent::Resize: {
+ case TQEvent::Resize: {
if(!gb->isFlat())
renderGroupBox(obj, ev);
return false;
}
- case QEvent::ApplicationPaletteChange:
- case QEvent::PaletteChange:
- case QEvent::ParentPaletteChange: {
+ case TQEvent::ApplicationPaletteChange:
+ case TQEvent::PaletteChange:
+ case TQEvent::ParentPaletteChange: {
if(gb->isFlat() || gb->lineWidth() <= 0) {
return false;
}
- QColor outsideColor = gb->parentWidget() ? gb->parentWidget()->paletteBackgroundColor() : gb->paletteBackgroundColor();
- QColor insideColor = groupBoxSettings.tintBackground ? getGroupBoxColor(gb) : gb->paletteBackgroundColor();
+ TQColor outsideColor = gb->parentWidget() ? gb->parentWidget()->paletteBackgroundColor() : gb->paletteBackgroundColor();
+ TQColor insideColor = groupBoxSettings.tintBackground ? getGroupBoxColor(gb) : gb->paletteBackgroundColor();
- QPalette pal(qApp->palette());
- pal.setColor(QPalette::Active, QColorGroup::Background, insideColor);
- pal.setColor(QPalette::Inactive, QColorGroup::Background, insideColor);
- pal.setColor(QPalette::Disabled, QColorGroup::Background, insideColor);
- pal.setColor(QPalette::Disabled, QColorGroup::Text, alphaBlendColors(pal.active().foreground(), insideColor, 40));
+ TQPalette pal(tqApp->palette());
+ pal.setColor(TQPalette::Active, TQColorGroup::Background, insideColor);
+ pal.setColor(TQPalette::Inactive, TQColorGroup::Background, insideColor);
+ pal.setColor(TQPalette::Disabled, TQColorGroup::Background, insideColor);
+ pal.setColor(TQPalette::Disabled, TQColorGroup::Text, alphaBlendColors(pal.active().foreground(), insideColor, 40));
gb->setPalette(pal);
if(gb->isCheckable()) {
- ((QCheckBox*)gb->child("qt_groupbox_checkbox", 0, false))->setPaletteBackgroundColor(outsideColor);
+ ((TQCheckBox*)gb->child("qt_groupbox_checkbox", 0, false))->setPaletteBackgroundColor(outsideColor);
}
if(groupBoxPixmaps.contains(gb)) {
@@ -776,17 +776,17 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
}
- if(dynamic_cast<QSpinWidget*>(obj)) {
+ if(dynamic_cast<TQSpinWidget*>(obj)) {
switch(ev->type()) {
- case QEvent::Paint: {
+ case TQEvent::Paint: {
- QSpinWidget* sw = static_cast<QSpinWidget*>(obj);
- QPixmap buffer(sw->size());
- QPainter p(&buffer);
+ TQSpinWidget* sw = static_cast<TQSpinWidget*>(obj);
+ TQPixmap buffer(sw->size());
+ TQPainter p(&buffer);
if(sw->parentWidget() && sw->parentWidget()->parentWidget() && sw->parentWidget()->parentWidget()->backgroundPixmap()) {
- QPoint point = sw->backgroundOffset();
+ TQPoint point = sw->backgroundOffset();
p.drawTiledPixmap( 0, 0, sw->width(), sw->height(),
*sw->parentWidget()->parentWidget()->backgroundPixmap(), point.x(), point.y() );
}
@@ -794,47 +794,47 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
///////
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if (sw->isEnabled())
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if (sw->hasFocus() || sw->focusProxy() && sw->focusProxy()->hasFocus())
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
if(spinWidgetDown && sw->hasMouse())
- flags |= QStyle::Style_Down;
- QRect fr = QStyle::visualRect(querySubControlMetrics( QStyle::CC_SpinWidget, sw, QStyle::SC_SpinWidgetFrame ), sw );
- drawComplexControl( QStyle::CC_SpinWidget, &p, sw, sw->rect(), sw->colorGroup(), flags, (uint)QStyle::SC_All, QStyle::SC_None );
+ flags |= TQStyle::Style_Down;
+ TQRect fr = TQStyle::visualRect(querySubControlMetrics( TQStyle::CC_SpinWidget, sw, TQStyle::SC_SpinWidgetFrame ), sw );
+ drawComplexControl( TQStyle::CC_SpinWidget, &p, sw, sw->rect(), sw->colorGroup(), flags, (uint)TQStyle::SC_All, TQStyle::SC_None );
p.end();
p.begin(sw);
p.drawPixmap(0,0,buffer);
return true;
}
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonDblClick: {
- QSpinWidget* sw = static_cast<QSpinWidget*>(obj);
- QPainter p(sw);
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonDblClick: {
+ TQSpinWidget* sw = static_cast<TQSpinWidget*>(obj);
+ TQPainter p(sw);
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if (sw->isEnabled())
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if (sw->hasFocus() || sw->focusProxy() && sw->focusProxy()->hasFocus())
- flags |= QStyle::Style_HasFocus;
- if(ev->type() != QEvent::MouseButtonRelease && dynamic_cast<QSpinBox*>(sw->parentWidget())) {
- QSpinBox* sb = dynamic_cast<QSpinBox*>(sw->parentWidget());
- QMouseEvent* e = (QMouseEvent*)ev;
+ flags |= TQStyle::Style_HasFocus;
+ if(ev->type() != TQEvent::MouseButtonRelease && dynamic_cast<TQSpinBox*>(sw->parentWidget())) {
+ TQSpinBox* sb = dynamic_cast<TQSpinBox*>(sw->parentWidget());
+ TQMouseEvent* e = (TQMouseEvent*)ev;
if(sb->downRect().contains(e->pos()) && sb->value() != sb->minValue()) {
- flags |= QStyle::Style_Down;
+ flags |= TQStyle::Style_Down;
spinWidgetDown = true;
}
if(sb->upRect().contains(e->pos()) && sb->value() != sb->maxValue()) {
- flags |= QStyle::Style_Down;
+ flags |= TQStyle::Style_Down;
spinWidgetDown = true;
}
if(spinWidgetDown) {
if(sw->paletteBackgroundPixmap())
sw->erase();
- drawComplexControl( QStyle::CC_SpinWidget, &p, sw, sw->rect(), sw->colorGroup(), flags, (uint)QStyle::SC_All, QStyle::SC_None);
+ drawComplexControl( TQStyle::CC_SpinWidget, &p, sw, sw->rect(), sw->colorGroup(), flags, (uint)TQStyle::SC_All, TQStyle::SC_None);
}
return false;
@@ -844,34 +844,34 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
if(sw->paletteBackgroundPixmap())
sw->erase();
- drawComplexControl( QStyle::CC_SpinWidget, &p, sw, sw->rect(), sw->colorGroup(), flags, (uint)QStyle::SC_All, QStyle::SC_None);
+ drawComplexControl( TQStyle::CC_SpinWidget, &p, sw, sw->rect(), sw->colorGroup(), flags, (uint)TQStyle::SC_All, TQStyle::SC_None);
return false;
}
- case QEvent::Enter: {
- QPushButton* btn = static_cast<QPushButton*>(obj);
+ case TQEvent::Enter: {
+ TQPushButton* btn = static_cast<TQPushButton*>(obj);
if(!btn->isEnabled())
return false;
hoverWidget = btn;
btn->repaint(btn->paletteBackgroundPixmap());
return false;
}
- case QEvent::Leave: {
+ case TQEvent::Leave: {
spinWidgetDown = false;
- QPushButton* btn = static_cast<QPushButton*>(obj);
+ TQPushButton* btn = static_cast<TQPushButton*>(obj);
if(!btn->isEnabled())
return false;
hoverWidget = 0;
btn->repaint(btn->paletteBackgroundPixmap());
return false;
}
- case QEvent::ApplicationPaletteChange:
- setDominoButtonPalette(dynamic_cast<QWidget*>(obj), Palette_Application);
+ case TQEvent::ApplicationPaletteChange:
+ setDominoButtonPalette(dynamic_cast<TQWidget*>(obj), Palette_Application);
return true;
- case QEvent::ParentPaletteChange:
- setDominoButtonPalette(dynamic_cast<QWidget*>(obj), Palette_Parent);
+ case TQEvent::ParentPaletteChange:
+ setDominoButtonPalette(dynamic_cast<TQWidget*>(obj), Palette_Parent);
return true;
- case QEvent::PaletteChange:
- setDominoButtonPalette(dynamic_cast<QWidget*>(obj), Palette_Parent);
+ case TQEvent::PaletteChange:
+ setDominoButtonPalette(dynamic_cast<TQWidget*>(obj), Palette_Parent);
return true;
default:
break;
@@ -880,12 +880,12 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
- if (dynamic_cast<QTabBar*>(obj)) {
+ if (dynamic_cast<TQTabBar*>(obj)) {
switch(ev->type()) {
- case QEvent::Wheel: {
- QWheelEvent* e = (QWheelEvent*)ev;
- QTabWidget* tw = dynamic_cast<QTabWidget*>(obj->parent());
+ case TQEvent::Wheel: {
+ TQWheelEvent* e = (TQWheelEvent*)ev;
+ TQTabWidget* tw = dynamic_cast<TQTabWidget*>(obj->parent());
if(!tw)
return false;
@@ -905,31 +905,31 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
tw->setCurrentPage(current );
return true;
}
- case QEvent::ApplicationPaletteChange:
- setDominoButtonPalette(dynamic_cast<QWidget*>(obj), Palette_Application);
+ case TQEvent::ApplicationPaletteChange:
+ setDominoButtonPalette(dynamic_cast<TQWidget*>(obj), Palette_Application);
return true;
- case QEvent::ParentPaletteChange:
- setDominoButtonPalette(dynamic_cast<QWidget*>(obj), Palette_Parent);
+ case TQEvent::ParentPaletteChange:
+ setDominoButtonPalette(dynamic_cast<TQWidget*>(obj), Palette_Parent);
return true;
- case QEvent::PaletteChange:
- setDominoButtonPalette(dynamic_cast<QWidget*>(obj), Palette_Widget);
+ case TQEvent::PaletteChange:
+ setDominoButtonPalette(dynamic_cast<TQWidget*>(obj), Palette_Widget);
return true;
default:
return false;
}
}
- if (dynamic_cast<QTabWidget*>(obj)) {
+ if (dynamic_cast<TQTabWidget*>(obj)) {
- QTabWidget* tw = dynamic_cast<QTabWidget*>(obj);
+ TQTabWidget* tw = dynamic_cast<TQTabWidget*>(obj);
if(tw->isA("KonqFrameTabs")) {
- QColorGroup cg = qApp->palette().active();
+ TQColorGroup cg = tqApp->palette().active();
switch (ev->type()) {
- case QEvent::Paint: {
- QRect r = tw->rect();
+ case TQEvent::Paint: {
+ TQRect r = tw->rect();
int top, height;
- if(tw->tabPosition() == QTabWidget::Top) {
+ if(tw->tabPosition() == TQTabWidget::Top) {
top = r.top();
height = r.height()-tw->currentPage()->height();
}
@@ -938,7 +938,7 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
height = r.height();
}
- QPainter p(tw);
+ TQPainter p(tw);
p.setPen(cg.background());
p.drawLine(r.left(), top, r.width(), top);
@@ -949,9 +949,9 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
p.drawLine(r.left(), top+2, r.width(), top+2);
return true;
}
- case QEvent::Show:
- case QEvent::PaletteChange:
- case QEvent::ApplicationPaletteChange: {
+ case TQEvent::Show:
+ case TQEvent::PaletteChange:
+ case TQEvent::ApplicationPaletteChange: {
if(tw->eraseColor() != cg.background().dark(konqTabBarContrast))
tw->setEraseColor(cg.background().dark(konqTabBarContrast));
return true;
@@ -960,22 +960,22 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
return false;
}
}
- else if(ev->type() == QEvent::Wheel) {
+ else if(ev->type() == TQEvent::Wheel) {
if(!tw)
return false;
- QRect r = tw->rect();
- QRect re = ((DominoQTabWidget*)tw)->tabBar()->rect();
+ TQRect r = tw->rect();
+ TQRect re = ((DominoTQTabWidget*)tw)->tabBar()->rect();
int top;
- if(tw->tabPosition() == QTabWidget::Top) {
+ if(tw->tabPosition() == TQTabWidget::Top) {
top = r.top();
}
else {
top = r.top() + tw->height()-re.height() - 2;
}
- QWheelEvent* e = (QWheelEvent*)ev;
- if(QRect(re.x(), top, r.width(), re.height()).contains(e->pos())) {
+ TQWheelEvent* e = (TQWheelEvent*)ev;
+ if(TQRect(re.x(), top, r.width(), re.height()).contains(e->pos())) {
int current = tw->currentPageIndex();
int count = tw->count();
if(count < 2)
@@ -992,23 +992,23 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
return true;
}
}
- if(ev->type() == QEvent::LayoutHint) {
+ if(ev->type() == TQEvent::LayoutHint) {
if(!tw)
return false;
- QWidget* w;
- if((w = tw->cornerWidget(Qt::TopRight))) {
+ TQWidget* w;
+ if((w = tw->cornerWidget(TQt::TopRight))) {
if(!w->width() != 25 || w->height() != 23)
w->setFixedSize(25, 23);
}
- if((w = tw->cornerWidget(Qt::TopLeft))) {
+ if((w = tw->cornerWidget(TQt::TopLeft))) {
if(!w->width() != 25 || w->height() != 23)
w->setFixedSize(25, 23);
}
- if((w = tw->cornerWidget(Qt::BottomRight))) {
+ if((w = tw->cornerWidget(TQt::BottomRight))) {
if(!w->width() != 25 || w->height() != 23)
w->setFixedSize(25, 23);
}
- if((w = tw->cornerWidget(Qt::BottomLeft))) {
+ if((w = tw->cornerWidget(TQt::BottomLeft))) {
if(!w->width() != 25 || w->height() != 23)
w->setFixedSize(25, 23);
}
@@ -1017,9 +1017,9 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
return false;
}
- if(::qt_cast<KToolBarButton*>(obj)) {
+ if(::tqt_cast<KToolBarButton*>(obj)) {
switch(ev->type()) {
- case QEvent::Paint: {
+ case TQEvent::Paint: {
KToolBar *bar = dynamic_cast<KToolBar*>(obj->parent());
if(!bar) return false; // KMyMoney2
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
@@ -1039,31 +1039,31 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
- SFlags flags = QStyle::Style_Default;
- SCFlags active = QStyle::SC_None;
- if(btn->isOn()) flags |= QStyle::Style_On;
+ SFlags flags = TQStyle::Style_Default;
+ SCFlags active = TQStyle::SC_None;
+ if(btn->isOn()) flags |= TQStyle::Style_On;
if (btn->isDown()) {
- flags |= QStyle::Style_Down;
- active |= QStyle::SC_ToolButton;
+ flags |= TQStyle::Style_Down;
+ active |= TQStyle::SC_ToolButton;
}
- if (btn->isEnabled()) flags |= QStyle::Style_Enabled;
- if (btn->isEnabled() && btn->hasMouse()) flags |= QStyle::Style_Raised;
- if (btn->hasFocus()) flags |= QStyle::Style_HasFocus;
+ if (btn->isEnabled()) flags |= TQStyle::Style_Enabled;
+ if (btn->isEnabled() && btn->hasMouse()) flags |= TQStyle::Style_Raised;
+ if (btn->hasFocus()) flags |= TQStyle::Style_HasFocus;
//SCFlags controls,
- QPainter p(btn);
+ TQPainter p(btn);
if(btn->isDown()/* || btn->isOn()*/)
buttonContour->setState(Contour_Pressed);
else if(btn == hoverWidget && btn->isEnabled())
buttonContour->setState(Contour_MouseOver);
- drawComplexControl(QStyle::CC_ToolButton, &p, btn, btn->rect(), btn->colorGroup(), flags, QStyle::SC_ToolButton, active, QStyleOption());
+ drawComplexControl(TQStyle::CC_ToolButton, &p, btn, btn->rect(), btn->colorGroup(), flags, TQStyle::SC_ToolButton, active, TQStyleOption());
buttonContour->reset();
return true;
}
- case QEvent::MouseButtonPress: {
- if(((QMouseEvent*)ev)->button() == Qt::RightButton)
+ case TQEvent::MouseButtonPress: {
+ if(((TQMouseEvent*)ev)->button() == TQt::RightButton)
return false;
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
btn->setUpdatesEnabled(false);
@@ -1072,8 +1072,8 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
hoverWidget = 0;
return false;
}
- case QEvent::MouseButtonRelease: {
- if(((QMouseEvent*)ev)->button() == Qt::RightButton)
+ case TQEvent::MouseButtonRelease: {
+ if(((TQMouseEvent*)ev)->button() == TQt::RightButton)
return false;
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
btn->setUpdatesEnabled(false);
@@ -1083,15 +1083,15 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
hoverWidget = btn;
return false;
}
- case QEvent::MouseButtonDblClick: {
- if(((QMouseEvent*)ev)->button() == Qt::RightButton)
+ case TQEvent::MouseButtonDblClick: {
+ if(((TQMouseEvent*)ev)->button() == TQt::RightButton)
return false;
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
if(!btn->isOn()) btn->setOn(true);
hoverWidget = 0;
return false;
}
- case QEvent::Enter: {
+ case TQEvent::Enter: {
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
if(btn->isEnabled()) {
hoverWidget = btn;
@@ -1099,7 +1099,7 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
return false;
}
- case QEvent::Leave: {
+ case TQEvent::Leave: {
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
if(btn == hoverWidget) {
hoverWidget = 0;
@@ -1107,15 +1107,15 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
return false;
}
- case QEvent::Move: {
+ case TQEvent::Move: {
if(_toolBtnAsBtn) {
KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj);
btn->repaint(false);
}
return false;
}
- case QEvent::ApplicationPaletteChange: {
- setDominoButtonPalette(static_cast<QWidget*>(obj), Palette_Application);
+ case TQEvent::ApplicationPaletteChange: {
+ setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Application);
return true;
}
default:
@@ -1123,35 +1123,35 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
}
- if(dynamic_cast<QRadioButton*>(obj) && dynamic_cast<QRadioButton*>(obj)->paletteBackgroundPixmap()) {
- if (ev->type() == QEvent::Paint) {
- QRadioButton* rb = static_cast<QRadioButton*>(obj);
+ if(dynamic_cast<TQRadioButton*>(obj) && dynamic_cast<TQRadioButton*>(obj)->paletteBackgroundPixmap()) {
+ if (ev->type() == TQEvent::Paint) {
+ TQRadioButton* rb = static_cast<TQRadioButton*>(obj);
rb->removeEventFilter(this);
- QApplication::sendEvent(rb, (QPaintEvent*)ev);
+ TQApplication::sendEvent(rb, (TQPaintEvent*)ev);
rb->installEventFilter(this);
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if ( rb->isEnabled() )
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if ( rb->hasFocus() )
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
if ( rb->isDown() )
- flags |= QStyle::Style_Down;
+ flags |= TQStyle::Style_Down;
if ( rb->hasMouse() )
- flags |= QStyle::Style_MouseOver;
- if ( rb->state() == QButton::On )
- flags |= QStyle::Style_On;
- else if ( rb->state() == QButton::Off )
- flags |= QStyle::Style_Off;
+ flags |= TQStyle::Style_MouseOver;
+ if ( rb->state() == TQButton::On )
+ flags |= TQStyle::Style_On;
+ else if ( rb->state() == TQButton::Off )
+ flags |= TQStyle::Style_Off;
- QPainter p(rb);
- drawControl(CE_RadioButton, &p, rb, QRect(0,0,17,17), rb->palette().active(), flags);
+ TQPainter p(rb);
+ drawControl(CE_RadioButton, &p, rb, TQRect(0,0,17,17), rb->palette().active(), flags);
return true;
}
- if (ev->type() == QEvent::Show && !strcmp(obj->name(), "__khtml")) {
- QRadioButton* rb = static_cast<QRadioButton*>(obj);
- QBitmap bm(rb->size());
+ if (ev->type() == TQEvent::Show && !strcmp(obj->name(), "__khtml")) {
+ TQRadioButton* rb = static_cast<TQRadioButton*>(obj);
+ TQBitmap bm(rb->size());
bm.fill(color0);
rb->setMask(bm);
}
@@ -1160,71 +1160,71 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
if (obj->isA("KonqCheckBox")) {
- if (ev->type() == QEvent::Show || ev->type() == QEvent::ApplicationPaletteChange) { // at least doesn't flicker in the unchecked state ;-)
- QButton* btn = dynamic_cast<QButton*>(obj);
- QPixmap pix(btn->size());
- pix.fill(qApp->palette().active().background());
- QPainter p(&pix);
- drawControl( CE_CheckBox, &p, btn, QRect(0,0,18,19), qApp->palette().active(), Style_Default|Style_Off, QStyleOption::Default);
+ if (ev->type() == TQEvent::Show || ev->type() == TQEvent::ApplicationPaletteChange) { // at least doesn't flicker in the unchecked state ;-)
+ TQButton* btn = dynamic_cast<TQButton*>(obj);
+ TQPixmap pix(btn->size());
+ pix.fill(tqApp->palette().active().background());
+ TQPainter p(&pix);
+ drawControl( CE_CheckBox, &p, btn, TQRect(0,0,18,19), tqApp->palette().active(), Style_Default|Style_Off, TQStyleOption::Default);
btn->setErasePixmap(pix);
return true;
}
- if (ev->type() == QEvent::Paint) {
- QButton* btn = dynamic_cast<QButton*>(obj);
+ if (ev->type() == TQEvent::Paint) {
+ TQButton* btn = dynamic_cast<TQButton*>(obj);
btn->erase();
SFlags flags = Style_Default;
if ( btn->isDown() )
flags |= Style_Down;
- if ( btn->state() == QButton::On )
+ if ( btn->state() == TQButton::On )
flags |= Style_On;
- else if ( btn->state() == QButton::Off )
+ else if ( btn->state() == TQButton::Off )
flags |= Style_Off;
if ( btn->isEnabled() )
flags |= Style_Enabled;
- QPainter p(btn);
- drawPrimitive(PE_CheckMark, &p, QRect(0,0,16,17), qApp->palette().active(), flags);
+ TQPainter p(btn);
+ drawPrimitive(PE_CheckMark, &p, TQRect(0,0,16,17), tqApp->palette().active(), flags);
return true;
}
return false;
}
- if(dynamic_cast<QCheckBox*>(obj)) {
- if (ev->type() == QEvent::Paint) {
- QCheckBox* cb = static_cast<QCheckBox*>(obj);
+ if(dynamic_cast<TQCheckBox*>(obj)) {
+ if (ev->type() == TQEvent::Paint) {
+ TQCheckBox* cb = static_cast<TQCheckBox*>(obj);
bool khtmlWidget = !strcmp(obj->name(), "__khtml");
if(khtmlWidget || cb->paletteBackgroundPixmap()) {
if(khtmlWidget) {
// this prevents the checkbox been erased before the rest of the html page
- QBitmap bm(cb->size());
+ TQBitmap bm(cb->size());
bm.fill(color0);
cb->setMask(bm);
}
else {
// draws a masked checkbox
cb->removeEventFilter(this);
- QApplication::sendEvent(cb, (QPaintEvent*)ev);
+ TQApplication::sendEvent(cb, (TQPaintEvent*)ev);
cb->installEventFilter(this);
}
// draws the missing alpha part
- QStyle::SFlags flags = QStyle::Style_Default;
+ TQStyle::SFlags flags = TQStyle::Style_Default;
if ( cb->isEnabled() )
- flags |= QStyle::Style_Enabled;
+ flags |= TQStyle::Style_Enabled;
if ( cb->hasFocus() )
- flags |= QStyle::Style_HasFocus;
+ flags |= TQStyle::Style_HasFocus;
if ( cb->isDown() )
- flags |= QStyle::Style_Down;
+ flags |= TQStyle::Style_Down;
if ( cb->hasMouse() )
- flags |= QStyle::Style_MouseOver;
- if ( cb->state() == QButton::On )
- flags |= QStyle::Style_On;
- else if ( cb->state() == QButton::Off )
- flags |= QStyle::Style_Off;
- else if ( cb->state() == QButton::NoChange )
- flags |= QStyle::Style_NoChange;
-
- QPainter p(cb);
- drawControl(CE_CheckBox, &p, cb, QRect(0,0,18,19), cb->palette().active(), flags);
+ flags |= TQStyle::Style_MouseOver;
+ if ( cb->state() == TQButton::On )
+ flags |= TQStyle::Style_On;
+ else if ( cb->state() == TQButton::Off )
+ flags |= TQStyle::Style_Off;
+ else if ( cb->state() == TQButton::NoChange )
+ flags |= TQStyle::Style_NoChange;
+
+ TQPainter p(cb);
+ drawControl(CE_CheckBox, &p, cb, TQRect(0,0,18,19), cb->palette().active(), flags);
return true;
}
return false;
@@ -1232,26 +1232,26 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
return false;
}
- if(dynamic_cast<QPopupMenu*>(obj)) {
+ if(dynamic_cast<TQPopupMenu*>(obj)) {
switch(ev->type()) {
- case QEvent::Resize:
- case QEvent::Show: {
- QWidget* w = static_cast<QWidget*>(obj);
- QRect r = w->rect();
- QRegion mask(r.x()+2, r.y(), r.width()-4, r.height());
- mask += QRegion(r.x(), r.y()+2, r.width(), r.height()-4);
- mask += QRegion(r.x()+1, r.y()+1, r.width()-2, r.height()-2);
+ case TQEvent::Resize:
+ case TQEvent::Show: {
+ TQWidget* w = static_cast<TQWidget*>(obj);
+ TQRect r = w->rect();
+ TQRegion mask(r.x()+2, r.y(), r.width()-4, r.height());
+ mask += TQRegion(r.x(), r.y()+2, r.width(), r.height()-4);
+ mask += TQRegion(r.x()+1, r.y()+1, r.width()-2, r.height()-2);
w->setMask(mask);
return false;
}
- case QEvent::Hide:
- static_cast<QWidget*>(obj)->setBackgroundMode(NoBackground);
+ case TQEvent::Hide:
+ static_cast<TQWidget*>(obj)->setBackgroundMode(NoBackground);
return false;
- case QEvent::ApplicationPaletteChange:
+ case TQEvent::ApplicationPaletteChange:
if(obj->isA("PanelKMenu")) {
- QWidget* w = static_cast<QWidget*>(obj);
- QPalette pal = qApp->palette();
- pal.setColor(QColorGroup::ButtonText, alphaBlendColors(_popupMenuColor, pal.active().foreground(), 150));
+ TQWidget* w = static_cast<TQWidget*>(obj);
+ TQPalette pal = tqApp->palette();
+ pal.setColor(TQColorGroup::ButtonText, alphaBlendColors(_popupMenuColor, pal.active().foreground(), 150));
w->setPalette(pal);
return true;
}
@@ -1261,38 +1261,38 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
- if(dynamic_cast<QPushButton*>(obj) && !obj->isA("KDockButton_Private") || dynamic_cast<QToolButton*>(obj) ) {
- QWidget* w = static_cast<QWidget*>(obj);
+ if(dynamic_cast<TQPushButton*>(obj) && !obj->isA("KDockButton_Private") || dynamic_cast<TQToolButton*>(obj) ) {
+ TQWidget* w = static_cast<TQWidget*>(obj);
switch(ev->type()) {
- case QEvent::Enter: {
+ case TQEvent::Enter: {
if(!w->isEnabled()) return false;
hoverWidget = w;
w->repaint(false);
return false;
}
- case QEvent::Leave: {
+ case TQEvent::Leave: {
if(!w->isEnabled()) return false;
hoverWidget = 0;
w->repaint(false);
return false;
}
- case QEvent::MouseButtonPress: {
- if(dynamic_cast<QToolButton*>(obj)) {
- QMouseEvent* e = (QMouseEvent*)ev;
- if(e->button() == Qt::LeftButton)
+ case TQEvent::MouseButtonPress: {
+ if(dynamic_cast<TQToolButton*>(obj)) {
+ TQMouseEvent* e = (TQMouseEvent*)ev;
+ if(e->button() == TQt::LeftButton)
popupMousePressPos = e->pos();
}
return false;
}
- case QEvent::MouseMove: {
- QMouseEvent* e = (QMouseEvent*)ev;
- if(dynamic_cast<QToolButton*>(obj) && popupTimer->isActive() && ((e->pos()-popupMousePressPos).manhattanLength() > 4 /*KGlobalSettings::dndEventDelay()*/))
+ case TQEvent::MouseMove: {
+ TQMouseEvent* e = (TQMouseEvent*)ev;
+ if(dynamic_cast<TQToolButton*>(obj) && popupTimer->isActive() && ((e->pos()-popupMousePressPos).manhattanLength() > 4 /*KGlobalSettings::dndEventDelay()*/))
popupToolMenu();
return false;
}
- case QEvent::ParentPaletteChange: {
- if(obj->isA("QToolButton")) {
+ case TQEvent::ParentPaletteChange: {
+ if(obj->isA("TQToolButton")) {
if(w->parentWidget() && !khtmlWidgets.contains(w)) {
w->setUpdatesEnabled(false);
@@ -1302,7 +1302,7 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
else {
w->setBackgroundMode(PaletteBackground);
- w->setBackgroundOrigin(QWidget::WidgetOrigin);
+ w->setBackgroundOrigin(TQWidget::WidgetOrigin);
setDominoButtonPalette(w, Palette_Parent);
}
w->setUpdatesEnabled(true);
@@ -1315,44 +1315,44 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
return true;
break;
}
- case QEvent::PaletteChange: {
+ case TQEvent::PaletteChange: {
setDominoButtonPalette(w, Palette_Widget);
return true;
}
- case QEvent::ApplicationPaletteChange: {
+ case TQEvent::ApplicationPaletteChange: {
return true;
}
default:
return false;
}
}
- if(obj->isA("QDockWindowHandle") || obj->isA("AppletHandleDrag")) {
- if ((ev->type() == QEvent::Enter) && static_cast<QWidget*>(obj)->isEnabled()) {
- QWidget* w = static_cast<QWidget*>(obj);
+ if(obj->isA("TQDockWindowHandle") || obj->isA("AppletHandleDrag")) {
+ if ((ev->type() == TQEvent::Enter) && static_cast<TQWidget*>(obj)->isEnabled()) {
+ TQWidget* w = static_cast<TQWidget*>(obj);
hoverWidget = w;
w->repaint(true);
return false;
}
- if (ev->type() == QEvent::Leave && static_cast<QWidget*>(obj) == hoverWidget) {
+ if (ev->type() == TQEvent::Leave && static_cast<TQWidget*>(obj) == hoverWidget) {
hoverWidget = 0;
- static_cast<QWidget*>(obj)->repaint(true);
+ static_cast<TQWidget*>(obj)->repaint(true);
return false;
}
return false;
}
if(obj->isA("KDockButton_Private")) {
- if (ev->type() == QEvent::Paint) {
- QPixmap* btnPix = 0;
- QButton* btn = static_cast<QButton*>(obj);
- if(!(btnPix = QPixmapCache::find(QString::number(btn->paletteBackgroundColor().pixel(), 16)+btn->name()))) {
- QPixmap* tmpPix = new QPixmap(qembed_findImage(btn->name()));
+ if (ev->type() == TQEvent::Paint) {
+ TQPixmap* btnPix = 0;
+ TQButton* btn = static_cast<TQButton*>(obj);
+ if(!(btnPix = TQPixmapCache::find(TQString::number(btn->paletteBackgroundColor().pixel(), 16)+btn->name()))) {
+ TQPixmap* tmpPix = new TQPixmap(qembed_findImage(btn->name()));
if(!tmpPix)
return false;
- btnPix = new QPixmap(12, 24);
+ btnPix = new TQPixmap(12, 24);
btnPix->fill(btn->paletteBackgroundColor());
bitBlt(btnPix, 0, 0, tmpPix);
- QPixmapCache::insert(QString::number(btn->paletteBackgroundColor().pixel(), 16)+btn->name(), btnPix);
+ TQPixmapCache::insert(TQString::number(btn->paletteBackgroundColor().pixel(), 16)+btn->name(), btnPix);
}
if(btn->isOn() || btn->isDown())
@@ -1367,20 +1367,20 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
if(dynamic_cast<KPopupTitle*>(obj)) {
switch(ev->type()) {
- case QEvent::Paint: {
+ case TQEvent::Paint: {
KPopupTitle* pt = static_cast<KPopupTitle*>(obj);
- QRect r = pt->rect();
- QPainter p(pt);
+ TQRect r = pt->rect();
+ TQPainter p(pt);
if(pt->parentWidget() && pt->parentWidget()->paletteBackgroundPixmap()) {
- QPoint point = QPoint(pt->geometry().x(), pt->geometry().y());
+ TQPoint point = TQPoint(pt->geometry().x(), pt->geometry().y());
p.drawTiledPixmap( 0, 0, pt->width(), pt->height(),
*pt->parentWidget()->backgroundPixmap(),
point.x(), point.y() );
}
- QFont f = p.font();
+ TQFont f = p.font();
f.setBold(true);
p.setFont(f);
@@ -1398,38 +1398,38 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
return false;
}
}
- if(dynamic_cast<QButton*>(obj) && obj->parent() && obj->parent()->isA("QToolBox")) {
- QWidget* w = dynamic_cast<QWidget*>(obj);
+ if(dynamic_cast<TQButton*>(obj) && obj->parent() && obj->parent()->isA("TQToolBox")) {
+ TQWidget* w = dynamic_cast<TQWidget*>(obj);
if(!w->isEnabled())
return false;
- if(ev->type() == QEvent::Enter) {
+ if(ev->type() == TQEvent::Enter) {
hoveredToolBoxTab = true;
w->repaint(false);
return false;
}
- if(ev->type() == QEvent::Leave) {
+ if(ev->type() == TQEvent::Leave) {
hoveredToolBoxTab = false;
w->repaint(false);
return false;
}
- if(ev->type() == QEvent::Move) {
+ if(ev->type() == TQEvent::Move) {
hoveredToolBoxTab = false;
return false;
}
return false;
}
- if(dynamic_cast<QHeader*>(obj)) {
+ if(dynamic_cast<TQHeader*>(obj)) {
switch(ev->type()) {
- case QEvent::ApplicationPaletteChange:
- static_cast<QHeader*>(obj)->setBackgroundMode(Qt::PaletteBackground);
- setDominoButtonPalette(static_cast<QWidget*>(obj), Palette_Application);
+ case TQEvent::ApplicationPaletteChange:
+ static_cast<TQHeader*>(obj)->setBackgroundMode(TQt::PaletteBackground);
+ setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Application);
return true;
- case QEvent::ParentPaletteChange:
- setDominoButtonPalette(static_cast<QWidget*>(obj), Palette_Parent);
+ case TQEvent::ParentPaletteChange:
+ setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Parent);
return true;
- case QEvent::PaletteChange:
- static_cast<QHeader*>(obj)->setBackgroundMode(Qt::PaletteBackground);
- setDominoButtonPalette(static_cast<QWidget*>(obj), Palette_Widget);
+ case TQEvent::PaletteChange:
+ static_cast<TQHeader*>(obj)->setBackgroundMode(TQt::PaletteBackground);
+ setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Widget);
return true;
default:
return false;
@@ -1437,25 +1437,25 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
return false;
}
- if(dynamic_cast<QDockWindow*>(obj)) {
+ if(dynamic_cast<TQDockWindow*>(obj)) {
switch(ev->type()) {
- case QEvent::LayoutHint: {
- QDockWindow* dw = dynamic_cast<QDockWindow*>(obj);
+ case TQEvent::LayoutHint: {
+ TQDockWindow* dw = dynamic_cast<TQDockWindow*>(obj);
if(!dw->widget())
return false;
if(!dw->area()) {
- dw->setFrameStyle(QFrame::Panel|QFrame::Sunken);
+ dw->setFrameStyle(TQFrame::Panel|TQFrame::Sunken);
dw->setLineWidth(1);
- QRect r = dw->rect();
- QRegion mask(r);
- mask -= QRegion(0, 0, 1, 1);
- mask -= QRegion(r.width()-1, 0, 1, 1);
- mask -= QRegion(0, r.height()-1, 1, 1);
- mask -= QRegion(r.width()-1, r.height()-1, 1, 1);
+ TQRect r = dw->rect();
+ TQRegion mask(r);
+ mask -= TQRegion(0, 0, 1, 1);
+ mask -= TQRegion(r.width()-1, 0, 1, 1);
+ mask -= TQRegion(0, r.height()-1, 1, 1);
+ mask -= TQRegion(r.width()-1, r.height()-1, 1, 1);
dw->setMask(mask);
}
- else if(dw->frameStyle() == QFrame::Panel|QFrame::Sunken) {
- dw->setFrameStyle(QFrame::StyledPanel|QFrame::Sunken);
+ else if(dw->frameStyle() == TQFrame::Panel|TQFrame::Sunken) {
+ dw->setFrameStyle(TQFrame::StyledPanel|TQFrame::Sunken);
dw->setLineWidth(2);
dw->clearMask();
}
@@ -1465,17 +1465,17 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
}
- else if(obj->isA("QWorkspaceChild")) {
+ else if(obj->isA("TQWorkspaceChild")) {
switch(ev->type()) {
- case QEvent::Show:
- case QEvent::Resize: {
- QWidget* w = static_cast<QWidget*>(obj);
- QRect r = w->rect();
- QRegion mask(r);
- mask -= QRegion(0, 0, 1, 1);
- mask -= QRegion(r.width()-1, 0, 1, 1);
- mask -= QRegion(0, r.height()-1, 1, 1);
- mask -= QRegion(r.width()-1, r.height()-1, 1, 1);
+ case TQEvent::Show:
+ case TQEvent::Resize: {
+ TQWidget* w = static_cast<TQWidget*>(obj);
+ TQRect r = w->rect();
+ TQRegion mask(r);
+ mask -= TQRegion(0, 0, 1, 1);
+ mask -= TQRegion(r.width()-1, 0, 1, 1);
+ mask -= TQRegion(0, r.height()-1, 1, 1);
+ mask -= TQRegion(r.width()-1, r.height()-1, 1, 1);
w->setMask(mask);
}
default:
@@ -1483,47 +1483,47 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
}
- if(obj->isA("QDockWindowResizeHandle")) {
- if(ev->type() == QEvent::PaletteChange)
- static_cast<QWidget*>(obj)->setBackgroundMode(Qt::PaletteBackground);
+ if(obj->isA("TQDockWindowResizeHandle")) {
+ if(ev->type() == TQEvent::PaletteChange)
+ static_cast<TQWidget*>(obj)->setBackgroundMode(TQt::PaletteBackground);
return false;
}
- if(obj->isA("QWhatsThat")) { // QWhatsThis
+ if(obj->isA("TQWhatsThat")) { // TQWhatsThis
- if (ev->type() == QEvent::Show) {
- QWidget* w = dynamic_cast<QWidget*>(obj);
- w->setBackgroundMode(Qt::NoBackground);
- QRect r = w->rect();
- QRegion mask(r.x()+3, r.y(), r.width()-6, r.height());
- mask += QRegion(r.x()+2, r.y()+1, r.width()-4, r.height()-2);
- mask += QRegion(r.x()+1, r.y()+2, r.width()-2, r.height()-4);
- mask += QRegion(r.x(), r.y()+3, r.width(), r.height()-6);
+ if (ev->type() == TQEvent::Show) {
+ TQWidget* w = dynamic_cast<TQWidget*>(obj);
+ w->setBackgroundMode(TQt::NoBackground);
+ TQRect r = w->rect();
+ TQRegion mask(r.x()+3, r.y(), r.width()-6, r.height());
+ mask += TQRegion(r.x()+2, r.y()+1, r.width()-4, r.height()-2);
+ mask += TQRegion(r.x()+1, r.y()+2, r.width()-2, r.height()-4);
+ mask += TQRegion(r.x(), r.y()+3, r.width(), r.height()-6);
w->setMask(mask);
return true;
}
- if (ev->type() == QEvent::Paint) {
- DominoQWhatsThat* dwt = (DominoQWhatsThat*)obj;
- QString text = dwt->text;
- QRect r = dwt->rect();
+ if (ev->type() == TQEvent::Paint) {
+ DominoTQWhatsThat* dwt = (DominoTQWhatsThat*)obj;
+ TQString text = dwt->text;
+ TQRect r = dwt->rect();
int x = r.x();
int y = r.y();
int w = r.width();
int h = r.height();
- QRegion mask(x+1, y+4, w-2, h-8);
- mask += QRegion(x+2, y+3, w-4, h-6);
- mask += QRegion(x+3, y+2, w-6, h-4);
- mask += QRegion(x+4, y+1, w-8, h-2);
+ TQRegion mask(x+1, y+4, w-2, h-8);
+ mask += TQRegion(x+2, y+3, w-4, h-6);
+ mask += TQRegion(x+3, y+2, w-6, h-4);
+ mask += TQRegion(x+4, y+1, w-8, h-2);
- QPainter p(dwt);
+ TQPainter p(dwt);
p.setClipRegion(mask);
- renderGradient(&p, QRect(r.left(), r.top(), r.width(), r.height()), _toolTipColor.light(110), _toolTipColor.dark(105), true);
+ renderGradient(&p, TQRect(r.left(), r.top(), r.width(), r.height()), _toolTipColor.light(110), _toolTipColor.dark(105), true);
p.setClipping(false);
- QColor tabContour2 = qApp->palette().active().background().dark(150);
+ TQColor tabContour2 = tqApp->palette().active().background().dark(150);
p.save();
p.setPen(tabContour2);
@@ -1540,9 +1540,9 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
r.addCoords( 12, 8, -12, -8 );
- if(QStyleSheet::mightBeRichText( text )) {
- QSimpleRichText* srt = new QSimpleRichText( text, dwt->font());
- srt->draw(&p, r.x(), r.y(), r, qApp->palette().active(), 0);
+ if(TQStyleSheet::mightBeRichText( text )) {
+ TQSimpleRichText* srt = new TQSimpleRichText( text, dwt->font());
+ srt->draw(&p, r.x(), r.y(), r, tqApp->palette().active(), 0);
}
else {
r.addCoords( 2, 3, 0, 0 );
@@ -1557,57 +1557,57 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
if(obj->isA("KonqFileTip")) {
- if (ev->type() == QEvent::Show || ev->type() == QEvent::Paint) {
+ if (ev->type() == TQEvent::Show || ev->type() == TQEvent::Paint) {
- QWidget* widget = dynamic_cast<QWidget*>(obj);
- QRect r = widget->rect();
+ TQWidget* widget = dynamic_cast<TQWidget*>(obj);
+ TQRect r = widget->rect();
- QPixmap pix(r.size());
- QPainter p(&pix);
- renderGradient(&p, QRect(r.left(), r.top(), r.width(), r.height()), _toolTipColor.light(110), _toolTipColor.dark(105), true);
+ TQPixmap pix(r.size());
+ TQPainter p(&pix);
+ renderGradient(&p, TQRect(r.left(), r.top(), r.width(), r.height()), _toolTipColor.light(110), _toolTipColor.dark(105), true);
- if(ev->type() == QEvent::Show) {
- dynamic_cast<QFrame*>(widget)->setFrameStyle(QFrame::NoFrame);
- widget->setBackgroundMode(Qt::NoBackground);
-
- QRegion mask(r.x()+3, r.y(), r.width()-6, r.height());
- mask += QRegion(r.x()+2, r.y()+1, r.width()-4, r.height()-2);
- mask += QRegion(r.x()+1, r.y()+2, r.width()-2, r.height()-4);
- mask += QRegion(r.x(), r.y()+3, r.width(), r.height()-6);
- dynamic_cast<QFrame*>(widget)->setMask(mask);
-
- QObjectList *list = const_cast<QObjectList *>(widget->children());
- QObjectListIt it( *list );
- QObject * o;
+ if(ev->type() == TQEvent::Show) {
+ dynamic_cast<TQFrame*>(widget)->setFrameStyle(TQFrame::NoFrame);
+ widget->setBackgroundMode(TQt::NoBackground);
+
+ TQRegion mask(r.x()+3, r.y(), r.width()-6, r.height());
+ mask += TQRegion(r.x()+2, r.y()+1, r.width()-4, r.height()-2);
+ mask += TQRegion(r.x()+1, r.y()+2, r.width()-2, r.height()-4);
+ mask += TQRegion(r.x(), r.y()+3, r.width(), r.height()-6);
+ dynamic_cast<TQFrame*>(widget)->setMask(mask);
+
+ TQObjectList *list = const_cast<TQObjectList *>(widget->children());
+ TQObjectListIt it( *list );
+ TQObject * o;
while ( (o = it.current()) != 0 ) {
++it;
- if(dynamic_cast<QLabel*>(o)) {
- QLabel* l = dynamic_cast<QLabel*>(o);
- l->setBackgroundOrigin(QWidget::ParentOrigin);
+ if(dynamic_cast<TQLabel*>(o)) {
+ TQLabel* l = dynamic_cast<TQLabel*>(o);
+ l->setBackgroundOrigin(TQWidget::ParentOrigin);
l->setPaletteBackgroundPixmap(pix);
}
}
}
p.end();
- if(ev->type() == QEvent::Paint) {
+ if(ev->type() == TQEvent::Paint) {
int x = r.x();
int y = r.y();
int w = r.width();
int h = r.height();
- QRegion mask(x+1, y+4, w-2, h-8);
- mask += QRegion(x+2, y+3, w-4, h-6);
- mask += QRegion(x+3, y+2, w-6, h-4);
- mask += QRegion(x+4, y+1, w-8, h-2);
+ TQRegion mask(x+1, y+4, w-2, h-8);
+ mask += TQRegion(x+2, y+3, w-4, h-6);
+ mask += TQRegion(x+3, y+2, w-6, h-4);
+ mask += TQRegion(x+4, y+1, w-8, h-2);
p.begin(widget);
p.setClipRegion(mask);
p.drawPixmap(0, 0, pix);
p.setClipping(false);
- QColor tabContour2 = qApp->palette().active().background().dark(150);
+ TQColor tabContour2 = tqApp->palette().active().background().dark(150);
p.setPen(tabContour2);
p.drawLine(x+7,y, w-8,y); // top
p.drawLine(x+7,h-1, w-8,h-1); // bottom
@@ -1626,26 +1626,26 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
return false;
}
- if(obj->isA("QTipLabel")) {
+ if(obj->isA("TQTipLabel")) {
- if (ev->type() == QEvent::Show) {
- QLabel* l = dynamic_cast<QLabel*>(obj);
+ if (ev->type() == TQEvent::Show) {
+ TQLabel* l = dynamic_cast<TQLabel*>(obj);
l->resize( l->width()+2, l->height()+2);
- l->setBackgroundMode(Qt::NoBackground);
+ l->setBackgroundMode(TQt::NoBackground);
int x, y, w, h;
l->rect().rect(&x, &y, &w, &h);
- QRegion mask(x, y+3, w, h-6);
- mask += QRegion(x+1, y+2, w-2, h-4);
- mask += QRegion(x+2, y+1, w-4, h-2);
- mask += QRegion(x+3, y, w-6, h);
+ TQRegion mask(x, y+3, w, h-6);
+ mask += TQRegion(x+1, y+2, w-2, h-4);
+ mask += TQRegion(x+2, y+1, w-4, h-2);
+ mask += TQRegion(x+3, y, w-6, h);
l->setMask(mask);
return true;
}
- if (ev->type() == QEvent::Paint) {
+ if (ev->type() == TQEvent::Paint) {
- QLabel* label = dynamic_cast<QLabel*>(obj);
- QRect r = label->rect();
+ TQLabel* label = dynamic_cast<TQLabel*>(obj);
+ TQRect r = label->rect();
int x = r.x();
int y = r.y();
@@ -1653,18 +1653,18 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
int h = r.height();
// one pixel smaler as the mask
- QRegion mask(x+1, y+4, w-2, h-8);
- mask += QRegion(x+2, y+3, w-4, h-6);
- mask += QRegion(x+3, y+2, w-6, h-4);
- mask += QRegion(x+4, y+1, w-8, h-2);
+ TQRegion mask(x+1, y+4, w-2, h-8);
+ mask += TQRegion(x+2, y+3, w-4, h-6);
+ mask += TQRegion(x+3, y+2, w-6, h-4);
+ mask += TQRegion(x+4, y+1, w-8, h-2);
- QPainter p(label);
+ TQPainter p(label);
p.setClipRegion(mask);
- renderGradient(&p, QRect(r.left(), r.top(), r.width(), r.height()), _toolTipColor.light(110), _toolTipColor.dark(105), true);
+ renderGradient(&p, TQRect(r.left(), r.top(), r.width(), r.height()), _toolTipColor.light(110), _toolTipColor.dark(105), true);
p.setClipping(false);
- QColor tabContour2 = qApp->palette().active().background().dark(150);
+ TQColor tabContour2 = tqApp->palette().active().background().dark(150);
p.setPen(tabContour2);
p.drawLine(x+7,y, w-8,y); // top
p.drawLine(x+7,h-1, w-8,h-1); // bottom
@@ -1676,20 +1676,20 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
bitBlt(label, x, h-7, border1, 0, 7, 7, 7);
bitBlt(label, w-7, h-7, border1, 7, 7, 7, 7);
- QSimpleRichText* srt = new QSimpleRichText(label->text(), label->font());
+ TQSimpleRichText* srt = new TQSimpleRichText(label->text(), label->font());
srt->setWidth(r.width()-5);
- srt->draw(&p, r.x()+4, r.y(), r, qApp->palette().active(),0);
+ srt->draw(&p, r.x()+4, r.y(), r, tqApp->palette().active(),0);
delete srt;
}
return true;
}
- if(obj->isA("QViewportWidget") && dynamic_cast<QTextEdit*>(obj->parent())) {
+ if(obj->isA("TQViewportWidget") && dynamic_cast<TQTextEdit*>(obj->parent())) {
switch(ev->type()) {
- case QEvent::MouseButtonPress:
- case 6/*QEvent::KeyPress*/: {
- QTextEdit* te = dynamic_cast<QTextEdit*>(obj->parent());
+ case TQEvent::MouseButtonPress:
+ case 6/*TQEvent::KeyPress*/: {
+ TQTextEdit* te = dynamic_cast<TQTextEdit*>(obj->parent());
if(te->isEnabled() && !te->isReadOnly())
- static_cast<QWidget*>(obj)->setCursor(Qt::blankCursor);
+ static_cast<TQWidget*>(obj)->setCursor(TQt::blankCursor);
return false;
}
default:
@@ -1697,46 +1697,46 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
}
- if (dynamic_cast<QFrame*>(obj)) { // at last because other widgets may include a frame.
+ if (dynamic_cast<TQFrame*>(obj)) { // at last because other widgets may include a frame.
- QFrame* f = dynamic_cast<QFrame*>(obj);
- const QRect r = f->rect();
+ TQFrame* f = dynamic_cast<TQFrame*>(obj);
+ const TQRect r = f->rect();
- if (ev->type() == QEvent::Paint) {
+ if (ev->type() == TQEvent::Paint) {
switch(f->frameShape()){
- case QFrame::HLine: {
- QPainter p(f);
+ case TQFrame::HLine: {
+ TQPainter p(f);
// p.setPen(f->paletteBackgroundColor().dark(120));
p.setPen(alphaBlendColors(f->paletteForegroundColor(), f->paletteBackgroundColor(), 40));
p.drawLine(0,0,f->frameRect().width(),0);
return true;
}
- case QFrame::VLine: {
- QPainter p(f);
+ case TQFrame::VLine: {
+ TQPainter p(f);
p.setPen(alphaBlendColors(f->paletteForegroundColor(), f->paletteBackgroundColor(), 40));
p.drawLine(0,0,0,f->frameRect().height());
return true;
}
- case QFrame::WinPanel:
- case QFrame::Panel: {
+ case TQFrame::WinPanel:
+ case TQFrame::Panel: {
if(f->parentWidget() && f->parentWidget()->isA("KDockSplitter")) {
if(!f->erasePixmap()) {
bool horizontal = (r.width() > r.height());
- QPixmap pix(r.size());
- QPainter p(&pix);
+ TQPixmap pix(r.size());
+ TQPainter p(&pix);
renderGradient(&p, r, lightenColor(f->paletteBackgroundColor(), 40), darkenColor(f->paletteBackgroundColor(), 30), horizontal);
f->setErasePixmap(pix);
}
return true;
}
- QPainter p(f);
- QColor frameColor;
- if(f->frameShape() == QFrame::Panel && f->frameShadow() == QFrame::Plain) // used as a selection in kspread
+ TQPainter p(f);
+ TQColor frameColor;
+ if(f->frameShape() == TQFrame::Panel && f->frameShadow() == TQFrame::Plain) // used as a selection in kspread
frameColor = f->paletteBackgroundColor().dark(160);
- else if(dynamic_cast<QListBox*>(obj) && dynamic_cast<QComboBox*>(obj->parent()))
+ else if(dynamic_cast<TQListBox*>(obj) && dynamic_cast<TQComboBox*>(obj->parent()))
frameColor = f->paletteBackgroundColor().dark(190);
else
frameColor = f->paletteBackgroundColor().dark(120);
@@ -1745,34 +1745,34 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
p.setPen(frameColor);
p.drawRect(f->rect());
- QPaintEvent* e = (QPaintEvent*)ev;
+ TQPaintEvent* e = (TQPaintEvent*)ev;
p.setClipRegion(e->region().intersect(f->contentsRect()));
- DominoQFrame* df = (DominoQFrame*)f;
+ DominoTQFrame* df = (DominoTQFrame*)f;
df->drawContents(&p);
- DominoQWidget* dw = (DominoQWidget*)f;
- QPaintEvent* event = new QPaintEvent(e->region().intersect(f->contentsRect()));
+ DominoTQWidget* dw = (DominoTQWidget*)f;
+ TQPaintEvent* event = new TQPaintEvent(e->region().intersect(f->contentsRect()));
dw->paintEvent(event);
return true;
}
- case QFrame::ToolBarPanel: {
+ case TQFrame::ToolBarPanel: {
if(f->isA("KonqSidebarTree")) {
- QPainter p(f);
- p.setPen(qApp->palette().active().background().dark(120));
+ TQPainter p(f);
+ p.setPen(tqApp->palette().active().background().dark(120));
p.drawRect(f->rect());
return true;
}
return false;
}
- case QFrame::Box: {
+ case TQFrame::Box: {
if(f->parentWidget() && !strcmp(f->parentWidget()->name(), "KonqFrame")) {
- QPainter p(f);
- p.fillRect(r.width()-16, r.height()-16, 15, 15, qApp->palette().active().background()); // 15x15 scrollview cornerwidget gap
+ TQPainter p(f);
+ 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")) {
- QPainter p(f);
- p.setPen(qApp->palette().active().background().dark(120));
+ TQPainter p(f);
+ p.setPen(tqApp->palette().active().background().dark(120));
p.drawRect(f->rect());
return true;
}
@@ -1782,39 +1782,39 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
}
- if (ev->type() == QEvent::Show || ev->type() == QEvent::ApplicationPaletteChange) { // ApplicationPaletteChange for style changes
+ if (ev->type() == TQEvent::Show || ev->type() == TQEvent::ApplicationPaletteChange) { // ApplicationPaletteChange for style changes
switch(f->frameShape()){
- case QFrame::TabWidgetPanel:
- if(ev->type() == QEvent::ApplicationPaletteChange) {
+ case TQFrame::TabWidgetPanel:
+ if(ev->type() == TQEvent::ApplicationPaletteChange) {
if(f->lineWidth() != 4)
f->setLineWidth(4);
- if(f->frameRect() != QRect(0, 0, f->width(), f->height()-1))
- f->setFrameRect(QRect(0, 0, f->width(), f->height()-1));
+ if(f->frameRect() != TQRect(0, 0, f->width(), f->height()-1))
+ f->setFrameRect(TQRect(0, 0, f->width(), f->height()-1));
if(f->margin() != 0)
f->setMargin(0);
- QWidget* w = f->parentWidget();
+ TQWidget* w = f->parentWidget();
for(int i=0; i<3; i++) { // the third parentcheck is for the tabWidget on kcm khtml_plugins
if(!w) break;
- if(dynamic_cast<QGroupBox*>(w)) {
- f->setPaletteBackgroundColor(qApp->palette().active().background());
+ if(dynamic_cast<TQGroupBox*>(w)) {
+ f->setPaletteBackgroundColor(tqApp->palette().active().background());
break;
}
w = w->parentWidget();
}
}
return true;
- case QFrame::Box:
+ case TQFrame::Box:
if(f->parentWidget() && !strcmp(f->parentWidget()->name(), "KonqFrame")) {
- f->setEraseColor(qApp->palette().active().background().dark(120));
+ f->setEraseColor(tqApp->palette().active().background().dark(120));
f->erase();
return true;
}
- case QFrame::Panel:
- if(ev->type() == QEvent::ApplicationPaletteChange && f->parentWidget() && f->parentWidget()->isA("KDockSplitter")) {
- f->setBackgroundMode(Qt::PaletteBackground);
+ case TQFrame::Panel:
+ if(ev->type() == TQEvent::ApplicationPaletteChange && f->parentWidget() && f->parentWidget()->isA("KDockSplitter")) {
+ f->setBackgroundMode(TQt::PaletteBackground);
return true;
}
default:
@@ -1822,11 +1822,11 @@ bool DominoStyle::eventFilter(QObject *obj, QEvent *ev)
}
return false;
}
- if(ev->type() == QEvent::LayoutHint && f->frameShape() == QFrame::TabWidgetPanel) { // don't look broken in kcm stylePreview
+ if(ev->type() == TQEvent::LayoutHint && f->frameShape() == TQFrame::TabWidgetPanel) { // don't look broken in kcm stylePreview
if(f->lineWidth() != 4)
f->setLineWidth(4);
- if(f->frameRect() != QRect(0, 0, f->width(), f->height()-1))
- f->setFrameRect(QRect(0, 0, f->width(), f->height()-1));
+ if(f->frameRect() != TQRect(0, 0, f->width(), f->height()-1))
+ f->setFrameRect(TQRect(0, 0, f->width(), f->height()-1));
if(f->margin() != 0)
f->setMargin(0);