PieceUnit and PieceUnitFactory created

I created these two classes. The first is an instance of the qml representation and the second a factory class as the name suggests. The code doesn't compile though... It's complaining in the constructor of the factory, so I must be doing something wrong there.