/
redgpu
/
ezEngine
Обзор
Документация
Войти
/
redgpu
/
ezEngine
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
ms9
Code/Tools/Fileserve/Gui.cpp
63 строки
1 KB
jankrassnigg
Renamed lots of PCH files
07 фев 2019, 19:52
07 фев 2019, 19:52
995b2a9
Код
Авторство
О чём код?
#include <FileservePCH.h> #include <Fileserve/Main.h> #ifdef EZ_USE_QT #include <Core/Application/Application.h> #include <EditorPluginFileserve/FileserveUI/FileserveWidget.moc.h> #include <Gui.moc.h> #include <QTimer> void CreateFileserveMainWindow(ezApplication* pApp) { ezQtFileserveMainWnd* pMainWnd = new ezQtFileserveMainWnd(pApp); pMainWnd->show(); } ezQtFileserveMainWnd::ezQtFileserveMainWnd(ezApplication* pApp, QWidget* parent) : QMainWindow(parent) , m_pApp(pApp) { OnServerStopped(); m_pFileserveWidget = new ezQtFileserveWidget(this); QMainWindow::setCentralWidget(m_pFileserveWidget); resize(700, 650); connect(m_pFileserveWidget, &ezQtFileserveWidget::ServerStarted, this, &ezQtFileserveMainWnd::OnServerStarted); connect(m_pFileserveWidget, &ezQtFileserveWidget::ServerStopped, this, &ezQtFileserveMainWnd::OnServerStopped); show(); QTimer::singleShot(0, this, &ezQtFileserveMainWnd::UpdateNetworkSlot); setWindowIcon(m_pFileserveWidget->windowIcon()); } void ezQtFileserveMainWnd::UpdateNetworkSlot() { if (m_pApp->Run() == ezApplication::Continue) { QTimer::singleShot(0, this, &ezQtFileserveMainWnd::UpdateNetworkSlot); } else { close(); } } void ezQtFileserveMainWnd::OnServerStarted(const QString& ip, ezUInt16 uiPort) { QString title = QString("ezFileserve (Port %1)").arg(uiPort); setWindowTitle(title); } void ezQtFileserveMainWnd::OnServerStopped() { setWindowTitle("ezFileserve (not running)"); } #endif