Logo    
KDWinUtils
Helper library for MFC to Qt migration
Loading...
Searching...
No Matches
kcheck.h
Go to the documentation of this file.
1/****************************************************************************
2**
3** This file is part of KDWinutils, KDAB's MFC to Qt migration tool.
4**
5** Copyright (C) 2023 Klarälvdalens Datakonsult AB, a KDAB Group company <info@kdab.com>
6** All rights reserved.
7**
8** This file is intended solely for use by the migration tools and services
9** provided by Klarälvdalens Datakonsult AB.
10**
11** Any other use or distribution of this software that is not otherwise agreed
12** upon in writing and signed by an authorized representative of Klarälvdalens
13** Datakonsult AB, KDAB (USA) LLC, KDAB (Deutschland) GmbH & Co. K.G.,
14** KDAB (France) SAS, KDAB (UK), Ltd., or any future subsidiary of Klarälvdalens
15** Datakonsult AB is hereby prohibited.
16**
17** Contact info@kdab.com if any conditions stated above are unclear to you.
18**
19****************************************************************************/
20
21#pragma once
22
24
25class QAbstractButton;
26
28
38{
39public:
40 enum State {
41 Unchecked = 0x0000,
42 Checked = 0x0001,
43 Intermediate = 0x0002,
44 };
45
47 explicit KCheck(int value = Unchecked);
48
50 QAbstractButton *widget() const;
52 void setWidget(QAbstractButton *button);
53
55 operator int() const;
57 KCheck &operator=(int value);
58
59private:
60 State value() const;
61 void setValue(State value);
62
63 State m_value = Unchecked;
64 QAbstractButton *m_widget = nullptr;
65};
66
The KCheck class is used to replace DDX_Check data exchange.
Definition kcheck.h:38
void setWidget(QAbstractButton *button)
QAbstractButton * widget() const
State
Definition kcheck.h:40
KCheck & operator=(int value)
KCheck(int value=Unchecked)
#define KDWINUTILS_EXPORT
Definition kdwinutils_export.h:31
#define KDWINUTILS_BEGIN_NAMESPACE
Definition kdwinutils_global.h:27
#define KDWINUTILS_END_NAMESPACE
Definition kdwinutils_global.h:28