本文整理汇总了C++中TXshColumn::getSoundColumn方法的典型用法代码示例。如果您正苦于以下问题:C++ TXshColumn::getSoundColumn方法的具体用法?C++ TXshColumn::getSoundColumn怎么用?C++ TXshColumn::getSoundColumn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TXshColumn
的用法示例。
在下文中一共展示了TXshColumn::getSoundColumn方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: mouseReleaseEvent
void LayerHeaderPanel::mouseReleaseEvent(QMouseEvent *event) {
TApp *app = TApp::instance();
TXsheet *xsh = m_viewer->getXsheet();
int col, totcols = xsh->getColumnCount();
bool sound_changed = false;
if (m_doOnRelease != 0 && totcols > 0) {
for (col = 0; col < totcols; col++) {
if (!xsh->isColumnEmpty(col)) {
TXshColumn *column = xsh->getColumn(col);
if (m_doOnRelease == ToggleAllPreviewVisible) {
column->setPreviewVisible(!column->isPreviewVisible());
} else if (m_doOnRelease == ToggleAllTransparency) {
column->setCamstandVisible(!column->isCamstandVisible());
if (column->getSoundColumn()) sound_changed = true;
} else if (m_doOnRelease == ToggleAllLock) {
column->lock(!column->isLocked());
}
}
}
if (sound_changed) {
app->getCurrentXsheet()->notifyXsheetSoundChanged();
}
app->getCurrentScene()->notifySceneChanged();
app->getCurrentXsheet()->notifyXsheetChanged();
}
m_viewer->updateColumnArea();
update();
m_doOnRelease = 0;
}
示例2:
TStageObject *ViewerKeyframeNavigator::getStageObject() const {
if (!m_xsheetHandle || !m_objectHandle) return 0;
TStageObjectId objectId = m_objectHandle->getObjectId();
TXsheet *xsh = m_xsheetHandle->getXsheet();
// Se e' una colonna sound non posso settare chiavi
if (objectId.isColumn()) {
TXshColumn *column = xsh->getColumn(objectId.getIndex());
if (column && column->getSoundColumn()) return 0;
}
return xsh->getStageObject(objectId);
}
示例3: doesApply
bool SkeletonTool::doesApply() const
{
TTool::Application *app = TTool::getApplication();
TXsheet *xsh = app->getCurrentXsheet()->getXsheet();
assert(xsh);
TStageObjectId objId = app->getCurrentObject()->getObjectId();
if (objId.isColumn()) {
TXshColumn *column = xsh->getColumn(objId.getIndex());
if (column && column->getSoundColumn())
return false;
}
return true;
}
示例4: onDrawFrame
void ComboViewerPanel::onDrawFrame(
int frame, const ImagePainter::VisualSettings &settings) {
TApp *app = TApp::instance();
m_sceneViewer->setVisual(settings);
TFrameHandle *frameHandle = app->getCurrentFrame();
if (m_sceneViewer->isPreviewEnabled()) {
class Previewer *pr = Previewer::instance(m_sceneViewer->getPreviewMode() ==
SceneViewer::SUBCAMERA_PREVIEW);
pr->getRaster(frame - 1); // the 'getRaster' starts the render of the frame
// is not already started
int curFrame = frame;
if (frameHandle->isPlaying() &&
!pr->isFrameReady(
frame - 1)) // stops on last rendered frame until current is ready!
{
while (frame > 0 && !pr->isFrameReady(frame - 1)) frame--;
if (frame == 0)
frame = curFrame; // if no frame is ready, I stay on current...no use
// to rewind
m_flipConsole->setCurrentFrame(frame);
}
}
assert(frame >= 0);
if (frame != frameHandle->getFrameIndex() + 1) {
if (frameHandle->isEditingScene()) {
TXshColumn *column = app->getCurrentXsheet()->getXsheet()->getColumn(
app->getCurrentColumn()->getColumnIndex());
if (column) {
TXshSoundColumn *soundColumn = column->getSoundColumn();
if (soundColumn && !soundColumn->isPlaying())
app->getCurrentFrame()->scrubColumn(frame, frame, soundColumn);
}
}
frameHandle->setCurrentFrame(frame);
}
else if (settings.m_blankColor != TPixel::Transparent)
m_sceneViewer->update();
}
示例5: getKeyframes
// data -> xsh
bool TKeyframeData::getKeyframes(std::set<Position> &positions, TXsheet *xsh) const
{
std::set<TKeyframeSelection::Position>::iterator it2 = positions.begin();
int r0 = it2->first;
int c0 = it2->second;
for (++it2; it2 != positions.end(); ++it2) {
r0 = std::min(r0, it2->first);
c0 = std::min(c0, it2->second);
}
positions.clear();
TStageObjectId cameraId = xsh->getStageObjectTree()->getCurrentCameraId();
Iterator it;
bool keyFrameChanged = false;
for (it = m_keyData.begin(); it != m_keyData.end(); ++it) {
Position pos = it->first;
int row = r0 + pos.first;
int col = c0 + pos.second;
positions.insert(std::make_pair(row, col));
TXshColumn *column = xsh->getColumn(col);
if (column && column->getSoundColumn())
continue;
TStageObject *pegbar = xsh->getStageObject(col >= 0 ? TStageObjectId::ColumnId(col) : cameraId);
if (pegbar->getId().isColumn() && xsh->getColumn(col) && xsh->getColumn(col)->isLocked())
continue;
keyFrameChanged = true;
assert(pegbar);
pegbar->setKeyframeWithoutUndo(row, it->second);
}
if (!keyFrameChanged)
return false;
for (auto const pegbar : m_isPegbarsCycleEnabled) {
int const col = pegbar.first;
TStageObjectId objectId = (col >= 0) ? TStageObjectId::ColumnId(col) : cameraId;
xsh->getStageObject(objectId)->enableCycle(pegbar.second);
}
return true;
}
示例6: execute
void execute() override {
TColumnSelection *selection = dynamic_cast<TColumnSelection *>(
TApp::instance()->getCurrentSelection()->getSelection());
TXsheet *xsh = TApp::instance()->getCurrentXsheet()->getXsheet();
int cc = TApp::instance()->getCurrentColumn()->getColumnIndex();
bool sound_changed = false;
TTool *tool = TApp::instance()->getCurrentTool()->getTool();
TTool::Viewer *viewer = tool ? tool->getViewer() : nullptr;
bool viewer_changed = false;
for (int i = 0; i < xsh->getColumnCount(); i++) {
/*- 空のカラムの場合は飛ばす -*/
if (xsh->isColumnEmpty(i)) continue;
/*- カラムが取得できなかったら飛ばす -*/
TXshColumn *column = xsh->getColumn(i);
if (!column) continue;
/*- ターゲットが選択カラムのモードで、選択されていなかった場合は飛ばす -*/
bool isSelected = selection && selection->isColumnSelected(i);
if (m_target == TARGET_SELECTED && !isSelected) continue;
/*-
* ターゲットが「カレントカラムより右側」のモードで、iがカレントカラムより左の場合は飛ばす
* -*/
if (m_target == TARGET_UPPER && i < cc) continue;
bool negate = m_target == TARGET_CURRENT && cc != i ||
m_target == TARGET_OTHER && cc == i ||
m_target == TARGET_UPPER && cc == i;
int cmd = m_cmd;
if (cmd & (CMD_LOCK | CMD_UNLOCK | CMD_TOGGLE_LOCK)) {
if (cmd & CMD_LOCK)
column->lock(!negate);
else if (cmd & CMD_UNLOCK)
column->lock(negate);
else
column->lock(!column->isLocked());
viewer_changed = true;
}
if (cmd &
(CMD_ENABLE_PREVIEW | CMD_DISABLE_PREVIEW | CMD_TOGGLE_PREVIEW)) {
if (cmd & CMD_ENABLE_PREVIEW)
column->setPreviewVisible(!negate);
else if (cmd & CMD_DISABLE_PREVIEW)
column->setPreviewVisible(negate);
else
column->setPreviewVisible(!column->isPreviewVisible());
}
if (cmd &
(CMD_ENABLE_CAMSTAND | CMD_DISABLE_CAMSTAND | CMD_TOGGLE_CAMSTAND)) {
if (cmd & CMD_ENABLE_CAMSTAND)
column->setCamstandVisible(!negate);
else if (cmd & CMD_DISABLE_CAMSTAND)
column->setCamstandVisible(negate);
else
column->setCamstandVisible(!column->isCamstandVisible());
if (column->getSoundColumn()) sound_changed = true;
viewer_changed = true;
}
/*TAB
if(cmd & (CMD_ENABLE_PREVIEW|CMD_DISABLE_PREVIEW|CMD_TOGGLE_PREVIEW))
{ //In Tab preview e cameraStand vanno settati entrambi
if(cmd&CMD_ENABLE_PREVIEW)
{
column->setPreviewVisible(!negate);
column->setCamstandVisible(!negate);
}
else if(cmd&CMD_DISABLE_PREVIEW)
{
column->setPreviewVisible(negate);
column->setCamstandVisible(negate);
}
else
{
column->setPreviewVisible(!column->isPreviewVisible());
column->setCamstandVisible(!column->isCamstandVisible());
}
}
*/
}
if (sound_changed)
TApp::instance()->getCurrentXsheet()->notifyXsheetSoundChanged();
TApp::instance()->getCurrentXsheet()->notifyXsheetChanged();
TApp::instance()->getCurrentScene()->setDirtyFlag(true);
if (viewer && viewer_changed) viewer->invalidateToolStatus();
}
示例7: updateEnabled
QString TTool::updateEnabled() {
// Disable every tool during playback
if (m_application->getCurrentFrame()->isPlaying())
return (enable(false), QString());
// Release Generic tools at once
int toolType = getToolType();
int targetType = getTargetType();
if (toolType == TTool::GenericTool) return (enable(true), QString());
// Retrieve vars and view modes
TXsheet *xsh = m_application->getCurrentXsheet()->getXsheet();
int rowIndex = m_application->getCurrentFrame()->getFrame();
int columnIndex = m_application->getCurrentColumn()->getColumnIndex();
TXshColumn *column = (columnIndex >= 0) ? xsh->getColumn(columnIndex) : 0;
TXshLevel *xl = m_application->getCurrentLevel()->getLevel();
TXshSimpleLevel *sl = xl ? xl->getSimpleLevel() : 0;
int levelType = sl ? sl->getType() : NO_XSHLEVEL;
TStageObject *obj =
xsh->getStageObject(TStageObjectId::ColumnId(columnIndex));
bool spline = m_application->getCurrentObject()->isSpline();
bool filmstrip = m_application->getCurrentFrame()->isEditingLevel();
/*-- MultiLayerStylePickerONのときは、現状に関わらず使用可能 --*/
if (m_name == T_StylePicker &&
Preferences::instance()->isMultiLayerStylePickerEnabled())
return (enable(true), QString());
// Check against unplaced columns (not in filmstrip mode)
if (column && !filmstrip) {
if (column->isLocked())
return (enable(false), QObject::tr("The current column is locked."));
else if (!column->isCamstandVisible())
return (enable(false), QObject::tr("The current column is hidden."));
else if (column->getSoundColumn())
return (enable(false),
QObject::tr("It is not possible to edit the audio column."));
else if (column->getSoundTextColumn())
return (
enable(false),
QObject::tr(
"Note columns can only be edited in the xsheet or timeline."));
if (toolType == TTool::ColumnTool) {
// Check column target
if (column->getLevelColumn() && !(targetType & LevelColumns))
return (
enable(false),
QObject::tr("The current tool cannot be used on a Level column."));
if (column->getMeshColumn() && !(targetType & MeshColumns))
return (
enable(false),
QObject::tr("The current tool cannot be used on a Mesh column."));
}
}
// Check column tools
if (toolType == TTool::ColumnTool) {
if (filmstrip)
return (
enable(false),
QObject::tr("The current tool cannot be used in Level Strip mode."));
if ((!column || column->isEmpty()) && !(targetType & TTool::EmptyTarget))
return (enable(false), QString());
}
// Check LevelRead & LevelWrite tools
if (toolType & TTool::LevelTool) {
// Check against splines
if (spline) {
return (targetType & Splines)
? (enable(true), QString())
: (enable(false), QObject::tr("The current tool cannot be "
"used to edit a motion path."));
}
// Check against empty levels
if (!xl)
return (targetType & EmptyTarget) ? (enable(true), QString())
: (enable(false), QString());
// Check against simple-level-edness
if (!sl)
return (enable(false),
QObject::tr("The current level is not editable.")); // Does it
// happen at
// all btw?
// Check against level types
{
//.........这里部分代码省略.........