| [bcf653] | 1 | /*
 | 
|---|
 | 2 |  * Project: MoleCuilder
 | 
|---|
 | 3 |  * Description: creates and alters molecular systems
 | 
|---|
 | 4 |  * Copyright (C)  2010 University of Bonn. All rights reserved.
 | 
|---|
 | 5 |  * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
 | 
|---|
 | 6 |  */
 | 
|---|
 | 7 | 
 | 
|---|
| [a2ab15] | 8 | /*
 | 
|---|
 | 9 |  * CommandLineDialog.cpp
 | 
|---|
 | 10 |  *
 | 
|---|
 | 11 |  *  Created on: May 8, 2010
 | 
|---|
 | 12 |  *      Author: heber
 | 
|---|
 | 13 |  */
 | 
|---|
 | 14 | 
 | 
|---|
| [bf3817] | 15 | // include config.h
 | 
|---|
 | 16 | #ifdef HAVE_CONFIG_H
 | 
|---|
 | 17 | #include <config.h>
 | 
|---|
 | 18 | #endif
 | 
|---|
 | 19 | 
 | 
|---|
| [112b09] | 20 | #include "Helpers/MemDebug.hpp"
 | 
|---|
| [a2ab15] | 21 | 
 | 
|---|
| [5079a0] | 22 | #include "CommandLineUI/CommandLineDialog.hpp"
 | 
|---|
| [a2ab15] | 23 | 
 | 
|---|
| [97ebf8] | 24 | 
 | 
|---|
| [a2ab15] | 25 | using namespace std;
 | 
|---|
 | 26 | 
 | 
|---|
 | 27 | 
 | 
|---|
 | 28 | CommandLineDialog::CommandLineDialog()
 | 
|---|
 | 29 | {
 | 
|---|
 | 30 | }
 | 
|---|
 | 31 | 
 | 
|---|
 | 32 | CommandLineDialog::~CommandLineDialog()
 | 
|---|
 | 33 | {
 | 
|---|
 | 34 | }
 | 
|---|
 | 35 | 
 | 
|---|
 | 36 | 
 | 
|---|
| [86466e] | 37 | void CommandLineDialog::queryEmpty(const char* title, string _description){
 | 
|---|
 | 38 |   registerQuery(new EmptyCommandLineQuery(title, _description));
 | 
|---|
| [a2ab15] | 39 | }
 | 
|---|
 | 40 | 
 | 
|---|
| [75dc28] | 41 | void CommandLineDialog::queryInt(const char* title, string _description){
 | 
|---|
 | 42 |   registerQuery(new IntCommandLineQuery(title, _description));
 | 
|---|
| [a2ab15] | 43 | }
 | 
|---|
 | 44 | 
 | 
|---|
| [7cd6e7] | 45 | void CommandLineDialog::queryInts(const char* title, string _description){
 | 
|---|
 | 46 |   registerQuery(new IntsCommandLineQuery(title, _description));
 | 
|---|
 | 47 | }
 | 
|---|
 | 48 | 
 | 
|---|
| [75dc28] | 49 | void CommandLineDialog::queryBoolean(const char* title, string _description){
 | 
|---|
 | 50 |   registerQuery(new BooleanCommandLineQuery(title, _description));
 | 
|---|
| [97ebf8] | 51 | }
 | 
|---|
 | 52 | 
 | 
|---|
| [75dc28] | 53 | void CommandLineDialog::queryDouble(const char* title, string _description){
 | 
|---|
 | 54 |   registerQuery(new DoubleCommandLineQuery(title, _description));
 | 
|---|
| [a2ab15] | 55 | }
 | 
|---|
 | 56 | 
 | 
|---|
| [7cd6e7] | 57 | void CommandLineDialog::queryDoubles(const char* title, string _description){
 | 
|---|
 | 58 |   registerQuery(new DoublesCommandLineQuery(title, _description));
 | 
|---|
 | 59 | }
 | 
|---|
 | 60 | 
 | 
