| 35 | #include <QtWidgets/QTabWidget> |
| 36 | |
| 37 | ControllerTabWindow::ControllerTabWindow(Context* c, QWidget *parent) : QDialog(parent), context(c) |
| 38 | { |
| 39 | setWindowTitle("Controller inputs"); |
| 40 | |
| 41 | /* Create each controller widget */ |
| 42 | QTabWidget *tabWidget = new QTabWidget; |
| 43 | |
| 44 | for (int j=0; j<AllInputs::MAXJOYS; j++) { |
| 45 | controllers[j] = new ControllerWidget(); |
| 46 | tabWidget->addTab(controllers[j], QString("Controller %1").arg(j+1)); |
| 47 | } |
| 48 | |
| 49 | QVBoxLayout *mainLayout = new QVBoxLayout; |
| 50 | mainLayout->addWidget(tabWidget); |
| 51 | setLayout(mainLayout); |
| 52 | |
| 53 | qRegisterMetaType<ControllerInputs>("ControllerInputs"); |
| 54 | } |
| 55 | |
| 56 | void ControllerTabWindow::slotButtonToggle(int id, int button, bool pressed) |
| 57 | { |
nothing calls this directly
no outgoing calls
no test coverage detected