OpendTect-6_4
6.4
|
List Box. More...
Classes | |
class | Setup |
Public Types | |
enum | LblPos { LeftTop, RightTop, LeftMid, RightMid, AboveLeft, AboveMid, AboveRight, BelowLeft, BelowMid, BelowRight } |
Public Member Functions | |
uiListBox (uiParent *, const char *nm=0, OD::ChoiceMode cm=OD::ChooseOnlyOne) | |
uiListBox (uiParent *, const Setup &, const char *nm=0) | |
virtual | ~uiListBox () |
uiListBoxObj * | box () |
uiGroup * | checkGroup () |
uiCheckBox * | masterCheckBox () |
int | nrLabels () const |
uiLabel * | label (int nr=0) |
void | setLabelText (const uiString &, int nr=0) |
OD::ChoiceMode | choiceMode () const |
bool | isMultiChoice () const |
void | setChoiceMode (OD::ChoiceMode) |
void | setMultiChoice (bool yn=true) |
void | setAllowNoneChosen (bool) |
void | setNotSelectable () |
int | size () const |
bool | isEmpty () const |
bool | validIdx (int) const |
bool | isPresent (const char *) const |
int | maxNrOfChoices () const |
Alignment::HPos | alignment () const |
void | setAlignment (Alignment::HPos) |
void | setNrLines (int) |
void | setFieldWidth (int) |
void | setHSzPol (uiObject::SzPolicy) |
void | setVSzPol (uiObject::SzPolicy) |
void | setEmpty () |
void | removeItem (int) |
void | removeItem (const char *) |
void | removeItem (const FixedString &fs) |
void | setAllowDuplicates (bool yn) |
void | addItem (const uiString &, bool marked=false, int id=-1) |
void | addItem (const uiString &, const uiPixmap &, int id=-1) |
void | addItem (const uiString &, const Color &, int id=-1) |
void | addItems (const char **) |
void | addItems (const BufferStringSet &) |
void | addItems (const uiStringSet &) |
void | insertItem (const uiString &, int idx=-1, bool marked=false, int id=-1) |
void | insertItem (const uiString &, const uiPixmap &, int idx=-1, int id=-1) |
void | insertItem (const uiString &, const Color &, int idx=-1, int id=-1) |
void | setPixmap (int, const Color &) |
void | setPixmap (int, const uiPixmap &) |
void | setIcon (int, const char *icon_identifier) |
void | setColor (int, const Color &) |
Color | getColor (int) const |
void | sortItems (bool asc=true) |
int | indexOf (const char *) const |
First match. More... | |
const char * | textOfItem (int) const |
void | setItemText (int, const uiString &) |
void | getItems (BufferStringSet &) const |
int | currentItem () const |
const char * | getText () const |
void | setCurrentItem (int) |
void | setCurrentItem (const char *) |
First match. More... | |
void | setCurrentItem (const FixedString &fs) |
void | setItemSelectable (int, bool) |
int | nrChosen () const |
bool | isChoosable (int) const |
bool | isChosen (int) const |
int | firstChosen () const |
int | nextChosen (int prev=-1) const |
void | getChosen (BufferStringSet &) const |
void | getChosen (TypeSet< int > &) const |
void | setChoosable (int, bool yn) |
void | setChosen (int, bool yn=true) |
void | setChosen (Interval< int >, bool yn=true) |
void | chooseAll (bool yn=true) |
void | setChosen (const BufferStringSet &) |
void | setChosen (const TypeSet< int > &) |
bool | isMarked (int) const |
void | setMarked (int, bool) |
void | setItemID (int idx, int id) |
int | currentItemID () const |
int | getItemID (int idx) const |
int | getItemIdx (int id) const |
First match. More... | |
void | scrollToTop () |
void | scrollToBottom () |
bool | handleLongTabletPress () |
void | disableRightClick (bool yn) |
void | blockScrolling (bool yn) |
void | offerReadWriteSelection (const CallBack &rcb, const CallBack &wcb) |
bool | isItemChecked (int) const |
To be called by CmdDriver only, not for casual use. More... | |
uiListBox (uiParent *, const BufferStringSet &, const char *nm=0) | |
uiListBox (uiParent *, const BufferStringSet &, const char *nm, OD::ChoiceMode cm, int prefNrLines=0, int prefFieldWidth=0) | |
uiListBox (uiParent *, const uiStringSet &, const char *nm, OD::ChoiceMode cm, int prefNrLines=0, int prefFieldWidth=0) | |
Public Member Functions inherited from uiGroup | |
uiGroup (uiParent *, const char *nm="uiGroup", bool manage=true) | |
virtual | ~uiGroup () |
operator const uiGroupObj * () const | |
operator uiGroupObj * () | |
operator const uiObject & () const | |
operator uiObject & () | |
uiObject * | attachObj () |
const uiObject * | attachObj () const |
uiParent * | parent () |
const uiParent * | parent () const |
void | setHSpacing (int) |
void | setVSpacing (int) |
void | setSpacing (int s=0) |
void | setBorder (int) |
void | setFrame (bool yn=true) |
void | setNoBackGround () |
uiObject * | hAlignObj () |
void | setHAlignObj (uiObject *o) |
void | setHAlignObj (uiGroup *o) |
uiObject * | hCenterObj () |
void | setHCenterObj (uiObject *o) |
void | setHCenterObj (uiGroup *o) |
void | setIsMain (bool) |
internal use only. Tells the layout manager it's a toplevel mngr. More... | |
virtual uiMainWin * | mainwin () |
void | setChildrenSensitive (bool) |
virtual Notifier< uiBaseObject > & | preFinalise () |
virtual Notifier< uiBaseObject > & | postFinalise () |
virtual void | setSize (const uiSize &) |
Public Member Functions inherited from uiParent | |
uiParent (const char *nm, uiParentBody *) | |
void | addChild (uiBaseObject &) |
void | manageChld (uiBaseObject &, uiObjectBody &) |
void | attachChild (constraintType tp, uiObject *child, uiObject *other, int margin, bool reciprocal) |
const ObjectSet< uiBaseObject > * | childList () const |
uiObject * | mainObject () |
const uiObject * | mainObject () const |
uiParentBody * | pbody () |
const uiParentBody * | pbody () const |
void | attach (constraintType t, int margin=-1) |
void | attach (constraintType t, uiParent *oth, int margin=-1, bool reciprocal=true) |
void | attach (constraintType t, uiObject *oth, int margin=-1, bool reciprocal=true) |
virtual void | display (bool yn, bool shrk=false, bool maximize=false) |
bool | isDisplayed () const |
void | setFocus () |
bool | hasFocus () const |
void | setSensitive (bool yn=true) |
bool | sensitive () const |
const uiFont * | font () const |
void | setFont (const uiFont &f) |
void | setCaption (const uiString &c) |
void | setCursor (const MouseCursor &c) |
uiSize | actualsize (bool include_border) const |
int | prefHNrPics () const |
int | prefVNrPics () const |
void | setPrefHeight (int h) |
void | setPrefWidth (int w) |
void | setPrefHeightInChar (int h) |
void | setPrefHeightInChar (float h) |
void | setPrefWidthInChar (float w) |
void | setPrefWidthInChar (int w) |
virtual void | reDraw (bool deep) |
void | shallowRedraw (CallBacker *=0) |
void | deepRedraw (CallBacker *=0) |
void | setStretch (int h, int v) |
Color | backgroundColor () const |
Color | roBackgroundColor () const |
void | setBackgroundColor (const Color &c) |
void | translateText () |
Public Attributes | |
Notifier< uiListBox > | selectionChanged |
CNotifier< uiListBox, int > | itemChosen |
Notifier< uiListBox > | doubleClicked |
Notifier< uiListBox > | rightButtonClicked |
Notifier< uiListBox > | leftButtonClicked |
Notifier< uiListBox > | deleteButtonPressed |
Protected Member Functions | |
void | mkLabel (const uiString &, LblPos) |
void | mkCheckGroup () |
void | checkCB (CallBacker *) |
void | updateCheckState () |
void | addItemNoUpdate (const uiString &, bool marked=false, int id=-1) |
Protected Member Functions inherited from uiGroup | |
virtual uiObject * | mainobject () |
virtual void | attach_ (constraintType, uiObject *oth, int margin=-1, bool reciprocal=true) |
virtual void | reDraw_ (bool deep) |
void | setShrinkAllowed (bool) |
bool | shrinkAllowed () |
void | bodyDel (CallBacker *) |
void | uiobjDel (CallBacker *) |
void | setFrameStyle (int) |
void | reSizeChildren (const uiObject *, float, float) |
Protected Attributes | |
uiListBoxObj * | lb_ |
ObjectSet< uiLabel > | lbls_ |
uiGroup * | checkgrp_ |
uiCheckBox * | cb_ |
Protected Attributes inherited from uiGroup | |
uiGroupObj * | grpobj_ |
uiGroupParentBody * | body_ |
Private Member Functions | |
mODTextTranslationClass (uiListBox) friend class i_listMessenger | |
void | translateText () |
void | menuCB (CallBacker *) |
void | handleCheckChange (mQtclass(QListWidgetItem *)) |
void | usrChooseAll (bool yn=true) |
bool | isNone () const |
int | optimumFieldWidth (int minwdth=20, int maxwdth=40) const |
void | updateFields2ChoiceMode () |
void | initNewItem (int) |
void | setItemCheckable (int, bool) |
void | setItemsCheckable (bool yn) |
void | setAllItemsChecked (bool) |
void | setItemChecked (int, bool) |
void | setItemChecked (const char *, bool) |
bool | isItemChecked (const char *) const |
int | nrChecked () const |
void | setCheckedItems (const BufferStringSet &) |
void | setCheckedItems (const TypeSet< int > &) |
void | getCheckedItems (BufferStringSet &) const |
void | getCheckedItems (TypeSet< int > &) const |
Static Private Member Functions | |
static int | cDefNrLines () |
== 7 More... | |
Private Attributes | |
OD::ChoiceMode | choicemode_ |
Alignment::HPos | alignment_ |
bool | allowduplicates_ |
uiMenu & | rightclickmnu_ |
BufferString | rettxt_ |
OD::ButtonState | buttonstate_ |
CallBack | savecb_ |
CallBack | retrievecb_ |
bool | scrollingblocked_ |
Friends | |
class | uiListBoxBody |
Additional Inherited Members | |
Static Public Member Functions inherited from uiGroup | |
static uiGroup * | gtDynamicCastToGrp (mQtclass(QWidget *)) |
List Box.
The size of the box is determined automatically (prefNrLines=0) but can be overruled by setNrLines().
If the user can select multiple items, then there is a difference between selected and current item. In the old (Windows) style, you got something that resembles having many current items. Two main problems make us want to phase out this style: The fact that the user can in fact choose multiple items is visually hidden, In many styles you don't know what the current item is after selecting blocks Especially the first problem is a big thing.
New style multi-select works with a check boxes in front of each item. This delivers a challenge because what if the current item is not checked?
This is the basis for the 'chosen' concept, which works in both single- and multi-selection modes. In multi-selection, an item is chosen if it is checked. If no box is checked, then you can have the listbox report the current item as the chosen item. To switch this off, tell the listbox that no chosen is a valid thing, i.e. pick the ZeroOrMore mode.
Lastly, you can have some of the items marked. This will be done by surrounding the item with curly braces, like: '{the item}'. This will not affect selection/checked/chosen status.
enum uiListBox::LblPos |
uiListBox::uiListBox | ( | uiParent * | , |
const char * | nm = 0 , |
||
OD::ChoiceMode | cm = OD::ChooseOnlyOne |
||
) |
|
virtual |
uiListBox::uiListBox | ( | uiParent * | , |
const BufferStringSet & | , | ||
const char * | nm = 0 |
||
) |
uiListBox::uiListBox | ( | uiParent * | , |
const BufferStringSet & | , | ||
const char * | nm, | ||
OD::ChoiceMode | cm, | ||
int | prefNrLines = 0 , |
||
int | prefFieldWidth = 0 |
||
) |
uiListBox::uiListBox | ( | uiParent * | , |
const uiStringSet & | , | ||
const char * | nm, | ||
OD::ChoiceMode | cm, | ||
int | prefNrLines = 0 , |
||
int | prefFieldWidth = 0 |
||
) |
void uiListBox::addItem | ( | const uiString & | , |
bool | marked = false , |
||
int | id = -1 |
||
) |
|
protected |
void uiListBox::addItems | ( | const char ** | ) |
void uiListBox::addItems | ( | const BufferStringSet & | ) |
void uiListBox::addItems | ( | const uiStringSet & | ) |
|
inline |
|
inline |
|
inline |
|
staticprivate |
== 7
|
protected |
|
inline |
|
inline |
void uiListBox::chooseAll | ( | bool | yn = true | ) |
int uiListBox::currentItem | ( | ) | const |
int uiListBox::currentItemID | ( | ) | const |
void uiListBox::disableRightClick | ( | bool | yn | ) |
int uiListBox::firstChosen | ( | ) | const |
|
private |
|
private |
void uiListBox::getChosen | ( | BufferStringSet & | ) | const |
void uiListBox::getChosen | ( | TypeSet< int > & | ) | const |
Color uiListBox::getColor | ( | int | ) | const |
int uiListBox::getItemID | ( | int | idx | ) | const |
int uiListBox::getItemIdx | ( | int | id | ) | const |
First match.
void uiListBox::getItems | ( | BufferStringSet & | ) | const |
|
inline |
|
private |
bool uiListBox::handleLongTabletPress | ( | ) |
int uiListBox::indexOf | ( | const char * | ) | const |
First match.
|
private |
void uiListBox::insertItem | ( | const uiString & | , |
int | idx = -1 , |
||
bool | marked = false , |
||
int | id = -1 |
||
) |
bool uiListBox::isChoosable | ( | int | ) | const |
bool uiListBox::isChosen | ( | int | ) | const |
|
inline |
|
private |
bool uiListBox::isItemChecked | ( | int | ) | const |
To be called by CmdDriver only, not for casual use.
bool uiListBox::isMarked | ( | int | ) | const |
|
inline |
|
inlineprivate |
bool uiListBox::isPresent | ( | const char * | ) | const |
|
inline |
|
inline |
int uiListBox::maxNrOfChoices | ( | ) | const |
|
private |
|
protected |
|
private |
int uiListBox::nextChosen | ( | int | prev = -1 | ) | const |
|
private |
int uiListBox::nrChosen | ( | ) | const |
|
inline |
|
private |
void uiListBox::removeItem | ( | int | ) |
void uiListBox::removeItem | ( | const char * | ) |
|
inline |
void uiListBox::scrollToBottom | ( | ) |
void uiListBox::scrollToTop | ( | ) |
void uiListBox::setAlignment | ( | Alignment::HPos | ) |
|
private |
void uiListBox::setAllowDuplicates | ( | bool | yn | ) |
void uiListBox::setAllowNoneChosen | ( | bool | ) |
|
private |
|
private |
void uiListBox::setChoiceMode | ( | OD::ChoiceMode | ) |
void uiListBox::setChoosable | ( | int | , |
bool | yn | ||
) |
void uiListBox::setChosen | ( | int | , |
bool | yn = true |
||
) |
void uiListBox::setChosen | ( | Interval< int > | , |
bool | yn = true |
||
) |
void uiListBox::setChosen | ( | const BufferStringSet & | ) |
void uiListBox::setChosen | ( | const TypeSet< int > & | ) |
void uiListBox::setColor | ( | int | , |
const Color & | |||
) |
void uiListBox::setCurrentItem | ( | int | ) |
void uiListBox::setCurrentItem | ( | const char * | ) |
First match.
|
inline |
void uiListBox::setEmpty | ( | ) |
void uiListBox::setFieldWidth | ( | int | ) |
void uiListBox::setHSzPol | ( | uiObject::SzPolicy | ) |
void uiListBox::setIcon | ( | int | , |
const char * | icon_identifier | ||
) |
|
private |
|
private |
|
private |
void uiListBox::setItemID | ( | int | idx, |
int | id | ||
) |
|
inlineprivate |
void uiListBox::setItemSelectable | ( | int | , |
bool | |||
) |
void uiListBox::setItemText | ( | int | , |
const uiString & | |||
) |
void uiListBox::setLabelText | ( | const uiString & | , |
int | nr = 0 |
||
) |
void uiListBox::setMarked | ( | int | , |
bool | |||
) |
void uiListBox::setMultiChoice | ( | bool | yn = true | ) |
void uiListBox::setNotSelectable | ( | ) |
void uiListBox::setNrLines | ( | int | ) |
void uiListBox::setPixmap | ( | int | , |
const Color & | |||
) |
void uiListBox::setPixmap | ( | int | , |
const uiPixmap & | |||
) |
void uiListBox::setVSzPol | ( | uiObject::SzPolicy | ) |
int uiListBox::size | ( | ) | const |
void uiListBox::sortItems | ( | bool | asc = true | ) |
const char* uiListBox::textOfItem | ( | int | ) | const |
|
private |
|
protected |
|
private |
|
private |
bool uiListBox::validIdx | ( | int | ) | const |
|
friend |
|
private |
|
private |
|
private |
|
protected |
|
protected |
|
private |
|
protected |
|
private |
|
mutableprivate |
|
private |
|
private |
|
private |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2019