Dataengine Questions, Proposal?
David Baron
d_baron at 012.net.il
Thu Jan 22 20:28:28 CET 2009
On Thursday 22 January 2009 18:31:16 Aaron J. Seigo wrote:
> On Thursday 22 January 2009, David Baron wrote:
> > Register the applet with it/for it?
>
> applets don't register with the engine, really. they just ask for it:
>
> dataEngine("akonadi")
So I say dataEngine("contacts") --or "kdepim". Is there such a thing working?
>
> you are guaranteed a valid engine in return. if an engine responding to the
> name "akonadi" exists, you'll get that. if none exists, you'll get a
> "dummy" engine. from there you can freely connect to sources, request
> services, etc.
What do I do with the "dummy" engine?
>
> > What datasource do I get? Obviously this is not a polled item and
> > getDataSource should trigger the signal.
>
> this one i'll leave to sebas :)
>
> > Is there or will/can there be a dataengine sitting on X-events such as
> > keystrokes and mouse-events. This would obviously trigger quite often if
> > one is using these devices. Keyboard and mouse event classes are altready
> > defined in qt and would also carry the window handle that "owns" the
> > event.
>
> we have a mouse movement engine, which is useful because that requires
> polling the global mouse pointer. i'm not sure what the purpose of a keys
> and mouse press engine would be though ....
I mouse movement engine which yields Q...MouseEvent object of some kind should
contain any mouse-buttons, coordinates, and hopefully or additionally the
window or object currently owning the mouse (which should not be the applet).
>
> > LIve spell-checkers a la Kisa, instant translation, instant search to
> > recoll/beagle, google, answers.com, etc.In an opensource rather than
> > proprietary maner.
>
> so sort of like an always-running-krunner-query. :)
I need more documentation on krunner. However, the queries are not always
running. If I want to do it, there is a keyboard shortcut like ALT/click to
trigger the query.
>
> hm... the challenge with live spell checking and translations isn't really
> getting the input, but being able to place the output back into the app.
> given the pervasive support of spell checking in kde and other popular
> F/OSS apps, i'm not sure there is nearly the same benefit for us with such
> a thing as there is for proprietary systems.
I never used kisa to correct spelling in a doc since that program already had
spell-checking. Typing into a console editor like vi can use it, also syntax
checking, etc. I never tried it for insertion into target window because this
was not particularly well-behaved. Just took the hint and selected if I needed
it. Translations would simple display as well.
>
> instant search, etc .. that gets expensive fast. i'd rather see a way to
> tie into krunner for those.
>
> > There is a color-picker plasmoid and gimp and other apps take choose
> > screen areas using the mouse. What I want to do is retrieve the word
> > under/around the cursor with a key-shortcut and feed that to a search
> > engine, translation engine etc.
>
> i think that would be very difficult to do i part due to there being no
> "standard" toolkit, resulting in the need for a lot of hackish "what is
> that thing under the cursor?" type code. instead, you could use the x
> clipboard and require that the user highight with the mouse. then you can
> just grab the selection from x (very straightforward task) and go from
> there.
Yes. The windows applet from answers.com uses a proprietary, patented method
NOT relying on OCR. Babylon's applet uses OCR. (My familiarity with this stuff
is a number of years old.)
I could say if the owning window has text, get that. If not, go through OCR on
some region. In the end, probably simplest to select as you said and either
pull off the clipboard or drag and drop to the applet. These both contain
mime-type info which can be used in interpreting the selection.
The instant information on click is quite nifty, however. (and is built into
some websites)
More information about the Plasma-devel
mailing list