mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
refactor: Improve interface
This commit is contained in:
parent
ff2fc18be1
commit
87baf0e690
|
@ -47,7 +47,7 @@ public:
|
|||
DECLARE_SIGNAL(noteChanged, const QString&);
|
||||
|
||||
DECLARE_SIGNAL(autoAcceptDirChanged, const QString&);
|
||||
DECLARE_SIGNAL(autoAcceptCallChanged, AutoAcceptCallFlags);
|
||||
DECLARE_SIGNAL(autoAcceptCallChanged, IFriendSettings::AutoAcceptCallFlags);
|
||||
DECLARE_SIGNAL(autoGroupInviteChanged, bool);
|
||||
};
|
||||
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
* SIGNAL_IMPL(Example, valueChanged, int value);
|
||||
* };
|
||||
*/
|
||||
#define DECLARE_SIGNAL(name, ...) \
|
||||
using Slot_##name = std::function<void (__VA_ARGS__)>; \
|
||||
virtual void connectTo_##name(Slot_##name slot) const = 0
|
||||
|
||||
/**
|
||||
* @def DECLARE_SIGNAL
|
||||
|
|
Loading…
Reference in New Issue
Block a user