MCPcopy Create free account
hub / github.com/clementgallet/libTAS / AnalogInputsWindow

Method AnalogInputsWindow

src/program/ui/AnalogInputsWindow.cpp:29–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27#include <QtWidgets/QVBoxLayout>
28
29AnalogInputsWindow::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
54QSize AnalogInputsWindow::sizeHint() const
55{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected