pTreeComboBox.sip 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. class pTreeComboBox : QWidget
  2. {
  3. %TypeHeaderCode
  4. #include <gui/pTreeComboBox.h>
  5. %End
  6. public:
  7. pTreeComboBox( QWidget* parent = 0 );
  8. ~pTreeComboBox();
  9. virtual bool eventFilter( QObject* object, QEvent* event );
  10. virtual QSize sizeHint() const;
  11. QSize iconSize() const;
  12. void setIconSize( const QSize& size );
  13. virtual void hidePopup();
  14. virtual void showPopup();
  15. QTreeView* view() const;
  16. virtual void setView( QTreeView* view );
  17. QAbstractItemModel* model() const;
  18. virtual void setModel( QAbstractItemModel* model );
  19. int modelColumn() const;
  20. void setColumnModel( int column );
  21. QModelIndex rootIndex() const;
  22. void setRootIndex( const QModelIndex& index );
  23. QModelIndex currentIndex() const;
  24. void setCurrentIndex( const QModelIndex& index );
  25. void expandAll();
  26. protected slots:
  27. void internal_activated( const QModelIndex& index );
  28. void internal_clicked( const QModelIndex& index );
  29. void internal_currentChanged( const QModelIndex& current, const QModelIndex& previous );
  30. protected:
  31. virtual void initStyleOption( QStyleOptionComboBox* option ) const;
  32. virtual bool event( QEvent* event );
  33. virtual void paintEvent( QPaintEvent* event );
  34. virtual void hideEvent( QHideEvent* event );
  35. virtual void mousePressEvent( QMouseEvent* event );
  36. void calculPopupGeometry();
  37. QModelIndex modelColumnIndex( const QModelIndex& index ) const;
  38. signals:
  39. void activated( const QModelIndex& index );
  40. void clicked( const QModelIndex& index );
  41. void currentIndexChanged( const QModelIndex& index );
  42. void highlighted( const QModelIndex& index );
  43. };