#include "synchronisable.h"

Synchronisable::Synchronisable(int cpt, QObject *parent)
    : QObject{parent},
    m_cpt{cpt}
{}

int Synchronisable::cpt() const
{
    return m_cpt;
}

void Synchronisable::setCpt(int newCpt)
{
    if (m_cpt == newCpt)
        return;
    m_cpt = newCpt;
    emit cptChanged(m_cpt);
}

void Synchronisable::inc()
{
    setCpt(m_cpt+1);
}
