Elaztek Developer Hub
Blamite Game Engine - Keystone  00429.01.19.25.0114.blamite
A library that enables the use of Qt in Blamite's editing tools.
BlamKeystone::Utils Namespace Reference

General-purpose utilities for use within Keystone. More...

Functions

KEYSTONE bool 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. More...
 
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', or exit the program. More...
 
KEYSTONE KeystoneDialogResult ShowMessageBox (std::string message)
 
KEYSTONE KeystoneDialogResult ShowMessageBox (std::string title, std::string message)
 
KEYSTONE KeystoneDialogResult ShowMessageBox (std::string title, std::string message, KeystoneMessageBoxType type)
 
KEYSTONE KeystoneDialogResult ShowMessageBox (std::string title, std::string message, KeystoneMessageBoxType type, KeystoneMessageBoxButtons buttons)
 
KEYSTONE uint32_t ConvertQtVirtKeyToSDLVirtKey (int key)
 
KEYSTONE uint32_t ConvertQtVirtKeyToSDLScancode (int key)
 
KEYSTONE bool IsPointWithinGeometry (QWidget *widget, QPoint point)
 
KEYSTONE QIcon GetDefaultApplicationIcon ()
 
KEYSTONE void PokeStylesheet (QWidget *widget)
 

Detailed Description

General-purpose utilities for use within Keystone.

Function Documentation

◆ ConvertQtVirtKeyToSDLScancode()

uint32_t BlamKeystone::Utils::ConvertQtVirtKeyToSDLScancode ( int  key)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ConvertQtVirtKeyToSDLVirtKey()

uint32_t BlamKeystone::Utils::ConvertQtVirtKeyToSDLVirtKey ( int  key)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetDefaultApplicationIcon()

QIcon BlamKeystone::Utils::GetDefaultApplicationIcon ( )
+ Here is the call graph for this function:

◆ IsPointWithinGeometry()

bool BlamKeystone::Utils::IsPointWithinGeometry ( QWidget *  widget,
QPoint  point 
)
+ Here is the caller graph for this function:

◆ PokeStylesheet()

void BlamKeystone::Utils::PokeStylesheet ( QWidget *  widget)
+ Here is the caller graph for this function:

◆ SetGraphicsViewImage()

bool BlamKeystone::Utils::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.

Parameters
graphics_view- The graphics view to set the image for.
image_path- The path to the image file.
aspect_ratio_mode- The aspect ratio mode to use for the image.
Returns
true if the image was set successfully. If the image path does not exist, or the image failed to be set, then this will return false.
+ Here is the caller graph for this function:

◆ ShowErrorDialog()

KeystoneDialogResult BlamKeystone::Utils::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', or exit the program.

Parameters
allow_safemode- Whether or not to enable the 'Continue in Safe Mode' option.
allow_continue- Wehther or not to enable the 'Continue' option.
text- The message to display to the user.
Returns
The return code of the error dialog. See KeystoneDialogResult for details.
+ Here is the call graph for this function:

◆ ShowMessageBox() [1/4]

KeystoneDialogResult BlamKeystone::Utils::ShowMessageBox ( std::string  message)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ShowMessageBox() [2/4]

KeystoneDialogResult BlamKeystone::Utils::ShowMessageBox ( std::string  title,
std::string  message 
)
+ Here is the call graph for this function:

◆ ShowMessageBox() [3/4]

KeystoneDialogResult BlamKeystone::Utils::ShowMessageBox ( std::string  title,
std::string  message,
KeystoneMessageBoxType  type 
)
+ Here is the call graph for this function:

◆ ShowMessageBox() [4/4]

KeystoneDialogResult BlamKeystone::Utils::ShowMessageBox ( std::string  title,
std::string  message,
KeystoneMessageBoxType  type,
KeystoneMessageBoxButtons  buttons 
)
+ Here is the call graph for this function: