// Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-//
+//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
+// License as published by the Free Software Foundation; either
// version 2.1 of the License.
-//
-// This library is distributed in the hope that it will be useful
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+//
+// This library is distributed in the hope that it will be useful
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File : OB_Browser.cxx
+// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+//
+
#include "OB_Browser.h"
-#include "OB_Filter.h"
-#include "OB_ListItem.h"
-#include "OB_ListView.h"
+//#include "OB_Filter.h"
+//#include "OB_ListItem.h"
+//#include "OB_ListView.h"
-#include <SUIT_DataObjectIterator.h>
-#include <SUIT_TreeSync.h>
+#include <QtxTreeView.h>
+//#include <SUIT_DataObjectIterator.h>
-#include <qcursor.h>
-#include <qlayout.h>
-#include <qtooltip.h>
-#include <qpainter.h>
-#include <qwmatrix.h>
-#include <qlistview.h>
-#include <qpopupmenu.h>
-#include <qdatetime.h>
+#include <QAction>
+#include <QItemSelection>
+#include <QLinkedList>
+#include <QKeyEvent>
+#include <QVBoxLayout>
#include <time.h>
+
/*!
\class OB_Browser::ToolTip
Tool tip for OB_Browser.
*/
+//TODO: ToolTip commented - to be removed or revised
+/*
class OB_Browser::ToolTip : public QToolTip
{
public:
private:
OB_Browser* myBrowser;
};
-
+*/
/*!
Constructor
*/
+/*
OB_Browser::ToolTip::ToolTip( OB_Browser* b, QWidget* p )
: QToolTip( p ),
myBrowser( b )
{
}
-
+*/
/*!
Destructor
*/
+/*
OB_Browser::ToolTip::~ToolTip()
{
}
-
+*/
/*!
It is called when there is a possibility that a tool tip
should be shown and must decide whether there is a tool tip for the point
in the widget that this QToolTip object relates to.
\param pos - point co-ordinates
*/
+/*
void OB_Browser::ToolTip::maybeTip( const QPoint& pos )
{
if ( !parentWidget() || !myBrowser || !myBrowser->isShowToolTips() )
tip( aRect, aText );
}
-
-
-typedef SUIT_DataObject* ObjPtr;
-typedef OB_ListItem* ItemPtr;
-
-/*!
- \class OB_BrowserSync
- Auxiliary class for synchronizing tree of SUIT_DataObjects and list view items
*/
-class OB_BrowserSync
-{
-public:
- OB_BrowserSync( OB_Browser* );
- bool isEqual( const ObjPtr&, const ItemPtr& ) const;
- ObjPtr nullSrc() const;
- ItemPtr nullTrg() const;
- ItemPtr createItem( const ObjPtr&, const ItemPtr&, const ItemPtr&, const bool ) const;
- void updateItem( const ObjPtr& , const ItemPtr& ) const;
- void deleteItemWithChildren( const ItemPtr& ) const;
- void children( const ObjPtr&, QValueList<ObjPtr>& ) const;
- void children( const ItemPtr&, QValueList<ItemPtr>& ) const;
- ItemPtr parent( const ItemPtr& ) const;
-private:
- bool needUpdate( const ItemPtr& ) const;
- OB_Browser* myBrowser;
-};
/*!
- Constructor
+ \class OB_Browser
+ Implements public API of an object browser that can be used to display arbitrary
+ application data in a hierarchical form. It is based on Qt4 model/view
+ architecture. By default, object browser displays contents of SUIT_TreeModel,
+ which simply maps tree of data objects to a tree of model indices needed for QTreeView.
+ However, an arbitrary model derived from QAbstractItemModel can be specified instead.
+ For example, some SUIT-based application might not like using SUIT_DataObject class,
+ and in such a case it should provide its own implementation of a data model.
+
+ Allows to get/set selection,
+ to drag-n-drop of objects, to determine item by SUIT object and
+ vice versa
*/
-OB_BrowserSync::OB_BrowserSync( OB_Browser* ob )
-: myBrowser( ob )
-{
-}
/*!
- \return true if item must be updated
- \param item - item to be checked
+ \brief Constructor
+ \param parent paren widget
+ \param model data model
*/
-bool OB_BrowserSync::needUpdate( const ItemPtr& item ) const
-{
- bool update = false;
- if ( item ) {
- SUIT_DataObject* obj = item->dataObject();
- if ( obj ) {
- // 1. check text
- update = ( item->text( 0 ) != obj->name() ) || myBrowser->needToUpdateTexts( item );
-
- if ( !update ) {
- // 2. check pixmap (compare serialNumber()-s)
- QPixmap objPix = obj->icon();
- const QPixmap* itemPix = item->pixmap( 0 );
- update = ( objPix.isNull() && ( itemPix && !itemPix->isNull() ) ) ||
- ( !objPix.isNull() && ( !itemPix || itemPix->isNull() ) );
- if ( !update && !objPix.isNull() && itemPix && !itemPix->isNull() ) {
- int aIconW = objPix.width();
- if( aIconW > 20 ) {
- QWMatrix aM;
- double aScale = 20.0 / aIconW;
- aM.scale( aScale, aScale );
- objPix = objPix.xForm( aM );
- }
- update = ( objPix.serialNumber() != itemPix->serialNumber() );
- }
- }
- }
- }
- return update;
-}
-
-/*!
- Updates item
- \param p - item
-*/
-void OB_BrowserSync::updateItem( const ObjPtr& o, const ItemPtr& p ) const
+OB_Browser::OB_Browser( QWidget* parent, QAbstractItemModel* model )
+: QWidget( parent ),
+ myAutoOpenLevel( 0 )
{
- if ( p && needUpdate( p ) ) {
- // printf( "--- needUpdate for %s = true ---\n", p->text( 0 ).latin1() );
- myBrowser->updateText( p );
- p->update();
- }
- if( o && myBrowser->getUpdater() )
- {
- myBrowser->getUpdater()->update( o, p );
- }
-}
+ myView = new QtxTreeView( this );
+ myView->setRootIsDecorated( true );
+ myView->setSelectionMode( QAbstractItemView::ExtendedSelection );
+ myView->installEventFilter( this );
+ myView->viewport()->installEventFilter( this );
-/*!
- Creates item by SUIT object
- \param src - corresponding SUIT object
- \param parent - parent for item
- \param after - previous sibling for item
- \param prepend - item must be added to start of children list
-*/
-ItemPtr OB_BrowserSync::createItem( const ObjPtr& src,
- const ItemPtr& parent, const ItemPtr& after,
- const bool prepend ) const
-{
- ItemPtr i = myBrowser ? dynamic_cast<ItemPtr>( myBrowser->createItem( src, parent, after, prepend ) ) : 0;
- if( i )
- i->setOpen( src->isOpen() );
- return i;
-}
+ QVBoxLayout* main = new QVBoxLayout( this );
+ main->addWidget( myView );
+ main->setMargin( 0 );
-/*!
- Deletes object with all children
- \param i - item
-*/
-void OB_BrowserSync::deleteItemWithChildren( const ItemPtr& i ) const
-{
- if( myBrowser && myBrowser->myItems.contains( i->dataObject() ) )
- {
- myBrowser->removeReferences( i );
- delete i;
- }
-}
+ // TODO: decide what to do with tooltip
+ //myShowToolTips = true;
+ //myTooltip = new ToolTip( this, myView->viewport() );
-/*!
- \return true if objects correspond each other at all
- \param p - suit object
- \param q - object browser item
-*/
-bool OB_BrowserSync::isEqual( const ObjPtr& p, const ItemPtr& q ) const
-{
- bool isRoot = p==myBrowser->getRootObject() && !q,
- isEq = p && q && q->dataObject()==p;
- return isRoot || ( !p && !q ) || isEq;
-}
+ // TODO: drag-n-drop works differently - SUIT_TreeModel to be updated
+ // and QTreeView needs some setup
+ //connect( myView, SIGNAL( dropped( QPtrList<QListViewItem>, QListViewItem*, int ) ),
+ // this, SLOT( onDropped( QPtrList<QListViewItem>, QListViewItem*, int ) ) );
+ connect( myView, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
+ connect( myView, SIGNAL( doubleClicked( QListViewItem* ) ),
+ this, SLOT( onDoubleClicked( QListViewItem* ) ) );
-/*!
- \return null suit object
-*/
-ObjPtr OB_BrowserSync::nullSrc() const
-{
- return 0;
+ setModel( model );
}
/*!
- \return null item
+ \brief Destructor.
*/
-ItemPtr OB_BrowserSync::nullTrg() const
+OB_Browser::~OB_Browser()
{
- return 0;
+ //delete myTooltip;
+ //setUpdater( 0 );
}
/*!
- Fills list with children of SUIT object
- \param p - SUIT object
- \param ch - list to be filled
+ \return tree view of object browser
*/
-void OB_BrowserSync::children( const ObjPtr& p, QValueList<ObjPtr>& ch ) const
+QtxTreeView* OB_Browser::treeView() const
{
- DataObjectList l;
- if( p )
- {
- p->children( l );
- ch.clear();
- for( SUIT_DataObject* o = l.first(); o; o = l.next() )
- ch.append( o );
- }
+ return myView;
}
/*!
- Fills list with children of item
- \param p - item
- \param ch - list to be filled
+ \brief Get popup menu client type.
+ \return popup client type
*/
-void OB_BrowserSync::children( const ItemPtr& p, QValueList<ItemPtr>& ch ) const
+QString OB_Browser::popupClientType() const
{
- for( QListViewItem* item = p ? p->firstChild() : myBrowser->listView()->firstChild(); item; item = item->nextSibling() )
- {
- ItemPtr p = dynamic_cast<ItemPtr>( item );
- if( p )
- ch.append( p );
- }
+ return "ObjectBrowser";
}
/*!
- \return parent of item
- \param p - item
+ \brief Get data model.
+ \return data model
+ \sa setModel()
*/
-ItemPtr OB_BrowserSync::parent( const ItemPtr& p ) const
+QAbstractItemModel* OB_Browser::model() const
{
- return p ? dynamic_cast<ItemPtr>( p->parent() ) : 0;
+ return myView->model();
}
-
/*!
- Constructor
+ \brief Set data model.
+ \param model data model
+ \sa model()
*/
-OB_Browser::OB_Browser( QWidget* parent, SUIT_DataObject* root )
-: QFrame( parent ),
-
-myRoot( 0 ),
-myTooltip( 0 ),
-myUpdater( 0 ),
-myAutoOpenLevel( 0 ),
-myAutoUpdate( false ),
-myAutoDelObjs( false ),
-myRootDecorated( true )
+void OB_Browser::setModel( QAbstractItemModel* model )
{
- myView = new OB_ListView( QtxListView::HeaderAuto, this );
- myView->setAppropriate( myView->addColumn( "Data" ), false );
- myView->setSorting( -1 );
- myView->setRootIsDecorated( true );
- myView->setSelectionMode( QListView::Extended );
- myView->installEventFilter( this );
- myView->viewport()->installEventFilter( this );
-
- QVBoxLayout* main = new QVBoxLayout( this );
- main->addWidget( myView );
-
- myShowToolTips = true;
- myTooltip = new ToolTip( this, myView->viewport() );
-
- connect( myView, SIGNAL( dropped( QPtrList<QListViewItem>, QListViewItem*, int ) ),
- this, SLOT( onDropped( QPtrList<QListViewItem>, QListViewItem*, int ) ) );
- connect( myView, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) );
- connect( myView, SIGNAL( doubleClicked( QListViewItem* ) ),
- this, SLOT( onDoubleClicked( QListViewItem* ) ) );
-
- setRootObject( root );
-
+ myView->setModel( model );
+ myView->update();
setModified();
}
/*!
- Destructor
-*/
-OB_Browser::~OB_Browser()
-{
- myItems.clear();
- delete myTooltip;
- setUpdater( 0 );
-}
-
-/*!
- \return true if root is decorated by +
+ \brief Check if controls for expanding and collapsing top-level items are shown.
+ \return \c true if top-level items are decorated
+ \sa setRootIsDecorated()
*/
bool OB_Browser::rootIsDecorated() const
{
- return myRootDecorated;
+ return myView->rootIsDecorated();
}
/*!
- Sets state "root is recorated"
- \param decor - new value of state
+ \brief Show/hide controls for expanding and collapsing top-level items.
+ \param decor if \c true, top-level items are decorated
+ \sa rootIsDecorated()
*/
void OB_Browser::setRootIsDecorated( const bool decor )
{
- if ( decor == rootIsDecorated() )
- return;
-
- myRootDecorated = decor;
- updateTree( 0, false );
+ if ( decor != rootIsDecorated() )
+ myView->setRootIsDecorated( decor );
}
/*!
- \return number of levels to be auto opened on update tree
+ \brief Get number of levels which should be automatically expanded
+ when updating the data tree.
+ \return number of levels to be auto-opened on tree updating
+ \sa setAutoOpenLevel()
*/
int OB_Browser::autoOpenLevel() const
{
}
/*!
- Changes number of levels to be auto opened on update tree
- \param level - new number of levels
+ \brief Set number of levels which should be automatically expanded
+ when updating the data tree.
+ \param levels number of levels to be auto-opened on tree updating
+ \sa autoOpenLevel()
*/
-void OB_Browser::setAutoOpenLevel( const int level )
+void OB_Browser::setAutoOpenLevel( const int levels )
{
- if ( myAutoOpenLevel == level )
- return;
-
- myAutoOpenLevel = level;
+ if ( myAutoOpenLevel != levels )
+ myAutoOpenLevel = levels;
}
/*!
- Opens branches from 1 to \alevels. If parameter value negative then autoOpenLevel() value will be used.
+ \brief Expand all branches to the specified number of levels.
+
+ If \a levels value is negative, then autoOpenLevel() value is used instead.
+
+ \param levels number of levels to be expanded
\sa autoOpenLevel()
*/
void OB_Browser::openLevels( const int levels )
{
- int level = levels < 0 ? autoOpenLevel() : levels;
- QListView* lv = listView();
- if ( !lv || level < 1 )
- return;
-
- QListViewItem* item = lv->firstChild();
- while ( item )
- {
- openBranch( item, level );
- item = item->nextSibling();
- }
+ treeView()->expandLevels( levels < 0 ? autoOpenLevel() : levels );
}
/*!
\return state "are tooltips shown"
*/
+/*
bool OB_Browser::isShowToolTips()
{
return myShowToolTips;
Sets new value of state "are tooltips shown"
\param theDisplay - new value
*/
+/*
void OB_Browser::setShowToolTips( const bool theDisplay )
{
myShowToolTips = theDisplay;
}
-
-/*!
- \return true if object browser automatically updates tree after SUIT object removing
*/
-bool OB_Browser::isAutoUpdate() const
-{
- return myAutoUpdate;
-}
-
-/*!
- Sets new value of "auto update": whether object browser automatically updates tree after SUIT object removing
-*/
-void OB_Browser::setAutoUpdate( const bool on )
-{
- myAutoUpdate = on;
-}
-
-/*!
- \return true if object browser must delete old tree on setRootObject(), replaceTree()
- \sa setRootObject(), replaceTree()
-*/
-bool OB_Browser::isAutoDeleteObjects() const
-{
- return myAutoDelObjs;
-}
-
-/*!
- Sets whether object browser must delete old tree on setRootObject(), replaceTree()
- \sa setRootObject(), replaceTree()
-*/
-void OB_Browser::setAutoDeleteObjects( const bool on )
-{
- myAutoDelObjs = on;
-}
-
-/*!
- \return updater of browser
-*/
-OB_Updater* OB_Browser::getUpdater() const
-{
- return myUpdater;
-}
-
-/*!
- \sets new updater of browser
-*/
-void OB_Browser::setUpdater( OB_Updater* theUpdate )
-{
- if( myUpdater )
- delete myUpdater;
- myUpdater = theUpdate;
-}
/*!
\return root SUIT object of browser
*/
+/* TODO: removed
SUIT_DataObject* OB_Browser::getRootObject() const
{
return myRoot;
}
-
+*/
/*!
Sets new root SUIT object of browser
\param theRoot - new root object
*/
+/* TODO: removed
void OB_Browser::setRootObject( SUIT_DataObject* theRoot )
{
DataObjectKey curKey;
if ( selNum != numberOfSelected() )
emit selectionChanged();
}
-
+*/
/*!
+ \brief Get number of selected items.
\return number of selected items
*/
int OB_Browser::numberOfSelected() const
{
int count = 0;
- if ( listView() )
- {
- for ( QListViewItemIterator it( listView() ); it.current(); ++it )
- if ( it.current()->isSelected() )
- count++;
- }
+ if ( treeView() && treeView()->selectionModel() )
+ count = treeView()->selectionModel()->selectedIndexes().count();
return count;
}
/*!
- \return list of selected objects
+ \brief Get all selected items.
+ \return unsorted list of selected indexes with no duplicates
*/
-DataObjectList OB_Browser::getSelected() const
+QModelIndexList OB_Browser::getSelected() const
{
- DataObjectList lst;
- getSelected( lst );
- return lst;
+ QModelIndexList selected = QModelIndexList();
+ if ( treeView() && treeView()->selectionModel() )
+ selected = treeView()->selectionModel()->selectedIndexes();
+ return selected;
}
/*!
- Fills list with selected objects
+ \brief Get selection containing information about selected ranges.
+ \return QItemSelection instance
*/
-void OB_Browser::getSelected( DataObjectList& theObjList ) const
+const QItemSelection OB_Browser::selection() const
{
- theObjList.clear();
-
- if ( !listView() )
- return;
-
- for ( QListViewItemIterator it( listView() ); it.current(); ++it )
- {
- if ( it.current()->isSelected() )
- {
- SUIT_DataObject* obj = dataObject( it.current() );
- if ( obj )
- theObjList.append( obj );
- }
- }
+ static QItemSelection emptySel;
+ QItemSelection sel = emptySel;
+ if ( treeView() && treeView()->selectionModel() )
+ sel = treeView()->selectionModel()->selection();
+ return sel;
}
/*!
- Sets selected object
+ \brief Set selected objects.
\param theObject - new selected object
\param append - if it is true, then other selected objects are left as selected,
otherwise only 'theObject' will be selected
*/
-void OB_Browser::setSelected( const SUIT_DataObject* theObject, const bool append )
+void OB_Browser::setSelected( const QModelIndex& theObject, const bool )
{
+ /*
DataObjectList lst;
lst.append( theObject );
setSelected( lst, append );
+ */
}
/*!
\param append - if it is true, then other selected objects are left as selected,
otherwise only 'theObjLst' will be selected
*/
-void OB_Browser::setSelected( const DataObjectList& theObjLst, const bool append )
+void OB_Browser::setSelected( const QModelIndexList& theObjLst, const bool )
{
+ /*
QListView* lv = listView();
if ( !lv )
emit selectionChanged();
}
+ */
}
/*!
\return true if item corresponding to object is opened
- \param theObject - object to be checked
+ \param index - object to be checked
*/
-bool OB_Browser::isOpen( SUIT_DataObject* theObject ) const
+bool OB_Browser::isOpen( const QModelIndex& index ) const
{
- bool res = false;
- if ( listView() )
- res = listView()->isOpen( listViewItem( theObject ) );
- return res;
+ return treeView()->isExpanded( index );
}
/*!
Sets opened state of item
- \param theObject - object corresponding to item
- \param theOpen - new opened state
+ \param index - object corresponding to item
+ \param open - new opened state
*/
-void OB_Browser::setOpen( SUIT_DataObject* theObject, const bool theOpen )
+void OB_Browser::setOpen( const QModelIndex& index, const bool open )
{
- if ( listView() )
- listView()->setOpen( listViewItem( theObject ), theOpen );
+ treeView()->setExpanded( index, open );
+}
+
+/*!
+ Adjusts width by root item
+*/
+void OB_Browser::adjustWidth()
+{
+ treeView()->resizeColumnToContents( 0 );
}
/*!
\return SUIT object correspondint to item at position 'pos'
\param pos - position
*/
+/* TODO: removed - QTreeView::indexAt() should be used
SUIT_DataObject* OB_Browser::dataObjectAt( const QPoint& pos ) const
{
SUIT_DataObject* obj = 0;
return obj;
}
-
+*/
/*!
\return filter of list view
*/
+/* TODO: removed
OB_Filter* OB_Browser::filter() const
{
return myView->filter();
}
-
+*/
/*!
Changes filter of list view
\param f - new filter
*/
+/* TODO: removed
void OB_Browser::setFilter( OB_Filter* f )
{
myView->setFilter( f );
}
-
+*/
/*!
Adds new column to list view
\param label - title of column
\param id - id of column
\param width - width of column
*/
+/* TODO: removed
int OB_Browser::addColumn( const QString& label, const int id, const int width )
{
return addColumn( QIconSet(), label, id, width );
}
-
+*/
/*!
Adds new column to list view
\param icon - icon of column
\param id - id of column
\param width - width of column
*/
+/* TODO: removed
int OB_Browser::addColumn( const QIconSet& icon, const QString& label, const int id, const int width )
{
QListView* lv = listView();
return theId;
}
-
+*/
/*!
Removes column
\param id - id of column
*/
+/* TODO: removed
void OB_Browser::removeColumn( const int id )
{
QListView* lv = listView();
}
updateText();
}
-
+*/
/*!
Sets title of first column (name column)
\param label - new title
*/
+/* TODO: removed
void OB_Browser::setNameTitle( const QString& label )
{
setNameTitle( QIconSet(), label );
}
-
+*/
/*!
Sets title and icon of first column (name column)
\param icon - new icon
\param label - new title
*/
+/* TODO: removed
void OB_Browser::setNameTitle( const QIconSet& icon, const QString& label )
{
QListView* lv = listView();
else
lv->setColumnText( 0, icon, label );
}
-
+*/
/*!
Sets title of column
\param id - column id
\param label - new column title
*/
+/* TODO: removed
void OB_Browser::setColumnTitle( const int id, const QString& label )
{
setColumnTitle( id, QIconSet(), label );
}
-
+*/
/*!
Sets title and icon of column
\param id - column id
\param icon - new column icon
\param label - new column title
*/
+/* TODO: removed
void OB_Browser::setColumnTitle( const int id, const QIconSet& icon, const QString& label )
{
QListView* lv = listView();
else
lv->setColumnText( myColumnIds[id], icon, label );
}
-
+*/
/*!
\return title of first column (name column)
*/
+/* TODO: removed
QString OB_Browser::nameTitle() const
{
return myView->columnText( 0 );
}
-
+*/
/*!
\return title of first column (name column)
\param id - column id
*/
+/* TODO: removed
QString OB_Browser::columnTitle( const int id ) const
{
QString txt;
txt = myView->columnText( myColumnIds[id] );
return txt;
}
-
+*/
/*!
\return true if column is visible
\param id - column id
*/
+/* TODO: removed
bool OB_Browser::isColumnVisible( const int id ) const
{
return myColumnIds.contains( id ) && myView->isShown( myColumnIds[id] );
}
-
+*/
/*!
Sets visibility of column
\param id - column id
\param on - new visibility state
*/
+/* TODO: removed
void OB_Browser::setColumnShown( const int id, const bool on )
{
if ( !myColumnIds.contains( id ) )
if( !on )
myView->setColumnWidthMode( myColumnIds[id], QListView::Manual );
}
-
+*/
/*!
Sets global width mode
\param mode - new width mode
*/
+/* TODO: removed
void OB_Browser::setWidthMode( QListView::WidthMode mode )
{
for ( int i = 0, n = myView->columns(); i < n; i++ )
if( mode!=QListView::Maximum || myView->columnWidth( i )>0 )
myView->setColumnWidthMode( i, mode );
}
-
+*/
/*!
\return list of columns ids
*/
+/* TODO: to be revised or removed
QValueList<int> OB_Browser::columns() const
{
QValueList<int> lst;
lst.append( it.key() );
return lst;
}
-
+*/
/*!
\return true if it is possible to show/hide column by popup
\param id - column id
*/
+/* TODO: removed
bool OB_Browser::appropriateColumn( const int id ) const
{
bool res = false;
res = myView->appropriate( myColumnIds[id] );
return res;
}
-
+*/
/*!
Sets "appropriate state": is it possible to show/hide column by popup
\param id - column id
\param on - new state
*/
+/* TODO: removed
void OB_Browser::setAppropriateColumn( const int id, const bool on )
{
if ( !myColumnIds.contains( id ) )
myView->setAppropriate( myColumnIds[id], on );
}
-
+*/
/*!
Updates tree
\param obj - start object
\param autoOpen - to open automatically branches of autoOpenLevel()
\sa autoOpenLevel()
*/
+/* TODO: removed
void OB_Browser::updateTree( SUIT_DataObject* obj, const bool autoOpen )
{
// QTime t1 = QTime::currentTime();
// QTime t2 = QTime::currentTime();
// qDebug( QString( "update tree time = %1 msecs" ).arg( t1.msecsTo( t2 ) ) );
}
-
+*/
/*!
Replaces part of tree starting at object 'src' by tree starting at object 'trg'
*/
+/* TODO: removed
void OB_Browser::replaceTree( SUIT_DataObject* src, SUIT_DataObject* trg )
{
if ( !src || !trg || src == trg || src->root() != getRootObject() )
if ( selNum != numberOfSelected() )
emit selectionChanged();
}
-
+*/
/*!
Updates view
\param startObj - start object
*/
+/* TODO: removed
void OB_Browser::updateView( SUIT_DataObject* startObj )
{
QListView* lv = listView();
synchronize<ObjPtr,ItemPtr,OB_BrowserSync>( startObj, startItem, sync );
}
}
-
-/*!
- Creates new list item
- \return new item
- \param o - corresponding SUIT object
- \param parent - parent item
- \param after - item after that new item must be added
- \param prepend - new item must be added as first
-*/
-QListViewItem* OB_Browser::createItem( const SUIT_DataObject* o, QListViewItem* parent,
- QListViewItem* after, const bool prepend )
-{
- QListView* lv = listView();
-
- if ( !lv || !o )
- return 0;
-
- QListViewItem* item = 0;
- SUIT_DataObject* obj = (SUIT_DataObject*)o;
-
- int type = -1;
-
- switch ( obj->checkType() )
- {
- case SUIT_DataObject::CheckBox:
- type = QCheckListItem::CheckBox;
- break;
- case SUIT_DataObject::RadioButton:
- type = QCheckListItem::RadioButton;
- break;
- }
-
- if ( parent )
- {
- if ( after )
- {
- if ( type == -1 )
- item = new OB_ListItem( obj, parent, after );
- else
- item = new OB_CheckListItem( obj, parent, after, (QCheckListItem::Type)type );
- }
- else if ( prepend )
- {
- if ( type == -1 )
- item = new OB_ListItem( obj, parent );
- else
- item = new OB_CheckListItem( obj, parent, (QCheckListItem::Type)type );
- }
- else // append
- {
- after = parent->firstChild();
- while ( after && after->nextSibling() )
- after = after->nextSibling();
- if ( type == -1 )
- item = new OB_ListItem( obj, parent, after );
- else
- item = new OB_CheckListItem( obj, parent, after, (QCheckListItem::Type)type );
- }
- }
- else
- {
- if ( after )
- {
- if ( type == -1 )
- item = new OB_ListItem( obj, lv, after );
- else
- item = new OB_CheckListItem( obj, lv, after, (QCheckListItem::Type)type );
- }
- else if ( prepend )
- {
- if ( type == -1 )
- item = new OB_ListItem( obj, lv );
- else
- item = new OB_CheckListItem( obj, lv, (QCheckListItem::Type)type );
- }
- else // append
- {
- after = lv->firstChild();
- while ( after && after->nextSibling() )
- after = after->nextSibling();
- if ( type == -1 )
- item = new OB_ListItem( obj, lv, after );
- else
- item = new OB_CheckListItem( obj, lv, after, (QCheckListItem::Type)type );
- }
- }
-
- myItems.insert( obj, item );
- obj->connect( this, SLOT( onDestroyed( SUIT_DataObject* ) ) );
- updateText( item );
-
- return item;
-}
-
-/*!
- Adjusts width by root item
*/
-void OB_Browser::adjustWidth()
-{
- if ( !listView() )
- return;
-
- listView()->setColumnWidth( 0, 0 );
- if ( listView()->firstChild() )
- adjustWidth( listView()->firstChild() );
-}
/*!
Adjusts width by item
\param item
*/
+/*
void OB_Browser::adjustWidth( QListViewItem* item )
{
while ( item )
item = item->nextSibling();
}
}
-
-/*!
- \return SUIT object corresponding to item
- \param item
-*/
-SUIT_DataObject* OB_Browser::dataObject( const QListViewItem* item ) const
-{
- SUIT_DataObject* obj = 0;
-
- if ( item && item->rtti() == OB_ListItem::RTTI() )
- obj = ((OB_ListItem*)item)->dataObject();
- else if ( item && item->rtti() == OB_CheckListItem::RTTI() )
- obj = ((OB_CheckListItem*)item)->dataObject();
-
- return obj;
-}
-
-/*!
- \return item corresponding to SUIT object
- \param obj - SUIT object
*/
-QListViewItem* OB_Browser::listViewItem( const SUIT_DataObject* obj ) const
-{
- QListViewItem* item = 0;
-
- if ( myItems.contains( (SUIT_DataObject*)obj ) )
- item = myItems[(SUIT_DataObject*)obj];
-
- return item;
-}
-
-/*!
- \return list view of object browser
-*/
-QListView* OB_Browser::listView() const
-{
- return myView;
-}
/*!
\remove all items referencing current (through data objects)
*/
+/* TODO:
void OB_Browser::removeReferences( QListViewItem* item )
{
if ( !item )
/*!
Connects all children to SLOT onDestroyed
*/
+/* TODO: move to SUIT_TreeModel
void OB_Browser::createConnections( SUIT_DataObject* obj )
{
if ( !obj )
for ( DataObjectListIterator it( childList ); it.current(); ++it )
it.current()->connect( this, SLOT( onDestroyed( SUIT_DataObject* ) ) );
}
-
+*/
/*!
Disconnects all children from SLOT onDestroyed
*/
+/* TODO: move to SUIT_TreeModel
void OB_Browser::removeConnections( SUIT_DataObject* obj )
{
if ( !obj )
for ( DataObjectListIterator it( childList ); it.current(); ++it )
it.current()->disconnect( this, SLOT( onDestroyed( SUIT_DataObject* ) ) );
}
-
+*/
/*!
Stores states (opened, selected) of current tree items
\return current item
\param openObjs, openKeys - maps of opened objects
\param curKey - map of current objects
*/
+/* TODO: to be revised
SUIT_DataObject* OB_Browser::storeState( DataObjectMap& selObjs, DataObjectMap& openObjs,
DataObjectKeyMap& selKeys, DataObjectKeyMap& openKeys,
DataObjectKey& curKey ) const
return curObj;
}
-
+*/
/*!
Restores states (opened, selected) of current tree items
\param selObjs, selKeys - maps of selected objects
\param openObjs, openKeys - maps of opened objects
\param curKey - map of current objects
*/
+/* TODO: to be revised
void OB_Browser::restoreState( const DataObjectMap& selObjs, const DataObjectMap& openObjs,
const SUIT_DataObject* curObj, const DataObjectKeyMap& selKeys,
const DataObjectKeyMap& openKeys, const DataObjectKey& curKey )
bool parentOpen = true;
if( item && item->parent() )
parentOpen = item->parent()->isOpen();
-
+
if ( openObjs[obj] && parentOpen )
lv->setOpen( item, true );
}
lv->blockSignals( block );
}
-
+*/
/*!
Creates object key by tree item
*/
+/* TODO: move to SUIT_TreeModel
OB_Browser::DataObjectKey OB_Browser::objectKey( QListViewItem* i ) const
{
return objectKey( dataObject( i ) );
}
-
+*/
/*!
Creates object key by SUIT object
*/
+/* TODO: move to SUIT_TreeModel
OB_Browser::DataObjectKey OB_Browser::objectKey( SUIT_DataObject* obj ) const
{
if ( !obj )
return DataObjectKey( obj->key() );
}
-
+*/
/*!
Custom key press event handler, updates tree by F5
*/
void OB_Browser::keyPressEvent( QKeyEvent* e )
{
if ( e->key() == Qt::Key_F5 )
- updateTree( 0, false );
+ //updateTree( 0, false );
+ update();
- QFrame::keyPressEvent( e );
+ QWidget::keyPressEvent( e );
}
/*!
SLOT: called if action "Expand all" is activated
*/
+/* TODO: to be revised
void OB_Browser::onExpand()
{
DataObjectList selected;
for ( DataObjectListIterator itr( selected ); itr.current(); ++itr )
expand( listViewItem( itr.current() ) );
}
-
+*/
/*!
SLOT: called if action "Show/hide column" is activated by popup
*/
+/* TODO: removed
void OB_Browser::onColumnVisible( int id )
{
setColumnShown( id, !isColumnVisible( id ) );
}
-
+*/
/*!
SLOT: called if SUIT object is destroyed
*/
+/* TODO: moved to SUIT_TreeModel
void OB_Browser::onDestroyed( SUIT_DataObject* obj )
{
removeObject( obj );
}
-
+*/
/*!
SLOT: called on finish of drag-n-drop operation
\param items - dragged items
\param item - destination (item on that they were dropped)
\param action - QDropEvent::Action
*/
+ // TODO: drag-n-drop works differently - SUIT_TreeModel to be updated
+ // and QTreeView needs some setup
+/*
void OB_Browser::onDropped( QPtrList<QListViewItem> items, QListViewItem* item, int action )
{
SUIT_DataObject* obj = dataObject( item );
if ( !lst.isEmpty() )
emit dropped( lst, obj, action );
}
-
+*/
/*!
Updates texts of items
*/
+/* TODO: to be removed
void OB_Browser::updateText()
{
if ( myColumnIds.isEmpty() )
it.current()->setText( itr.data(), obj->text( itr.key() ) );
}
}
-
+*/
/*!
\return true if item must be updated
\param item - item to be checked
*/
+/* TODO: to be revised
bool OB_Browser::needToUpdateTexts( QListViewItem* item ) const
{
SUIT_DataObject* obj = dataObject( item );
return true;
return false;
}
-
+*/
/*!
Updates texts of item
\param item - item to be updated
*/
+/* TODO: to be revised
void OB_Browser::updateText( QListViewItem* item )
{
SUIT_DataObject* obj = dataObject( item );
for( QMap<int, int>::iterator it = myColumnIds.begin(); it != myColumnIds.end(); ++it )
item->setText( it.data(), obj->text( it.key() ) );
}
-
+*/
/*!
Custom event filter
*/
+/*
bool OB_Browser::eventFilter( QObject* o, QEvent* e )
{
if ( o == myView && e->type() == QEvent::ContextMenu )
}
}
- return QFrame::eventFilter( o, e );
+ return QWidget::eventFilter( o, e );
}
-
+*/
/*!
Adds custom actions to popup
\param menu - popup menu
*/
-void OB_Browser::contextMenuPopup( QPopupMenu* menu )
+void OB_Browser::contextMenuPopup( QMenu* menu )
{
/* QValueList<int> cols;
for ( QMap<int, int>::ConstIterator it = myColumnIds.begin(); it != myColumnIds.end(); ++it )
menu->setItemParameter( id, *iter );
}
if ( menu->count() != num )
- menu->insertSeparator();*/
+ menu->insertSeparator();
DataObjectList selected;
getSelected( selected );
menu->insertItem( tr( "MEN_EXPAND_ALL" ), this, SLOT( onExpand() ) );
menu->insertSeparator();
}
+*/
}
/*!
Expands item with all it's children
*/
+/* TODO: to be revised
void OB_Browser::expand( QListViewItem* item )
{
if ( !item )
for ( QListViewItem* child = item->firstChild(); child; child = child->nextSibling() )
expand( child );
}
-
+*/
/*!
\return true if item or one of it's children isn't opened
*/
+/* TODO: to be revised
bool OB_Browser::hasClosed( QListViewItem* item ) const
{
if ( !item )
return has;
}
-
+*/
/*!
Removes SUIT object
\param obj - SUIT object to be removed
\param autoUpd - auto tree updating
*/
+/* TODO: moved to SUIT_TreeModel
void OB_Browser::removeObject( SUIT_DataObject* obj, const bool autoUpd )
{
if ( !obj )
delete item;
}
-
+*/
/*!
Opens branches from 1 to autoOpenLevel()
\sa autoOpenLevel()
*/
+/* TODO: to be revised
void OB_Browser::autoOpenBranches()
{
openLevels();
}
-
+*/
/*!
Opens branch
\param item
\param level
*/
+/* TODO: to be revised
void OB_Browser::openBranch( QListViewItem* item, const int level )
{
if ( level < 1 )
item = item->nextSibling();
}
}
-
+*/
/*!
SLOT: called on double click on item, emits signal
*/
+/* TODO: to be revised
void OB_Browser::onDoubleClicked( QListViewItem* item )
{
if ( item )
emit doubleClicked( dataObject( item ) );
}
-
+*/
/*!
Stores time of last modification
*/
{
myModifiedTime = clock();
}
-
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
+// File : OB_Browser.h
+// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
+//
+
#ifndef OB_BROWSER_H
#define OB_BROWSER_H
#include "OB.h"
-#include <qframe.h>
-
-#include <qmap.h>
-#include <qlistview.h>
+#include <QWidget>
+#include <QMap>
+#include <QModelIndex>
+#include <QItemSelection>
#include <SUIT_DataObject.h>
#include <SUIT_DataObjectKey.h>
#pragma warning( disable:4251 )
#endif
+class QAbstractItemModel;
class QToolTip;
-class OB_Filter;
-class OB_ListView;
-class OB_ListItem;
-
-class OB_Updater
-{
-public:
- OB_Updater(){};
- virtual ~OB_Updater(){};
- virtual void update( SUIT_DataObject* theObj, OB_ListItem* theLI ) = 0;
-};
+class QtxTreeView;
-/*!
- \class OB_Browser
- Represents object browser. Allows to get/set selection,
- to drag-n-drop of objects, to determine item by SUIT object and
- vice versa
-*/
-class OB_EXPORT OB_Browser : public QFrame, public SUIT_PopupClient
+class OB_EXPORT OB_Browser : public QWidget, public SUIT_PopupClient
{
- Q_OBJECT
+ Q_OBJECT
- class ToolTip;
+ // TODO: commented - to be removed or revised
+ //class ToolTip;
public:
- OB_Browser( QWidget* = 0, SUIT_DataObject* theRoot = 0 );
+ OB_Browser( QWidget* = 0, QAbstractItemModel* = 0 );
virtual ~OB_Browser();
- virtual QString popupClientType() const { return QString( "ObjectBrowser" ); }
+ QtxTreeView* treeView() const;
- SUIT_DataObject* getRootObject() const;
- virtual void setRootObject( SUIT_DataObject* theRoot = 0 );
+ virtual QString popupClientType() const;
- int numberOfSelected() const;
+ QAbstractItemModel* model() const;
+ void setModel( QAbstractItemModel* );
- DataObjectList getSelected() const;
- void getSelected( DataObjectList& ) const;
+ bool rootIsDecorated() const;
+ void setRootIsDecorated( const bool );
- virtual void setSelected( const SUIT_DataObject* theObject, const bool = false );
- virtual void setSelected( const DataObjectList& theObjLst, const bool = false );
+ int autoOpenLevel() const;
+ void setAutoOpenLevel( const int );
+ void openLevels( const int = -1 );
- bool isOpen( SUIT_DataObject* theObject ) const;
- virtual void setOpen( SUIT_DataObject* theObject, const bool theOpen = true );
+ //bool isShowToolTips();
+ //void setShowToolTips( const bool theDisplay );
- bool isAutoUpdate() const;
- virtual void setAutoUpdate( const bool );
+ int numberOfSelected() const;
+ QModelIndexList getSelected() const;
+ const QItemSelection selection() const;
- bool isAutoDeleteObjects() const;
- virtual void setAutoDeleteObjects( const bool );
+ virtual void setSelected( const QModelIndex&, const bool = false );
+ virtual void setSelected( const QModelIndexList&, const bool = false );
- virtual void updateTree( SUIT_DataObject* = 0, const bool = false );
- virtual void replaceTree( SUIT_DataObject*, SUIT_DataObject* );
+ bool isOpen( const QModelIndex& ) const;
+ virtual void setOpen( const QModelIndex& theObject, const bool theOpen = true );
- bool isShowToolTips();
- void setShowToolTips( const bool theDisplay );
+ void adjustWidth();
- void adjustWidth();
+ // san - To be revised or removed
+ // QTreeView::indexAt() should be used
+ //SUIT_DataObject* dataObjectAt( const QPoint& ) const;
- SUIT_DataObject* dataObjectAt( const QPoint& ) const;
+ // san - Removed
+ //OB_Filter* filter() const;
+ //void setFilter( OB_Filter* );
- OB_Filter* filter() const;
- void setFilter( OB_Filter* );
+ // san - Removed, columns and titles are controlled by SUIT_TreeModel and SUIT_DataObject
+ //virtual int addColumn( const QString&, const int id = -1, const int width = -1 );
+ //virtual int addColumn( const QIconSet&, const QString&, const int id = -1, const int width = -1 );
+ //virtual void removeColumn( const int id );
- bool rootIsDecorated() const;
- void setRootIsDecorated( const bool );
+ //void setNameTitle( const QString& );
+ //virtual void setNameTitle( const QIconSet&, const QString& );
+ //void setColumnTitle( const int id, const QString& );
+ //virtual void setColumnTitle( const int id, const QIconSet&, const QString& );
- int autoOpenLevel() const;
- void setAutoOpenLevel( const int );
- void openLevels( const int = -1 );
+ //QString nameTitle() const;
+ //QString columnTitle( const int ) const;
- virtual int addColumn( const QString&, const int id = -1, const int width = -1 );
- virtual int addColumn( const QIconSet&, const QString&, const int id = -1, const int width = -1 );
- virtual void removeColumn( const int id );
+ // san - These methods are now in QTreeView
+ //bool isColumnVisible( const int ) const;
+ //virtual void setColumnShown( const int, const bool );
- void setNameTitle( const QString& );
- virtual void setNameTitle( const QIconSet&, const QString& );
- void setColumnTitle( const int id, const QString& );
- virtual void setColumnTitle( const int id, const QIconSet&, const QString& );
+ // TODO: QTreeView::resizeColumnToContents() can be used instead
+ //virtual void setWidthMode( QListView::WidthMode );
- QString nameTitle() const;
- QString columnTitle( const int ) const;
+ // san - removed
+ // QValueList<int> columns() const;
- bool isColumnVisible( const int ) const;
- virtual void setColumnShown( const int, const bool );
+ //bool appropriateColumn( const int ) const;
+ //virtual void setAppropriateColumn( const int, const bool );
- virtual void setWidthMode( QListView::WidthMode );
+ //virtual bool eventFilter(QObject* watched, QEvent* e);
- QValueList<int> columns() const;
-
- bool appropriateColumn( const int ) const;
- virtual void setAppropriateColumn( const int, const bool );
-
- virtual bool eventFilter(QObject* watched, QEvent* e);
-
- QListView* listView() const;
-
- virtual void contextMenuPopup( QPopupMenu* );
+ virtual void contextMenuPopup( QMenu* );
void setModified();
unsigned long getModifiedTime() { return myModifiedTime; }
- OB_Updater* getUpdater() const;
- virtual void setUpdater( OB_Updater* theUpdate = 0 );
+ // san - moved to SUIT_TreeModel
+ //OB_Updater* getUpdater() const;
+ //virtual void setUpdater( OB_Updater* theUpdate = 0 );
signals:
void selectionChanged();
void dropped( DataObjectList, SUIT_DataObject*, int );
private slots:
- void onExpand();
- void onColumnVisible( int );
- void onDestroyed( SUIT_DataObject* );
- void onDoubleClicked ( QListViewItem* );
- void onDropped( QPtrList<QListViewItem>, QListViewItem*, int );
+ //void onExpand();
+ //void onColumnVisible( int );
+ //void onDestroyed( SUIT_DataObject* );
+ //void onDoubleClicked ( QListViewItem* );
+ //void onDropped( QPtrList<QListViewItem>, QListViewItem*, int );
protected:
- void adjustWidth( QListViewItem* );
- virtual void updateView( SUIT_DataObject* = 0 );
- virtual void updateText();
+ //void adjustWidth( QListViewItem* );
+ //virtual void updateView( SUIT_DataObject* = 0 );
+ //virtual void updateText();
virtual void keyPressEvent( QKeyEvent* );
- SUIT_DataObject* dataObject( const QListViewItem* ) const;
- QListViewItem* listViewItem( const SUIT_DataObject* ) const;
-
private:
- typedef QMap<SUIT_DataObject*, QListViewItem*> ItemMap;
- typedef SUIT_DataObjectKeyHandle DataObjectKey;
- typedef QMap<SUIT_DataObject*, int> DataObjectMap;
- typedef QMap<DataObjectKey, int> DataObjectKeyMap;
+ //typedef QMap<SUIT_DataObject*, QListViewItem*> ItemMap;
+ //typedef SUIT_DataObjectKeyHandle DataObjectKey;
+ //typedef QMap<SUIT_DataObject*, int> DataObjectMap;
+ //typedef QMap<DataObjectKey, int> DataObjectKeyMap;
private:
- void expand( QListViewItem* );
- bool hasClosed( QListViewItem* ) const;
+ //void expand( QListViewItem* );
+ //bool hasClosed( QListViewItem* ) const;
- void autoOpenBranches();
- void openBranch( QListViewItem*, const int );
+ //void autoOpenBranches();
+ //void openBranch( QListViewItem*, const int );
- void removeReferences( QListViewItem* );
- void removeConnections( SUIT_DataObject* );
- void createConnections( SUIT_DataObject* );
- void removeObject( SUIT_DataObject*, const bool = true );
+ //void removeReferences( QListViewItem* );
+ //void removeConnections( SUIT_DataObject* );
+ //void createConnections( SUIT_DataObject* );
+ //void removeObject( SUIT_DataObject*, const bool = true );
- void updateText( QListViewItem* );
- bool needToUpdateTexts( QListViewItem* ) const;
+ //void updateText( QListViewItem* );
+ //bool needToUpdateTexts( QListViewItem* ) const;
- DataObjectKey objectKey( QListViewItem* ) const;
- DataObjectKey objectKey( SUIT_DataObject* ) const;
+ //DataObjectKey objectKey( QListViewItem* ) const;
+ //DataObjectKey objectKey( SUIT_DataObject* ) const;
- QListViewItem* createTree( const SUIT_DataObject*, QListViewItem*, QListViewItem* = 0, const bool = false );
- QListViewItem* createItem( const SUIT_DataObject*, QListViewItem*, QListViewItem* = 0, const bool = false );
+ //QListViewItem* createTree( const SUIT_DataObject*, QListViewItem*, QListViewItem* = 0, const bool = false );
+ //QListViewItem* createItem( const SUIT_DataObject*, QListViewItem*, QListViewItem* = 0, const bool = false );
- SUIT_DataObject* storeState( DataObjectMap&, DataObjectMap&,
- DataObjectKeyMap&, DataObjectKeyMap&, DataObjectKey& ) const;
- void restoreState( const DataObjectMap&, const DataObjectMap&, const SUIT_DataObject*,
- const DataObjectKeyMap&, const DataObjectKeyMap&, const DataObjectKey& );
+ //SUIT_DataObject* storeState( DataObjectMap&, DataObjectMap&,
+ // DataObjectKeyMap&, DataObjectKeyMap&, DataObjectKey& ) const;
+ //void restoreState( const DataObjectMap&, const DataObjectMap&, const SUIT_DataObject*,
+ // const DataObjectKeyMap&, const DataObjectKeyMap&, const DataObjectKey& );
private:
- friend class OB_BrowserSync;
-
- OB_ListView* myView;
- SUIT_DataObject* myRoot;
- ItemMap myItems;
- QToolTip* myTooltip;
- OB_Updater* myUpdater;
- QMap<int, int> myColumnIds;
- bool myAutoUpdate;
- bool myAutoDelObjs;
- bool myShowToolTips;
- bool myRootDecorated;
- int myAutoOpenLevel;
-
- friend class OB_Browser::ToolTip;
-
- unsigned long myModifiedTime;
+ QtxTreeView* myView;
+ // TODO: decide what to do with tooltip
+ //QToolTip* myTooltip;
+ //QMap<int, int> myColumnIds;
+ // TODO: decide what to do with tooltip
+ //bool myShowToolTips;
+ int myAutoOpenLevel;
+ unsigned long myModifiedTime;
+
+ // TODO: decide what to do with tooltip
+ //friend class OB_Browser::ToolTip;
};
-#endif
+#endif // OB_BROWSER_H