15 #include "uibasemod.h" 31 namespace
ColTab {
class Sequence; }
37 const char* nm=
"uiTreeView",
38 int preferredNrLines=0,
39 bool rootdecorated=
true);
45 bool rootDecorated()
const;
46 void setRootDecorated(
bool yn);
47 void showHeader(
bool yn);
51 void setNrColumns(
int);
52 int nrColumns()
const;
54 void removeColumn(
int index);
55 void setColumnText(
int column,
const uiString& label);
56 uiString getColumnText(
int column)
const;
57 void setColumnWidth(
int column,
int width);
58 void setFixedColumnWidth(
int column,
int width);
59 int columnWidth(
int column)
const;
61 enum WidthMode { Manual, Fixed, Stretch, ResizeToContents,
64 void setColumnWidthMode(
int column,
WidthMode);
65 WidthMode columnWidthMode(
int column)
const;
76 { NoSelection=0,
Single, Multi, Extended, Contiguous };
84 void clearSelection();
88 int nrSelected()
const;
90 void removeSelectedItems();
95 int currentColumn()
const;
102 void setItemMargin(
int);
103 int itemMargin()
const;
105 void setShowToolTips(
bool);
106 bool showToolTips()
const;
116 void expandTo(
int treedepth);
124 void translateText();
125 bool handleLongTabletPress();
128 void triggerUpdate();
135 void setNotifiedItem(
mQtclass(QTreeWidgetItem*));
162 bool allowDoubleClick()
const;
169 uiTreeViewBody*
lvbody() {
return body_; }
170 const uiTreeViewBody*
lvbody()
const {
return body_; }
172 void updateHeaderLabels();
178 friend class uiTreeViewBody;
187 uiTreeViewBody& mkbody(
uiParent*,
const char*,
int);
191 const char* columnText(
int column)
const;
206 enum Type { Standard, CheckBox };
214 bool setchecked=
true )
217 , setcheck_(setchecked)
228 if ( !txt.isEmpty() )
238 mQtclass(QTreeWidgetItem*) qItem() {
return qtreeitem_; }
239 const mQtclass(QTreeWidgetItem*) qItem()
const {
return qtreeitem_; }
241 int nrChildren()
const;
243 void setBGColor(
int column,
const Color&);
247 void setCheckable(
bool);
248 bool isCheckable()
const;
249 bool isChecked(
bool qtstatus=
true)
const;
251 void setChecked(
bool,
bool trigger=
false);
253 void checkAll(
bool yn,
bool trigger=
false);
265 int siblingIndex()
const;
277 const char* text(
int column=0)
const;
279 void setIcon(
int column,
const char* iconname);
280 void setPixmap(
int column,
const uiPixmap&);
281 void setPixmap(
int column,
const Color&,
286 virtual const char*
key(
int,
bool)
const {
return 0; }
288 {
return mUdf(
int); }
290 void setOpen(
bool yn=
true);
308 void setSelectable(
bool yn);
309 bool isSelectable()
const;
311 void setDragEnabled(
bool);
312 void setDropEnabled(
bool);
313 bool dragEnabled()
const;
314 bool dropEnabled()
const;
316 void setVisible(
bool yn);
317 bool isVisible()
const;
319 void setRenameEnabled(
int column,
bool);
320 bool renameEnabled(
int column)
const;
322 void setEnabled(
bool);
323 bool isEnabled()
const;
332 static const
mQtclass(QTreeWidgetItem*) qitemFor(const uiTreeViewItem*);
334 static uiTreeViewItem* itemFor(
mQtclass(QTreeWidgetItem*));
335 static const uiTreeViewItem* itemFor(const
mQtclass(QTreeWidgetItem*));
339 mQtclass(QTreeWidgetItem*) qtreeitem_;
364 uiTreeViewItem* next();
370 mQtclass(QTreeWidgetItemIterator*) iter_;
#define mExpClass(module)
Definition: commondefs.h:160
To be able to send and/or receive CallBacks, inherit from this class.
Definition: callback.h:272
SelectionMode
Definition: uitreeview.h:75
uiTreeView & view_
Definition: uitreeview.h:367
static void updateToolTips()
#define mQtclass(cls)
Definition: commondefs.h:229
virtual int height() const
Actual size in pixels.
uiTreeViewItem * itemNotified()
item last notified. See notifiers below
Definition: uitreeview.h:131
Notifier< uiTreeView > expanded
Definition: uitreeview.h:151
mQtclass(QTreeWidgetItem *) qItem()
Definition: uitreeview.h:238
#define mODTextTranslationClass(clss)
Definition: uistring.h:38
Export_Basic uiString toUiString(ViewStyle)
Maps from [0,1] -> Color.
Definition: coltabsequence.h:37
void setToolTip(const uiString &)
Notifier< uiTreeView > leftButtonClicked
Definition: uitreeview.h:145
Notifier< uiTreeViewItem > keyPressed
Definition: uitreeview.h:327
uiTreeViewBody * body_
Definition: uitreeview.h:182
void setText(float f, int column=0)
Definition: uitreeview.h:272
Notifier< uiTreeView > itemRenamed
Definition: uitreeview.h:141
Definition: uitreeview.h:358
void updateToolTip(CallBacker *=0)
SelectionBehavior
Definition: uitreeview.h:77
Notifier< uiTreeView > returnPressed
Definition: uitreeview.h:142
Notifier< uiTreeView > collapsed
Definition: uitreeview.h:152
uiParent * parent()
Definition: uitreeview.h:123
uiTreeViewBody * lvbody()
Definition: uitreeview.h:169
static const uiString & emptyString()
Definition: uistring.h:109
Notifier< uiTreeView > mouseButtonClicked
Definition: uitreeview.h:148
The base class for most UI elements.
Definition: uiobj.h:38
uiStringSet labels_
Definition: uitreeview.h:184
Definition: uistring.h:89
Definition: uiparent.h:26
Set of BufferString objects.
Definition: bufstringset.h:28
Definition: uitreeview.h:78
Definition: uitreeview.h:206
Notifier< uiTreeView > contextMenuRequested
Definition: uitreeview.h:149
Notifier< uiTreeView > leftButtonPressed
Definition: uitreeview.h:146
bool isSelected(const uiTreeViewItem *) const
void setText(double d, int column=0)
Definition: uitreeview.h:274
OD::ButtonState buttonstate_
Definition: uitreeview.h:161
Definition: uitreeview.h:201
ButtonState
Definition: keyenum.h:20
virtual int compare(uiTreeViewItem *, int column, bool) const
Definition: uitreeview.h:287
Notifier< uiTreeView > mouseButtonPressed
Definition: uitreeview.h:147
void setText(int i, int column=0)
Definition: uitreeview.h:270
friend class uiTreeViewItem
Definition: uitreeview.h:179
Notifier< uiTreeView > itemChanged
Definition: uitreeview.h:140
Notifier< uiTreeViewItem > stateChanged
only works for CheckBox type
Definition: uitreeview.h:326
#define mUdf(type)
Use this macro to get the undefined for simple types.
Definition: undefval.h:272
void setSelected(uiTreeViewItem *, bool)
Notifier< uiTreeView > doubleClicked
Definition: uitreeview.h:150
BufferString rettxt
Definition: uitreeview.h:157
HPos
Definition: draw.h:26
void takeItem(uiTreeViewItem *)
void insertItem(int, uiTreeViewItem *)
Notifier< uiTreeView > rightButtonClicked
Definition: uitreeview.h:143
#define mDefSetupMemb(typ, memb)
Definition: commondefs.h:137
Definition: uitreeview.h:33
Off-screen pixel-based paint device.
Definition: uipixmap.h:34
virtual int width() const
Actual size in pixels.
uiParent * parent_
Definition: uitreeview.h:159
uiTreeViewItem * lastitemnotified_
Definition: uitreeview.h:158
Notifier< uiTreeView > currentChanged
Definition: uitreeview.h:139
friend class uiTreeViewItemIterator
Definition: uitreeview.h:180
Definition: uitreeview.h:76
OD::String with its own variable length buffer. The buffer has a guaranteed minimum size...
Definition: bufstring.h:40
virtual const char * key(int, bool) const
Definition: uitreeview.h:286
brief Helper class for uiTreeView to relay Qt's messages.
Definition: i_qtreeview.h:28
const mQtclass(QTreeWidgetItem *) qItem() const
Definition: uitreeview.h:239
int columnNotified()
Definition: uitreeview.h:132
mFDQtclass(QTreeWidget) mFDQtclass(QTreeWidgetItem) mFDQtclass(QTreeWidgetItemIterator) mFDQtclass(QString) mFDQtclass(QStringList) class uiPixmap
Color Table
Definition: coltab.h:22
Color is an RGB color object, with a transparancy. The storage is in a 4-byte integer, similar to Qt.
Definition: color.h:26
Definition: uistring.h:218
Type
Definition: uitreeview.h:206
ScrollMode
Definition: uitreeview.h:71
const uiTreeViewBody * lvbody() const
Definition: uitreeview.h:170
int column_
Definition: uitreeview.h:160
Notifier< uiTreeView > selectionChanged
Definition: uitreeview.h:138
Setup(const uiString &txt=uiString::emptyString(), uiTreeViewItem::Type tp=uiTreeViewItem::Standard, bool setchecked=true)
Definition: uitreeview.h:211
void setNotifiedColumn(int col)
Definition: uitreeview.h:136
WidthMode
Definition: uitreeview.h:61
void unNotify()
Definition: uitreeview.h:133
Definition: uitreeview.h:208
Definition: pythonaccess.h:37
Notifier< uiTreeView > unusedKey
Definition: uitreeview.h:153
Notifier< uiTreeView > rightButtonPressed
Definition: uitreeview.h:144