当前位置: 首页>>代码示例>>C++>>正文


C++ PageItem_Table::activeCell方法代码示例

本文整理汇总了C++中PageItem_Table::activeCell方法的典型用法代码示例。如果您正苦于以下问题:C++ PageItem_Table::activeCell方法的具体用法?C++ PageItem_Table::activeCell怎么用?C++ PageItem_Table::activeCell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PageItem_Table的用法示例。


在下文中一共展示了PageItem_Table::activeCell方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: updateBorders

void PropertiesPalette_Table::updateBorders()
{
	if (!m_doc || !m_item || !m_item->isTable())
		return;

	PageItem_Table* table = m_item->asTable();
	TableSideSelector::Sides selectedSides = sideSelector->selection();

	m_doc->dontResize = true;
	if (m_doc->appMode != modeEditTable)
	{
		if (selectedSides & TableSideSelector::Left)
			table->setLeftBorder(m_currentBorder);
		if (selectedSides & TableSideSelector::Right)
			table->setRightBorder(m_currentBorder);
		if (selectedSides & TableSideSelector::Top)
			table->setTopBorder(m_currentBorder);
		if (selectedSides & TableSideSelector::Bottom)
			table->setBottomBorder(m_currentBorder);
	}
	else
	{
		TableCell cell = table->activeCell();
		if (selectedSides & TableSideSelector::Left)
			cell.setLeftBorder(m_currentBorder);
		if (selectedSides & TableSideSelector::Right)
			cell.setRightBorder(m_currentBorder);
		if (selectedSides & TableSideSelector::Top)
			cell.setTopBorder(m_currentBorder);
		if (selectedSides & TableSideSelector::Bottom)
			cell.setBottomBorder(m_currentBorder);
	}
	table->adjustTable();
	table->update();
}
开发者ID:,项目名称:,代码行数:35,代码来源:

示例2: updateStyleControls

void PropertiesPalette_Table::updateStyleControls()
{
	if (m_item && m_item->isTable())
	{
		PageItem_Table* table = m_item->asTable();
		tableStyleCombo->setEnabled(true);
		cellStyleCombo->setEnabled(true);
		buttonClearTableStyle->setEnabled(true);
		buttonClearCellStyle->setEnabled(true);
		// Fill in values.
		if (m_doc->appMode != modeEditTable)
		{
			displayTableStyle(table->style());
			cellStyleCombo->setEnabled(false);
			buttonClearCellStyle->setEnabled(false);
		}
		else
		{
//			displayTableStyle(table->style());
			displayCellStyle(table->activeCell().style());
		}
	}
	else
	{
		tableStyleCombo->setEnabled(false);
		cellStyleCombo->setEnabled(false);
		buttonClearTableStyle->setEnabled(false);
		buttonClearCellStyle->setEnabled(false);
	}
}
开发者ID:,项目名称:,代码行数:30,代码来源:

示例3: on_buttonClearCellStyle_clicked

void PropertiesPalette_Table::on_buttonClearCellStyle_clicked()
{
	if (!m_item || !m_item->isTable())
		return;
	m_doc->dontResize = true;
	PageItem_Table* table = m_item->asTable();
	table->activeCell().unsetDirectFormatting();
	table->adjustTable();
	table->update();
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例4: on_fillShade_valueChanged

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();
}
开发者ID:,项目名称:,代码行数:22,代码来源:

示例5: on_fillColor_activated

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();
}
开发者ID:,项目名称:,代码行数:22,代码来源:

示例6: updateFillControls

void PropertiesPalette_Table::updateFillControls()
{
	if (m_item && m_item->isTable())
	{
		PageItem_Table* table = m_item->asTable();
		// Enable fill editing controls.
		fillColor->setEnabled(true);
		fillColorLabel->setEnabled(true);
		fillShade->setEnabled(true);
		fillShadeLabel->setEnabled(true);
		// Fill in values.
		if (m_doc->appMode != modeEditTable)
		{
			QString color = table->fillColor();
			if (color == CommonStrings::None)
				color = CommonStrings::tr_NoneColor;
			setCurrentComboItem(fillColor, color);
			fillShade->setValue(table->fillShade());
		}
		else
		{
			TableCell cell = table->activeCell();
			QString color = cell.fillColor();
			if (color == CommonStrings::None)
				color = CommonStrings::tr_NoneColor;
			setCurrentComboItem(fillColor, color);
			fillShade->setValue(cell.fillShade());
		}
	}
	else
	{
		// Disable fill editing controls.
		fillColor->setEnabled(false);
		fillColorLabel->setEnabled(false);
		fillShade->setEnabled(false);
		fillShadeLabel->setEnabled(false);
	}
}
开发者ID:,项目名称:,代码行数:38,代码来源:


注:本文中的PageItem_Table::activeCell方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。