C++ Qt Project, Memento pattern