VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrfGuiCoreQt
DtAskIfCanTask.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
>
14
#include <
vrfGuiCoreQt/vrfGuiCoreQt.h
>
15
#include <
vrfGuiCore/DtVrfCurrentTaskManager.h
>
16
#include <
vrfGuiCore/DtVrfVrlinkDataInterface.h
>
17
18
#include <
vrvUtil/DtVirtualBaseClass.h
>
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
{
42
class
DT_DLL_VRFGUICOREQT
DtAskIfCanTaskDialog
:
public
QDialog
43
{
44
Q_OBJECT
45
46
public
:
47
DtAskIfCanTaskDialog
(
makVrv::DtDe
&,
QWidget
* parent);
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
65
virtual
DtVrfCurrentTaskManager::DtSimTaskSharedPtr
willBlock(
const
DtSimTask
* newTask,
const
DtVrfCurrentTaskManager::EntityTaskInformation
& tasks)
const
;
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
:
87
QWidget
*
myWaitingFrame
;
88
QLabel
*
myWaitingLabel
;
89
QPushButton
*
myCancel
;
90
91
protected
:
92
makVrv::DtDe
&
myDe
;
93
QVector<std::string>
myAskingToTask
;
94
std::vector<std::string>
myToTask
;
95
DtSimTask
*
myNewTask
;
96
97
typedef
std::map<std::string, QString>
NeedToAskMap
;
98
NeedToAskMap
myNeedToAsk
;
99
100
QTimer*
myCheckTimer
;
101
QTime
myElapsedTimer
;
102
103
int
mySelectedInterruptAll
;
104
int
mySelectedAbandonAll
;
105
106
QRect
myGeometry
;
107
};
108
112
class
DT_DLL_VRFGUICOREQT
DtAskIfCanTask
:
public
makVrv::DtVirtualBaseClass
113
{
114
public
:
115
DtAskIfCanTask
(
makVrv::DtDe
&);
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
:
132
makVrv::DtDe
&
myDe
;
133
};
134
}
Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (
www.mak.com
)