Scribus
Open source desktop publishing at your fingertips
basepointwidget.h
1 /*
2 For general Scribus (>=1.3.2) copyright and licensing information please refer
3 to the COPYING file provided with the program. Following this notice may exist
4 a copyright and/or license notice that predates the release of Scribus 1.3.2
5 for which a new license (GPL+exception) is in place.
6 */
7 #ifndef BASEPOINTWIDGET_H
8 #define BASEPOINTWIDGET_H
9 
10 #include <QWidget>
11 #include <QPaintEvent>
12 #include <QMouseEvent>
13 #include <QPainter>
14 #include "scribusapi.h"
15 
16 class SCRIBUS_API BasePointWidget : public QWidget
17 {
18  Q_OBJECT
19 
20 public:
21  BasePointWidget(QWidget *pa, int mode = 0);
22  ~BasePointWidget() {}
31  int checkedId();
32  void setCheckedId(int id);
33  void paintEvent(QPaintEvent *e);
34  void mousePressEvent(QMouseEvent *m);
35  void mouseReleaseEvent(QMouseEvent *);
36  void mouseMoveEvent(QMouseEvent *m);
37  void leaveEvent(QEvent*);
38 private:
39  int m_mode;
40  int selectedBase;
41  int hooveredBase;
42  bool Mpressed;
43 signals:
44  void buttonClicked(int);
45 };
46 
47 #endif
Definition: basepointwidget.h:16