[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice
Subject:    Re: New document problems
From:       David Faure <faure () kde ! org>
Date:       2005-06-27 10:26:49
Message-ID: 200506271226.49513.faure () kde ! org
[Download RAW message or body]

On Monday 27 June 2005 12:23, Boudewijn Rempt wrote:
> On Monday 27 June 2005 12:20, David Faure wrote:
> 
> > This is a new requirement for kofficecore indeed, but I'm sure we can put
> > together a method to do this. Do you want the new document to be in a new
> > KoMainWindow ?
> 
> Yes, I think so. Just like when you choose New in the file menu.
> 
> > AFAICS all you need is 
> >
> >         KoDocument* newdoc = myMainWindow->createDoc(); // or duplicate the
> > 3 lines there KoMainWindow *win = new KoMainWindow( newdoc->instance() );
> > win->show();
> >         win->setRootDocument( newdoc );
> >
> > (The view stuff happens in setRootDocument automatically, you only need to
> > care about document and mainwindow).
> 
> That looks doable -- but doesn't createDoc() call the template dialog and all 
> that?

No, that's initDoc(), which the above doesn't call. You'll have to initialize 
the document yourself, of course.

-- 
David Faure, faure@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

____________________________________
koffice mailing list
koffice@kde.org
To unsubscribe please visit:
https://mail.kde.org/mailman/listinfo/koffice
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic