Change log to be a QMainWindow
Signed-off-by: Yihe Li <winmikedows@hotmail.com>
This commit is contained in:
parent
ef3bf75715
commit
d77889f26d
10 changed files with 73 additions and 86 deletions
25
launcher/ui/ViewLogWindow.cpp
Normal file
25
launcher/ui/ViewLogWindow.cpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include <QCloseEvent>
|
||||
|
||||
#include "ViewLogWindow.h"
|
||||
|
||||
#include "ui/pages/instance/OtherLogsPage.h"
|
||||
|
||||
ViewLogWindow::ViewLogWindow(QWidget* parent)
|
||||
: QMainWindow(parent), m_page(new OtherLogsPage("launcher-logs", tr("Launcher Logs"), "Launcher-Logs", nullptr, parent))
|
||||
{
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
setWindowIcon(APPLICATION->getThemedIcon("log"));
|
||||
setWindowTitle(tr("View Launcher Logs"));
|
||||
setCentralWidget(m_page);
|
||||
setMinimumSize(m_page->size());
|
||||
setContentsMargins(0, 0, 0, 0);
|
||||
m_page->opened();
|
||||
show();
|
||||
}
|
||||
|
||||
void ViewLogWindow::closeEvent(QCloseEvent* event)
|
||||
{
|
||||
m_page->closed();
|
||||
emit isClosing();
|
||||
event->accept();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue