Quantum curves and q-deformed Painlevé equations