|---|
| [75dc28] | 61 | void CommandLineDialog::queryString(const char* title, string _description){
 | 
|---|
 | 62 |   registerQuery(new StringCommandLineQuery(title, _description));
 | 
|---|
| [a2ab15] | 63 | }
 | 
|---|
 | 64 | 
 | 
|---|
| [75dc28] | 65 | void CommandLineDialog::queryStrings(const char* title, string _description){
 | 
|---|
 | 66 |   registerQuery(new StringsCommandLineQuery(title, _description));
 | 
|---|
| [cd8e55] | 67 | }
 | 
|---|
 | 68 | 
 | 
|---|
| [75dc28] | 69 | void CommandLineDialog::queryAtom(const char* title, string _description) {
 | 
|---|
 | 70 |   registerQuery(new AtomCommandLineQuery(title, _description));
 | 
|---|
| [97ebf8] | 71 | }
 | 
|---|
 | 72 | 
 | 
|---|
| [7cd6e7] | 73 | void CommandLineDialog::queryAtoms(const char* title, string _description) {
 | 
|---|
 | 74 |   registerQuery(new AtomsCommandLineQuery(title, _description));
 | 
|---|
 | 75 | }
 | 
|---|
 | 76 | 
 | 
|---|
| [75dc28] | 77 | void CommandLineDialog::queryMolecule(const char* title, string _description) {
 | 
|---|
 | 78 |   registerQuery(new MoleculeCommandLineQuery(title, _description));
 | 
|---|
| [a2ab15] | 79 | }
 | 
|---|
 | 80 | 
 | 
|---|
| [7cd6e7] | 81 | void CommandLineDialog::queryMolecules(const char* title, string _description) {
 | 
|---|
 | 82 |   registerQuery(new MoleculesCommandLineQuery(title, _description));
 | 
|---|
 | 83 | }
 | 
|---|
 | 84 | 
 | 
|---|
| [75dc28] | 85 | void CommandLineDialog::queryVector(const char* title, bool check, string _description) {
 | 
|---|
 | 86 |   registerQuery(new VectorCommandLineQuery(title,check, _description));
 | 
|---|
| [86466e] | 87 | }
 | 
|---|
 | 88 | 
 | 
|---|
| [7cd6e7] | 89 | void CommandLineDialog::queryVectors(const char* title, bool check, string _description) {
 | 
|---|
 | 90 |   registerQuery(new VectorsCommandLineQuery(title,check, _description));
 | 
|---|
 | 91 | }
 | 
|---|
 | 92 | 
 | 
|---|
| [75dc28] | 93 | void CommandLineDialog::queryBox(const char* title, string _description) {
 | 
|---|
 | 94 |   registerQuery(new BoxCommandLineQuery(title,_description));
 | 
|---|
| [97ebf8] | 95 | }
 | 
|---|
 | 96 | 
 | 
|---|
| [75dc28] | 97 | void CommandLineDialog::queryElement(const char* title, string _description){
 | 
|---|
 | 98 |   registerQuery(new ElementCommandLineQuery(title, _description));
 | 
|---|
| [a2ab15] | 99 | }
 | 
|---|
 | 100 | 
 | 
|---|
| [7cd6e7] | 101 | void CommandLineDialog::queryElements(const char* title, string _description){
 | 
|---|
 | 102 |   registerQuery(new ElementsCommandLineQuery(title, _description));
 | 
|---|
 | 103 | }
 | 
|---|
 | 104 | 
 | 
|---|
| [6f5dfe] | 105 | void CommandLineDialog::queryFile(const char* title, string _description){
 | 
|---|
 | 106 |   registerQuery(new FileCommandLineQuery(title, _description));
 | 
|---|
 | 107 | }
 | 
|---|
 | 108 | 
 | 
|---|
| [a2ab15] | 109 | /************************** Query Infrastructure ************************/
 | 
|---|
| [8df74d] | 110 | /*       ---> shifted to folder Query                                   */
 | 
|---|
 | 111 | /************************************************************************/
 | 
|---|