void ShortcutSettingsWidget::loadImpl() { m_model->clear(); QHash <QString, QStandardItem*> groups; fillModel(groups,false); fillModel(groups,true); ui->treeView->expandAll(); }
DialogActiveRunways::DialogActiveRunways(ATCAirspace *airspace, ATCActiveRunways *activeRunways, QWidget *parent) : ATCDialog(parent, "Active Runways", 600, 650), airspace(airspace), activeRunways(activeRunways), uiInner(new Ui::DialogActiveRunways) { uiInner->setupUi(this); windowSetup(); dialogSetup(); fillModel(); }
sMatrix sMatrix::fillView(sVector & m_vArgPosition, sVector & m_vArgX, sVector & m_vArgY, sVector & m_vArgZ) { sMatrix m_MatrixView; m_MatrixView.m_main[0][0] = m_vArgX.m_x; m_MatrixView.m_main[1][0] = m_vArgX.m_y; m_MatrixView.m_main[2][0] = m_vArgX.m_z; m_MatrixView.m_main[3][0] = 0.0; m_MatrixView.m_main[0][1] = m_vArgY.m_x; m_MatrixView.m_main[1][1] = m_vArgY.m_y; m_MatrixView.m_main[2][1] = m_vArgY.m_z; m_MatrixView.m_main[3][1] = 0.0; m_MatrixView.m_main[0][2] = m_vArgZ.m_x; m_MatrixView.m_main[1][2] = m_vArgZ.m_y; m_MatrixView.m_main[2][2] = m_vArgZ.m_z; m_MatrixView.m_main[3][2] = 0.0; m_MatrixView.m_main[0][3] = 0.0; m_MatrixView.m_main[1][3] = 0.0; m_MatrixView.m_main[2][3] = 0.0; m_MatrixView.m_main[3][3] = 1.0; /* In order to transform the camera, you need to move the whole scene with the inverse transformation. */ sMatrix m_MatrixTemp = fillModel(-(m_vArgPosition.m_x), -(m_vArgPosition.m_y), -(m_vArgPosition.m_z)); /* Matrix multiplication of model- and view matrices in order to create a full ModelView matrix */ m_MatrixView = m_MatrixView * m_MatrixTemp; return m_MatrixView; }