11#include <gwen-gui-cpp/cppwidget.hpp>
30 QSizePolicy::Policy hpolicy=QSizePolicy::Minimum;
31 QSizePolicy::Policy vpolicy=QSizePolicy::Minimum;
35 wParent=GWEN_Widget_Tree_GetParent(
_widget);
38 qw->setAllColumnsShowFocus(
true);
39 qw->setSortingEnabled(
true);
40 qw->setRootIsDecorated(
false);
41 qw->setItemsExpandable(
false);
42 qw->setSelectionBehavior(QAbstractItemView::SelectRows);
46 hpolicy=QSizePolicy::Expanding;
48 vpolicy=QSizePolicy::Expanding;
49 qw->setSizePolicy(hpolicy, vpolicy);
56 qw->connect(qw, SIGNAL(currentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*)),
58 SLOT(slotActivated()));
82 QTreeWidgetItem *item;
84 item=qw->topLevelItem(index);
91 qw->setCurrentItem(item);
96 qw->setColumnWidth(index, value);
102 qw->setSelectionMode(QAbstractItemView::NoSelection);
105 qw->setSelectionMode(QAbstractItemView::SingleSelection);
108 qw->setSelectionMode(QAbstractItemView::ExtendedSelection);
118 qw->sortByColumn(-1, Qt::AscendingOrder);
121 qw->sortByColumn(index, Qt::AscendingOrder);
124 qw->sortByColumn(index, Qt::DescendingOrder);
137 qw->sortItems(c, h->sortIndicatorOrder());
159 QTreeWidgetItem *item;
162 item=qw->currentItem();
164 item=qw->itemAbove(item);
172 return qw->columnWidth(index);
175 switch(qw->selectionMode()) {
176 case QAbstractItemView::NoSelection:
178 case QAbstractItemView::SingleSelection:
180 case QAbstractItemView::ExtendedSelection:
186 qw->selectionMode());
190 if (qw->sortColumn()!=index)
193 switch(qw->header()->sortIndicatorOrder()) {
194 case Qt::AscendingOrder:
196 case Qt::DescendingOrder:
232 qw->header()->reset();
235 while(!(t=str.section(
'\t', n, n)).isEmpty()) {
239 qw->setHeaderLabels(sl);
253 while(!(t=str.section(
'\t', n, n)).isEmpty()) {
257 (void)
new QTreeWidgetItem(qw, sl);
270 const char *defaultValue) {
279 QTreeWidgetItem *item;
281 item=qw->headerItem();
285 for (i=0; i<qw->columnCount(); i++) {
301 QTreeWidgetItem *item;
304 item=qw->topLevelItem(index);
311 for (i=0; i<qw->columnCount(); i++) {
QT4_DialogBox * getMainWindow()
static QString extractHtml(const char *text)
int setIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int value, int doSignal)
const char * getCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *defaultValue)
int getIntProperty(GWEN_DIALOG_PROPERTY prop, int index, int defaultValue)
int setCharProperty(GWEN_DIALOG_PROPERTY prop, int index, const char *value, int doSignal)
Qt4_W_ListBox(GWEN_WIDGET *w)
#define DBG_ERROR(dbg_logger, format,...)
#define GWEN_WIDGET_FLAGS_FILLY
@ GWEN_DialogSortDirection_None
@ GWEN_DialogSortDirection_Up
@ GWEN_DialogSortDirection_Down
#define GWEN_WIDGET_FLAGS_FILLX
@ GWEN_DialogProperty_AddValue
@ GWEN_DialogProperty_ColumnWidth
@ GWEN_DialogProperty_Title
@ GWEN_DialogProperty_Sort
@ GWEN_DialogProperty_ClearValues
@ GWEN_DialogProperty_SelectionMode
@ GWEN_DialogProperty_SortDirection
@ GWEN_DialogProperty_Value
@ GWEN_Dialog_SelectionMode_None
@ GWEN_Dialog_SelectionMode_Multi
@ GWEN_Dialog_SelectionMode_Single
#define GWEN_ERROR_INVALID
#define QT4_DIALOG_WIDGET_REAL
#define QT4_DIALOG_STRING_TITLE
#define QT4_DIALOG_STRING_VALUE