scgrant327
22nd June 2017, 20:03
I have three classes.
Class A: websocket connection to my server.
Class B: QTimer that generates Demo data to hand off to Class A for posting on to my server and CLASS C for updating the QML UI.
Class C: generic functions used throughout the application. has Q_PROPERTY entries for updating the QML UI. data warehouse for all Demo data generated by Class B.
Now, say I want to emit a signal in Class B that is connected to a slot in Class A that initiates the connection to my server. No issue. However, once the connection is made, I want Class A to emit signal that is connected to a slot in Class B that starts the QTimer for Demo data creation. Of course, once the Demo data is created, Class B then emits a signal connected to Class C that updates a graph on the UI.
My issue is how do I set up the CPP & H files so that Class A can see all the slots in Class C, and Class C can see all the slots in Class A? Basically, how can each class see the slots of ALL other classes so they can be used?
--Sam
Class A: websocket connection to my server.
Class B: QTimer that generates Demo data to hand off to Class A for posting on to my server and CLASS C for updating the QML UI.
Class C: generic functions used throughout the application. has Q_PROPERTY entries for updating the QML UI. data warehouse for all Demo data generated by Class B.
Now, say I want to emit a signal in Class B that is connected to a slot in Class A that initiates the connection to my server. No issue. However, once the connection is made, I want Class A to emit signal that is connected to a slot in Class B that starts the QTimer for Demo data creation. Of course, once the Demo data is created, Class B then emits a signal connected to Class C that updates a graph on the UI.
My issue is how do I set up the CPP & H files so that Class A can see all the slots in Class C, and Class C can see all the slots in Class A? Basically, how can each class see the slots of ALL other classes so they can be used?
--Sam