diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 3 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 6 | ||||
| -rw-r--r-- | src/yuzu/util/overlay_dialog.cpp | 249 | ||||
| -rw-r--r-- | src/yuzu/util/overlay_dialog.h | 107 | ||||
| -rw-r--r-- | src/yuzu/util/overlay_dialog.ui | 404 |
5 files changed, 768 insertions, 1 deletions
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index b025ced1c..3e00ff39f 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt | |||
| @@ -143,6 +143,9 @@ add_executable(yuzu | |||
| 143 | uisettings.h | 143 | uisettings.h |
| 144 | util/limitable_input_dialog.cpp | 144 | util/limitable_input_dialog.cpp |
| 145 | util/limitable_input_dialog.h | 145 | util/limitable_input_dialog.h |
| 146 | util/overlay_dialog.cpp | ||
| 147 | util/overlay_dialog.h | ||
| 148 | util/overlay_dialog.ui | ||
| 146 | util/sequence_dialog/sequence_dialog.cpp | 149 | util/sequence_dialog/sequence_dialog.cpp |
| 147 | util/sequence_dialog/sequence_dialog.h | 150 | util/sequence_dialog/sequence_dialog.h |
| 148 | util/url_request_interceptor.cpp | 151 | util/url_request_interceptor.cpp |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 422b3cff6..3d4558739 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -101,6 +101,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual | |||
| 101 | #include "core/perf_stats.h" | 101 | #include "core/perf_stats.h" |
| 102 | #include "core/telemetry_session.h" | 102 | #include "core/telemetry_session.h" |
| 103 | #include "input_common/main.h" | 103 | #include "input_common/main.h" |
| 104 | #include "util/overlay_dialog.h" | ||
| 104 | #include "video_core/gpu.h" | 105 | #include "video_core/gpu.h" |
| 105 | #include "video_core/shader_notify.h" | 106 | #include "video_core/shader_notify.h" |
| 106 | #include "yuzu/about_dialog.h" | 107 | #include "yuzu/about_dialog.h" |
| @@ -2266,7 +2267,10 @@ void GMainWindow::OnExecuteProgram(std::size_t program_index) { | |||
| 2266 | } | 2267 | } |
| 2267 | 2268 | ||
| 2268 | void GMainWindow::ErrorDisplayDisplayError(QString body) { | 2269 | void GMainWindow::ErrorDisplayDisplayError(QString body) { |
| 2269 | QMessageBox::critical(this, tr("Error Display"), body); | 2270 | OverlayDialog dialog(render_window, Core::System::GetInstance(), body, QString{}, tr("OK"), |
| 2271 | Qt::AlignLeft | Qt::AlignVCenter); | ||
| 2272 | dialog.exec(); | ||
| 2273 | |||
| 2270 | emit ErrorDisplayFinished(); | 2274 | emit ErrorDisplayFinished(); |
| 2271 | } | 2275 | } |
| 2272 | 2276 | ||
diff --git a/src/yuzu/util/overlay_dialog.cpp b/src/yuzu/util/overlay_dialog.cpp new file mode 100644 index 000000000..95b148545 --- /dev/null +++ b/src/yuzu/util/overlay_dialog.cpp | |||
| @@ -0,0 +1,249 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <QKeyEvent> | ||
| 6 | #include <QScreen> | ||
| 7 | |||
| 8 | #include "core/core.h" | ||
| 9 | #include "core/frontend/input_interpreter.h" | ||
| 10 | #include "ui_overlay_dialog.h" | ||
| 11 | #include "yuzu/util/overlay_dialog.h" | ||
| 12 | |||
| 13 | namespace { | ||
| 14 | |||
| 15 | constexpr float BASE_TITLE_FONT_SIZE = 14.0f; | ||
| 16 | constexpr float BASE_FONT_SIZE = 18.0f; | ||
| 17 | constexpr float BASE_WIDTH = 1280.0f; | ||
| 18 | constexpr float BASE_HEIGHT = 720.0f; | ||
| 19 | |||
| 20 | } // Anonymous namespace | ||
| 21 | |||
| 22 | OverlayDialog::OverlayDialog(QWidget* parent, Core::System& system, const QString& title_text, | ||
| 23 | const QString& body_text, const QString& left_button_text, | ||
| 24 | const QString& right_button_text, Qt::Alignment alignment, | ||
| 25 | bool use_rich_text_) | ||
| 26 | : QDialog(parent), ui{std::make_unique<Ui::OverlayDialog>()}, use_rich_text{use_rich_text_} { | ||
| 27 | ui->setupUi(this); | ||
| 28 | |||
| 29 | setWindowFlags(Qt::Dialog | Qt::FramelessWindowHint | Qt::WindowTitleHint | | ||
| 30 | Qt::WindowSystemMenuHint | Qt::CustomizeWindowHint); | ||
| 31 | setWindowModality(Qt::WindowModal); | ||
| 32 | setAttribute(Qt::WA_TranslucentBackground); | ||
| 33 | |||
| 34 | if (use_rich_text) { | ||
| 35 | InitializeRichTextDialog(title_text, body_text, left_button_text, right_button_text, | ||
| 36 | alignment); | ||
| 37 | } else { | ||
| 38 | InitializeRegularTextDialog(title_text, body_text, left_button_text, right_button_text, | ||
| 39 | alignment); | ||
| 40 | } | ||
| 41 | |||
| 42 | MoveAndResizeWindow(); | ||
| 43 | |||
| 44 | // TODO (Morph): Remove this when InputInterpreter no longer relies on the HID backend | ||
| 45 | if (system.IsPoweredOn()) { | ||
| 46 | input_interpreter = std::make_unique<InputInterpreter>(system); | ||
| 47 | |||
| 48 | StartInputThread(); | ||
| 49 | } | ||
| 50 | } | ||
| 51 | |||
| 52 | OverlayDialog::~OverlayDialog() { | ||
| 53 | StopInputThread(); | ||
| 54 | } | ||
| 55 | |||
| 56 | void OverlayDialog::InitializeRegularTextDialog(const QString& title_text, const QString& body_text, | ||
| 57 | const QString& left_button_text, | ||
| 58 | const QString& right_button_text, | ||
| 59 | Qt::Alignment alignment) { | ||
| 60 | ui->stackedDialog->setCurrentIndex(0); | ||
| 61 | |||
| 62 | ui->label_title->setText(title_text); | ||
| 63 | ui->label_dialog->setText(body_text); | ||
| 64 | ui->button_cancel->setText(left_button_text); | ||
| 65 | ui->button_ok_label->setText(right_button_text); | ||
| 66 | |||
| 67 | ui->label_dialog->setAlignment(alignment); | ||
| 68 | |||
| 69 | if (title_text.isEmpty()) { | ||
| 70 | ui->label_title->hide(); | ||
| 71 | ui->verticalLayout_2->setStretch(0, 0); | ||
| 72 | ui->verticalLayout_2->setStretch(1, 219); | ||
| 73 | ui->verticalLayout_2->setStretch(2, 82); | ||
| 74 | } | ||
| 75 | |||
| 76 | if (left_button_text.isEmpty()) { | ||
| 77 | ui->button_cancel->hide(); | ||
| 78 | ui->button_cancel->setEnabled(false); | ||
| 79 | } | ||
| 80 | |||
| 81 | if (right_button_text.isEmpty()) { | ||
| 82 | ui->button_ok_label->hide(); | ||
| 83 | ui->button_ok_label->setEnabled(false); | ||
| 84 | } | ||
| 85 | |||
| 86 | connect( | ||
| 87 | ui->button_cancel, &QPushButton::clicked, this, | ||
| 88 | [this](bool) { | ||
| 89 | StopInputThread(); | ||
| 90 | QDialog::reject(); | ||
| 91 | }, | ||
| 92 | Qt::QueuedConnection); | ||
| 93 | connect( | ||
| 94 | ui->button_ok_label, &QPushButton::clicked, this, | ||
| 95 | [this](bool) { | ||
| 96 | StopInputThread(); | ||
| 97 | QDialog::accept(); | ||
| 98 | }, | ||
| 99 | Qt::QueuedConnection); | ||
| 100 | } | ||
| 101 | |||
| 102 | void OverlayDialog::InitializeRichTextDialog(const QString& title_text, const QString& body_text, | ||
| 103 | const QString& left_button_text, | ||
| 104 | const QString& right_button_text, | ||
| 105 | Qt::Alignment alignment) { | ||
| 106 | ui->stackedDialog->setCurrentIndex(1); | ||
| 107 | |||
| 108 | ui->label_title_rich->setText(title_text); | ||
| 109 | ui->text_browser_dialog->setText(body_text); | ||
| 110 | ui->button_cancel_rich->setText(left_button_text); | ||
| 111 | ui->button_ok_rich->setText(right_button_text); | ||
| 112 | |||
| 113 | // TODO (Morph/Rei): Replace this with something that works better | ||
| 114 | ui->text_browser_dialog->setAlignment(alignment); | ||
| 115 | |||
| 116 | if (title_text.isEmpty()) { | ||
| 117 | ui->label_title_rich->hide(); | ||
| 118 | ui->verticalLayout_3->setStretch(0, 0); | ||
| 119 | ui->verticalLayout_3->setStretch(1, 438); | ||
| 120 | ui->verticalLayout_3->setStretch(2, 82); | ||
| 121 | } | ||
| 122 | |||
| 123 | if (left_button_text.isEmpty()) { | ||
| 124 | ui->button_cancel_rich->hide(); | ||
| 125 | ui->button_cancel_rich->setEnabled(false); | ||
| 126 | } | ||
| 127 | |||
| 128 | if (right_button_text.isEmpty()) { | ||
| 129 | ui->button_ok_rich->hide(); | ||
| 130 | ui->button_ok_rich->setEnabled(false); | ||
| 131 | } | ||
| 132 | |||
| 133 | connect( | ||
| 134 | ui->button_cancel_rich, &QPushButton::clicked, this, | ||
| 135 | [this](bool) { | ||
| 136 | StopInputThread(); | ||
| 137 | QDialog::reject(); | ||
| 138 | }, | ||
| 139 | Qt::QueuedConnection); | ||
| 140 | connect( | ||
| 141 | ui->button_ok_rich, &QPushButton::clicked, this, | ||
| 142 | [this](bool) { | ||
| 143 | StopInputThread(); | ||
| 144 | QDialog::accept(); | ||
| 145 | }, | ||
| 146 | Qt::QueuedConnection); | ||
| 147 | } | ||
| 148 | |||
| 149 | void OverlayDialog::MoveAndResizeWindow() { | ||
| 150 | const auto pos = parentWidget()->mapToGlobal(parentWidget()->rect().topLeft()); | ||
| 151 | const auto width = static_cast<float>(parentWidget()->width()); | ||
| 152 | const auto height = static_cast<float>(parentWidget()->height()); | ||
| 153 | |||
| 154 | // High DPI | ||
| 155 | const float dpi_scale = qApp->screenAt(pos)->logicalDotsPerInch() / 96.0f; | ||
| 156 | |||
| 157 | const auto title_text_font_size = BASE_TITLE_FONT_SIZE * (height / BASE_HEIGHT) / dpi_scale; | ||
| 158 | const auto body_text_font_size = | ||
| 159 | BASE_FONT_SIZE * (((width / BASE_WIDTH) + (height / BASE_HEIGHT)) / 2.0f) / dpi_scale; | ||
| 160 | const auto button_text_font_size = BASE_FONT_SIZE * (height / BASE_HEIGHT) / dpi_scale; | ||
| 161 | |||
| 162 | QFont title_text_font(QStringLiteral("MS Shell Dlg 2"), title_text_font_size, QFont::Normal); | ||
| 163 | QFont body_text_font(QStringLiteral("MS Shell Dlg 2"), body_text_font_size, QFont::Normal); | ||
| 164 | QFont button_text_font(QStringLiteral("MS Shell Dlg 2"), button_text_font_size, QFont::Normal); | ||
| 165 | |||
| 166 | if (use_rich_text) { | ||
| 167 | ui->label_title_rich->setFont(title_text_font); | ||
| 168 | ui->text_browser_dialog->setFont(body_text_font); | ||
| 169 | ui->button_cancel_rich->setFont(button_text_font); | ||
| 170 | ui->button_ok_rich->setFont(button_text_font); | ||
| 171 | } else { | ||
| 172 | ui->label_title->setFont(title_text_font); | ||
| 173 | ui->label_dialog->setFont(body_text_font); | ||
| 174 | ui->button_cancel->setFont(button_text_font); | ||
| 175 | ui->button_ok_label->setFont(button_text_font); | ||
| 176 | } | ||
| 177 | |||
| 178 | QDialog::move(pos); | ||
| 179 | QDialog::resize(width, height); | ||
| 180 | } | ||
| 181 | |||
| 182 | template <HIDButton... T> | ||
| 183 | void OverlayDialog::HandleButtonPressedOnce() { | ||
| 184 | const auto f = [this](HIDButton button) { | ||
| 185 | if (input_interpreter->IsButtonPressedOnce(button)) { | ||
| 186 | TranslateButtonPress(button); | ||
| 187 | } | ||
| 188 | }; | ||
| 189 | |||
| 190 | (f(T), ...); | ||
| 191 | } | ||
| 192 | |||
| 193 | void OverlayDialog::TranslateButtonPress(HIDButton button) { | ||
| 194 | QPushButton* left_button = use_rich_text ? ui->button_cancel_rich : ui->button_cancel; | ||
| 195 | QPushButton* right_button = use_rich_text ? ui->button_ok_rich : ui->button_ok_label; | ||
| 196 | |||
| 197 | // TODO (Morph): Handle QTextBrowser text scrolling | ||
| 198 | // TODO (Morph): focusPrevious/NextChild() doesn't work well with the rich text dialog, fix it | ||
| 199 | |||
| 200 | switch (button) { | ||
| 201 | case HIDButton::A: | ||
| 202 | case HIDButton::B: | ||
| 203 | if (left_button->hasFocus()) { | ||
| 204 | left_button->click(); | ||
| 205 | } else if (right_button->hasFocus()) { | ||
| 206 | right_button->click(); | ||
| 207 | } | ||
| 208 | break; | ||
| 209 | case HIDButton::DLeft: | ||
| 210 | case HIDButton::LStickLeft: | ||
| 211 | focusPreviousChild(); | ||
| 212 | break; | ||
| 213 | case HIDButton::DRight: | ||
| 214 | case HIDButton::LStickRight: | ||
| 215 | focusNextChild(); | ||
| 216 | break; | ||
| 217 | default: | ||
| 218 | break; | ||
| 219 | } | ||
| 220 | } | ||
| 221 | |||
| 222 | void OverlayDialog::StartInputThread() { | ||
| 223 | if (input_thread_running) { | ||
| 224 | return; | ||
| 225 | } | ||
| 226 | |||
| 227 | input_thread_running = true; | ||
| 228 | |||
| 229 | input_thread = std::thread(&OverlayDialog::InputThread, this); | ||
| 230 | } | ||
| 231 | |||
| 232 | void OverlayDialog::StopInputThread() { | ||
| 233 | input_thread_running = false; | ||
| 234 | |||
| 235 | if (input_thread.joinable()) { | ||
| 236 | input_thread.join(); | ||
| 237 | } | ||
| 238 | } | ||
| 239 | |||
| 240 | void OverlayDialog::InputThread() { | ||
| 241 | while (input_thread_running) { | ||
| 242 | input_interpreter->PollInput(); | ||
| 243 | |||
| 244 | HandleButtonPressedOnce<HIDButton::A, HIDButton::B, HIDButton::DLeft, HIDButton::DRight, | ||
| 245 | HIDButton::LStickLeft, HIDButton::LStickRight>(); | ||
| 246 | |||
| 247 | std::this_thread::sleep_for(std::chrono::milliseconds(50)); | ||
| 248 | } | ||
| 249 | } | ||
diff --git a/src/yuzu/util/overlay_dialog.h b/src/yuzu/util/overlay_dialog.h new file mode 100644 index 000000000..e8c388bd0 --- /dev/null +++ b/src/yuzu/util/overlay_dialog.h | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | // Copyright 2021 yuzu Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <array> | ||
| 8 | #include <atomic> | ||
| 9 | #include <memory> | ||
| 10 | #include <thread> | ||
| 11 | |||
| 12 | #include <QDialog> | ||
| 13 | |||
| 14 | #include "common/common_types.h" | ||
| 15 | |||
| 16 | enum class HIDButton : u8; | ||
| 17 | |||
| 18 | class InputInterpreter; | ||
| 19 | |||
| 20 | namespace Core { | ||
| 21 | class System; | ||
| 22 | } | ||
| 23 | |||
| 24 | namespace Ui { | ||
| 25 | class OverlayDialog; | ||
| 26 | } | ||
| 27 | |||
| 28 | /** | ||
| 29 | * An OverlayDialog is an interactive dialog that accepts controller input (while a game is running) | ||
| 30 | * This dialog attempts to replicate the look and feel of the Nintendo Switch's overlay dialogs and | ||
| 31 | * provide some extra features such as embedding HTML/Rich Text content in a QTextBrowser. | ||
| 32 | * The OverlayDialog provides 2 modes: one to embed regular text into a QLabel and another to embed | ||
| 33 | * HTML/Rich Text content into a QTextBrowser. | ||
| 34 | */ | ||
| 35 | class OverlayDialog final : public QDialog { | ||
| 36 | Q_OBJECT | ||
| 37 | |||
| 38 | public: | ||
| 39 | explicit OverlayDialog(QWidget* parent, Core::System& system, const QString& title_text, | ||
| 40 | const QString& body_text, const QString& left_button_text, | ||
| 41 | const QString& right_button_text, | ||
| 42 | Qt::Alignment alignment = Qt::AlignCenter, bool use_rich_text_ = false); | ||
| 43 | ~OverlayDialog() override; | ||
| 44 | |||
| 45 | private: | ||
| 46 | /** | ||
| 47 | * Initializes a text dialog with a QLabel storing text. | ||
| 48 | * Only use this for short text as the dialog buttons would be squashed with longer text. | ||
| 49 | * | ||
| 50 | * @param title_text Title text to be displayed | ||
| 51 | * @param body_text Main text to be displayed | ||
| 52 | * @param left_button_text Left button text. If empty, the button is hidden and disabled | ||
| 53 | * @param right_button_text Right button text. If empty, the button is hidden and disabled | ||
| 54 | * @param alignment Main text alignment | ||
| 55 | */ | ||
| 56 | void InitializeRegularTextDialog(const QString& title_text, const QString& body_text, | ||
| 57 | const QString& left_button_text, | ||
| 58 | const QString& right_button_text, Qt::Alignment alignment); | ||
| 59 | |||
| 60 | /** | ||
| 61 | * Initializes a text dialog with a QTextBrowser storing text. | ||
| 62 | * This is ideal for longer text or rich text content. A scrollbar is shown for longer text. | ||
| 63 | * | ||
| 64 | * @param title_text Title text to be displayed | ||
| 65 | * @param body_text Main text to be displayed | ||
| 66 | * @param left_button_text Left button text. If empty, the button is hidden and disabled | ||
| 67 | * @param right_button_text Right button text. If empty, the button is hidden and disabled | ||
| 68 | * @param alignment Main text alignment | ||
| 69 | */ | ||
| 70 | void InitializeRichTextDialog(const QString& title_text, const QString& body_text, | ||
| 71 | const QString& left_button_text, const QString& right_button_text, | ||
| 72 | Qt::Alignment alignment); | ||
| 73 | |||
| 74 | /// Moves and resizes the dialog to be fully overlayed on top of the parent window. | ||
| 75 | void MoveAndResizeWindow(); | ||
| 76 | |||
| 77 | /** | ||
| 78 | * Handles button presses and converts them into keyboard input. | ||
| 79 | * | ||
| 80 | * @tparam HIDButton The list of buttons that can be converted into keyboard input. | ||
| 81 | */ | ||
| 82 | template <HIDButton... T> | ||
| 83 | void HandleButtonPressedOnce(); | ||
| 84 | |||
| 85 | /** | ||
| 86 | * Translates a button press to focus or click either the left or right buttons. | ||
| 87 | * | ||
| 88 | * @param button The button press to process. | ||
| 89 | */ | ||
| 90 | void TranslateButtonPress(HIDButton button); | ||
| 91 | |||
| 92 | void StartInputThread(); | ||
| 93 | void StopInputThread(); | ||
| 94 | |||
| 95 | /// The thread where input is being polled and processed. | ||
| 96 | void InputThread(); | ||
| 97 | |||
| 98 | std::unique_ptr<Ui::OverlayDialog> ui; | ||
| 99 | |||
| 100 | bool use_rich_text; | ||
| 101 | |||
| 102 | std::unique_ptr<InputInterpreter> input_interpreter; | ||
| 103 | |||
| 104 | std::thread input_thread; | ||
| 105 | |||
| 106 | std::atomic<bool> input_thread_running{}; | ||
| 107 | }; | ||
diff --git a/src/yuzu/util/overlay_dialog.ui b/src/yuzu/util/overlay_dialog.ui new file mode 100644 index 000000000..278e2f219 --- /dev/null +++ b/src/yuzu/util/overlay_dialog.ui | |||
| @@ -0,0 +1,404 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <ui version="4.0"> | ||
| 3 | <class>OverlayDialog</class> | ||
| 4 | <widget class="QDialog" name="OverlayDialog"> | ||
| 5 | <property name="geometry"> | ||
| 6 | <rect> | ||
| 7 | <x>0</x> | ||
| 8 | <y>0</y> | ||
| 9 | <width>1280</width> | ||
| 10 | <height>720</height> | ||
| 11 | </rect> | ||
| 12 | </property> | ||
| 13 | <property name="windowTitle"> | ||
| 14 | <string>Dialog</string> | ||
| 15 | </property> | ||
| 16 | <property name="styleSheet"> | ||
| 17 | <string notr="true"/> | ||
| 18 | </property> | ||
| 19 | <layout class="QVBoxLayout" name="verticalLayout"> | ||
| 20 | <property name="spacing"> | ||
| 21 | <number>0</number> | ||
| 22 | </property> | ||
| 23 | <property name="leftMargin"> | ||
| 24 | <number>0</number> | ||
| 25 | </property> | ||
| 26 | <property name="topMargin"> | ||
| 27 | <number>0</number> | ||
| 28 | </property> | ||
| 29 | <property name="rightMargin"> | ||
| 30 | <number>0</number> | ||
| 31 | </property> | ||
| 32 | <property name="bottomMargin"> | ||
| 33 | <number>0</number> | ||
| 34 | </property> | ||
| 35 | <item> | ||
| 36 | <widget class="QStackedWidget" name="stackedDialog"> | ||
| 37 | <property name="currentIndex"> | ||
| 38 | <number>0</number> | ||
| 39 | </property> | ||
| 40 | <widget class="QWidget" name="lineDialog"> | ||
| 41 | <layout class="QGridLayout" name="lineDialogGridLayout" rowstretch="210,300,210" columnstretch="250,780,250"> | ||
| 42 | <property name="leftMargin"> | ||
| 43 | <number>0</number> | ||
| 44 | </property> | ||
| 45 | <property name="topMargin"> | ||
| 46 | <number>0</number> | ||
| 47 | </property> | ||
| 48 | <property name="rightMargin"> | ||
| 49 | <number>0</number> | ||
| 50 | </property> | ||
| 51 | <property name="bottomMargin"> | ||
| 52 | <number>0</number> | ||
| 53 | </property> | ||
| 54 | <property name="spacing"> | ||
| 55 | <number>0</number> | ||
| 56 | </property> | ||
| 57 | <item row="1" column="1"> | ||
| 58 | <widget class="QWidget" name="contentDialog" native="true"> | ||
| 59 | <layout class="QVBoxLayout" name="verticalLayout_2" stretch="70,149,82"> | ||
| 60 | <property name="spacing"> | ||
| 61 | <number>0</number> | ||
| 62 | </property> | ||
| 63 | <property name="leftMargin"> | ||
| 64 | <number>0</number> | ||
| 65 | </property> | ||
| 66 | <property name="topMargin"> | ||
| 67 | <number>0</number> | ||
| 68 | </property> | ||
| 69 | <property name="rightMargin"> | ||
| 70 | <number>0</number> | ||
| 71 | </property> | ||
| 72 | <property name="bottomMargin"> | ||
| 73 | <number>0</number> | ||
| 74 | </property> | ||
| 75 | <item> | ||
| 76 | <widget class="QLabel" name="label_title"> | ||
| 77 | <property name="font"> | ||
| 78 | <font> | ||
| 79 | <pointsize>14</pointsize> | ||
| 80 | </font> | ||
| 81 | </property> | ||
| 82 | <property name="alignment"> | ||
| 83 | <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> | ||
| 84 | </property> | ||
| 85 | </widget> | ||
| 86 | </item> | ||
| 87 | <item> | ||
| 88 | <widget class="QLabel" name="label_dialog"> | ||
| 89 | <property name="font"> | ||
| 90 | <font> | ||
| 91 | <pointsize>18</pointsize> | ||
| 92 | </font> | ||
| 93 | </property> | ||
| 94 | <property name="alignment"> | ||
| 95 | <set>Qt::AlignCenter</set> | ||
| 96 | </property> | ||
| 97 | <property name="wordWrap"> | ||
| 98 | <bool>true</bool> | ||
| 99 | </property> | ||
| 100 | </widget> | ||
| 101 | </item> | ||
| 102 | <item> | ||
| 103 | <widget class="QWidget" name="buttonsDialog" native="true"> | ||
| 104 | <layout class="QHBoxLayout" name="horizontalLayout"> | ||
| 105 | <property name="spacing"> | ||
| 106 | <number>0</number> | ||
| 107 | </property> | ||
| 108 | <property name="leftMargin"> | ||
| 109 | <number>0</number> | ||
| 110 | </property> | ||
| 111 | <property name="topMargin"> | ||
| 112 | <number>0</number> | ||
| 113 | </property> | ||
| 114 | <property name="rightMargin"> | ||
| 115 | <number>0</number> | ||
| 116 | </property> | ||
| 117 | <property name="bottomMargin"> | ||
| 118 | <number>0</number> | ||
| 119 | </property> | ||
| 120 | <item> | ||
| 121 | <widget class="QPushButton" name="button_cancel"> | ||
| 122 | <property name="sizePolicy"> | ||
| 123 | <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> | ||
| 124 | <horstretch>0</horstretch> | ||
| 125 | <verstretch>0</verstretch> | ||
| 126 | </sizepolicy> | ||
| 127 | </property> | ||
| 128 | <property name="font"> | ||
| 129 | <font> | ||
| 130 | <pointsize>18</pointsize> | ||
| 131 | </font> | ||
| 132 | </property> | ||
| 133 | <property name="text"> | ||
| 134 | <string>Cancel</string> | ||
| 135 | </property> | ||
| 136 | </widget> | ||
| 137 | </item> | ||
| 138 | <item> | ||
| 139 | <widget class="QPushButton" name="button_ok_label"> | ||
| 140 | <property name="sizePolicy"> | ||
| 141 | <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> | ||
| 142 | <horstretch>0</horstretch> | ||
| 143 | <verstretch>0</verstretch> | ||
| 144 | </sizepolicy> | ||
| 145 | </property> | ||
| 146 | <property name="font"> | ||
| 147 | <font> | ||
| 148 | <pointsize>18</pointsize> | ||
| 149 | </font> | ||
| 150 | </property> | ||
| 151 | <property name="text"> | ||
| 152 | <string>OK</string> | ||
| 153 | </property> | ||
| 154 | </widget> | ||
| 155 | </item> | ||
| 156 | </layout> | ||
| 157 | </widget> | ||
| 158 | </item> | ||
| 159 | </layout> | ||
| 160 | </widget> | ||
| 161 | </item> | ||
| 162 | <item row="0" column="1"> | ||
| 163 | <spacer name="verticalSpacer"> | ||
| 164 | <property name="orientation"> | ||
| 165 | <enum>Qt::Vertical</enum> | ||
| 166 | </property> | ||
| 167 | <property name="sizeHint" stdset="0"> | ||
| 168 | <size> | ||
| 169 | <width>20</width> | ||
| 170 | <height>40</height> | ||
| 171 | </size> | ||
| 172 | </property> | ||
| 173 | </spacer> | ||
| 174 | </item> | ||
| 175 | <item row="1" column="0"> | ||
| 176 | <spacer name="horizontalSpacer"> | ||
| 177 | <property name="orientation"> | ||
| 178 | <enum>Qt::Horizontal</enum> | ||
| 179 | </property> | ||
| 180 | <property name="sizeHint" stdset="0"> | ||
| 181 | <size> | ||
| 182 | <width>40</width> | ||
| 183 | <height>20</height> | ||
| 184 | </size> | ||
| 185 | </property> | ||
| 186 | </spacer> | ||
| 187 | </item> | ||
| 188 | <item row="2" column="1"> | ||
| 189 | <spacer name="verticalSpacer_2"> | ||
| 190 | <property name="orientation"> | ||
| 191 | <enum>Qt::Vertical</enum> | ||
| 192 | </property> | ||
| 193 | <property name="sizeHint" stdset="0"> | ||
| 194 | <size> | ||
| 195 | <width>20</width> | ||
| 196 | <height>40</height> | ||
| 197 | </size> | ||
| 198 | </property> | ||
| 199 | </spacer> | ||
| 200 | </item> | ||
| 201 | <item row="1" column="2"> | ||
| 202 | <spacer name="horizontalSpacer_2"> | ||
| 203 | <property name="orientation"> | ||
| 204 | <enum>Qt::Horizontal</enum> | ||
| 205 | </property> | ||
| 206 | <property name="sizeHint" stdset="0"> | ||
| 207 | <size> | ||
| 208 | <width>40</width> | ||
| 209 | <height>20</height> | ||
| 210 | </size> | ||
| 211 | </property> | ||
| 212 | </spacer> | ||
| 213 | </item> | ||
| 214 | </layout> | ||
| 215 | </widget> | ||
| 216 | <widget class="QWidget" name="richDialog"> | ||
| 217 | <layout class="QGridLayout" name="richDialogGridLayout" rowstretch="100,520,100" columnstretch="165,950,165"> | ||
| 218 | <property name="leftMargin"> | ||
| 219 | <number>0</number> | ||
| 220 | </property> | ||
| 221 | <property name="topMargin"> | ||
| 222 | <number>0</number> | ||
| 223 | </property> | ||
| 224 | <property name="rightMargin"> | ||
| 225 | <number>0</number> | ||
| 226 | </property> | ||
| 227 | <property name="bottomMargin"> | ||
| 228 | <number>0</number> | ||
| 229 | </property> | ||
| 230 | <property name="spacing"> | ||
| 231 | <number>0</number> | ||
| 232 | </property> | ||
| 233 | <item row="1" column="0"> | ||
| 234 | <spacer name="horizontalSpacer_3"> | ||
| 235 | <property name="orientation"> | ||
| 236 | <enum>Qt::Horizontal</enum> | ||
| 237 | </property> | ||
| 238 | <property name="sizeHint" stdset="0"> | ||
| 239 | <size> | ||
| 240 | <width>40</width> | ||
| 241 | <height>20</height> | ||
| 242 | </size> | ||
| 243 | </property> | ||
| 244 | </spacer> | ||
| 245 | </item> | ||
| 246 | <item row="2" column="1"> | ||
| 247 | <spacer name="verticalSpacer_4"> | ||
| 248 | <property name="orientation"> | ||
| 249 | <enum>Qt::Vertical</enum> | ||
| 250 | </property> | ||
| 251 | <property name="sizeHint" stdset="0"> | ||
| 252 | <size> | ||
| 253 | <width>20</width> | ||
| 254 | <height>40</height> | ||
| 255 | </size> | ||
| 256 | </property> | ||
| 257 | </spacer> | ||
| 258 | </item> | ||
| 259 | <item row="0" column="1"> | ||
| 260 | <spacer name="verticalSpacer_3"> | ||
| 261 | <property name="orientation"> | ||
| 262 | <enum>Qt::Vertical</enum> | ||
| 263 | </property> | ||
| 264 | <property name="sizeHint" stdset="0"> | ||
| 265 | <size> | ||
| 266 | <width>20</width> | ||
| 267 | <height>40</height> | ||
| 268 | </size> | ||
| 269 | </property> | ||
| 270 | </spacer> | ||
| 271 | </item> | ||
| 272 | <item row="1" column="1"> | ||
| 273 | <widget class="QWidget" name="contentRichDialog" native="true"> | ||
| 274 | <layout class="QVBoxLayout" name="verticalLayout_3" stretch="70,368,82"> | ||
| 275 | <property name="spacing"> | ||
| 276 | <number>0</number> | ||
| 277 | </property> | ||
| 278 | <property name="leftMargin"> | ||
| 279 | <number>0</number> | ||
| 280 | </property> | ||
| 281 | <property name="topMargin"> | ||
| 282 | <number>0</number> | ||
| 283 | </property> | ||
| 284 | <property name="rightMargin"> | ||
| 285 | <number>0</number> | ||
| 286 | </property> | ||
| 287 | <property name="bottomMargin"> | ||
| 288 | <number>0</number> | ||
| 289 | </property> | ||
| 290 | <item> | ||
| 291 | <widget class="QLabel" name="label_title_rich"> | ||
| 292 | <property name="font"> | ||
| 293 | <font> | ||
| 294 | <pointsize>14</pointsize> | ||
| 295 | </font> | ||
| 296 | </property> | ||
| 297 | <property name="text"> | ||
| 298 | <string/> | ||
| 299 | </property> | ||
| 300 | <property name="alignment"> | ||
| 301 | <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> | ||
| 302 | </property> | ||
| 303 | </widget> | ||
| 304 | </item> | ||
| 305 | <item> | ||
| 306 | <widget class="QTextBrowser" name="text_browser_dialog"> | ||
| 307 | <property name="font"> | ||
| 308 | <font> | ||
| 309 | <pointsize>18</pointsize> | ||
| 310 | </font> | ||
| 311 | </property> | ||
| 312 | <property name="html"> | ||
| 313 | <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> | ||
| 314 | <html><head><meta name="qrichtext" content="1" /><style type="text/css"> | ||
| 315 | p, li { white-space: pre-wrap; } | ||
| 316 | </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:18pt; font-weight:400; font-style:normal;"> | ||
| 317 | <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p></body></html></string> | ||
| 318 | </property> | ||
| 319 | </widget> | ||
| 320 | </item> | ||
| 321 | <item> | ||
| 322 | <widget class="QWidget" name="buttonsRichDialog" native="true"> | ||
| 323 | <layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
| 324 | <property name="spacing"> | ||
| 325 | <number>0</number> | ||
| 326 | </property> | ||
| 327 | <property name="leftMargin"> | ||
| 328 | <number>0</number> | ||
| 329 | </property> | ||
| 330 | <property name="topMargin"> | ||
| 331 | <number>0</number> | ||
| 332 | </property> | ||
| 333 | <property name="rightMargin"> | ||
| 334 | <number>0</number> | ||
| 335 | </property> | ||
| 336 | <property name="bottomMargin"> | ||
| 337 | <number>0</number> | ||
| 338 | </property> | ||
| 339 | <item> | ||
| 340 | <widget class="QPushButton" name="button_cancel_rich"> | ||
| 341 | <property name="sizePolicy"> | ||
| 342 | <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> | ||
| 343 | <horstretch>0</horstretch> | ||
| 344 | <verstretch>0</verstretch> | ||
| 345 | </sizepolicy> | ||
| 346 | </property> | ||
| 347 | <property name="font"> | ||
| 348 | <font> | ||
| 349 | <pointsize>18</pointsize> | ||
| 350 | </font> | ||
| 351 | </property> | ||
| 352 | <property name="text"> | ||
| 353 | <string>Cancel</string> | ||
| 354 | </property> | ||
| 355 | </widget> | ||
| 356 | </item> | ||
| 357 | <item> | ||
| 358 | <widget class="QPushButton" name="button_ok_rich"> | ||
| 359 | <property name="sizePolicy"> | ||
| 360 | <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> | ||
| 361 | <horstretch>0</horstretch> | ||
| 362 | <verstretch>0</verstretch> | ||
| 363 | </sizepolicy> | ||
| 364 | </property> | ||
| 365 | <property name="font"> | ||
| 366 | <font> | ||
| 367 | <pointsize>18</pointsize> | ||
| 368 | </font> | ||
| 369 | </property> | ||
| 370 | <property name="text"> | ||
| 371 | <string>OK</string> | ||
| 372 | </property> | ||
| 373 | </widget> | ||
| 374 | </item> | ||
| 375 | </layout> | ||
| 376 | </widget> | ||
| 377 | </item> | ||
| 378 | </layout> | ||
| 379 | </widget> | ||
| 380 | </item> | ||
| 381 | <item row="1" column="2"> | ||
| 382 | <spacer name="horizontalSpacer_4"> | ||
| 383 | <property name="orientation"> | ||
| 384 | <enum>Qt::Horizontal</enum> | ||
| 385 | </property> | ||
| 386 | <property name="sizeHint" stdset="0"> | ||
| 387 | <size> | ||
| 388 | <width>40</width> | ||
| 389 | <height>20</height> | ||
| 390 | </size> | ||
| 391 | </property> | ||
| 392 | </spacer> | ||
| 393 | </item> | ||
| 394 | </layout> | ||
| 395 | </widget> | ||
| 396 | </widget> | ||
| 397 | </item> | ||
| 398 | </layout> | ||
| 399 | </widget> | ||
| 400 | <resources> | ||
| 401 | <include location="../../../dist/icons/overlay/overlay.qrc"/> | ||
| 402 | </resources> | ||
| 403 | <connections/> | ||
| 404 | </ui> | ||