34 |
DeviceForm::DeviceForm ( QWidget *pParent, Qt::WindowFlags wflags ) |
DeviceForm::DeviceForm ( QWidget *pParent, Qt::WindowFlags wflags ) |
35 |
: QDialog(pParent, wflags) |
: QDialog(pParent, wflags) |
36 |
{ |
{ |
37 |
m_ui.setupUi(this); |
m_ui.setupUi(this); |
38 |
|
|
39 |
// Initialize locals. |
// Initialize locals. |
40 |
m_iDirtySetup = 0; |
m_iDirtySetup = 0; |
48 |
|
|
49 |
m_ui.DeviceListView->header()->hide(); |
m_ui.DeviceListView->header()->hide(); |
50 |
|
|
51 |
|
int iRowHeight = m_ui.DeviceParamTable->fontMetrics().height() + 4; |
52 |
|
m_ui.DeviceParamTable->verticalHeader()->setDefaultSectionSize(iRowHeight); |
53 |
|
m_ui.DevicePortParamTable->verticalHeader()->setDefaultSectionSize(iRowHeight); |
54 |
|
m_ui.DeviceParamTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); |
55 |
|
m_ui.DevicePortParamTable->horizontalHeader()->setDefaultAlignment(Qt::AlignLeft); |
56 |
|
|
57 |
m_ui.DeviceParamTable->setModel(&m_deviceParamModel); |
m_ui.DeviceParamTable->setModel(&m_deviceParamModel); |
58 |
m_ui.DeviceParamTable->setItemDelegate(&m_deviceParamDelegate); |
m_ui.DeviceParamTable->setItemDelegate(&m_deviceParamDelegate); |
59 |
m_ui.DeviceParamTable->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch); |
m_ui.DeviceParamTable->horizontalHeader()->setResizeMode(2, QHeaderView::Stretch); |
107 |
SLOT(updatePortCellRenderers(const QModelIndex&, const QModelIndex&))); |
SLOT(updatePortCellRenderers(const QModelIndex&, const QModelIndex&))); |
108 |
} |
} |
109 |
|
|
110 |
DeviceForm::~DeviceForm() { |
|
111 |
|
DeviceForm::~DeviceForm (void) |
112 |
|
{ |
113 |
} |
} |
114 |
|
|
115 |
|
|
120 |
if (pMainForm) |
if (pMainForm) |
121 |
pMainForm->stabilizeForm(); |
pMainForm->stabilizeForm(); |
122 |
|
|
|
stabilizeForm(); |
|
|
|
|
123 |
QWidget::showEvent(pShowEvent); |
QWidget::showEvent(pShowEvent); |
124 |
|
|
125 |
|
refreshDevices(); |
126 |
} |
} |
127 |
|
|
128 |
|
|