/* * 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. */ /* * FileQtQuery.cpp * * Created on: Oct 25, 2010 * Author: heber */ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "CodePatterns/MemDebug.hpp" #include "UIElements/Qt4/Query/QtQuery.hpp" #include "UIElements/Qt4/Pipe/FileQtQueryPipe.hpp" QtDialog::FileQtQuery::FileQtQuery(Parameter ¶m, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) : Dialog::FileQuery(param, _title), parent(_parent) { filenameLineEdit = new QLineEdit(_dialog); filenameLineEdit->setText(QString()); filenameLineEdit->setReadOnly(true); filenameLabel = new QLabel(QString("Input file:")); filenameLabel->setBuddy(filenameLineEdit); filedialogButton = new QPushButton("&Choose", _dialog); pipe = new FileQtQueryPipe(tmp,_dialog,filenameLineEdit,filedialogButton); thisLayout = new QHBoxLayout(); parent->addLayout(thisLayout); thisLayout->addWidget(filenameLabel); thisLayout->addWidget(filenameLineEdit); thisLayout->addWidget(filedialogButton); QObject::connect(filedialogButton,SIGNAL(clicked()),pipe,SLOT(showFileDialog())); } QtDialog::FileQtQuery::~FileQtQuery() { delete pipe; } bool QtDialog::FileQtQuery::handle(){ return true; }