// Y = 3 void Matrix::on_SetFrame_3_0_clicked() { setFrame(0,3); }
void AnimationForm::Init() { slot_endedOption(); setBarCenter(); setFrame() ; }
void KBounceBall::update() { setFrame( frame()+1 ); setPos( m_board->mapPosition( QPointF( m_xPos, m_yPos ) ) ); }
void ofGstUtils::nextFrame(){ gint64 currentFrame = getCurrentFrame(); if(currentFrame!=-1) setFrame(currentFrame + 1); }
void as::AnimatedSprite::stop() { setFrame( 0 ); }
ofTexture* ofxImageSequence::getFrame(int index) { setFrame(index); return &getTextureReference(); }
void FunctionToolbar::onFrameSwitched() { setFrame(m_frameHandle->getFrame()); }
void ofGstVideoPlayer::firstFrame(){ setFrame(0); }
void ofGstVideoPlayer::nextFrame(){ gint64 currentFrame = getCurrentFrame(); if(currentFrame!=-1) setFrame(currentFrame + 1); }
void Matrix::on_SetFrame_3_4_clicked() { setFrame(4,3); }
void Matrix::on_SetFrame_3_5_clicked() { setFrame(5,3); }
void Matrix::on_SetFrame_3_3_clicked() { setFrame(3,3); }
void Matrix::on_SetFrame_3_2_clicked() { setFrame(2,3); }
void Matrix::on_SetFrame_3_1_clicked() { setFrame(1,3); }
void UIElement::setEnabled(bool flag) { if (_enabled != flag) { _enabled = flag; setFrame(_enabled ? _frameNum : _frameNum + 2); } }
void ofGstVideoPlayer::previousFrame(){ gint64 currentFrame = getCurrentFrame(); if(currentFrame!=-1) setFrame(currentFrame - 1); }
void Artefact::setType( uint type ) { TRACE("Artefact::setType"); GenericArtefact::setType( type ); setFrame( type ); }
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); }
void ofxImageSequence::setFrameAtPercent(float percent) { setFrame(getFrameIndexAtPercent(percent)); }
void Composition::setFrameByRatio(float ratio) { setFrame(ofMap(ratio, 0, 1, 0, frame_.getLength()-1)); }
void ofGstUtils::firstFrame(){ setFrame(0); }
void ofxBvh::setPosition(float pos) { setFrame((float)frames.size() * pos); }
void ofGstUtils::previousFrame(){ gint64 currentFrame = getCurrentFrame(); if(currentFrame!=-1) setFrame(currentFrame - 1); }
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(); } }
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(); }); connect(editBottom,&QDoubleSpinBox::editingFinished, this, &FilterHorizontalHeaderView::applyFilters); connect(editBottom,static_cast<void (QDoubleSpinBox::*)(double)>(&QDoubleSpinBox::valueChanged),[&](){ timer.start(); }); break; } case wtNone: inputTop=inputBottom=nullptr; break; } if(inputTop!=nullptr) { inputTop->setFixedHeight(inputHeight); inputBottom->setFixedHeight(inputHeight); vl->addWidget(inputTop,0); vl->addWidget(inputBottom,0); } widget->setLayout(vl); updateHeaderData(col); _height=std::max(_height,headerWidgets[col]->minimumSizeHint().height()); //setMinimumSectionSize(headerWidgets[col]->minimumSizeHint().width()); //setDefaultSectionSize(headerWidgets[col]->minimumSizeHint().width()); //std::cout<<"col:"<<col<<" width:"<<headerWidgets[col]->minimumSizeHint().width()<<std::endl; }
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(); }
void KBounceBall::resetPixmaps() { m_framesNum = frameCount(); setFrame( 1 ); }
void UIInventoryScroll::toggle(bool pressed) { if (_enabled) { setFrame(pressed ? (_frameNum + 1) : _frameNum); T2_GLOBALS._uiElements.draw(); } }
void AnimatedSprite::stop() { m_isPaused = true; m_currentFrame = 0; setFrame(m_currentFrame); }
void Matrix::on_SetFrame_2_9_clicked() { setFrame(9,2); }