1
Fork 0
mirror of https://github.com/redstrate/Novus.git synced 2025-06-11 15:37:46 +00:00
novus/apps/armoury/src/penumbraapi.cpp
Joshua Goins a4347e6f8b Armoury: Add Penumbra actions menu
It's now possible to "redraw" manually, and also open the main window.
2024-05-25 22:43:49 -04:00

20 lines
543 B
C++

// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
// SPDX-License-Identifier: GPL-3.0-or-later
#include "penumbraapi.h"
PenumbraApi::PenumbraApi(QObject *parent)
: QObject(parent)
, m_mgr(new QNetworkAccessManager(this))
{
}
void PenumbraApi::redrawAll()
{
m_mgr->post(QNetworkRequest(QUrl(QStringLiteral("http://localhost:42069/api/redrawAll"))), QByteArray{});
}
void PenumbraApi::openWindow()
{
m_mgr->post(QNetworkRequest(QUrl(QStringLiteral("http://localhost:42069/api/openwindow"))), QByteArray{});
}