summaryrefslogtreecommitdiffstats
path: root/konqueror/DESIGN
blob: 45ff6e47fb233f96510e25c3bd5c4f76be445ab2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
Konqueror Design Document

Author:
  David Faure, faure@kde.org

Last modified: 16 June 2000

Overall design of konqueror :
=============================

The design of konqueror is based on the KParts part/mainwindow mechanism
(basically, konqueror can embed several parts, putting each one inside a view :
icon views, tree views, html views...)

The main(), including all the startup mechanism is in konq_main.*

The main window contains several "views", in order to show several URLs
at once, possibly using several modes. Each view is a KonqView.
The KonqView contains the child part, which can be :
- an icon view (KonqIconView)
- a list view / tree view (KonqListView/KonqTreeView)
- an HTML view (KHTMLPart)
- any other ReadOnlyPart with or without Browserextension

Where to find those classes
===========================

konq_run.* : Re-implementation of KRun (see libkio) for konqueror.
	   Responsible for finding appropriate view<->mimetype bindings.
konq_view.* : KonqView, class used by KonqMainView to handle child views
konq_frame.* : KonqFrame and KonqFrameHeader (handles view-statusbar).
konq_main.* : The main()
konq_mainwindow.* : KonqMainWindow, the main window :)
konq_viewmgr.*: View manager. Handles view creation, activation, splitters etc.
iconview/* : KonqIconView, for icon views
listview/* : KonqTreeView, KonqListView...
dirtree/*  : KonqDirTree, the directory tree

Libs used by konqueror
======================

tdecore, tdeui, kfile, tdehtml, tdeparts - usual stuff :)
libkio - I/O stuff, mimetypes, services
libkonq - bookmarks, properties dialog, templates ("new") menu, icon view widget

How konqueror opens URLs
========================

KonqMainWindow:

  openFilteredURL or slotOpenURLRequest
                    |
                    |
            -----openURL----
             |   |        |
             |   |        |
             |  KonqRun  KRun
             |   |
             |   |
           openView
               |   \----- splitView to create a new one
KonqView:      |
         changeViewMode
               |
       [switchView if different mode required]
               |
          openURL  [emits openURLEvent (after calling openURL)]
Part:          |
               |
          openURL [emits started, progress info, completed]
              ...


How history is implemented
==========================

From the konqueror side:

* KonqView has a list of history items. Each item contains a URL,
and a QByteArray for the view to store its stuff in the format that suits it best.
It calls saveState() at various points of time (right after starting loading the URL,
when the loading is completed, and right before loading another URL). Reason:
among other things, many views store the x and y offset of their scrollview in there.
It calls restoreState() when restoring a particular item out of the history list.

From the tdehtml side:

* Site with no frames: no problem, it just obeys to saveState/restoreState.

* Site with frames:
KHTMLPart saves the whole structure (all frames, and their URL) in the
history buffer (saveState/restoreState).
Every time a frame changes its URL, we want a new item in the history.
But when this happens, since it's internal to tdehtml, konqueror wouldn't know
about it. That's why there is the openURLNotify() signal in browser extension
(see there for extensive docu about it).
When tdehtml emits it, KonqView creates a new history entry and fills it
(calling saveState).