int QMdiSubWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: windowStateChanged((*reinterpret_cast< Qt::WindowStates(*)>(_a[1])),(*reinterpret_cast< Qt::WindowStates(*)>(_a[2]))); break; case 1: aboutToActivate(); break; case 2: showSystemMenu(); break; case 3: showShaded(); break; case 4: d_func()->_q_updateStaysOnTopHint(); break; case 5: d_func()->_q_enterInteractiveMode(); break; case 6: d_func()->_q_processFocusChanged((*reinterpret_cast< QWidget*(*)>(_a[1])),(*reinterpret_cast< QWidget*(*)>(_a[2]))); break; } _id -= 7; } #ifndef QT_NO_PROPERTIES else if (_c == QMetaObject::ReadProperty) { void *_v = _a[0]; switch (_id) { case 0: *reinterpret_cast< int*>(_v) = keyboardSingleStep(); break; case 1: *reinterpret_cast< int*>(_v) = keyboardPageStep(); break; } _id -= 2; } else if (_c == QMetaObject::WriteProperty) { void *_v = _a[0]; switch (_id) { case 0: setKeyboardSingleStep(*reinterpret_cast< int*>(_v)); break; case 1: setKeyboardPageStep(*reinterpret_cast< int*>(_v)); break; } _id -= 2; } else if (_c == QMetaObject::ResetProperty) { _id -= 2; } else if (_c == QMetaObject::QueryPropertyDesignable) { _id -= 2; } else if (_c == QMetaObject::QueryPropertyScriptable) { _id -= 2; } else if (_c == QMetaObject::QueryPropertyStored) { _id -= 2; } else if (_c == QMetaObject::QueryPropertyEditable) { _id -= 2; } else if (_c == QMetaObject::QueryPropertyUser) { _id -= 2; } #endif // QT_NO_PROPERTIES return _id; }
int main(int argc, char *argv[]) { //LinkList to store all account and student info pAccount AccountList = NULL; pStudent StudentList = NULL; //Init the LinkList systemInit(CONFIG_FILE, &AccountList, &StudentList); Role role; Menu menu; role = confirmAccount(AccountList); if (role == -1) { return 0; } while ((menu = showSystemMenu(role)) != 9) { while (getchar() != '\n') { continue; } switch(menu) { case 1: if (role == 1) { searchStudentAdmin(StudentList); } else { searchStudentGuest(StudentList); } break; case 2: addStudent(&StudentList); break; case 3: updateStudent(StudentList); break; case 4: deleteStudent(&StudentList); break; case 5: addUserAccount(&AccountList); break; case 6: updateUserAccount(AccountList); break; case 7: deleteUserAccount(&AccountList); break; case 8: searchAccountMenu(AccountList); break; default: break; } saveData(CONFIG_FILE, AccountList, StudentList); } return 0; }