28 lines
780 B
C++
28 lines
780 B
C++
#ifndef TRAYSERVICE_H
|
|
#define TRAYSERVICE_H
|
|
|
|
#include "../models/tray.h"
|
|
|
|
#include <QList>
|
|
|
|
class TrayService
|
|
{
|
|
public:
|
|
static TrayService &instance();
|
|
|
|
QList<Tray> listTrays(QString *error = nullptr);
|
|
QList<TraySlot> listSlots(int trayId, QString *error = nullptr);
|
|
bool initializeTrayGrid(int trayId, QString *error = nullptr);
|
|
bool initializeAllTrayGrids(QString *error = nullptr);
|
|
bool ensureAllTrayGrids(QString *error = nullptr);
|
|
bool findFirstEmptySlot(int trayId, TraySlot *slot, QString *error = nullptr);
|
|
bool refreshTrayStats(int trayId, QString *error = nullptr);
|
|
|
|
private:
|
|
TrayService() = default;
|
|
TrayService(const TrayService &) = delete;
|
|
TrayService &operator=(const TrayService &) = delete;
|
|
};
|
|
|
|
#endif // TRAYSERVICE_H
|