CFx SDK Documentation  2020SP3
FxUIComboBox.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2020 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 
CFxUIComboBox::~CFxUIComboBox
~CFxUIComboBox()
FxUIBaseView.h
CFxUIComboBox::insertItem
void insertItem(int index, const CFxUIIcon &icon, const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
CFxUIComboBox::CFxUIComboBox
CFxUIComboBox()
CFxUIComboBox::setItemIcon
void setItemIcon(int index, const CFxUIIcon &icon)
CFxUIComboBox::setEditText
void setEditText(const CFxUIString &text)
CFxUIBaseView
Definition: FxUIBaseView.h:30
CFxUIComboBox::editingFinished
CFxUISignal< void(void)> & editingFinished()
CFxUIComboBox::insertItems
void insertItems(int index, const CFxUIStringList &list)
CFxUIComboBox::InsertAtCurrent
@ InsertAtCurrent
The current item will be replaced by the string.
Definition: FxUIComboBox.h:37
CFxUIComboBox::InsertBeforeCurrent
@ InsertBeforeCurrent
The string is inserted before the current item in the combobox.
Definition: FxUIComboBox.h:40
CFxUIComboBox::addItem
void addItem(const CFxUIIcon &icon, const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
CFxUIComboBox::clearEditText
void clearEditText()
CFxUIComboBox::addItem
void addItem(const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
CFxUIComboBox
Definition: FxUIComboBox.h:28
CFxUIVariant
QVariant CFxUIVariant
Definition: FxUIObject.h:50
CFxUIComboBox::removeItem
void removeItem(int index)
CFxUIComboBox::activated
CFxUISignal< void(int)> & activated()
CFxUIIcon
QIcon CFxUIIcon
Definition: FxUIObject.h:60
CFxUIComboBox::currentStringChanged
CFxUISignal< void(const CFxUIString &)> & currentStringChanged()
CFxUIComboBox::setEditable
void setEditable(bool)
CFxUISignal
Definition: FxUISignal.h:74
CFxUIComboBox::setIconSize
void setIconSize(CFxUISize size)
size
GLsizeiptr size
Definition: gles2_ext.h:182
data
GLint GLenum GLsizei GLsizei GLint GLsizei const void * data
Definition: gles2_ext.h:110
CFxUIComboBox::editTextChanged
CFxUISignal< void(const CFxUIString &)> & editTextChanged()
index
GLuint index
Definition: gles2_ext.h:265
CFxUIValidator
QValidator CFxUIValidator
Definition: FxUIObject.h:49
CFxUIComboBox::InsertAfterCurrent
@ InsertAfterCurrent
The string is inserted after the current item in the combobox.
Definition: FxUIComboBox.h:39
CFxUIComboBox::itemData
CFxUIVariant itemData(int index, int role=Qt::UserRole) const
CFxUIComboBox::setCurrentIndex
void setCurrentIndex(int iIndex)
CFxUIComboBox::setMaxVisibleItems
void setMaxVisibleItems(int Value)
CFxUIComboBox::currentIndex
int currentIndex() const
CFxUIComboBox::InsertPolicy
InsertPolicy
Definition: FxUIComboBox.h:34
CFxUIComboBox::currentText
CFxUIString currentText() const
CFxUIComboBox::findData
int findData(const CFxUIVariant &data, int role=Qt::UserRole, Qt::MatchFlags flags=static_cast< Qt::MatchFlags >(Qt::MatchExactly|Qt::MatchCaseSensitive)) const
CFxUISize
QSize CFxUISize
Definition: FxUIObject.h:45
CFxUIComboBox::InsertAtTop
@ InsertAtTop
The string will be inserted as the first item in the combobox.
Definition: FxUIComboBox.h:36
CFxUIComboBox::findText
int findText(const CFxUIString &text, Qt::MatchFlags flags=static_cast< Qt::MatchFlags >(Qt::MatchExactly|Qt::MatchCaseSensitive)) const
CFxUIStringList
QStringList CFxUIStringList
Definition: FxUIObject.h:47
CFxUIComboBox::insertItem
void insertItem(int index, const CFxUIString &text, const CFxUIVariant &userData=CFxUIVariant())
CFxUIComboBox::currentIndexChanged
CFxUISignal< void(int)> & currentIndexChanged()
CFxUIComboBox::count
int count() const
CFxUIString
QString CFxUIString
Definition: FxUIObject.h:46
CFxUIComboBox::isEditable
bool isEditable() const
CFxUIComboBox::setHideEmptyText
void setHideEmptyText(bool)
COMMONUI_API
#define COMMONUI_API
Definition: FxCommonFramework.h:4
CFxUIComboBox::setValidator
void setValidator(const CFxUIValidator *)
CFxUIComboBox::setInsertPolicy
void setInsertPolicy(CFxUIComboBox::InsertPolicy)
CFxUIComboBox::NoInsert
@ NoInsert
The string will not be inserted into the combobox.
Definition: FxUIComboBox.h:35
CFxUIComboBox::setItemText
void setItemText(int index, const CFxUIString &text)
CFxUIComboBox::InsertAtBottom
@ InsertAtBottom
The string will be inserted after the last item in the combobox.
Definition: FxUIComboBox.h:38
void
typedef void(APIENTRYP PFNGLACTIVETEXTUREPROC)(GLenum texture)
CFxUIComboBox::setItemData
void setItemData(int index, const CFxUIVariant &data, int role=Qt::UserRole)
CFxUIComboBox::clear
void clear()
CFxUIComboBox::itemText
CFxUIString itemText(int index) const
CFxUIComboBox::setCurrentText
void setCurrentText(const CFxUIString &text)