source: src/UIElements/Views/Qt4/QtStatusBar.hpp@ 7b5984

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
Last change on this file since 7b5984 was 378f2d5, checked in by Frederik Heber <heber@…>, 11 years ago

Updated all UI's StatusIndicator classes to use ActionStatusList.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/*
2 * QtStatusBar.hpp
3 *
4 * Created on: Feb 17, 2010
5 * Author: crueger
6 */
7
8#ifndef QTSTATUSBAR_HPP_
9#define QTSTATUSBAR_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16
17#include <map>
18#include <utility>
19#include <string>
20#include <QtGui/QStatusBar>
21
22#include "CodePatterns/Observer/Observer.hpp"
23
24class QBoxLayout;
25class QLabel;
26class QProgressBar;
27class QTimer;
28
29namespace MoleCuilder {
30 class ActionStatusList;
31 class Process;
32}
33
34class QtStatusBar : public QStatusBar, public Observer
35{
36 Q_OBJECT
37
38 struct progressIndicator{
39 progressIndicator(const std::string &name);
40 ~progressIndicator();
41 QLabel *label;
42 QProgressBar *bar;
43 QBoxLayout *layout;
44 QWidget *container;
45 };
46public:
47 QtStatusBar(QWidget *parent=0);
48 virtual ~QtStatusBar();
49
50 void update(Observable *subject);
51 void subjectKilled(Observable *subject);
52 void recieveNotification(Observable *_publisher, Notification *_notification);
53
54private slots:
55 void updateProgressBar(
56 const std::string name,
57 const unsigned int maxsteps,
58 const unsigned int currentstep,
59 const bool StopStatus);
60 void updateStatusMessage();
61
62signals:
63 void redrawProgressBar(
64 const std::string name,
65 const unsigned int maxsteps,
66 const unsigned int currentstep,
67 const bool StopStatus);
68
69private:
70 void redrawStatus();
71
72 void startTimer();
73 void stopTimer();
74
75 int atomCount;
76 int moleculeCount;
77
78 QLabel *statusLabel;
79 QWidget *parent;
80 typedef std::map<std::string,progressIndicator*> progressBars_t;
81 progressBars_t progressBars;
82 std::string activeProcess;
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;
91};
92
93#endif /* QTSTATUSBAR_HPP_ */
Note: See TracBrowser for help on using the repository browser.