//////////////////////////////////////////////////////////////////////// NetworHandler::NetworHandler(QObject* parent) : QObject(parent), { // Making use of pointers to QNetworkConfigurationManager in order to get Network state changes mNetworkConfigurationManager = new QNetworkConfigurationManager(this); // Connects the slot for configurationAdded() signal which gets called when any new Network interface is added connect(mNetworkConfigurationManager , SIGNAL(configurationAdded(QNetworkConfiguration)) , this , SLOT(configurationAddedSlot(QNetworkConfiguration))); // Connects the slot for configurationRemoved() signal which gets called when any existing Network interface is removed connect(mNetworkConfigurationManager , SIGNAL(configurationRemoved(QNetworkConfiguration)) , this , SLOT(configurationRemovedSlot(QNetworkConfiguration))); //Connects the slot for configurationChanged() signal which gets called when any existing interface state changes connect(mNetworkConfigurationManager , SIGNAL(configurationChanged(QNetworkConfiguration)) , this , SLOT(configurationChangedSlot(QNetworkConfiguration))); } //////////////////////////////////////////////////////////////////////// /// Destructor //////////////////////////////////////////////////////////////////////// NetworHandler::~NetworHandler(void) { mNetworkConfigurationManager=0; }