Hi Claudia,
for generating synthetic UI events, did you have a look at
QCoreApplication::postEvent(QObject* receiver, QEvent* event) ? For
this, you wouldn't need to override anything in QmitkRenderWindow.
For changing the contrast, your approach of signals / slots sounds good
to me. The slot being called in the main thread would need to get the
current instance of a mitk::LevelWindowManager object and change the
level window by calling SetLevelWindow(...) or just change the
mitk::LevelWindowProperty property of the mitk::DataNode for which you
want to change it.
Best,
Sascha
On 10/28/2013 11:17 AM, Claudia Dualica wrote:
Can anyone help me? Please! :)
2013/10/25 Claudia Dualica <[email protected]
<mailto:[email protected]>>
Hi! I found how to do some of my task! :)
If I override some QmitkRenderWindow method and call them, I can
interact with the qt interface! I was able to move and press the
cursor and move the wheel.
Now I can't:
1) resize the image.
I could resize the image by overriding and
calling resizeMitkEvent. But it works only if I called
before changeLayoutToWidget1(); on my QmitkStdMultiWidget.
Otherwise it doesn't work! Why???? What can I do????
2) move the image! I tried by overriding mousePressEvent() and
calling it in this way:
QPoint point_move(50, 50);
QMouseEvent move_event(QEvent::MouseButtonPress, point_move,
Qt::MiddleButton, QFlags<Qt::MouseButton>(Qt::MiddleButton ||
Qt::MiddleButton ), QFlags<Qt::KeyboardModifier>(Qt::NoModifier ||
Qt::NoModifier));
render_window->myMouseMoveEvent(&move_event);
But it doesn't work!
3) change the contrast of the image
How can I do?
Thanks in advance! :)
2013/10/24 Claudia Dualica <[email protected]
<mailto:[email protected]>>
Hi,
I'm developing on MITK, I'm working on Example Step8.
I have two thread, one is mine, one is qtapplication.
I have to interact with qtapplication without mouse, but with
my thred.
I connected the thread that I instantiated with qtapplication
thread, to produce actions in qtapplication. I did it with
QObject::connct with signals and slot.
With an emit of my signal I moved the cross position by
calling a Step8 slot. This slot call MoveCrossToPosition
of QmitkStdMultiWidget. So I can move cross position from my
thread. :)
I found another solution by overriding the mousePressEvent
method of QmitkRenderWindow class and calling it. It move the
mouse. :)
Now I'd like to:
1) call the scroll of the mouse slot, to change the interface
like scroll does.
2) call the slot about the right click whit move of the mouse,
zoom the image like this action does.
3) call the slot about the right scroll of the windows to
change the contrast of the image
4) move the image
5) rotate the image
Ho can I do?
Are there any events I can connect to do 1), 2) and 3)?
I tried to connect on event of QmitkStdMultiWidget, but it
doesn't work.
Which function of mitk does what I need?
I tried also by overriding and
calling resizeEvent, mouseMoveEvent of QmitkRenderWindow
Class, but nothing happens. How can I do?
Thank's a lot for your help.
Bye
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users