List of all members | Public Types | Properties | Public Slots | Signals | Public Member Functions | Public Attributes | Static Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes
XTreeWidget Class Reference

#include <xtreewidget.h>

Inheritance diagram for XTreeWidget:
QTreeWidget PeriodsListView

Public Types

enum  PopulateStyle { Replace, Append }
 

Properties

QString altDragString
 
bool alwaysForgetful
 
QString dragString
 
bool populateLinear
 

Public Slots

void addColumn (const QString &, int, int, bool=true, const QString=QString(), const QString=QString(), const int scale=0)
 
void clear ()
 
void hideColumn (int colnum)
 

Signals

void currentItemChanged (XTreeWidgetItem *, XTreeWidgetItem *)
 
void itemActivated (XTreeWidgetItem *item, int column)
 
void itemChanged (XTreeWidgetItem *item, int column)
 
void itemClicked (XTreeWidgetItem *item, int column)
 
void itemCollapsed (XTreeWidgetItem *item)
 
void itemDoubleClicked (XTreeWidgetItem *item, int column)
 
void itemEntered (XTreeWidgetItem *item, int column)
 
void itemExpanded (XTreeWidgetItem *item)
 
void itemPressed (XTreeWidgetItem *item, int column)
 
void itemSelected (int)
 
void newId (int)
 
void populated ()
 
void populateHeaderMenu (QMenu *, QTreeWidgetItem *, int)
 
void populateMenu (QMenu *, QTreeWidgetItem *)
 
void populateMenu (QMenu *, QTreeWidgetItem *, int)
 
void populateMenu (QMenu *, XTreeWidgetItem *)
 
void populateMenu (QMenu *, XTreeWidgetItem *, int)
 
void resorted ()
 
void valid (bool)
 

Public Member Functions

 XTreeWidget (QWidget *)
 
 ~XTreeWidget ()
 
Q_INVOKABLE void addTopLevelItem (XTreeWidgetItem *item)
 
Q_INVOKABLE void addTopLevelItems (const QList< XTreeWidgetItem * > &items)
 
QString altDragString () const
 
Q_INVOKABLE int altId () const
 
bool alwaysForgetful ()
 
Q_INVOKABLE void closePersistentEditor (XTreeWidgetItem *item, int column=0)
 
virtual Q_INVOKABLE QString column (const int) const
 
virtual Q_INVOKABLE int column (const QString) const
 
Q_INVOKABLE int columnCount () const
 
Q_INVOKABLE int currentColumn () const
 
virtual Q_INVOKABLE XTreeWidgetItemcurrentItem () const
 
QString dragString () const
 
Q_INVOKABLE void editItem (XTreeWidgetItem *item, int column=0)
 
Q_INVOKABLE QList< XTreeWidgetItem * > findItems (const QString &text, Qt::MatchFlags flags, int column=0, int role=0) const
 
Q_INVOKABLE XTreeWidgetItemfindXTreeWidgetItemWithId (const XTreeWidget *ptree, const int pid)
 
Q_INVOKABLE XTreeWidgetItemfindXTreeWidgetItemWithId (const XTreeWidgetItem *ptreeitem, const int pid)
 
Q_INVOKABLE QTreeWidgetItemheaderItem () const
 
void hideColumn (const QString &)
 
Q_INVOKABLE int id () const
 
Q_INVOKABLE int id (const QString) const
 
Q_INVOKABLE int indexOfTopLevelItem (XTreeWidgetItem *item) const
 
Q_INVOKABLE void insertTopLevelItem (int index, XTreeWidgetItem *item)
 
Q_INVOKABLE void insertTopLevelItems (int index, const QList< XTreeWidgetItem * > &items)
 
Q_INVOKABLE XTreeWidgetIteminvisibleRootItem () const
 
Q_INVOKABLE bool isFirstItemColumnSpanned (const XTreeWidgetItem *item) const
 
Q_INVOKABLE XTreeWidgetItemitemAbove (const XTreeWidgetItem *item) const
 
Q_INVOKABLE QTreeWidgetItemitemAt (const QPoint &p) const
 
Q_INVOKABLE QTreeWidgetItemitemAt (int x, int y) const
 
