void PropertiesPalette_Table::on_fillShade_valueChanged(int shade) { if (!m_item || !m_item->isTable()) return; QString color = fillColor->currentColor(); if (color == CommonStrings::tr_NoneColor) color = CommonStrings::None; PageItem_Table* table = m_item->asTable(); if (m_doc->appMode != modeEditTable) { table->setFillColor(color); table->setFillShade(shade); } else { TableCell cell = table->activeCell(); cell.setFillColor(color); cell.setFillShade(shade); } table->update(); }
void PropertiesPalette_Table::on_fillColor_activated(const QString& colorName) { if (!m_item || !m_item->isTable()) return; QString color = colorName; if (colorName == CommonStrings::tr_NoneColor) color = CommonStrings::None; PageItem_Table* table = m_item->asTable(); if (m_doc->appMode != modeEditTable) { table->setFillColor(color); table->setFillShade(fillShade->value()); } else { TableCell cell = table->activeCell(); cell.setFillColor(color); cell.setFillShade(fillShade->value()); } table->update(); }