1 2) provide some way to save/restore the positions of the menu/toolbar(s)
2 when changing the active part ( I remember Reggie asking for that :)
4 (David) Sounds good. I might have a look at that next.
5 Comment : the menubar is cleared, not destroyed, so it seems we don't have
6 to do anything for it (it remains where it is). We still need to save
7 the BarPosition of the toolbars, though (see comment in
8 KTMainWindowGUIBuilder::createContainer).
9 (David) : With Torben's idea of inheriting KTMW, the problem of accessing
10 the BarPosition of the toolbars is solved. Nice :-)
12 (David) Not sure we want to save whether the statusbar is shown/hidden.
14 (Simon) Another thought: Perhaps we should store the geometry information of
15 the containers of the KPartHost in the KPart itself?
16 (something like KPart-Session Management ;-)
17 (David) Sounds strange (the child taking care of its host's containers...)
18 In SM, it's the host (the WM) that stores the position of its children (the
20 One possible problem (I'm not sure) : are the toolbars shared between the host
21 and the part, or are there only toolbars for one and toolbars for the others ?
22 In the first case, there's a problem because the toolbar will remain when
23 switching part, so shouldn't get moved back when switching back.
24 In fact we only want to store the position of the toolbars that fully "belong"
25 to the part, right (i.e. that only contain items from the part) ?
26 In this case, yes, that could be saved in the part.
30 4) Perhaps a part wants to know if it got activated, so we might want to
31 re-introduce that PartActivateEvent from kdelibs/kparts.
32 Question: Shall this event be sent when the GUI of the part is activated
33 or shall it be sent when the part "really" got activated (via KPartManager)?
35 (David) Any example of usage ?
36 I think what it wants is "really" activated, no ?
38 (Simon) Konqueror for example wants to know when it gets activated, in order to access the KPartHost
39 and query for the container objects (*bars) .
40 Hmmmmmm, that sounds like two possible events. A PartActivateEvent and a GUIActivateEvent...
43 (David) 1 - I don't see the difference between "the gui of the part gets activated" and "the part
44 gets activated", in this simple model (no Document/View). The Part gets activated when you can see
45 its items in the menus/toolbars, there is no "in between" IMO ?
46 2 - Remind me what konq does with the *bars when a part gets activated ?
47 I couldn't find anything with a quick grep in the sources...
48 I'm still looking for an example when it's useful :)
50 (Simon) I think that's the whole idea of making KPartManager independent from
51 the guibuilder. Perhaps some apps wants to embed stuff without showing
52 the parts a full-fledged gui (remember the part-children thingy in the
53 old OpenParts? ;-) ) . Konqueror is one example. However I think
54 KOffice could benefit from this, too, for the inplace editing
55 (where the part is active, in terms of the KOffice document/view model,
56 but still has a different gui or even none at all) .
58 (David) : I start to see :-)
59 But what I don't see is how does KPart know whether it's activated
60 simply or activated with its GUI... i.e. how does it know the way
61 it is embedded (with or without GUI items). Hmmm..
64 (Simon) Konqueror (2) : When a parts get activated (this is "detected" via
65 KonqViewManager) , then in general the actions of the view get plugged
66 into the menus and the main toolbar (which is acccessed via
67 Shell::viewToolBar() (hmmm, I'm looking forward to the new KParts :-)
68 (David) Ah yes we don't have that in "example" currently. Dynamic actions.
69 So you would add an event (or signal) to KPart for that ? Sounds ok to me.
71 (Simon) That means that the (old) KParts doesn't know anything about the
72 embedding in Konqueror.
73 (David) Didn't get that ?!? :-)
77 BrowserView inheriting KReadOnlyPart is the way to go, IMHO.
79 The question if Konqueror itself should be a KPart is difficult.
80 All the BrowserViews are embeddable already, so it's "questionable"
81 if it makes sense to have the embeddable Konqueror shell (KonqMainView) .
85 OTOH that shell makes these views "interact", makes them switch. So if
86 someone wants to embed a browse-all-stuff widget, then embedding Konqueror
87 would probably be cool, as the mainview handles all the stuff like determining
88 the correct mimetype, loading the view, receiving and sending openUrl requests, etc.
89 Something like a shoot-and-forget for embedding ;-) (embed-and-forget ;)
90 Loading and saving in that case would mean save/load the view profile.
92 (David) Hmmm... somebody wanting to embed a full konqy ? Component technology allows
93 you to avoid duplicate code by embedding a component that does what you want. Like kdevelop
94 embeds a kedit component. Which app would want to embed a huge component containing
95 a file maneger + a web browser + a generic viewer + ... ? I think this is not a component,
96 but an application. Views are components...
98 (Simon) Yes, that is true.
99 What about this: We don't make Konqueror's Mainview a KPart, but still
100 use the XMLGUI and the pluginaction stuff. (because these two things
101 are importan and very nice IMHO). (I don't want to miss the action
102 stuff in Konqueror, neither you I guess :-)
104 (David) Sure, actions rock. But KTMainWindowGUIBuilder exists for that exact
105 reason, no? The mainview would be a KTMainWindow, so its GUI is described in
106 XML and with actions.
110 (David) This lib offers :
111 KReadOnlyPart for viewers
112 KReadWritePart for editors
113 KPart for a generic part (?)
115 We could easily port BrowserView to inherit KReadOnlyPart, and call it
118 - The action stuff gets ported, of course (structs disappear)
119 - started/completed/canceled already exist -> removed
120 - setStatusBarText() -> see below, wondering about status bar
121 - setLocationBarURL() -> removed - konqueror will set it from url()
122 [ is that correct ? ]
124 (Simon) I think we still need it. When a view gets a redirection signal, then
125 it wants to change the displayed URL.
126 (David) Ah right (I think support for redirection is missing from konqueror on
127 the whole, at other places).
129 - openUrlRequest and createNewWindow remain.
131 (Simon) <sidenote> We will want to add a serviceType argument to openUrlRequest.
132 At least we need it to get rid of these changeViewMode() hacks in
133 konq_htmlview/konq_iconview :P
136 - popupMenu remains ?
138 (Simon) What about putting that popupMenu into an extension interface,
139 contained in libkonq? IMHO the popupMenu is very libkonq specific.
140 (David) Depends how we want to handle the popupmenu in KonqHTMLView, for
142 At the moment it's missing, and it will be a problem when that view is moved to
143 kdelibs : no more libkonq for it. But anyway I agree : the part should
144 generally take care of its own menu (I'm thinking of KNotePadPart for instance)
145 Perhaps this would remain in KBrowserPart though (we need it in konqueror).
149 On second thought : why should we make KReadOnlyPart different from
151 Any "viewer" should be embeddable in konqueror. The additional signals we
152 currently have in BrowserView could be simply added to KReadOnlyPart, and
153 it doesn't make it more complex (kedit can simply not care about the loading
154 progress, the popupMenu signal, ...)
155 In fact the loading progress should even be emitted by KReadOnlyPart
156 itself (it handles the kiojob), for the simple cases. Of course
157 konqueror views will reimplement openUrl and send the signals themselves.
158 The main problem I see is that BrowserView is asynchronous
159 and KReadOnlyPart is .. a bit of both (asynchronous for remote URLs,
160 synchronous in openFile()). But for konqy, openFile() means nothing
161 and never gets called (because openUrl is reimplemented).
162 For the history stuff, we can provide the default implementation
163 in KReadOnlyPart (just like we did in BrowserView).
164 About the "offset stuff" - well it even makes sense in kedit
165 so the host can ask for going to a particular line when opening the
166 file (hyper cool !). Anyway, for parts which have nothing to do with
167 offsets, this gets simply ignored.
169 In short, we can take advantage of the fact that we have a lib now,
170 as opposed to an interface alone (BrowserView), and provide default
171 implementations (when possible, for example the history stuff)
172 which make every "viewer"-type part a part useable in konqueror
173 - but also in koffice, and whereever.
175 This would reduce the number of "type of parts" and make it simpler
176 to embed anything into anything. OTOH, it makes KReadOnlyPart a bit more
177 difficult to understand.
179 What do you think ? Did I overlook something ?
181 (Simon) I don't think there's a problem with the async stuff
182 (BrowserView/KReadOnlyPart) . Mosfet's KGhostView browserview or
183 his dviview are both 100% like KReadOnlyPart (yes, they launch KIOJob::copy()
184 and copy the file to some local temp) . It works :-) and noone complains :-))
185 -> I see no problem with that :-)
186 (David) Sure - but does that answer the question : KReadOnlyPart==KBrowserPart ?
187 Now that I think of it, it's probably not a good idea - there are many
188 things that BrowserPart has in addition, finally. I'm still not sure. I
189 like making it simple, but this might be an over-simplification.
193 (Simon) About KXMLGUIBuilder<->non-KTMW builder: One possible case coming to my mind are dialogs. If you want to
194 embed a small "part-applet" ;) (perhaps as embedded preview part for some open-foo-dialog?) , then a non-KTMW
195 builder might be useful (and might have containers) .
196 I don't see any problem in having a separate (abstract) interface for the GUI builder. We gain flexibility
197 IMHO, and taking into account that this KParts stuff should probably be something highly finalized for
198 KDE 2.0, its worth having as much flexibility as possible (while keeping it easy to use by providing the
199 easy-to-use KTMW implementation) , IMHO.
201 (David) Excellent idea !! A part in a dialog :-) Don't think you can have that in Windows :-))
202 But .. how can you have containers (menubars, toolbars, ...) in a dialog ? Or were you thinking of
203 another kind of container ?
205 (Simon) Containers in a dialog? See kfd :-))
206 (altho kfd uses ktmw AFAIK ;)
207 (David) ... because there is no support for toolbars in a dialog.
208 I still think you can't have containers in a QDialog :-)
210 (Simon) Another possible thing is perhaps kpropsdlg. IMHO it'd be cool if
211 it would be very easy and simple to add new props pages for certain
212 mimetypes dynamically via shlibs.
213 (David) Sounds good but not very useful. :-)
217 (Torben) I did not follow the latest discussions due to a lack of time. However, I made some
218 small remarks on stuff I did not understand (yet?).
220 (Torben) KReadWritePart and KReadOnlyPart use the three signals canceled, started, completed in
221 two different contexts. One can not see wether a KReadWritePart started loading or
222 started saving. I would like to introduce
223 a) three new signals for KReadWritePart
224 b) A parameter to the signals telling wether this is a read or write operation.
225 Basically I am in favor for a small API -> b)
226 And b) is source compatible to the current solution!
229 (Torben) In example.cpp addPart is called twice and each time the active part is changed. Would not it be
230 more clever to add parts and activate one later instead of activating the last one inserted ?
231 (David) no no, example.cpp doesn't even know when the active part changes.
232 Did you try running the example ? It features a part that is dynamically
233 embedded and de-embedded, the notepadpart. That's why there is an addPart()
234 call - to add the new part when the user asks for it. Not when the active part
237 (Torben) You guys are busting QDOM. You can NOT assign an element of document A to an element of document B.
238 That means: There is no way to mix two documents. What you are doing is asking for trouble.
239 The ownerDocument() function will not work as one might expect after the assignment: The element
240 of B assigned to A will still claim to be a child of B :-(
241 And there are few chances that this may change in the Qt implementation in the next few weeks.
242 (to myself) I tro to fix that in QDom ....
246 <weis> dfaure: Just looked into new kparts
248 <weis> dfaure: You have a major problem: One can NOT mix QDomElements of different documents!
250 <weis> dfaure: Because the ownerDocument wont change as one might expect.
251 <dfaure> weis: not sure I have the full picture (Simon did that part). What should we do instead ?
252 <weis> dfaure: Either I manage to hack QDom (very hard) or ..... dont know currently ....
253 <dfaure> the problem is .. memory management, right ?
254 <weis> dfaure: I just checked in my CVS irc stuff :-)
256 <weis> dfaure: Can you have a look at kparts/COMMENTS ?
258 <dfaure> weis: you should have come before. coolo is talking about re-writing libkio.
259 <dfaure> well in fact he started the rewrite
261 <weis> dfaure: Unfortunately I am not paid for KDE but for Qt hacking :-( So I fear I have no time for kio anyway.
262 <dfaure> weis: I know that, but perhaps a little discussion would help him with the new design :)
263 <weis> dfaure: So you are not convinced by his design ?
264 <weis> dfaure: It is about this daemon that forks and loads ioslaves as libs, or ?
265 <dfaure> yes, this looks fine
266 <dfaure> but then what about filters, and especially the problem is the API
267 <dfaure> each slave currently implements stuff like recurse copying
268 <dfaure> and we would perfer that in a single location, obviously :-)
269 <weis> dfaure: Thta is true!
270 <weis> dfaure: The new design would mean: We write an abstract interface for basic IO stuff.
272 <weis> dfaure: Basically every slave would have to implement usual UNIX IO functions.
273 <weis> dfaure: Does coolo want to do it that way ?
275 <dfaure> like read, write, open ?
276 <weis> dfaure: unix io: open/read/write/opendir ...
277 <dfaure> that would be great IMHO
278 <dfaure> I think he didn't realize that - the fact that moving the code to a central place involves switching to a lowlevel unix-like aPI for the slaves
279 <weis> dfaure: If I have a nested URL: Are we going to start two processes to get the URL from the net or one (with Coolos approach)
280 <weis> dfaure: Currently it is two processes. One for file and one for tar, for example.
281 <dfaure> weis: we're not sure. would one be ok ? (like opening the two libs and connecting signals and slots..)
283 <dfaure> weis : > I think this KPartsMainWindow should inherit KTMainWindow directly
284 <dfaure> weis: I thought the whole idea was NOT to inherit KTM
285 <dfaure> so that one could use anything as a KTM child
286 <weis> dfaure: But this KTMainWindowGUIBuilder is already KTMainWindow dependenat. So why not derive ?
287 <dfaure> well we're back to the shell, then...
288 <weis> dfaure: Of course. Excuse me!
289 <dfaure> > Why should one want to access the parents containers?
290 <dfaure> know the View and Edit menus in konqueror ?
291 <dfaure> They are view dependant ...
292 <dfaure> and dynamically added into the menu
293 <dfaure> although ... we could use XML instead
294 <dfaure> can't remember why we don't
295 <weis> dfaure: Using XML seems to be the clean approach IMHO.
296 <dfaure> yes ... damn can't remember the reason
297 <dfaure> lazyness perhaps
299 <weis> dfaure: What about me hacking a KPartsMainWindow that resembles the old shell pattern. Since it is useful in many cases and easy to understand/use ?
300 <dfaure> yes, I guess it's ok to have a KTM child. The difference with the old shell is that the gui building is separate from it, right ?
301 <dfaure> in fact, do people already inherit KTM, usually ?
302 <dfaure> hmm ... they would simply inherit KPartMainWindow instead.
303 <weis> dfaure: Exactly.
304 <dfaure> so .... what was the problem with the shell ?
305 <weis> dfaure: The problem was ..... aehmmm .....
306 <weis> .... there was some problem .....
308 <weis> dfaure: What about mergeXML? Can it move ? .... still thinking about shell ....
310 <weis> dfaure: I know again! It may happen that the shell uses a widget which in turn uses a component. So the shell does not now that KParts are involved at all!
312 <dfaure> ah - and then the widget would NOT use KPartsMainWindow, right ?
316 <weis> dfaure: Another problem are nested KPartManagers. Imagine Widget W1 has some Parts P1 ... Pn. Part Pn has in turn a widget W2 that uses Parts P1_2...Pm_2. Then W1 and W2 would feature a KPartManager ....
317 <weis> dfaure: The general problem is: A widget may use parts internally but the one who uses the widget does (and should) not know that.
318 <dfaure> yes - I guess we need to try that,
319 <dfaure> I'm not sure what's needed for that to work
320 <weis> dfaure: Currently I am almost shure it wont work.
321 <weis> dfaure: We must ashure that there is only ONE GUIBuilder per main window. That is one thing to do.
323 <weis> dfaure: If window W1 becomes active (focus) it may activate its KPartManager. If W2 becomes active its KPartManager may do something.
324 <weis> dfaure: Ooooops, I think I am on the wrong track perhaps.....
325 <weis> dfaure: I started dealing with kparts like I do with widgets. If a kpart is just a widget that you can load at runtime, then it wont do gui merging anyway. So may above example seems to be very theoretically, perhaps ....
326 <dfaure> yes, if you have two KPartManager you have a problem anyway (if the parts have a GUI)
327 <dfaure> you want only ONE part active at a time ... one gui .
328 <dfaure> so you can't have one part active in each kpartmanager, unless the whole partmanager can be deactivated.
329 <weis> dfaure: Correct.
330 <weis> dfaure: BUTTTH: Imagine you embed a browser widget. Would you expect that it suddenly plays around in your MenuBar and ToolBars? No, or ? It should only do so if you ask for it.
331 <dfaure> well I think _yes_ you would expect its actions to become available to the user, no ?
332 <weis> dfaure: Imagine you write a report generator that shows database queries using the browser view. Would you as a programmer want to have menu entries like "OpenURL" and "History" in your report generator? I would not.
333 <dfaure> hmmm ... then it's the HTML widget you're using, not the part...
334 <dfaure> when kdevelop embeds kwrite, it wants the actions from kwrite...
335 <dfaure> open file, save file, ...
336 <weis> dfaure: Well,. why not load a HTML widget at runtime as a part ...
337 <dfaure> sure, why not :-)
338 <dfaure> I suppose the answer is, as always : configurable.
339 <dfaure> as you said.
341 <weis> dfaure: But that luckily voids my above example. If W1 wants that parts of W2 change the GUI then it has to tell W2 about the GUIBuilder. If W1 does not want that, then it does not tell W2 and no GUI merging will be done.
343 <weis> dfaure: This way we stay with one KPartManager and GUIBuilder and W1 is responsible of propagating it to W2 :-) Problem solved :-)
345 --------------------------
347 David wondering about Status Bar
348 --------------------------------
349 Should the statusbar be a *bar like toolbar/menubar, handled by the XML GUI building
350 (soon "KPartsMainWindow"), and shown/hidden depending on the
351 active part, OR a global statusbar, always shown or hidden, and
352 made available to the parts, through KPartManager or KPartsMainWindow ?
354 Currently it's the first one, but since we removed access to the toplevel
356 Visually, I think I prefer the statusbar not to show/hide when the active
357 part changes. But for consistency with toolbars perhaps it should ? Dunno.
359 (Simon) IMHO the statusbar should behave like toolbars. A part may "have" (allocate) a statusbar
360 or just leave out the <StatusBar/> tag. The question IMHO is: How can the part access the
362 Hmmmmmmmm, I think we should solve this by making use of the xmlgui concept:
365 <Action name="progressaction"/>
366 <Label><text>Blah</text></Label>
368 I think that would solve the problem, and it's what we currently support/implemented.
370 (update) ahh, grmbl, it won't help much ;-) , as it makes KStatusBar::message() impossible..
373 I vote for keeping the currently implemented way (as described above) . Perhaps we should add
374 sth. like KPartManager::statusBarMessage() ? (as that message concept of kstatusbar is really
375 different to the container concept (which kstatusbar supports aswell...) .
377 Torben brainstorming about Nested Parts
378 ---------------------------------------
380 (In the following text I mix the words "components" and "parts". In addition I assume that
381 KPartManager and KPartHost become one class. )
384 Imagine a very complex situation like this:
386 KOfficeMainWindow (a kparts aware shell)
388 |- KWordView/Part (a koffice component)
390 |- KSpreadView/Part (a koffice component)
392 |- KReportGeneratorView/Part (a koffice component)
394 |- KHTMLBrowserView/Part (something like konqui, this is a kpart)
396 Imagine all are added to one KPartManager.
397 Now the user clicks on the report generator and gets the
400 Now imagine the user pressed directly on the Browser that is used
401 by the report generator just to display some HTML. We would get GUI
402 merging so that the menus of the browser appear.
403 But that is a mistake! How the report is made visible is an implementation
404 detail of the report generator. And it is in turn an implementation detail of KWord
405 that is allows KSpread to play around in the menu/toolbars if activated.
407 What we learn from that is the following:
408 Observation 1) Whether a part - that is the child of some other part - may do GUI merging or
409 not is determined by the parent part.
412 Another example: We use a widget Kalender which uses KSpread to display a table.
413 The KSpreadPart is turned into ReadOnly mode.
415 KalenderMainWindow (this is NOT a parts enabled main window)
417 |-KalenderWidget (this is NOT a part)
419 |-KSpreadView (this is a part)
421 Here KSpreadView is used like a usual widget. That means it does not get added to some KPartManager
422 and sees no KGUIBilder or stuff like that. "KalenderMainWindow" constructs the GUI itself.
424 Observation 2) It should be possible to use a part just like a usual widget. So it must work without
425 a KGUIBuilder and without being added to some KPartManager.
427 ** (David) : I'll try that now.
429 Lets extend the example: KalenderWidget shows a very nice kalender. That means it puts images
430 inside of KSpread by using KImage.
432 KalenderMainWindow (this is NOT a parts enabled main window)
434 |-KalenderWidget (this is NOT a part)
436 |-KSpreadView (this is a part)
438 |- KImage (this is a part)
440 |- KImage (this is a part)
442 Somehow KSpread must handle its children. It wants to know which one is active for example.
443 Usually KSpread would use KPartManager but it did not get one from its shell/parent.
445 Observation 3) If a KPart is not added to some KPartManager then it creates its own KPartManager where
446 it insertes itself and its children (if there are any children).
448 That has an impact on Observation 2 - since the KPart will create its own KPartManager, so we rewrite it like this:
450 Observation 2b) It should be possible to use a part just like a usual widget. So it must work without a KGUIBuilder.
452 This is no problem, since the Part never directly talks to the GUIBuilder anyway.
455 Now imagine someone made a KOffice component out of KalenderWidget and embeds it in KWord:
457 KOfficeMainWindow (a kparts aware shell)
459 |- KWordView/Part (a koffice component)
461 |-KalenderWidget (this is NOT a part)
463 |-KSpreadView (this is a part)
465 |- KImage (this is a part)
467 |- KImage (this is a part)
469 Do we want GUI merging with KSpread now? No, since the use of KSpread in KalenderWidget is
470 an implementation detail. In this case we get two KPartManagers. One belongs to the
471 KofficeMainWindow and is connected to the GUI Builder while the other one belongs to
472 KSpread and is NOT connected to some GUI builder. This will work magically if we obeye
475 Observation 4) There may be multiple KPartManagers in one toplevel window, but only one is
476 associated with a GUIBuilder. That means the managers are not really nested. They
477 dont know about each others.
480 Lets take another look at our first example:
482 KOfficeMainWindow (a kparts aware shell)
484 |- KWordView/Part (a koffice component)
486 |- KSpreadView/Part (a koffice component)
488 |- KReportGeneratorView/Part (a koffice component)
490 |- KHTMLBrowserView/Part (something like konqui, this is a kpart)
492 The report generator does not want GUI merging of its HTML browser. But it wants to offer an action
493 called "HTMLSettings" to allow choosing the default font of the HTML Widget. Obviously this action
494 is offered by the HTMLBrowserView. So instead of reimplementing this action, the report generator
495 may propagate actions of the html browser. Its KPart::action() method just calls the browsers
496 action() function if queried for an action named "HTMLSettings".
498 Observation 5) In addition to turning GUI building on or off for components one may do partial gui merging.
499 That means actions of some child component are propagated by the parent component.
501 Observation5 does not cause additional code in libkparts. It just shows a possible usage and the flexibility of the
505 Something else comes to my mind: We can safely reintroduce the shell pattern. The KPartManager/KHostPart is
506 split of the shell and that is a MUST.
507 But it does not make sense to create a KTMainWindow and then a KTMainWindowGUIBuilder to manage menubar/toolbars/statusbar.
508 Imagine an application that uses KTMainWindow. Either the application programmer knows that he wants to embed
509 some components and that they should use GUI merging => He can use KPartsMainWindow from the start.
510 Or the application programmer does not want that any component that it uses directly or indirectly merges in
511 its GUI. In this case he uses KTMainWindow and does not expect someone to override this decision by installing
512 a KTMainWindowGUIBuilder.
514 Imagine someone is writing a time scheduler which uses a KalenderWidget Version 1.0:
516 SchedulerMainWindow ( a KTMainWindow )
520 |- KalenderWidget (which uses NO parts currently).
522 Here no GUI merging happens. Now someone improves KalenderWidget in Version 2.0 to use
523 KSpread internally (once again: This is an implementation detail):
525 SchedulerMainWindow ( a KTMainWindow )
529 |- KalenderWidget (which USES parts now).
533 When clicking on KSpread: Do you want GUI merging now? No! The GUI of the scheduler should stay
534 the same. Just the implementation of the KalenderWidget changed.
536 Observation 6) The application programmer determines wether he wants GUI merging or not. That means it is his
537 decision to choose KTMainWindow or a GUI merging enabled KTMainWindow. And that in turn means that we can merge
538 KTMainWindow and KTMainWindowGUIBuilder in one class called KPartsMainWindow.
539 KPartsMainWindow will feature its special implementation of KPartManager (with KPartHost already merged with KPartManager).
541 If some component wants to offer all of its functionality even in the case that nobody allowed it to do
542 GUI merging then the component can still put all of its actions in a QPopupMenu instead of the menubar.
546 I think with this model we can have an object tree that mixes usual widgets and components in any order
547 and we always get it right. But it is late and I may get things wrong :-)
548 In addition my approach reduces the amount of classes and the complexity of the API (at least I hope so).
550 Lets put the four most important things together:
552 Point 1) The application developer decides wether his app (->toplevel window) features GUI merging or not.
553 Point 2) A part decides wether it allows its child parts to do GUI merging.
554 Point 3) If one part in the big object tree is not allowed to do GUI merging (that means it is not registered
555 at the KPartMainWindows KPartManager, but on some additional KPartManager) then none of its direct or
556 indirect child parts can ever do GUI merging.
557 Point 4) Wether some custom widget uses parts internally or not is an implementation detail and not visible to
558 the user of this custom widget.
561 (David) : I obviously agree with all this. This is a very nice derivation of
562 the few ideas we had on irc - making GUI merging configurable, at both ends in
563 fact, plus all the issues associated with nesting.
567 (David) Torben : perhaps you could also comment on the KReadOnlyPart ==? KBrowserPart issue ?
568 Look for "second thought" in this file. Trying to decide between
569 each read-only part can be embedded in konqueror and only those who implement
570 KBrowserPart can be embedded in konqueror... I realize in the first case even
571 ReadWrite parts would be embeddable since they inherit readonly part... A minor
572 issue compared to what's above though.
574 (Torben) When I draw my university education out of the had (and my master thesis :-)) then
575 I think your problem can not be solved by deriving from some class but by doing
578 We have KReadOnlyPart (short KROP) and KonqyViewerExtension (short KVE). KVE is just
579 a child of KROP that you can query with the QObject::child method.
580 Views which are konquy aware feature their own implementation of KVE and konquy is
582 If a KROP does not feature a KVE then Konqui installs a default KVE that just ignores
584 I think the little difficulty is to implement the default KVE, but it should be possible.
585 With this solution we get both: Konquy can embed all KROPs and some KROPs can be Konquy
586 aware and we do not bloat the KROP interface.
588 (Torben) About the fact that konqy can embed a KReadWritePart (short KRWP):
589 This is IMHO not a konqy problem but a KRWP design bug. KRWP overloads
590 KROP and changes the semantics (editing is possible). By default KRWP should
591 go into ReadOnly mode. Only if one calls rwpart->setEditable( TRUE ) it should
592 offer editing of the data. It may still happen that some KRWPs dont obeye the
593 "editable" flag, but that is a bug inside of the KRWP.
595 (Simon) I definitely agree with all this :-)
597 KROP -- (this is what konqueror embeds)
599 (child qobj) KonqyViewExtension (konqy specific stuff)
601 (current browserview extension objects)
604 Can we go for this? :-)