Alpinewerk Digital e.U. Owner: Alexander Semerad
registered sole proprietorship
Steckhovengasse 18, 1130 Wien - AT
Tel: +43 (0) 681 20289940
E-Mail: [email protected]
VAT-Nr: ATU75303217
FN: 544875m
Commercial Court Vienna
The concept of signals and slots is a fundamental component of QT's architecture. It is an implementation of the observer pattern, which allows objects to communicate with each other in a loosely coupled manner (without requiring the objects to know anything about each other's implementation). This enables the creation of highly modular and extensible applications.
Signals act as messengers that send out a notification when an event occurs. A signal does not perform any action by itself; instead, it announces that something has occurred.
Slots are essentially observers. A slot is a function that will be called in response to a signal being emitted. Multiple slots can be connected to a single signal.
import weakref, collections
from inspect import ismethod
import collections.abc
class Signal:
def __init__(self):
self._lock = False
self._slots = []
def emit(self, *args, **kwargs):
if self._lock:
return
for ref in self._slots:
if (slot := ref()) is not None:
slot(*args, **kwargs)
def wrap_weakref(self, slot):
return weakref.WeakMethod(slot) if ismethod(slot) else weakref.ref(slot)
def connect(self, slot):
if not isinstance(slot, collections.abc.Callable):
raise ValueError("Argument must be callable")
ref = self.wrap_weakref(slot)
if ref not in self._slots:
self._slots.append(ref)
def disconnect(self, slot):
self._slots = [ref for ref in self._slots if ref() != slot]
def block(self):
self._lock = True
def unblock(self):
self._lock = False
This pattern is particularly useful in graphical user interfaces (GUIs) where user interactions, such as button clicks or menu selections, need to trigger specific actions or updates in other parts of the application. It allows for clear separation of concerns and promotes a event-driven architecture.
A simple example of how to use the Signal & Slot pattern, where when button.click() is called, it emits the clicked signal, which triggers the connected save method of the document, resulting in the output "Document saved". This example demonstrates how this approach allows the button and the document to communicate without direct knowledge of each other. The button emits a signal when it is clicked, and the document responds to that signal by saving itself. This loose coupling makes the code more modular and easier to maintain.
class Button:
clicked = Signal()
def click(self):
self.clicked.emit()
class Document:
def save(self):
print("Document saved")
button = Button()
document = Document()
button.clicked.connect(document.save)
button.click() # Output: Document saved.
Alpinewerk Digital e.U. Owner: Alexander Semerad
registered sole proprietorship
Steckhovengasse 18, 1130 Wien - AT
Tel: +43 (0) 681 20289940
E-Mail: [email protected]
VAT-Nr: ATU75303217
FN: 544875m
Commercial Court Vienna
Welcome to the website www.alpinewerk.com! Please get a picture of how we process your personal data when you visit our website or you are otherwise in a business relationship with us (Art 13, Art 14 GDPR; § 96 Abs 3 TKG – the Austrian Telecommunication Act).
The following data may be processed when you visit our website:
The processing of this data is necessary to manage the security of the operation of the website and to ensure the functionality of the website from a technical point of view. The processing of this data is justified by our legitimate interest in the operation of our website (Art 6 para 1 lit f DSGVO).
For the operation of our website, it may be necessary for us to disclose your data to the following recipients:
Recipients of data | Purpose of data processing | Reasoning for data processing | Location | Third party transfer |
---|---|---|---|---|
Alphabet Inc (Google Analytics) | Statistical evaluations and marketing purposes | Consent (Art 6 Abs 1 lit a GDPR) | USA | Standard contractual clauses (Art 46 Abs 2 lit c DSGVO) |
The above-mentioned data is stored via so-called "cookies". These technical cookies are only used to the extent necessary (§ 96 para 3 TKG). Cookies are text files that are stored on your computer and enable an analysis of the use of the website. They are used to recognise and store temporary data of the homepage visitor. We only use cookies to the extent necessary to communicate with you via the homepage.
These technical cookies are activated as soon as you visit our homepage.
The following cookies are used on our homepage on the basis of our legitimate interest (Art 6 para 1 lit f GDPR):
Name of the cookie | Purpose of the Cookies | Storage duration | Location of recipient |
---|---|---|---|
SESS# | Retains the user's states for all page | Session | USA |
In addition to the "technical cookies" described above, we also use so-called advertising cookies (including "statistical cookies"). These advertising cookies enable us to better understand and evaluate your interests. With the help of the advertising cookies, we can merge your "surfing behaviour" across the boundaries of our website with data from other websites. This is to enable us to better understand the interests of our homepage visitors and to target them more effectively.
We respect that not every visitor to the website wants this. Therefore, we only process your data in the course of advertising cookies if you consent to this (Art 6 para 1 lit a GDPR). You can revoke this consent at any time, whereby the data processing carried out up to the time of revocation remains justified.
These advertising cookies will only be activated once you have consented to them.
Name of the cookie | Purpose of the Cookies | Storage duration | Location of recipient | Purpose of data transfer |
---|---|---|---|---|
_ga (Google Analytics) | Statistical purposes | 2 years | USA | Registers a unique ID that is used to generate statistical data on how the visitor uses the website. |
ga# | Statistical purposes | 2 years | USA | Collects data on how often a user visits a website, as well as data for the first and last visit. |
In the course of our business relationship with customers or suppliers, we process your data on the basis of contractual (processing of the contractual relationship with you, pre-contractual obli-gations, invoicing of services, dispatch of documents, communication for the processing of the contract) and legal obligations (legally required storage within the meaning of § 132 BAO) (Art 6 para 1 lit b and c GDPR) as well as on the basis of our legitimate interests or on the basis of the legitimate interests of third parties (Art 6 para 1 lit f GDPR), namely:
for the purpose of internal administration and management of your business case to the extent necessary (e.g.: Processing your business case, forwarding your business case to various de-partments, filing, archiving purposes, correspondence with you);
for the purpose of direct advertising (e.g.: Mailing, e-mailing, satisfaction surveys, congratulatory letters, statistical evaluations);
We would like to expressly inform you that you can object to the processing of your data for the purpose of direct advertising.
in each case to the extent necessary. The processing of your data serves the purpose of initiating, maintaining and handling our business relations. If you do not provide us with this data, we will not be able to process your business case.
If particularly sensitive data is processed in the course of specific legal disputes, this is done for the purpose of asserting legal claims (Art 9 (2) (f) in conjunction with Art 6 (1) (b) GDPR).
We will only store your data for as long as is necessary for the purposes for which we collected your data. In this context, statutory retention obligations must be taken into account (for example, for reasons of tax law, contracts and other documents from our contractual relationship must generally be retained for a period of seven years (§ 132 BAO)). In justified individual cases, such as for the assertion and defence of legal claims, we may also store your data for up to 30 years after termination of the business relationship.
We store data of interested parties for up to three years from the time of the last contact by the respective person.
In the course of our business relationship, it may be necessary for us to transmit your data to the following recipients:
Recipient | Purposes | Legal justification | Location (country) | Purpose of data transfer |
---|---|---|---|---|
Bank (credit institution) | Payment-services | Contractual obligation (Art 6 Abs 1 lit b | ||
GDPR) | Austria | Within the EAA | ||
Business and tax advisors | Tax advisory | Contractual obligation (Art 6 Abs 1 lit b | ||
GDPR) | Austria | Within the EAA | ||
Attorney at law | Enforcement of claim | Contractual obligation (Art 6 Abs 1 lit b | ||
GDPR) | Austria | Within the EAA |
In the course of a business relationship or the initiation thereof, it is naturally necessary to conduct research on the business partner. This is done exclusively to the extent necessary for this purpose. In this context, data may be retrieved and processed from the following sources:
Source | Publicly available | Data subjects | Purpose/Reasoning |
---|---|---|---|
Internet-Research | Ja | Contact details | Contact for business purposes |
No automated decision-making or profiling takes place in our company.
We would like to inform you that, provided the legal requirements are met, you have the right to request information about your personal data:
If we process your data on the basis of your consent, you have the right to revoke this consent at any time by email. This does not affect the lawfulness of the data processing carried out up to this point (Art 7 (3) DSGVO).
If, contrary to expectations, there is a breach of your right to lawful processing of your data, please contact us by post or e-mail. We will endeavour to deal with your concern promptly. However, you also have the right to lodge a complaint with the supervisory authority for data protection matters responsible for you.
The address of the Austrian data protection authority is:
Austrian Data Protection Authority Barichgasse 40-42, 1030 Vienna
If you have any further questions about the processing of your data, please do not hesitate to contact our data protection coordinator using the contact details below.
Controller pursuant to Art 4 Z 7 GDPR:
Alpinewerk Digital e.U. Alexander Semerad
Steckhovengasse 18, 1130 Wien - AT
[email protected] +4368120289940
FN 544875m
Author: Attorney Dr. Tobias Tretzmüller, LL.M (IT-LAW); https://www.digital-recht.at/