mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 08:45:36 +08:00
Event accept
This commit is contained in:
@@ -157,7 +157,7 @@ namespace BlackGui
|
|||||||
// which is the only visible one
|
// which is the only visible one
|
||||||
// selecting is tab text independent (can be hidden)
|
// selecting is tab text independent (can be hidden)
|
||||||
if (!this->m_tabBar || this->m_tabBar->count() < 1) { return nullptr; }
|
if (!this->m_tabBar || this->m_tabBar->count() < 1) { return nullptr; }
|
||||||
foreach(const CDockWidgetInfoArea * ia, m_dockWidgetInfoAreas)
|
for (const CDockWidgetInfoArea *ia : m_dockWidgetInfoAreas)
|
||||||
{
|
{
|
||||||
if (ia->isFloating()) { continue; }
|
if (ia->isFloating()) { continue; }
|
||||||
if (ia->isWidgetVisible()) { return ia; }
|
if (ia->isWidgetVisible()) { return ia; }
|
||||||
@@ -177,7 +177,7 @@ namespace BlackGui
|
|||||||
QList<const CDockWidgetInfoArea *> CInfoArea::getDockWidgetInfoAreas() const
|
QList<const CDockWidgetInfoArea *> CInfoArea::getDockWidgetInfoAreas() const
|
||||||
{
|
{
|
||||||
QList<const CDockWidgetInfoArea *> constDockWidgets;
|
QList<const CDockWidgetInfoArea *> constDockWidgets;
|
||||||
foreach(const CDockWidgetInfoArea * dockWidgetInfoArea, m_dockWidgetInfoAreas)
|
for (const CDockWidgetInfoArea *dockWidgetInfoArea : m_dockWidgetInfoAreas)
|
||||||
{
|
{
|
||||||
constDockWidgets.append(dockWidgetInfoArea);
|
constDockWidgets.append(dockWidgetInfoArea);
|
||||||
}
|
}
|
||||||
@@ -246,10 +246,12 @@ namespace BlackGui
|
|||||||
if (event->key() == Qt::Key_Right)
|
if (event->key() == Qt::Key_Right)
|
||||||
{
|
{
|
||||||
this->selectRightTab();
|
this->selectRightTab();
|
||||||
|
event->accept();
|
||||||
}
|
}
|
||||||
else if (event->key() == Qt::Key_Left)
|
else if (event->key() == Qt::Key_Left)
|
||||||
{
|
{
|
||||||
this->selectLeftTab();
|
this->selectLeftTab();
|
||||||
|
event->accept();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ namespace BlackGui
|
|||||||
if (this->isVisible() && event->key() == Qt::Key_Escape)
|
if (this->isVisible() && event->key() == Qt::Key_Escape)
|
||||||
{
|
{
|
||||||
this->close();
|
this->close();
|
||||||
event->setAccepted(true);
|
event->accept();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ namespace BlackGui
|
|||||||
if (m_overlayMessages && event->key() == Qt::Key_Escape)
|
if (m_overlayMessages && event->key() == Qt::Key_Escape)
|
||||||
{
|
{
|
||||||
m_overlayMessages->close();
|
m_overlayMessages->close();
|
||||||
event->setAccepted(true);
|
event->accept();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user