OpendTect-6_4  6.4
Public Member Functions | Public Attributes | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
uiComboBox Class Reference

Combo box. More...

Inheritance diagram for uiComboBox:
[legend]

Public Member Functions

 uiComboBox (uiParent *, const char *nm)
 
 uiComboBox (uiParent *, const BufferStringSet &, const char *nm)
 
 uiComboBox (uiParent *, const uiStringSet &, const char *nm)
 
 uiComboBox (uiParent *, const char **, const char *nm)
 
 uiComboBox (uiParent *, const uiString *, const char *nm)
 
 uiComboBox (uiParent *, const EnumDef &, const char *nm)
 
virtual ~uiComboBox ()
 
virtual void setReadOnly (bool yn=true)
 
virtual bool isReadOnly () const
 
void setEditable (bool yn)
 
bool isEditable () const
 
int size () const
 
bool isEmpty () const
 
void setEmpty ()
 
bool isPresent (const char *) const
 
int indexOf (const char *) const
 
const char * text () const
 
void setText (const char *)
 
int currentItem () const
 
void setCurrentItem (int)
 
void setCurrentItem (const char *)
 First match. More...
 
void setCurrentItem (const FixedString &fs)
 
virtual void addItem (const uiString &)
 
void addItem (const uiString &, int id)
 
void addItems (const BufferStringSet &)
 
void addItems (const uiStringSet &)
 
void addSeparator ()
 
void insertItem (const uiString &, int index=-1, int id=-1)
 
void insertItem (const uiPixmap &, const uiString &, int index=-1, int id=-1)
 
const char * textOfItem (int) const
 
void getItems (BufferStringSet &) const
 
void setItemText (int, const uiString &)
 
void setPixmap (int index, const uiPixmap &)
 
void setIcon (int index, const char *icon_identifier)
 
void setItemID (int index, int id)
 
int currentItemID () const
 
int getItemID (int index) const
 
int getItemIndex (int id) const
 
void setToolTip (const uiString &tt)
 
virtual bool update_ (const DataInpSpec &spec)
 
void getItemSize (int, int &h, int &w) const
 
void notifyHandler (bool selectionchanged)
 
bool handleLongTabletPress ()
 
void popupVirtualKeyboard (int globalx=-1, int globaly=-1)
 
- Public Member Functions inherited from uiObject
 uiObject (uiParent *, const char *nm)
 
 uiObject (uiParent *, const char *nm, uiObjectBody &)
 
 ~uiObject ()
 
void setHSzPol (SzPolicy)
 
void setVSzPol (SzPolicy)
 
SzPolicy szPol (bool hor=true) const
 
virtual int width () const
 Actual size in pixels. More...
 
virtual int height () const
 Actual size in pixels. More...
 
virtual void setName (const char *)
 
void setToolTip (const uiString &)
 
const uiStringtoolTip () const
 
void translateText ()
 
void display (bool yn, bool shrink=false, bool maximized=false)
 
void setFocus ()
 
bool hasFocus () const
 
void disabFocus ()
 
virtual void setCursor (const MouseCursor &)
 
bool isCursorInside () const
 
virtual void setStyleSheet (const char *)
 
virtual Color backgroundColor () const
 
Color roBackgroundColor () const
 
virtual void setBackgroundColor (const Color &)
 
virtual void setBackgroundPixmap (const uiPixmap &)
 
virtual void setTextColor (const Color &)
 
void setSensitive (bool yn=true)
 
bool sensitive () const
 
bool visible () const
 
bool isDisplayed () const
 
int prefHNrPics () const
 
virtual void setPrefWidth (int)
 
void setPrefWidthInChar (int)
 
void setPrefWidthInChar (float)
 
void setMinimumWidth (int)
 
void setMaximumWidth (int)
 
int prefVNrPics () const
 
virtual void setPrefHeight (int)
 
void setPrefHeightInChar (int)
 
void setPrefHeightInChar (float)
 
void setMinimumHeight (int)
 
void setMaximumHeight (int)
 
void setStretch (int hor, int ver)
 Sets stretch factors for object If stretch factor is > 1, then object will already grow at pop-up. More...
 
void attach (constraintType, int margin=-1)
 attaches object to another In case the stretched... options are used, margin=-1 (default) stretches the object not to cross the border. margin=-2 stretches the object to fill the parent's border. This looks nice with separators. More...
 
void attach (constraintType, uiObject *, int margin=-1, bool reciprocal=true)
 
void attach (constraintType, uiParent *, int margin=-1, bool reciprocal=true)
 
void setFont (const uiFont &)
 
const uiFontfont () const
 
