1 #include "mainwidget.h"
6 MainWidget::MainWidget (QWidget *parent)
10 layout = new QGridLayout(this);
12 for (int i = 0; i < BUTTON_COUNT; ++i)
14 QPushButton *button = new QPushButton(QString(i), this);
16 layout->addWidget(button, i/3, i%3);
19 connect(buttons[0], SIGNAL(triggered()), irCtrl, SLOT(sendCmd0()));
20 connect(buttons[1], SIGNAL(triggered()), irCtrl, SLOT(sendCmd1()));
21 connect(buttons[2], SIGNAL(triggered()), irCtrl, SLOT(sendCmd2()));
22 connect(buttons[3], SIGNAL(triggered()), irCtrl, SLOT(sendCmd3()));
23 connect(buttons[4], SIGNAL(triggered()), irCtrl, SLOT(sendCmd4()));
24 connect(buttons[5], SIGNAL(triggered()), irCtrl, SLOT(sendCmd5()));
26 this->setLayout(layout);