DigitalCircuit/include/Window.hpp
2020-11-30 17:35:58 +01:00

32 lines
471 B
C++

#pragma once
#include <qmainwindow.h>
namespace Ui {
class Window;
}
class Component;
class Window : public QMainWindow
{
public:
Window();
~Window();
protected:
void mousePressEvent(QMouseEvent* event) override;
void mouseMoveEvent(QMouseEvent* event) override;
void mouseReleaseEvent(QMouseEvent* event) override;
private:
void ToggleSimulation();
Ui::Window* ui;
bool simulating;
struct {
Component* component;
QPoint relativePos;
} dragInfo;
};