You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, February 28th 2006, 9:53am

KMdiMainFrm, Kate Part and merging menu

Hi,

I'm writing a small application based on KMdiMainFrm and want to include Kate as Mdi-childs. So I've written a class derived from KMdiChildview and composed of a KTextEditor::Document member variable and a Kate::View one. Fine... I can open new documents and every child is a kate view.

Now I want to merge and manage my app-GUI with kate one. So I've written something like this in the constructor:

m_manager = new KParts::PartManager( this );
connect( m_manager, SIGNAL( activePartChanged( KParts::Part * ) ), this,
SLOT( createGUI( KParts::Part * ) ) );

and setXMLFile(...);

Wonderful: when I open a new doc, kate's menu appears and if I have no opened document, I only have my app-menu. Unfortunately, kate commands do not act as expected. For example, copy, cut are always disabled, Find Next or Go to Line do not work, but undo/redo work fine. Secondly: How do I manage the activation of a part, how does my app know on which child the actions have to be applied?

Thanks for help.