#ifndef CONTROLLERSETUP_H #define CONTROLLERSETUP_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "usbcontroller.h" class controllerScene : public QGraphicsScene { Q_OBJECT QGraphicsLineItem* item = Q_NULLPTR; signals: void mousePressed(controllerScene* scene, QPoint p); protected: void mousePressEvent(QGraphicsSceneMouseEvent* event) { if (event->button() == Qt::RightButton) { emit mousePressed(this, event->scenePos().toPoint()); } else { QGraphicsScene::mousePressEvent(event); } } }; struct tabContent { QWidget tab; QVBoxLayout mainLayout; QHBoxLayout topLayout; QWidget widget; QVBoxLayout layout; QCheckBox disabled; QLabel message; QGraphicsView view; QSpinBox page; QHBoxLayout sensLayout; QLabel sensLabel; QSlider sens; QImage image; QGraphicsItem* bgImage = Q_NULLPTR; controllerScene* scene = Q_NULLPTR; QGridLayout grid; QLabel brightLabel; QComboBox brightness; QLabel speedLabel; QComboBox speed; QLabel orientLabel; QComboBox orientation; QLabel colorLabel; QPushButton color; QLabel timeoutLabel; QSpinBox timeout; QLabel pagesLabel; QSpinBox pages; QLabel helpText; }; namespace Ui { class controllerSetup; } class controllerSetup : public QDialog { Q_OBJECT public: explicit controllerSetup(QWidget* parent = 0); ~controllerSetup(); signals: void started(); void sendRequest(USBDEVICE* dev, usbFeatureType request, quint8 val=0, QString text="", QImage* img=Q_NULLPTR, QColor* color=Q_NULLPTR); void programDisable(USBDEVICE* dev, bool disable); void programPages(USBDEVICE* dev, int pages); void backup(QString file, QString path); void restore(QString file, QString path); public slots: void init(usbDevMap* dev, QVector