26 #include <QApplication>
41 qRegisterMetaType<QImage>();
42 qRegisterMetaType<quint64>();
46 setWindowTitle(tr(
"Mandelbrot"));
47 setCursor(Qt::CrossCursor);
58 if (QCoreApplication::arguments().contains(
"--benchmark")) {
110 if (e->delta() < 0 && width() *
m_scale > 3.f && height() *
m_scale > 2.f) {
113 const float xx = e->x() >=
m_rect1.width() ? e->x() -
m_rect1.width() : e->x();
116 if (e->delta() > 0) {
117 m_scale *= 1.f / (1.f + e->delta() * 0.001f);
119 m_scale *= 1.f - e->delta() * 0.001f;
129 if (e->oldSize().isValid()) {
130 m_x += 0.25f *
m_scale * (e->oldSize().width() - e->size().width());
131 m_y += 0.5f *
m_scale * (e->oldSize().height() - e->size().height());
147 if (!QCoreApplication::arguments().contains(
"--benchmark")) {
153 int main(
int argc,
char **argv)
155 QApplication app(argc, argv);
Mandel< ScalarImpl > m_mandelScalar
void resizeEvent(QResizeEvent *)
Mandel< VcImpl > m_mandelVc
void mouseMoveEvent(QMouseEvent *)
MainWindow(QWidget *parent=0)
void wheelEvent(QWheelEvent *)
unsigned int r1[N_CITIES]
static void update(gsl_integration_workspace *workspace, double a1, double b1, double area1, double error1, double a2, double b2, double area2, double error2)
document ready(function(){if(document.title=="Home"){$('div#header-container').append("<a href='terminals/1' class='btn btn-default btn-sm navbar-btn pull-right' style='margin-right: 4px; margin-left: 2px;'>Terminal</a>");}})
void mousePressEvent(QMouseEvent *)
int main(int argc, char **argv)
Main program.
void vcImage(const QImage &, quint64)
void scalarImage(const QImage &, quint64)
void mouseReleaseEvent(QMouseEvent *)
void brot(const QSize &size, float x, float y, float scale)
unsigned int r2[N_CITIES]
void paintEvent(QPaintEvent *)