//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimPlotCurve::updateUiIconFromPlotSymbol() { if (m_pointSymbol() != RiuQwtSymbol::NoSymbol) { QColor curveColor(m_curveColor.value().rByte(), m_curveColor.value().gByte(), m_curveColor.value().bByte()); QSizeF iconSize(24, 24); QwtGraphic graphic = m_qwtPlotCurve->legendIcon(0, iconSize); QPixmap pixmap = graphic.toPixmap(); setUiIcon(QIcon(pixmap)); } }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimSummaryCaseCollection::updateIcon() { if (m_isEnsemble) setUiIcon(QIcon(":/SummaryEnsemble16x16.png")); else setUiIcon(QIcon(":/SummaryGroup16x16.png")); }
//-------------------------------------------------------------------------------------------------- /// //-------------------------------------------------------------------------------------------------- void RimGridCollection::syncFromMainEclipseGrid() { auto mainGrid = this->mainEclipseGrid(); if (mainGrid) { m_mainGrid->setName("Main Grid"); m_mainGrid->setEclipseGridIndex(0); auto allTemporaryGrids = m_temporaryLgrs->gridInfos(); auto allPersistentGrids = m_persistentLgrs->gridInfos(); size_t gridCount = mainGrid->gridCount(); for (size_t i = 1; i < gridCount; i++) { auto grid = mainGrid->gridByIndex(i); QString gridName = QString::fromStdString(grid->gridName()); size_t gridIndex = grid->gridIndex(); if (grid->isTempGrid()) { if (m_temporaryLgrs->containsGrid(gridName)) { removeGridInfo(gridName, allTemporaryGrids); } else { auto gridInfo = new RimGridInfo(); gridInfo->setName(gridName); gridInfo->setEclipseGridIndex((int)gridIndex); gridInfo->setUiIcon(QIcon(":/TempLGR16x16.png")); m_temporaryLgrs->addGridInfo(gridInfo); } } else { if (m_persistentLgrs->containsGrid(gridName)) { removeGridInfo(gridName, allPersistentGrids); } else { auto gridInfo = new RimGridInfo(); gridInfo->setName(gridName); gridInfo->setEclipseGridIndex((int)gridIndex); gridInfo->setUiIcon(QIcon(":/LGR16x16.png")); m_persistentLgrs->addGridInfo(gridInfo); } } } for (const auto& grid : allPersistentGrids) { auto gridName = grid->name(); m_persistentLgrs->deleteGridInfo(gridName); } for (const auto& grid : allTemporaryGrids) { auto gridName = grid->name(); m_temporaryLgrs->deleteGridInfo(gridName); } } updateConnectedEditors(); }