void setCaption (const uiString &)
 
void shallowRedraw (CallBacker *=0)
 
void deepRedraw (CallBacker *=0)
 
void reDraw (bool deep)
 
uiSize actualsize (bool include_border=true) const
 
uiParentparent ()
 
const uiParentparent () const
 
void reParent (uiParent *)
 
uiMainWinmainwin ()
 
 mQtclass (QWidget *) getWidget()
 
 mQtclass (QWidget *) qwidget()
 
const mQtclass (QWidget *) qwidget() const
 
virtual const ObjectSet< uiBaseObject > * childList () const
 
void close ()
 
- Public Member Functions inherited from UserInputObjImpl< int >
virtual int getIntValue () const
 
virtual double getDValue () const
 
virtual float getFValue () const
 
virtual bool getBoolValue () const
 
virtual void setValue (const char *s)
 
virtual void setValue (int i)
 
virtual void setValue (double d)
 
virtual void setValue (float f)
 
virtual void setValue (bool b)
 
void setEmpty ()
 
- Public Member Functions inherited from UserInputObj
 UserInputObj ()
 
virtual ~UserInputObj ()
 
bool notifyValueChanging (const CallBack &cb)
 intermediate value available More...
 
bool notifyValueChanged (const CallBack &cb)
 value change complete cq. commited More...
 
bool notifyUpdateRequested (const CallBack &cb)
 
bool update (const DataInpSpec &s)
 return false if not updated for whatever reason. More...
 
double getdValue () const
 
float getfValue () const
 

Public Attributes

Notifier< uiComboBoxeditTextChanged
 
Notifier< uiComboBoxselectionChanged
 
- Public Attributes inherited from uiObject
Notifier< uiObjectclosed
 Triggered when object closes. More...
 
CNotifier< uiObject, uiRect & > setGeometry
 triggered when getting a new geometry A reference to the new geometry is passed which can be manipulated, before the geometry is actually set to the QWidget. More...
 

Protected Member Functions

virtual void setvalue_ (int i)
 
virtual int getvalue_ () const
 
virtual bool notifyUpdateRequested_ (const CallBack &)
 
virtual bool notifyValueChanging_ (const CallBack &)
 return false if not available More...
 
virtual bool notifyValueChanged_ (const CallBack &cb)
 return false if not available More...
 
void translateText ()
 
- Protected Member Functions inherited from uiObject
virtual bool closeOK ()
 hook. Accepts/denies closing of window. More...
 
void triggerSetGeometry (const i_LayoutItem *, uiRect &)
 setGeometry should be triggered by this's layoutItem More...
 
void updateToolTip (CallBacker *=0)
 
- Protected Member Functions inherited from UserInputObjImpl< int >
virtual bool setEmpty_ ()
 

Private Member Functions

uiComboBoxBody & mkbody (uiParent *, const char *)
 
void adjustWidth (const uiString &)
 

Private Attributes

int oldnritems_
 
int oldcuritem_
 
TypeSet< int > itemids_
 
uiStringSet itemstrings_
 
BufferString rettxt_
 
uiComboBoxBody * body_
 
int curwidth_
 
const EnumDefenumdef_
 

Additional Inherited Members

- Public Types inherited from uiObject
enum  SzPolicy {
  Undef, Small, Medium, Wide,
  SmallVar, MedVar, WideVar, SmallMax,
  MedMax, WideMax
}
 How should the object's size behave? Undef : use default. Small : 1 base sz. Medium : 2* base sz + 1. Wide : 4* base sz + 3. The xxVar options specify that the element may have a bigger internal preferred size. In that case, the maximum is taken. The xxMax options specify that the element should take all available space ( stretch = 2 ) More...
 
- Static Public Member Functions inherited from uiObject
static void updateToolTips ()
 
static void setTabOrder (uiObject *first, uiObject *second)
 
static int baseFldSize ()
 
static int iconSize ()
 
- Protected Attributes inherited from uiObject
uiString tooltip_
 
uiObjEventFilter * uiobjeventfilter_
 

Detailed Description

Combo box.

The user can select an item from a drop-down list. Sometimes, you can allow the user entering a new string there, use setReadOnly(false). In that case the result of text() can be different from textOfItem(currentItem()). Also, setText will do something is if the given string is not in the list.

Constructor & Destructor Documentation

uiComboBox::uiComboBox ( uiParent ,
const char *  nm 
)
uiComboBox::uiComboBox ( uiParent ,
const BufferStringSet ,
const char *  nm 
)
uiComboBox::uiComboBox ( uiParent ,
const uiStringSet ,
const char *  nm 
)
uiComboBox::uiComboBox ( uiParent ,
const char **  ,
const char *  nm 
)
uiComboBox::uiComboBox ( uiParent ,
const uiString ,
const char *  nm 
)

