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


C++ TXsheet::clearCells方法代码示例

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


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

示例1: redo

  void redo() const override {
    int ca       = m_cellsMover.getStartPos().x;
    int cb       = m_cellsMover.getPos().x;
    int colCount = m_cellsMover.getColumnCount();

    if (ca != cb) {
      if (m_cellsMover.m_uffa & 1) m_cellsMover.emptyColumns(ca);
      if (m_cellsMover.m_uffa & 2) m_cellsMover.restoreColumns(cb);
    }

    if ((m_cellsMover.getQualifiers() & CellsMover::eCopyCells) == 0 &&
        (m_cellsMover.getQualifiers() & CellsMover::eOverwriteCells) == 0)
      m_cellsMover.undoMoveCells(m_cellsMover.getStartPos());
    if (m_cellsMover.getQualifiers() &
        CellsMover::eOverwriteCells) {  // rimuove le celle vecchie
      int c, ra = m_cellsMover.getStartPos().y,
             rowCount = m_cellsMover.getRowCount();
      TXsheet *xsh    = TApp::instance()->getCurrentXsheet()->getXsheet();
      for (c = ca; c < ca + colCount; c++) xsh->clearCells(ra, c, rowCount);
    }
    m_cellsMover.moveCells();

    TApp::instance()->getCurrentXsheet()->getXsheet()->updateFrameCount();
    TApp::instance()->getCurrentXsheet()->notifyXsheetChanged();
    if (m_cellsMover.getColumnTypeFromCell(0) == TXshColumn::eSoundType)
      TApp::instance()->getCurrentXsheet()->notifyXsheetSoundChanged();
  }
开发者ID:SaierMe,项目名称:opentoonz,代码行数:27,代码来源:xshcellmover.cpp

示例2: redo

 void redo() const override {
   TXsheet *xsh = TApp::instance()->getCurrentXsheet()->getXsheet();
   int r0, r1;
   xsh->getCellRange(m_col, r0, r1);
   if (r0 <= r1) {
     xsh->clearCells(r0, m_col, r1 - r0 + 1);
     xsh->updateFrameCount();
     TApp::instance()->getCurrentXsheet()->notifyXsheetChanged();
   }
 }
开发者ID:opentoonz,项目名称:opentoonz,代码行数:10,代码来源:columncommand.cpp

示例3: undoMoveCells

void CellsMover::undoMoveCells(const TPoint &pos) const {
  TXsheet *xsh = getXsheet();
  int r        = pos.y;
  int c        = pos.x;
  if (m_qualifiers & eInsertCells) {
    for (int i = 0; i < m_colCount; i++) xsh->removeCells(r, c + i, m_rowCount);
  } else {
    for (int i = 0; i < m_colCount; i++) xsh->clearCells(r, c + i, m_rowCount);
    if (m_qualifiers & eOverwriteCells) setCells(m_oldCells, r, c);
  }
}
开发者ID:SaierMe,项目名称:opentoonz,代码行数:11,代码来源:xshcellmover.cpp

示例4: undo

 void undo() const override {
   TXsheet *xsh = TApp::instance()->getCurrentXsheet()->getXsheet();
   int r0, r1;
   xsh->getCellRange(m_index, r0, r1);
   assert(r0 <= r1);
   if (r0 > r1) return;
   TXshCell cell = xsh->getCell(r0, m_index);
   assert(!cell.isEmpty());
   assert(cell.m_level->getChildLevel());
   xsh->clearCells(r0, m_index, r1 - r0 + 1);
   for (int i = 0; i < (int)m_oldFrames.size(); i++) {
     TFrameId fid = m_oldFrames[i];
     if (fid != TFrameId::EMPTY_FRAME) {
       cell.m_frameId = fid;
       xsh->setCell(m_r0 + i, m_index, cell);
     }
   }
   TApp::instance()->getCurrentXsheet()->notifyXsheetChanged();
 }
开发者ID:opentoonz,项目名称:opentoonz,代码行数:19,代码来源:columncommand.cpp


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