Elaztek Developer Hub
Blamite Game Engine - Keystone  00367.02.08.23.1815.blamite
A library that enables the use of Qt in Blamite's editing tools.
utils.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <string>
4 #include <qgraphicsview.h>
5 
6 #include "api/keystone_api.h"
8 
9 #ifndef KEYSTONE
10 #define KEYSTONE
11 #endif
12 
17 {
24  KEYSTONE void SetGraphicsViewImage(QGraphicsView* graphics_view, std::string image_path, Qt::AspectRatioMode aspect_ratio_mode);
25 
35  KEYSTONE KeystoneDialogResult ShowErrorDialog(bool allow_safemode, bool allow_continue, std::string text);
36 
37  KEYSTONE KeystoneDialogResult ShowMessageBox(std::string message);
38 
39  KEYSTONE KeystoneDialogResult ShowMessageBox(std::string title, std::string message);
40 
41  KEYSTONE KeystoneDialogResult ShowMessageBox(std::string title, std::string message, KeystoneMessageBoxType type);
42 
43  KEYSTONE KeystoneDialogResult ShowMessageBox(std::string title, std::string message, KeystoneMessageBoxType type, KeystoneMessageBoxButtons buttons);
44 
45  KEYSTONE uint32_t ConvertQtVirtKeyToSDLVirtKey(int key);
46 
47  KEYSTONE uint32_t ConvertQtVirtKeyToSDLScancode(int key);
48 }
KeystoneDialogResult
KeystoneDialogResult
Enumerator containing all possible generic dialog results.
Definition: keystone_api.h:30
KeystoneMessageBoxButtons
KeystoneMessageBoxButtons
Enumerator containing different possible button combinations.
Definition: qt_message_box.h:23
BlamKeystone::Utils::ConvertQtVirtKeyToSDLScancode
KEYSTONE uint32_t ConvertQtVirtKeyToSDLScancode(int key)
Definition: utils.cpp:256
BlamKeystone::Utils::ShowMessageBox
KEYSTONE KeystoneDialogResult ShowMessageBox(std::string message)
Definition: utils.cpp:279
KeystoneMessageBoxType
KeystoneMessageBoxType
Enumerator containing different possible message box types, primarily used to control the icon that i...
Definition: qt_message_box.h:10
keystone_api.h
qt_message_box.h
KEYSTONE
#define KEYSTONE
Definition: utils.h:10
BlamKeystone::Utils::ShowErrorDialog
KEYSTONE KeystoneDialogResult ShowErrorDialog(bool allow_safemode, bool allow_continue, std::string text)
Shows an error dialog that allows the user to continue execution, continue in 'safe mode',...
Definition: utils.cpp:271
BlamKeystone::Utils
General-purpose utilities for use within Keystone.
Definition: utils.h:16
BlamKeystone::Utils::SetGraphicsViewImage
KEYSTONE void SetGraphicsViewImage(QGraphicsView *graphics_view, std::string image_path, Qt::AspectRatioMode aspect_ratio_mode)
Applies an image to a graphics view, without the need for extra scene/pixmap management.
Definition: utils.cpp:221
BlamKeystone::Utils::ConvertQtVirtKeyToSDLVirtKey
KEYSTONE uint32_t ConvertQtVirtKeyToSDLVirtKey(int key)
Definition: utils.cpp:241