Changeset 13826
- Timestamp:
- 05/23/12 10:42:46 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/gui/FactGui.h
r13825 r13826 292 292 DimNetwork::AddServer(s); 293 293 294 const State state = GetState(s, GetCurrentState(s)); 295 294 296 QApplication::postEvent(this, 295 new FunctionEvent(bind(&FactGui::handleAddServer, this, s )));297 new FunctionEvent(bind(&FactGui::handleAddServer, this, s, state))); 296 298 } 297 299 298 300 void AddService(const string &server, const string &service, const string &fmt, bool iscmd) 299 301 { 302 const vector<Description> v = GetDescription(server, service); 303 300 304 QApplication::postEvent(this, 301 new FunctionEvent(bind(&FactGui::handleAddService, this, server, service, fmt, iscmd )));305 new FunctionEvent(bind(&FactGui::handleAddService, this, server, service, fmt, iscmd, v))); 302 306 } 303 307 … … 320 324 void AddDescription(const string &server, const string &service, const vector<Description> &vec) 321 325 { 326 const bool iscmd = IsCommand(server, service)==true; 327 322 328 QApplication::postEvent(this, 323 new FunctionEvent(bind(&FactGui::handleAddDescription, this, server, service, vec )));329 new FunctionEvent(bind(&FactGui::handleAddDescription, this, server, service, vec, iscmd))); 324 330 } 325 331 326 332 // ====================================================================== 327 333 328 void handleAddServer(const string &server) 329 { 330 const State s = GetState(server, GetCurrentState(server)); 331 handleStateChanged(Time(), server, s); 332 } 333 334 void handleAddService(const string &server, const string &service, const string &/*fmt*/, bool iscmd) 334 void handleAddServer(const string &server, const State &state) 335 { 336 handleStateChanged(Time(), server, state); 337 } 338 339 void handleAddService(const string &server, const string &service, const string &/*fmt*/, bool iscmd, const vector<Description> &vec) 335 340 { 336 341 QStandardItem *item = AddServiceItem(server, service, iscmd); 337 const vector<Description> v = GetDescription(server, service); 338 AddDescription(item, v); 342 AddDescription(item, vec); 339 343 } 340 344 … … 382 386 } 383 387 384 void handleAddDescription(const string &server, const string &service, const vector<Description> &vec) 385 { 386 const bool iscmd = IsCommand(server, service)==true; 387 388 void handleAddDescription(const string &server, const string &service, const vector<Description> &vec, bool iscmd) 389 { 388 390 QStandardItem *item = AddServiceItem(server, service, iscmd); 389 391 AddDescription(item, vec);
Note:
See TracChangeset
for help on using the changeset viewer.