source: src/UIElements/TextUI/TextDialog.cpp@ 88bb6b

Last change on this file since 88bb6b was f130d4, checked in by Frederik Heber <heber@…>, 12 years ago

Qt's labels now show description as tool text.

  • had to streamline signature of all ..Dialogs.
  • changed Qt's Querys to set the tooltip from the now obtained description.
  • Property mode set to 100644
File size: 5.6 KB
Line 
1/*
2 * Project: MoleCuilder
3 * Description: creates and alters molecular systems
4 * Copyright (C) 2010-2012 University of Bonn. All rights reserved.
5 *
6 *
7 * This file is part of MoleCuilder.
8 *
9 * MoleCuilder is free software: you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * MoleCuilder is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with MoleCuilder. If not, see <http://www.gnu.org/licenses/>.
21 */
22
23/*
24 * TextDialog.cpp
25 *
26 * Created on: Jan 5, 2010
27 * Author: crueger
28 */
29
30// include config.h
31#ifdef HAVE_CONFIG_H
32#include <config.h>
33#endif
34
35#include "CodePatterns/MemDebug.hpp"
36
37#include "TextUI/TextDialog.hpp"
38#include "TextUI/Query/TextQuery.hpp"
39
40using namespace std;
41
42
43TextDialog::TextDialog()
44{
45}
46
47TextDialog::~TextDialog()
48{
49}
50
51void TextDialog::queryEmpty(const std::string title, const std::string description){
52 registerQuery(new EmptyTextQuery(title,description));
53}
54
55void TextDialog::queryBoolean(Parameter<bool> &_param, const std::string title, const std::string description){
56 registerQuery(new BooleanTextQuery(_param, title,description));
57}
58
59void TextDialog::queryInt(Parameter<int> &_param, const std::string title, const std::string description){
60 registerQuery(new IntTextQuery(_param, title,description));
61}
62
63void TextDialog::queryInts(Parameter<std::vector<int> > &_param, const std::string title, const std::string description){
64 registerQuery(new IntsTextQuery(_param, title,description));
65}
66
67void TextDialog::queryUnsignedInt(Parameter<unsigned int> &_param, const std::string title, const std::string description){
68 registerQuery(new UnsignedIntTextQuery(_param, title,description));
69}
70
71void TextDialog::queryUnsignedInts(Parameter<std::vector<unsigned int> > &_param, const std::string title, const std::string description){
72 registerQuery(new UnsignedIntsTextQuery(_param, title,description));
73}
74
75void TextDialog::queryDouble(Parameter<double> &_param, const std::string title, const std::string description){
76 registerQuery(new DoubleTextQuery(_param, title,description));
77}
78
79void TextDialog::queryDoubles(Parameter<std::vector<double> > &_param, const std::string title, const std::string description){
80 registerQuery(new DoublesTextQuery(_param, title,description));
81}
82
83void TextDialog::queryString(Parameter<std::string> &_param, const std::string title, const std::string description){
84 registerQuery(new StringTextQuery(_param, title,description));
85}
86
87void TextDialog::queryStrings(Parameter<std::vector<std::string> > &_param, const std::string title, const std::string description){
88 registerQuery(new StringsTextQuery(_param, title,description));
89}
90
91void TextDialog::queryAtom(Parameter<const atom *> &_param, const std::string title, const std::string description) {
92 registerQuery(new AtomTextQuery(_param, title,description));
93}
94
95void TextDialog::queryAtoms(Parameter<std::vector<const atom *> > &_param, const std::string title, const std::string description) {
96 registerQuery(new AtomsTextQuery(_param, title,description));
97}
98
99void TextDialog::queryMolecule(Parameter<const molecule *> &_param, const std::string title, const std::string description) {
100 registerQuery(new MoleculeTextQuery(_param, title,description));
101}
102
103void TextDialog::queryMolecules(Parameter<std::vector<const molecule *> > &_param, const std::string title, const std::string description) {
104 registerQuery(new MoleculesTextQuery(_param, title,description));
105}
106
107void TextDialog::queryVector(Parameter<Vector> &_param, const std::string title, const std::string description) {
108 registerQuery(new VectorTextQuery(_param, title,description));
109}
110
111void TextDialog::queryVectors(Parameter<std::vector<Vector> > &_param, const std::string title, const std::string description) {
112 registerQuery(new VectorsTextQuery(_param, title,description));
113}
114
115void TextDialog::queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &_param, const std::string title, const std::string description) {
116 registerQuery(new RealSpaceMatrixTextQuery(_param, title,description));
117}
118
119void TextDialog::queryElement(Parameter<const element *> &_param, const std::string title, const std::string description){
120 registerQuery(new ElementTextQuery(_param, title,description));
121}
122
123void TextDialog::queryElements(Parameter<std::vector<const element *> > &_param, const std::string title, const std::string description){
124 registerQuery(new ElementsTextQuery(_param, title,description));
125}
126
127void TextDialog::queryFile(Parameter<boost::filesystem::path> &_param, const std::string title, const std::string description){
128 registerQuery(new FileTextQuery(_param, title,description));
129}
130
131void TextDialog::queryFiles(Parameter<std::vector< boost::filesystem::path> > &_param, const std::string title, const std::string description){
132 registerQuery(new FilesTextQuery(_param, title,description));
133}
134
135void TextDialog::queryRandomNumberDistribution_Parameters(Parameter<RandomNumberDistribution_Parameters> &_param, const std::string title, const std::string description){
136 registerQuery(new RandomNumberDistribution_ParametersTextQuery(_param, title,description));
137}
138
139
140/************************** Query Infrastructure ************************/
141/* ---> shifted to folder Query */
142/************************************************************************/
143
Note: See TracBrowser for help on using the repository browser.