/
pi_coder
/
ByteMachine
Обзор
Документация
Войти
/
pi_coder
/
ByteMachine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
src/icons.cpp
480 строк
12 KB
pimenov-and
Перенос функциональности из старого проекта, в основном это описания узлов
19 июл 2026, 20:13
19 июл 2026, 20:13
cb3c51b
Код
Авторство
О чём код?
//////////////////////////////////////////////////////////////// // ByteMachine // Иконки //////////////////////////////////////////////////////////////// #include "icons.h" //============================================================== // Получение иконки New //============================================================== QPixmap Icons::new_(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/new_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/new_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки Open //============================================================== QPixmap Icons::open(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/open_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/open_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки Add //============================================================== QPixmap Icons::add(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/add_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/add_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки Save //============================================================== QPixmap Icons::save(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/save_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/save_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки Undo //============================================================== QPixmap Icons::undo(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/undo_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/undo_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки Redo //============================================================== QPixmap Icons::redo(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/redo_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/redo_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки Cut //============================================================== QPixmap Icons::cut(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/cut_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/cut_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки Copy //============================================================== QPixmap Icons::copy(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/copy_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/copy_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки Paste //============================================================== QPixmap Icons::paste(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/paste_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/paste_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки ResetValue //============================================================== QPixmap Icons::resetValue(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/reset_value_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/reset_value_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки Delete //============================================================== QPixmap Icons::delete_(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/delete_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/delete_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки PaintMode //============================================================== QPixmap Icons::paintMode(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/paint_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/paint_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки ScriptIde //============================================================== QPixmap Icons::scriptIde(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/script_ide_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/script_ide_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки VisibleNodeComments //============================================================== QPixmap Icons::visibleNodeComments(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/visible_node_comments_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/visible_node_comments_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки VisibleNodesPanel //============================================================== QPixmap Icons::visibleNodesPanel(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/visible_nodes_panel_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/visible_nodes_panel_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки VisibleSettingPanel //============================================================== QPixmap Icons::visibleSettingsPanel(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/visible_settings_panel_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/visible_settings_panel_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки VisibleOutputPanel //============================================================== QPixmap Icons::visibleOutputPanel(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/visible_output_panel_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/visible_output_panel_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки VisibleDesignerGrid //============================================================== QPixmap Icons::visibleDesignerGrid(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/visible_designer_grid_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/visible_designer_grid_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки Help //============================================================== QPixmap Icons::help(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/help_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/help_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки CollapseArrow //============================================================== QPixmap Icons::collapseArrow(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/collapse_arrow_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/collapse_arrow_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки ExpandArrow //============================================================== QPixmap Icons::expandArrow(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/expand_arrow_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/expand_arrow_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки StandartNode //============================================================== QPixmap Icons::standardNode(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/standard_node_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/standard_node_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки CommunicationNode //============================================================== QPixmap Icons::communicationNode(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/communication_node_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/communication_node_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки StandartNode в режиме Disable //============================================================== QPixmap Icons::standardNodeDisable(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/standard_node_disable_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/standard_node_disable_dark.png"}; } else { return QPixmap{}; } } //============================================================== // Получение иконки со стрелкой для показа UndoHistory //============================================================== QPixmap Icons::undoHistoryArrow(ColorThemes theme) { if (isLight(theme)) { return QPixmap{":/res_images/images/undo_history_arrow_light.png"}; } else if (isDark(theme)) { return QPixmap{":/res_images/images/undo_history_arrow_dark.png"}; } else { return QPixmap{}; } }