Ignore:
Timestamp:
Jul 20, 2012, 9:25:14 AM (13 years ago)
Author:
Michael Ankele <ankele@…>
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:
7b8a8e
Parents:
7c9921
Message:

Refactoring: removed QtPipe usage (list queries unusable at this point!)

Location:
src/UIElements/Qt4/Query
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/Qt4/Query/AtomQtQuery.cpp

    r7c9921 r7dfd07  
    3030#include "World.hpp"
    3131
    32 QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     32QtDialog::AtomQtQuery::AtomQtQuery(Parameter<const atom *> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    3333    Dialog::AtomQuery(_param, _title),
    3434    parent(_parent),
     
    4747  thisLayout->addWidget(inputBox);
    4848
    49   pipe = new AtomQtQueryPipe(temp,_dialog, inputBox);
    50   pipe->update(inputBox->currentIndex());
     49  onUpdate(inputBox->currentIndex());
    5150  connect(inputBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdate(int)));
    5251}
     
    5453QtDialog::AtomQtQuery::~AtomQtQuery()
    5554{
    56   delete pipe;
    5755}
    5856
  • src/UIElements/Qt4/Query/AtomsQtQuery.cpp

    r7c9921 r7dfd07  
    3333
    3434
    35 QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     35QtDialog::AtomsQtQuery::AtomsQtQuery(Parameter<std::vector<const atom *> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    3636    Dialog::AtomsQuery(_param, _title),
    3737    parent(_parent),
     
    6868  thisHLayout->addLayout(thisV2Layout);
    6969
    70   pipe = new AtomsQtQueryPipe(temp,_dialog,inputList);
    71   connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
     70  /*connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
    7271  connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(add()));
    73   connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(remove()));
     72  connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(remove()));*/
    7473}
    7574
    7675QtDialog::AtomsQtQuery::~AtomsQtQuery()
    7776{
    78   delete pipe;
    7977}
    8078
  • src/UIElements/Qt4/Query/BooleanQtQuery.cpp

    r7c9921 r7dfd07  
    2828
    2929
    30 QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     30QtDialog::BooleanQtQuery::BooleanQtQuery(Parameter<bool> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
    3131    Dialog::BooleanQuery(_param, _title),
    3232    parent(_parent),
     
    3737    temp = param.get();
    3838  thisLayout = new QHBoxLayout();
    39   titleLabel = new QLabel(QString(getTitle().c_str()),_dialog);
    40   booleanCheckBox = new QCheckBox(QString(getTitle().c_str()), _dialog);
     39  titleLabel = new QLabel(QString(getTitle().c_str()));
     40  booleanCheckBox = new QCheckBox(QString(getTitle().c_str()));
    4141  booleanCheckBox->setCheckState(temp ? Qt::Checked : Qt::Unchecked);
    4242
     
    4545  thisLayout->addWidget(booleanCheckBox);
    4646
    47   pipe = new BooleanQtQueryPipe(temp,_dialog,booleanCheckBox);
    4847  connect(booleanCheckBox, SIGNAL(stateChanged(int)), this, SLOT(onUpdate(int)));
    4948}
     
    5150QtDialog::BooleanQtQuery::~BooleanQtQuery()
    5251{
    53   delete pipe;
    5452}
    5553
  • src/UIElements/Qt4/Query/DoubleQtQuery.cpp

    r7c9921 r7dfd07  
    2828
    2929
    30 QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> &_param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
     30QtDialog::DoubleQtQuery::DoubleQtQuery(Parameter<double> &_param, std::string title,QBoxLayout *_parent,Dialog *_dialog) :
    3131    Dialog::DoubleQuery(_param, title),
    3232    parent(_parent),
     
    4646  thisLayout->addWidget(inputBox);
    4747
    48   //pipe = new DoubleQtQueryPipe(temp,_dialog);
    49   //pipe->update(inputBox->value());
    5048  connect(inputBox,SIGNAL(valueChanged(double)),this,SLOT(onUpdate(double)));
    5149}
  • src/UIElements/Qt4/Query/DoublesQtQuery.cpp

    r7c9921 r7dfd07  
    3030
    3131
    32 QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &_param, std::string title,QBoxLayout *_parent,QtDialog *_dialog) :
     32QtDialog::DoublesQtQuery::DoublesQtQuery(Parameter<std::vector<double> > &_param, std::string title,QBoxLayout *_parent,Dialog *_dialog) :
    3333    Dialog::DoublesQuery(_param, title),
    3434    parent(_parent),
     
    6161  thisHLayout->addLayout(thisV2Layout);
    6262
    63   pipe = new QtQueryListPipe<double>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     63  /*pipe = new QtQueryListPipe<double>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    6464  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    6565  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
    6666  connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(AddValue()));
    67   connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));}
     67  connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));*/
     68}
    6869
    6970QtDialog::DoublesQtQuery::~DoublesQtQuery()
    7071{
    71   delete pipe;
    7272}
    7373
  • src/UIElements/Qt4/Query/ElementQtQuery.cpp

    r7c9921 r7dfd07  
    3131#include "World.hpp"
    3232
    33 QtDialog::ElementQtQuery::ElementQtQuery(Parameter<const element *> &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     33QtDialog::ElementQtQuery::ElementQtQuery(Parameter<const element *> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
    3434    Dialog::ElementQuery(_param, _title),
    3535    parent(_parent),
     
    5252  thisLayout->addWidget(inputBox);
    5353
    54   pipe = new ElementQtQueryPipe(temp,_dialog,inputBox);
    55   pipe->update(inputBox->currentIndex());
    5654  connect(inputBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdate(int)));
    5755}
     
    5957QtDialog::ElementQtQuery::~ElementQtQuery()
    6058{
    61   delete pipe;
    6259}
    6360
  • src/UIElements/Qt4/Query/ElementsQtQuery.cpp

    r7c9921 r7dfd07  
    3232
    3333
    34 QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     34QtDialog::ElementsQtQuery::ElementsQtQuery(Parameter<std::vector<const element *> > &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
    3535    Dialog::ElementsQuery(_param, _title),
    3636    parent(_parent),
     
    5353  thisLayout->addWidget(inputBox);
    5454
    55   pipe = new ElementsQtQueryPipe(temp,_dialog,inputBox);
     55  /*pipe = new ElementsQtQueryPipe(temp,_dialog,inputBox);
    5656  pipe->update(inputBox->currentIndex());
    57   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
     57  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));*/
    5858}
    5959
    6060QtDialog::ElementsQtQuery::~ElementsQtQuery()
    6161{
    62   delete pipe;
    6362}
    6463
  • src/UIElements/Qt4/Query/EmptyQtQuery.cpp

    r7c9921 r7dfd07  
    2727
    2828
    29 QtDialog::EmptyQtQuery::EmptyQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     29QtDialog::EmptyQtQuery::EmptyQtQuery(std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
    3030    Dialog::EmptyQuery(_title),
    3131    parent(_parent),
     
    3737  parent->addLayout(thisLayout);
    3838  thisLayout->addWidget(titleLabel);
    39 
    40   pipe = new EmptyQtQueryPipe(_dialog,titleLabel);
    4139}
    4240
    4341QtDialog::EmptyQtQuery::~EmptyQtQuery()
    4442{
    45   delete pipe;
    4643}
    4744
  • src/UIElements/Qt4/Query/FileQtQuery.cpp

    r7c9921 r7dfd07  
    3030
    3131
    32 QtDialog::FileQtQuery::FileQtQuery(Parameter<boost::filesystem::path> &_param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     32QtDialog::FileQtQuery::FileQtQuery(Parameter<boost::filesystem::path> &_param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
    3333    Dialog::FileQuery(_param, _title),
    3434    parent(_parent),
     
    3636{
    3737
    38   filenameLineEdit = new QLineEdit(_dialog);
     38  filenameLineEdit = new QLineEdit();
    3939  filenameLineEdit->setText(QString());
    4040  filenameLineEdit->setReadOnly(true);
     
    4343  filenameLabel->setBuddy(filenameLineEdit);
    4444
    45   filedialogButton = new QPushButton("&Choose", _dialog);
     45  filedialogButton = new QPushButton("&Choose");
    4646  theFileDialog = NULL;
    47 
    48   pipe = new FileQtQueryPipe(temp,_dialog,filenameLineEdit,filedialogButton);
    4947
    5048  thisLayout = new QHBoxLayout();
     
    5957QtDialog::FileQtQuery::~FileQtQuery()
    6058{
    61   delete pipe;
    6259  if (theFileDialog != NULL)
    6360    delete theFileDialog;
  • src/UIElements/Qt4/Query/FilesQtQuery.cpp

    r7c9921 r7dfd07  
    3232
    3333
    34 QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string _title, QBoxLayout *_parent, QtDialog *_dialog) :
     34QtDialog::FilesQtQuery::FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &param, std::string _title, QBoxLayout *_parent, Dialog *_dialog) :
    3535    Dialog::FilesQuery(param, _title),
    3636    parent(_parent),
     
    6363  thisHLayout->addLayout(thisV2Layout);
    6464
    65   pipe = new QtQueryListPipe<boost::filesystem::path>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     65  /*pipe = new QtQueryListPipe<boost::filesystem::path>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    6666  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    6767  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
    6868  connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(AddValue()));
    69   connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));
     69  connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));*/
    7070}
    7171
    7272QtDialog::FilesQtQuery::~FilesQtQuery()
    7373{
    74   delete pipe;
    7574}
    7675
  • src/UIElements/Qt4/Query/IntQtQuery.cpp

    r7c9921 r7dfd07  
    2828
    2929
    30 QtDialog::IntQtQuery::IntQtQuery(Parameter<int> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     30QtDialog::IntQtQuery::IntQtQuery(Parameter<int> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    3131    Dialog::IntQuery(_param, _title),
    3232    parent(_parent),
     
    4444  thisLayout->addWidget(inputBox);
    4545
    46   pipe = new IntQtQueryPipe(temp,_dialog);
    47   pipe->update(inputBox->value());
    4846  connect(inputBox,SIGNAL(valueChanged(int)),this,SLOT(onUpdate(int)));
    4947}
     
    5149QtDialog::IntQtQuery::~IntQtQuery()
    5250{
    53   delete pipe;
    5451}
    5552
  • src/UIElements/Qt4/Query/IntsQtQuery.cpp

    r7c9921 r7dfd07  
    3030
    3131
    32 QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     32QtDialog::IntsQtQuery::IntsQtQuery(Parameter<std::vector<int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    3333    Dialog::IntsQuery(_param, _title),
    3434    parent(_parent),
     
    6161  thisHLayout->addLayout(thisV2Layout);
    6262
    63   pipe = new QtQueryListPipe<int>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     63  /*pipe = new QtQueryListPipe<int>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    6464  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    6565  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
    6666  connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(AddValue()));
    67   connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));
     67  connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));*/
    6868}
    6969
    7070QtDialog::IntsQtQuery::~IntsQtQuery()
    7171{
    72   delete pipe;
    7372}
    7473
  • src/UIElements/Qt4/Query/MoleculeQtQuery.cpp

    r7c9921 r7dfd07  
    3131
    3232
    33 QtDialog::MoleculeQtQuery::MoleculeQtQuery(Parameter<const molecule *> &_param, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
     33QtDialog::MoleculeQtQuery::MoleculeQtQuery(Parameter<const molecule *> &_param, std::string _title, QBoxLayout *_parent,Dialog *_dialog) :
    3434    Dialog::MoleculeQuery(_param, _title),
    3535    parent(_parent),
     
    5252  thisLayout->addWidget(inputBox);
    5353
    54   pipe = new MoleculeQtQueryPipe(temp,_dialog,inputBox);
    55   pipe->update(inputBox->currentIndex());
    5654  connect(inputBox,SIGNAL(currentIndexChanged(int)),this,SLOT(onUpdate(int)));
    5755}
     
    5957QtDialog::MoleculeQtQuery::~MoleculeQtQuery()
    6058{
    61   delete pipe;
    6259}
    6360
  • src/UIElements/Qt4/Query/MoleculesQtQuery.cpp

    r7c9921 r7dfd07  
    3131
    3232
    33 QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &_param, std::string _title, QBoxLayout *_parent,QtDialog *_dialog) :
     33QtDialog::MoleculesQtQuery::MoleculesQtQuery(Parameter<std::vector<const molecule *> > &_param, std::string _title, QBoxLayout *_parent,Dialog *_dialog) :
    3434    Dialog::MoleculesQuery(_param, _title),
    3535    parent(_parent),
     
    5252  thisLayout->addWidget(inputBox);
    5353
    54   pipe = new MoleculesQtQueryPipe(temp,_dialog,inputBox);
     54  /*pipe = new MoleculesQtQueryPipe(temp,_dialog,inputBox);
    5555  pipe->update(inputBox->currentIndex());
    56   connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));
     56  connect(inputBox,SIGNAL(currentIndexChanged(int)),pipe,SLOT(update(int)));*/
    5757}
    5858
    5959QtDialog::MoleculesQtQuery::~MoleculesQtQuery()
    6060{
    61   delete pipe;
    6261}
    6362
  • src/UIElements/Qt4/Query/QtQuery.hpp

    r7c9921 r7dfd07  
    3434class QFileDialog;
    3535
    36 // Forward declarations for plumbing
    37 template<typename T> class QtQueryListPipe;
    38 class AtomQtQueryPipe;
    39 class AtomsQtQueryPipe;
    40 class BooleanQtQueryPipe;
    41 class RealSpaceMatrixQtQueryPipe;
    42 class DoubleQtQueryPipe;
    43 class DoublesQtQueryPipe;
    44 class ElementQtQueryPipe;
    45 class ElementsQtQueryPipe;
    46 class EmptyQtQueryPipe;
    47 class FileQtQueryPipe;
    48 class FilesQtQueryPipe;
    49 class IntQtQueryPipe;
    50 class MoleculeQtQueryPipe;
    51 class MoleculesQtQueryPipe;
    52 class StringQtQueryPipe;
    53 class StringsQtQueryPipe;
    54 class UnsignedIntQtQueryPipe;
    55 class UnsignedIntsQtQueryPipe;
    56 class VectorQtQueryPipe;
    57 class VectorsQtQueryPipe;
    58 class RandomNumberDistribution_ParametersQtQueryPipe;
    59 
    6036class QtDialog::AtomQtQuery : public QWidget, public Dialog::AtomQuery {
    6137  Q_OBJECT
    6238public:
    63   AtomQtQuery(Parameter<const atom *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     39  AtomQtQuery(Parameter<const atom *> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
    6440  virtual ~AtomQtQuery();
    6541  virtual bool handle();
     
    7349  QLabel *titleLabel;
    7450  QComboBox *inputBox;
    75   QtDialog *dialog;
    76 
    77   AtomQtQueryPipe *pipe;
     51  Dialog *dialog;
    7852};
    7953
     
    8155  Q_OBJECT
    8256public:
    83   AtomsQtQuery(Parameter<std::vector<const atom *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     57  AtomsQtQuery(Parameter<std::vector<const atom *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
    8458  virtual ~AtomsQtQuery();
    8559  virtual bool handle();
     
    9468  QLabel *inputLabel;
    9569  QListWidget *inputList;
    96   QtDialog *dialog;
    97 
    98   AtomsQtQueryPipe *pipe;
     70  Dialog *dialog;
    9971};
    10072
     
    10274  Q_OBJECT
    10375public:
    104   BooleanQtQuery(Parameter<bool> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     76  BooleanQtQuery(Parameter<bool> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
    10577  virtual ~BooleanQtQuery();
    10678  virtual bool handle();
     
    11486  QLabel *titleLabel;
    11587  QCheckBox *booleanCheckBox;
    116   QtDialog *dialog;
    117 
    118   BooleanQtQueryPipe *pipe;
     88  Dialog *dialog;
    11989};
    12090
     
    12292  Q_OBJECT
    12393public:
    124   RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     94  RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
    12595  virtual ~RealSpaceMatrixQtQuery();
    12696  virtual bool handle();
     
    134104  QLabel *titleLabel;
    135105  QTableWidget *inputTable;
    136   QtDialog *dialog;
    137 
    138   RealSpaceMatrixQtQueryPipe *pipe;
     106  Dialog *dialog;
    139107};
    140108
     
    142110  Q_OBJECT
    143111public:
    144   DoubleQtQuery(Parameter<double> &, std::string title,QBoxLayout *_parent,QtDialog *_dialog);
     112  DoubleQtQuery(Parameter<double> &, std::string title,QBoxLayout *_parent,Dialog *_dialog);
    145113  virtual ~DoubleQtQuery();
    146114  virtual bool handle();
     
    154122  QLabel *titleLabel;
    155123  QDoubleSpinBox *inputBox;
    156   QtDialog *dialog;
    157 
    158   DoubleQtQueryPipe *pipe;
     124  Dialog *dialog;
    159125};
    160126
     
    162128  Q_OBJECT
    163129public:
    164   DoublesQtQuery(Parameter<std::vector<double> > &, std::string title,QBoxLayout *_parent,QtDialog *_dialog);
     130  DoublesQtQuery(Parameter<std::vector<double> > &, std::string title,QBoxLayout *_parent,Dialog *_dialog);
    165131  virtual ~DoublesQtQuery();
    166132  virtual bool handle();
     
    174140  QLabel *titleLabel;
    175141  QDoubleSpinBox *inputBox;
    176   QtDialog *dialog;
    177 
    178   QtQueryListPipe<double> *pipe;
     142  Dialog *dialog;
    179143};
    180144
     
    182146  Q_OBJECT
    183147public:
    184   ElementQtQuery(Parameter<const element *> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     148  ElementQtQuery(Parameter<const element *> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
    185149  virtual ~ElementQtQuery();
    186150  virtual bool handle();
     
    194158  QLabel *titleLabel;
    195159  QComboBox *inputBox;
    196   QtDialog *dialog;
    197 
    198   ElementQtQueryPipe *pipe;
     160  Dialog *dialog;
    199161};
    200162
     
    202164  Q_OBJECT
    203165public:
    204   ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     166  ElementsQtQuery(Parameter<std::vector<const element *> > &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
    205167  virtual ~ElementsQtQuery();
    206168  virtual bool handle();
     
    214176  QLabel *titleLabel;
    215177  QComboBox *inputBox;
    216   QtDialog *dialog;
    217 
    218   ElementsQtQueryPipe *pipe;
     178  Dialog *dialog;
    219179};
    220180
    221181class QtDialog::EmptyQtQuery : public Dialog::EmptyQuery {
    222182public:
    223   EmptyQtQuery(std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     183  EmptyQtQuery(std::string _title, QBoxLayout *_parent, Dialog *_dialog);
    224184  virtual ~EmptyQtQuery();
    225185  virtual bool handle();
     
    228188  QBoxLayout *thisLayout;
    229189  QLabel *titleLabel;
    230   QtDialog *dialog;
    231 
    232   EmptyQtQueryPipe *pipe;
     190  Dialog *dialog;
    233191};
    234192
     
    236194  Q_OBJECT
    237195public:
    238   FileQtQuery(Parameter<boost::filesystem::path> &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     196  FileQtQuery(Parameter<boost::filesystem::path> &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
    239197  virtual ~FileQtQuery();
    240198  virtual bool handle();
     
    251209  QPushButton *filedialogButton;
    252210  QFileDialog *theFileDialog;
    253   QtDialog *dialog;
    254 
    255   FileQtQueryPipe *pipe;
     211  Dialog *dialog;
    256212};
    257213
     
    259215  Q_OBJECT
    260216public:
    261   FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &, std::string _title, QBoxLayout *_parent, QtDialog *_dialog);
     217  FilesQtQuery(Parameter<std::vector< boost::filesystem::path> > &, std::string _title, QBoxLayout *_parent, Dialog *_dialog);
    262218  virtual ~FilesQtQuery();
    263219  virtual bool handle();
     
    274230  QBoxLayout *thisLayout;
    275231  QLabel *titleLabel;
    276   QtDialog *dialog;
    277 
    278   QtQueryListPipe<boost::filesystem::path> *pipe;
     232  Dialog *dialog;
    279233};
    280234
     
    282236  Q_OBJECT
    283237public:
    284   IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
     238  IntQtQuery(Parameter<int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
    285239  virtual ~IntQtQuery();
    286240  virtual bool handle();
     
    294248  QLabel *titleLabel;
    295249  QSpinBox *inputBox;
    296   QtDialog *dialog;
    297 
    298   IntQtQueryPipe *pipe;
     250  Dialog *dialog;
    299251};
    300252
     
    302254  Q_OBJECT
    303255public:
    304   IntsQtQuery(Parameter<std::vector<int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
     256  IntsQtQuery(Parameter<std::vector<int> > &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
    305257  virtual ~IntsQtQuery();
    306258  virtual bool handle();
     
    317269  QBoxLayout *thisLayout;
    318270  QLabel *titleLabel;
    319   QtDialog *dialog;
    320 
    321   QtQueryListPipe<int> *pipe;
     271  Dialog *dialog;
    322272};
    323273
     
    325275  Q_OBJECT
    326276public:
    327   MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     277  MoleculeQtQuery(Parameter<const molecule *> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
    328278  virtual ~MoleculeQtQuery();
    329279  virtual bool handle();
     
    337287  QLabel *titleLabel;
    338288  QComboBox *inputBox;
    339   QtDialog *dialog;
    340 
    341   MoleculeQtQueryPipe *pipe;
     289  Dialog *dialog;
    342290};
    343291
     
    345293  Q_OBJECT
    346294public:
    347   MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     295  MoleculesQtQuery(Parameter<std::vector<const molecule *> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
    348296  virtual ~MoleculesQtQuery();
    349297  virtual bool handle();
     
    357305  QLabel *titleLabel;
    358306  QComboBox *inputBox;
    359   QtDialog *dialog;
    360 
    361   MoleculesQtQueryPipe *pipe;
     307  Dialog *dialog;
    362308};
    363309
     
    365311  Q_OBJECT
    366312public:
    367   StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     313  StringQtQuery(Parameter<std::string> &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
    368314  virtual ~StringQtQuery();
    369315  virtual bool handle();
     
    377323  QLabel *titleLabel;
    378324  QLineEdit *inputBox;
    379   QtDialog *dialog;
    380 
    381   StringQtQueryPipe *pipe;
     325  Dialog *dialog;
    382326};
    383327
     
    385329  Q_OBJECT
    386330public:
    387   StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     331  StringsQtQuery(Parameter<std::vector<std::string> > &, std::string _title, QBoxLayout *_parent,Dialog *_dialog);
    388332  virtual ~StringsQtQuery();
    389333  virtual bool handle();
     
    397341  QLabel *titleLabel;
    398342  QLineEdit *inputBox;
    399   QtDialog *dialog;
    400 
    401   StringsQtQueryPipe *pipe;
     343  Dialog *dialog;
    402344};
    403345
     
    405347  Q_OBJECT
    406348public:
    407   UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
     349  UnsignedIntQtQuery(Parameter<unsigned int> &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
    408350  virtual ~UnsignedIntQtQuery();
    409351  virtual bool handle();
     
    417359  QLabel *titleLabel;
    418360  QSpinBox *inputBox;
    419   QtDialog *dialog;
    420 
    421   UnsignedIntQtQueryPipe *pipe;
     361  Dialog *dialog;
    422362};
    423363
     
    425365  Q_OBJECT
    426366public:
    427   UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title,QBoxLayout *_parent,QtDialog *_dialog);
     367  UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &, std::string _title,QBoxLayout *_parent,Dialog *_dialog);
    428368  virtual ~UnsignedIntsQtQuery();
    429369  virtual bool handle();
     
    440380  QBoxLayout *thisLayout;
    441381  QLabel *titleLabel;
    442   QtDialog *dialog;
    443 
    444   QtQueryListPipe<unsigned int> *pipe;
     382  Dialog *dialog;
    445383};
    446384
     
    449387  Q_OBJECT
    450388public:
    451   VectorQtQuery(Parameter<Vector> &, std::string title,QBoxLayout *,QtDialog *);
     389  VectorQtQuery(Parameter<Vector> &, std::string title,QBoxLayout *,Dialog *);
    452390  virtual ~VectorQtQuery();
    453391  virtual bool handle();
     
    468406  QDoubleSpinBox *coordInputY;
    469407  QDoubleSpinBox *coordInputZ;
    470   QtDialog *dialog;
    471 
    472   VectorQtQueryPipe *pipe;
     408  Dialog *dialog;
    473409};
    474410
     
    476412  Q_OBJECT
    477413public:
    478   VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title,QBoxLayout *,QtDialog *);
     414  VectorsQtQuery(Parameter<std::vector<Vector> > &, std::string title,QBoxLayout *,Dialog *);
    479415  virtual ~VectorsQtQuery();
    480416  virtual bool handle();
     
    491427  QLabel *coordLabel;
    492428  QDoubleSpinBox *coordInput;
    493   QtDialog *dialog;
    494 
    495   VectorsQtQueryPipe *pipe;
     429  Dialog *dialog;
    496430};
    497431
     
    499433  Q_OBJECT
    500434public:
    501   RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,QtDialog *);
     435  RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &, std::string title,QBoxLayout *,Dialog *);
    502436  virtual ~RandomNumberDistribution_ParametersQtQuery();
    503437  virtual bool handle();
     
    512446  QTextEdit *inputBox;
    513447  QPushButton *okButton;
    514   QtDialog *dialog;
    515 
    516   RandomNumberDistribution_ParametersQtQueryPipe *pipe;
     448  Dialog *dialog;
    517449};
    518450
  • src/UIElements/Qt4/Query/RandomNumberDistribution_ParametersQtQuery.cpp

    r7c9921 r7dfd07  
    3131#include "World.hpp"
    3232
    33 QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     33QtDialog::RandomNumberDistribution_ParametersQtQuery::RandomNumberDistribution_ParametersQtQuery(Parameter<RandomNumberDistribution_Parameters> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    3434    Dialog::RandomNumberDistribution_ParametersQuery(_param, _title),
    3535    parent(_parent),
     
    5151  okButton = new QPushButton(tr("Ok"));
    5252
    53   pipe = new RandomNumberDistribution_ParametersQtQueryPipe(temp,_dialog, inputBox);
    5453  connect(okButton,SIGNAL(clicked()),this,SLOT(onUpdate()));
    5554}
     
    5756QtDialog::RandomNumberDistribution_ParametersQtQuery::~RandomNumberDistribution_ParametersQtQuery()
    5857{
    59   delete pipe;
    6058}
    6159
  • src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp

    r7c9921 r7dfd07  
    3030#include "World.hpp"
    3131
    32 QtDialog::RealSpaceMatrixQtQuery::RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     32QtDialog::RealSpaceMatrixQtQuery::RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    3333    Dialog::RealSpaceMatrixQuery(_param, _title),
    3434    parent(_parent),
     
    3939
    4040  // init input table
    41   inputTable = new QTableWidget(3,3, _dialog);
     41  inputTable = new QTableWidget(3,3);
    4242  QStringList CoordinateList;
    4343  CoordinateList << "x" << "y" << "z";
    4444  inputTable->setHorizontalHeaderLabels(CoordinateList);
    4545  inputTable->setVerticalHeaderLabels(CoordinateList);
    46 
    47   pipe = new RealSpaceMatrixQtQueryPipe(temp,_dialog, inputTable);
    4846
    4947  // fill the box with current matrix
     
    5351      QTableWidgetItem *newItem = new QTableWidgetItem(tr("%1").arg(domain.at(i,j)));
    5452      inputTable->setItem(i,j,newItem);
    55       pipe->update(i,j);
     53      onUpdate(i,j);
    5654    }
    5755
     
    6563QtDialog::RealSpaceMatrixQtQuery::~RealSpaceMatrixQtQuery()
    6664{
    67   delete pipe;
    6865}
    6966
  • src/UIElements/Qt4/Query/StringQtQuery.cpp

    r7c9921 r7dfd07  
    2828
    2929
    30 QtDialog::StringQtQuery::StringQtQuery(Parameter<std::string> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     30QtDialog::StringQtQuery::StringQtQuery(Parameter<std::string> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    3131    Dialog::StringQuery(_param, _title),
    3232    parent(_parent),
     
    4343  thisLayout->addWidget(inputBox);
    4444
    45   pipe = new StringQtQueryPipe(temp,_dialog);
    46   pipe->update(inputBox->text());
     45  onUpdate(inputBox->text());
    4746  connect(inputBox,SIGNAL(textChanged(const QString&)),this,SLOT(onUpdate(const QString&)));
    4847}
     
    5049QtDialog::StringQtQuery::~StringQtQuery()
    5150{
    52   delete pipe;
    5351}
    5452
  • src/UIElements/Qt4/Query/StringsQtQuery.cpp

    r7c9921 r7dfd07  
    3030
    3131
    32 QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     32QtDialog::StringsQtQuery::StringsQtQuery(Parameter<std::vector<std::string> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    3333    Dialog::StringsQuery(_param, _title),
    3434    parent(_parent),
     
    6161  thisHLayout->addLayout(thisV2Layout);
    6262
    63   pipe = new StringsQtQueryPipe(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     63 /* pipe = new StringsQtQueryPipe(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    6464  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(elementEntered(const QString&)));
    6565  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(elementSelected()));
    6666  connect(AddButton,SIGNAL(clicked()),pipe,SLOT(addElement()));
    67   connect(RemoveButton,SIGNAL(clicked()),pipe,SLOT(removeElement()));}
     67  connect(RemoveButton,SIGNAL(clicked()),pipe,SLOT(removeElement()));*/
     68}
    6869
    6970QtDialog::StringsQtQuery::~StringsQtQuery()
    7071{
    71   delete pipe;
    7272}
    7373
  • src/UIElements/Qt4/Query/UnsignedIntQtQuery.cpp

    r7c9921 r7dfd07  
    2828
    2929
    30 QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(Parameter<unsigned int> &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     30QtDialog::UnsignedIntQtQuery::UnsignedIntQtQuery(Parameter<unsigned int> &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    3131    Dialog::UnsignedIntQuery(_param, _title),
    3232    parent(_parent),
     
    4444  thisLayout->addWidget(inputBox);
    4545
    46   pipe = new UnsignedIntQtQueryPipe(temp,_dialog);
    47   pipe->update(inputBox->value());
     46  onUpdate(inputBox->value());
    4847  connect(inputBox,SIGNAL(valueChanged(unsigned int)),this,SLOT(onUpdate(unsigned int)));
    4948}
     
    5150QtDialog::UnsignedIntQtQuery::~UnsignedIntQtQuery()
    5251{
    53   delete pipe;
    5452}
    5553
  • src/UIElements/Qt4/Query/UnsignedIntsQtQuery.cpp

    r7c9921 r7dfd07  
    3030
    3131
    32 QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &_param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     32QtDialog::UnsignedIntsQtQuery::UnsignedIntsQtQuery(Parameter<std::vector<unsigned int> > &_param, std::string _title,QBoxLayout *_parent,Dialog *_dialog) :
    3333    Dialog::UnsignedIntsQuery(_param, _title),
    3434    parent(_parent),
     
    6161  thisHLayout->addLayout(thisV2Layout);
    6262
    63   pipe = new QtQueryListPipe<unsigned int>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);
     63  /*pipe = new QtQueryListPipe<unsigned int>(temp,_dialog,inputBox,inputList,AddButton,RemoveButton);
    6464  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(IntegerEntered(const QString&)));
    6565  connect(inputList,SIGNAL(itemSelectionChanged()),pipe,SLOT(IntegerSelected()));
    6666  connect(AddButton,SIGNAL(Clicked()),pipe,SLOT(AddValue()));
    67   connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));
     67  connect(RemoveButton,SIGNAL(Clicked()),pipe,SLOT(RemoveRow()));*/
    6868}
    6969
    7070QtDialog::UnsignedIntsQtQuery::~UnsignedIntsQtQuery()
    7171{
    72   delete pipe;
    7372}
    7473
  • src/UIElements/Qt4/Query/VectorQtQuery.cpp

    r7c9921 r7dfd07  
    2929
    3030
    31 QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> &_param, std::string title, QBoxLayout *_parent,QtDialog *_dialog) :
     31QtDialog::VectorQtQuery::VectorQtQuery(Parameter<Vector> &_param, std::string title, QBoxLayout *_parent,Dialog *_dialog) :
    3232    Dialog::VectorQuery(_param, title),
    3333    parent(_parent),
     
    6565  coordInputZ->setDecimals(3);
    6666  coordLayout->addWidget(coordInputZ);
    67   pipe = new VectorQtQueryPipe(temp,_dialog,inputBox);
    68   //pipe->update(coordInput->value());
    6967  connect(coordInputX,SIGNAL(valueChanged(double)),this,SLOT(onUpdateX(double)));
    7068  connect(coordInputY,SIGNAL(valueChanged(double)),this,SLOT(onUpdateY(double)));
  • src/UIElements/Qt4/Query/VectorsQtQuery.cpp

    r7c9921 r7dfd07  
    2929
    3030
    31 QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &_param, std::string title, QBoxLayout *_parent,QtDialog *_dialog) :
     31QtDialog::VectorsQtQuery::VectorsQtQuery(Parameter<std::vector<Vector> > &_param, std::string title, QBoxLayout *_parent,Dialog *_dialog) :
    3232    Dialog::VectorsQuery(_param, title),
    3333    parent(_parent),
     
    4848  coordInput->setDecimals(3);
    4949  coordLayout->addWidget(coordInput);
    50   pipe = new VectorsQtQueryPipe(temp,_dialog,inputBox);
     50  /*pipe = new VectorsQtQueryPipe(temp,_dialog,inputBox);
    5151  //pipe->update(coordInput->value());
    52   connect(coordInput,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));
     52  connect(coordInput,SIGNAL(valueChanged(double)),pipe,SLOT(update(double)));*/
    5353  parent->addLayout(mainLayout);
    5454}
Note: See TracChangeset for help on using the changeset viewer.