CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
FxUIListBox.h
Go to the documentation of this file.
1//
2// (C) Copyright 2005-2023 by Graebert GmbH.
3//
4// Permission to use, copy, modify, and distribute this software in
5// object code form for any purpose and without fee is hereby granted,
6// provided that the above copyright notice appears in all copies and
7// that both that copyright notice and the limited warranty and
8// restricted rights notice below appear in all supporting
9// documentation.
10//
11// GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12// GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15// UNINTERRUPTED OR ERROR FREE.
16
17#pragma once
18
19#include "FxUIBaseView.h"
20
26{
27public:
32 {
33 SingleSelection, //When the user selects an item, any already-selected item becomes unselected, and the user cannot unselect the selected item by clicking on it.
34 MultiSelection, //When the user selects an item in the usual way, the selection status of that item is toggled and the other items are left alone.
35 };
36
39
42
48 void addItem( const CFxUIString& item );
49
55 int count() const;
56
60 void clear();
61
66
73
81 int row( const CFxUIString& ) const;
82
88 int currentRow() const;
89
94
102 void setItemSelected( int index, bool );
103
111 void setItemData( int index, const CFxUIVariant& data, int role = Qt::UserRole );
112
120 void setIcon( int index, const CFxUIIcon& icon );
121
129 const CFxUIString& item( int index );
130
138 void setItemText( int index, const CFxUIString& sText );
139
145 void removeItem( int index );
146
155
163 CFxUIVariant itemData( int index, int role = Qt::UserRole ) const;
164
169
174
179
180 //...
181};
#define COMMONUI_API
QStringList CFxUIStringList
Definition: FxUIObject.h:49
QString CFxUIString
Definition: FxUIObject.h:48
QIcon CFxUIIcon
Definition: FxUIObject.h:63
QVariant CFxUIVariant
Definition: FxUIObject.h:52
const CFxUIString & item(int index)
CFxUIVariant itemData(int index, int role=Qt::UserRole) const
CFxUISignal< void(void)> & selectionChanged()
void setItemData(int index, const CFxUIVariant &data, int role=Qt::UserRole)
void setSelectionMode(SelectionMode mode)
int row(const CFxUIString &) const
CFxUISignal< void(const int &)> & itemDoubleClicked()
void setItemText(int index, const CFxUIString &sText)
void setIcon(int index, const CFxUIIcon &icon)
void clearSelection()
void removeItem(int index)
CFxUIStringList selectedItems() const
void setItemSelected(int index, bool)
int currentRow() const
CFxUISignal< void(int)> & valueChanged()
bool isItemSelected(int index)
int count() const
void addItem(const CFxUIString &item)
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110
GLuint index
Definition: gles2_ext.h:265