ICF 3.1.1.10
Technical documentation of ICF Libraries
CSignalBlocker.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#pragma once
7
8
9// Qt includes
10#include <QtCore/QObject>
11
12// ICF includes
13#include <ibase/ibase.h>
14
15
16namespace ibase
17{
18
19
23class [[maybe_unused]] CSignalBlocker
24{
25public:
26
33 CSignalBlocker(QObject* objectPtr, bool blockChilds = false);
34
38 virtual ~CSignalBlocker();
39
40private:
47 void BlockChilds(QObject* objectPtr, bool block);
48
49private:
50 QObject* m_objectPtr;
51 bool m_blockChilds;
52};
53
54
55} // namespace ibase
56
57
Simple helper class blocking Qt signals of specified QObject.
virtual ~CSignalBlocker()
Destructor.
CSignalBlocker(QObject *objectPtr, bool blockChilds=false)
Constructor.
This namespace contains standard classes based on Qt.

© Witold Gantzke and Kirill Lepskiy