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

#include <kmenu.h>

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

Public Types

enum class  AppendType { String , Separator , Popup }
 
enum class  ModifyBy { Command , Position }
 

Public Member Functions

void AppendAndConnect (KMenu::AppendType appendType, std::uintptr_t nID, const KString &label, std::function< void(std::uintptr_t nID)> slot)
 
QAction * AppendToMenu (AppendType nFlags, std::uintptr_t nIDNewItem=0, const KString &lpszNewItem={})
 
void CheckMenuItem (unsigned int nIDCheckItem, Qt::CheckState nCheck)
 
 KMenu (QWidget *parent=nullptr)
 
bool ModifyMenuItem (unsigned int nPosition, ModifyBy nFlags, std::uintptr_t nIDNewItem=0, const KString &lpszNewItem={})
 
bool TrackPopupMenu (unsigned int nFlags, int x, int y, QWidget *pWnd=nullptr, KRect *lpRect=0)
 

Member Enumeration Documentation

◆ AppendType

enum class KMenu::AppendType
strong
Enumerator
String 
Separator 
Popup 

◆ ModifyBy

enum class KMenu::ModifyBy
strong
Enumerator
Command 
Position 

Constructor & Destructor Documentation

◆ KMenu()

KMenu::KMenu ( QWidget * parent = nullptr)
explicit

Member Function Documentation

◆ AppendAndConnect()

void KMenu::AppendAndConnect ( KMenu::AppendType appendType,
std::uintptr_t nID,
const KString & label,
std::function< void(std::uintptr_t nID)> slot )

◆ AppendToMenu()

QAction * KMenu::AppendToMenu ( AppendType nFlags,
std::uintptr_t nIDNewItem = 0,
const KString & lpszNewItem = {} )

◆ CheckMenuItem()

void KMenu::CheckMenuItem ( unsigned int nIDCheckItem,
Qt::CheckState nCheck )

◆ ModifyMenuItem()

bool KMenu::ModifyMenuItem ( unsigned int nPosition,
ModifyBy nFlags,
std::uintptr_t nIDNewItem = 0,
const KString & lpszNewItem = {} )

◆ TrackPopupMenu()

bool KMenu::TrackPopupMenu ( unsigned int nFlags,
int x,
int y,
QWidget * pWnd = nullptr,
KRect * lpRect = 0 )

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