Main window raise on Dataflow-widget click fixed.

This commit is contained in:
cora48 2015-03-13 17:07:53 +03:00
parent 140abd9027
commit c7a149efeb

View File

@ -1574,11 +1574,13 @@ bool nesca_3::eventFilter(QObject* obj, QEvent *event)
};
return false;
}
else if (obj == ui->widgetIRC)
else if (obj == qwm)
{
if(MapWidgetOpened)
//auto qwe = event->type();
if(MapWidgetOpened && event->type() == QEvent::WindowActivate)
{
qwm->raise();
//qwm->raise();
this->raise();
};
if (event->type() == QEvent::KeyPress)
{
@ -1599,17 +1601,6 @@ bool nesca_3::eventFilter(QObject* obj, QEvent *event)
};
return false;
}
// else if (obj == qwm)
// {
// ///TODO: raise parent window with qwm
// if(event->type() == QEvent::MouseButtonPress)
// {
// Qt::WindowFlags eFlags = windowFlags ();
// eFlags |= Qt::WindowStaysOnTopHint;
// setWindowFlags(eFlags);
// return true;
// };
// }
else
{
if (event->type() == QEvent::KeyPress)
@ -1628,6 +1619,10 @@ bool nesca_3::eventFilter(QObject* obj, QEvent *event)
privateMsgFlag = false;
event->accept();
return true;
}
else if(MapWidgetOpened && event->type() == QEvent::WindowActivate)
{
qwm->raise();
};
return false;
};
@ -3198,7 +3193,7 @@ void CreateVerFile()
};
}
char GetVer()
const char *GetVer()
{
int dver = 0;
int tver = 0;
@ -3241,7 +3236,7 @@ char GetVer()
char db[32] = {0};
sprintf(db, "%X-%X", dver, tver);
return *db;
return std::string(db).c_str();
}
void nesca_3::slotShowRedVersion()
@ -3262,7 +3257,6 @@ void _startMsgCheck()
nesca_3::nesca_3(QWidget *parent) : QMainWindow(parent)
{
setWindowFlags ( Qt::FramelessWindowHint );
this->hide();
gthis = this;
ui->setupUi(this);
@ -3275,7 +3269,7 @@ void _startMsgCheck()
ui->rVerLabel->hide();
setSceneArea();
tray = new QSystemTrayIcon(QIcon(":/nesca_3/Z:/nesca.ico"), this);
tray = new QSystemTrayIcon(QIcon(":/nesca_3/nesca.ico"), this);
tray->hide();
SetValidators();
@ -3286,9 +3280,8 @@ void _startMsgCheck()
ui->ircNickBox->setText("nsa_" + QString::number(qrand() % 8999 + 1000));
const char &rVer = GetVer();
QString QVER((const char *)rVer);
QVER += QString(rVer + 1);
const char *rVer = GetVer();
QString QVER(rVer);
strcpy(gVER, QVER.toLatin1().data());
ui->logoLabel->setToolTip("v3-" + QVER);
ui->logoLabel->setStyleSheet("color:white; border: none;background-color:black;");