| 27 | #include <QtWidgets/QVBoxLayout> |
| 28 | |
| 29 | AnalogInputsWindow::AnalogInputsWindow(Context* c, QWidget *parent) : QDialog(parent), context(c) |
| 30 | { |
| 31 | setWindowTitle("Analog Inputs"); |
| 32 | |
| 33 | /* Table */ |
| 34 | analogInputsView = new QListView(this); |
| 35 | analogInputsView->setSelectionMode(QAbstractItemView::SingleSelection); |
| 36 | analogInputsView->setAlternatingRowColors(true); |
| 37 | analogInputsView->setDragEnabled(true); |
| 38 | analogInputsView->setDragDropMode(QAbstractItemView::DragOnly); |
| 39 | analogInputsView->setDefaultDropAction(Qt::CopyAction); |
| 40 | analogInputsView->setDragDropOverwriteMode(false); |
| 41 | |
| 42 | analogInputsModel = new AnalogInputsModel(context); |
| 43 | analogInputsView->setModel(analogInputsModel); |
| 44 | |
| 45 | /* Layout */ |
| 46 | QVBoxLayout *mainLayout = new QVBoxLayout; |
| 47 | |
| 48 | mainLayout->addWidget(new QLabel("Drag and Drop into input editor to add column")); |
| 49 | mainLayout->addWidget(analogInputsView); |
| 50 | |
| 51 | setLayout(mainLayout); |
| 52 | } |
| 53 | |
| 54 | QSize AnalogInputsWindow::sizeHint() const |
| 55 | { |
nothing calls this directly
no outgoing calls
no test coverage detected