VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
tmEventHandler
fileDialogHandler.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2004 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
/*******************************************************************************
6
** $RCSfile: fileDialogHandler.h,v $ $Revision: 1.7 $ $State: Exp $
7
*******************************************************************************/
8
11
12
#ifndef FILEDIALOGHANDLER_H_
13
#define FILEDIALOGHANDLER_H_
14
15
#include "
tmqt/eventHandler.h
"
16
#include "
tmqt/eventSignaller.h
"
17
18
#ifdef WIN32
19
#include <QtCore/QTimer>
20
#endif
21
22
class
QFileDialog
;
23
24
#include "
tmEventHandler/tmEventHandlerDefines.h
"
25
class
DT_DLL_tmEventHandler
DtFileDialogHandler
:
public
DtEventHandler
26
{
27
Q_OBJECT
28
29
public
:
30
32
DtFileDialogHandler
();
33
35
virtual
~
DtFileDialogHandler
();
36
37
public
:
38
bool
accepted()
const
;
39
41
const
QString& filename()
const
;
42
45
const
QString& startingDirectory()
const
;
46
void
setStartingDirectory(
const
QString&);
47
49
const
QString& selectedFilter()
const
;
50
void
setSelectedFilter(
const
QString&);
51
52
virtual
QWidget
*
createDialog
(
QWidget
* parent);
53
virtual
QWidget
* createOpenDialog(
QWidget
* parent);
54
virtual
void
initFileDialog(
QFileDialog
*);
55
56
virtual
void
showDialog
(
bool
b);
57
59
void
setChooseOnly(
bool
b);
60
61
protected
:
64
virtual
QString createFilterList() = 0;
65
70
virtual
void
accept();
71
73
virtual
void
cancel();
74
75
virtual
bool
completeOpen() = 0;
76
77
virtual
const
char
*
eventSignalName
() {
return
DtFileOpenDialogWidgetEvent
; };
78
79
private
slots:
80
void
performThreadCheck();
81
82
protected
:
83
bool
myAccepted
;
84
QString
myFilename
;
85
QString
myStartingDirectory
;
86
bool
myChooseOnly
;
87
QString
mySelectedFilter
;
88
#ifdef WIN32
89
QTimer myThreadCheckTimer;
90
QVector<DWORD> myThreadIds;
91
#endif
92
};
93
94
inline
bool
DtFileDialogHandler::accepted
()
const
95
{
96
return
myAccepted
;
97
}
98
99
inline
const
QString&
DtFileDialogHandler::filename
()
const
100
{
101
return
myFilename
;
102
}
103
104
inline
const
QString&
DtFileDialogHandler::startingDirectory
()
const
105
{
106
return
myStartingDirectory
;
107
}
108
109
inline
void
DtFileDialogHandler::setStartingDirectory
(
const
QString& s)
110
{
111
myStartingDirectory
= s;
112
}
113
114
inline
const
QString&
DtFileDialogHandler::selectedFilter
()
const
115
{
116
return
mySelectedFilter
;
117
}
118
119
inline
void
DtFileDialogHandler::setSelectedFilter
(
const
QString& s)
120
{
121
mySelectedFilter
= s;
122
}
123
124
inline
void
DtFileDialogHandler::setChooseOnly
(
bool
b)
125
{
126
myChooseOnly
= b;
127
}
128
129
#endif //FILEDIALOGHANDLER_H_
130
131
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
)