* @brief Checks whether the introduced data is valid or not. Used by DatasetMetadataManagerDialog. */
| 293 | * @brief Checks whether the introduced data is valid or not. Used by DatasetMetadataManagerDialog. |
| 294 | */ |
| 295 | bool DatasetMetadataManagerWidget::checkDataValidity() { |
| 296 | const bool fileNameOK = checkFileName(); |
| 297 | const bool urlOk = urlExists(); |
| 298 | const bool longNameOk = checkDatasetName(); |
| 299 | const bool descriptionOk = checkDescription(); |
| 300 | const bool categoryOk = checkCategories(ui.cbCategory); |
| 301 | const bool subcategoryOk = checkCategories(ui.cbSubcategory); |
| 302 | const bool collectionOk = checkCategories(ui.cbCollection); |
| 303 | |
| 304 | enableDatasetSettings(categoryOk && subcategoryOk && collectionOk); |
| 305 | |
| 306 | return fileNameOK && urlOk && longNameOk && descriptionOk && subcategoryOk && categoryOk && collectionOk; |
| 307 | } |
| 308 | |
| 309 | /** |
| 310 | * @brief Updates content of cbCategory based on current collection. |