00001
00002
00003
00004
00005
00010 #ifndef ADV_LIST_VIEW_H
00011 #define ADV_LIST_VIEW_H
00012
00013 #include "Iguana/Studio/interface/config.h"
00014 #include <qlistview.h>
00015 #include <qpixmap.h>
00016
00017 class AdvListViewItem;
00018
00066 class IGUANA_STUDIO_API AdvListView : public QListView {
00067 Q_OBJECT
00068 public:
00070 AdvListView( QWidget * parent = 0, const char *name = 0 );
00072 void resizeEvent(QResizeEvent* e);
00074 void initItem(QListViewItem* item);
00076 uint getCheckPosition() { return checkAtPosition_; }
00078 void setCheckPosition(uint pos ) { checkAtPosition_ = pos; }
00080 void setChecked(AdvListViewItem* item, bool is_checked);
00081 protected:
00083 void init();
00085 void contentsMouseDoubleClickEvent(QMouseEvent* e);
00087 void contentsMousePressEvent(QMouseEvent* e);
00089 void contentsMouseReleaseEvent(QMouseEvent* e);
00091 bool isInsideChecker(int x);
00092 private:
00093 uint checkAtPosition_;
00094 int oldWidth_;
00095 bool disableMouseRelease_;
00096 QPixmap checkedPixmap_;
00097 QPixmap uncheckedPixmap_;
00098 };
00099
00100 #endif // ADV_LIST_VIEW_H