20#ifndef ORES_QT_SHELL_MDI_WINDOW_HPP
21#define ORES_QT_SHELL_MDI_WINDOW_HPP
30#include <condition_variable>
35#include <QPlainTextEdit>
38#include "ores.qt/ClientManager.hpp"
39#include "ores.nats/service/nats_client.hpp"
40#include "ores.shell/app/repl.hpp"
41#include "ores.logging/make_logger.hpp"
58 void text_ready(
const QString& text);
61 int_type overflow(int_type ch)
override;
92 int_type underflow()
override;
96 std::condition_variable cv_;
97 std::deque<std::string> pending_;
113 inline static std::string_view logger_name =
114 "ores.qt.shell_mdi_window";
116 [[nodiscard]]
static auto& lg() {
118 static auto instance = make_logger(logger_name);
124 QWidget* parent =
nullptr);
128 void statusChanged(
const QString& message);
131 void closeEvent(QCloseEvent* event)
override;
134 void on_command_entered();
135 void on_output_ready(
const QString& text);
136 void on_load_script();
137 void on_save_script();
143 void on_repl_finished();
147 QPlainTextEdit* output_area_;
148 QLineEdit* input_line_;
150 std::unique_ptr<qt_output_streambuf> output_buf_;
151 std::unique_ptr<qt_input_streambuf> input_buf_;
152 std::unique_ptr<std::ostream> out_stream_;
153 std::unique_ptr<std::istream> in_stream_;
156 std::unique_ptr<shell::app::repl> shell_repl_;
157 std::unique_ptr<std::thread> worker_thread_;
160 QColor prompt_color_{0xB4, 0x8E, 0xAD};
161 QColor input_color_{0x88, 0xC0, 0xD0};
164 std::vector<std::string> command_history_;
Implements logging infrastructure for ORE Studio.
Definition boost_severity.hpp:28
Qt-based graphical user interface for ORE Studio.
Definition AboutDialog.hpp:29
Authenticated NATS client for both interactive and service-to-service use.
Definition nats_client.hpp:71
Manages the lifecycle of the NATS client and login state.
Definition ClientManager.hpp:109
Stream buffer that emits Qt signals when text is written.
Definition ShellMdiWindow.hpp:51
Stream buffer that blocks on read until data is fed from the UI.
Definition ShellMdiWindow.hpp:77
void close()
Signal EOF to unblock the reader.
Definition ShellMdiWindow.cpp:82
void feed_line(const std::string &line)
Feed a line of input (called from UI thread).
Definition ShellMdiWindow.cpp:76
MDI window embedding the ores.shell REPL.
Definition ShellMdiWindow.hpp:109