Regardless of whether or not the move is a checkmate, Qxd7 is definitely legal.
As I recall, it is still checkmate. After Qxd7, the Black king still can't move to a valid square, so it's checkmate. White not being able to "capture" the king without putting his own king in danger is irrelevant.
One way I look at it is to ask what would happen in bughouse. Looking at it from that perspective, Black's king would be captured before the Black queen can capture the White king, so White wins.
Ok so my queston is can white queen checkmate the king? If white queen moves from f7 to d7 she will put the king in checkmate (maybe). However, at that point black king has only one move which is to take white queen.
If black king captures white queen he will have moved into check by way of white rook(d2). Any king moving into check I understand is not allowed. But the problem at this point is that white rook(d2) can not capture black king now(d7) because if rook moves from his square he places his own white king(e1) in check by means of black queen(b4).
Is the original move by white queen to (d7) legal? what is the outcome?