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
        Candidate_v1.7.0
        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
      
      
      
| Rev | Line |   | 
|---|
| [b47bfc] | 1 | /*
 | 
|---|
| [4cf323d] | 2 |  * QtStatusBar.hpp
 | 
|---|
| [b47bfc] | 3 |  *
 | 
|---|
 | 4 |  *  Created on: Feb 17, 2010
 | 
|---|
 | 5 |  *      Author: crueger
 | 
|---|
 | 6 |  */
 | 
|---|
 | 7 | 
 | 
|---|
 | 8 | #ifndef QTSTATUSBAR_HPP_
 | 
|---|
 | 9 | #define QTSTATUSBAR_HPP_
 | 
|---|
 | 10 | 
 | 
|---|
| [56f73b] | 11 | // include config.h
 | 
|---|
 | 12 | #ifdef HAVE_CONFIG_H
 | 
|---|
 | 13 | #include <config.h>
 | 
|---|
 | 14 | #endif
 | 
|---|
 | 15 | 
 | 
|---|
 | 16 | 
 | 
|---|
| [b47bfc] | 17 | #include <map>
 | 
|---|
 | 18 | #include <utility>
 | 
|---|
 | 19 | #include <string>
 | 
|---|
 | 20 | #include <QtGui/QStatusBar>
 | 
|---|
 | 21 | 
 | 
|---|
| [02ce36] | 22 | #include "CodePatterns/Observer/Observer.hpp"
 | 
|---|
| [b47bfc] | 23 | 
 | 
|---|
| [378f2d5] | 24 | class QBoxLayout;
 | 
|---|
| [b47bfc] | 25 | class QLabel;
 | 
|---|
 | 26 | class QProgressBar;
 | 
|---|
| [378f2d5] | 27 | class QTimer;
 | 
|---|
| [b47bfc] | 28 | 
 | 
|---|
| [ce7fdc] | 29 | namespace MoleCuilder {
 | 
|---|
| [378f2d5] | 30 |   class ActionStatusList;
 | 
|---|
| [ce7fdc] | 31 |   class Process;
 | 
|---|
 | 32 | }
 | 
|---|
 | 33 | 
 | 
|---|
| [4cf323d] | 34 | class QtStatusBar : public QStatusBar, public Observer
 | 
|---|
| [b47bfc] | 35 | {
 | 
|---|
 | 36 |   Q_OBJECT
 | 
|---|
 | 37 | 
 | 
|---|
 | 38 |   struct progressIndicator{
 | 
|---|
| [426c84] | 39 |     progressIndicator(const std::string &name);
 | 
|---|
| [b47bfc] | 40 |     ~progressIndicator();
 | 
|---|
 | 41 |     QLabel *label;
 | 
|---|
 | 42 |     QProgressBar *bar;
 | 
|---|
 | 43 |     QBoxLayout *layout;
 | 
|---|
 | 44 |     QWidget *container;
 | 
|---|
 | 45 |   };
 | 
|---|
 | 46 | public:
 | 
|---|
| [4cf323d] | 47 |   QtStatusBar(QWidget *parent=0);
 | 
|---|
 | 48 |   virtual ~QtStatusBar();
 | 
|---|
| [b47bfc] | 49 | 
 | 
|---|
 | 50 |   void update(Observable *subject);
 | 
|---|
 | 51 |   void subjectKilled(Observable *subject);
 | 
|---|
| [378f2d5] | 52 |   void recieveNotification(Observable *_publisher, Notification *_notification);
 | 
|---|
| [b47bfc] | 53 | 
 | 
|---|
| [426c84] | 54 | private slots:
 | 
|---|
 | 55 |   void updateProgressBar(
 | 
|---|
 | 56 |       const std::string name,
 | 
|---|
 | 57 |       const unsigned int maxsteps,
 | 
|---|
 | 58 |       const unsigned int currentstep,
 | 
|---|
 | 59 |       const bool StopStatus);
 | 
|---|
| [378f2d5] | 60 |   void updateStatusMessage();
 | 
|---|
| [426c84] | 61 | 
 | 
|---|
 | 62 | signals:
 | 
|---|
 | 63 |   void redrawProgressBar(
 | 
|---|
 | 64 |       const std::string name,
 | 
|---|
 | 65 |       const unsigned int maxsteps,
 | 
|---|
 | 66 |       const unsigned int currentstep,
 | 
|---|
 | 67 |       const bool StopStatus);
 | 
|---|
 | 68 | 
 | 
|---|
| [b47bfc] | 69 | private:
 | 
|---|
 | 70 |   void redrawStatus();
 | 
|---|
 | 71 | 
 | 
|---|
| [378f2d5] | 72 |   void startTimer();
 | 
|---|
 | 73 |   void stopTimer();
 | 
|---|
 | 74 | 
 | 
|---|
| [b47bfc] | 75 |   int atomCount;
 | 
|---|
 | 76 |   int moleculeCount;
 | 
|---|
 | 77 | 
 | 
|---|
 | 78 |   QLabel *statusLabel;
 | 
|---|
 | 79 |   QWidget *parent;
 | 
|---|
| [426c84] | 80 |   typedef std::map<std::string,progressIndicator*> progressBars_t;
 | 
|---|
 | 81 |   progressBars_t progressBars;
 | 
|---|
 | 82 |   std::string activeProcess;
 | 
|---|
| [378f2d5] | 83 |   //!> reference to the StatusList we are signed on
 | 
|---|
 | 84 |   MoleCuilder::ActionStatusList& StatusList;
 | 
|---|
 | 85 |   //!> indicates whether we are currently signed on
 | 
|---|
 | 86 |   bool StatusList_signedOn;
 | 
|---|
 | 87 |   //!> QTimer instance that causes regular updates of status messages
 | 
|---|
 | 88 |   QTimer *timer;
 | 
|---|
 | 89 |   //!> time interval in milliseconds
 | 
|---|
 | 90 |   const int timer_interval;
 | 
|---|
| [b47bfc] | 91 | };
 | 
|---|
 | 92 | 
 | 
|---|
 | 93 | #endif /* QTSTATUSBAR_HPP_ */
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.