Changeset 7d9416 for src/UIElements/Qt4


Ignore:
Timestamp:
Jun 13, 2012, 5:39:06 PM (13 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:
d496fd
Parents:
a483e4
git-author:
Michael Ankele <ankele@…> (05/10/12 15:00:12)
git-committer:
Frederik Heber <heber@…> (06/13/12 17:39:06)
Message:

Turned query<Box> into query<RealSpaceMatrix>

Location:
src/UIElements/Qt4
Files:
3 edited
3 moved

Legend:

Unmodified
Added
Removed
  • src/UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.cpp

    ra483e4 r7d9416  
    1818#endif
    1919
    20 #include "UIElements/Qt4/Pipe/BoxQtQueryPipe.hpp"
     20#include "UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp"
    2121#include "UIElements/Qt4/QtDialog.hpp"
    2222
     
    2626#include "CodePatterns/MemDebug.hpp"
    2727#include "LinearAlgebra/RealSpaceMatrix.hpp"
    28 #include "Box.hpp"
    2928
    30 BoxQtQueryPipe::BoxQtQueryPipe(Parameter<Box> &_content, QtDialog *_dialog, QTableWidget *_inputTable) :
     29RealSpaceMatrixQtQueryPipe::RealSpaceMatrixQtQueryPipe(Parameter<RealSpaceMatrix> &_content, QtDialog *_dialog, QTableWidget *_inputTable) :
    3130  content(_content),
    3231  dialog(_dialog),
     
    3736}
    3837
    39 BoxQtQueryPipe::~BoxQtQueryPipe()
     38RealSpaceMatrixQtQueryPipe::~RealSpaceMatrixQtQueryPipe()
    4039{
    4140  delete tmpM;
    4241}
    4342
    44 void BoxQtQueryPipe::update(int row, int column)
     43void RealSpaceMatrixQtQueryPipe::update(int row, int column)
    4544{
    4645  tmpM->at(row, column) = inputTable->item(row, column)->text().toDouble();
    47   Box b;
    48   b.setM(*tmpM);
    49   content.set(b);
     46  content.set(*tmpM);
    5047  dialog->update();
    5148}
  • src/UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp

    ra483e4 r7d9416  
    2020class QTableWidget;
    2121
    22 class Box;
    2322class QtDialog;
    2423class RealSpaceMatrix;
    2524
    2625
    27 class BoxQtQueryPipe : public QWidget {
     26class RealSpaceMatrixQtQueryPipe : public QWidget {
    2827  Q_OBJECT
    2928public:
    30   BoxQtQueryPipe(Parameter<Box> &_content, QtDialog *_dialog, QTableWidget *_inputTable);
    31   virtual ~BoxQtQueryPipe();
     29  RealSpaceMatrixQtQueryPipe(Parameter<RealSpaceMatrix> &_content, QtDialog *_dialog, QTableWidget *_inputTable);
     30  virtual ~RealSpaceMatrixQtQueryPipe();
    3231
    3332public slots:
     
    3534
    3635private:
    37   Parameter<Box> &content;
     36  Parameter<RealSpaceMatrix> &content;
    3837  QtDialog *dialog;
    3938  QTableWidget *inputTable;
  • src/UIElements/Qt4/QtDialog.cpp

    ra483e4 r7d9416  
    9595}
    9696
    97 void QtDialog::queryBox(Parameter<Box> &param, const char* title, std::string)
     97void QtDialog::queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &param, const char* title, std::string)
    9898{
    99   registerQuery(new BoxQtQuery(param,title,inputLayout,this));
     99  registerQuery(new RealSpaceMatrixQtQuery(param,title,inputLayout,this));
    100100}
    101101
  • src/UIElements/Qt4/QtDialog.hpp

    ra483e4 r7d9416  
    4949  virtual void queryVector(Parameter<Vector> &, const char*,bool,std::string = "");
    5050  virtual void queryVectors(Parameter<std::vector<Vector> > &, const char*,bool,std::string = "");
    51   virtual void queryBox(Parameter<Box> &, const char*, std::string = "");
     51  virtual void queryRealSpaceMatrix(Parameter<RealSpaceMatrix> &, const char*, std::string = "");
    5252  virtual void queryElement(Parameter<const element *> &, const char*,std::string = "");
    5353  virtual void queryElements(Parameter<std::vector<const element *> > &, const char*,std::string = "");
     
    6363  class AtomsQtQuery;
    6464  class BooleanQtQuery;
    65   class BoxQtQuery;
     65  class RealSpaceMatrixQtQuery;
    6666  class DoubleQtQuery;
    6767  class DoublesQtQuery;
  • src/UIElements/Qt4/Query/QtQuery.hpp

    ra483e4 r7d9416  
    3737class AtomsQtQueryPipe;
    3838class BooleanQtQueryPipe;
    39 class BoxQtQueryPipe;
     39class RealSpaceMatrixQtQueryPipe;
    4040class DoubleQtQueryPipe;
    4141class DoublesQtQueryPipe;
     
    9898};
    9999
    100 class QtDialog::BoxQtQuery : public Dialog::BoxQuery {
    101 public:
    102   BoxQtQuery(Parameter<Box> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
    103   virtual ~BoxQtQuery();
     100class QtDialog::RealSpaceMatrixQtQuery : public Dialog::RealSpaceMatrixQuery {
     101public:
     102  RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &, std::string _title, QBoxLayout *_parent,QtDialog *_dialog);
     103  virtual ~RealSpaceMatrixQtQuery();
    104104  virtual bool handle();
    105105private:
     
    109109  QTableWidget *inputTable;
    110110
    111   BoxQtQueryPipe *pipe;
     111  RealSpaceMatrixQtQueryPipe *pipe;
    112112};
    113113
  • src/UIElements/Qt4/Query/RealSpaceMatrixQtQuery.cpp

    ra483e4 r7d9416  
    2525
    2626#include "UIElements/Qt4/Query/QtQuery.hpp"
    27 #include "UIElements/Qt4/Pipe/BoxQtQueryPipe.hpp"
     27#include "UIElements/Qt4/Pipe/RealSpaceMatrixQtQueryPipe.hpp"
    2828
    2929#include "LinearAlgebra/RealSpaceMatrix.hpp"
    3030#include "World.hpp"
    3131
    32 QtDialog::BoxQtQuery::BoxQtQuery(Parameter<Box> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
    33     Dialog::BoxQuery(param, _title),
     32QtDialog::RealSpaceMatrixQtQuery::RealSpaceMatrixQtQuery(Parameter<RealSpaceMatrix> &param, std::string _title,QBoxLayout *_parent,QtDialog *_dialog) :
     33    Dialog::RealSpaceMatrixQuery(param, _title),
    3434    parent(_parent)
    3535{
     
    4444  inputTable->setVerticalHeaderLabels(CoordinateList);
    4545
    46   pipe = new BoxQtQueryPipe(tmp,_dialog, inputTable);
     46  pipe = new RealSpaceMatrixQtQueryPipe(tmp,_dialog, inputTable);
    4747
    4848  // fill the box with current matrix
     
    6262}
    6363
    64 QtDialog::BoxQtQuery::~BoxQtQuery()
     64QtDialog::RealSpaceMatrixQtQuery::~RealSpaceMatrixQtQuery()
    6565{
    6666  delete pipe;
    6767}
    6868
    69 bool QtDialog::BoxQtQuery::handle() {
     69bool QtDialog::RealSpaceMatrixQtQuery::handle() {
    7070  return true;
    7171}
Note: See TracChangeset for help on using the changeset viewer.