本文整理汇总了C++中TApp::getCurrentFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ TApp::getCurrentFrame方法的具体用法?C++ TApp::getCurrentFrame怎么用?C++ TApp::getCurrentFrame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TApp
的用法示例。
在下文中一共展示了TApp::getCurrentFrame方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hideEvent
void FilmstripFrames::hideEvent(QHideEvent *) {
TApp *app = TApp::instance();
// cambiamenti al livello
disconnect(app->getCurrentLevel());
// al frame corrente
disconnect(app->getCurrentFrame(), SIGNAL(frameSwitched()), this,
SLOT(onFrameSwitched()));
disconnect(app->getCurrentFrame(), SIGNAL(frameTypeChanged()), this,
SLOT(update()));
// iconcine
disconnect(IconGenerator::instance(), SIGNAL(iconGenerated()), this,
SLOT(update()));
// onion skin
disconnect(app->getCurrentOnionSkin(), SIGNAL(onionSkinMaskChanged()), this,
SLOT(update()));
ComboViewerPanel *inknPaintViewerPanel = app->getInknPaintViewerPanel();
if (inknPaintViewerPanel) {
SceneViewer *viewer = inknPaintViewerPanel->getSceneViewer();
if (viewer) {
disconnect(viewer, SIGNAL(onZoomChanged()), this, SLOT(update()));
disconnect(viewer, SIGNAL(refreshNavi()), this, SLOT(update()));
}
}
}
示例2: showEvent
void FilmstripFrames::showEvent(QShowEvent *) {
TApp *app = TApp::instance();
// cambiamenti al livello
TXshLevelHandle *levelHandle = app->getCurrentLevel();
connect(levelHandle, SIGNAL(xshLevelSwitched(TXshLevel *)), this,
SLOT(onLevelSwitched(TXshLevel *)));
connect(levelHandle, SIGNAL(xshLevelChanged()), this, SLOT(onLevelChanged()));
connect(levelHandle, SIGNAL(xshLevelViewChanged()), this,
SLOT(onLevelChanged()));
// al frame corrente
connect(app->getCurrentFrame(), SIGNAL(frameSwitched()), this,
SLOT(onFrameSwitched()));
connect(app->getCurrentFrame(), SIGNAL(frameTypeChanged()), this,
SLOT(update()));
// iconcine
connect(IconGenerator::instance(), SIGNAL(iconGenerated()), this,
SLOT(update()));
// onion skin
connect(app->getCurrentOnionSkin(), SIGNAL(onionSkinMaskChanged()), this,
SLOT(update()));
// enable navigator link with the Viewer in the InknPaint page
ComboViewerPanel *inknPaintViewerPanel = app->getInknPaintViewerPanel();
if (inknPaintViewerPanel) {
SceneViewer *viewer = inknPaintViewerPanel->getSceneViewer();
if (viewer) {
connect(viewer, SIGNAL(onZoomChanged()), this, SLOT(update()));
connect(viewer, SIGNAL(refreshNavi()), this, SLOT(update()));
}
}
}
示例3: onCurrentButtonToggled
void PaletteViewerPanel::onCurrentButtonToggled(bool isCurrent) {
if (isActive() == isCurrent) return;
TApp *app = TApp::instance();
TPaletteHandle *ph = app->getPaletteController()->getCurrentLevelPalette();
// Se sono sulla palette del livello corrente e le palette e' vuota non
// consento di bloccare il pannello.
if (isActive() && !ph->getPalette()) {
m_isCurrentButton->setPressed(true);
return;
}
setActive(isCurrent);
m_paletteViewer->enableSaveAction(isCurrent);
// Cambio il livello corrente
if (isCurrent) {
std::set<TXshSimpleLevel *> levels;
TXsheet *xsheet = app->getCurrentXsheet()->getXsheet();
int row, column;
findPaletteLevels(levels, row, column, m_paletteHandle->getPalette(),
xsheet);
// Se non trovo livelli riferiti alla palette setto il palette viewer alla
// palette del livello corrente.
if (levels.empty()) {
m_paletteViewer->setPaletteHandle(ph);
update();
return;
}
TXshSimpleLevel *level = *levels.begin();
// Se sto editando l'xsheet devo settare come corrente anche la colonna e il
// frame.
if (app->getCurrentFrame()->isEditingScene()) {
int currentColumn = app->getCurrentColumn()->getColumnIndex();
if (currentColumn != column)
app->getCurrentColumn()->setColumnIndex(column);
int currentRow = app->getCurrentFrame()->getFrameIndex();
TXshCell cell = xsheet->getCell(currentRow, column);
if (cell.isEmpty() || cell.getSimpleLevel() != level)
app->getCurrentFrame()->setFrameIndex(row);
TCellSelection *selection = dynamic_cast<TCellSelection *>(
app->getCurrentSelection()->getSelection());
if (selection) selection->selectNone();
}
app->getCurrentLevel()->setLevel(level);
m_paletteViewer->setPaletteHandle(ph);
} else {
m_paletteHandle->setPalette(ph->getPalette());
m_paletteViewer->setPaletteHandle(m_paletteHandle);
}
update();
}
示例4: CurrentStyleChangeCommand
PaletteViewerPanel::PaletteViewerPanel(QWidget *parent) : TPanel(parent) {
m_paletteHandle = new TPaletteHandle();
connect(m_paletteHandle, SIGNAL(colorStyleSwitched()),
SLOT(onColorStyleSwitched()));
connect(m_paletteHandle, SIGNAL(paletteSwitched()),
SLOT(onPaletteSwitched()));
TApp *app = TApp::instance();
m_paletteViewer = new PaletteViewer(this, PaletteViewerGUI::LEVEL_PALETTE);
m_paletteViewer->setPaletteHandle(
app->getPaletteController()->getCurrentLevelPalette());
m_paletteViewer->setFrameHandle(app->getCurrentFrame());
m_paletteViewer->setXsheetHandle(app->getCurrentXsheet());
// for clearing cache when paste style command called from the StyleSelection
m_paletteViewer->setLevelHandle(app->getCurrentLevel());
TSceneHandle *sceneHandle = app->getCurrentScene();
connect(sceneHandle, SIGNAL(sceneSwitched()), SLOT(onSceneSwitched()));
CurrentStyleChangeCommand *currentStyleChangeCommand =
new CurrentStyleChangeCommand();
m_paletteViewer->setChangeStyleCommand(currentStyleChangeCommand);
setWidget(m_paletteViewer);
initializeTitleBar();
}
示例5: onFrameSwitched
void FilmstripFrames::onFrameSwitched() {
// no. interferische con lo shift-click per la selezione.
// m_selection->selectNone();
TApp *app = TApp::instance();
TFrameHandle *fh = app->getCurrentFrame();
TFrameId fid;
if (fh->isEditingLevel())
fid = fh->getFid();
else {
TXsheet *xsh = app->getCurrentXsheet()->getXsheet();
int col = app->getCurrentColumn()->getColumnIndex();
int row = fh->getFrame();
if (row < 0 || col < 0) return;
TXshCell cell = xsh->getCell(row, col);
if (cell.isEmpty()) return;
fid = cell.getFrameId();
}
int index = fid2index(fid);
if (index >= 0) {
exponeFrame(index);
// clear selection and select only the destination frame
select(index, ONLY_SELECT);
}
update();
}
示例6: changeFrameSkippingHolds
bool changeFrameSkippingHolds(QKeyEvent *e) {
if ((e->modifiers() & Qt::ShiftModifier) == 0 ||
e->key() != Qt::Key_Down && e->key() != Qt::Key_Up)
return false;
TApp *app = TApp::instance();
TFrameHandle *fh = app->getCurrentFrame();
if (!fh->isEditingScene()) return false;
int row = fh->getFrame();
int col = app->getCurrentColumn()->getColumnIndex();
TXsheet *xsh = app->getCurrentXsheet()->getXsheet();
TXshCell cell = xsh->getCell(row, col);
if (e->key() == Qt::Key_Down) {
if (cell.isEmpty()) {
int r0, r1;
if (xsh->getCellRange(col, r0, r1)) {
while (row <= r1 && xsh->getCell(row, col).isEmpty()) row++;
if (xsh->getCell(row, col).isEmpty()) return false;
} else
return false;
} else {
while (xsh->getCell(row, col) == cell) row++;
}
} else {
// Key_Up
while (row >= 0 && xsh->getCell(row, col) == cell) row--;
if (row < 0) return false;
cell = xsh->getCell(row, col);
while (row > 0 && xsh->getCell(row - 1, col) == cell) row--;
}
fh->setFrame(row);
return true;
}
示例7: QDialog
FxParamEditorPopup::FxParamEditorPopup()
: QDialog(TApp::instance()->getMainWindow()) {
setWindowTitle(tr("Fx Settings"));
setMinimumSize(20, 20);
TApp *app = TApp::instance();
TSceneHandle *hScene = app->getCurrentScene();
TPixel32 col1, col2;
Preferences::instance()->getChessboardColors(col1, col2);
FxSettings *fxSettings = new FxSettings(this, col1, col2);
fxSettings->setSceneHandle(hScene);
fxSettings->setFxHandle(app->getCurrentFx());
fxSettings->setFrameHandle(app->getCurrentFrame());
fxSettings->setXsheetHandle(app->getCurrentXsheet());
fxSettings->setLevelHandle(app->getCurrentLevel());
fxSettings->setObjectHandle(app->getCurrentObject());
fxSettings->setCurrentFx();
QVBoxLayout *mainLayout = new QVBoxLayout();
mainLayout->setMargin(0);
mainLayout->setSpacing(10);
{ mainLayout->addWidget(fxSettings); }
setLayout(mainLayout);
move(parentWidget()->geometry().center() - rect().bottomRight() / 2.0);
}
示例8: hideEvent
void BinarizePopup::hideEvent(QHideEvent *e)
{
TApp *app = TApp::instance();
bool ret = true;
ret = ret && disconnect(app->getCurrentFrame(), 0, this, 0);
ret = ret && disconnect(app->getCurrentColumn(), 0, this, 0);
ret = ret && disconnect(app->getCurrentLevel(), 0, this, 0);
assert(ret);
}
示例9: attachHandles
void FunctionViewerPanel::attachHandles() {
TApp *app = TApp::instance();
m_functionViewer->setXsheetHandle(app->getCurrentXsheet());
m_functionViewer->setFrameHandle(app->getCurrentFrame());
m_functionViewer->setObjectHandle(app->getCurrentObject());
m_functionViewer->setFxHandle(app->getCurrentFx());
m_functionViewer->setColumnHandle(app->getCurrentColumn());
m_functionViewer->setSceneHandle(app->getCurrentScene());
}
示例10: showEvent
void AntialiasPopup::showEvent(QShowEvent *se)
{
TApp *app = TApp::instance();
bool ret = true;
ret = ret && connect(app->getCurrentFrame(), SIGNAL(frameTypeChanged()), this, SLOT(setCurrentSampleRaster()));
ret = ret && connect(app->getCurrentFrame(), SIGNAL(frameSwitched()), this, SLOT(setCurrentSampleRaster()));
ret = ret && connect(app->getCurrentColumn(), SIGNAL(columnIndexSwitched()), this, SLOT(setCurrentSampleRaster()));
assert(ret);
setCurrentSampleRaster();
}
示例11: 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();
}
示例12: hideEvent
void LinesFadePopup::hideEvent(QHideEvent *he)
{
TApp *app = TApp::instance();
disconnect(app->getCurrentFrame(), SIGNAL(frameTypeChanged()), this, SLOT(setCurrentSampleRaster()));
disconnect(app->getCurrentFrame(), SIGNAL(frameSwitched()), this, SLOT(setCurrentSampleRaster()));
disconnect(app->getCurrentColumn(), SIGNAL(columnIndexSwitched()), this, SLOT(setCurrentSampleRaster()));
Dialog::hideEvent(he);
m_viewer->raster() = TRasterP();
m_startRas = TRaster32P();
}
示例13: hideEvent
void ComboViewerPanel::hideEvent(QHideEvent *) {
TApp *app = TApp::instance();
disconnect(app->getCurrentScene());
disconnect(app->getCurrentLevel());
disconnect(app->getCurrentFrame());
disconnect(app->getCurrentObject());
disconnect(app->getCurrentXsheet());
disconnect(app->getCurrentTool());
m_flipConsole->setActive(false);
}
示例14: onButtonPressed
void SceneViewer::onButtonPressed(FlipConsole::EGadget button) {
if (m_freezedStatus != NO_FREEZED) return;
switch (button) {
case FlipConsole::eSaveImg: {
if (m_previewMode == NO_PREVIEW) {
DVGui::warning(QObject::tr(
"It is not possible to save images in camera stand view."));
return;
}
TApp *app = TApp::instance();
int row = app->getCurrentFrame()->getFrame();
Previewer *previewer =
Previewer::instance(m_previewMode == SUBCAMERA_PREVIEW);
if (!previewer->isFrameReady(row)) {
DVGui::warning(QObject::tr("The preview images are not ready yet."));
return;
}
TRasterP ras =
previewer->getRaster(row, m_visualSettings.m_recomputeIfNeeded);
TImageCache::instance()->add(QString("TnzCompareImg"),
TRasterImageP(ras->clone()));
break;
}
case FlipConsole::eSave:
Previewer::instance(m_previewMode == SUBCAMERA_PREVIEW)
->saveRenderedFrames();
break;
case FlipConsole::eHisto: {
QAction *action = CommandManager::instance()->getAction(MI_Histogram);
action->trigger();
break;
}
case FlipConsole::eDefineSubCamera:
m_editPreviewSubCamera = !m_editPreviewSubCamera;
update();
break;
// open locator. Create one for the first time
case FlipConsole::eLocator:
if (!m_locator) m_locator = new LocatorPopup(this);
m_locator->show();
m_locator->raise();
m_locator->activateWindow();
break;
}
}
示例15: setCurrentSampleRaster
void AntialiasPopup::setCurrentSampleRaster()
{
TRasterP sampleRas;
m_startRas = TRasterP();
TSelection *selection = TApp::instance()->getCurrentSelection()->getSelection();
TCellSelection *cellSelection = dynamic_cast<TCellSelection *>(selection);
TFilmstripSelection *filmstripSelection = dynamic_cast<TFilmstripSelection *>(selection);
TImageP image;
if (cellSelection) {
TApp *app = TApp::instance();
TXsheet *xsh = app->getCurrentXsheet()->getXsheet();
TXshCell cell = xsh->getCell(app->getCurrentFrame()->getFrameIndex(), app->getCurrentColumn()->getColumnIndex());
TImageP aux = cell.getImage(true);
if (aux)
image = aux->cloneImage();
} else if (filmstripSelection) {
TApp *app = TApp::instance();
TXshSimpleLevel *simpleLevel = app->getCurrentLevel()->getSimpleLevel();
if (simpleLevel) {
TImageP imageAux = simpleLevel->getFrame(app->getCurrentFrame()->getFid(), true);
if (imageAux)
image = imageAux->cloneImage();
}
}
if (!image || !(sampleRas = image->raster())) {
m_viewer->setImage(TImageP());
m_viewer->update();
m_okBtn->setEnabled(false);
return;
}
m_okBtn->setEnabled(true);
m_startRas = sampleRas->clone();
onChange(m_startRas, sampleRas, m_thresholdField->getValue(), m_softnessField->getValue());
m_viewer->setImage(image);
m_viewer->update();
}