Q_INVOKABLE QTreeWidgetItemitemBelow (const XTreeWidgetItem *item) const
 
Q_INVOKABLE QWidgetitemWidget (XTreeWidgetItem *item, int column) const
 
void keyPressEvent (QKeyEvent *e)
 
void merge (int low, int high, int mid)
 
void mergeSort (int low, int high)
 
Q_INVOKABLE void moveColumn (int from, int to)
 
Q_INVOKABLE void openPersistentEditor (XTreeWidgetItem *item, int column=0)
 
void populate (const QString &, bool=false)
 
void populate (const QString &, int, bool=false)
 
Q_INVOKABLE void populate (XSqlQuery, bool=false, PopulateStyle=Replace)
 
Q_INVOKABLE void populate (XSqlQuery, int, bool=false, PopulateStyle=Replace)
 
bool populateLinear ()
 
Q_INVOKABLE QVariant rawValue (const QString colname) const
 
Q_INVOKABLE void removeItemWidget (XTreeWidgetItem *item, int column)
 
void sCopyCellToClipboard ()
 
void sCopyColumnToClipboard ()
 
void sCopyRowToClipboard ()
 
void sCopyVisibleToClipboard ()
 
Q_INVOKABLE QList< XTreeWidgetItem * > selectedItems () const
 
void setAltDragString (QString)
 
void setAlwaysForgetful (bool alwaysForgetful=true)
 
virtual Q_INVOKABLE void setColumnCount (int columns)
 
virtual Q_INVOKABLE void setColumnLocked (int, bool)
 
virtual Q_INVOKABLE void setColumnVisible (int, bool)
 
Q_INVOKABLE void setCurrentItem (XTreeWidgetItem *item)
 
Q_INVOKABLE void setCurrentItem (XTreeWidgetItem *item, int column)
 
Q_INVOKABLE void setCurrentItem (XTreeWidgetItem *item, int column, QItemSelectionModel::SelectionFlags command)
 
void setDragString (QString)
 
Q_INVOKABLE void setFirstItemColumnSpanned (const XTreeWidgetItem *item, bool span)
 
Q_INVOKABLE void setHeaderItem (XTreeWidgetItem *item)
 
Q_INVOKABLE void setHeaderLabel (const QString &label)
 
Q_INVOKABLE void setHeaderLabels (const QStringList &labels)
 
Q_INVOKABLE void setId (int pId, bool pClear=true)
 
Q_INVOKABLE void setId (int pId, int pAltId, bool pClear=true)
 
Q_INVOKABLE void setItemWidget (XTreeWidgetItem *item, int column, QWidget *widget)
 
void setPopulateLinear (bool alwaysLinear=true)
 
void sExport ()
 
void showColumn (const QString &)
 
void showColumn (int colnum)
 
Q_INVOKABLE QList< QPair< int, Qt::SortOrder > > sortColumnOrder ()
 
virtual Q_INVOKABLE void sortItems (int column=0, Qt::SortOrder order=Qt::AscendingOrder)
 
void sSearch (const QString &)
 
void sToggleForgetfulness ()
 
Q_INVOKABLE QTreeWidgetItemtakeTopLevelItem (int index)
 
Q_INVOKABLE QString toCsv ()
 
Q_INVOKABLE QString toHtml () const
 
virtual Q_INVOKABLE XTreeWidgetItemtopLevelItem (int idx) const
 
Q_INVOKABLE int topLevelItemCount () const
 
Q_INVOKABLE QString toSV (QString pSep) const
 
Q_INVOKABLE QString toTxt () const
 
Q_INVOKABLE QString toVcf () const
 
Q_INVOKABLE QRect visualItemRect (const XTreeWidgetItem *item) const
 

Public Attributes

bool _forgetful
 
QString _settingsName
 

Static Public Attributes

static GuiClientInterface_guiClientInterface
 

Protected Slots

void populateCalculatedColumns ()
 
void populateWorker ()
 
void sCurrentItemChanged (QTreeWidgetItem *current, QTreeWidgetItem *previous)
 
void sHeaderClicked (int)
 
void sItemActivated (QTreeWidgetItem *item, int column)
 
void sItemChanged (QTreeWidgetItem *item, int column)
 
