本文整理汇总了C++中TXshColumn::getColumnType方法的典型用法代码示例。如果您正苦于以下问题:C++ TXshColumn::getColumnType方法的具体用法?C++ TXshColumn::getColumnType怎么用?C++ TXshColumn::getColumnType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TXshColumn
的用法示例。
在下文中一共展示了TXshColumn::getColumnType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: canMoveColumns
bool LevelMoverTool::canMoveColumns(const TPoint &pos) {
TXsheet *xsh = getViewer()->getXsheet();
if (pos.x < 0) return false;
if (pos.x != m_lastPos.x) {
int count = 0;
// controlla il tipo
for (int i = 0; i < m_range.lx; i++) {
int srcIndex = m_lastPos.x + i;
int dstIndex = pos.x + i;
TXshColumn *srcColumn = xsh->getColumn(srcIndex);
if (srcColumn && srcColumn->isLocked()) continue;
TXshColumn *dstColumn = xsh->getColumn(dstIndex);
TXshColumn::ColumnType srcType = TXshColumn::eLevelType;
if (srcColumn) srcType = srcColumn->getColumnType();
if (srcType == TXshColumn::eZeraryFxType) return false;
/*
qDebug() << "check: " << srcIndex << ":" <<
(srcColumn ? QString::number(srcType) : "empty") <<
" => " << dstIndex << ":" <<
(dstColumn ? QString::number(dstColumn->getColumnType()) : "empty");
*/
if (dstColumn && !dstColumn->isEmpty() &&
dstColumn->getColumnType() != srcType) {
return false;
}
if (!dstColumn || dstColumn->isLocked() == false) {
count++;
}
}
if (count == 0) return false;
}
return true;
}
示例2: canMoveCells
bool CellsMover::canMoveCells(const TPoint &pos) {
TXsheet *xsh = getXsheet();
if (pos.x < 0) return false;
if (pos.x != m_startPos.x) {
int count = 0;
// controlla il tipo
int i = 0;
while (i < m_rowCount * m_colCount) {
TXshColumn::ColumnType srcType = getColumnTypeFromCell(i);
int dstIndex = pos.x + i;
TXshColumn *dstColumn = xsh->getColumn(dstIndex);
if (srcType == TXshColumn::eZeraryFxType) return false;
if (dstColumn && !dstColumn->isEmpty() &&
dstColumn->getColumnType() != srcType)
return false;
if (!dstColumn || dstColumn->isLocked() == false) count++;
i += m_rowCount;
}
if (count == 0) return false;
}
if ((m_qualifiers & CellsMover::eInsertCells) ||
(m_qualifiers & CellsMover::eOverwriteCells))
return true;
int count = 0;
for (int i = 0; i < m_colCount; i++) {
for (int j = 0; j < m_rowCount; j++) {
if (!xsh->getCell(pos.y + j, pos.x + i).isEmpty()) return false;
count++;
}
}
if (count == 0) return false;
return true;
}
示例3: isMeshDeformed
static inline bool isMeshDeformed(TXsheet *xsh, TStageObject *obj,
const ImagePainter::VisualSettings *vs) {
const TStageObjectId &parentId = obj->getParent();
if (parentId.isColumn() && obj->getParentHandle()[0] != 'H') {
TStageObject *parentObj = xsh->getStageObject(parentId);
if (!parentObj->getPlasticSkeletonDeformation()) return false;
TXshColumn *parentCol = xsh->getColumn(parentId.getIndex());
return (parentCol->getColumnType() == TXshColumn::eMeshType) &&
(parentCol != vs->m_plasticVisualSettings.m_showOriginalColumn);
}
return false;
}