There was a section of the Q train that was the D line?
Yes before 2001 the D train ran Brighton line local with the Q orange color being express.
When they shut down the 6th ave side of the Manhattan bridge and all the trains had to run through broadway the D/B terminated at 34th and the trains that ran by my house were the Yellow colored Q and Q diamond express.
The B was replaced by the W.
When they finished the repairs they brought the B/D back to Brooklyn but instead of putting the D back to its original local route they moved it to the West End line and then they kept the yellow Q local and made the B run express down Brighton.
Recap:
Before 2001
B - West end local
D - Brighton local
Q - orange color and Brighton express
Between 2001 and 2004
W (new) - replaces B at West End
Q - yellow pad replaces D Brighton local
Q diamond - yellow replaces Q orange Brighton express
After 2004
B - runs express via Brighton
D - runs local via West End
Q - remains colored yellow and runs local via Brighton
W - last stop Whitehall St local
The Manhattan Bridge construction had all these trains playing musical chairs.