void sItemClicked (QTreeWidgetItem *item, int column)
 
void sItemCollapsed (QTreeWidgetItem *item)
 
void sItemDoubleClicked (QTreeWidgetItem *item, int column)
 
void sItemEntered (QTreeWidgetItem *item, int column)
 
void sItemExpanded (QTreeWidgetItem *item)
 
void sItemPressed (QTreeWidgetItem *item, int column)
 

Protected Member Functions

virtual void mouseMoveEvent (QMouseEvent *)
 
virtual void mousePressEvent (QMouseEvent *)
 
virtual void resizeEvent (QResizeEvent *)
 

Protected Attributes

QPoint dragStartPosition
 

Member Enumeration Documentation

◆ PopulateStyle

Enumerator
Replace 
Append 

Property Documentation

◆ altDragString

QString XTreeWidget::altDragString
readwrite

◆ alwaysForgetful

bool XTreeWidget::alwaysForgetful
readwrite

◆ dragString

QString XTreeWidget::dragString
readwrite

◆ populateLinear

bool XTreeWidget::populateLinear
readwrite

Constructor & Destructor Documentation

◆ XTreeWidget()

XTreeWidget::XTreeWidget ( QWidget pParent)

◆ ~XTreeWidget()

XTreeWidget::~XTreeWidget ( )

Member Function Documentation

◆ addColumn

void XTreeWidget::addColumn ( const QString &  pString,
int  pWidth,
int  pAlignment,
bool  pVisible = true,
const QString  pEditColumn = QString(),
const QString  pDisplayColumn = QString(),
const int  scale = 0 
)
slot

◆ addTopLevelItem()

Q_INVOKABLE void XTreeWidget::addTopLevelItem ( XTreeWidgetItem item)
inline

◆ addTopLevelItems()

void XTreeWidget::addTopLevelItems ( const QList< XTreeWidgetItem * > &  items)

◆ altDragString()

QString XTreeWidget::altDragString ( ) const

◆ altId()

int XTreeWidget::altId ( ) const

◆ alwaysForgetful()

bool XTreeWidget::alwaysForgetful ( )

◆ clear

void XTreeWidget::clear ( )
slot

◆ closePersistentEditor()

Q_INVOKABLE void XTreeWidget::closePersistentEditor ( XTreeWidgetItem item,
int  column = 0 
)
inline

◆ column() [1/2]

QString XTreeWidget::column ( const int  pIndex) const
virtual

◆ column() [2/2]

int XTreeWidget::column ( const QString  pName) const
virtual

◆ columnCount()

Q_INVOKABLE int XTreeWidget::columnCount ( ) const
inline

◆ currentColumn()

Q_INVOKABLE int XTreeWidget::currentColumn ( ) const
inline

◆ currentItem()

XTreeWidgetItem * XTreeWidget::currentItem ( ) const
virtual

◆ currentItemChanged

void XTreeWidget::currentItemChanged ( XTreeWidgetItem ,
XTreeWidgetItem  
)
signal

◆ dragString()

QString XTreeWidget::dragString ( ) const

◆ editItem()

Q_INVOKABLE void XTreeWidget::editItem ( XTreeWidgetItem item,
int  column = 0 
)
inline

◆ findItems()

QList< XTreeWidgetItem * > XTreeWidget::findItems ( const QString &  text,
Qt::MatchFlags  flags,
int  column = 0,
int  role = 0 
) const

◆ findXTreeWidgetItemWithId() [1/2]

XTreeWidgetItem * XTreeWidget::findXTreeWidgetItemWithId ( const XTreeWidget ptree,
const int  pid 
)

◆ findXTreeWidgetItemWithId() [2/2]

XTreeWidgetItem * XTreeWidget::findXTreeWidgetItemWithId ( const XTreeWidgetItem ptreeitem,
const int  pid 
)

◆ headerItem()

Q_INVOKABLE QTreeWidgetItem* XTreeWidget::headerItem ( ) const
inline

◆ hideColumn() [1/2]

void XTreeWidget::hideColumn ( const QString &  pColumn)

◆ hideColumn [2/2]

void XTreeWidget::hideColumn ( int  colnum)
inlineslot

