You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.3 KiB
C++

#ifndef MAINWINDOW_H
#define MAINWINDOW_H
// Qt
#include <QMainWindow>
#include "QtGui"
#include <QPainter>
#include <QPaintEvent>
#include <QPainter>
#include <QPainterPathStroker>
#include <QPen>
#include <QPixmap>
#include <QtConcurrentRun>
#include <functional>
#include <QFuture>
#include <QWheelEvent>
#include <qmath.h>
// oil
#include "fault.h"
#include "contour.h"
#include "scale.h"
#include "bitmap.h"
#include "circular.h"
#include "rectangle.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
QPainterPath rectPath;
QPainterPath outline;
QPainter painter;
bool isPressed;
int iPoint;
QVector<Fault>vf;
Fault f;
Contour c;
Scale scale;
Bitmap bitmap;
Circular circular;
Rectangle rect;
QPixmap *mp;
int initWidth;
int initHeight;
int scaleCount;
// QWidget interface
protected:
void mouseReleaseEvent(QMouseEvent *);
void mouseMoveEvent(QMouseEvent *);
void paintEvent(QPaintEvent *event);
void mousePressEvent(QMouseEvent *event);
// QWidget interface
protected:
void resizeEvent(QResizeEvent *);
// QWidget interface
protected:
void wheelEvent(QWheelEvent *);
};
#endif // MAINWINDOW_H