As far as the virtual printer goes, I can help you there.
Open up the KDE Control Centre, and select Peripherals, then Printers.
Click the Add menu, and then select "Add special (pseudo) printer" and the rest is pretty straightforward -- you give it a name, description and location just like usual, and then you choose a command to give it.
But as far as the printer driver development goes, I'm not sure. You may want to check Linuxprinting.org for more information. If your barcode printer supports some form of Postscript, then you may be in luck. But that's all I know.