Elaztek Developer Hub
Blamite Game Engine - Keystone  00386.06.16.23.0646.blamite
A library that enables the use of Qt in Blamite's editing tools.
output.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <QDockWidget>
4 #include <Strings/components/interface/logger/logger.h>
5 #include <Strings/components/classes/events/events.h>
6 
8 #include "ui_console_output.h"
9 
11 
19 class BlamOutputLogReceiver : public BlamLogReceiver, public BlamEventListener
20 {
21  BlamEditorToolWindow_Output* output_window = nullptr;
22  std::vector<BlamBasicLogMessage> messages = std::vector<BlamBasicLogMessage>();
23 
24 public:
25 
28 
34  void LogMessageReceived(BlamBasicLogMessage message);
35 
36  void OnTickEvent(EditorTickEvent* event);
37 };
38 
45 {
46  Q_OBJECT
47 
48 public:
51 
52  void RebuildLogOutput();
53 
54 private:
55  Ui::guerilla_console_output ui;
56 
57  BlamOutputLogReceiver* output_receiver = nullptr;
58 
59  int displayed_error_count = 0;
60  int displayed_warning_count = 0;
61  int displayed_info_count = 0;
62 
63  int total_error_count = 0;
64  int total_warning_count = 0;
65  int total_info_count = 0;
66 
67  int last_message_index = 0;
68 
69  void AppendLogMessage(BlamBasicLogMessage message);
70 
71 public slots:
72 
73  void log_message_notify(BlamBasicLogMessage message);
74 
75 private slots:
79  void btn_clear_Click();
80 
86  void btn_copy_Click();
87 
88  void btn_show_errors_Click();
89  void btn_show_warnings_Click();
90  void btn_show_info_Click();
91  void cbox_show_output_from_indexChanged(int index);
92 };
BlamEditorToolWindow
Base class for all editor tool windows.
Definition: BlamEditorToolWindow.h:37
BlamHierarchyViewTreeWidget::GetType
BlamScenarioHierarchyNodeType GetType()
Definition: BlamHierarchyViewTreeWidget.cpp:8
editor_data.h
BlamEditorToolWindow_HierarchyView::group_pane_active_item
BlamHierarchyViewTreeWidget * group_pane_active_item
Definition: hierarchy_view.h:19
KeystoneDialogResult
KeystoneDialogResult
Enumerator containing all possible generic dialog results.
Definition: keystone_api.h:30
BlamEditorToolWindow_PropertiesPalette::ShowProperties
void ShowProperties(BlamWorldObject *object)
Definition: property_view.cpp:24
BlamEditorToolWindow.h
BlamEditorToolWindow_Output
The console output window.
Definition: output.h:44
BlamEditorToolWindow_PropertiesPalette::ClearPropertyUI
void ClearPropertyUI()
Definition: property_view.cpp:68
themes.h
BlamEditorToolWindow_Output::BlamEditorToolWindow_Output
BlamEditorToolWindow_Output()
Definition: BlamEditorToolWindow_Output.cpp:10
BlamEditorToolWindow_HierarchyView::item_pane_active_item
BlamHierarchyViewTreeWidget * item_pane_active_item
Definition: hierarchy_view.h:20
hierarchy_view.h
BlamHierarchyViewTreeWidget_Group
Definition: treewidget.h:17
BlamKeystone::Utils::ShowMessageBox
KEYSTONE KeystoneDialogResult ShowMessageBox(std::string message)
Definition: utils.cpp:279
BlamHierarchyViewTreeWidget_Group::group_node
BlamScenarioHierarchyNode_Group * group_node
Definition: treewidget.h:20
BlamHierarchyViewTreeWidget
Definition: treewidget.h:6
KeystoneMessageBoxButtons::YesNo
@ YesNo
Dialog is shown with a [Yes] and [No] button.
utils.h
BlamEditorWindow.h
BlamEditorToolWindowType
BlamEditorToolWindowType
Enumerator containing all possible editor tool window types.
Definition: BlamEditorToolWindow.h:21
BlamKeystone::EditorData::GetToolWindow
KEYSTONE BlamEditorToolWindow * GetToolWindow(BlamEditorToolWindowType type)
Retrieves a desired tool window.
Definition: editor_data.cpp:37
KeystoneMessageBoxType::Warning
@ Warning
Dialog icon will be a yellow triangle with an exclamation mark.
BlamKeystone::Themes::GetActiveTheme
KEYSTONE BlamEditorTheme * GetActiveTheme()
Retrieves the currently selected theme.
Definition: themes.cpp:335
BlamEditorToolWindow::LoadConfig
void LoadConfig()
Loads or creates the configuration file for this tool window.
Definition: BlamEditorToolWindow.cpp:29
qt_message_box.h
KeystoneDialogResult::Yes
@ Yes
The user pressed the 'Yes' button.
BlamEditorToolWindow_PropertiesPalette
Definition: property_view.h:11
BlamEditorToolWindow::config_filename
std::string config_filename
The name of the configuration filename.
Definition: BlamEditorToolWindow.h:49
BlamEditorToolWindow_Output::~BlamEditorToolWindow_Output
~BlamEditorToolWindow_Output()
Definition: BlamEditorToolWindow_Output.cpp:37
property_view.h
qt_message_box::GetResult
KeystoneDialogResult GetResult()
Retrieves the dialog result.
Definition: qt_message_box.cpp:162
BlamOutputLogReceiver::LogMessageReceived
void LogMessageReceived(BlamBasicLogMessage message)
Adds a new log message to the output text field.
Definition: BlamOutputLogReceiver.cpp:17
KeystoneMessageBoxType::Question
@ Question
Dialog icon will be a speech bubble with a question mark.
BlamHierarchyViewTreeWidget_Object
Definition: treewidget.h:27
BlamEditorToolWindow_HierarchyView::RefreshView
void RefreshView()
Definition: hierarchy_view.cpp:44
BlamEditorToolWindow_Output::RebuildLogOutput
void RebuildLogOutput()
Definition: BlamEditorToolWindow_Output.cpp:112
BlamEditorToolWindow_HierarchyView::RefreshItemPane
void RefreshItemPane()
Definition: hierarchy_view.cpp:67
BlamEditorToolWindow_HierarchyView::UpdateEnabledButtons
void UpdateEnabledButtons()
Definition: hierarchy_view.cpp:98
BlamHierarchyViewTreeWidget_Object::object_node
BlamScenarioHierarchyNode_Object * object_node
Definition: treewidget.h:30
BlamEditorToolWindowType::Output
@ Output
BlamEditorToolWindowType::PropertiesPalette
@ PropertiesPalette
BlamOutputLogReceiver::OnTickEvent
void OnTickEvent(EditorTickEvent *event)
Definition: BlamOutputLogReceiver.cpp:24
BlamOutputLogReceiver::~BlamOutputLogReceiver
~BlamOutputLogReceiver()
Definition: BlamOutputLogReceiver.cpp:12
BlamOutputLogReceiver::BlamOutputLogReceiver
BlamOutputLogReceiver(BlamEditorToolWindow_Output *_output_window)
Definition: BlamOutputLogReceiver.cpp:5
BlamEditorToolWindow_Output::log_message_notify
void log_message_notify(BlamBasicLogMessage message)
Definition: BlamEditorToolWindow_Output.cpp:60
output.h
qt_message_box
A basic message box dialog.
Definition: qt_message_box.h:38
BlamOutputLogReceiver
Log message receiver, used to listen for new messages from any logger.
Definition: output.h:19