◆ id() [1/2]

int XTreeWidget::id ( ) const

◆ id() [2/2]

int XTreeWidget::id ( const QString  p) const

◆ indexOfTopLevelItem()

Q_INVOKABLE int XTreeWidget::indexOfTopLevelItem ( XTreeWidgetItem item) const
inline

◆ insertTopLevelItem()

Q_INVOKABLE void XTreeWidget::insertTopLevelItem ( int  index,
XTreeWidgetItem item 
)
inline

◆ insertTopLevelItems()

void XTreeWidget::insertTopLevelItems ( int  index,
const QList< XTreeWidgetItem * > &  items 
)

◆ invisibleRootItem()

XTreeWidgetItem * XTreeWidget::invisibleRootItem ( ) const

◆ isFirstItemColumnSpanned()

Q_INVOKABLE bool XTreeWidget::isFirstItemColumnSpanned ( const XTreeWidgetItem item) const
inline

◆ itemAbove()

XTreeWidgetItem * XTreeWidget::itemAbove ( const XTreeWidgetItem item) const

◆ itemActivated

void XTreeWidget::itemActivated ( XTreeWidgetItem item,
int  column 
)
signal

◆ itemAt() [1/2]

Q_INVOKABLE QTreeWidgetItem* XTreeWidget::itemAt ( const QPoint &  p) const
inline

◆ itemAt() [2/2]

Q_INVOKABLE QTreeWidgetItem* XTreeWidget::itemAt ( int  x,
int  y 
) const
inline

◆ itemBelow()

Q_INVOKABLE QTreeWidgetItem* XTreeWidget::itemBelow ( const XTreeWidgetItem item) const
inline

◆ itemChanged

void XTreeWidget::itemChanged ( XTreeWidgetItem item,
int  column 
)
signal

◆ itemClicked

void XTreeWidget::itemClicked ( XTreeWidgetItem item,
int  column 
)
signal

◆ itemCollapsed

void XTreeWidget::itemCollapsed ( XTreeWidgetItem item)
signal

◆ itemDoubleClicked

void XTreeWidget::itemDoubleClicked ( XTreeWidgetItem item,
int  column 
)
signal

◆ itemEntered

void XTreeWidget::itemEntered ( XTreeWidgetItem item,
int  column 
)
signal

◆ itemExpanded

void XTreeWidget::itemExpanded ( XTreeWidgetItem item)
signal

◆ itemPressed

void XTreeWidget::itemPressed ( XTreeWidgetItem item,
int  column 
)
signal

◆ itemSelected

void XTreeWidget::itemSelected ( int  )
signal

◆ itemWidget()

Q_INVOKABLE QWidget* XTreeWidget::itemWidget ( XTreeWidgetItem item,
int  column 
) const
inline

◆ keyPressEvent()

void XTreeWidget::keyPressEvent ( QKeyEvent *  e)

◆ merge()

void XTreeWidget::merge ( int  low,
int  high,
int  mid 
)

◆ mergeSort()

void XTreeWidget::mergeSort ( int  low,
int  high 
)

◆ mouseMoveEvent()

void XTreeWidget::mouseMoveEvent ( QMouseEvent *  event)
protectedvirtual

◆ mousePressEvent()

void XTreeWidget::mousePressEvent ( QMouseEvent *  event)
protectedvirtual

◆ moveColumn()

Q_INVOKABLE void XTreeWidget::moveColumn ( int  from,
int  to 
)
inline

◆ newId

void XTreeWidget::newId ( int  )
signal

◆ openPersistentEditor()

Q_INVOKABLE void XTreeWidget::openPersistentEditor ( XTreeWidgetItem item,
int  column = 0 
)
inline

◆ populate() [1/4]

void XTreeWidget::populate ( const QString &  pSql,
bool  pUseAltId = false 
)

◆ populate() [2/4]

void XTreeWidget::populate ( const QString &  pSql,
int  pIndex,
bool  pUseAltId = false 
)

◆ populate() [3/4]

void XTreeWidget::populate ( XSqlQuery  pQuery,
bool  pUseAltId = false,
PopulateStyle  popstyle = Replace 
)

◆ populate() [4/4]

