Topological quantum field theory in quaternionic geometry