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

The KHeaderCtrl class is used to replace CHeaderCtrl. More...

#include <kheaderctrl.h>

Inheritance diagram for KHeaderCtrl:
[legend]
Collaboration diagram for KHeaderCtrl:
[legend]

Classes

struct  HeaderItem
 

Public Types

enum class  Mask : uint {
  Width = 0x0001 , Height = Width , Text = 0x0002 , Format = 0x0004 ,
  LPARAM = 0x0008 , Bitmap = 0x0010 , Image = 0x0020 , DI_SetItem = 0x0040 ,
  Order = 0x0080 , Filter = 0x0100 , State = 0x0200
}
 

Public Member Functions

bool GetItem (int nPos, HeaderItem *pHeaderItem) const
 Retrieves information about an item in a header control.
 
int GetItemCount () const
 Retrieves a count of the items in a header control.
 
void GetWindowRect (KRect *r) const
 Gets the screen coordinates of CWnd.
 
 KHeaderCtrl (QObject *parent=nullptr)
 
 Q_DECLARE_FLAGS (Masks, Mask)
 
void setWidget (KListModel *widget)
 
KListModelwidget () const
 

Detailed Description

The KHeaderCtrl class is used to replace CHeaderCtrl.

This class is the equivalent of CHeaderCtrl in MFC. It is used with a KListModel, and access to the header from the KHeaderCtrl.

See also
https://learn.microsoft.com/en-us/cpp/mfc/reference/cheaderctrl-classs

Member Enumeration Documentation

◆ Mask

enum class KHeaderCtrl::Mask : uint
strong
Enumerator
Width 

The cxy member is valid and specifies the item's width.

Height 

The same as Width.

Text 

The pszText and cchTextMax members are valid.

Format 

The fmt member is valid.

LPARAM 

The lParam member is valid.

Bitmap 

Not handled yet.

Image 

Not handled yet.

DI_SetItem 

Not handled yet.

Order 

Not handled yet.

Filter 

Not handled yet.

State 

Not handled yet.

Constructor & Destructor Documentation

◆ KHeaderCtrl()

KHeaderCtrl::KHeaderCtrl ( QObject * parent = nullptr)

Member Function Documentation

◆ GetItem()

bool KHeaderCtrl::GetItem ( int nPos,
HeaderItem * pHeaderItem ) const

Retrieves information about an item in a header control.

◆ GetItemCount()

int KHeaderCtrl::GetItemCount ( ) const

Retrieves a count of the items in a header control.

◆ GetWindowRect()

void KHeaderCtrl::GetWindowRect ( KRect * r) const

Gets the screen coordinates of CWnd.

◆ Q_DECLARE_FLAGS()

KHeaderCtrl::Q_DECLARE_FLAGS ( Masks ,
Mask  )

◆ setWidget()

void KHeaderCtrl::setWidget ( KListModel * widget)

Sets the widget the class is proxying.

◆ widget()

KListModel * KHeaderCtrl::widget ( ) const

Returns the underlying widget the class is proxying.


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