[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Data cursor in Octave

From: roland65
Subject: Re: Data cursor in Octave
Date: Fri, 10 Feb 2017 05:50:42 -0800 (PST)

Pantxo wrote
> It is thus not very difficult, but it has to be implemented for both fltk
> and Qt.

OK, thanks for the tips, it helped me a lot.

I tried to add a menu to the qt figure. It almost works. Indeed, when I
click on my custom "Data cursor" menu item, the datacursor() function is
executed (I see the coordinates that changes at the bottom) but the
annotation is not shown. For the whole thing to work, I have to go to the
Octave terminal and press the enter key once. Then, the datacursor works as

Do you have any idea about this strange behaviour?

Here is my code (in libgui/graphics/

Figure::createFigureToolBarAndMenuBar (void)


  editMenu->addSeparator ();
  editMenu->addActions (m_mouseModeGroup->actions ());
  editMenu->addAction (tr ("&Data cursor"), this, SLOT (dataCursor (void)));

  < ... >

Figure::dataCursor (void)
    octave_link::post_event (this, &Figure::datacursor_callback);

Figure::datacursor_callback (void)
  figure::properties& fp = properties<figure> ();
  octave_value fnum = fp.get___myhandle__ ().as_octave_value ();

  Ffeval (ovl ("datacursor", fnum));

  //redraw (); // Needed ?

View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]