2020-12-28 09:58:28 +01:00
|
|
|
/***************************************************************************
|
|
|
|
|
* Copyright (C) 2020 by Piotr Wilczynski - delwing@gmail.com *
|
2022-10-24 22:33:22 +01:00
|
|
|
* Copyright (C) 2022 by Stephen Lyons - slysven@virginmedia.com *
|
2020-12-28 09:58:28 +01:00
|
|
|
* *
|
|
|
|
|
* This program is free software; you can redistribute it and/or modify *
|
|
|
|
|
* it under the terms of the GNU General Public License as published by *
|
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
|
|
* (at your option) any later version. *
|
|
|
|
|
* *
|
|
|
|
|
* This program is distributed in the hope that it will be useful, *
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
|
* GNU General Public License for more details. *
|
|
|
|
|
* *
|
|
|
|
|
* You should have received a copy of the GNU General Public License *
|
|
|
|
|
* along with this program; if not, write to the *
|
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
|
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
|
|
#include "AltFocusMenuBarDisable.h"
|
2021-10-02 12:23:40 +02:00
|
|
|
|
|
|
|
|
AltFocusMenuBarDisable::AltFocusMenuBarDisable()
|
|
|
|
|
{
|
|
|
|
|
setObjectName(baseStyle()->objectName());
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-24 22:33:22 +01:00
|
|
|
AltFocusMenuBarDisable::AltFocusMenuBarDisable(const QString& style)
|
|
|
|
|
: QProxyStyle(QStyleFactory::create(style))
|
|
|
|
|
{
|
|
|
|
|
}
|
2020-12-28 09:58:28 +01:00
|
|
|
|
|
|
|
|
int AltFocusMenuBarDisable::styleHint(StyleHint styleHint, const QStyleOption* opt, const QWidget* widget, QStyleHintReturn* returnData) const
|
|
|
|
|
{
|
|
|
|
|
if (styleHint == QStyle::SH_MenuBar_AltKeyNavigation) {
|
2021-01-04 14:00:41 +01:00
|
|
|
return 0;
|
2020-12-28 09:58:28 +01:00
|
|
|
}
|
2023-12-24 06:27:16 -05:00
|
|
|
if (styleHint == QStyle::SH_ItemView_ActivateItemOnSingleClick) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
2020-12-28 09:58:28 +01:00
|
|
|
|
|
|
|
|
return QProxyStyle::styleHint(styleHint, opt, widget, returnData);
|
|
|
|
|
}
|