- Formatted all CodeGen module files (9 files) - Formatted LtsAppDescriptor module files - Formatted LtsAppManager/AppChooser files - Applied clang-format to all DTC and enum headers across modules - Removed coordTransTests from CommonUnitTestsPlaceholder (moved to tests/) Cosmetic changes only, no functional modifications. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
49 lines
1.3 KiB
C++
49 lines
1.3 KiB
C++
#include "window.h"
|
|
|
|
#include <LtsWidgets/lts_notification_box.h>
|
|
#include <QApplication>
|
|
#include <QHBoxLayout>
|
|
|
|
namespace LtsWidgets
|
|
{
|
|
Window::Window(QWidget* parent) : QWidget(parent)
|
|
{
|
|
|
|
setGeometry(x(), y(), 300, 300);
|
|
|
|
QHBoxLayout* lay = new QHBoxLayout;
|
|
|
|
lay->setMargin(0);
|
|
|
|
auto x1 = new LtsWidgets::LtsNotificationBox;
|
|
lay->addWidget(x1);
|
|
|
|
if (qApp->arguments().count() < 2)
|
|
abort();
|
|
|
|
LtsNotificationBox::MessageType type;
|
|
|
|
if (qApp->arguments().at(1) == QStringLiteral("e"))
|
|
type = LtsNotificationBox::MessageType::Error;
|
|
else if (qApp->arguments().at(1) == QStringLiteral("w"))
|
|
type = LtsNotificationBox::MessageType::Warning;
|
|
else if (qApp->arguments().at(1) == QStringLiteral("i"))
|
|
type = LtsNotificationBox::MessageType::Info;
|
|
else if (qApp->arguments().at(1) == QStringLiteral("s"))
|
|
type = LtsNotificationBox::MessageType::Success;
|
|
else
|
|
abort();
|
|
|
|
x1->message(QStringLiteral("Title Message"),
|
|
QStringLiteral("A text that consists of a lot of characters and also even has<br />two lines."), type);
|
|
connect(x1, &LtsNotificationBox::signalClose, this, &QWidget::close);
|
|
|
|
setLayout(lay);
|
|
|
|
setAttribute(Qt::WA_TranslucentBackground);
|
|
}
|
|
|
|
Window::~Window() {}
|
|
|
|
} // namespace LtsWidgets
|