[0275ad] | 1 | /*
|
---|
| 2 | * Project: MoleCuilder
|
---|
| 3 | * Description: creates and alters molecular systems
|
---|
[0aa122] | 4 | * Copyright (C) 2010-2012 University of Bonn. All rights reserved.
|
---|
[0275ad] | 5 | * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
|
---|
| 6 | */
|
---|
| 7 |
|
---|
| 8 | /*
|
---|
| 9 | * RandomNumberDistribution_ParametersQtQuery.cpp
|
---|
| 10 | *
|
---|
| 11 | * Created on: Jan 06, 2011
|
---|
| 12 | * Author: heber
|
---|
| 13 | */
|
---|
| 14 |
|
---|
| 15 | // include config.h
|
---|
| 16 | #ifdef HAVE_CONFIG_H
|
---|
| 17 | #include <config.h>
|
---|
| 18 | #endif
|
---|
| 19 |
|
---|
| 20 | #include <Qt/qboxlayout.h>
|
---|
| 21 | #include <Qt/qpushbutton.h>
|
---|
| 22 | #include <Qt/qtextedit.h>
|
---|
| 23 | #include <Qt/qlabel.h>
|
---|
| 24 |
|
---|
| 25 | #include "CodePatterns/MemDebug.hpp"
|
---|
| 26 |
|
---|
| 27 | #include "UIElements/Qt4/Query/QtQuery.hpp"
|
---|
| 28 | #include "UIElements/Qt4/Pipe/RandomNumberDistribution_ParametersQtQueryPipe.hpp"
|
---|
| 29 |
|
---|
[6f0841] | 30 | #include "Atom/atom.hpp"
|
---|
[0275ad] | 31 | #include "World.hpp"
|
---|
| 32 |
|
---|
[955b91] | 33 | QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
|
---|
[0275ad] | 34 | Dialog::RandomNumberDistribution_ParametersQuery(_title),
|
---|
| 35 | parent(_parent)
|
---|
| 36 | {
|
---|
| 37 | thisLayout = new QHBoxLayout();
|
---|
| 38 | titleLabel = new QLabel(QString(getTitle().c_str()));
|
---|
| 39 |
|
---|
| 40 | // inputBox->insertItem(-1, QString("no distribution"));
|
---|
| 41 | // for (std::vector<distribution *>::const_iterator iter = distribution(); iter != distribution.end(); ++iter)
|
---|
| 42 | // inputBox->insertItem((*iter)->getNr(),QString::fromStdString((*iter)->getName()));
|
---|
| 43 |
|
---|
| 44 | inputBox = new QTextEdit();
|
---|
| 45 |
|
---|
| 46 | parent->addLayout(thisLayout);
|
---|
| 47 | thisLayout->addWidget(titleLabel);
|
---|
| 48 | thisLayout->addWidget(inputBox);
|
---|
| 49 |
|
---|
| 50 | okButton = new QPushButton(tr("Ok"));
|
---|
| 51 |
|
---|
| 52 | pipe = new RandomNumberDistribution_ParametersQtQueryPipe(&tmp,_dialog, inputBox);
|
---|
| 53 | connect(okButton,SIGNAL(clicked()),pipe,SLOT(update()));
|
---|
| 54 | }
|
---|
| 55 |
|
---|
| 56 | QtDialog::RandomNumberDistribution_ParametersQtQuery::~RandomNumberDistribution_ParametersQtQuery()
|
---|
| 57 | {
|
---|
| 58 | delete pipe;
|
---|
| 59 | }
|
---|
| 60 |
|
---|
| 61 | bool QtDialog::RandomNumberDistribution_ParametersQtQuery::handle() {
|
---|
| 62 | return true;
|
---|
| 63 | }
|
---|
| 64 |
|
---|
| 65 |
|
---|