[bt-devel] Help with getting the GUI stuff to respond properly

Jim jdc.email at gmail.com
Mon Jan 16 14:27:21 MST 2006


I've been working on the Strong's Number Text results.  Where the 
results will be as follows:
---------------------------------------------------------------
|CModuleResultView     | CSearchResultView                    |
|   -------            |    ---------                         |
|KJV              (12) | (verses)                             |
|  - "trans1"     (2)  |   ...                                |
|  - "Trans2"     (3)  |                                      |
|     ...              |                                      |
---------------------------------------------------------------
|CDisplay - PreviewDisplay                                    |
|                                                             |
|                                                             |
|                                                             |
|                                                             |
|                                                             |
|                                                             |
|                                                             |
---------------------------------------------------------------

Here are the problems.
1) After populating the CModuleResultView with the strongs translation, 
adjusting the size using the Hint does not work.
    m_moduleListBox->sizeHint().width() returns 105
    m_moduleListBox->minimumSizeHint().width() returns 142
Some of the translations are 3 and 4 words long and the width should be ~300

Is there something that needs to be done to make the Widget recalculate 
the sizeHint?


2) I do not understand the CDisplay - PreviewDisplay.  When it is 
created it uses the size of its parent window to set its minimum height 
(and it will not shrink any smaller).  On my system it is about 400 
pixels high and causes a very large/tall search dialog.  The next thing 
is that when it is created from a "Strong's Search" context menu click, 
its minimum size is set to the size it needs to display _/all/_ the text 
of the first result (this may be small or very big depending on the 
first verse of the result).

I could not find where the CDisplay - PreviewDisplay was resizing 
itself.  Its size should be set based on the size of the window not on 
some other factor.  Also, it should shrink down to some reasonable 
minimum (like 150 pixels high) and not be fixed at 300 or 400 or what 
ever the first verse's size is.
Can anyone tell me where to disable the CDisplay - PreviewDisplay 
minimum size?

Thanks
Jim

P.S.
I have the Strong's Number Text results working and the code is 
contained within a single class.  Were looking at about 50-75 lines of 
code.  I will be posting it in a few days after I do some more testing 
and a little cleanup.  I do have one last question.  In my searching for 
the Strong's Number Text I use the renderSingleKey function:
    text = renderSingleKey(key, modules, settings);
then I parse through the text result.

Is there any easy way to the iterate through the XML/HTML a node at a 
time and get the information using some function like:
    getCurrentNodeInfo()[CDisplay::Lemma]?
This would save some energy parsing the text manually and possibly make 
the code easier to maintain.




More information about the bt-devel mailing list