VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
askIfCanTask.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include <vrvUtil/signalslib.h>
15 #include <vrfutil/rwUUID.h>
16 
18 
19 #include <vector>
20 #include <string>
21 #include <map>
22 
23 #include <QDialog>
24 #include <QTime>
25 
26 class DtSimTask;
27 class QWidget;
28 class QTimer;
29 class QLabel;
30 class QPushButton;
31 
32 namespace makVrv
33 {
34  class DtDe;
35 }
36 
37 namespace makVrf
38 {
42  {
43  Q_OBJECT
44 
45  public:
47 
48  virtual ~DtAskIfCanTaskDialog();
49 
51  virtual std::vector<DtUUID> askIfCanTask(const std::vector<DtUUID>& names, const DtSimTask& newTask);
52 
54  virtual int exec();
55 
56  protected:
58  virtual void setupGui();
59 
61  virtual void receiveCurrentTasks(const DtUUID&, const DtVrfCurrentTaskManager::EntityTaskInformation&);
62 
65 
67  virtual void timeout();
68 
69  protected slots:
71  virtual void askToTask();
72 
74  virtual void timerCheck();
75 
77  virtual void hideMe();
78 
80  virtual bool shouldInterruptTask(DtVrfVrlinkDataInterfacePtr);
81 
83  virtual bool shouldAbandonPlan(DtVrfVrlinkDataInterfacePtr);
84 
85  public:
89 
90  protected:
92  QVector<DtUUID> myAskingToTask;
93  std::vector<DtUUID> myToTask;
95 
96  typedef std::map<DtUUID, QString> NeedToAskMap;
98 
99  QTimer* myCheckTimer;
101 
104 
105  QRect myGeometry;
106  };
107 
112  {
113  public:
115 
117  virtual ~DtAskIfCanTask();
118 
119  static DtAskIfCanTask& instance(makVrv::DtDe&);
120  static void registerInstance(makVrv::DtDe&, DtAskIfCanTask *);
121 
125  virtual std::vector<DtUUID> askIfCanTask(const std::vector<DtUUID>& names, const DtSimTask& newTask);
126 
127  protected:
128  virtual DtAskIfCanTaskDialog* createAskToTaskDialog(QWidget* parent);
129 
130  protected:
132  };
133 }

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)