Changeset d3a5ea
- Timestamp:
- Jan 19, 2010, 10:51:07 AM (16 years ago)
- 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:
- f8879d
- Parents:
- a6f180
- Location:
- src
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Makefile.am
ra6f180 rd3a5ea 17 17 UIHEADER = ${ACTIONSHEADER} ${VIEWHEADER} ${MENUHEADER} UIElements/UIFactory.hpp UIElements/TextUIFactory.hpp UIElements/MainWindow.hpp UIElements/TextWindow.hpp UIElements/Dialog.hpp UIElements/TextDialog.hpp 18 18 19 QTUIMOC_HEADER = UIElements/QT4/QTMainWindow.hpp Menu/QT4/QTMenu.hpp20 QTUIMOC_TARGETS = QTMainWindow.moc.cpp QTMenu.moc.cpp 19 QTUIMOC_HEADER = UIElements/QT4/QTMainWindow.hpp UIElements/QT4/QTDialog.hpp Menu/QT4/QTMenu.hpp 20 QTUIMOC_TARGETS = QTMainWindow.moc.cpp QTMenu.moc.cpp QTDialog.moc.cpp 21 21 22 QTUISOURCE = ${QTUIMOC_TARGETS} UIElements/QT4/QTMainWindow.cpp UIElements/QT4/QT UIFactory.cpp Menu/QT4/QTMenu.cpp22 QTUISOURCE = ${QTUIMOC_TARGETS} UIElements/QT4/QTMainWindow.cpp UIElements/QT4/QTDialog.cpp UIElements/QT4/QTUIFactory.cpp Menu/QT4/QTMenu.cpp 23 23 QTUIHEADER = ${QTUIMOC_HEADER} UIElements/QT4/QTUIFactory.hpp 24 24 … … 58 58 # Therfore `%'-rules do not seem to work 59 59 #Quick fix to get it done otherwise 60 ${QTUIMOC_TARGETS}: 60 ${QTUIMOC_TARGETS}: ${QTUIMOC_HEADER} 61 61 list='$(QTUIMOC_HEADER)'; for header in $$list; do \ 62 62 echo "Making mocfile for $$header"; \ -
src/Menu/QT4/QTMenu.cpp
ra6f180 rd3a5ea 26 26 const string description = item->getDescription(); 27 27 QAction *action = addAction(QString(description.c_str())); 28 QT Pipe *pipe = new QTPipe(item,action);28 QTMenuPipe *pipe = new QTMenuPipe(item,action); 29 29 QObject::connect(action, SIGNAL(triggered()),pipe,SLOT(called())); 30 30 plumbing.push_back(pipe); … … 32 32 33 33 void QTMenu::removeItem(MenuItem* item) { 34 list<QT Pipe*>::iterator iter;34 list<QTMenuPipe*>::iterator iter; 35 35 for(iter=plumbing.begin(); iter!=plumbing.end(); iter++){ 36 36 delete (*iter); … … 42 42 } 43 43 44 QT Pipe::QTPipe(MenuItem *_item, QAction *_action) :44 QTMenuPipe::QTMenuPipe(MenuItem *_item, QAction *_action) : 45 45 theItem(_item), theAction(_action) 46 46 {} 47 47 48 QT Pipe::~QTPipe() {48 QTMenuPipe::~QTMenuPipe() { 49 49 delete theAction; 50 50 delete theItem; 51 51 } 52 52 53 void QT Pipe::called() {53 void QTMenuPipe::called() { 54 54 theItem->doTrigger(); 55 55 } -
src/Menu/QT4/QTMenu.hpp
ra6f180 rd3a5ea 16 16 #include "Menu/Menu.hpp" 17 17 18 class QT Pipe;18 class QTMenuPipe; 19 19 20 20 class QTMenu : public QMenu, public Menu … … 30 30 virtual void display(); 31 31 private: 32 list<QT Pipe*> plumbing;32 list<QTMenuPipe*> plumbing; 33 33 }; 34 34 35 35 // This handles the plumbing from QT to internal Items 36 class QTPipe : public QObject { 36 // Slots from QT are redirected to internal methods. 37 // This way methods can be used where no QT is available 38 class QTMenuPipe : public QObject { 37 39 Q_OBJECT 38 40 public: 39 QT Pipe(MenuItem*,QAction*);40 virtual ~QT Pipe();41 QTMenuPipe(MenuItem*,QAction*); 42 virtual ~QTMenuPipe(); 41 43 public slots: 42 44 void called(); -
src/UIElements/Dialog.cpp
ra6f180 rd3a5ea 29 29 30 30 bool Dialog::display(){ 31 if(checkAll()){ 32 setAll(); 33 return true; 34 } 35 else{ 36 return false; 37 } 38 } 39 40 bool Dialog::checkAll(){ 31 41 list<Query*>::iterator iter; 32 42 bool retval = true; … … 37 47 break; 38 48 } 39 if (retval){ 40 // if all queries succeeded we can set the targets to appropriate values 41 for(iter=queries.begin(); iter!=queries.end(); iter++) { 42 (*iter)->setResult(); 43 } 49 return retval; 50 } 51 52 void Dialog::setAll(){ 53 list<Query*>::iterator iter; 54 for(iter=queries.begin(); iter!=queries.end(); iter++) { 55 (*iter)->setResult(); 44 56 } 45 return retval;46 57 } 47 58 … … 74 85 75 86 Dialog::StringQuery::StringQuery(string title,string *_target) : 76 Query(title), target(_target) 87 Query(title), 88 target(_target), 89 tmp("") 77 90 {} 78 91 -
src/UIElements/Dialog.hpp
ra6f180 rd3a5ea 26 26 27 27 virtual bool display(); 28 29 virtual bool checkAll(); 30 virtual void setAll(); 28 31 29 32 protected: -
src/UIElements/QT4/QTUIFactory.cpp
ra6f180 rd3a5ea 15 15 #include "UIElements/QT4/QTUIFactory.hpp" 16 16 #include "UIElements/QT4/QTMainWindow.hpp" 17 #include "UIElements/QT4/QTDialog.hpp" 17 18 #include "defs.hpp" 18 19 … … 29 30 30 31 Dialog* QTUIFactory::makeDialog() { 31 assert(0 && "Not implemented yet"); 32 return 0; 32 return new QTDialog(); 33 33 } 34 34
Note:
See TracChangeset
for help on using the changeset viewer.