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

List:       kde-devel
Subject:    Re: some beginners questions
From:       Andreas Pakulat <apaku () gmx ! de>
Date:       2005-02-25 19:34:26
Message-ID: 20050225193426.GB20715 () morpheus ! apaku ! dnsalias ! org
[Download RAW message or body]

On 23.Feb 2005 - 23:48:42, Andreas Pakulat wrote:
> Hi,
> 
> I already started my app and today I wanted to dynamically
> enable/disable KActions depending on wether the Document actually
> contains data or not. Now looking at one or 2 kde apps there came
> several things to my mind:
> 
> - when using document/view architecture is it better to have the
> mainwindow create a view (which in turn creates the document) or the
> other way around - i.e. the mainwindow creates a new document and this
> creates the view. Including the question if both document and view
> each get a pointer to the other?
> 
> - in conjunction with the above should the mainwindow hold a pointer
> to the view or to the document? 
> 
> - I'm planning on adding support for multiple documents in my app, is
> the KMDI stuff used for something like this in other kde apps, or do
> they do the mdi-stuff on their own? I see kdevelop uses kmdi.
> 
> - Last question is how do "correctly" handle KActions that have a
> meaning only with a document? Currently I have these in the mainwindow
> class with slots in that class, but I think I should move them into
> the view-class. Also I tried to find out how kopete for example does
> the enabling/disabling but I didn't came very far. So how does the
> "normal" kde app enable a KAction (I don't mean call
> KAction->setEnabled() but how do the apps trigger this, i.e. what
> signal in what type of class is emmitted and which slot catches it,
> which class connects these 2)
> 
> I tried to look at kate, but thats a bit too complicated to initially
> learn from it..
> 
> I know most of my question have no "correct" answer, I'd just like to
> get some ideas on how to solve those... 
> 
> Pointers to good documentation is welcome, but I already know the
> popular stuff about KAction and XMLGUI and so on, linked from
> devloper.kde.org. What I really miss is something like a basic MDI
> editor without kpart or something like that, but with XMLGUI, MDI,
> document/view architecture and Actions-Handling.

Hmm, nobody here who knows about this? Or does nobody have the time to
write some lines for these questions?

Andreas

-- 
Best of all is never to have been born.  Second best is to die soon.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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