Similar to const char** Adds strings until an empty string is found.

uiComboBox::uiComboBox ( uiParent ,
const EnumDef ,
const char *  nm 
)

EnumDef is assumed to remain in mem

virtual uiComboBox::~uiComboBox ( )
virtual

Member Function Documentation

virtual void uiComboBox::addItem ( const uiString )
virtual

Reimplemented from UserInputObj.

void uiComboBox::addItem ( const uiString ,
int  id 
)
void uiComboBox::addItems ( const BufferStringSet )
void uiComboBox::addItems ( const uiStringSet )
void uiComboBox::addSeparator ( )
void uiComboBox::adjustWidth ( const uiString )
private
int uiComboBox::currentItem ( ) const
int uiComboBox::currentItemID ( ) const
int uiComboBox::getItemID ( int  index) const
int uiComboBox::getItemIndex ( int  id) const
void uiComboBox::getItems ( BufferStringSet ) const
void uiComboBox::getItemSize ( int  ,
int &  h,
int &  w 
) const
virtual int uiComboBox::getvalue_ ( ) const
inlineprotectedvirtual
bool uiComboBox::handleLongTabletPress ( )
virtual

Reimplemented from uiObject.

int uiComboBox::indexOf ( const char *  ) const
void uiComboBox::insertItem ( const uiString ,
int  index = -1,
int  id = -1 
)
void uiComboBox::insertItem ( const uiPixmap ,
const uiString ,
int  index = -1,
int  id = -1 
)
bool uiComboBox::isEditable ( ) const
bool uiComboBox::isEmpty ( ) const
inline
bool uiComboBox::isPresent ( const char *  ) const
virtual bool uiComboBox::isReadOnly ( ) const
virtual

Implements UserInputObj.

uiComboBoxBody& uiComboBox::mkbody ( uiParent ,
const char *   
)
private
void uiComboBox::notifyHandler ( bool  selectionchanged)
virtual bool uiComboBox::notifyUpdateRequested_ ( const CallBack )
inlineprotectedvirtual

Implements UserInputObj.

virtual bool uiComboBox::notifyValueChanged_ ( const CallBack )
inlineprotectedvirtual

return false if not available

Implements UserInputObj.

virtual bool uiComboBox::notifyValueChanging_ ( const CallBack )
inlineprotectedvirtual

return false if not available

Implements UserInputObj.

void uiComboBox::popupVirtualKeyboard ( int  globalx = -1,
int  globaly = -1 
)
void uiComboBox::setCurrentItem ( int  )
void uiComboBox::setCurrentItem ( const char *  )

First match.

void uiComboBox::setCurrentItem ( const FixedString fs)
inline
void uiComboBox::setEditable ( bool  yn)
void uiComboBox::setEmpty ( )
virtual

Implements UserInputObj.

void uiComboBox::setIcon ( int  index,
const char *  icon_identifier 
)
void uiComboBox::setItemID ( int  index,
int  id 
)
void uiComboBox::setItemText ( int  ,
const uiString  
)
void uiComboBox::setPixmap ( int  index,
const uiPixmap  
)
virtual void uiComboBox::setReadOnly ( bool  yn = true)
virtual

Implements UserInputObj.

void uiComboBox::setText ( const char *  )
virtual

Reimplemented from UserInputObjImpl< int >.

void uiComboBox::setToolTip ( const uiString tt)
inlinevirtual

Implements UserInputObj.

virtual void uiComboBox::setvalue_ ( int  i)
inlineprotectedvirtual
int uiComboBox::size ( ) const
const char* uiComboBox::text ( ) const
virtual

Reimplemented from UserInputObjImpl< int >.

const char* uiComboBox::textOfItem ( int  ) const
void uiComboBox::translateText ( )
protected
virtual bool uiComboBox::update_ ( const DataInpSpec spec)
virtual

Implements UserInputObj.

Member Data Documentation

uiComboBoxBody* uiComboBox::body_
private
int uiComboBox::curwidth_
private
Notifier<uiComboBox> uiComboBox::editTextChanged
const EnumDef* uiComboBox::enumdef_
private
TypeSet<int> uiComboBox::itemids_
private
uiStringSet uiComboBox::itemstrings_
private
int uiComboBox::oldcuritem_
private
int uiComboBox::oldnritems_
private
BufferString uiComboBox::rettxt_
mutableprivate
Notifier<uiComboBox> uiComboBox::selectionChanged

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019