Replace Qt with TQt

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/7/head
Michele Calgaro 1 year ago
parent 8805ca8534
commit 2b50d74ff0
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -107,19 +107,19 @@ void CrystalButton::mousePressEvent(TQMouseEvent* e)
int button;
switch(e->button())
{
case Qt::LeftButton:
button=Qt::LeftButton;
case TQt::LeftButton:
button=TQt::LeftButton;
break;
case Qt::RightButton:
case TQt::RightButton:
if ((type_ == ButtonMax) || (type_ == ButtonMin) || (type_ == ButtonMenu) || (type_ == ButtonClose))
button=Qt::LeftButton; else button=Qt::NoButton;
button=TQt::LeftButton; else button=TQt::NoButton;
break;
case Qt::MidButton:
case TQt::MidButton:
if ((type_ == ButtonMax) || (type_ == ButtonMin))
button=Qt::LeftButton; else button=Qt::NoButton;
button=TQt::LeftButton; else button=TQt::NoButton;
break;
default:button=Qt::NoButton;
default:button=TQt::NoButton;
break;
}
TQMouseEvent me(e->type(), e->pos(), e->globalPos(),button, e->state());
@ -132,19 +132,19 @@ void CrystalButton::mouseReleaseEvent(TQMouseEvent* e)
int button;
switch(e->button())
{
case Qt::LeftButton:
button=Qt::LeftButton;
case TQt::LeftButton:
button=TQt::LeftButton;
break;
case Qt::RightButton:
case TQt::RightButton:
if ((type_ == ButtonMax) || (type_ == ButtonMin) || (type_ == ButtonMenu) || (type_==ButtonClose))
button=Qt::LeftButton; else button=Qt::NoButton;
button=TQt::LeftButton; else button=TQt::NoButton;
break;
case Qt::MidButton:
case TQt::MidButton:
if ((type_ == ButtonMax) || (type_ == ButtonMin))
button=Qt::LeftButton; else button=Qt::NoButton;
button=TQt::LeftButton; else button=TQt::NoButton;
break;
default:button=Qt::NoButton;
default:button=TQt::NoButton;
break;
}
TQMouseEvent me(e->type(), e->pos(), e->globalPos(), button, e->state());

@ -1211,7 +1211,7 @@ void CrystalClient::ClientWindows(Window* v_frame,Window* v_wrapper,Window *v_cl
void CrystalClient::mouseDoubleClickEvent(TQMouseEvent *e)
{
if (/*(titlebar_->geometry().contains(e->pos()))&&*/(e->button()==Qt::LeftButton)) titlebarDblClickOperation();
if (/*(titlebar_->geometry().contains(e->pos()))&&*/(e->button()==TQt::LeftButton)) titlebarDblClickOperation();
else {
TQMouseEvent me(TQEvent::MouseButtonPress,e->pos(),e->button(),e->state());
processMousePressEvent(&me);
@ -1545,10 +1545,10 @@ void CrystalClient::maxButtonPressed()
{
switch (button[ButtonMax]->lastMousePress())
{
case Qt::MidButton:
case TQt::MidButton:
maximize(maximizeMode() ^ MaximizeVertical);
break;
case Qt::RightButton:
case TQt::RightButton:
maximize(maximizeMode() ^ MaximizeHorizontal);
break;
default:
@ -1561,11 +1561,11 @@ void CrystalClient::minButtonPressed()
{
if (button[ButtonMin]) {
switch (button[ButtonMin]->lastMousePress()) {
case Qt::MidButton:{
case TQt::MidButton:{
performWindowOperation(LowerOp);
break;
}
case Qt::RightButton:
case TQt::RightButton:
if (isShadeable()) setShade(!isShade());
break;
default:
@ -1604,7 +1604,7 @@ void CrystalClient::closeButtonPressed()
{
if (button[ButtonClose])
switch (button[ButtonClose]->lastMousePress()) {
case Qt::RightButton:
case TQt::RightButton:
{
Window frame,wrapper,client;
char param[20];
@ -1629,8 +1629,8 @@ void CrystalClient::shadeButtonPressed()
{
if (button[ButtonShade]) {
switch (button[ButtonShade]->lastMousePress()) {
case Qt::MidButton:
case Qt::RightButton:
case TQt::MidButton:
case TQt::RightButton:
break;
default:
if (isShadeable()) setShade(!isShade());

Loading…
Cancel
Save