This forum has been archived. All content is frozen. Please use KDE Discuss instead.

How to make a custom MarbleWidgetInputHandler

Tags: None
(comma "," separated)
jalvarez
Registered Member
Posts
3
Karma
0
I would like to have a starting point to create a custom MarbleWidgetInputHandler so I tried giving Marble an input handler instance like this:

Code: Select all
    /* `this` is a direct subclass of MarbleWidget. The code below is called on the constructor. */
    MarbleModel* handler_model = this->model();
    MarbleMap* handler_map = new MarbleMap(handler_model);
    MarbleAbstractPresenter* handler_presenter = new MarbleAbstractPresenter (handler_map);
    this->ownMarbleHandler01 = new MarbleWidgetInputHandler(handler_presenter, this);

    /*Not calling this keeps whatever the default handler is, spinning/zooming/everything works */
    this->setInputHandler(this->ownMarbleHandler01);


This handler simply doesn't work, the rmb popup does show up and seems to work but Spinning the globe, zooming in or out does not work.

How can I give Marble an input handler that actually work so I can start making my own?


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]