Am Tuesday 26 July 2005 14:24 schrieb Angus Leeming:
> > than you can replace the KPart =


> > initialization in kviewpart.cpp (line 80-155) with a simple
> > multiPage =3D new KDVIMultiPage(...);

> =


> Ok. However, to resolve some further compiler errors I had to create:
> QWidget *widget() { return 0; }
> The real function is defined in KParts::ReadOnlyPart to return m_widget. =

On
> initial construction of the KMultiPage, m_widget is zero. So, dumm
> question X: do I need it, or am I on the right track?


You don't need it. Now KMultiPage is a QWidget itself. Just replace all =

occurences of multiPage->widget() with just multiPage.

> Current diff attached. The code here compiles but libkviewshell.a does not
> link because I haven't defined KDVIMultiPageFactory.


This is part of the KParts code. You can get rid of it.

> I guess that I'll have to move KMultiPage into the kdvi directory. If I'm
> deriving from QWidget, do I need KViewPart at all? Shouldn't I be just
> creating a KDVIMultiPage in my main.cpp?


Well, all GUI Code (Menu, Toolbar, Keyboard Shortcuts, ...) is handled by
the KViewPart. It should be easier to rewrite KViewPart to use only Qt.

The actual mainwindow is the KViewShell class. This one is created if kdvi
is started normally. It in turn loads the KViewPart as a KPart. If kdvi is =
used
in embedded mode the host application (konqueror or kile) loads the
KViewPart directly.

You could, as a first step, merge the KViewShell and KViewPart classes
into a normal KMainWindow instead of KParts::MainWindow. This would =

remove the whole KParts code.

You should also remove the KXMLGUI Code from KDVIMultiPage. This should
make things easier. Or use the EmptyMultiPage at first. It is the dummy
plugin KViewShell loads at startup if no file is loaded. It does nothing and
therefore it should be easier to make it work.

And remove the rest of the Plugin loading code. In KViewPart:penFile() =

(line 688-779). We check if we need to switch to an other KMultiPage
(for example if we have a DVI file open and now want to view a DjVu file).
You can delete all of this.

> Angus
> =


> ps. I'm a svn newbie. Is there any way to tell "svn diff" to ignore
> whitespace changes in a file? The equivalent of "cvs diff -Bbw file.cpp".
> I have tried "svn help diff" but neither
> $ svn diff -x "-Bbw"
> $ svn diff --diff-cmd "diff -u -Bbw"
> work.


I'm still struggling with svn myself.

> pps. Should we continue this conversation on the mailing list or in
> private?


As you wish.

Greetings,
Wilfried.
=

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscrib=

e <<