本文整理汇总了C++中setFrame函数的典型用法代码示例。如果您正苦于以下问题:C++ setFrame函数的具体用法?C++ setFrame怎么用?C++ setFrame使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了setFrame函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: setFrame
// Y = 3
void Matrix::on_SetFrame_3_0_clicked()
{
setFrame(0,3);
}
开发者ID:zigurana,项目名称:PGE-Project,代码行数:5,代码来源:matrix.cpp
示例2: slot_endedOption
void AnimationForm::Init()
{
slot_endedOption();
setBarCenter();
setFrame() ;
}
开发者ID:moximoxi,项目名称:AnimationCreator,代码行数:6,代码来源:animationform.cpp
示例3: setFrame
void KBounceBall::update()
{
setFrame( frame()+1 );
setPos( m_board->mapPosition( QPointF( m_xPos, m_yPos ) ) );
}
开发者ID:alasin,项目名称:kbounce,代码行数:5,代码来源:ball.cpp
示例4: getCurrentFrame
void ofGstUtils::nextFrame(){
gint64 currentFrame = getCurrentFrame();
if(currentFrame!=-1) setFrame(currentFrame + 1);
}
开发者ID:6301158,项目名称:SmileFile,代码行数:4,代码来源:ofGstUtils.cpp
示例5: setFrame
void as::AnimatedSprite::stop() {
setFrame( 0 );
}
开发者ID:naelstrof,项目名称:Syme,代码行数:3,代码来源:animatedsprite.cpp
示例6: setFrame
ofTexture* ofxImageSequence::getFrame(int index)
{
setFrame(index);
return &getTextureReference();
}
开发者ID:ColoursAndNumbers,项目名称:openFrameworks,代码行数:5,代码来源:ofxImageSequence.cpp
示例7: setFrame
void FunctionToolbar::onFrameSwitched() { setFrame(m_frameHandle->getFrame()); }
开发者ID:SaierMe,项目名称:opentoonz,代码行数:1,代码来源:functiontoolbar.cpp
示例8: setFrame
void ofGstVideoPlayer::firstFrame(){
setFrame(0);
}
开发者ID:B-IT,项目名称:openFrameworks,代码行数:3,代码来源:ofGstVideoPlayer.cpp
示例9: getCurrentFrame
void ofGstVideoPlayer::nextFrame(){
gint64 currentFrame = getCurrentFrame();
if(currentFrame!=-1) setFrame(currentFrame + 1);
}
开发者ID:B-IT,项目名称:openFrameworks,代码行数:4,代码来源:ofGstVideoPlayer.cpp
示例10: setFrame
void UIElement::setEnabled(bool flag) {
if (_enabled != flag) {
_enabled = flag;
setFrame(_enabled ? _frameNum : _frameNum + 2);
}
}
开发者ID:seriesParallel,项目名称:scummvm,代码行数:6,代码来源:user_interface.cpp
示例11: TRACE
void Artefact::setType( uint type )
{
TRACE("Artefact::setType");
GenericArtefact::setType( type );
setFrame( type );
}
开发者ID:q4a,项目名称:attal,代码行数:6,代码来源:graphicalArtefact.cpp
示例12: setFrame
void AttributesWidget::setFrame(long frame_number) {
if (!session) return;
std::shared_ptr<AnnotatorLib::Frame> frame = session->getFrame(frame_number);
if (!frame) frame = std::make_shared<AnnotatorLib::Frame>(frame_number);
setFrame(frame);
}
开发者ID:lasmue,项目名称:annotator,代码行数:6,代码来源:attributeswidget.cpp
示例13: setFrame
void Composition::setFrameByRatio(float ratio)
{
setFrame(ofMap(ratio, 0, 1, 0, frame_.getLength()-1));
}
开发者ID:N3TWORK,项目名称:ofxAE,代码行数:4,代码来源:ofxAEComposition.cpp
示例14: setFrame
void ofGstUtils::firstFrame(){
setFrame(0);
}
开发者ID:6301158,项目名称:SmileFile,代码行数:3,代码来源:ofGstUtils.cpp
示例15: setFrame
void ofxBvh::setPosition(float pos)
{
setFrame((float)frames.size() * pos);
}
开发者ID:MorimasaAketa,项目名称:perfume-bvh-oF,代码行数:4,代码来源:ofxBvh.cpp
示例16: QMainWindow
pure::pure(QWidget *parent) : QMainWindow(parent) {
//the meta types of the opencv datatypes have to be registered
//that one can use them in Qt's signal and slot system
qRegisterMetaType<cv::Rect>("cv::Rect");
qRegisterMetaType<cv::Mat>("cv::Mat");
ui.setupUi(this);
//setAttribute(Qt::WA_DeleteOnClose);
grabber = new Grabber();
sigProc = new SignalProcessor();
imgProc = new ImageProcessor(1);
recorder = new RecorderWidget();
//QThread is a thread handling class, that represents the thread
//itself. The code that is run inside the thread is determined
//by moving a QObject to the thread. once the thread is started
//the QObject behaves as it normally would but runs inside the
//thread.
grabberThread = new QThread(this);
imgProcThread = new QThread(this);
sigProcThread = new QThread(this);
recorderThread = new QThread(this);
grabber->moveToThread(sigProcThread);
imgProc->moveToThread(imgProcThread);
sigProc->moveToThread(grabberThread);
recorder->moveToThread(recorderThread);
grabberThread->start();
imgProcThread->start();
sigProcThread->start();
recorderThread->start();
//the connections of the singal and slot system. when you connect two QObjects
//using
// connect(sender, signal, receiver, slot)
//the slot function gets called everytime the sender emits the signal.
//signals can also carry data. datatypes unknown to Qt (here cv::Mat and cv::Rect)
//must be declared and registered first.
connect(grabber, SIGNAL(output(cv::Mat)), ui.display, SLOT(setFrame(cv::Mat)));
connect(grabber, SIGNAL(output(cv::Mat)), imgProc, SLOT(input(cv::Mat)));
connect(imgProc, SIGNAL(output(double, double, double)), sigProc, SLOT(input(double, double, double)));
connect(imgProc, SIGNAL(output(double, double, double)), recorder, SLOT(input(double, double, double)));
connect(imgProc, SIGNAL(output(double, double, double)), this, SLOT(onNewSamples(double, double, double)));
connect(imgProc, SIGNAL(newRoi(cv::Rect)), ui.display, SLOT(setRoi(cv::Rect)));
connect(sigProc, SIGNAL(output(double, double, double)), ui.meanPlot, SLOT(input(double, double, double)));
connect(sigProc, SIGNAL(output(double, double, double)), ui.fftWidget, SLOT(addSamples(double, double, double)));
connect(ui.fftWidget, SIGNAL(newHrEstimation(QString)), ui.labelHr, SLOT(setText(const QString &)));
if(grabber->init(15,0) == 0) {
//showFullScreen();
grabber->start();
showMaximized();
}
else {
QMessageBox msgBox;
msgBox.setText("No camera found, ending now.");
msgBox.exec();
close();
}
}
开发者ID:wbt729,项目名称:pure,代码行数:65,代码来源:pure.cpp
示例17: QWidget
void FilterHorizontalHeaderView::makeWidget(int col)
{
WidgetType wt;
wt=(WidgetType)_model->headerData(col,Qt::Horizontal,Qt::UserRole).toInt();
QWidget* widget=new QWidget(this);
widget->setContextMenuPolicy(Qt::CustomContextMenu);
connect(widget, &QWidget::customContextMenuRequested,[=](const QPoint& point){
contextMenu.exec(widget->mapToGlobal(point));
});
headerWidgets[col]=widget;
QVBoxLayout *vl=new QVBoxLayout(widget);
QHBoxLayout *hl=new QHBoxLayout();
widget->setCursor(Qt::ArrowCursor);
QLabel *nameLbl=headerNames[col]=new QLabel(widget);
QLabel *sortLbl=headerSortIndicators[col]=new QLabel(widget);
sortLbl->setText(" ");
nameLbl->setWordWrap(true);
nameLbl->setAlignment(Qt::AlignCenter);
sortLbl->setStyleSheet("font: small Courier");
hl->setContentsMargins(0,0,0,0);
vl->setContentsMargins(0,0,0,1);
vl->setSpacing(1);
hl->setSpacing(0);
hl->addWidget(nameLbl,1,Qt::AlignHCenter);
hl->addWidget(sortLbl,0,Qt::AlignRight);
vl->addLayout(hl,0);
QWidget *inputTop=nullptr, *inputBottom=nullptr;
switch(wt)
{
case wtString:
{
auto editTop=new QLineEdit(widget);
auto editBottom=new QLineEdit(widget);
matchEdits[col]=editTop;
notMatchEdits[col]=editBottom;
editTop->setFrame(frame);
editBottom->setFrame(frame);
editTop->setToolTip("contains");
editBottom->setToolTip("not contains");
inputTop=editTop;
inputBottom=editBottom;
connect(editTop,&QLineEdit::editingFinished,
this, &FilterHorizontalHeaderView::applyFilters);
connect(editTop,&QLineEdit::textChanged,[&](){
timer.start();
});
connect(editBottom,&QLineEdit::editingFinished,
this, &FilterHorizontalHeaderView::applyFilters);
connect(editBottom,&QLineEdit::textChanged,[&](){
timer.start();
});
break;
}
case wtInt:
{
auto editTop=new QSpinBox(widget);
auto editBottom=new QSpinBox(widget);
minIntEdits[col]=editTop;
maxIntEdits[col]=editBottom;
editTop->setToolTip("minimum value");
editBottom->setToolTip("maximum value");
editTop->setMaximum(std::numeric_limits<int>::max());
editBottom->setMaximum(std::numeric_limits<int>::max());
editTop->setFrame(frame);
editBottom->setFrame(frame);
inputTop=editTop;
inputBottom=editBottom;
connect(editTop,&QSpinBox::editingFinished,
this, &FilterHorizontalHeaderView::applyFilters);
connect(editTop,static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),[&](){
timer.start();
});
connect(editBottom,&QSpinBox::editingFinished,
this, &FilterHorizontalHeaderView::applyFilters);
connect(editBottom,static_cast<void (QSpinBox::*)(int)>(&QSpinBox::valueChanged),[&](){
timer.start();
});
break;
}
case wtDouble:
{
auto editTop=new QDoubleSpinBox(widget);
auto editBottom=new QDoubleSpinBox(widget);
minDoubleEdits[col]=editTop;
maxDoubleEdits[col]=editBottom;
editTop->setToolTip("minimum value");
editBottom->setToolTip("maximum value");
editTop->setMaximum(std::numeric_limits<double>::infinity());
editBottom->setMaximum(std::numeric_limits<double>::infinity());
editTop->setFrame(frame);
editBottom->setFrame(frame);
inputTop=editTop;
inputBottom=editBottom;
connect(editTop,&QDoubleSpinBox::editingFinished,
this, &FilterHorizontalHeaderView::applyFilters);
connect(editTop,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),[&](){
timer.start();
//.........这里部分代码省略.........
开发者ID:Burning-Daylight,项目名称:SRHDDumpReader,代码行数:101,代码来源:FilterHorizontalHeaderView.cpp
示例18: printBtns
void* STDCALL printBtns()
{
if (onRealm || !D2isLODGame()) return D2LoadBuySelBtn();
Unit* ptChar = D2GetClientPlayer();
sDrawImageInfo data;
ZeroMemory(&data,sizeof(data));
setImage(&data, stashBtnsImages);
setFrame(&data, 0 + isDownBtn.previous);
D2PrintImage(&data, getXPreviousBtn(), getYPreviousBtn(), -1, 5, 0);
setFrame(&data, 2 + isDownBtn.next);
D2PrintImage(&data, getXNextBtn(), getYNextBtn(), -1, 5, 0);
if (active_sharedStash)
{
setFrame(&data, 4 + isDownBtn.toggleToSharedStash + (PCPY->showSharedStash?2:0) );
D2PrintImage(&data, getXSharedBtn(), getYSharedBtn(), -1, 5, 0);
}
setFrame(&data, 8 + isDownBtn.previousIndex);
D2PrintImage(&data, getXPreviousIndexBtn(), getYPreviousIndexBtn(), -1, 5, 0);
setFrame(&data, 10 + isDownBtn.nextIndex);
D2PrintImage(&data, getXNextIndexBtn(), getYNextIndexBtn(), -1, 5, 0);
if (active_sharedGold)
{
setImage(&data, sharedGoldBtnsImages);
setFrame(&data, 0 + isDownBtn.putGold);
D2PrintImage(&data, getXPutGoldBtn(), getYPutGoldBtn(), -1, 5, 0);
setFrame(&data, 2 + isDownBtn.takeGold);
D2PrintImage(&data, getXTakeGoldBtn(), getYTakeGoldBtn(), -1, 5, 0);
}
LPWSTR lpText;
WCHAR text[100];
DWORD mx = D2GetMouseX();
DWORD my = D2GetMouseY();
D2SetFont(1);
if (isOnButtonPreviousStash(mx,my)) {
lpText = getLocalString(STR_STASH_PREVIOUS_PAGE);
D2PrintPopup(lpText, getXPreviousBtn()+getLPreviousBtn()/2, getYPreviousBtn()-getHPreviousBtn(), WHITE, 1);
} else if (isOnButtonNextStash(mx,my)) {
lpText = getLocalString(STR_STASH_NEXT_PAGE);
D2PrintPopup(lpText, getXNextBtn()+getLNextBtn()/2, getYNextBtn()-getHNextBtn(), WHITE, 1);
} else if (active_sharedStash && isOnButtonToggleSharedStash(mx,my)) {
lpText = getLocalString(PCPY->showSharedStash ? STR_TOGGLE_TO_PERSONAL : STR_TOGGLE_TO_SHARED);
D2PrintPopup(lpText, getXSharedBtn()+getLSharedBtn()/2, getYSharedBtn()-getHSharedBtn(), WHITE, 1);
} else if (isOnButtonPreviousIndexStash(mx,my)) {
_snwprintf(text, sizeof(text), getLocalString(STR_STASH_PREVIOUS_INDEX) ,nbPagesPerIndex,nbPagesPerIndex2);
D2PrintPopup(text, getXPreviousIndexBtn()+getLPreviousIndexBtn()/2, getYPreviousIndexBtn()-getHPreviousIndexBtn(), 0, 0);
} else if (isOnButtonNextIndexStash(mx,my)) {
_snwprintf(text, sizeof(text), getLocalString(STR_STASH_NEXT_INDEX) ,nbPagesPerIndex,nbPagesPerIndex2);
D2PrintPopup(text, getXNextIndexBtn()+getLNextIndexBtn()/2, getYNextIndexBtn()-getHNextIndexBtn(), WHITE, 1);
} else if (active_sharedGold && isOnButtonPutGold(mx,my)) {
lpText = getLocalString(STR_PUT_GOLD);
D2PrintPopup(lpText, getXPutGoldBtn()+getLPutGoldBtn()/2, getYPutGoldBtn()-getHPutGoldBtn(), WHITE, 1);
} else if (active_sharedGold && isOnButtonTakeGold(mx,my)) {
lpText = getLocalString(STR_TAKE_GOLD);
D2PrintPopup(lpText, getXTakeGoldBtn()+getLTakeGoldBtn()/2, getYTakeGoldBtn()-getHTakeGoldBtn(), WHITE, 1);
}
return D2LoadBuySelBtn();
}
开发者ID:ChaosMarc,项目名称:PlugY,代码行数:77,代码来源:Interface_Stash.cpp
示例19: frameCount
void KBounceBall::resetPixmaps()
{
m_framesNum = frameCount();
setFrame( 1 );
}
开发者ID:alasin,项目名称:kbounce,代码行数:5,代码来源:ball.cpp
示例20: setFrame
void AnimatedSprite::stop()
{
m_isPaused = true;
m_currentFrame = 0;
setFrame(m_currentFrame);
}
开发者ID:Ruixel,项目名称:Space-Invaders,代码行数:6,代码来源:AnimatedSprite.cpp
注:本文中的setFrame函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论