I would first take her to the vet to rule out a medical issue. If that isn't the case..perhaps she is only responding to the changes that are occuring in the house. Animals are so perceptive of changes in their enviroment and maybe she is noticing things are different with you and she is becoming terriorial??
Shes most likely sensing the pregnancy.. and having a behavioral issue ecause of it.. or it could be an medical issue.. but either way she should be taken to a vet. Spaying her will greatly reduce the risk of her spraying.
I used to have a female cat who would get weird with me when I was pregnant, both my pregnancies she didn't want too much to do with me, unless I was giving her food. When I delivered, she was okay again. And she was spayed.