|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<Qt.ConnectionType>
com.trolltech.qt.core.Qt.ConnectionType
public static enum Qt.ConnectionType
This enum describes the types of connection that can be used between signals and slots. In particular, it determines whether a particular signal is delivered to a slot immediately or queued for delivery at a later time.
With queued connections, the parameters must be of types that are known to Qt's meta-object system, because Qt needs to copy the arguments to store them in an event behind the scenes. If you try to use a queued connection and get the error message
QObject::connect: Cannot queue arguments of type 'MyType'
call qRegisterMetaType() to register the data type before you establish the connection.
Enum Constant Summary | |
---|---|
AutoCompatConnection
Internal. |
|
AutoConnection
If the signal is emitted from the thread in which the receiving object lives, the slot is invoked directly, as with Qt::DirectConnection; otherwise the signal is queued, as with Qt::QueuedConnection. |
|
BlockingQueuedConnection
Same as QueuedConnection, except that the current thread blocks until the slot has been delivered. |
|
DirectConnection
When emitted, the signal is immediately delivered to the slot. |
|
QueuedConnection
When emitted, the signal is queued until the event loop is able to deliver it to the slot. |
Method Summary | |
---|---|
static Qt.ConnectionType |
resolve(int value)
|
int |
value()
This function should return an integer value for the enum values of the enumeration that implements this interface. |
static Qt.ConnectionType |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Qt.ConnectionType[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final Qt.ConnectionType AutoConnection
If the signal is emitted from the thread in which the receiving object lives, the slot is invoked directly, as with Qt::DirectConnection; otherwise the signal is queued, as with Qt::QueuedConnection.
public static final Qt.ConnectionType DirectConnection
When emitted, the signal is immediately delivered to the slot.
public static final Qt.ConnectionType QueuedConnection
When emitted, the signal is queued until the event loop is able to deliver it to the slot.
public static final Qt.ConnectionType AutoCompatConnection
public static final Qt.ConnectionType BlockingQueuedConnection
Same as QueuedConnection, except that the current thread blocks until the slot has been delivered. This connection type should only be used for receivers in a different thread. Note that misuse of this type can lead to dead locks in your application.
Method Detail |
---|
public static Qt.ConnectionType[] values()
for (Qt.ConnectionType c : Qt.ConnectionType.values()) System.out.println(c);
public static Qt.ConnectionType valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic int value()
QtEnumerator
value
in interface QtEnumerator
public static Qt.ConnectionType resolve(int value)
|
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |