I am reading on the Wigner function from the Gerry and Knight book. It defines it as: $$ W(q, p) \equiv \frac{1}{2 \pi \hbar} \int_{-\infty}^{\infty}\left\langle q+\frac{1}{2} x|\hat{\rho}| q-\frac{1}{2} x\right\rangle e^{i p x / \hbar} d x $$
and then shows that :
$$ \begin{aligned} \int_{-\infty}^{\infty} W(q, p) d p & =\frac{1}{2 \pi \hbar} \int_{-\infty}^{\infty} \psi^*\left(q-\frac{1}{2} x\right) \psi\left(q+\frac{1}{2} x\right) \int_{-\infty}^{\infty} e^{i p x / \hbar} d p d x \\ & =\int_{-\infty}^{\infty} \psi^*\left(q-\frac{1}{2} x\right) \psi\left(q+\frac{1}{2} x\right) \delta(x) d x \\ & =|\psi(q)|^2 \end{aligned} $$
but omits the calculation for the momentum counterpart.
I was attempting this but I couldn't transform the position wave function into the momentum wave functions without it getting too messy. Can anyone give me the idea of outline of how to do it? I've tried using Fourier transform and integrating to find the delta function but I get stuck at some point or another. Thanks a lot