#pragma once
#include <QObject>
#include <QString>
#include <QVector>

class InkCanvas;

// Screen-mode experiment harness. On a timer it cycles through (screenMode,
// contentType, flags) combinations: for each, it redraws a fixed test pattern
// and then calls EPFramebuffer::swapBuffers on the test region with those
// parameters. The current combination is shown on screen (status), so we can
// see which combination renders the strokes SOLID rather than dashed.
class Experiment : public QObject {
    Q_OBJECT
    Q_PROPERTY(QString status READ status NOTIFY statusChanged)
public:
    explicit Experiment(QObject *parent = nullptr);

    QString status() const { return m_status; }
    void setCanvas(InkCanvas *c) { m_canvas = c; }
    void start();

signals:
    void statusChanged();

private:
    void tick();

    InkCanvas *m_canvas = nullptr;
    QString m_status;
    int m_idx = -1;
    struct Combo { int sm; int ct; int flags; };
    QVector<Combo> m_combos;
};
