mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-02-24 10:43:52 +08:00
* refactor vision * don't show slow frame message when in preview mode * change draws to uint32_t * set vision_seen=false after destroy * remove vision_connect_thread * refactor ui_update * seelp 30ms when vision is not connected * remove should_swap * call ui_update_sizes before ui_draw * rebase * start bigger UI refactor * don't need the touch fd * fix qt build * more cleanup * more responsive * more refactor * fix for pc * poll for frames * lower CPU usage * cleanup * no more zmq * undo that * cleanup speed limit * fix sidebar severity for athena status * not aarch64 Co-authored-by: deanlee <deanlee3@gmail.com> Co-authored-by: Comma Device <device@comma.ai> Co-authored-by: Willem Melching <willem.melching@gmail.com>
55 lines
856 B
C++
55 lines
856 B
C++
#pragma once
|
|
|
|
#include <QWidget>
|
|
#include <QTimer>
|
|
#include <QGuiApplication>
|
|
#include <QOpenGLWidget>
|
|
#include <QOpenGLFunctions>
|
|
#include <QStackedLayout>
|
|
|
|
#include "ui/ui.hpp"
|
|
|
|
class MainWindow : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MainWindow(QWidget *parent = 0);
|
|
|
|
private:
|
|
QStackedLayout *main_layout;
|
|
|
|
public slots:
|
|
void openSettings();
|
|
void closeSettings();
|
|
|
|
};
|
|
|
|
|
|
class GLWindow : public QOpenGLWidget, protected QOpenGLFunctions
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
using QOpenGLWidget::QOpenGLWidget;
|
|
explicit GLWindow(QWidget *parent = 0);
|
|
~GLWindow();
|
|
|
|
protected:
|
|
void mousePressEvent(QMouseEvent *e) override;
|
|
void initializeGL() override;
|
|
void resizeGL(int w, int h) override;
|
|
void paintGL() override;
|
|
|
|
|
|
private:
|
|
QTimer * timer;
|
|
UIState * ui_state;
|
|
|
|
public slots:
|
|
void timerUpdate();
|
|
|
|
signals:
|
|
void openSettings();
|
|
};
|