本文整理汇总了C++中SimpleState::getInt方法的典型用法代码示例。如果您正苦于以下问题:C++ SimpleState::getInt方法的具体用法?C++ SimpleState::getInt怎么用?C++ SimpleState::getInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleState
的用法示例。
在下文中一共展示了SimpleState::getInt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: restore
void ScPage::restore(UndoState* state, bool isUndo)
{
SimpleState* ss = dynamic_cast<SimpleState*>(state);
if (ss)
{
// int stateCode = ss->transactionCode;
if (ss->contains("ADD_V"))
{
double position = ss->getDouble("ADD_V");
if (isUndo)
guides.deleteVertical(position, GuideManagerCore::Standard);//removeXGuide(position);
else
guides.addVertical(position, GuideManagerCore::Standard);//addXGuide(position);
m_Doc->scMW()->guidePalette->setupGui();
}
else if (ss->contains("ADD_H"))
{
double position = ss->getDouble("ADD_H");
if (isUndo)
guides.deleteHorizontal(position, GuideManagerCore::Standard);//removeYGuide(position);
else
guides.addHorizontal(position, GuideManagerCore::Standard);//addYGuide(position);
m_Doc->scMW()->guidePalette->setupGui();
}
else if (ss->contains("REMOVE_V"))
{
double position = ss->getDouble("REMOVE_V");
if (isUndo)
guides.addVertical(position, GuideManagerCore::Standard);//addXGuide(position);
else
guides.deleteVertical(position, GuideManagerCore::Standard);//removeXGuide(position);
m_Doc->scMW()->guidePalette->setupGui();
}
else if (ss->contains("REMOVE_H"))
{
double position = ss->getDouble("REMOVE_H");
if (isUndo)
guides.addHorizontal(position, GuideManagerCore::Standard);//addYGuide(position);
else
guides.deleteHorizontal(position, GuideManagerCore::Standard);//removeYGuide(position);
m_Doc->scMW()->guidePalette->setupGui();
}
else if (ss->contains("MOVE_H_FROM"))
{
double from = ss->getDouble("MOVE_H_FROM");
double to = ss->getDouble("MOVE_H_TO");
if (isUndo)
{
guides.deleteHorizontal(to, GuideManagerCore::Standard);//removeYGuide(position);
guides.addHorizontal(from, GuideManagerCore::Standard);//addYGuide(position);
}
else
{
guides.deleteHorizontal(from, GuideManagerCore::Standard);//removeYGuide(position);
guides.addHorizontal(to, GuideManagerCore::Standard);//addYGuide(position);
}
m_Doc->scMW()->guidePalette->setupGui();
}
else if (ss->contains("MOVE_V_FROM"))
{
double from = ss->getDouble("MOVE_V_FROM");
double to = ss->getDouble("MOVE_V_TO");
if (isUndo)
{
guides.deleteVertical(to, GuideManagerCore::Standard);//removeXGuide(position);
guides.addVertical(from, GuideManagerCore::Standard);//removeXGuide(position);
}
else
{
guides.deleteVertical(from, GuideManagerCore::Standard);//removeXGuide(position);
guides.addVertical(to, GuideManagerCore::Standard);//removeXGuide(position);
}
m_Doc->scMW()->guidePalette->setupGui();
}
// automatic guides
else if (ss->contains("REMOVE_HA_GAP"))
{
if (isUndo)
{
guides.setHorizontalAutoCount(ss->getInt("REMOVE_HA_COUNT"));
guides.setHorizontalAutoGap(ss->getDouble("REMOVE_HA_GAP"));
guides.setHorizontalAutoRefer(ss->getInt("REMOVE_HA_REFER"));
}
else
{
guides.setHorizontalAutoCount(0);
guides.setHorizontalAutoGap(0.0);
guides.setHorizontalAutoRefer(0);
}
m_Doc->scMW()->guidePalette->setupGui();
}
else if (ss->contains("REMOVE_VA_GAP"))
{
if (isUndo)
{
guides.setVerticalAutoCount(ss->getInt("REMOVE_VA_COUNT"));
guides.setVerticalAutoGap(ss->getDouble("REMOVE_VA_GAP"));
guides.setVerticalAutoRefer(ss->getInt("REMOVE_VA_REFER"));
}
else
//.........这里部分代码省略.........