[bt-devel] saving search analysis
Joachim Ansorg
bt-devel@crosswire.org
Wed, 17 Oct 2001 23:45:18 +0200
Hi Mark!
> i'm a little stuck. i'm trying to start with putting in a pop-up window
> on the rightmouse click on the search analysis window to mimic the
> functionality of the CSearchDialogResultView class (this is where you
> can save the verse). it seems as though the SearchDialogResultView is
> using a rightClicked signal/slot which doesn't seem to be available in
> the CSearchDialogAnalysisView class since this class is derived from the
> QCanvasView class (please let me know if i'm mistaken here).
I see the logic in your idea, but I'm wondering if users think, that the
search analysis may have an right mouse button menu. The listboxes in the
search result page are controls which require user interaction so it's more
logical that there is an RMB menu.
But I'm not sure about the seatch analysis.
It's true that CSearchDialogAnalysisView is derived from QCanvasView.
> my thought was to use the mousePressEvent that's available from the
> QCanvas, but I'm not sure if this lends itself to being used for a popup
> window...?
mouse press events are handled directly by each widget, so
CSearchDialogAnalysisView should handle the RMB menu itself. Maybe you know
that the class QCanvasView is derived from QCanvasView (look into the Qt
class documentation to know this :)
The function to interact with the mouse are in QScrollView or in the classes
QScrollView derives from (QFrame, QWIdget, QObject).
I'd suggest to reimplement the function QScrollView::contentsMousePressEvent
to show the RMB menu. To see how it could be done have a look into
CGroupManager::contentsMousePressEvent which shows the menu in the
groupmanager. If you have questions about this function of about a general
thing please ask me!
> since i'm a little new to the qt classes, and signal slot mechanisms,
> does the above sound correct? would anyone happen to suggest maybe a
> workaround for this issue?
Anotehr solution instead of the RMB menu may be a button at the top of the
view. But I'm not sure what the better soltution is.
> any suggestions would be most appreciated !
>
> Thanks!
> ~mark
Joachim