Logo    
KDWinUtils
Helper library for MFC to Qt migration
Loading...
Searching...
No Matches
KCheck Class Reference

The KCheck class is used to replace DDX_Check data exchange. More...

#include <kcheck.h>

Public Types

enum  State { Unchecked = 0x0000 , Checked = 0x0001 , Intermediate = 0x0002 }
 

Public Member Functions

 KCheck (int value=Unchecked)
 
 operator int () const
 
KCheckoperator= (int value)
 
void setWidget (QAbstractButton *button)
 
QAbstractButton * widget () const
 

Detailed Description

The KCheck class is used to replace DDX_Check data exchange.

This class handles widget with check interfaces. It is a proxy for the widget, and can be used to set and get the value. There are no MFC equivalent for this class, as an int is used in MFC to represent the state of the checkbox.

See also
https://learn.microsoft.com/en-us/cpp/mfc/reference/standard-dialog-data-exchange-routines#ddx_check

Member Enumeration Documentation

◆ State

Enumerator
Unchecked 

Button is not checked.

Checked 

Button is checked.

Intermediate 

Button is in an indeterminate state.

Constructor & Destructor Documentation

◆ KCheck()

KCheck::KCheck ( int value = Unchecked)
explicit

Constructs a KCheck, with a default value.

Member Function Documentation

◆ operator int()

KCheck::operator int ( ) const

Returns the current state if the underlying widget is checked, false otherwise.

◆ operator=()

KCheck & KCheck::operator= ( int value)

Sets the state of the underlying widget.

◆ setWidget()

void KCheck::setWidget ( QAbstractButton * button)

Sets the widget the class is proxying.

◆ widget()

QAbstractButton * KCheck::widget ( ) const

Returns the underlying widget the class is proxying.


The documentation for this class was generated from the following file: