| 189 | } |
| 190 | |
| 191 | void StructEditorWidget::makeLayouts() |
| 192 | { |
| 193 | QWidget* structDefButtons = new QWidget; |
| 194 | QHBoxLayout* structDefButtonLayout = new QHBoxLayout; |
| 195 | |
| 196 | structDefButtonLayout->addWidget(m_btnAddGroup); |
| 197 | structDefButtonLayout->addWidget(m_btnAddStruct); |
| 198 | structDefButtonLayout->addWidget(m_btnDeleteNodes); |
| 199 | structDefButtonLayout->setContentsMargins(0, 0, 0, 0); |
| 200 | structDefButtons->setLayout(structDefButtonLayout); |
| 201 | |
| 202 | QWidget* structSelectPanel = new QWidget; |
| 203 | QVBoxLayout* structSelectPanelLayout = new QVBoxLayout; |
| 204 | |
| 205 | QSizePolicy selectTreePolicy = QSizePolicy(); |
| 206 | selectTreePolicy.setHorizontalStretch(0); |
| 207 | selectTreePolicy.setHorizontalPolicy(QSizePolicy::Policy::Minimum); |
| 208 | selectTreePolicy.setVerticalStretch(1); |
| 209 | selectTreePolicy.setVerticalPolicy(QSizePolicy::Policy::Ignored); |
| 210 | m_structSelectView->setSizePolicy(selectTreePolicy); |
| 211 | structSelectPanelLayout->addWidget(m_structSelectView); |
| 212 | structSelectPanelLayout->addWidget(structDefButtons); |
| 213 | structSelectPanelLayout->setContentsMargins(3, 3, 0, 3); |
| 214 | structSelectPanel->setLayout(structSelectPanelLayout); |
| 215 | |
| 216 | QHBoxLayout* structDetailButtonLayout = new QHBoxLayout; |
| 217 | structDetailButtonLayout->addWidget(m_btnUnloadStructDetails); |
| 218 | structDetailButtonLayout->addWidget(m_btnSaveStructDetails); |
| 219 | structDetailButtonLayout->addStretch(); |
| 220 | structDetailButtonLayout->addWidget(m_btnAddField); |
| 221 | structDetailButtonLayout->addWidget(m_btnDeleteFields); |
| 222 | structDetailButtonLayout->addWidget(m_btnClearFields); |
| 223 | structDetailButtonLayout->setContentsMargins(0, 0, 0, 0); |
| 224 | |
| 225 | QFormLayout* structDetails = new QFormLayout; |
| 226 | structDetails->addRow("Struct Name:", m_txtStructName); |
| 227 | structDetails->addRow("Struct Length: 0x", m_txtStructLength); |
| 228 | |
| 229 | QWidget* structEditPanel = new QWidget; |
| 230 | QVBoxLayout* structEditPanelLayout = new QVBoxLayout; |
| 231 | |
| 232 | structEditPanelLayout->addLayout(structDetailButtonLayout); |
| 233 | structEditPanelLayout->addWidget(m_structDetailView); |
| 234 | structEditPanelLayout->addLayout(structDetails); |
| 235 | structEditPanelLayout->setContentsMargins(0, 3, 3, 3); |
| 236 | structEditPanel->setLayout(structEditPanelLayout); |
| 237 | |
| 238 | QHBoxLayout* widgetLayout = new QHBoxLayout; |
| 239 | widgetLayout->addWidget(structSelectPanel); |
| 240 | widgetLayout->addWidget(structEditPanel); |
| 241 | widgetLayout->setContentsMargins(3, 3, 3, 3); |
| 242 | setLayout(widgetLayout); |
| 243 | } |
| 244 | |
| 245 | bool StructEditorWidget::createNewFieldEntry(const QModelIndex& index) |
| 246 | { |
nothing calls this directly
no outgoing calls
no test coverage detected