QCAD
Open Source 2D CAD
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
#define QCADGUI_EXPORT
Definition: gui_global.h:10
void setIconOffset(int o)
Definition: RListWidget.h:45
Q_DECLARE_METATYPE(RMath *)
Copyright (c) 2011-2015 by Andrew Mustun.
Definition: RListWidget.h:37
int iconOffset
Definition: RListWidget.h:60
QListWidgetItem * itemPressed
Definition: RListWidget.h:59