/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010-2012 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /* * QtToolBar.cpp * * Created on: Apr 26, 2012 * Author: ankele */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include "QtToolBar.hpp" #include "CodePatterns/MemDebug.hpp" QtToolBar::QtToolBar(QWidget * _parent) : QToolBar(_parent) { addActionItem("undo", "undo", "edit-undo"); addActionItem("redo", "redo", "edit-redo"); } QtToolBar::~QtToolBar() { } void QtToolBar::addActionItem(const std::string &token, const std::string &description, const std::string &icon_name) { QAction *action = addAction(QString(description.c_str())); action->setIcon(QIcon::fromTheme(QString(icon_name.c_str()))); QtMenuPipe *pipe = new QtMenuPipe(token,action); QObject::connect(action, SIGNAL(triggered()),pipe,SLOT(called())); plumbing.push_back(pipe); }