ACF
$AcfVersion:0$
Acf
Include
iwidgets
CWidgetUpdateBlocker.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2
#pragma once
3
4
5
// Qt includes
6
#include <QtCore/QtGlobal>
7
#if QT_VERSION >= 0x050000
8
#include <QtWidgets/QWidget>
9
#else
10
#include <QtGui/QWidget>
11
#endif
12
13
14
namespace
iwidgets
15
{
16
17
21
class
CWidgetUpdateBlocker
22
{
23
public
:
24
explicit
CWidgetUpdateBlocker
(QWidget* widgetPtr);
25
~CWidgetUpdateBlocker
();
26
27
private
:
28
QWidget* m_widgetPtr;
29
};
30
31
32
// inline methods
33
34
inline
CWidgetUpdateBlocker::CWidgetUpdateBlocker
(QWidget* widgetPtr)
35
:m_widgetPtr(widgetPtr)
36
{
37
Q_ASSERT(widgetPtr !=
NULL
);
38
39
m_widgetPtr->setUpdatesEnabled(
false
);
40
}
41
42
43
inline
CWidgetUpdateBlocker::~CWidgetUpdateBlocker
()
44
{
45
m_widgetPtr->setUpdatesEnabled(
true
);
46
}
47
48
49
}
// namespace iwidgets
50
51
52
53
iwidgets::CWidgetUpdateBlocker
Help class used to block widget update till it is destructed.
Definition
CWidgetUpdateBlocker.h:22
iwidgets::CWidgetUpdateBlocker::CWidgetUpdateBlocker
CWidgetUpdateBlocker(QWidget *widgetPtr)
Definition
CWidgetUpdateBlocker.h:34
iwidgets::CWidgetUpdateBlocker::~CWidgetUpdateBlocker
~CWidgetUpdateBlocker()
Definition
CWidgetUpdateBlocker.h:43
NULL
#define NULL
Definition
istd.h:74
iwidgets
Namespace contains implementation of Qt widget extensions.
Definition
CCheckableComboBox.h:22
Generated by
1.9.8