[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice
Subject: Re: Autocorrection in KWord
From: Stephan Kulow <coolo () kde ! org>
Date: 2000-07-12 7:56:46
[Download RAW message or body]
Troy Unrau wrote:
>
> On Wed, 12 Jul 2000, Thomas wrote:
> > At the moment there are a couple of entries in the kword_doc.cc file (line
> > 1272) You might consider making a nice file with mappings which is read
> > at execution time, also consider what to do with different languages.
>
> At risk of sounding naive, stupid or generally ill informed, but how exactly
> would I do this?
>
> I can understand the current code (pretty straight forward) but in all of my
> rather pitiful attempts at dabbling in C++ and Qt, I've never yet had to read
> or write something to file, nevermind some sort of database like entity.
>
> I know what is required is quite simple: A file that is in plain text or XML
> that has two entries per line -- what word to replace and what to replace it
> with -- this much is simple. I also know that if I can set up a loop to read
> each line and call the appropriate functions ( as demonstrated in line 1272
> or kword_doc.cc ), these entries can be added or removed from the list.
>
> Two problems, (and maybe you could help me out in learning how to do this ) I
> don't know how to create such a mechanism, and secondly, I don't know how to
> create dialogs that would access this and update the list at runtime.
>
> I know this may sound trivial to those that live, breathe, eat and dream of
> pointers, but I just don't have (yet) the skills to perform this. If someone
> could walk me through this, it would be much appreciated.
>
Look for QFile and QTextStream
Greetings, Stephan
--
... but you ain't had mine
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic