Esempio n. 1
0
void Lvk::FE::ChatHistoryWidget::removeAllWithDialog()
{
    QString title = tr("Remove conversation");
    QString text  = tr("Are you sure you want to remove all conversations?");

    if (askConfirmation(title, text)) {
        clear();
        emit removedAll();
    }
}
Esempio n. 2
0
void QgsMapLayerRegistry::removeAllMapLayers()
{
  // moved before physically removing the layers
  emit removedAll();

  // now let all canvas observers know to clear themselves,
  // and then consequently any of their map legends
  while ( mMapLayers.size() > 0 )
  {
    QString id = mMapLayers.begin().key();
    emit layerWillBeRemoved( id );
    delete mMapLayers[ id ]; // delete the map layer
    mMapLayers.remove( id );
  }

  mMapLayers.clear();
} // QgsMapLayerRegistry::removeAllMapLayers()