[bt-devel] Threads / New idea for versformatting

Joachim Ansorg bt-devel@crosswire.org
Tue, 5 Sep 2000 17:52:56 +0000


Hi Martin!

> Hi,
>
> On Mon, 04 Sep 2000, you wrote:
> > No the ideas I had about the key chooser:
> >
> > There are two types of key choosers: One for bible-keys and the other one
> > for lexicons keys.
> >
> > 1) The bible key chooser:
> > 	It should be divided in three parts (Book - Chapter - Verse), the parts
> > should be visually divided from each other but they shouldn't be places
> > far away from each other.  Basically the thre types should contain the
> > same elements which I'll describe now here (elements of one key part): -A
> > Combobox (like the current thing we have)
>
> featuring Autocompletion!

Oh, yes! I forgot it! I like the current way of autocompletion.

> > 	-Three buttons vertically arranged (The button on the top is an arrow
> > pointing to the top, the button in the middle is a scrolling button I'll
> > describe here later, the third one (the button at the bottom) is an arrow
> > pointing to the bottom). The first and third button are similair to the
> > buttons of a SpinBox. The first and third button move to the next /
> > previous entry in the list. YXOucan also use the comboboy to choose an
> > entry .
> >
> > Description of the scroll-button: This special button looks like a small
> > vertical line. If you move the mouse over the button and press it it's
> > possible to get a preview in the combobox it belongs to what content is
> > chosen. If you move the (pressed) mouse away from the button to the top
> > it shows the entries being before the current entry. If you move the
> > mouse faster it changes faster.
> > The same if you move the mouse to the bottom of the screen but the next
> > after the current one will be shown.
> > The special button was a nice feature of a windows program to compose
> > music (Midis), I dopn't remember the name.
>
> Only the Combobox Content changes, right? The real Presenter content is
> updated when you release the mouse button.
> Should the mouse pointer be frozen on the scrollbutton (<- my suggestion)
> while the mouse button is being pressed, or should it move around the
> screen?

Yes, only the content of the comboboxes changes. The mouse should be movable 
(maybe only in the direction where it's reasonable (up and down)). The 
entries could be painted grayed out until the mouse is released so the 
contents of the presenters changes.

> > 2) The lexicon key chooser:
> > The same as the bible key choose but only one part (one combobox with
> > it's three buttons).
> >
> >
> > I'd suggest to create a general combobox derived class which implements
> > support for the three buttons and then create the key choosers widgets
> > using the general comboboxes for it's parts.
>
> Agreed.
>
> > I'd also suggest to make the
> > keychooser general in it's number of parts (e.g. three parts for the
> > bible-style, one part for the lexicon-style, other styles may be added
> > later). But feel free to send other idea,thoughts, comments...
>
> Not so good, too much overhead. I suggest to implement specific classes for
> the specific presenters. They could inherit one base class, though.
> Just like CModulePresenter, CSwordLexiconPresenter etc.

Ok, agreed. 
But my way was to use numbers which part should be used (e.g. setContent(int 
part, QStringList& list) etc.). Wouldn't be so hard (list of chooser-parts 
and using numbers to set the properties of the parts).

> > You can search for mem-leaks, fix some bugs in the backend and the
> > commentary presenter, everything you like ;-)
>
> Bugs? Please more detailed. I will try.

If you click on bookmarks the key will nromally be refreshed for module 
presenters which are already opened. But the commentary presenter doesn't 
refresh.
If you click on a bookmark the first time (so a new presenterw ill be opened) 
the versenumber of the new presenter is incorrect.
There are some problems withthe backend
(e.g. "CData *CSWORDCommentaryModuleInfo::moveToNext(MoveType moveType)"), 
they can't correctly jump to te next chapter/book. The problem is that the 
chapter/verse of the next book/chapter we want to move to doesn't exist so we 
have to check somehow if the result key does exist, if not jump to te next 
correct key.
"CData *CSWORDCommentaryModuleInfo::moveToPrevious(MoveType moveType) " is 
also buggy.

Does somebody known an easy way to find memory leaks in programs?

> Martin

--Joachim