Implement disconnect function for Python callback.
Reviewed by Hugo Parente <hugo.lima@openbossa.org>
This commit is contained in:
parent
0d6a8f3978
commit
359c973b42
8 changed files with 175 additions and 14 deletions
|
|
@ -44,6 +44,8 @@
|
|||
namespace PySide
|
||||
{
|
||||
|
||||
class DynamicSlotData;
|
||||
|
||||
class GlobalReceiver : public QObject
|
||||
{
|
||||
public:
|
||||
|
|
@ -53,10 +55,12 @@ public:
|
|||
const QMetaObject* metaObject() const;
|
||||
void addSlot(const char* slot, PyObject* callback);
|
||||
void removeSlot(int slotId);
|
||||
void connectNotify(int slotId);
|
||||
void disconnectNotify(int slotId);
|
||||
private:
|
||||
DynamicQMetaObject m_metaObject;
|
||||
QHash<int, PyObject* > m_slotReceivers;
|
||||
QSet<int> m_shortCircuitSlots;
|
||||
QHash<int, DynamicSlotData* > m_slotReceivers;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue