QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RListWidget.h
Go to the documentation of this file.
1 
20 #ifndef RLISTWIDGET_H_
21 #define RLISTWIDGET_H_
22 
23 #include "gui_global.h"
24 
25 #include <QWidget>
26 #include <QListWidget>
27 #include <QListWidgetItem>
28 #include <QtDebug>
29 
37 class QCADGUI_EXPORT RListWidget: public QListWidget {
38 
39  Q_OBJECT
40 
41 public:
42  RListWidget(QWidget* parent=0);
43  virtual ~RListWidget();
44 
45  void setIconOffset(int o) {
46  iconOffset = o;
47  }
48 
49 protected:
50  void contextMenuEvent(QContextMenuEvent* e);
51  void mousePressEvent(QMouseEvent* e);
52  void mouseReleaseEvent(QMouseEvent* e);
53  void mouseMoveEvent(QMouseEvent* e);
54 
55 signals:
56  void iconClicked(int x, QListWidgetItem* item);
57 
58 private:
59  QListWidgetItem* itemPressed;
61 };
62 
64 
65 #endif