VR-Forces 4.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
include
vrvCoreQt
vrvCoreQtUtil.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2010 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <QtCore/QObject>
13
14
#define BLOCK_SIGNALS(widget,codeblock)\
15
{ bool restore = widget->blockSignals(true);\
16
codeblock;\
17
widget->blockSignals(restore);\
18
}
19
20
class
DtScopedSignalBlock
21
{
22
public
:
23
DtScopedSignalBlock
(
QObject
& w)
24
:
myWidget
(w)
25
{
26
mySignalsBlocked
=
myWidget
.blockSignals(
true
);
27
}
28
29
~DtScopedSignalBlock
()
30
{
31
myWidget
.blockSignals(
mySignalsBlocked
);
32
}
33
34
private
:
35
QObject
&
myWidget
;
36
bool
mySignalsBlocked
;
37
};
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
)