void XTreeWidget::populate ( XSqlQuery  pQuery,
int  pIndex,
bool  pUseAltId = false,
PopulateStyle  popstyle = Replace 
)

◆ populateCalculatedColumns

void XTreeWidget::populateCalculatedColumns ( )
protectedslot

◆ populated

void XTreeWidget::populated ( )
signal

◆ populateHeaderMenu

void XTreeWidget::populateHeaderMenu ( QMenu *  ,
QTreeWidgetItem ,
int   
)
signal

◆ populateLinear()

bool XTreeWidget::populateLinear ( )

◆ populateMenu [1/4]

void XTreeWidget::populateMenu ( QMenu *  ,
QTreeWidgetItem  
)
signal

◆ populateMenu [2/4]

void XTreeWidget::populateMenu ( QMenu *  ,
QTreeWidgetItem ,
int   
)
signal

◆ populateMenu [3/4]

void XTreeWidget::populateMenu ( QMenu *  ,
XTreeWidgetItem  
)
signal

◆ populateMenu [4/4]

void XTreeWidget::populateMenu ( QMenu *  ,
XTreeWidgetItem ,
int   
)
signal

◆ populateWorker

void XTreeWidget::populateWorker ( )
protectedslot

◆ rawValue()

QVariant XTreeWidget::rawValue ( const QString  colname) const

Returns the Raw Value of the first selected row on colname

◆ removeItemWidget()

Q_INVOKABLE void XTreeWidget::removeItemWidget ( XTreeWidgetItem item,
int  column 
)
inline

◆ resizeEvent()

void XTreeWidget::resizeEvent ( QResizeEvent *  e)
protectedvirtual

◆ resorted

void XTreeWidget::resorted ( )
signal

◆ sCopyCellToClipboard()

void XTreeWidget::sCopyCellToClipboard ( )

◆ sCopyColumnToClipboard()

void XTreeWidget::sCopyColumnToClipboard ( )

◆ sCopyRowToClipboard()

void XTreeWidget::sCopyRowToClipboard ( )

◆ sCopyVisibleToClipboard()

void XTreeWidget::sCopyVisibleToClipboard ( )

◆ sCurrentItemChanged

void XTreeWidget::sCurrentItemChanged ( QTreeWidgetItem current,
QTreeWidgetItem previous 
)
protectedslot

◆ selectedItems()

QList< XTreeWidgetItem * > XTreeWidget::selectedItems ( ) const

◆ setAltDragString()

void XTreeWidget::setAltDragString ( QString  pAltDragString)

◆ setAlwaysForgetful()

void XTreeWidget::setAlwaysForgetful ( bool  alwaysForgetful = true)

◆ setColumnCount()

void XTreeWidget::setColumnCount ( int  columns)
virtual

◆ setColumnLocked()

void XTreeWidget::setColumnLocked ( int  pColumn,
bool  pLocked 
)
virtual

◆ setColumnVisible()

void XTreeWidget::setColumnVisible ( int  pColumn,
bool  pVisible 
)
virtual

◆ setCurrentItem() [1/3]

Q_INVOKABLE void XTreeWidget::setCurrentItem ( XTreeWidgetItem item)
inline

◆ setCurrentItem() [2/3]

Q_INVOKABLE void XTreeWidget::setCurrentItem ( XTreeWidgetItem item,
int  column 
)
inline

◆ setCurrentItem() [3/3]

Q_INVOKABLE void XTreeWidget::setCurrentItem ( XTreeWidgetItem item,
int  column,
QItemSelectionModel::SelectionFlags  command 
)
inline

◆ setDragString()

void XTreeWidget::setDragString ( QString  pDragString)

◆ setFirstItemColumnSpanned()

Q_INVOKABLE void XTreeWidget::setFirstItemColumnSpanned ( const XTreeWidgetItem item,
bool  span 
)
inline

◆ setHeaderItem()

Q_INVOKABLE void XTreeWidget::setHeaderItem ( XTreeWidgetItem item)
inline

◆ setHeaderLabel()

Q_INVOKABLE void XTreeWidget::setHeaderLabel ( const QString &  label)
inline

◆ setHeaderLabels()

Q_INVOKABLE void XTreeWidget::setHeaderLabels ( const QStringList &  labels)
inline

