tdebase
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DESIGN 3.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. Konqueror Design Document
  2. Author:
  3. David Faure, faure@kde.org
  4. Last modified: 16 June 2000
  5. Overall design of konqueror :
  6. =============================
  7. The design of konqueror is based on the KParts part/mainwindow mechanism
  8. (basically, konqueror can embed several parts, putting each one inside a view :
  9. icon views, tree views, html views...)
  10. The main(), including all the startup mechanism is in konq_main.*
  11. The main window contains several "views", in order to show several URLs
  12. at once, possibly using several modes. Each view is a KonqView.
  13. The KonqView contains the child part, which can be :
  14. - an icon view (KonqIconView)
  15. - a list view / tree view (KonqListView/KonqTreeView)
  16. - an HTML view (TDEHTMLPart)
  17. - any other ReadOnlyPart with or without Browserextension
  18. Where to find those classes
  19. ===========================
  20. konq_run.* : Re-implementation of KRun (see libtdeio) for konqueror.
  21. Responsible for finding appropriate view<->mimetype bindings.
  22. konq_view.* : KonqView, class used by KonqMainView to handle child views
  23. konq_frame.* : KonqFrame and KonqFrameHeader (handles view-statusbar).
  24. konq_main.* : The main()
  25. konq_mainwindow.* : KonqMainWindow, the main window :)
  26. konq_viewmgr.*: View manager. Handles view creation, activation, splitters etc.
  27. iconview/* : KonqIconView, for icon views
  28. listview/* : KonqTreeView, KonqListView...
  29. dirtree/* : KonqDirTree, the directory tree
  30. Libs used by konqueror
  31. ======================
  32. tdecore, tdeui, tdefile, tdehtml, tdeparts - usual stuff :)
  33. libtdeio - I/O stuff, mimetypes, services
  34. libkonq - bookmarks, properties dialog, templates ("new") menu, icon view widget
  35. How konqueror opens URLs
  36. ========================
  37. KonqMainWindow:
  38. openFilteredURL or slotOpenURLRequest
  39. |
  40. |
  41. -----openURL----
  42. | | |
  43. | | |
  44. | KonqRun KRun
  45. | |
  46. | |
  47. openView
  48. | \----- splitView to create a new one
  49. KonqView: |
  50. changeViewMode
  51. |
  52. [switchView if different mode required]
  53. |
  54. openURL [emits openURLEvent (after calling openURL)]
  55. Part: |
  56. |
  57. openURL [emits started, progress info, completed]
  58. ...
  59. How history is implemented
  60. ==========================
  61. From the konqueror side:
  62. * KonqView has a list of history items. Each item contains a URL,
  63. and a QByteArray for the view to store its stuff in the format that suits it best.
  64. It calls saveState() at various points of time (right after starting loading the URL,
  65. when the loading is completed, and right before loading another URL). Reason:
  66. among other things, many views store the x and y offset of their scrollview in there.
  67. It calls restoreState() when restoring a particular item out of the history list.
  68. From the tdehtml side:
  69. * Site with no frames: no problem, it just obeys to saveState/restoreState.
  70. * Site with frames:
  71. TDEHTMLPart saves the whole structure (all frames, and their URL) in the
  72. history buffer (saveState/restoreState).
  73. Every time a frame changes its URL, we want a new item in the history.
  74. But when this happens, since it's internal to tdehtml, konqueror wouldn't know
  75. about it. That's why there is the openURLNotify() signal in browser extension
  76. (see there for extensive docu about it).
  77. When tdehtml emits it, KonqView creates a new history entry and fills it
  78. (calling saveState).