/* * Project: MoleCuilder * Description: creates and alters molecular systems * Copyright (C) 2010 University of Bonn. All rights reserved. * Please see the LICENSE file or "Copyright notice" in builder.cpp for details. */ /* * IntQtQuery.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/Pipe/IntQtQueryPipe.hpp" QtDialog::IntQtQuery::IntQtQuery(string _title,QBoxLayout *_parent,QtDialog *_dialog) : Dialog::IntQuery(_title), parent(_parent) { thisLayout = new QHBoxLayout(); titleLabel = new QLabel(QString(getTitle().c_str())); inputBox = new QSpinBox(); inputBox->setValue(0); parent->addLayout(thisLayout); thisLayout->addWidget(titleLabel); thisLayout->addWidget(inputBox); pipe = new IntQtQueryPipe(&tmp,_dialog); pipe->update(inputBox->value()); connect(inputBox,SIGNAL(valueChanged(int)),pipe,SLOT(update(int))); } QtDialog::IntQtQuery::~IntQtQuery() { delete pipe; } bool QtDialog::IntQtQuery::handle() { return true; }