Access kickoff classes outside the library

2009-07-14 Thread Arno Töll
Hello list,
I was wondering, if it is possible to access kickoff classes outside of
the library itself. The kickoff namespace is not documented very well,
so I ask directly here, since I'm somewhat confused of all those classes
in the namespace.

I intend to write my own plasma applet where I'd need some
functionalities already implemented in kickoff. Particularly I find the
program menu launcher part very useful and would be glad if I could
reuse this widget in my own code. Could someone provide my some hints on
how to use this widget in custom code? Do I need some external linkings,
is it even possible just to instanciate and fill my own program widget
without fuss?

I tried a QMenu widget as Plasma::PopupApplet widget by the way, which
looks very buggy. Is this an intended behaviour?

QWidget * MyPlasmaPoupupApplet::widget()
{
  QMenu * foo = new QMenu();
  QMenu * bar = new QMenu();
  bar-addAction(Hello World from submenu);
  foo-addAction(Hello World);
  foo-addMenu(bar);
  return foo;
}

This is what the Widget _should_ look like [1] and this is, what the
widget actually looks like [2]? What am I'm doing wrong here?

[1] http://img232.imageshack.us/img232/4220/73761448.png
[2] http://img88.imageshack.us/img88/5615/61229435.png
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel


Re: Access kickoff classes outside the library

2009-07-14 Thread Aaron J. Seigo
On Tuesday 14 July 2009, Arno Töll wrote:
 I intend to write my own plasma applet where I'd need some
 functionalities already implemented in kickoff. Particularly I find the
 program menu launcher part very useful and would be glad if I could
 reuse this widget in my own code.

that code is not intended to be re-used outside of kickoff; the classes are 
not in a state to be ready to reasonably provide a public API that we can keep 
binary stable.

if there is interest in such a thing, a workspace/libs/plasmamenu could be 
started, much like plasmaclock, but it would need a maintainer.
 
 This is what the Widget _should_ look like [1] and this is, what the
 widget actually looks like [2]? What am I'm doing wrong here?

it's expecting a widget, not a popup menu. pass in a non-popup widget and it 
should work just fine.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Qt Software


signature.asc
Description: This is a digitally signed message part.
___
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel