How to derive Q from r in this filter definition?
I'll give you one quick answer (without proofs).

If your mapping from $s$ to $z$ is the Bilinear Transform, then

$$ Q = \frac{\sin(2 \pi f_0 T)}{2} \frac{1 + r^2}{1 - r^2} $$

If it's Impulse Invariant, I think it's

$$ Q = -\frac{\pi f_0 T}{\ln(r)} = -\frac{2 \pi f_0 T}{\ln(r^2)} $$

For high $Q$ and reasonably low $f_0 T$, the two expressions come out nearly equal.