Changeset 4e10f5 for src/UIElements/QT4


Ignore:
Timestamp:
Jul 7, 2010, 4:08:32 PM (15 years ago)
Author:
Tillmann Crueger <crueger@…>
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:
77a570
Parents:
5630bd (diff), 192f6e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'stable' into StructureRefactoring

Conflicts:

src/Actions/WorldAction/CenterOnEdgeAction.cpp
src/Actions/WorldAction/ChangeBoxAction.cpp
src/Actions/WorldAction/RepeatBoxAction.cpp
src/Actions/WorldAction/ScaleBoxAction.cpp
src/World.cpp
src/boundary.cpp

Location:
src/UIElements/QT4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/UIElements/QT4/QTDialog.cpp

    r5630bd r4e10f5  
    115115}
    116116
     117void QTDialog::queryStrings(const char* title, std::vector<std::string> *target,string)
     118{
     119  registerQuery(new StringsQTQuery(title,target,inputLayout,this));
     120}
     121
    117122void QTDialog::queryMolecule(const char *title,molecule **target,string)
    118123{
     
    212217{
    213218  return tmp!="";
     219}
     220
     221QTDialog::StringsQTQuery::StringsQTQuery(string _title,vector<string> *_target,QBoxLayout *_parent,QTDialog *_dialog) :
     222    Dialog::StringsQuery(_title,_target),
     223    parent(_parent)
     224{
     225  thisLayout = new QHBoxLayout();
     226  titleLabel = new QLabel(QString(getTitle().c_str()));
     227  inputBox = new QLineEdit();
     228  parent->addLayout(thisLayout);
     229  thisLayout->addWidget(titleLabel);
     230  thisLayout->addWidget(inputBox);
     231
     232  pipe = new StringQTQueryPipe(&temp,_dialog);
     233  pipe->update(inputBox->text());
     234  connect(inputBox,SIGNAL(textChanged(const QString&)),pipe,SLOT(update(const QString&)));
     235}
     236
     237QTDialog::StringsQTQuery::~StringsQTQuery()
     238{
     239  delete pipe;
     240}
     241
     242// All values besides the empty string are valid
     243bool QTDialog::StringsQTQuery::handle()
     244{
     245  // dissect by ","
     246  string::iterator olditer = temp.begin();
     247  for(string::iterator iter = temp.begin(); iter != temp.end(); ++iter) {
     248    if (*iter == ' ') {
     249      tmp.push_back(string(iter, olditer));
     250      olditer = iter;
     251    }
     252  }
     253  if (olditer != temp.begin())  // insert last part also
     254    tmp.push_back(string(olditer, temp.end()));
     255
     256  return temp!="";
    214257}
    215258
  • src/UIElements/QT4/QTDialog.hpp

    r5630bd r4e10f5  
    4040  virtual void queryDouble(const char*,double *,std::string = "");
    4141  virtual void queryString(const char*, std::string *,std::string = "");
     42  virtual void queryStrings(const char*, std::vector<std::string> *,std::string = "");
    4243  virtual void queryAtom(const char*,atom**,std::string = "");
    4344  virtual void queryMolecule(const char*,molecule**,std::string = "");
     
    9394    };
    9495
     96    class StringsQTQuery : public Dialog::StringsQuery {
     97    public:
     98      StringsQTQuery(std::string _title, std::vector<std::string> *_target, QBoxLayout *_parent,QTDialog *_dialog);
     99      virtual ~StringsQTQuery();
     100      virtual bool handle();
     101    private:
     102      QBoxLayout *parent;
     103      QBoxLayout *thisLayout;
     104      QLabel *titleLabel;
     105      QLineEdit *inputBox;
     106
     107      StringQTQueryPipe *pipe;
     108    };
     109
    95110    class MoleculeQTQuery : public Dialog::MoleculeQuery {
    96111    public:
Note: See TracChangeset for help on using the changeset viewer.