ArgoUML signal in activity diagram - concurrency

I'm working on a activity diagram that shows model/view transitions. I've done a lot of class diagrams with ArgoUML and want to do this with ArgoUML, too.
For a user input I would usually use an input signal. In ArgoUML 0.34, I can not figure out how signals work. There is no input/output signal component.
How can I show listener events like user input or a model event that leads to an UI update?
It should look like that:

There are a number of elements which are under pulldown menus instead of being directly on the tool bar. The pulldown to the left of the Guard element on the toolbar has all the Events on it. The default tool is the Call Event, but there's a Signal Event underneath as well. Is that what you're looking for?

I have the same question. I've been unable to figure out the correct procedure to model input/output signals in ArgoUML.
I've copied the layout from the original post but wasn't able to change the shape of the symbols:

Related

AgGrid Detect changing on columns/filters/sortings events

I'm using ag-grid and I'd like to save the layout/state of the user. Pretty much something like this
This solution forces the user to click on the button to save the preferences ("Save state"). There is some other way/event to detect that the user changed the state of the table (in order, to me to save and avoid to force the user to click on a button for that)?
I was hopping to find some method here but i didn't..
I initially had code that listened to all of the applicable events from the grid, but ultimately, I found it easier to just save the entire grid state in the component's onDestroy method, regardless of whether anything has actually changed.
Found my answer here.
All the events are here but i prefer to add a global event:
addGlobalListener(listener) Add an event listener for all event types coming from the grid.)
Source: AgGrid javascript grid api

How does View get updated behind the scenes?

So when I use a setText() on a QLabel for example, Qt automatically updates the view/gui for me and the new text is shown, but what happens behind the scenes? Is there an update function that gets called automatically when using functions like setText()?
Thanks!!
You should check the basic documentation in this link.
The internal system is a little bit more complex but in general, it follows the observer pattern. This mechanism allows the detection of a user action or changing state, and respond to this action.
Low-level interactions, like refreshing the screen are implemented via the Event System
In Qt, events are objects, derived from the abstract QEvent class, that represent things that have happened either within an application or as a result of outside activity that the application needs to know about. Events can be received and handled by any instance of a QObject subclass, but they are especially relevant to widgets. This document describes how events are delivered and handled in a typical application.
So, regarding the display process, there is a dedicated event. A QWidget object handles/subscribe to a PaintEvent, see QWidget::paintEvent.
This event handler can be reimplemented in a subclass to receive paint events passed in event. A paint event is a request to repaint all or part of a widget.
When you call, QLineEdit::setText(), the widget will be repainted the next time a display event is triggered, based in the OS configuration, refresh rate, etc.
For high-level interactions, Qt uses a similar pattern based in the signal/slot mechanism:
Observer pattern is used everywhere in GUI applications and often leads to some boilerplate code. Qt was created with the idea of removing this boilerplate code and providing a nice and clean syntax, and the signal and slots mechanism is the answer.

Custom events in Tkinter

I am new in Tkinter.
And I want to know is there any way to catch some custom events for widgets,
for example catch on_packed event after widget.pack() or on_paint event for canvas widget after drawing some graphics on canvas, etc?
The events you describe don't exist. You can use the event_generate method to create your own custom events if you wish. With that you could create your own widget classes that emit any custom events you want.
Custom events must always be defined with double angle brackets. For example, the following line of code will create an event named <<OnPaint>>:
the_canvas.event_generate("<<OnPaint>>")
You can then bind to that event just like you do any other event:
the_canvas.bind("<<OnPaint>>", do_on_paint)
In the specific case of on_pack, there are events that probably do what you want at a more abstract level. For example, there are events that fire when a widget becomes visible (<Visibility>), changes size (<Configure>), and a few others.
The official tcl/tk documentation lists supported events. See the bind man page.
The list of possible event types is far more extensive than the few you typically see used in example, such as Key, Button, Motion, and Mousewheel. Here is a partial list. It appears that packing should generate a Map event.

Is it possible to get information on the control on which an event was issued in Qt?

I am trying to create one event handler for button clicks and connect that to multiple buttons (creating a simple calculator where pressing each number adds its text to the lineEdit).
In C# we would use the sender object which was passed as a parameter and then cast it back to Button and get its Text or other needed property and go on.
I am new to Qt, Do we have such a thing or a similar approach in Qt? Since I couldn't get it out of the signal/slot method of Qt.
On the QObject / QWidget that receives the signal, call this->sender() (QObject::sender()), and cast it with dynamic_cast<MyWidgetType*>(...)
You can find some good examples here for linking back to the issuer of an event.
http://doc.qt.digia.com/qq/qq10-signalmapper.html
They give you different examples for
The sender() Approach (like Jamin Grey's approach below)
The Subclass Approach
The Signal Mapper Approach

Best approach to retrieve values from a QML Modal dialog

In my QT C++ application i call a QML ModalDialog with 2 buttons (OK/CANCEL), which displays correctly on screen and so, no problem there.
However i'm struggling to find a way to retrieve in my QT C++ application which button was pressed.
I'm unable to somehow "freeze" when i call the QML ModalDialog, to wait there until the user press OK Button or Cancel Button
What i see is that application calls the QML ModalDialog, and immediately exit that part and continue.
QMetaObject::invokeMethod can call a QML function and have a return value, but it just doesn't wait for the user press one of the buttons, it just exits immediately, so no use.
I want to use this QML ModalDialog in several places of my application (the QML modal
dialog can have different text passed from my QT C++ application), so i was looking to a generic solution for this.
Basically and generic speaking i'm looking for something like this:
C/C++
return_value = QML_Modal_Dialog(....)
Can someone point me in the right direction? Thanks
QML modal dialog comes with two signals 'accepted' and 'cancelled'. If you provide handlers for these two signals in your code, you would be able to know which button got pressed.
You can refer to the below for reference.
Modal Dialog Ref 1
Modal Dialog Ref 2
Hope this helps!
Despite that the question is too old maybe my answer will help someone else.
I faced the same problem with Dialogs in QML. You think about it in imperative way, while QML is a declarative language that doesn't allow you to stop the flow of program and wait for the user's choice.
As Purnima suggested you should use signal handlers (you can find the list of them for Qt 5.6 here). Move some of your app's logic to the signal
handlers.
For example - if your function a() is executed based on the user's choice in dialog you should instead call it inside the dialog in its signal handlers (e.g. onAccepted or onRejected) with two different parameters based on the type of signal handler. Think about it as splitting the flow in two streams.