Finish status pills.
This commit is contained in:
parent
927217c7f0
commit
8a8c4193e6
@ -308,16 +308,23 @@ SET(MULTIMC_SOURCES
|
|||||||
gui/dialogs/NotificationDialog.cpp
|
gui/dialogs/NotificationDialog.cpp
|
||||||
|
|
||||||
# GUI - widgets
|
# GUI - widgets
|
||||||
gui/widgets/Common.h
|
|
||||||
gui/widgets/Common.cpp
|
gui/widgets/Common.cpp
|
||||||
gui/widgets/ModListView.h
|
gui/widgets/Common.h
|
||||||
gui/widgets/ModListView.cpp
|
gui/widgets/IconLabel.cpp
|
||||||
gui/widgets/VersionListView.h
|
gui/widgets/IconLabel.h
|
||||||
gui/widgets/VersionListView.cpp
|
|
||||||
gui/widgets/LabeledToolButton.h
|
|
||||||
gui/widgets/LabeledToolButton.cpp
|
gui/widgets/LabeledToolButton.cpp
|
||||||
gui/widgets/MCModInfoFrame.h
|
gui/widgets/LabeledToolButton.h
|
||||||
|
gui/widgets/LineSeparator.cpp
|
||||||
|
gui/widgets/LineSeparator.h
|
||||||
gui/widgets/MCModInfoFrame.cpp
|
gui/widgets/MCModInfoFrame.cpp
|
||||||
|
gui/widgets/MCModInfoFrame.h
|
||||||
|
gui/widgets/ModListView.cpp
|
||||||
|
gui/widgets/ModListView.h
|
||||||
|
gui/widgets/ServerStatus.cpp
|
||||||
|
gui/widgets/ServerStatus.h
|
||||||
|
gui/widgets/VersionListView.cpp
|
||||||
|
gui/widgets/VersionListView.h
|
||||||
|
|
||||||
|
|
||||||
# GUI - instance group view
|
# GUI - instance group view
|
||||||
gui/groupview/Group.cpp
|
gui/groupview/Group.cpp
|
||||||
|
@ -200,7 +200,7 @@ private:
|
|||||||
Task *m_versionLoadTask;
|
Task *m_versionLoadTask;
|
||||||
|
|
||||||
QLabel *m_statusLeft;
|
QLabel *m_statusLeft;
|
||||||
QLabel *m_statusRight;
|
class ServerStatus *m_statusRight;
|
||||||
|
|
||||||
QMenu *accountMenu;
|
QMenu *accountMenu;
|
||||||
QToolButton *accountMenuButton;
|
QToolButton *accountMenuButton;
|
||||||
|
30
gui/widgets/IconLabel.cpp
Normal file
30
gui/widgets/IconLabel.cpp
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#include "IconLabel.h"
|
||||||
|
|
||||||
|
#include <QStyle>
|
||||||
|
#include <QStyleOption>
|
||||||
|
#include <QLayout>
|
||||||
|
#include <QPainter>
|
||||||
|
#include <QRect>
|
||||||
|
|
||||||
|
IconLabel::IconLabel(QWidget *parent, QIcon icon, QSize size)
|
||||||
|
: QWidget(parent), m_icon(icon), m_size(size)
|
||||||
|
{
|
||||||
|
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize IconLabel::sizeHint() const
|
||||||
|
{
|
||||||
|
return m_size;
|
||||||
|
}
|
||||||
|
|
||||||
|
void IconLabel::setIcon(QIcon icon)
|
||||||
|
{
|
||||||
|
m_icon = icon;
|
||||||
|
update();
|
||||||
|
}
|
||||||
|
|
||||||
|
void IconLabel::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
m_icon.paint(&p, contentsRect());
|
||||||
|
}
|
26
gui/widgets/IconLabel.h
Normal file
26
gui/widgets/IconLabel.h
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <QWidget>
|
||||||
|
#include <QIcon>
|
||||||
|
|
||||||
|
class QStyleOption;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is a trivial widget that paints a QIcon of the specified size.
|
||||||
|
*/
|
||||||
|
class IconLabel : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
/// Create a line separator. orientation is the orientation of the line.
|
||||||
|
explicit IconLabel(QWidget *parent, QIcon icon, QSize size);
|
||||||
|
|
||||||
|
virtual QSize sizeHint() const;
|
||||||
|
virtual void paintEvent(QPaintEvent *);
|
||||||
|
|
||||||
|
void setIcon(QIcon icon);
|
||||||
|
|
||||||
|
private:
|
||||||
|
QSize m_size;
|
||||||
|
QIcon m_icon;
|
||||||
|
};
|
37
gui/widgets/LineSeparator.cpp
Normal file
37
gui/widgets/LineSeparator.cpp
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#include "LineSeparator.h"
|
||||||
|
|
||||||
|
#include <QStyle>
|
||||||
|
#include <QStyleOption>
|
||||||
|
#include <QLayout>
|
||||||
|
#include <QPainter>
|
||||||
|
|
||||||
|
void LineSeparator::initStyleOption(QStyleOption *option) const
|
||||||
|
{
|
||||||
|
option->initFrom(this);
|
||||||
|
// in a horizontal layout, the line is vertical (and vice versa)
|
||||||
|
if (m_orientation == Qt::Vertical)
|
||||||
|
option->state |= QStyle::State_Horizontal;
|
||||||
|
}
|
||||||
|
|
||||||
|
LineSeparator::LineSeparator(QWidget *parent, Qt::Orientation orientation)
|
||||||
|
: QWidget(parent), m_orientation(orientation)
|
||||||
|
{
|
||||||
|
setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize LineSeparator::sizeHint() const
|
||||||
|
{
|
||||||
|
QStyleOption opt;
|
||||||
|
initStyleOption(&opt);
|
||||||
|
const int extent =
|
||||||
|
style()->pixelMetric(QStyle::PM_ToolBarSeparatorExtent, &opt, parentWidget());
|
||||||
|
return QSize(extent, extent);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LineSeparator::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QPainter p(this);
|
||||||
|
QStyleOption opt;
|
||||||
|
initStyleOption(&opt);
|
||||||
|
style()->drawPrimitive(QStyle::PE_IndicatorToolBarSeparator, &opt, &p, parentWidget());
|
||||||
|
}
|
18
gui/widgets/LineSeparator.h
Normal file
18
gui/widgets/LineSeparator.h
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#pragma once
|
||||||
|
#include <QWidget>
|
||||||
|
|
||||||
|
class QStyleOption;
|
||||||
|
|
||||||
|
class LineSeparator : public QWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
/// Create a line separator. orientation is the orientation of the line.
|
||||||
|
explicit LineSeparator(QWidget *parent, Qt::Orientation orientation = Qt::Vertical);
|
||||||
|
QSize sizeHint() const;
|
||||||
|
void paintEvent(QPaintEvent *);
|
||||||
|
void initStyleOption(QStyleOption *option) const;
|
||||||
|
private:
|
||||||
|
Qt::Orientation m_orientation = Qt::Vertical;
|
||||||
|
};
|
@ -1,4 +1,6 @@
|
|||||||
#include "ServerStatus.h"
|
#include "ServerStatus.h"
|
||||||
|
#include "LineSeparator.h"
|
||||||
|
#include "IconLabel.h"
|
||||||
#include "logic/status/StatusChecker.h"
|
#include "logic/status/StatusChecker.h"
|
||||||
|
|
||||||
#include "MultiMC.h"
|
#include "MultiMC.h"
|
||||||
@ -8,118 +10,106 @@
|
|||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QMap>
|
#include <QMap>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
|
#include <QAction>
|
||||||
|
|
||||||
ServerStatus::ServerStatus(QWidget *parent, Qt::WindowFlags f)
|
ServerStatus::ServerStatus(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f)
|
||||||
:QWidget(parent, f)
|
|
||||||
{
|
{
|
||||||
clear();
|
layout = new QHBoxLayout(this);
|
||||||
goodIcon = QPixmap(":/icons/multimc/48x48/status-good.png");
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
goodIcon.setDevicePixelRatio(2.0);
|
goodIcon = QIcon::fromTheme("status-good");
|
||||||
badIcon = QPixmap(":/icons/multimc/48x48/status-bad.png");
|
badIcon = QIcon::fromTheme("status-bad");
|
||||||
badIcon.setDevicePixelRatio(2.0);
|
|
||||||
addStatus(tr("No status available"), false);
|
addStatus("minecraft.net", tr("Web"));
|
||||||
|
addLine();
|
||||||
|
addStatus("account.mojang.com", tr("Account"));
|
||||||
|
addLine();
|
||||||
|
addStatus("skins.minecraft.net", tr("Skins"));
|
||||||
|
addLine();
|
||||||
|
addStatus("authserver.mojang.com", tr("Auth"));
|
||||||
|
addLine();
|
||||||
|
addStatus("sessionserver.mojang.com", tr("Session"));
|
||||||
|
|
||||||
m_statusRefresh = new QToolButton(this);
|
m_statusRefresh = new QToolButton(this);
|
||||||
m_statusRefresh->setCheckable(true);
|
m_statusRefresh->setCheckable(true);
|
||||||
m_statusRefresh->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
m_statusRefresh->setToolButtonStyle(Qt::ToolButtonIconOnly);
|
||||||
m_statusRefresh->setIcon(QIcon::fromTheme("refresh"));
|
m_statusRefresh->setIcon(QIcon::fromTheme("refresh"));
|
||||||
|
layout->addWidget(m_statusRefresh);
|
||||||
|
|
||||||
|
setLayout(layout);
|
||||||
|
|
||||||
// Start status checker
|
// Start status checker
|
||||||
{
|
{
|
||||||
connect(MMC->statusChecker().get(), &StatusChecker::statusLoaded, this,
|
auto reloader = MMC->statusChecker().get();
|
||||||
&ServerStatus::updateStatusUI);
|
connect(reloader, &StatusChecker::statusChanged, this, &ServerStatus::StatusChanged);
|
||||||
connect(MMC->statusChecker().get(), &StatusChecker::statusLoadingFailed, this,
|
connect(reloader, &StatusChecker::statusLoading, this, &ServerStatus::StatusReloading);
|
||||||
&ServerStatus::updateStatusFailedUI);
|
|
||||||
|
|
||||||
connect(m_statusRefresh, &QAbstractButton::clicked, this, &ServerStatus::reloadStatus);
|
connect(m_statusRefresh, &QAbstractButton::clicked, this, &ServerStatus::reloadStatus);
|
||||||
connect(&statusTimer, &QTimer::timeout, this, &ServerStatus::reloadStatus);
|
MMC->statusChecker()->startTimer(60000);
|
||||||
statusTimer.setSingleShot(true);
|
|
||||||
|
|
||||||
reloadStatus();
|
reloadStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ServerStatus::addLine()
|
ServerStatus::~ServerStatus()
|
||||||
{
|
{
|
||||||
auto line = new QFrame(this);
|
|
||||||
line->setFrameShape(QFrame::VLine);
|
|
||||||
line->setFrameShadow(QFrame::Sunken);
|
|
||||||
layout->addWidget(line);
|
|
||||||
}
|
|
||||||
|
|
||||||
ServerStatus::addStatus(QString name, bool online)
|
|
||||||
{
|
|
||||||
auto label = new QLabel(this);
|
|
||||||
label->setText(name);
|
|
||||||
if(online)
|
|
||||||
label->setPixmap(goodIcon);
|
|
||||||
else
|
|
||||||
label->setPixmap(badIcon);
|
|
||||||
layout->addWidget(label);
|
|
||||||
}
|
|
||||||
|
|
||||||
ServerStatus::clear()
|
|
||||||
{
|
|
||||||
if(layout)
|
|
||||||
delete layout;
|
|
||||||
layout = new QHBoxLayout(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ServerStatus::StatusChanged(QMap<QString, QString> statusEntries)
|
|
||||||
{
|
|
||||||
clear();
|
|
||||||
int howmany = statusEntries.size();
|
|
||||||
int index = 0;
|
|
||||||
auto iter = statusEntries.begin();
|
|
||||||
while (iter != statusEntries.end())
|
|
||||||
{
|
|
||||||
addStatus();
|
|
||||||
index++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static QString convertStatus(const QString &status)
|
|
||||||
{
|
|
||||||
QString ret = "?";
|
|
||||||
|
|
||||||
if (status == "green")
|
|
||||||
ret = "↑";
|
|
||||||
else if (status == "yellow")
|
|
||||||
ret = "-";
|
|
||||||
else if (status == "red")
|
|
||||||
ret = "↓";
|
|
||||||
|
|
||||||
return "<span style=\"font-size:11pt; font-weight:600;\">" + ret + "</span>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerStatus::reloadStatus()
|
void ServerStatus::reloadStatus()
|
||||||
{
|
{
|
||||||
m_statusRefresh->setChecked(true);
|
|
||||||
MMC->statusChecker()->reloadStatus();
|
MMC->statusChecker()->reloadStatus();
|
||||||
// updateStatusUI();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static QString makeStatusString(const QMap<QString, QString> statuses)
|
void ServerStatus::addLine()
|
||||||
{
|
{
|
||||||
QString status = "";
|
layout->addWidget(new LineSeparator(this));
|
||||||
status += "Web: " + convertStatus(statuses["minecraft.net"]);
|
|
||||||
status += " Account: " + convertStatus(statuses["account.mojang.com"]);
|
|
||||||
status += " Skins: " + convertStatus(statuses["skins.minecraft.net"]);
|
|
||||||
status += " Auth: " + convertStatus(statuses["authserver.mojang.com"]);
|
|
||||||
status += " Session: " + convertStatus(statuses["sessionserver.mojang.com"]);
|
|
||||||
|
|
||||||
return status;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerStatus::updateStatusUI()
|
void ServerStatus::addStatus(QString key, QString name)
|
||||||
{
|
{
|
||||||
m_statusRefresh->setChecked(false);
|
{
|
||||||
MMC->statusChecker()->getStatusEntries();
|
auto label = new IconLabel(this, badIcon, QSize(16, 16));
|
||||||
statusTimer.start(60 * 1000);
|
label->setToolTip(key);
|
||||||
|
serverLabels[key] = label;
|
||||||
|
layout->addWidget(label);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
auto label = new QLabel(this);
|
||||||
|
label->setText(name);
|
||||||
|
label->setToolTip(key);
|
||||||
|
layout->addWidget(label);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ServerStatus::updateStatusFailedUI()
|
void ServerStatus::setStatus(QString key, bool value)
|
||||||
{
|
{
|
||||||
m_statusRefresh->setChecked(false);
|
if (!serverLabels.contains(key))
|
||||||
StatusChanged();
|
return;
|
||||||
statusTimer.start(60 * 1000);
|
IconLabel *label = serverLabels[key];
|
||||||
|
label->setIcon(value ? goodIcon : badIcon);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ServerStatus::StatusChanged(const QMap<QString, QString> statusEntries)
|
||||||
|
{
|
||||||
|
auto convertStatus = [&](QString status)->bool
|
||||||
|
{
|
||||||
|
if (status == "green")
|
||||||
|
return true;
|
||||||
|
else if (status == "yellow")
|
||||||
|
return false;
|
||||||
|
else if (status == "red")
|
||||||
|
return false;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
;
|
||||||
|
auto iter = statusEntries.begin();
|
||||||
|
while (iter != statusEntries.end())
|
||||||
|
{
|
||||||
|
QString key = iter.key();
|
||||||
|
bool value = convertStatus(iter.value());
|
||||||
|
setStatus(key, value);
|
||||||
|
iter++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ServerStatus::StatusReloading(bool is_reloading)
|
||||||
|
{
|
||||||
|
m_statusRefresh->setChecked(is_reloading);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
#include <QString>
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include <QMap>
|
||||||
|
#include <QIcon>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
|
class IconLabel;
|
||||||
class QToolButton;
|
class QToolButton;
|
||||||
class QHBoxLayout;
|
class QHBoxLayout;
|
||||||
|
|
||||||
@ -10,23 +14,21 @@ class ServerStatus: public QWidget
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit ServerStatus(QWidget *parent = nullptr, Qt::WindowFlags f = 0);
|
explicit ServerStatus(QWidget *parent = nullptr, Qt::WindowFlags f = 0);
|
||||||
virtual ~ServerStatus() {};
|
virtual ~ServerStatus();
|
||||||
|
;
|
||||||
public slots:
|
public slots:
|
||||||
void updateStatusUI();
|
|
||||||
|
|
||||||
void updateStatusFailedUI();
|
|
||||||
|
|
||||||
void reloadStatus();
|
void reloadStatus();
|
||||||
void StatusChanged();
|
void StatusChanged(const QMap<QString, QString> statuses);
|
||||||
|
void StatusReloading(bool is_reloading);
|
||||||
|
|
||||||
private: /* methods */
|
private: /* methods */
|
||||||
clear();
|
void addLine();
|
||||||
addLine();
|
void addStatus(QString key, QString name);
|
||||||
addStatus(QString name, bool online);
|
void setStatus(QString key, bool value);
|
||||||
private: /* data */
|
private: /* data */
|
||||||
QHBoxLayout * layout = nullptr;
|
QHBoxLayout * layout = nullptr;
|
||||||
QToolButton *m_statusRefresh = nullptr;
|
QToolButton *m_statusRefresh = nullptr;
|
||||||
QPixmap goodIcon;
|
QMap<QString, IconLabel *> serverLabels;
|
||||||
QPixmap badIcon;
|
QIcon goodIcon;
|
||||||
QTimer statusTimer;
|
QIcon badIcon;
|
||||||
};
|
};
|
||||||
|
@ -27,6 +27,12 @@ StatusChecker::StatusChecker()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StatusChecker::timerEvent(QTimerEvent *e)
|
||||||
|
{
|
||||||
|
QObject::timerEvent(e);
|
||||||
|
reloadStatus();
|
||||||
|
}
|
||||||
|
|
||||||
void StatusChecker::reloadStatus()
|
void StatusChecker::reloadStatus()
|
||||||
{
|
{
|
||||||
if (isLoadingStatus())
|
if (isLoadingStatus())
|
||||||
@ -42,13 +48,14 @@ void StatusChecker::reloadStatus()
|
|||||||
QObject::connect(job, &NetJob::succeeded, this, &StatusChecker::statusDownloadFinished);
|
QObject::connect(job, &NetJob::succeeded, this, &StatusChecker::statusDownloadFinished);
|
||||||
QObject::connect(job, &NetJob::failed, this, &StatusChecker::statusDownloadFailed);
|
QObject::connect(job, &NetJob::failed, this, &StatusChecker::statusDownloadFailed);
|
||||||
m_statusNetJob.reset(job);
|
m_statusNetJob.reset(job);
|
||||||
|
emit statusLoading(true);
|
||||||
job->start();
|
job->start();
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatusChecker::statusDownloadFinished()
|
void StatusChecker::statusDownloadFinished()
|
||||||
{
|
{
|
||||||
QLOG_DEBUG() << "Finished loading status JSON.";
|
QLOG_DEBUG() << "Finished loading status JSON.";
|
||||||
|
m_statusEntries.clear();
|
||||||
QByteArray data;
|
QByteArray data;
|
||||||
{
|
{
|
||||||
ByteArrayDownloadPtr dl = std::dynamic_pointer_cast<ByteArrayDownload>(m_statusNetJob->first());
|
ByteArrayDownloadPtr dl = std::dynamic_pointer_cast<ByteArrayDownload>(m_statusNetJob->first());
|
||||||
@ -121,17 +128,27 @@ QString StatusChecker::getLastLoadErrorMsg() const
|
|||||||
|
|
||||||
void StatusChecker::succeed()
|
void StatusChecker::succeed()
|
||||||
{
|
{
|
||||||
|
if(m_prevEntries != m_statusEntries)
|
||||||
|
{
|
||||||
|
emit statusChanged(m_statusEntries);
|
||||||
|
m_prevEntries = m_statusEntries;
|
||||||
|
}
|
||||||
m_lastLoadError = "";
|
m_lastLoadError = "";
|
||||||
QLOG_DEBUG() << "Status loading succeeded.";
|
QLOG_DEBUG() << "Status loading succeeded.";
|
||||||
m_statusNetJob.reset();
|
m_statusNetJob.reset();
|
||||||
emit statusLoaded();
|
emit statusLoading(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatusChecker::fail(const QString& errorMsg)
|
void StatusChecker::fail(const QString& errorMsg)
|
||||||
{
|
{
|
||||||
|
if(m_prevEntries != m_statusEntries)
|
||||||
|
{
|
||||||
|
emit statusChanged(m_statusEntries);
|
||||||
|
m_prevEntries = m_statusEntries;
|
||||||
|
}
|
||||||
m_lastLoadError = errorMsg;
|
m_lastLoadError = errorMsg;
|
||||||
QLOG_DEBUG() << "Failed to load status:" << errorMsg;
|
QLOG_DEBUG() << "Failed to load status:" << errorMsg;
|
||||||
m_statusNetJob.reset();
|
m_statusNetJob.reset();
|
||||||
emit statusLoadingFailed(errorMsg);
|
emit statusLoading(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,26 +29,27 @@ public:
|
|||||||
|
|
||||||
QString getLastLoadErrorMsg() const;
|
QString getLastLoadErrorMsg() const;
|
||||||
|
|
||||||
bool isStatusLoaded() const;
|
|
||||||
|
|
||||||
bool isLoadingStatus() const;
|
bool isLoadingStatus() const;
|
||||||
|
|
||||||
QMap<QString, QString> getStatusEntries() const;
|
QMap<QString, QString> getStatusEntries() const;
|
||||||
|
|
||||||
void Q_SLOT reloadStatus();
|
void Q_SLOT reloadStatus();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void timerEvent(QTimerEvent *);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void statusLoaded();
|
void statusLoading(bool loading);
|
||||||
void statusLoadingFailed(QString errorMsg);
|
void statusChanged(QMap<QString, QString> newStatus);
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void statusDownloadFinished();
|
void statusDownloadFinished();
|
||||||
void statusDownloadFailed();
|
void statusDownloadFailed();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
QMap<QString, QString> m_prevEntries;
|
||||||
QMap<QString, QString> m_statusEntries;
|
QMap<QString, QString> m_statusEntries;
|
||||||
NetJobPtr m_statusNetJob;
|
NetJobPtr m_statusNetJob;
|
||||||
bool m_loadedStatus;
|
|
||||||
QString m_lastLoadError;
|
QString m_lastLoadError;
|
||||||
|
|
||||||
void Q_SLOT succeed();
|
void Q_SLOT succeed();
|
||||||
|
Loading…
Reference in New Issue
Block a user