Q_invokable Public Slot

2021年7月21日
Register here: http://gg.gg/vgzfk
Regular C functions are also accessible from QML. The file loading and saving functions are implemented in C and declared using the QINVOKABLE macro. Alternatively, we can declare the functions as a slot and the functions will be accessible from QML. H: QINVOKABLE void saveFile; QINVOKABLE void loadFile. QINVOKABLE prefix of function is provided in order to be accessed in QML. Public QObject QOBJECT private. SLOT for call singleton instance./ function onCallme.GCompris-qtPublic Types |Signals |Public Member Functions |Static Public Member Functions |Protected Slots |Protected Member Functions |Properties |List of all membersQ Invocable Public Slot PokerApplicationInfo Class Reference
#include <ApplicationInfo.h>
Inherits QObject.Public Typesenum Platform {
Linux,Windows,MacOSX,Android,
Ios,Blackberry,SailfishOS
}Signalsvoid applicationSettingsChanged ()void applicationWidthChanged ()void fontRatioChanged ()void fullscreenChanged ()void portraitModeChanged ()void ratioChanged ()Public Member FunctionsQ_INVOKABLE void abandonAudioFocus () const Q_INVOKABLE QString getVoicesLocale (const QString &locale)Q_INVOKABLE bool requestAudioFocus () const Static Public Member Functionsstatic QString getFilePath (const QString &file)static void init ()static QString localeShort (const QString &locale)Protected SlotsQ_INVOKABLE QString getAudioFilePath (const QString &file)Q_INVOKABLE QStringList getFontsFromRcc ()Q_INVOKABLE QString getLocaleFilePath (const QString &file)QString getResourceDataPath ()Q_INVOKABLE QStringList getSystemExcludedFonts ()Q_INVOKABLE void notifyFullscreenChanged ()void notifyPortraitMode ()Q_INVOKABLE void screenshot (const QString &file)Protected Member Functionsqreal getSizeWithRatio (const qreal height)Propertiesint applicationWidthQString CompressedAudioqreal fontRatioQString GCVersionbool hasShaderbool isDownloadAllowedbool isMobilebool isPortraitModeQString localeShortPlatformplatformQString QTVersionqreal ratioDetailed Description
A general purpose singleton that exposes miscellaneous native functions to the QML layer.
Definition at line 43 of file ApplicationInfo.h.Member Enumeration Documentation
Known host platforms. EnumeratorLinux
Linux (except Android) Windows
Windows. MacOSX
MacOSX. Android
Android. Ios
IOS (not supported) Blackberry
Blackberry (not supported) SailfishOS
SailfishOS.
Definition at line 144 of file ApplicationInfo.h.Member Function Documentation
Abandon the Audio Focus.
On systems that support it, it will let an audio player start again.
Definition at line 62 of file ApplicationAndroid.cpp.QString ApplicationInfo::getAudioFilePath (const QString & file)protectedslot
Returns an absolute path to a language specific sound/voices file.
If the file is already absolute only the token replacement is applied.ParametersfileA templated relative path to a language specific file. Any occurence of the ’$LOCALE’ placeholder will be replaced by the currently active locale string. Any occurence of ’$CA’ placeholder will be replaced by the current compressed audio format (’ogg’ or ’aac). Example: ’voices-$CA/$LOCALE/misc/click_on_letter.$CA’ ReturnsAn absolute path to the corresponding resource file.
Definition at line 127 of file ApplicationInfo.cpp.QString ApplicationInfo::getFilePath (const QString & file)static
Returns an absolute and platform independent path to the passed file. ParametersfileA relative filename. ReturnsAbsolute path to the file.
Definition at line 116 of file ApplicationInfo.cpp.QStringList ApplicationInfo::getFontsFromRcc ()protectedslotReturnsA list of fonts contained in the fonts resources.
Definition at line 155 of file ApplicationInfo.cpp.QString ApplicationInfo::getLocaleFilePath (const QString & file)protectedslot
Returns an absolute path to a langauge specific resource file.
Generalization of getAudioFilePath(). See alsogetAudioFilePath
Definition at line 141 of file ApplicationInfo.cpp.QString ApplicationInfo::getResourceDataPath ()protectedslot
Returns the resource root-path used for GCompris resources.
Definition at line 111 of file ApplicationInfo.cpp.QStringList ApplicationInfo::getSystemExcludedFonts ()protectedslotReturnsA list of systems-fonts that should be excluded from font selection.
Definition at line 150 of file ApplicationInfo.cpp.QString ApplicationInfo::getVoicesLocale (const QString & locale)
Returns a locale string that can be used in voices filenames. ParameterslocaleA locale string of the form <language>_<country> ReturnsA locale string as used in voices filenames.
Definition at line 196 of file ApplicationInfo.cpp.
Registers singleton in the QML engine.
It is not recommended to create a singleton of Qml Singleton registered object but we could not found a better way to let us access ApplicationInfo on the C++ side. All our test shows that it works.
Definition at line 224 of file ApplicationInfo.cpp.static QString ApplicationInfo::localeShort (const QString & locale)inlinestatic
Returns the short locale name for the passed locale.
Handles also ’system’ (GC_DEFAULT_LOCALE) correctly which resolves to QLocale::system().name().ParameterslocaleA locale string of the form <language>_<country> ReturnsA short locale string of the form <language>
Definition at line 180 of file ApplicationInfo.h.
Request GCompris to take the Audio Focus at the system level.
On systems that support it, it will mute a running audio player.
Definition at line 55 of file ApplicationAndroid.cpp.void ApplicationInfo::screenshot (const QString & file)protectedslot
Stores a screenshot in the passed file. ParametersfileAbsolute destination filename.
Definition at line 180 of file ApplicationInfo.cpp.Property Documentation
Width of the application viewport.
Definition at line 52 of file ApplicationInfo.h.
Audio codec used for voices resources. Is there any real gambling apps for iphone 11.
This is determined at compile time (ogg for free platforms, aac on MacOSX and IOS).
Definition at line 129 of file ApplicationInfo.h.
Ratio factor used for font scaling.
On some low-dpi Android devices with high res (e.g. Galaxy Tab 4) the fonts in Text-like elements appear too small with respect to the other graphics – also if we are using font.pointSize.
For these cases we calculate a fontRatio in ApplicationInfo that takes dpi information into account, as proposed on http://doc.qt.io/qt-5/scalability.html#calculating-scaling-ratio
GCText applies this factor automatically on its new fontSize property.
Definition at line 106 of file ApplicationInfo.h.
GCompris version string (compile time).
Definition at line 116 of file ApplicationInfo.h.
Whether the current platform supports fragment shaders.
This flag is used in some core modules to selectively deactivate particle effects which cause crashes on some Android devices.
cf. https://bugreports.qt.io/browse/QTBUG-44194
For now always set to false, to prevent crashes.
Definition at line 77 of file ApplicationInfo.h.
Download allowed.
This is determined at compile time. If set to NO GCompris will never download anything.
Definition at line 137 of file ApplicationInfo.h.
Whether the application is currently running on a mobile platform.
Mobile platforms are Android, Ios (not supported yet), Blackberry (not supported)
Definition at line 65 of file ApplicationInfo.h.
Whether currently in portrait mode, on mobile platforms.
Based on viewport geometry.
Definition at line 84 of file ApplicationInfo.h.
Short (2-letter) locale string of the currently active language.
Definition at line 111 of file ApplicationInfo.h.
Platform the application is currently running on.
Definition at line 57 of file ApplicationInfo.h.
Qt version string (runtime).
Definition at line 121 of file ApplicationInfo.h.
Ratio factor used for scaling of sizes on high-dpi devices. Q Invocable Public Slot Wins
Must be used by activities as a scaling factor to all pixel values.
Definition at line 91 of file ApplicationInfo.h.The documentation for this class was generated from the following files: This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Tue Jun 2 2015 21:47:48 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2006 Q Invocable Public Slot Machine
KDE’s Doxygen guidelines are available online.
Register here: http://gg.gg/vgzfk

https://diarynote.indered.space

コメント

最新の日記 一覧

<<  2025年7月  >>
293012345
6789101112
13141516171819
20212223242526
272829303112

お気に入り日記の更新

テーマ別日記一覧

まだテーマがありません

この日記について

日記内を検索