int clientIdExistsInGroup(std::string group_id, std::string client_id){ if(!groupExists(group_id)) // check if parameters are valid return -1; // group doesn't exist if(groups[group_id]["oClients"].find(client_id) != groups[group_id]["oClients"].end()) return 1;// client found return 0; // client not found }
bool QgsAppLegendInterface::isGroupVisible( int groupIndex ) { if ( !groupExists( groupIndex ) ) { return false; } return ( Qt::Checked == mLegend->topLevelItem( groupIndex )->checkState( 0 ) ); }
void QgsAppLegendInterface::setGroupVisible( int groupIndex, bool visible ) { if ( !groupExists( groupIndex ) ) { return; } Qt::CheckState state = visible ? Qt::Checked : Qt::Unchecked; mLegend->topLevelItem( groupIndex )->setCheckState( 0, state ); }