Guest User

Untitled

a guest
Oct 20th, 2014
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. #ifndef MAINWINDOW_H
  2. #define MAINWINDOW_H
  3.  
  4. #include <QMainWindow>
  5. #include <QMouseEvent>
  6. #include <QPaintEvent>
  7. #include <QPainter>
  8. #include <QVector>
  9. #include <QPoint>
  10.  
  11. namespace Ui {
  12. class MainWindow;
  13. }
  14.  
  15. class MainWindow : public QMainWindow
  16. {
  17.     Q_OBJECT
  18.    
  19. public:
  20.     explicit MainWindow(QWidget *parent = 0);
  21.     ~MainWindow();
  22.     void mousePressEvent(QMouseEvent *e);
  23.     void paintEvent(QPaintEvent *e);
  24.     bool sort_pred(QPoint p, QPoint q);
  25.    
  26. private:
  27.     Ui::MainWindow *ui;
  28.     QVector<QPoint> points;
  29.     QPoint centroid;
  30. };
  31.  
  32. #endif // MAINWINDOW_H
Advertisement
Add Comment
Please, Sign In to add comment