/* * 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. */ /* * IntsQtQuery.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::IntsQtQuery::IntsQtQuery(Parameter > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) : QtQuery >(_param, _title), QtQueryList(_parent, _dialog, temp) { ListQuerySubDialog *subDialog = new ListQuerySubDialog(this); subQuery = new IntQtQuery(*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::IntsQtQuery::~IntsQtQuery() { delete(subQuery); } void QtDialog::IntsQtQuery::onSubUpdate() { addButton->setEnabled(subParam->isSet()); } void QtDialog::IntsQtQuery::onElementSelected() { elementSelected(); } void QtDialog::IntsQtQuery::onAddElement() { addElement(); } void QtDialog::IntsQtQuery::onRemoveElement() { removeElements(); }