#ifndef Global_H #define Global_H #include "BackEnd/BackEnd.h" #include #include #include #include #include #include #include #include #include #include #include #include #include "export.h" #include "private_psc_global_include/Singleton.hpp" class Global : public Psc::Singleton { public: explicit Global(); int adapt_height(int full_screen_height); int adapt_width(int full_screen_width); }; QVBoxLayout* create_vbox_layout(const std::vector& children = {}, QWidget* parent = nullptr); QHBoxLayout* create_hbox_layout(const std::vector& children = {}, QWidget* parent = nullptr); QRect get_max_rect(const QRect& rect, double WHRate); int calculate_optimal_font_size(const QString& text, const QSize& space_size, const QFont& font); int calculate_optimal_font_size(const std::vector& text_list, const QSize& space_size, const QFont& font); QPushButton* create_button(const QString& text, int font_size, const std::function& func = nullptr); class Base_Widget_Menu; void init_click_button(QPushButton* button, const QString& text, int font_size, const std::function& func, renderive::Roll_Object*); QPushButton* create_click_button(const QString& text, int font_size, const std::function& func, renderive::Roll_Object*); QPushButton* create_normal(const QString& text, int font_size, const std::function& func = nullptr); #endif