/* * 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. */ /* * VectorsQtQuery.cpp * * Created on: Oct 25, 2010 * Author: heber */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "CodePatterns/MemDebug.hpp" #include "UIElements/Qt4/Query/QtQuery.hpp" #include "UIElements/Qt4/Query/QtQueryList.hpp" QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : QtQuery >(_param, _title), QtQueryList(_parent, _dialog, temp) { ListQuerySubDialog *subDialog = new ListQuerySubDialog(this); subQuery = new VectorQtQuery(*subParam, _title, thisVLayout, subDialog); subDialog->setSubQuery(subQuery); connect(inputList,SIGNAL(itemSelectionChanged()),this,SLOT(onElementSelected())); connect(addButton,SIGNAL(clicked()),this,SLOT(onAddElement())); connect(removeButton,SIGNAL(clicked()),this,SLOT(onRemoveElement())); } QtDialog::VectorsQtQuery::~VectorsQtQuery() { delete(subQuery); } void QtDialog::VectorsQtQuery::onSubUpdate() { addButton->setEnabled(subParam->isSet()); } void QtDialog::VectorsQtQuery::onElementSelected() { elementSelected(); } void QtDialog::VectorsQtQuery::onAddElement() { addElement(); } void QtDialog::VectorsQtQuery::onRemoveElement() { removeElements(); }