eventhistory.ui.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /****************************************************************************
  2. ** ui.h extension file, included from the uic-generated form implementation.
  3. **
  4. ** If you want to add, delete, or rename functions or slots, use
  5. ** Qt Designer to update this file, preserving your code.
  6. **
  7. ** You should not define a constructor or destructor in this file.
  8. ** Instead, write your code in functions called init() and destroy().
  9. ** These will automatically be called by the form's constructor and
  10. ** destructor.
  11. *****************************************************************************/
  12. void EventHistory::init()
  13. {
  14. }
  15. void EventHistory::destroy()
  16. {
  17. }
  18. void EventHistory::addEvents(WpaMsgList msgs)
  19. {
  20. WpaMsgList::iterator it;
  21. for (it = msgs.begin(); it != msgs.end(); it++) {
  22. addEvent(*it);
  23. }
  24. }
  25. void EventHistory::addEvent(WpaMsg msg)
  26. {
  27. Q3ListViewItem *item;
  28. item = new Q3ListViewItem(eventListView,
  29. msg.getTimestamp().toString("yyyy-MM-dd hh:mm:ss.zzz"),
  30. msg.getMsg());
  31. if (item == NULL)
  32. return;
  33. eventListView->setSelected(item, false);
  34. }