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

The KComboBox class is used to replace DDX_Control combobox data exchange. More...

#include <kcombobox.h>

Public Member Functions

int AddString (const KString &lpszString)
 Adds a string to the end of the list in the list box of a combo box.
 
void Clear ()
 Deletes (clears) the current selection, if any, in the edit control.
 
int DeleteString (int nIndex)
 Deletes a string from the list box of a combo box.
 
int GetCount () const
 Retrieves the number of items in the list box of a combo box.
 
int GetCurSel () const
 Retrieves the index of the currently selected item, if any, in the list box of a combo box.
 
int GetLBTextLen (int nIndex) const
 Gets the length of a string in the list box of a combo box.
 
int InsertString (int nIndex, KString lpszString)
 Inserts a string into the list box of a combo box.
 
 KComboBox ()
 
 KComboBox (int value)
 
 operator int () const
 
 operator KString () const
 
KComboBoxoperator= (int value)
 
void ResetContent ()
 Removes all items from the list box and edit control of a combo box.
 
int SetCurSel (int nSelect)
 Selects a string in the list box of a combo box.
 
void setWidget (QComboBox *combobox)
 
QComboBox * widget () const
 

Detailed Description

The KComboBox class is used to replace DDX_Control combobox data exchange.

This class is the equivalent of CComboBox in MFC. It is a proxy for the widget, and can be used to set and get the value.

See also
https://learn.microsoft.com/en-us/cpp/mfc/reference/ccombobox-class

Constructor & Destructor Documentation

◆ KComboBox() [1/2]

KComboBox::KComboBox ( )

◆ KComboBox() [2/2]

KComboBox::KComboBox ( int value)
explicit

Constructs a KComboBox with a default selected button.

Member Function Documentation

◆ AddString()

int KComboBox::AddString ( const KString & lpszString)

Adds a string to the end of the list in the list box of a combo box.

◆ Clear()

void KComboBox::Clear ( )

Deletes (clears) the current selection, if any, in the edit control.

◆ DeleteString()

int KComboBox::DeleteString ( int nIndex)

Deletes a string from the list box of a combo box.

◆ GetCount()

int KComboBox::GetCount ( ) const

Retrieves the number of items in the list box of a combo box.

◆ GetCurSel()

int KComboBox::GetCurSel ( ) const

Retrieves the index of the currently selected item, if any, in the list box of a combo box.

◆ GetLBTextLen()

int KComboBox::GetLBTextLen ( int nIndex) const

Gets the length of a string in the list box of a combo box.

◆ InsertString()

int KComboBox::InsertString ( int nIndex,
KString lpszString )

Inserts a string into the list box of a combo box.

◆ operator int()

KComboBox::operator int ( ) const

Returns the the selected item index in the combobox.

◆ operator KString()

KComboBox::operator KString ( ) const

Returns the string of the selected item in the combobox.

◆ operator=()

KComboBox & KComboBox::operator= ( int value)

Selects the button at the given index.

◆ ResetContent()

void KComboBox::ResetContent ( )

Removes all items from the list box and edit control of a combo box.

◆ SetCurSel()

int KComboBox::SetCurSel ( int nSelect)

Selects a string in the list box of a combo box.

◆ setWidget()

void KComboBox::setWidget ( QComboBox * combobox)

Sets the widget the class is proxying.

◆ widget()

QComboBox * KComboBox::widget ( ) const

Returns the underlying widget the class is proxying.


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