2021-11-28 20:49:05 +01:00
|
|
|
#ifndef QT_MACHINESTATUS_HPP
|
|
|
|
|
#define QT_MACHINESTATUS_HPP
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
2021-11-30 22:06:41 +01:00
|
|
|
class QStatusBar;
|
2021-11-28 20:49:05 +01:00
|
|
|
|
2021-11-30 22:06:41 +01:00
|
|
|
class MachineStatus : public QObject
|
2021-11-28 20:49:05 +01:00
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
public:
|
2021-11-30 22:06:41 +01:00
|
|
|
explicit MachineStatus(QObject *parent = nullptr);
|
2021-11-28 20:49:05 +01:00
|
|
|
~MachineStatus();
|
|
|
|
|
|
2021-12-03 11:38:00 +01:00
|
|
|
static bool hasCassette();
|
|
|
|
|
static bool hasCartridge();
|
|
|
|
|
static bool hasIDE();
|
|
|
|
|
static bool hasSCSI();
|
|
|
|
|
static void iterateFDD(const std::function<void(int i)>& cb);
|
|
|
|
|
static void iterateCDROM(const std::function<void(int i)>& cb);
|
|
|
|
|
static void iterateZIP(const std::function<void(int i)>& cb);
|
|
|
|
|
static void iterateMO(const std::function<void(int i)>& cb);
|
2021-11-28 20:49:05 +01:00
|
|
|
public slots:
|
2021-11-30 22:06:41 +01:00
|
|
|
void refresh(QStatusBar* sbar);
|
2021-11-28 20:49:05 +01:00
|
|
|
void setActivity(int tag, bool active);
|
|
|
|
|
void setEmpty(int tag, bool active);
|
2021-12-03 11:38:00 +01:00
|
|
|
void message(const QString& msg);
|
2021-11-28 20:49:05 +01:00
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
struct States;
|
|
|
|
|
std::unique_ptr<States> d;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // QT_MACHINESTATUS_HPP
|