CFx SDK Documentation  2023 SP0
FxUIComboBox.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2022 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 
18 #pragma once
19 
20 #include "FxUIBaseView.h"
21 
22 class QValidator;
23 
28 {
29 public:
34  {
41  InsertAlphabetically
42 
43  };
44 
47 
50 
54  void clear();
55 
63  void addItem( const CFxUIString & text, const CFxUIVariant & userData = CFxUIVariant() );
64 
65 
75  void addItem( const CFxUIIcon & icon, const CFxUIString & text, const CFxUIVariant & userData = CFxUIVariant() );
76 
84  void insertItems( int index, const CFxUIStringList & list );
85 
97  void insertItem( int index, const CFxUIString & text, const CFxUIVariant & userData = CFxUIVariant() );
98 
112  void insertItem( int index, const CFxUIIcon & icon, const CFxUIString & text, const CFxUIVariant & userData = CFxUIVariant() );
113 
119  void removeItem( int index );
120 
136  void setItemText(int index, const CFxUIString & text);
137 
145  void setItemIcon( int index, const CFxUIIcon & icon );
146 
152  void setEditText(const CFxUIString & text);
153 
159  int count() const;
160 
166 
177  CFxUIVariant itemData(int index, int role = Qt::UserRole) const;
178 
188  void setItemData( int index, const CFxUIVariant & data, int role = Qt::UserRole );
189 
197  CFxUIString itemText ( int index ) const;
198 
204  void setCurrentText( const CFxUIString& text );
205 
212 
213  int findData(const CFxUIVariant & data, int role = Qt::UserRole, Qt::MatchFlags flags = static_cast<Qt::MatchFlags> ( Qt::MatchExactly | Qt::MatchCaseSensitive )) const;
214  int findText(const CFxUIString & text, Qt::MatchFlags flags = static_cast<Qt::MatchFlags> ( Qt::MatchExactly | Qt::MatchCaseSensitive )) const;
215 
221  void setCurrentIndex( int iIndex );
222 
228  int currentIndex() const;
229 
230  void setHideEmptyText( bool );
231 
237  bool isEditable() const;
238 
244  void setEditable( bool );
245 
251  void setValidator( const CFxUIValidator* );
252 
259 
266 
272  void setMaxVisibleItems( int Value );
273 
278 
283 
288 
293 
298 
299  //...
300 };
301 
#define COMMONUI_API
QStringList CFxUIStringList
Definition: FxUIObject.h:49
QString CFxUIString
Definition: FxUIObject.h:48
QValidator CFxUIValidator
Definition: FxUIObject.h:51
QIcon CFxUIIcon
Definition: FxUIObject.h:62
QVariant CFxUIVariant
Definition: FxUIObject.h:52
QSize CFxUISize
Definition: FxUIObject.h:47
int currentIndex() const
CFxUISignal< void(const CFxUIString &)> & currentStringChanged()
CFxUIVariant itemData(int index, int role=Qt::UserRole) const
CFxUISignal< void(int)> & currentIndexChanged()
void setEditText(const CFxUIString &text)
void setEditable(bool)
void setInsertPolicy(CFxUIComboBox::InsertPolicy)
int count() const
int findText(const CFxUIString &text, Qt::MatchFlags flags=static_cast< Qt::MatchFlags >(Qt::MatchExactly|Qt::MatchCaseSensitive)) const
void clearEditText()
void setHideEmptyText(bool)
CFxUISignal< void(int)> & activated()
int findData(const CFxUIVariant &data, int role=Qt::UserRole, Qt::MatchFlags flags=static_cast< Qt::MatchFlags >(Qt::MatchExactly|Qt::MatchCaseSensitive)) const
void setValidator(const CFxUIValidator *)
void removeItem(int index)
void setCurrentIndex(int iIndex)
void insertItem(int index, const CFxUIIcon &icon, const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
void setItemData(int index, const CFxUIVariant &data, int role=Qt::UserRole)
void setCurrentText(const CFxUIString &text)
void insertItems(int index, const CFxUIStringList &list)
void setIconSize(CFxUISize size)
void setItemIcon(int index, const CFxUIIcon &icon)
CFxUISignal< void(void)> & editingFinished()
CFxUIString itemText(int index) const
CFxUIString currentText() const
void setItemText(int index, const CFxUIString &text)
CFxUISignal< void(const CFxUIString &)> & editTextChanged()
void setMaxVisibleItems(int Value)
void insertItem(int index, const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
@ InsertAfterCurrent
The string is inserted after the current item in the combobox.
Definition: FxUIComboBox.h:39
@ InsertAtTop
The string will be inserted as the first item in the combobox.
Definition: FxUIComboBox.h:36
@ InsertAtBottom
The string will be inserted after the last item in the combobox.
Definition: FxUIComboBox.h:38
@ InsertAtCurrent
The current item will be replaced by the string.
Definition: FxUIComboBox.h:37
@ InsertBeforeCurrent
The string is inserted before the current item in the combobox.
Definition: FxUIComboBox.h:40
@ NoInsert
The string will not be inserted into the combobox.
Definition: FxUIComboBox.h:35
bool isEditable() const
void addItem(const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
void addItem(const CFxUIIcon &icon, const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
GLsizeiptr size
Definition: gles2_ext.h:182
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