Documents > BPS V2 C++ API
bpstreeview.h
Go to the documentation of this file.
00001 
00004 #ifndef BPSTREEVIEW_H
00005 #define BPSTREEVIEW_H
00006 
00007 #include "bpsgui_global.h"
00008 #include <QTreeView>
00009 
00018 class BPSGUI_EXPORT BpsTreeView : public QTreeView
00019 {
00020     Q_OBJECT
00021     BPS_PRIVATE(BpsTreeView)
00022 
00023 public:
00024     
00028     BpsTreeView(QWidget * aParent = 0);
00029 
00030     virtual ~BpsTreeView();
00031 
00035     virtual QSize sizeHint() const;
00036 
00041     void setSizeHint(const QSize& aSize);
00042 
00046     QVariant saveHeaderState();
00047 
00052     void restoreHeaderState(const QVariant& aData);
00053 
00054 signals:
00055 
00060     void focusInOutEvent(bool aFocusIn);
00061 
00067     void contextMenuRequested(const QPoint& aPosition, const QModelIndex& aIndex);
00068 
00074     void currentItemChanged(const QModelIndex &aCurrent, const QModelIndex& aPrevious);
00075 
00083     void dataGotChanged(const QModelIndex& aTopLeft, const QModelIndex& aBottomRight);
00084 
00089     void dropKeyboardModifiers(Qt::KeyboardModifiers aModifiers);
00090 
00092 protected:
00093     virtual void focusInEvent(QFocusEvent* aEvent);
00094     virtual void focusOutEvent (QFocusEvent* aEvent);
00095     virtual void contextMenuEvent(QContextMenuEvent* aEvent);
00096     virtual void keyPressEvent(QKeyEvent* aEvent); 
00097     virtual void dragMoveEvent(QDragMoveEvent* aEvent);
00098     virtual void dropEvent(QDropEvent* aEvent);
00099     virtual QModelIndex moveCursor(CursorAction aCursorAction, Qt::KeyboardModifiers aModifiers);
00100 
00101 protected slots:
00102     virtual void currentChanged(const QModelIndex& aCurrent, const QModelIndex& aPrevious);
00103     virtual void dataChanged(const QModelIndex& aTopLeft, const QModelIndex& aBottomRight);
00105 
00106 };
00107 
00108 #endif // BPSTABLEVIEW_H