Changeset 4cf323d for src/UIElements/Qt4


Ignore:
Timestamp:
Oct 25, 2010, 12:08:39 PM (14 years ago)
Author:
Frederik Heber <heber@…>
Branches:
Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, Combining_Subpackages, Debian_Package_split, Debian_package_split_molecuildergui_only, Disabling_MemDebug, Docu_Python_wait, EmpiricalPotential_contain_HomologyGraph, EmpiricalPotential_contain_HomologyGraph_documentation, Enable_parallel_make_install, Enhance_userguide, Enhanced_StructuralOptimization, Enhanced_StructuralOptimization_continued, Example_ManyWaysToTranslateAtom, Exclude_Hydrogens_annealWithBondGraph, FitPartialCharges_GlobalError, Fix_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
Children:
379b7e, 9784cf
Parents:
81126a
Message:

Renamed QT -> Qt in files, dirs, and class names.

Location:
src/UIElements/Qt4
Files:
8 moved

Legend:

Unmodified
Added
Removed
  • src/UIElements/Qt4/QtDialog.cpp

    r81126a r4cf323d  
    77
    88/*
    9  * QTDialog.cpp
     9 * QtDialog.cpp
    1010 *
    1111 *  Created on: Jan 18, 2010
     
    1818#endif
    1919
    20 #include "UIElements/QT4/QTDialog.hpp"
     20#include "UIElements/Qt4/QtDialog.hpp"
    2121
    2222#include <boost/lexical_cast.hpp>
     
    5454using namespace std;
    5555
    56 QTDialog::QTDialog() :
     56QtDialog::QtDialog() :
    5757    QDialog(0)
    5858{
     
    7575}
    7676
    77 QTDialog::~QTDialog()
    78 {
    79 }
    80 
    81 bool QTDialog::display(){
     77QtDialog::~QtDialog()
     78{
     79}
     80
     81bool QtDialog::display(){
    8282  // Button state might have changed by some update that
    8383  // was done during query construction. To make sure
     
    9393}
    9494
    95 void QTDialog::update(){
     95void QtDialog::update(){
    9696  buttons->button(QDialogButtonBox::Ok)->setEnabled(checkAll());
    9797}
     
    9999/************************** Query Infrastructure ************************/
    100100
    101 void QTDialog::queryEmpty(const char* title, std::string)
    102 {
    103   registerQuery(new EmptyQTQuery(title,inputLayout,this));
    104 }
    105 
    106 void QTDialog::queryBoolean(const char* title,string)
    107 {
    108   registerQuery(new BooleanQTQuery(title,inputLayout,this));
    109 }
    110 
    111 void QTDialog::queryAtom(const char* title, std::string)
    112 {
    113   registerQuery(new AtomQTQuery(title,inputLayout,this));
    114 }
    115 
    116 void QTDialog::queryAtoms(const char* title, std::string)
    117 {
    118   registerQuery(new AtomsQTQuery(title,inputLayout,this));
    119 }
    120 
    121 void QTDialog::queryBox(const char* title, std::string)
    122 {
    123   registerQuery(new BoxQTQuery(title,inputLayout,this));
    124 }
    125 
    126 void QTDialog::queryInt(const char *title,string)
    127 {
    128   registerQuery(new IntQTQuery(title,inputLayout,this));
    129 }
    130 
    131 void QTDialog::queryInts(const char *title,string)
    132 {
    133   registerQuery(new IntsQTQuery(title,inputLayout,this));
    134 }
    135 
    136 void QTDialog::queryDouble(const char* title,string)
    137 {
    138   registerQuery(new DoubleQTQuery(title,inputLayout,this));
    139 }
    140 
    141 void QTDialog::queryDoubles(const char* title,string)
    142 {
    143   registerQuery(new DoublesQTQuery(title,inputLayout,this));
    144 }
    145 
    146 void QTDialog::queryString(const char* title,string)
    147 {
    148   registerQuery(new StringQTQuery(title,inputLayout,this));
    149 }
    150 
    151 void QTDialog::queryStrings(const char* title,string)
    152 {
    153   registerQuery(new StringsQTQuery(title,inputLayout,this));
    154 }
    155 
    156 void QTDialog::queryMolecule(const char *title,string)
    157 {
    158   registerQuery(new MoleculeQTQuery(title,inputLayout,this));
    159 }
    160 
    161 void QTDialog::queryMolecules(const char *title,string)
    162 {
    163   registerQuery(new MoleculesQTQuery(title,inputLayout,this));
    164 }
    165 
    166 void QTDialog::queryVector(const char* title, bool check,string)
    167 {
    168   registerQuery(new VectorQTQuery(title,check,inputLayout,this));
    169 }
    170 
    171 void QTDialog::queryVectors(const char* title, bool check,string)
    172 {
    173   registerQuery(new VectorsQTQuery(title,check,inputLayout,this));
    174 }
    175 
    176 void QTDialog::queryElement(const char* title, std::string)
    177 {
    178   registerQuery(new ElementQTQuery(title,inputLayout,this));
    179 }
    180 
    181 void QTDialog::queryElements(const char* title, std::string)
    182 {
    183   registerQuery(new ElementsQTQuery(title,inputLayout,this));
    184 }
    185 
    186 void QTDialog::queryFile(const char* title, std::string)
    187 {
    188   registerQuery(new FileQTQuery(title,inputLayout,this));
     101void QtDialog::queryEmpty(const char* title, std::string)
     102{
     103  registerQuery(new EmptyQtQuery(title,inputLayout,this));
     104}
     105
     106void QtDialog::queryBoolean(const char* title,string)
     107{
     108  registerQuery(new BooleanQtQuery(title,inputLayout,this));
     109}
     110
     111void QtDialog::queryAtom(const char* title, std::string)
     112{
     113  registerQuery(new AtomQtQuery(title,inputLayout,this));
     114}
     115
     116void QtDialog::queryAtoms(const char* title, std::string)
     117{
     118  registerQuery(new AtomsQtQuery(title,inputLayout,this));
     119}
     120
     121void QtDialog::queryBox(const char* title, std::string)
     122{
     123  registerQuery(new BoxQtQuery(title,inputLayout,this));
     124}
     125
     126void QtDialog::queryInt(const char *title,string)
     127{
     128  registerQuery(new IntQtQuery(title,inputLayout,this));
     129}
     130
     131void QtDialog::queryInts(const char *title,string)
     132{
     133  registerQuery(new IntsQtQuery(title,inputLayout,this));
     134}
     135
     136void QtDialog::queryDouble(const char* title,string)
     137{
     138  registerQuery(new DoubleQtQuery(title,inputLayout,this));
     139}
     140
     141void QtDialog::queryDoubles(const char* title,string)
     142{
     143  registerQuery(new DoublesQtQuery(title,inputLayout,this));
     144}
     145
     146void QtDialog::queryString(const char* title,string)
     147{
     148  registerQuery(new StringQtQuery(title,inputLayout,this));
     149}
     150
     151void QtDialog::queryStrings(const char* title,string)
     152{
     153  registerQuery(new StringsQtQuery(title,inputLayout,this));
     154}
     155
     156void QtDialog::queryMolecule(const char *title,string)
     157{
     158  registerQuery(new MoleculeQtQuery(title,inputLayout,this));
     159}
     160
     161void QtDialog::queryMolecules(const char *title,string)
     162{
     163  registerQuery(new MoleculesQtQuery(title,inputLayout,this));
     164}
     165
     166void QtDialog::queryVector(const char* title, bool check,string)
     167{
     168  registerQuery(new VectorQtQuery(title,check,inputLayout,this));
     169}
     170
     171void QtDialog::queryVectors(const char* title, bool check,string)
     172{
     173  registerQuery(new VectorsQtQuery(title,check,inputLayout,this));
     174}
     175
     176void QtDialog::queryElement(const char* title, std::string)
     177{
     178  registerQuery(new ElementQtQuery(title,inputLayout,this));
     179}
     180
     181void QtDialog::queryElements(const char* title, std::string)
     182{
     183  registerQuery(new ElementsQtQuery(title,inputLayout,this));
     184}
     185
     186void QtDialog::queryFile(const char* title, std::string)
     187{
     188  registerQuery(new FileQtQuery(title,inputLayout,this));
    189189}
    190190
    191191/************************** Query Objects *******************************/
    192192
    193 QTDialog::BoxQTQuery::BoxQTQuery(string _title,QBoxLayout *_parent,QTDialog *_dialog) :
     193QtDialog::BoxQtQuery::BoxQtQuery(string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    194194    Dialog::BoxQuery(_title),
    195195    parent(_parent)
     
    205205  inputTable->setVerticalHeaderLabels(CoordinateList);
    206206
    207   pipe = new BoxQTQueryPipe(tmp,_dialog, inputTable);
     207  pipe = new BoxQtQueryPipe(tmp,_dialog, inputTable);
    208208
    209209  // fill the box with current matrix
     
    223223}
    224224
    225 QTDialog::BoxQTQuery::~BoxQTQuery()
    226 {
    227   delete pipe;
    228 }
    229 
    230 bool QTDialog::BoxQTQuery::handle() {
    231   return true;
    232 }
    233 
    234 
    235 QTDialog::AtomQTQuery::AtomQTQuery(string _title,QBoxLayout *_parent,QTDialog *_dialog) :
     225QtDialog::BoxQtQuery::~BoxQtQuery()
     226{
     227  delete pipe;
     228}
     229
     230bool QtDialog::BoxQtQuery::handle() {
     231  return true;
     232}
     233
     234
     235QtDialog::AtomQtQuery::AtomQtQuery(string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    236236    Dialog::AtomQuery(_title),
    237237    parent(_parent)
     
    249249  thisLayout->addWidget(inputBox);
    250250
    251   pipe = new AtomQTQueryPipe(&tmp,_dialog, inputBox);
     251  pipe = new AtomQtQueryPipe(&tmp,_dialog, inputBox);
    252252  pipe->update(inputBox->currentIndex());
    253253  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
    254254}
    255255
    256 QTDialog::AtomQTQuery::~AtomQTQuery()
    257 {
    258   delete pipe;
    259 }
    260 
    261 bool QTDialog::AtomQTQuery::handle() {
    262   return true;
    263 }
    264 
    265 
    266 QTDialog::AtomsQTQuery::AtomsQTQuery(string _title,QBoxLayout *_parent,QTDialog *_dialog) :
     256QtDialog::AtomQtQuery::~AtomQtQuery()
     257{
     258  delete pipe;
     259}
     260
     261bool QtDialog::AtomQtQuery::handle() {
     262  return true;
     263}
     264
     265
     266QtDialog::AtomsQtQuery::AtomsQtQuery(string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    267267    Dialog::AtomsQuery(_title),
    268268    parent(_parent)
     
    298298  thisHLayout->addLayout(thisV2Layout);
    299299
    300   pipe = new AtomsQTQueryPipe(&tmp,_dialog,inputList);
     300  pipe = new AtomsQtQueryPipe(&tmp,_dialog,inputList);
    301301  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
    302302  connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(add()));
     
    304304}
    305305
    306 QTDialog::AtomsQTQuery::~AtomsQTQuery()
    307 {
    308   delete pipe;
    309 }
    310 
    311 bool QTDialog::AtomsQTQuery::handle() {
    312   return true;
    313 }
    314 
    315 QTDialog::IntQTQuery::IntQTQuery(string _title,QBoxLayout *_parent,QTDialog *_dialog) :
     306QtDialog::AtomsQtQuery::~AtomsQtQuery()
     307{
     308  delete pipe;
     309}
     310
     311bool QtDialog::AtomsQtQuery::handle() {
     312  return true;
     313}
     314
     315QtDialog::IntQtQuery::IntQtQuery(string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    316316    Dialog::IntQuery(_title),
    317317    parent(_parent)
     
    325325  thisLayout->addWidget(inputBox);
    326326
    327   pipe = new IntQTQueryPipe(&tmp,_dialog);
     327  pipe = new IntQtQueryPipe(&tmp,_dialog);
    328328  pipe->update(inputBox->value());
    329329  connect(inputBox,SIGNAL(valueChanged(int)),pipe,SLOT(update(int)));
    330330}
    331331
    332 QTDialog::IntQTQuery::~IntQTQuery()
    333 {
    334   delete pipe;
    335 }
    336 
    337 bool QTDialog::IntQTQuery::handle() {
    338   return true;
    339 }
    340 
    341 
    342 QTDialog::IntsQTQuery::IntsQTQuery(string _title,QBoxLayout *_parent,QTDialog *_dialog) :
     332QtDialog::IntQtQuery::~IntQtQuery()
     333{
     334  delete pipe;
     335}
     336
     337bool QtDialog::IntQtQuery::handle() {
     338  return true;
     339}
     340
     341
     342QtDialog::IntsQtQuery::IntsQtQuery(string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    343343    Dialog::IntsQuery(_title),
    344344    parent(_parent)
     
    370370  thisHLayout->addLayout(thisV2Layout);
    371371
    372   pipe = new QTQueryListPipe<int>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     372  pipe = new QtQueryListPipe<int>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    373373  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    374374  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
     
    377377}
    378378
    379 QTDialog::IntsQTQuery::~IntsQTQuery()
    380 {
    381   delete pipe;
    382 }
    383 
    384 bool QTDialog::IntsQTQuery::handle() {
    385   return true;
    386 }
    387 
    388 
    389 QTDialog::DoubleQTQuery::DoubleQTQuery(string title,QBoxLayout *_parent,QTDialog *_dialog) :
     379QtDialog::IntsQtQuery::~IntsQtQuery()
     380{
     381  delete pipe;
     382}
     383
     384bool QtDialog::IntsQtQuery::handle() {
     385  return true;
     386}
     387
     388
     389QtDialog::DoubleQtQuery::DoubleQtQuery(string title,QBoxLayout *_parent,QtDialog *_dialog) :
    390390    Dialog::DoubleQuery(title),
    391391    parent(_parent)
     
    401401  thisLayout->addWidget(inputBox);
    402402
    403   pipe = new DoubleQTQueryPipe(&tmp,_dialog);
     403  pipe = new DoubleQtQueryPipe(&tmp,_dialog);
    404404  pipe->update(inputBox->value());
    405405  connect(inputBox,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));
    406406}
    407407
    408 QTDialog::DoubleQTQuery::~DoubleQTQuery()
    409 {
    410   delete pipe;
    411 }
    412 
    413 bool QTDialog::DoubleQTQuery::handle() {
    414   return true;
    415 }
    416 
    417 
    418 QTDialog::DoublesQTQuery::DoublesQTQuery(string title,QBoxLayout *_parent,QTDialog *_dialog) :
     408QtDialog::DoubleQtQuery::~DoubleQtQuery()
     409{
     410  delete pipe;
     411}
     412
     413bool QtDialog::DoubleQtQuery::handle() {
     414  return true;
     415}
     416
     417
     418QtDialog::DoublesQtQuery::DoublesQtQuery(string title,QBoxLayout *_parent,QtDialog *_dialog) :
    419419    Dialog::DoublesQuery(title),
    420420    parent(_parent)
     
    446446  thisHLayout->addLayout(thisV2Layout);
    447447
    448   pipe = new QTQueryListPipe<double>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     448  pipe = new QtQueryListPipe<double>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    449449  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    450450  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
     
    452452  connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));}
    453453
    454 QTDialog::DoublesQTQuery::~DoublesQTQuery()
    455 {
    456   delete pipe;
    457 }
    458 
    459 bool QTDialog::DoublesQTQuery::handle() {
    460   return true;
    461 }
    462 
    463 
    464 QTDialog::StringQTQuery::StringQTQuery(string _title,QBoxLayout *_parent,QTDialog *_dialog) :
     454QtDialog::DoublesQtQuery::~DoublesQtQuery()
     455{
     456  delete pipe;
     457}
     458
     459bool QtDialog::DoublesQtQuery::handle() {
     460  return true;
     461}
     462
     463
     464QtDialog::StringQtQuery::StringQtQuery(string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    465465    Dialog::StringQuery(_title),
    466466    parent(_parent)
     
    473473  thisLayout->addWidget(inputBox);
    474474
    475   pipe = new StringQTQueryPipe(&tmp,_dialog);
     475  pipe = new StringQtQueryPipe(&tmp,_dialog);
    476476  pipe->update(inputBox->text());
    477477  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(update(const QString&)));
    478478}
    479479
    480 QTDialog::StringQTQuery::~StringQTQuery()
     480QtDialog::StringQtQuery::~StringQtQuery()
    481481{
    482482  delete pipe;
     
    484484
    485485// All values besides the empty std::string are valid
    486 bool QTDialog::StringQTQuery::handle()
     486bool QtDialog::StringQtQuery::handle()
    487487{
    488488  return tmp!="";
    489489}
    490490
    491 QTDialog::StringsQTQuery::StringsQTQuery(string _title,QBoxLayout *_parent,QTDialog *_dialog) :
     491QtDialog::StringsQtQuery::StringsQtQuery(string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    492492    Dialog::StringsQuery(_title),
    493493    parent(_parent)
     
    519519  thisHLayout->addLayout(thisV2Layout);
    520520
    521   pipe = new QTQueryListPipe<std::string>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     521  pipe = new QtQueryListPipe<std::string>(&tmp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    522522  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    523523  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
     
    525525  connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));}
    526526
    527 QTDialog::StringsQTQuery::~StringsQTQuery()
     527QtDialog::StringsQtQuery::~StringsQtQuery()
    528528{
    529529  delete pipe;
     
    531531
    532532// All values besides the empty std::string are valid
    533 bool QTDialog::StringsQTQuery::handle()
     533bool QtDialog::StringsQtQuery::handle()
    534534{
    535535  // dissect by ","
     
    547547}
    548548
    549 QTDialog::MoleculeQTQuery::MoleculeQTQuery(string _title, QBoxLayout *_parent,QTDialog *_dialog) :
     549QtDialog::MoleculeQtQuery::MoleculeQtQuery(string _title, QBoxLayout *_parent,QtDialog *_dialog) :
    550550    Dialog::MoleculeQuery(_title),
    551551    parent(_parent)
     
    567567  thisLayout->addWidget(inputBox);
    568568
    569   pipe = new MoleculeQTQueryPipe(&tmp,_dialog,inputBox);
     569  pipe = new MoleculeQtQueryPipe(&tmp,_dialog,inputBox);
    570570  pipe->update(inputBox->currentIndex());
    571571  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
    572572}
    573573
    574 QTDialog::MoleculeQTQuery::~MoleculeQTQuery()
     574QtDialog::MoleculeQtQuery::~MoleculeQtQuery()
    575575{
    576576  delete pipe;
     
    578578
    579579// Handling is easy, since the GUI makes it impossible to select invalid values
    580 bool QTDialog::MoleculeQTQuery::handle()
    581 {
    582   return true;
    583 }
    584 
    585 QTDialog::MoleculesQTQuery::MoleculesQTQuery(string _title, QBoxLayout *_parent,QTDialog *_dialog) :
     580bool QtDialog::MoleculeQtQuery::handle()
     581{
     582  return true;
     583}
     584
     585QtDialog::MoleculesQtQuery::MoleculesQtQuery(string _title, QBoxLayout *_parent,QtDialog *_dialog) :
    586586    Dialog::MoleculesQuery(_title),
    587587    parent(_parent)
     
    603603  thisLayout->addWidget(inputBox);
    604604
    605   pipe = new MoleculesQTQueryPipe(&tmp,_dialog,inputBox);
     605  pipe = new MoleculesQtQueryPipe(&tmp,_dialog,inputBox);
    606606  pipe->update(inputBox->currentIndex());
    607607  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
    608608}
    609609
    610 QTDialog::MoleculesQTQuery::~MoleculesQTQuery()
     610QtDialog::MoleculesQtQuery::~MoleculesQtQuery()
    611611{
    612612  delete pipe;
     
    614614
    615615// Handling is easy, since the GUI makes it impossible to select invalid values
    616 bool QTDialog::MoleculesQTQuery::handle()
    617 {
    618   return true;
    619 }
    620 
    621 QTDialog::VectorQTQuery::VectorQTQuery(std::string title, bool _check,QBoxLayout *_parent,QTDialog *_dialog) :
     616bool QtDialog::MoleculesQtQuery::handle()
     617{
     618  return true;
     619}
     620
     621QtDialog::VectorQtQuery::VectorQtQuery(std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
    622622    Dialog::VectorQuery(title,_check),
    623623    parent(_parent)
     
    637637  coordInput->setDecimals(3);
    638638  coordLayout->addWidget(coordInput);
    639   pipe = new VectorQTQueryPipe(&(tmp),_dialog,inputBox);
     639  pipe = new VectorQtQueryPipe(&(tmp),_dialog,inputBox);
    640640  //pipe->update(coordInput->value());
    641641  connect(coordInput,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));
     
    643643}
    644644
    645 QTDialog::VectorQTQuery::~VectorQTQuery()
    646 {}
    647 
    648 bool QTDialog::VectorQTQuery::handle() {
    649   return true;
    650 }
    651 
    652 
    653 QTDialog::VectorsQTQuery::VectorsQTQuery(std::string title, bool _check,QBoxLayout *_parent,QTDialog *_dialog) :
     645QtDialog::VectorQtQuery::~VectorQtQuery()
     646{}
     647
     648bool QtDialog::VectorQtQuery::handle() {
     649  return true;
     650}
     651
     652
     653QtDialog::VectorsQtQuery::VectorsQtQuery(std::string title, bool _check,QBoxLayout *_parent,QtDialog *_dialog) :
    654654    Dialog::VectorsQuery(title,_check),
    655655    parent(_parent)
     
    669669  coordInput->setDecimals(3);
    670670  coordLayout->addWidget(coordInput);
    671   pipe = new VectorsQTQueryPipe(&(tmp),_dialog,inputBox);
     671  pipe = new VectorsQtQueryPipe(&(tmp),_dialog,inputBox);
    672672  //pipe->update(coordInput->value());
    673673  connect(coordInput,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));
     
    675675}
    676676
    677 QTDialog::VectorsQTQuery::~VectorsQTQuery()
    678 {}
    679 
    680 bool QTDialog::VectorsQTQuery::handle() {
    681   return true;
    682 }
    683 
    684 
    685 QTDialog::ElementQTQuery::ElementQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog) :
     677QtDialog::VectorsQtQuery::~VectorsQtQuery()
     678{}
     679
     680bool QtDialog::VectorsQtQuery::handle() {
     681  return true;
     682}
     683
     684
     685QtDialog::ElementQtQuery::ElementQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
    686686    Dialog::ElementQuery(_title),
    687687    parent(_parent)
     
    703703  thisLayout->addWidget(inputBox);
    704704
    705   pipe = new ElementQTQueryPipe(&tmp,_dialog,inputBox);
     705  pipe = new ElementQtQueryPipe(&tmp,_dialog,inputBox);
    706706  pipe->update(inputBox->currentIndex());
    707707  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
    708708}
    709709
    710 QTDialog::ElementQTQuery::~ElementQTQuery()
    711 {
    712   delete pipe;
    713 }
    714 
    715 bool QTDialog::ElementQTQuery::handle(){
    716   return true;
    717 }
    718 
    719 
    720 QTDialog::ElementsQTQuery::ElementsQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog) :
     710QtDialog::ElementQtQuery::~ElementQtQuery()
     711{
     712  delete pipe;
     713}
     714
     715bool QtDialog::ElementQtQuery::handle(){
     716  return true;
     717}
     718
     719
     720QtDialog::ElementsQtQuery::ElementsQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
    721721    Dialog::ElementsQuery(_title),
    722722    parent(_parent)
     
    738738  thisLayout->addWidget(inputBox);
    739739
    740   pipe = new ElementsQTQueryPipe(&tmp,_dialog,inputBox);
     740  pipe = new ElementsQtQueryPipe(&tmp,_dialog,inputBox);
    741741  pipe->update(inputBox->currentIndex());
    742742  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
    743743}
    744744
    745 QTDialog::ElementsQTQuery::~ElementsQTQuery()
    746 {
    747   delete pipe;
    748 }
    749 
    750 bool QTDialog::ElementsQTQuery::handle(){
    751   return true;
    752 }
    753 
    754 QTDialog::EmptyQTQuery::EmptyQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog) :
     745QtDialog::ElementsQtQuery::~ElementsQtQuery()
     746{
     747  delete pipe;
     748}
     749
     750bool QtDialog::ElementsQtQuery::handle(){
     751  return true;
     752}
     753
     754QtDialog::EmptyQtQuery::EmptyQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
    755755    Dialog::EmptyQuery(_title),
    756756    parent(_parent)
     
    761761  thisLayout->addWidget(titleLabel);
    762762
    763   pipe = new EmptyQTQueryPipe(_dialog,titleLabel);
    764 }
    765 
    766 QTDialog::EmptyQTQuery::~EmptyQTQuery()
    767 {
    768   delete pipe;
    769 }
    770 
    771 bool QTDialog::EmptyQTQuery::handle(){
    772   return true;
    773 }
    774 
    775 
    776 QTDialog::BooleanQTQuery::BooleanQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog) :
     763  pipe = new EmptyQtQueryPipe(_dialog,titleLabel);
     764}
     765
     766QtDialog::EmptyQtQuery::~EmptyQtQuery()
     767{
     768  delete pipe;
     769}
     770
     771bool QtDialog::EmptyQtQuery::handle(){
     772  return true;
     773}
     774
     775
     776QtDialog::BooleanQtQuery::BooleanQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
    777777    Dialog::BooleanQuery(_title),
    778778    parent(_parent)
     
    787787  thisLayout->addWidget(booleanComboBox);
    788788
    789   pipe = new BooleanQTQueryPipe(&tmp,_dialog,booleanComboBox);
     789  pipe = new BooleanQtQueryPipe(&tmp,_dialog,booleanComboBox);
    790790  connect(booleanComboBox, SIGNAL(currentIndexChanged()), pipe, SLOT(update()));
    791791}
    792792
    793 QTDialog::BooleanQTQuery::~BooleanQTQuery()
    794 {
    795   delete pipe;
    796 }
    797 
    798 bool QTDialog::BooleanQTQuery::handle(){
    799   return true;
    800 }
    801 
    802 
    803 QTDialog::FileQTQuery::FileQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog) :
     793QtDialog::BooleanQtQuery::~BooleanQtQuery()
     794{
     795  delete pipe;
     796}
     797
     798bool QtDialog::BooleanQtQuery::handle(){
     799  return true;
     800}
     801
     802
     803QtDialog::FileQtQuery::FileQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
    804804    Dialog::FileQuery(_title),
    805805    parent(_parent)
     
    815815  filedialogButton = new QPushButton("&Choose", _dialog);
    816816
    817   pipe = new FileQTQueryPipe(&tmp,_dialog,filenameLineEdit,filedialogButton);
     817  pipe = new FileQtQueryPipe(&tmp,_dialog,filenameLineEdit,filedialogButton);
    818818
    819819  thisLayout = new QHBoxLayout();
     
    826826}
    827827
    828 QTDialog::FileQTQuery::~FileQTQuery()
    829 {
    830   delete pipe;
    831 }
    832 
    833 bool QTDialog::FileQTQuery::handle(){
     828QtDialog::FileQtQuery::~FileQtQuery()
     829{
     830  delete pipe;
     831}
     832
     833bool QtDialog::FileQtQuery::handle(){
    834834  return true;
    835835}
     
    838838
    839839
    840 template<typename T> QTQueryListPipe<T>::QTQueryListPipe(std::vector<T> *_content, QTDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) :
     840template<typename T> QtQueryListPipe<T>::QtQueryListPipe(std::vector<T> *_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton) :
    841841  content(_content),
    842842  dialog(_dialog),
     
    847847{}
    848848
    849 template<typename T> QTQueryListPipe<T>::~QTQueryListPipe()
    850 {}
    851 
    852 template<typename T> void QTQueryListPipe<T>::IntegerEntered(const QString&)
     849template<typename T> QtQueryListPipe<T>::~QtQueryListPipe()
     850{}
     851
     852template<typename T> void QtQueryListPipe<T>::IntegerEntered(const QString&)
    853853{
    854854  AddButton->setEnabled(true);
    855855}
    856856
    857 template<typename T> void QTQueryListPipe<T>::IntegerSelected()
     857template<typename T> void QtQueryListPipe<T>::IntegerSelected()
    858858{
    859859  if (inputList->selectedItems().empty())
     
    863863}
    864864
    865 template<typename T> void QTQueryListPipe<T>::AddInteger() {
     865template<typename T> void QtQueryListPipe<T>::AddInteger() {
    866866  // type-check
    867867  std::string text = inputBox->text().toStdString();
     
    877877}
    878878
    879 template<typename T> void QTQueryListPipe<T>::AddValue(T item) {
     879template<typename T> void QtQueryListPipe<T>::AddValue(T item) {
    880880  content->push_back(item);
    881881
     
    883883}
    884884
    885 template<typename T> void QTQueryListPipe<T>::RemoveInteger() {
     885template<typename T> void QtQueryListPipe<T>::RemoveInteger() {
    886886  QList<QListWidgetItem *> items = inputList->selectedItems();
    887887  for (QList<QListWidgetItem *>::iterator iter = items.begin(); !items.empty(); iter = items.begin()) {
     
    889889    inputList->setCurrentItem(*iter);
    890890    // remove
    891     QTQueryListPipe<T>::RemoteRow(inputList->currentRow()); // template parameters needs to be known, such that compiler knows which to call
     891    QtQueryListPipe<T>::RemoteRow(inputList->currentRow()); // template parameters needs to be known, such that compiler knows which to call
    892892    inputList->removeItemWidget(*iter);
    893893  }
    894894}
    895895
    896 template<typename T> void QTQueryListPipe<T>::RemoveRow(int row) {
     896template<typename T> void QtQueryListPipe<T>::RemoveRow(int row) {
    897897  int counter = 0;
    898898  typename std::vector<T>::iterator iter = content->begin();
     
    905905
    906906
    907 StringQTQueryPipe::StringQTQueryPipe(string *_content, QTDialog *_dialog) :
     907StringQtQueryPipe::StringQtQueryPipe(string *_content, QtDialog *_dialog) :
    908908  content(_content),
    909909  dialog(_dialog)
    910910{}
    911911
    912 StringQTQueryPipe::~StringQTQueryPipe()
    913 {}
    914 
    915 void StringQTQueryPipe::update(const QString& newText) {
     912StringQtQueryPipe::~StringQtQueryPipe()
     913{}
     914
     915void StringQtQueryPipe::update(const QString& newText) {
    916916  content->assign(newText.toStdString());
    917917  dialog->update();
    918918}
    919919
    920 IntQTQueryPipe::IntQTQueryPipe(int *_content, QTDialog *_dialog) :
     920IntQtQueryPipe::IntQtQueryPipe(int *_content, QtDialog *_dialog) :
    921921  content(_content),
    922922  dialog(_dialog)
    923923{}
    924924
    925 IntQTQueryPipe::~IntQTQueryPipe()
    926 {}
    927 
    928 void IntQTQueryPipe::update(int newInt) {
     925IntQtQueryPipe::~IntQtQueryPipe()
     926{}
     927
     928void IntQtQueryPipe::update(int newInt) {
    929929  (*content) = newInt;
    930930  dialog->update();
    931931}
    932932
    933 DoubleQTQueryPipe::DoubleQTQueryPipe(double *_content, QTDialog *_dialog) :
     933DoubleQtQueryPipe::DoubleQtQueryPipe(double *_content, QtDialog *_dialog) :
    934934  content(_content),
    935935  dialog(_dialog)
    936936{}
    937937
    938 DoubleQTQueryPipe::~DoubleQTQueryPipe()
    939 {}
    940 
    941 void DoubleQTQueryPipe::update(double newDbl) {
     938DoubleQtQueryPipe::~DoubleQtQueryPipe()
     939{}
     940
     941void DoubleQtQueryPipe::update(double newDbl) {
    942942  (*content) = newDbl;
    943943  dialog->update();
    944944}
    945945
    946 VectorQTQueryPipe::VectorQTQueryPipe(Vector *_content, QTDialog *_dialog, QComboBox *_theBox) :
     946VectorQtQueryPipe::VectorQtQueryPipe(Vector *_content, QtDialog *_dialog, QComboBox *_theBox) :
    947947  content(_content),
    948948  dialog(_dialog),
     
    950950{}
    951951
    952 VectorQTQueryPipe::~VectorQTQueryPipe()
    953 {}
    954 
    955 void VectorQTQueryPipe::update() {
    956   dialog->update();
    957 }
    958 
    959 VectorsQTQueryPipe::VectorsQTQueryPipe(std::vector<Vector> *_content, QTDialog *_dialog, QComboBox *_theBox) :
     952VectorQtQueryPipe::~VectorQtQueryPipe()
     953{}
     954
     955void VectorQtQueryPipe::update() {
     956  dialog->update();
     957}
     958
     959VectorsQtQueryPipe::VectorsQtQueryPipe(std::vector<Vector> *_content, QtDialog *_dialog, QComboBox *_theBox) :
    960960  content(_content),
    961961  dialog(_dialog),
     
    963963{}
    964964
    965 VectorsQTQueryPipe::~VectorsQTQueryPipe()
    966 {}
    967 
    968 void VectorsQTQueryPipe::update() {
    969   dialog->update();
    970 }
    971 
    972 BoxQTQueryPipe::BoxQTQueryPipe(Box &_content, QTDialog *_dialog, QTableWidget *_inputTable) :
     965VectorsQtQueryPipe::~VectorsQtQueryPipe()
     966{}
     967
     968void VectorsQtQueryPipe::update() {
     969  dialog->update();
     970}
     971
     972BoxQtQueryPipe::BoxQtQueryPipe(Box &_content, QtDialog *_dialog, QTableWidget *_inputTable) :
    973973  content(_content),
    974974  dialog(_dialog),
     
    979979}
    980980
    981 BoxQTQueryPipe::~BoxQTQueryPipe()
     981BoxQtQueryPipe::~BoxQtQueryPipe()
    982982{
    983983  delete tmpM;
    984984}
    985985
    986 void BoxQTQueryPipe::update(int row, int column)
     986void BoxQtQueryPipe::update(int row, int column)
    987987{
    988988  tmpM->at(row, column) = inputTable->item(row, column)->text().toDouble();
     
    992992
    993993
    994 AtomQTQueryPipe::AtomQTQueryPipe(atom **_content, QTDialog *_dialog, QComboBox *_theBox) :
     994AtomQtQueryPipe::AtomQtQueryPipe(atom **_content, QtDialog *_dialog, QComboBox *_theBox) :
    995995  content(_content),
    996996  dialog(_dialog),
     
    998998{}
    999999
    1000 AtomQTQueryPipe::~AtomQTQueryPipe()
    1001 {}
    1002 
    1003 void AtomQTQueryPipe::update(int newIndex) {
     1000AtomQtQueryPipe::~AtomQtQueryPipe()
     1001{}
     1002
     1003void AtomQtQueryPipe::update(int newIndex) {
    10041004  QVariant data = theBox->itemData(newIndex);
    10051005  int idx = data.toInt();
     
    10091009
    10101010
    1011 AtomsQTQueryPipe::AtomsQTQueryPipe(std::vector<atom *>*_content, QTDialog *_dialog, QListWidget *_theList) :
     1011AtomsQtQueryPipe::AtomsQtQueryPipe(std::vector<atom *>*_content, QtDialog *_dialog, QListWidget *_theList) :
    10121012  content(_content),
    10131013  dialog(_dialog),
     
    10151015{}
    10161016
    1017 AtomsQTQueryPipe::~AtomsQTQueryPipe()
    1018 {}
    1019 
    1020 void AtomsQTQueryPipe::update() {
     1017AtomsQtQueryPipe::~AtomsQtQueryPipe()
     1018{}
     1019
     1020void AtomsQtQueryPipe::update() {
    10211021  // clear target and put all atoms therein
    10221022  (*content).clear();
     
    10261026}
    10271027
    1028 void AtomsQTQueryPipe::add() {
     1028void AtomsQtQueryPipe::add() {
    10291029  QList<QListWidgetItem *> items = theList->selectedItems();
    10301030  for (QList<QListWidgetItem *>::iterator iter = items.begin();iter != items.end();++iter) {
     
    10411041}
    10421042
    1043 void AtomsQTQueryPipe::remove() {
     1043void AtomsQtQueryPipe::remove() {
    10441044  QList<QListWidgetItem *> items = theList->selectedItems();
    10451045  for (QList<QListWidgetItem *>::iterator iter = items.begin();iter != items.end();++iter) {
     
    10541054
    10551055
    1056 MoleculeQTQueryPipe::MoleculeQTQueryPipe(molecule **_content, QTDialog *_dialog, QComboBox *_theBox) :
     1056MoleculeQtQueryPipe::MoleculeQtQueryPipe(molecule **_content, QtDialog *_dialog, QComboBox *_theBox) :
    10571057  content(_content),
    10581058  dialog(_dialog),
     
    10601060{}
    10611061
    1062 MoleculeQTQueryPipe::~MoleculeQTQueryPipe()
    1063 {}
    1064 
    1065 void MoleculeQTQueryPipe::update(int newIndex) {
     1062MoleculeQtQueryPipe::~MoleculeQtQueryPipe()
     1063{}
     1064
     1065void MoleculeQtQueryPipe::update(int newIndex) {
    10661066  QVariant data = theBox->itemData(newIndex);
    10671067  int idx = data.toInt();
     
    10711071
    10721072
    1073 MoleculesQTQueryPipe::MoleculesQTQueryPipe(std::vector<molecule *>*_content, QTDialog *_dialog, QComboBox *_theBox) :
     1073MoleculesQtQueryPipe::MoleculesQtQueryPipe(std::vector<molecule *>*_content, QtDialog *_dialog, QComboBox *_theBox) :
    10741074  content(_content),
    10751075  dialog(_dialog),
     
    10771077{}
    10781078
    1079 MoleculesQTQueryPipe::~MoleculesQTQueryPipe()
    1080 {}
    1081 
    1082 void MoleculesQTQueryPipe::update(int newIndex) {
     1079MoleculesQtQueryPipe::~MoleculesQtQueryPipe()
     1080{}
     1081
     1082void MoleculesQtQueryPipe::update(int newIndex) {
    10831083  QVariant data = theBox->itemData(newIndex);
    10841084  int idx = data.toInt();
     
    10891089}
    10901090
    1091 ElementQTQueryPipe::ElementQTQueryPipe(const element **_content, QTDialog *_dialog, QComboBox *_theBox) :
     1091ElementQtQueryPipe::ElementQtQueryPipe(const element **_content, QtDialog *_dialog, QComboBox *_theBox) :
    10921092  content(_content),
    10931093  dialog(_dialog),
     
    10951095{}
    10961096
    1097 ElementQTQueryPipe::~ElementQTQueryPipe()
    1098 {}
    1099 
    1100 void ElementQTQueryPipe::update(int newIndex) {
     1097ElementQtQueryPipe::~ElementQtQueryPipe()
     1098{}
     1099
     1100void ElementQtQueryPipe::update(int newIndex) {
    11011101  QVariant data = theBox->itemData(newIndex);
    11021102  int idx = data.toInt();
     
    11051105}
    11061106
    1107 ElementsQTQueryPipe::ElementsQTQueryPipe(std::vector<const element *>*_content, QTDialog *_dialog, QComboBox *_theBox) :
     1107ElementsQtQueryPipe::ElementsQtQueryPipe(std::vector<const element *>*_content, QtDialog *_dialog, QComboBox *_theBox) :
    11081108  content(_content),
    11091109  dialog(_dialog),
     
    11111111{}
    11121112
    1113 ElementsQTQueryPipe::~ElementsQTQueryPipe()
    1114 {}
    1115 
    1116 void ElementsQTQueryPipe::update(int newIndex) {
     1113ElementsQtQueryPipe::~ElementsQtQueryPipe()
     1114{}
     1115
     1116void ElementsQtQueryPipe::update(int newIndex) {
    11171117  QVariant data = theBox->itemData(newIndex);
    11181118  int idx = data.toInt();
     
    11231123}
    11241124
    1125 EmptyQTQueryPipe::EmptyQTQueryPipe(QTDialog *_dialog, QLabel *_textLabel) :
     1125EmptyQtQueryPipe::EmptyQtQueryPipe(QtDialog *_dialog, QLabel *_textLabel) :
    11261126  dialog(_dialog),
    11271127  textLabel(_textLabel)
    11281128{}
    11291129
    1130 EmptyQTQueryPipe::~EmptyQTQueryPipe()
    1131 {}
    1132 
    1133 void EmptyQTQueryPipe::update() {
    1134   dialog->update();
    1135 }
    1136 
    1137 BooleanQTQueryPipe::BooleanQTQueryPipe(const bool *_content, QTDialog *_dialog, QComboBox *_booleanComboBox) :
     1130EmptyQtQueryPipe::~EmptyQtQueryPipe()
     1131{}
     1132
     1133void EmptyQtQueryPipe::update() {
     1134  dialog->update();
     1135}
     1136
     1137BooleanQtQueryPipe::BooleanQtQueryPipe(const bool *_content, QtDialog *_dialog, QComboBox *_booleanComboBox) :
    11381138  content(_content),
    11391139  dialog(_dialog),
     
    11411141{}
    11421142
    1143 BooleanQTQueryPipe::~BooleanQTQueryPipe()
    1144 {}
    1145 
    1146 void BooleanQTQueryPipe::update() {
    1147   dialog->update();
    1148 }
    1149 
    1150 FileQTQueryPipe::FileQTQueryPipe(boost::filesystem::path *_content, QTDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton) :
     1143BooleanQtQueryPipe::~BooleanQtQueryPipe()
     1144{}
     1145
     1146void BooleanQtQueryPipe::update() {
     1147  dialog->update();
     1148}
     1149
     1150FileQtQueryPipe::FileQtQueryPipe(boost::filesystem::path *_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton) :
    11511151  content(_content),
    11521152  dialog(_dialog),
     
    11571157}
    11581158
    1159 FileQTQueryPipe::~FileQTQueryPipe()
     1159FileQtQueryPipe::~FileQtQueryPipe()
    11601160{
    11611161  if (theFileDialog != NULL)
     
    11631163}
    11641164
    1165 void FileQTQueryPipe::update() {
     1165void FileQtQueryPipe::update() {
    11661166  QStringList ListOfFilenames = theFileDialog->selectedFiles();
    11671167  std::cout << "Selected File is " << ListOfFilenames.at(0).toStdString() << std::endl;
     
    11711171}
    11721172
    1173 void FileQTQueryPipe::showFileDialog() {
     1173void FileQtQueryPipe::showFileDialog() {
    11741174  filedialogButton->setFlat(true);
    11751175  if (theFileDialog == NULL) {
  • src/UIElements/Qt4/QtDialog.hpp

    r81126a r4cf323d  
    11/*
    2  * QTDialog.hpp
     2 * QtDialog.hpp
    33 *
    44 *  Created on: Jan 18, 2010
     
    3232
    3333// Forward declarations for plumbing
    34 template<typename T> class QTQueryListPipe;
    35 class BooleanQTQueryPipe;
    36 class BoxQTQueryPipe;
    37 class StringQTQueryPipe;
    38 class StringsQTQueryPipe;
    39 class IntQTQueryPipe;
    40 class DoubleQTQueryPipe;
    41 class DoublesQTQueryPipe;
    42 class AtomQTQueryPipe;
    43 class AtomsQTQueryPipe;
    44 class MoleculeQTQueryPipe;
    45 class MoleculesQTQueryPipe;
    46 class EmptyQTQueryPipe;
    47 class ElementQTQueryPipe;
    48 class ElementsQTQueryPipe;
    49 class VectorQTQueryPipe;
    50 class VectorsQTQueryPipe;
    51 class FileQTQueryPipe;
    52 
    53 class QTDialog : public QDialog, public Dialog
     34template<typename T> class QtQueryListPipe;
     35class BooleanQtQueryPipe;
     36class BoxQtQueryPipe;
     37class StringQtQueryPipe;
     38class StringsQtQueryPipe;
     39class IntQtQueryPipe;
     40class DoubleQtQueryPipe;
     41class DoublesQtQueryPipe;
     42class AtomQtQueryPipe;
     43class AtomsQtQueryPipe;
     44class MoleculeQtQueryPipe;
     45class MoleculesQtQueryPipe;
     46class EmptyQtQueryPipe;
     47class ElementQtQueryPipe;
     48class ElementsQtQueryPipe;
     49class VectorQtQueryPipe;
     50class VectorsQtQueryPipe;
     51class FileQtQueryPipe;
     52
     53class QtDialog : public QDialog, public Dialog
    5454{
    5555  Q_OBJECT
    5656public:
    57   QTDialog();
    58   virtual ~QTDialog();
     57  QtDialog();
     58  virtual ~QtDialog();
    5959
    6060  virtual void queryEmpty(const char*, std::string);
     
    8282
    8383protected:
    84   class IntQTQuery : public Dialog::IntQuery {
    85     public:
    86       IntQTQuery(std::string _title,QBoxLayout *_parent,QTDialog *_dialog);
    87       virtual ~IntQTQuery();
     84  class IntQtQuery : public Dialog::IntQuery {
     85    public:
     86      IntQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
     87      virtual ~IntQtQuery();
    8888      virtual bool handle();
    8989    private:
     
    9393      QSpinBox *inputBox;
    9494
    95       IntQTQueryPipe *pipe;
    96     };
    97 
    98   class IntsQTQuery : public Dialog::IntsQuery {
    99     public:
    100       IntsQTQuery(std::string _title,QBoxLayout *_parent,QTDialog *_dialog);
    101       virtual ~IntsQTQuery();
     95      IntQtQueryPipe *pipe;
     96    };
     97
     98  class IntsQtQuery : public Dialog::IntsQuery {
     99    public:
     100      IntsQtQuery(std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
     101      virtual ~IntsQtQuery();
    102102      virtual bool handle();
    103103      void IntegerEntered(const QString&);
     
    110110      QLabel *titleLabel;
    111111
    112       QTQueryListPipe<int> *pipe;
    113     };
    114 
    115     class DoubleQTQuery : public Dialog::DoubleQuery {
    116     public:
    117       DoubleQTQuery(std::string title,QBoxLayout *_parent,QTDialog *_dialog);
    118       virtual ~DoubleQTQuery();
     112      QtQueryListPipe<int> *pipe;
     113    };
     114
     115    class DoubleQtQuery : public Dialog::DoubleQuery {
     116    public:
     117      DoubleQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog);
     118      virtual ~DoubleQtQuery();
    119119      virtual bool handle();
    120120    private:
     
    124124      QDoubleSpinBox *inputBox;
    125125
    126       DoubleQTQueryPipe *pipe;
    127     };
    128 
    129     class DoublesQTQuery : public Dialog::DoublesQuery {
    130     public:
    131       DoublesQTQuery(std::string title,QBoxLayout *_parent,QTDialog *_dialog);
    132       virtual ~DoublesQTQuery();
     126      DoubleQtQueryPipe *pipe;
     127    };
     128
     129    class DoublesQtQuery : public Dialog::DoublesQuery {
     130    public:
     131      DoublesQtQuery(std::string title,QBoxLayout *_parent,QtDialog *_dialog);
     132      virtual ~DoublesQtQuery();
    133133      virtual bool handle();
    134134    private:
     
    138138      QDoubleSpinBox *inputBox;
    139139
    140       QTQueryListPipe<double> *pipe;
    141     };
    142 
    143     class StringQTQuery : public Dialog::StringQuery {
    144     public:
    145       StringQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
    146       virtual ~StringQTQuery();
     140      QtQueryListPipe<double> *pipe;
     141    };
     142
     143    class StringQtQuery : public Dialog::StringQuery {
     144    public:
     145      StringQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     146      virtual ~StringQtQuery();
    147147      virtual bool handle();
    148148    private:
     
    152152      QLineEdit *inputBox;
    153153
    154       StringQTQueryPipe *pipe;
    155     };
    156 
    157     class StringsQTQuery : public Dialog::StringsQuery {
    158     public:
    159       StringsQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
    160       virtual ~StringsQTQuery();
     154      StringQtQueryPipe *pipe;
     155    };
     156
     157    class StringsQtQuery : public Dialog::StringsQuery {
     158    public:
     159      StringsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     160      virtual ~StringsQtQuery();
    161161      virtual bool handle();
    162162    private:
     
    166166      QLineEdit *inputBox;
    167167
    168       QTQueryListPipe<std::string> *pipe;
    169     };
    170 
    171     class BoxQTQuery : public Dialog::BoxQuery {
    172     public:
    173       BoxQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
    174       virtual ~BoxQTQuery();
     168      QtQueryListPipe<std::string> *pipe;
     169    };
     170
     171    class BoxQtQuery : public Dialog::BoxQuery {
     172    public:
     173      BoxQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     174      virtual ~BoxQtQuery();
    175175      virtual bool handle();
    176176    private:
     
    180180      QTableWidget *inputTable;
    181181
    182       BoxQTQueryPipe *pipe;
    183     };
    184 
    185     class AtomQTQuery : public Dialog::AtomQuery {
    186     public:
    187       AtomQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
    188       virtual ~AtomQTQuery();
     182      BoxQtQueryPipe *pipe;
     183    };
     184
     185    class AtomQtQuery : public Dialog::AtomQuery {
     186    public:
     187      AtomQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     188      virtual ~AtomQtQuery();
    189189      virtual bool handle();
    190190    private:
     
    194194      QComboBox *inputBox;
    195195
    196       AtomQTQueryPipe *pipe;
    197     };
    198 
    199     class AtomsQTQuery : public Dialog::AtomsQuery {
    200     public:
    201       AtomsQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
    202       virtual ~AtomsQTQuery();
     196      AtomQtQueryPipe *pipe;
     197    };
     198
     199    class AtomsQtQuery : public Dialog::AtomsQuery {
     200    public:
     201      AtomsQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     202      virtual ~AtomsQtQuery();
    203203      virtual bool handle();
    204204    private:
     
    208208      QComboBox *inputBox;
    209209
    210       AtomsQTQueryPipe *pipe;
    211     };
    212 
    213     class MoleculeQTQuery : public Dialog::MoleculeQuery {
    214     public:
    215       MoleculeQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
    216       virtual ~MoleculeQTQuery();
     210      AtomsQtQueryPipe *pipe;
     211    };
     212
     213    class MoleculeQtQuery : public Dialog::MoleculeQuery {
     214    public:
     215      MoleculeQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     216      virtual ~MoleculeQtQuery();
    217217      virtual bool handle();
    218218    private:
     
    222222      QComboBox *inputBox;
    223223
    224       MoleculeQTQueryPipe *pipe;
    225     };
    226 
    227     class MoleculesQTQuery : public Dialog::MoleculesQuery {
    228     public:
    229       MoleculesQTQuery(std::string _title, QBoxLayout *_parent,QTDialog *_dialog);
    230       virtual ~MoleculesQTQuery();
     224      MoleculeQtQueryPipe *pipe;
     225    };
     226
     227    class MoleculesQtQuery : public Dialog::MoleculesQuery {
     228    public:
     229      MoleculesQtQuery(std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     230      virtual ~MoleculesQtQuery();
    231231      virtual bool handle();
    232232    private:
     
    236236      QComboBox *inputBox;
    237237
    238       MoleculesQTQueryPipe *pipe;
    239     };
    240 
    241     class VectorQTQuery : public Dialog::VectorQuery {
    242     public:
    243       VectorQTQuery(std::string title,bool _check,QBoxLayout *,QTDialog *);
    244       virtual ~VectorQTQuery();
     238      MoleculesQtQueryPipe *pipe;
     239    };
     240
     241    class VectorQtQuery : public Dialog::VectorQuery {
     242    public:
     243      VectorQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *);
     244      virtual ~VectorQtQuery();
    245245      virtual bool handle();
    246246    private:
     
    253253      QDoubleSpinBox *coordInput;
    254254
    255       VectorQTQueryPipe *pipe;
    256     };
    257 
    258     class VectorsQTQuery : public Dialog::VectorsQuery {
    259     public:
    260       VectorsQTQuery(std::string title,bool _check,QBoxLayout *,QTDialog *);
    261       virtual ~VectorsQTQuery();
     255      VectorQtQueryPipe *pipe;
     256    };
     257
     258    class VectorsQtQuery : public Dialog::VectorsQuery {
     259    public:
     260      VectorsQtQuery(std::string title,bool _check,QBoxLayout *,QtDialog *);
     261      virtual ~VectorsQtQuery();
    262262      virtual bool handle();
    263263    private:
     
    270270      QDoubleSpinBox *coordInput;
    271271
    272       VectorsQTQueryPipe *pipe;
    273     };
    274 
    275     class EmptyQTQuery : public Dialog::EmptyQuery {
    276     public:
    277       EmptyQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
    278       virtual ~EmptyQTQuery();
    279       virtual bool handle();
    280     private:
    281       QBoxLayout *parent;
    282       QBoxLayout *thisLayout;
    283       QLabel *titleLabel;
    284 
    285       EmptyQTQueryPipe *pipe;
    286     };
    287 
    288     class BooleanQTQuery : public Dialog::BooleanQuery {
    289     public:
    290       BooleanQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
    291       virtual ~BooleanQTQuery();
     272      VectorsQtQueryPipe *pipe;
     273    };
     274
     275    class EmptyQtQuery : public Dialog::EmptyQuery {
     276    public:
     277      EmptyQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     278      virtual ~EmptyQtQuery();
     279      virtual bool handle();
     280    private:
     281      QBoxLayout *parent;
     282      QBoxLayout *thisLayout;
     283      QLabel *titleLabel;
     284
     285      EmptyQtQueryPipe *pipe;
     286    };
     287
     288    class BooleanQtQuery : public Dialog::BooleanQuery {
     289    public:
     290      BooleanQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     291      virtual ~BooleanQtQuery();
    292292      virtual bool handle();
    293293    private:
     
    297297      QComboBox *booleanComboBox;
    298298
    299       BooleanQTQueryPipe *pipe;
    300     };
    301 
    302     class ElementQTQuery : public Dialog::ElementQuery {
    303     public:
    304       ElementQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
    305       virtual ~ElementQTQuery();
     299      BooleanQtQueryPipe *pipe;
     300    };
     301
     302    class ElementQtQuery : public Dialog::ElementQuery {
     303    public:
     304      ElementQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     305      virtual ~ElementQtQuery();
    306306      virtual bool handle();
    307307    private:
     
    311311      QComboBox *inputBox;
    312312
    313       ElementQTQueryPipe *pipe;
    314     };
    315 
    316     class ElementsQTQuery : public Dialog::ElementsQuery {
    317     public:
    318       ElementsQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
    319       virtual ~ElementsQTQuery();
     313      ElementQtQueryPipe *pipe;
     314    };
     315
     316    class ElementsQtQuery : public Dialog::ElementsQuery {
     317    public:
     318      ElementsQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     319      virtual ~ElementsQtQuery();
    320320      virtual bool handle();
    321321    private:
     
    325325      QComboBox *inputBox;
    326326
    327       ElementsQTQueryPipe *pipe;
    328     };
    329 
    330     class FileQTQuery : public Dialog::FileQuery {
    331     public:
    332       FileQTQuery(std::string _title, QBoxLayout *_parent, QTDialog *_dialog);
    333       virtual ~FileQTQuery();
     327      ElementsQtQueryPipe *pipe;
     328    };
     329
     330    class FileQtQuery : public Dialog::FileQuery {
     331    public:
     332      FileQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     333      virtual ~FileQtQuery();
    334334      virtual bool handle();
    335335    private:
     
    340340      QPushButton *filedialogButton;
    341341
    342       FileQTQueryPipe *pipe;
     342      FileQtQueryPipe *pipe;
    343343    };
    344344
     
    355355
    356356
    357 template<typename T> class QTQueryListPipe : public QWidget {
     357template<typename T> class QtQueryListPipe : public QWidget {
    358358  public:
    359     QTQueryListPipe(std::vector<T> *_content, QTDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton);
    360     virtual ~QTQueryListPipe();
     359    QtQueryListPipe(std::vector<T> *_content, QtDialog *_dialog, QLineEdit *_inputBox, QListWidget *_inputList, QPushButton *_AddButton, QPushButton *_RemoveButton);
     360    virtual ~QtQueryListPipe();
    361361    void AddInteger();
    362362    void RemoveInteger();
     
    369369
    370370    std::vector<T> *content;
    371     QTDialog *dialog;
     371    QtDialog *dialog;
    372372    QLineEdit *inputBox;
    373373    QListWidget *inputList;
     
    377377
    378378
    379 class StringQTQueryPipe : public QWidget {
    380   Q_OBJECT
    381 public:
    382   StringQTQueryPipe(std::string *_content, QTDialog *_dialog);
    383   virtual ~StringQTQueryPipe();
     379class StringQtQueryPipe : public QWidget {
     380  Q_OBJECT
     381public:
     382  StringQtQueryPipe(std::string *_content, QtDialog *_dialog);
     383  virtual ~StringQtQueryPipe();
    384384
    385385public slots:
     
    388388private:
    389389  std::string *content;
    390   QTDialog *dialog;
    391 
    392 };
    393 
    394 class IntQTQueryPipe : public QWidget {
    395   Q_OBJECT
    396 public:
    397   IntQTQueryPipe(int *_content, QTDialog *_dialog);
    398   virtual ~IntQTQueryPipe();
     390  QtDialog *dialog;
     391
     392};
     393
     394class IntQtQueryPipe : public QWidget {
     395  Q_OBJECT
     396public:
     397  IntQtQueryPipe(int *_content, QtDialog *_dialog);
     398  virtual ~IntQtQueryPipe();
    399399
    400400public slots:
     
    403403private:
    404404  int *content;
    405   QTDialog *dialog;
    406 
    407 };
    408 
    409 
    410 class DoubleQTQueryPipe : public QWidget {
    411   Q_OBJECT
    412 public:
    413   DoubleQTQueryPipe(double *_content, QTDialog *_dialog);
    414   virtual ~DoubleQTQueryPipe();
     405  QtDialog *dialog;
     406
     407};
     408
     409
     410class DoubleQtQueryPipe : public QWidget {
     411  Q_OBJECT
     412public:
     413  DoubleQtQueryPipe(double *_content, QtDialog *_dialog);
     414  virtual ~DoubleQtQueryPipe();
    415415
    416416public slots:
     
    419419private:
    420420  double *content;
    421   QTDialog *dialog;
    422 
    423 };
    424 
    425 class BoxQTQueryPipe : public QWidget {
    426   Q_OBJECT
    427 public:
    428   BoxQTQueryPipe(Box &_content, QTDialog *_dialog, QTableWidget *_inputTable);
    429   virtual ~BoxQTQueryPipe();
     421  QtDialog *dialog;
     422
     423};
     424
     425class BoxQtQueryPipe : public QWidget {
     426  Q_OBJECT
     427public:
     428  BoxQtQueryPipe(Box &_content, QtDialog *_dialog, QTableWidget *_inputTable);
     429  virtual ~BoxQtQueryPipe();
    430430
    431431public slots:
     
    434434private:
    435435  Box &content;
    436   QTDialog *dialog;
     436  QtDialog *dialog;
    437437  QTableWidget *inputTable;
    438438
     
    441441
    442442
    443 class AtomQTQueryPipe : public QWidget {
    444   Q_OBJECT
    445 public:
    446   AtomQTQueryPipe(atom **_content, QTDialog *_dialog, QComboBox *_theBox);
    447   virtual ~AtomQTQueryPipe();
     443class AtomQtQueryPipe : public QWidget {
     444  Q_OBJECT
     445public:
     446  AtomQtQueryPipe(atom **_content, QtDialog *_dialog, QComboBox *_theBox);
     447  virtual ~AtomQtQueryPipe();
    448448
    449449public slots:
     
    452452private:
    453453  atom **content;
    454   QTDialog *dialog;
     454  QtDialog *dialog;
    455455  QComboBox *theBox;
    456456
     
    458458
    459459
    460 class AtomsQTQueryPipe : public QWidget {
    461   Q_OBJECT
    462 public:
    463   AtomsQTQueryPipe(std::vector<atom *>*_content, QTDialog *_dialog, QListWidget *_theList);
    464   virtual ~AtomsQTQueryPipe();
     460class AtomsQtQueryPipe : public QWidget {
     461  Q_OBJECT
     462public:
     463  AtomsQtQueryPipe(std::vector<atom *>*_content, QtDialog *_dialog, QListWidget *_theList);
     464  virtual ~AtomsQtQueryPipe();
    465465
    466466public slots:
     
    473473  std::map<int, atom *> lookup;
    474474  std::set<atom *> currentList;
    475   QTDialog *dialog;
     475  QtDialog *dialog;
    476476  QListWidget *theList;
    477477
    478478};
    479479
    480 class MoleculeQTQueryPipe : public QWidget {
    481   Q_OBJECT
    482 public:
    483   MoleculeQTQueryPipe(molecule **_content, QTDialog *_dialog, QComboBox *_theBox);
    484   virtual ~MoleculeQTQueryPipe();
     480class MoleculeQtQueryPipe : public QWidget {
     481  Q_OBJECT
     482public:
     483  MoleculeQtQueryPipe(molecule **_content, QtDialog *_dialog, QComboBox *_theBox);
     484  virtual ~MoleculeQtQueryPipe();
    485485
    486486public slots:
     
    489489private:
    490490  molecule **content;
    491   QTDialog *dialog;
     491  QtDialog *dialog;
    492492  QComboBox *theBox;
    493493
    494494};
    495495
    496 class MoleculesQTQueryPipe : public QWidget {
    497   Q_OBJECT
    498 public:
    499   MoleculesQTQueryPipe(std::vector<molecule *>*_content, QTDialog *_dialog, QComboBox *_theBox);
    500   virtual ~MoleculesQTQueryPipe();
     496class MoleculesQtQueryPipe : public QWidget {
     497  Q_OBJECT
     498public:
     499  MoleculesQtQueryPipe(std::vector<molecule *>*_content, QtDialog *_dialog, QComboBox *_theBox);
     500  virtual ~MoleculesQtQueryPipe();
    501501
    502502public slots:
     
    505505private:
    506506  std::vector<molecule *>*content;
    507   QTDialog *dialog;
     507  QtDialog *dialog;
    508508  QComboBox *theBox;
    509509
    510510};
    511511
    512 class VectorQTQueryPipe : public QWidget {
    513   Q_OBJECT
    514 public:
    515   VectorQTQueryPipe(Vector *_content, QTDialog *_dialog, QComboBox *_theBox);
    516   virtual ~VectorQTQueryPipe();
     512class VectorQtQueryPipe : public QWidget {
     513  Q_OBJECT
     514public:
     515  VectorQtQueryPipe(Vector *_content, QtDialog *_dialog, QComboBox *_theBox);
     516  virtual ~VectorQtQueryPipe();
    517517
    518518public slots:
     
    521521private:
    522522  Vector *content;
    523   QTDialog *dialog;
     523  QtDialog *dialog;
    524524  QComboBox *theBox;
    525525};
    526526
    527 class VectorsQTQueryPipe : public QWidget {
    528   Q_OBJECT
    529 public:
    530   VectorsQTQueryPipe(std::vector<Vector>*_content, QTDialog *_dialog, QComboBox *_theBox);
    531   virtual ~VectorsQTQueryPipe();
     527class VectorsQtQueryPipe : public QWidget {
     528  Q_OBJECT
     529public:
     530  VectorsQtQueryPipe(std::vector<Vector>*_content, QtDialog *_dialog, QComboBox *_theBox);
     531  virtual ~VectorsQtQueryPipe();
    532532
    533533public slots:
     
    536536private:
    537537  std::vector<Vector> *content;
    538   QTDialog *dialog;
     538  QtDialog *dialog;
    539539  QComboBox *theBox;
    540540};
    541541
    542 class EmptyQTQueryPipe : public QWidget {
    543   Q_OBJECT
    544 public:
    545   EmptyQTQueryPipe(QTDialog *_dialog, QLabel *_textLabel);
    546   virtual ~EmptyQTQueryPipe();
     542class EmptyQtQueryPipe : public QWidget {
     543  Q_OBJECT
     544public:
     545  EmptyQtQueryPipe(QtDialog *_dialog, QLabel *_textLabel);
     546  virtual ~EmptyQtQueryPipe();
    547547
    548548public slots:
     
    550550
    551551private:
    552   QTDialog *dialog;
     552  QtDialog *dialog;
    553553  QLabel *textLabel;
    554554};
    555555
    556 class BooleanQTQueryPipe : public QWidget {
    557   Q_OBJECT
    558 public:
    559   BooleanQTQueryPipe(const bool *_content, QTDialog *_dialog, QComboBox *_booleanComboBox);
    560   virtual ~BooleanQTQueryPipe();
     556class BooleanQtQueryPipe : public QWidget {
     557  Q_OBJECT
     558public:
     559  BooleanQtQueryPipe(const bool *_content, QtDialog *_dialog, QComboBox *_booleanComboBox);
     560  virtual ~BooleanQtQueryPipe();
    561561
    562562public slots:
     
    565565private:
    566566  const bool *content;
    567   QTDialog *dialog;
     567  QtDialog *dialog;
    568568  QComboBox *booleanComboBox;
    569569};
    570570
    571 class ElementQTQueryPipe : public QWidget {
    572   Q_OBJECT
    573 public:
    574   ElementQTQueryPipe(const element **_content, QTDialog *_dialog, QComboBox *_theBox);
    575   virtual ~ElementQTQueryPipe();
     571class ElementQtQueryPipe : public QWidget {
     572  Q_OBJECT
     573public:
     574  ElementQtQueryPipe(const element **_content, QtDialog *_dialog, QComboBox *_theBox);
     575  virtual ~ElementQtQueryPipe();
    576576
    577577public slots:
     
    580580private:
    581581  const element **content;
    582   QTDialog *dialog;
     582  QtDialog *dialog;
    583583  QComboBox *theBox;
    584584};
    585585
    586 class ElementsQTQueryPipe : public QWidget {
    587   Q_OBJECT
    588 public:
    589   ElementsQTQueryPipe(std::vector<const element *>*_content, QTDialog *_dialog, QComboBox *_theBox);
    590   virtual ~ElementsQTQueryPipe();
     586class ElementsQtQueryPipe : public QWidget {
     587  Q_OBJECT
     588public:
     589  ElementsQtQueryPipe(std::vector<const element *>*_content, QtDialog *_dialog, QComboBox *_theBox);
     590  virtual ~ElementsQtQueryPipe();
    591591
    592592public slots:
     
    595595private:
    596596  std::vector<const element *>*content;
    597   QTDialog *dialog;
     597  QtDialog *dialog;
    598598  QComboBox *theBox;
    599599};
    600600
    601 class FileQTQueryPipe : public QWidget {
    602   Q_OBJECT
    603 public:
    604   FileQTQueryPipe(boost::filesystem::path *_content, QTDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton);
    605   virtual ~FileQTQueryPipe();
     601class FileQtQueryPipe : public QWidget {
     602  Q_OBJECT
     603public:
     604  FileQtQueryPipe(boost::filesystem::path *_content, QtDialog *_dialog, QLineEdit *_filenameLineEdit, QPushButton *_filedialogButton);
     605  virtual ~FileQtQueryPipe();
    606606
    607607public slots:
     
    611611private:
    612612  boost::filesystem::path *content;
    613   QTDialog *dialog;
     613  QtDialog *dialog;
    614614  QLineEdit *filenameLineEdit;
    615615  QPushButton *filedialogButton;
  • src/UIElements/Qt4/QtMainWindow.cpp

    r81126a r4cf323d  
    77
    88/*
    9  * QTMainWindow.cpp
     9 * QtMainWindow.cpp
    1010 *
    1111 *  Created on: Jan 14, 2010
     
    1818#endif
    1919
    20 #include "QTMainWindow.hpp"
     20#include "QtMainWindow.hpp"
    2121
    2222#include<Qt/qapplication.h>
     
    4040#include "Actions/MapOfActions.hpp"
    4141#include "Menu/Menu.hpp"
    42 #include "Menu/QT4/QTMenu.hpp"
     42#include "Menu/Qt4/QtMenu.hpp"
    4343#include "Menu/ActionMenuItem.hpp"
    44 #include "Views/QT4/QTWorldView.hpp"
    45 #include "Views/QT4/GLMoleculeView.hpp"
    46 #include "Views/QT4/QTMoleculeView.hpp"
    47 #include "Views/QT4/QTStatusBar.hpp"
     44#include "Views/Qt4/QtWorldView.hpp"
     45#include "Views/Qt4/GLMoleculeView.hpp"
     46#include "Views/Qt4/QtMoleculeView.hpp"
     47#include "Views/Qt4/QtStatusBar.hpp"
    4848
    4949using namespace std;
    5050
    51 QTMainWindow::QTMainWindow(QApplication *_theApp) :
     51QtMainWindow::QtMainWindow(QApplication *_theApp) :
    5252    theApp(_theApp)
    5353{
     
    5555  QSplitter *splitter2 = new QSplitter (Qt::Vertical, splitter1 );
    5656
    57   worldDisplay = new QTWorldView(splitter2);
     57  worldDisplay = new QtWorldView(splitter2);
    5858
    59   moleculeDisplay = new QTMoleculeView();
     59  moleculeDisplay = new QtMoleculeView();
    6060  molecule3dDisplay = new GLMoleculeView();
    6161
    6262  MenuBar = menuBar();
    6363
    64   std::map <std::string, QTMenu *> NametoTextMenuMap;
     64  std::map <std::string, QtMenu *> NametoTextMenuMap;
    6565  // go through all menus and create them
    66   QTMenu *Menu = NULL;
     66  QtMenu *Menu = NULL;
    6767  for(std::map<std::string, std::pair<std::string,std::string> >::iterator iter = MapOfActions::getInstance().MenuDescription.begin(); iter != MapOfActions::getInstance().MenuDescription.end(); ++iter) {
    6868    cout << "Creating menu " << iter->first << endl;
    69     Menu = new QTMenu(iter->first.c_str());
     69    Menu = new QtMenu(iter->first.c_str());
    7070    MenuBar->addMenu(Menu);
    71     NametoTextMenuMap.insert( pair <std::string, QTMenu *> (iter->first, Menu) );
     71    NametoTextMenuMap.insert( pair <std::string, QtMenu *> (iter->first, Menu) );
    7272    //new SubMenuItem(getSuitableShortForm(iter->first),iter->second.first,main_menu,Menu);
    7373  }
     
    7777
    7878  // go through all actions and add them to its menu
    79   for (std::map <std::string, QTMenu *>::iterator MenuRunner = NametoTextMenuMap.begin(); MenuRunner != NametoTextMenuMap.end(); ++MenuRunner) {
     79  for (std::map <std::string, QtMenu *>::iterator MenuRunner = NametoTextMenuMap.begin(); MenuRunner != NametoTextMenuMap.end(); ++MenuRunner) {
    8080    cout << "Creating Action " << MenuRunner->first << " in menu " << MenuRunner->second << endl;
    8181    populateMenu(MenuRunner->second, MenuRunner->first);
     
    8888  splitter2->addWidget(worldDisplay);
    8989
    90   statusBar = new QTStatusBar(this);
     90  statusBar = new QtStatusBar(this);
    9191  setStatusBar(statusBar);
    9292
     
    9595}
    9696
    97 QTMainWindow::~QTMainWindow()
     97QtMainWindow::~QtMainWindow()
    9898{
    9999  menuBar()->clear();
     
    101101}
    102102
    103 void QTMainWindow::display() {
     103void QtMainWindow::display() {
    104104  this->show();
    105105  theApp->exec();
    106106}
    107107
    108 char QTMainWindow::getSuitableShortForm(set <char> &ShortcutList, const std::string name) const
     108char QtMainWindow::getSuitableShortForm(set <char> &ShortcutList, const std::string name) const
    109109{
    110110  for (std::string::const_iterator CharRunner = name.begin(); CharRunner != name.end(); ++CharRunner) {
     
    116116}
    117117
    118 void QTMainWindow::populateMenu(QTMenu* Menu, const  std::string &MenuName)
     118void QtMainWindow::populateMenu(QtMenu* Menu, const  std::string &MenuName)
    119119{
    120120  Action *ActionItem = NULL;
  • src/UIElements/Qt4/QtMainWindow.hpp

    r81126a r4cf323d  
    11/*
    2  * QTMainWindow.hpp
     2 * QtMainWindow.hpp
    33 *
    44 *  Created on: Jan 14, 2010
     
    1414#include <set>
    1515
    16 class QTWorldView;
     16class QtWorldView;
    1717class StringView;
    18 class QTMenu;
     18class QtMenu;
    1919class GLMoleculeView;
    20 class QTMoleculeView;
    21 class QTStatusBar;
     20class QtMoleculeView;
     21class QtStatusBar;
    2222
    23 class QTMainWindow : public QMainWindow, public MainWindow
     23class QtMainWindow : public QMainWindow, public MainWindow
    2424{
    2525  Q_OBJECT
    2626
    2727public:
    28   QTMainWindow(QApplication *_theApp);
    29   virtual ~QTMainWindow();
     28  QtMainWindow(QApplication *_theApp);
     29  virtual ~QtMainWindow();
    3030
    3131  virtual void display();
    3232
    3333  char getSuitableShortForm(std::set <char> &ShortcutList, const std::string name) const;
    34   void populateMenu(QTMenu* Menu, const  std::string &MenuName);
     34  void populateMenu(QtMenu* Menu, const  std::string &MenuName);
    3535
    3636private:
    3737  // All kinds of QTStuff used in this window
    3838  QApplication *theApp;
    39   QTWorldView *worldDisplay;
    40   QTMenu *editMoleculesMenu;
     39  QtWorldView *worldDisplay;
     40  QtMenu *editMoleculesMenu;
    4141  GLMoleculeView *molecule3dDisplay;
    42   QTMoleculeView *moleculeDisplay;
    43   QTStatusBar *statusBar;
     42  QtMoleculeView *moleculeDisplay;
     43  QtStatusBar *statusBar;
    4444  QMenuBar *MenuBar;
    4545
  • src/UIElements/Qt4/QtUIFactory.cpp

    r81126a r4cf323d  
    77
    88/*
    9  * QTUIFactory.cpp
     9 * QtUIFactory.cpp
    1010 *
    1111 *  Created on: Jan 14, 2010
     
    2424
    2525
    26 #include "UIElements/QT4/QTUIFactory.hpp"
    27 #include "UIElements/QT4/QTMainWindow.hpp"
    28 #include "UIElements/QT4/QTDialog.hpp"
     26#include "UIElements/Qt4/QtUIFactory.hpp"
     27#include "UIElements/Qt4/QtMainWindow.hpp"
     28#include "UIElements/Qt4/QtDialog.hpp"
    2929
    3030#include "Helpers/MemDebug.hpp"
     
    3535using namespace std;
    3636
    37 QTUIFactory::QTUIFactory() :
     37QtUIFactory::QtUIFactory() :
    3838  argc(1)
    3939{
     
    4545}
    4646
    47 QTUIFactory::~QTUIFactory()
     47QtUIFactory::~QtUIFactory()
    4848{
    4949  delete app;
     
    5252}
    5353
    54 Dialog* QTUIFactory::makeDialog() {
    55   return new QTDialog();
     54Dialog* QtUIFactory::makeDialog() {
     55  return new QtDialog();
    5656}
    5757
    58 MainWindow* QTUIFactory::makeMainWindow() {
    59   return new QTMainWindow(app);
     58MainWindow* QtUIFactory::makeMainWindow() {
     59  return new QtMainWindow(app);
    6060}
    6161
    62 QTUIFactory::description::description() :
    63     UIFactory::factoryDescription("QT4")
     62QtUIFactory::description::description() :
     63    UIFactory::factoryDescription("Qt4")
    6464{}
    6565
    66 QTUIFactory::description::~description()
     66QtUIFactory::description::~description()
    6767{}
    6868
    69 UIFactory* QTUIFactory::description::makeFactory(){
    70   return new QTUIFactory();
     69UIFactory* QtUIFactory::description::makeFactory(){
     70  return new QtUIFactory();
    7171}
  • src/UIElements/Qt4/QtUIFactory.hpp

    r81126a r4cf323d  
    11/*
    2  * QTUIFactory.hpp
     2 * QtUIFactory.hpp
    33 *
    44 *  Created on: Jan 14, 2010
     
    1313class QApplication;
    1414
    15 class QTUIFactory : public UIFactory
     15class QtUIFactory : public UIFactory
    1616{
    1717  friend class UIFactory;
    1818
    1919public:
    20   virtual ~QTUIFactory();
     20  virtual ~QtUIFactory();
    2121
    2222  virtual Dialog* makeDialog();
     
    3131
    3232protected:
    33   QTUIFactory();
     33  QtUIFactory();
    3434
    3535private:
Note: See TracChangeset for help on using the changeset viewer.