Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qcocoamenuitem.mm File Reference

(c8473c090367496885410ce70c0305b6d2b56ce7)

#include <AppKit/AppKit.h>
#include <qpa/qplatformtheme.h>
#include "qcocoamenuitem.h"
#include "qcocoansmenu.h"
#include "qcocoamenu.h"
#include "qcocoamenubar.h"
#include "qcocoahelpers.h"
#include "qcocoaapplication.h"
#include "qcocoamenuloader.h"
#include <QtGui/private/qcoregraphics_p.h>
#include <QtCore/qregularexpression.h>
#include <QtCore/private/qcore_mac_p.h>
#include <QtGui/private/qapplekeymapper_p.h>
#include <QtCore/QDebug>
+ Include dependency graph for qcocoamenuitem.mm:

Go to the source code of this file.

Functions

QString qt_mac_applicationmenu_string (int type)
 
static QPlatformMenuItem::MenuRole detectMenuRole (const QString &captionWithPossibleMnemonic)
 

Variables

static const char * application_menu_strings []
 

Function Documentation

◆ detectMenuRole()

static QPlatformMenuItem::MenuRole detectMenuRole ( const QString & captionWithPossibleMnemonic)
static

Definition at line 183 of file qcocoamenuitem.mm.

References QPlatformMenuItem::AboutQtRole, QPlatformMenuItem::AboutRole, Qt::CaseInsensitive, QRegularExpression::CaseInsensitiveOption, QPlatformMenuItem::CopyRole, QPlatformMenuItem::CutRole, match(), Qt::MatchEndsWith, Qt::MatchExactly, Qt::MatchStartsWith, QPlatformMenuItem::NoRole, QPlatformMenuItem::PasteRole, QPlatformMenuItem::PreferencesRole, QT_TRANSLATE_NOOP, QPlatformMenuItem::QuitRole, QPlatformMenuItem::SelectAllRole, and QCoreApplication::translate().

Referenced by QCocoaMenuItem::sync().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ qt_mac_applicationmenu_string()

QString qt_mac_applicationmenu_string ( int type)

Definition at line 39 of file qcocoamenuitem.mm.

References application_menu_strings, QString::fromLatin1(), and QCoreApplication::translate().

+ Here is the call graph for this function:

Variable Documentation

◆ application_menu_strings

const char* application_menu_strings[]
static
Initial value:
=
{
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","About %1"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Preferences..."),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Services"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide %1"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Hide Others"),
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU","Show All"),
}
#define QT_TRANSLATE_NOOP(scope, x)

Definition at line 28 of file qcocoamenuitem.mm.

Referenced by qt_mac_applicationmenu_string().