◆ setId() [1/2]

void XTreeWidget::setId ( int  pId,
bool  pClear = true 
)

Selects a row with a matching value pId on the first column in the result set. If pClear is true then any previous selections are cleared.

◆ setId() [2/2]

void XTreeWidget::setId ( int  pId,
int  pAltId,
bool  pClear = true 
)

Selects a row with a matching values pId and pAltId on the first and second columns respectively in the result set. If pClear is true then any previous selections are cleared.

◆ setItemWidget()

Q_INVOKABLE void XTreeWidget::setItemWidget ( XTreeWidgetItem item,
int  column,
QWidget widget 
)
inline

◆ setPopulateLinear()

void XTreeWidget::setPopulateLinear ( bool  alwaysLinear = true)

◆ sExport()

void XTreeWidget::sExport ( )

◆ sHeaderClicked

void XTreeWidget::sHeaderClicked ( int  column)
protectedslot

◆ showColumn() [1/2]

void XTreeWidget::showColumn ( const QString &  pColumn)

◆ showColumn() [2/2]

void XTreeWidget::showColumn ( int  colnum)
inline

◆ sItemActivated

void XTreeWidget::sItemActivated ( QTreeWidgetItem item,
int  column 
)
protectedslot

◆ sItemChanged

void XTreeWidget::sItemChanged ( QTreeWidgetItem item,
int  column 
)
protectedslot

◆ sItemClicked

void XTreeWidget::sItemClicked ( QTreeWidgetItem item,
int  column 
)
protectedslot

◆ sItemCollapsed

void XTreeWidget::sItemCollapsed ( QTreeWidgetItem item)
protectedslot

◆ sItemDoubleClicked

void XTreeWidget::sItemDoubleClicked ( QTreeWidgetItem item,
int  column 
)
protectedslot

◆ sItemEntered

void XTreeWidget::sItemEntered ( QTreeWidgetItem item,
int  column 
)
protectedslot

◆ sItemExpanded

void XTreeWidget::sItemExpanded ( QTreeWidgetItem item)
protectedslot

◆ sItemPressed

void XTreeWidget::sItemPressed ( QTreeWidgetItem item,
int  column 
)
protectedslot

◆ sortColumnOrder()

QList< QPair< int, Qt::SortOrder > > XTreeWidget::sortColumnOrder ( )

◆ sortItems()

void XTreeWidget::sortItems ( int  column = 0,
Qt::SortOrder  order = Qt::AscendingOrder 
)
virtual

◆ sSearch()

void XTreeWidget::sSearch ( const QString &  pTarget)

◆ sToggleForgetfulness()

void XTreeWidget::sToggleForgetfulness ( )

◆ takeTopLevelItem()

Q_INVOKABLE QTreeWidgetItem* XTreeWidget::takeTopLevelItem ( int  index)
inline

◆ toCsv()

QString XTreeWidget::toCsv ( )

◆ toHtml()

QString XTreeWidget::toHtml ( ) const

◆ topLevelItem()

XTreeWidgetItem * XTreeWidget::topLevelItem ( int  idx) const
virtual

◆ topLevelItemCount()

Q_INVOKABLE int XTreeWidget::topLevelItemCount ( ) const
inline

◆ toSV()

QString XTreeWidget::toSV ( QString  pSep) const

◆ toTxt()

QString XTreeWidget::toTxt ( ) const

◆ toVcf()

QString XTreeWidget::toVcf ( ) const

◆ valid

void XTreeWidget::valid ( bool  )
signal

◆ visualItemRect()

Q_INVOKABLE QRect XTreeWidget::visualItemRect ( const XTreeWidgetItem item) const
inline

Member Data Documentation

◆ _forgetful

bool XTreeWidget::_forgetful

◆ _guiClientInterface

GuiClientInterface * XTreeWidget::_guiClientInterface
static

◆ _settingsName

QString XTreeWidget::_settingsName

◆ dragStartPosition

QPoint XTreeWidget::dragStartPosition
protected

The documentation for this class was generated from the following files:

Generated on Fri Apr 9 2021 xTuple ERP Programmer Reference, Version 6.0.0 doxygen 1.8.17