| Line 6... |
Line 6... |
| 6 |
// Set central widget
|
6 |
// Set central widget
|
| 7 |
centralWidget = new QWidget();
|
7 |
centralWidget = new QWidget();
|
| 8 |
setCentralWidget(centralWidget);
|
8 |
setCentralWidget(centralWidget);
|
| 9 |
|
9 |
|
| 10 |
// Misc button group
|
10 |
// Misc button group
|
| 11 |
groupMacro = new QGroupBox("Other");
|
11 |
groupOther = new QGroupBox("Other");
|
| 12 |
btnMacro = new QPushButton("&Macros");
|
12 |
btnMacro = new QPushButton("&Macros");
|
| - |
|
13 |
btnPaste = new QPushButton("&Paste");
|
| 13 |
QHBoxLayout *macroLayout = new QHBoxLayout();
|
14 |
QGridLayout *otherLayout = new QGridLayout();
|
| 14 |
macroLayout->addWidget(btnMacro);
|
15 |
otherLayout->addWidget(btnMacro, 0, 0);
|
| - |
|
16 |
otherLayout->addWidget(btnPaste, 1, 0);
|
| 15 |
groupMacro->setLayout(macroLayout);
|
17 |
groupOther->setLayout(otherLayout);
|
| 16 |
|
18 |
|
| 17 |
// Initialize serial widget
|
19 |
// Initialize serial widget
|
| 18 |
serialWidget = new SerialWidget();
|
20 |
serialWidget = new SerialWidget();
|
| 19 |
groupSerialInit = new QGroupBox("Serial Connection");
|
21 |
groupSerialInit = new QGroupBox("Serial Connection");
|
| 20 |
QGridLayout *serialInitLayout = new QGridLayout();
|
22 |
QGridLayout *serialInitLayout = new QGridLayout();
|
| Line 44... |
Line 46... |
| 44 |
addDockWidget(Qt::RightDockWidgetArea, macroDockWidget);
|
46 |
addDockWidget(Qt::RightDockWidgetArea, macroDockWidget);
|
| 45 |
connect(macroWidget, SIGNAL(TransmitText(QByteArray)), ioWidget, SLOT(PreprocessTransmit(QByteArray)));
|
47 |
connect(macroWidget, SIGNAL(TransmitText(QByteArray)), ioWidget, SLOT(PreprocessTransmit(QByteArray)));
|
| 46 |
connect(serialWidget, SIGNAL(Connected()), macroWidget, SLOT(EnableTransmit()));
|
48 |
connect(serialWidget, SIGNAL(Connected()), macroWidget, SLOT(EnableTransmit()));
|
| 47 |
connect(serialWidget, SIGNAL(Disconnected()), macroWidget, SLOT(DisableTransmit()));
|
49 |
connect(serialWidget, SIGNAL(Disconnected()), macroWidget, SLOT(DisableTransmit()));
|
| 48 |
|
50 |
|
| - |
|
51 |
// Initialize paste controller widget
|
| - |
|
52 |
pasteDockWidget = new QDockWidget("Paste Controller", this);
|
| - |
|
53 |
pasteWidget = new PasteController(pasteDockWidget);
|
| - |
|
54 |
pasteDockWidget->setWidget(pasteWidget);
|
| - |
|
55 |
pasteDockWidget->setFloating(true);
|
| - |
|
56 |
|
| 49 |
// Connect local widgets
|
57 |
// Connect local widgets
|
| 50 |
connect(btnMacro, SIGNAL(clicked()), macroDockWidget->toggleViewAction(), SLOT(trigger()));
|
58 |
connect(btnMacro, SIGNAL(clicked()), macroDockWidget->toggleViewAction(), SLOT(trigger()));
|
| - |
|
59 |
connect(btnPaste, SIGNAL(clicked()), pasteDockWidget->toggleViewAction(), SLOT(trigger()));
|
| 51 |
|
60 |
|
| 52 |
// Main layout
|
61 |
// Main layout
|
| 53 |
QGridLayout *mainLayout = new QGridLayout();
|
62 |
QGridLayout *mainLayout = new QGridLayout();
|
| 54 |
mainLayout->addWidget(groupSerialInit, 0, 0, 1, 1, Qt::AlignLeft);
|
63 |
mainLayout->addWidget(groupSerialInit, 0, 0, 1, 1, Qt::AlignLeft);
|
| 55 |
mainLayout->addWidget(groupMacro, 0, 1, 1, 1, Qt::AlignLeft);
|
64 |
mainLayout->addWidget(groupOther, 0, 1, 1, 1, Qt::AlignLeft);
|
| 56 |
mainLayout->addWidget(groupSerialData, 1, 0, 1, 2);
|
65 |
mainLayout->addWidget(groupSerialData, 1, 0, 1, 2);
|
| 57 |
mainLayout->setColumnStretch(0, 0);
|
66 |
mainLayout->setColumnStretch(0, 0);
|
| 58 |
mainLayout->setColumnStretch(1, 1);
|
67 |
mainLayout->setColumnStretch(1, 1);
|
| 59 |
centralWidget->setLayout(mainLayout);
|
68 |
centralWidget->setLayout(mainLayout);
|
| 60 |
|
69 |
|