e.g. use QString in UIs, but std:string in other parts
Description
Description
Comment Actions
Wink Signals: https://miguelmartin75.wordpress.com/2013/02/03/fast-c-template-event-system-queues-and-immediate-events/
Source: https://github.com/miguelmartin75/Wink-Signals
Fork (seems a little bit newer, extended a bit more): https://github.com/tankery/Wink-Signals
Currently trying to explore a way to use a central point to declare such things for decoupling, like Defines.h
template<class T> using Slot = wink::slot<T>; template<class T> using Signal = wink::signal<T>; class Manager { public: Signal<Slot<void()>> TestSignal; void FireSignal() { TestSignal.emit(); } }; class Client { public: Client(Manager* manager) { manager->TestSignal.connect(this, &Client::SignalHandler); } private: void SignalHandler() { std::cout << "SignalHandler" << std::endl; } }; Usage: Manager manager; Client client(&manager); manager.FireSignal();
Still not succeeded (at least atm) to decouple signals/slots provided by Wink Signals to be able to change to another lib or to own implementation later.