VR-Forces 4.3 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) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 /******************************************************************************
6 ** $RCSfile: DtAskIfCanTask.h,v $ $Revision: 1.2 $ $State: Exp $
7 ******************************************************************************/
10 
11 #pragma once
12 
13 #include <vrvUtil/signalslib.h>
17 
19 
20 #include <vector>
21 #include <string>
22 #include <map>
23 
24 #include <QDialog>
25 #include <QTime>
26 
27 class DtSimTask;
28 class QWidget;
29 class QTimer;
30 class QLabel;
31 class QPushButton;
32 
33 namespace makVrv
34 {
35  class DtDe;
36 }
37 
38 namespace makVrf
39 {
43  {
44  Q_OBJECT
45 
46  public:
48 
49  virtual ~DtAskIfCanTaskDialog();
50 
52  virtual std::vector<std::string> askIfCanTask(const std::vector<std::string>& names, const DtSimTask& newTask);
53 
55  virtual int exec();
56 
57  protected:
59  virtual void setupGui();
60 
62  virtual void receiveCurrentTasks(std::string, const DtVrfCurrentTaskManager::EntityTaskInformation&);
63 
66 
68  virtual void timeout();
69 
70  protected slots:
72  virtual void askToTask();
73 
75  virtual void timerCheck();
76 
78  virtual void hideMe();
79 
81  virtual bool shouldInterruptTask(DtVrfVrlinkDataInterfacePtr);
82 
84  virtual bool shouldAbandonPlan(DtVrfVrlinkDataInterfacePtr);
85 
86  public:
90 
91  protected:
93  QVector<std::string> myAskingToTask;
94  std::vector<std::string> myToTask;
96 
97  typedef std::map<std::string, QString> NeedToAskMap;
99 
100  QTimer* myCheckTimer;
102 
105 
106  QRect myGeometry;
107  };
108 
113  {
114  public:
116 
118  virtual ~DtAskIfCanTask();
119 
120  static DtAskIfCanTask& instance(makVrv::DtDe&);
121  static void registerInstance(makVrv::DtDe&, DtAskIfCanTask *);
122 
126  virtual std::vector<std::string> askIfCanTask(const std::vector<std::string>& names, const DtSimTask& newTask);
127 
128  protected:
129  virtual DtAskIfCanTaskDialog* createAskToTaskDialog(QWidget* parent);
130 
131  protected:
133  };
134 }

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)