From kde-panel-devel Sun Jan 29 16:10:04 2012 From: Mark Date: Sun, 29 Jan 2012 16:10:04 +0000 To: kde-panel-devel Subject: Re: Heads up, working on autocompletion and breadcrumbbar! Message-Id: X-MARC-Message: https://marc.info/?l=kde-panel-devel&m=132785362129588 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--20cf303b39fdaa37f904b7acf7c6" --20cf303b39fdaa37f904b7acf7c6 Content-Type: multipart/alternative; boundary=20cf303b39fdaa37f504b7acf7c4 --20cf303b39fdaa37f504b7acf7c4 Content-Type: text/plain; charset=ISO-8859-1 On Wed, Jan 18, 2012 at 4:40 PM, Mark wrote: > On Wed, Jan 18, 2012 at 11:06 AM, Alin M Elena wrote: > >> Hi Mark, >> >> I was reading about your autocompleter. >> I have few questions... is it able to use a kde spelling dictionary for >> it? >> I ask that because would be interesting to have it in ktp-text-ui >> component of >> kde-telepathy... >> >> >> regards, >> Alin >> >> Hi Alin, > > At this moment it doesn't have that and i wasn't planning on implementing > it. You are however free to patch it with spelling support. As long as it's > optional. > I will send the current C++ code that i have for the autocompleter to this > thread somewhere tonight. > > Regards, > Mark > Better late then never, right ;) Here is the code for the string completion part. The class is extremely simple. All you need to do is call setData which accepts a stringlist. Then call search("needle") and it will emit every result it finds. The way i used this is by making a second class that (in my case) does the file system listDir function, makes a list and sends it to the stringcompleter and i let that run in a seperate thread: StringCompleter completer(); QThread myThread(); completer.moveToThread(&myThread); ... connect the signals to corresponding functions: QObject::connect(&completer, SIGNAL(searchCompleted(QStringList,QString)), this, SLOT( ... )); QObject::connect(&completer, SIGNAL(searchHit(QString)), this, SLOT( ... )); That way searching won't block anything :) Up until now i was just experimenting with this and used the StringCompleter along with QDir directly.. Next up: more serious experimentation, but with KIO! Fingers crossed. --20cf303b39fdaa37f504b7acf7c4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On Wed, Jan 18, 2012 at 4:40 PM, Mark <markg85@gmail.com>= wrote:
On Wed, Jan 18, 2012 at 11:06 = AM, Alin M Elena <alinm.elena@gmail.com> wrote:
Hi Mark,

I was reading about your autocompleter.
I have few questions... is it able to use a kde spelling dictionary for it?=
I ask that because would be interesting to have it in ktp-text-ui component= of
kde-telepathy...


regards,
Alin

Hi Alin,

At th= is moment it doesn't have that and i wasn't planning on implementin= g it. You are however free to patch it with spelling support. As long as it= 's optional.
I will send the current C++ code that i have for the autocompleter to = this thread somewhere tonight.

Regards,
Mark

Better late then never, right ;)

=
Here is the code for the string completion part.
The c= lass is extremely simple. All you need to do is call setData which accepts = a stringlist. Then call search("needle") and it will emit every r= esult it finds.
The way i used this is by making a second class that (in my case) does= the file system listDir function, makes a list and sends it to the stringc= ompleter and i let that run in a seperate thread:

StringCompleter completer();
QThread myThread();
completer.mo= veToThread(&myThread);

... connect the signals= to corresponding functions:
QObject::connect(&completer, SIGN= AL(searchCompleted(QStringList,QString)), this, SLOT( ... ));
QObject::connect(&completer, SIGNAL(searchHit(QString)), this, SLOT( ..= . ));

That way searching won't block anything :)

Up until now i was just experimenting with this and u= sed the StringCompleter along with QDir directly.. Next up: more serious ex= perimentation, but with KIO! Fingers crossed.
--20cf303b39fdaa37f504b7acf7c4-- --20cf303b39fdaa37f904b7acf7c6 Content-Type: application/zip; name="stringcompleter.zip" Content-Disposition: attachment; filename="stringcompleter.zip" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gy0914ug0 UEsDBBQAAAAIADGGPUCge7kbdQEAAM4DAAATABwAc3RyaW5nY29tcGxldGVyLmNwcFVUCQADjWol T9pqJU91eAsAAQToAwAABGQAAACFUrFugzAQ3ZH4h1MqRSZCZId2SodWqlpFGTJWLlyKKzDIPrJU +ffa2AECleIB7Hf33r07+0HIvOoKhJUmJeR33tRthYQqKVdhEAaHHt1d0TSdAWz/8fWDOcGm5Qol RZCGAZjlcebh2KH1Z8GJs/GoUHcV6QlScU0H5Cov3xGLClkUBr9hcLFuzo0oYGFJIz1b1byRmmDv 4m/C7NeV+Tr+WB2ewMKZ1/yHtSzh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3kXuoVH7fRYRI7JoTpZTxjMVMlh5Eh4XMJ/DSVgp 9qS35rh1ZFDtWFV3Q46G4rWP7HS2/SZweg5kKeBv4DCi75csuODA1/YfUEsBAh4DFAAAAAgAMYY9 QKB7uRt1AQAAzgMAABMAGAAAAAAAAQAAAKSBAAAAAHN0cmluZ2NvbXBsZXRlci5jcHBVVAUAA41q JU91eAsAAQToAwAABGQAAABQSwECHgMUAAAACABDhj1A8w6hqlgCAACkBQAAEQAYAAAAAAABAAAA pIHCAQAAc3RyaW5nY29tcGxldGVyLmhVVAUAA65qJU91eAsAAQToAwAABGQAAABQSwUGAAAAAAIA AgCwAAAAZQQAAAAA --20cf303b39fdaa37f904b7acf7c6 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel --20cf303b39fdaa37f904b7acf7c6--