Exemple #1
0
void QDateEdit_QtDShell::__override_timerEvent(QTimerEvent*  event0, bool static_call)
{
    if (static_call) {
        QAbstractSpinBox::timerEvent((QTimerEvent* )event0);
    } else {
        timerEvent((QTimerEvent* )event0);
    }
}
void QNetworkAccessManager_QtDShell::__override_timerEvent(QTimerEvent*  arg__1, bool static_call)
{
    if (static_call) {
        QObject::timerEvent((QTimerEvent* )arg__1);
    } else {
        timerEvent((QTimerEvent* )arg__1);
    }
}
Exemple #3
0
void TopLevel::updateStatusBar()
{
  if ( mTimerId == -1 )
    mTimerId = startTimer( 2000 );

  // call timerEvent to fill the status bar with real values
  timerEvent( 0 );
}
void ONScripter::waitEventSub(int count)
{
    remaining_time = count;
    timerEvent();

    runEventLoop();
    removeEvent( ONS_BREAK_EVENT );
}
void QCoreApplication_QtDShell::__override_timerEvent(QTimerEvent*  arg__1, bool static_call)
{
    if (static_call) {
        QObject::timerEvent((QTimerEvent* )arg__1);
    } else {
        timerEvent((QTimerEvent* )arg__1);
    }
}
void QWebHistoryInterface_QtDShell::__override_timerEvent(QTimerEvent*  arg__1, bool static_call)
{
    if (static_call) {
        QObject::timerEvent((QTimerEvent* )arg__1);
    } else {
        timerEvent((QTimerEvent* )arg__1);
    }
}
void QAbstractTextDocumentLayout_QtDShell::__override_timerEvent(QTimerEvent*  arg__1, bool static_call)
{
    if (static_call) {
        QObject::timerEvent((QTimerEvent* )arg__1);
    } else {
        timerEvent((QTimerEvent* )arg__1);
    }
}
void QRegExpValidator_QtDShell::__override_timerEvent(QTimerEvent*  arg__1, bool static_call)
{
    if (static_call) {
        QObject::timerEvent((QTimerEvent* )arg__1);
    } else {
        timerEvent((QTimerEvent* )arg__1);
    }
}
Exemple #9
0
void QSlider_QtDShell::__override_timerEvent(QTimerEvent*  arg__1, bool static_call)
{
    if (static_call) {
        QAbstractSlider::timerEvent((QTimerEvent* )arg__1);
    } else {
        timerEvent((QTimerEvent* )arg__1);
    }
}
void QAbstractPageSetupDialog_QtDShell::__override_timerEvent(QTimerEvent*  arg__1, bool static_call)
{
    if (static_call) {
        QObject::timerEvent((QTimerEvent* )arg__1);
    } else {
        timerEvent((QTimerEvent* )arg__1);
    }
}
Exemple #11
0
void QTimeLine_QtDShell::__override_timerEvent(QTimerEvent*  event0, bool static_call)
{
    if (static_call) {
        QTimeLine::timerEvent((QTimerEvent* )event0);
    } else {
        timerEvent((QTimerEvent* )event0);
    }
}
Exemple #12
0
void QEventLoop_QtDShell::__override_timerEvent(QTimerEvent*  arg__1, bool static_call)
{
    if (static_call) {
        QObject::timerEvent((QTimerEvent* )arg__1);
    } else {
        timerEvent((QTimerEvent* )arg__1);
    }
}
void QGraphicsItemAnimation_QtDShell::__override_timerEvent(QTimerEvent*  arg__1, bool static_call)
{
    if (static_call) {
        QObject::timerEvent((QTimerEvent* )arg__1);
    } else {
        timerEvent((QTimerEvent* )arg__1);
    }
}
Exemple #14
0
void TimerContainer::tick()
{
    void *pool = application_->createAutounrefPool();

	double clock = stopWatch_.clock();

	while (queue_.empty() == false && queue_.begin()->first < clock)
	{
		std::vector<Timer*> timers = queue_.begin()->second;
		double curtime = queue_.begin()->first;

		queue_.erase(queue_.begin());

		for (std::size_t i = 0; i < timers.size(); ++i)
			if (timers[i]->running() == true)
				timers[i]->tick();

		for (std::size_t i = 0; i < timers.size(); ++i)
			if (timers[i]->running() == true)
				queue_[curtime + timers[i]->delay() / 1000].push_back(timers[i]);
	}

    while (!eventQueue_.empty())
    {
        Timer *timer = eventQueue_.front().first;
        int type = eventQueue_.front().second;
        eventQueue_.pop_front();

        timer->ref();
        application_->autounref(timer);

        if (type == 0)
        {
            TimerEvent timerEvent(TimerEvent::TIMER);
            timer->dispatchEvent(&timerEvent);
        }
        else if (type == 1)
        {
            TimerEvent timerEvent(TimerEvent::TIMER_COMPLETE);
            timer->dispatchEvent(&timerEvent);
        }
    }

    application_->deleteAutounrefPool(pool);
}
Exemple #15
0
void MainWindow::on_pbPause_clicked()
{
    ui->pbStart->setEnabled(true);
    ui->pbPause->setEnabled(false);
    ui->pbStop->setEnabled(true);
    timerEvent(new QTimerEvent(0));
    mTotalTime += mSessionTime;
    mRunning = false;
}
Exemple #16
0
void KDir::getEntries() {

    struct dirent *dp;

    if (!myOpendir) {
        QString ts = myLocation.path();
        myOpendir = opendir(ts);
        if (!myOpendir)
            return;
        dp = readdir(myOpendir); // take out the "."
    }

    if (myOpendir) {

        KFileInfo *i;
        QString path = myLocation.path();
        path += "/";

        do {
            dp = readdir(myOpendir);
            if (!dp)
                break;
            i = new KFileInfo(path, dp->d_name);
            CHECK_PTR(i);
            if (!i->fileName() || !i->fileName()[0]) {
                delete i;
                continue;
            }
            myEntries.append(i);

            /* if we just increase readFiles, if we found a file, it may
             * be, that we die on the wrong filter */
            readFiles++;

            if (filterEntry(i)) {
                KFileInfo *fi= new KFileInfo(*i);
                CHECK_PTR(fi);

                myFilteredEntries.append(fi);
                myFilteredNames.append(fi->fileName());
                myTmpEntries.append(fi);
            }
        } while (dp && readFiles < maxReturns);

        if (dp) { // there are still files left
            QTimer::singleShot(40, this, SLOT(timerEvent()));
        } else {
            closedir(myOpendir);
            myOpendir = 0;
            emit finished();
        }
    }

    myDirtyFlag= false;
    myFilteredDirtyFlag= false;
}
void radeon_profile::connectSignals()
{
    // fix for warrning: QMetaObject::connectSlotsByName: No matching signal for...
    connect(ui->combo_gpus,SIGNAL(currentIndexChanged(QString)),this,SLOT(gpuChanged()));
    connect(ui->combo_pProfile,SIGNAL(currentIndexChanged(int)),this,SLOT(changeProfileFromCombo()));
    connect(ui->combo_pLevel,SIGNAL(currentIndexChanged(int)),this,SLOT(changePowerLevelFromCombo()));

    connect(timer,SIGNAL(timeout()),this,SLOT(timerEvent()));
    connect(ui->timeSlider,SIGNAL(valueChanged(int)),this,SLOT(changeTimeRange()));
}
// This is used by the Context2D QtScript benchmark.
void Environment::triggerTimers()
{
    for (int x = 0; x < 2; ++x) {
        QList<int> timerIds = x ? m_intervalHash.keys() : m_timeoutHash.keys();
        for (int i = 0; i < timerIds.size(); ++i) {
            QTimerEvent fakeEvent(timerIds.at(i));
            timerEvent(&fakeEvent);
        }
    }
}
HttpSessionStore::HttpSessionStore(QSettings* settings, QObject* parent)
    :QObject(parent)
{
    this->settings=settings;
    connect(&cleanupTimer,SIGNAL(timeout()),this,SLOT(timerEvent()));
    cleanupTimer.start(60000);
    cookieName=settings->value("cookieName","sessionid").toByteArray();
    expirationTime=settings->value("expirationTime",18000000).toInt();
    qDebug("HttpSessionStore: Sessions expire after %i milliseconds",expirationTime);
}
Exemple #20
0
void
PlayField::startMoving(MoveSequence *ms) {
  static const int delay[4] = {0, 15, 35, 60};

  assert(moveSequence_ == 0 && !moveInProgress_);
  moveSequence_ = ms;
  moveInProgress_ = true;
  if (animDelay_) startTimer(delay[animDelay_]);
  timerEvent(0);
}
Exemple #21
0
InfoLogger::InfoLogger()
{
    mCpu = 0;
	mMem = 0;
	mGpu = 0;
	mPwr = 0;
    mState = 0;
    mDeviceUtils = new TasDeviceUtils();
    mTimer.setInterval(1000);
    connect(&mTimer, SIGNAL(timeout()), this, SLOT(timerEvent()));
}
tacticControl::tacticControl(WorldModel *worldmodel, QObject *parent) :
Tactic("tacticControl", worldmodel, parent)
{
canKick = false;
firstKick = false;
kicked = false;
timer = new QTimer();
state=0;
connect(timer,SIGNAL(timeout()),this,SLOT(timerEvent()));
alfa = 0;
}
Exemple #23
0
void PhxObject::event(PhxEvent *p_event)
{
	switch(p_event->type())
	{
	case PhxEvent::TimerEvent:
		timerEvent(reinterpret_cast<PhxTimerEvent*>(p_event));
		return;
	default:
		return;
	}
}
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QMainWindow::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: getBitPlane((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 1: getDisplayOption((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 2: getEdgeFilter((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 3: getImpulseNoise((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 4: getKLTQuality((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 5: getKLTMinDist((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 6: getKLTWindowSize((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 7: getKLTNumLevels((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 8: getLogarithmConstant((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 9: getOFAlgorithm((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 10: getPowerLawConstant((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 11: getPowerLawGamma((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 12: getR1((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 13: getK((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 14: getMinSize((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 15: getSharpeningAlgorithm((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 16: getSigma((*reinterpret_cast< double(*)>(_a[1]))); break;
        case 17: getSmoothingFilter((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 18: getSmoothingMask((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 19: exitApplication(); break;
        case 20: openImageDirectory(); break;
        case 21: toggleAddGaussianNoise(); break;
        case 22: toggleAddGammaNoise(); break;
        case 23: toggleAddImpulseNoise(); break;
        case 24: toggleBitPlaneSlicing(); break;
        case 25: toggleContrastStretching(); break;
        case 26: toggleFilter(); break;
        case 27: toggleFitToWindow(); break;
        case 28: toggleHistogramEqualization(); break;
        case 29: toggleLogarithm(); break;
        case 30: toggleNegative(); break;
        case 31: toggleOpticalFlow(); break;
        case 32: togglePowerLaw(); break;
        case 33: toggleSegmentation(); break;
        case 34: toggleSharpeningAlgorithm(); break;
        case 35: toggleSmoothing(); break;
        case 36: toggleSwapRedBlue(); break;
        case 37: updateImageNumber((*reinterpret_cast< int(*)>(_a[1]))); break;
        case 38: timerEvent((*reinterpret_cast< QTimerEvent*(*)>(_a[1]))); break;
        case 39: on_pushButtonTrack_clicked(); break;
        default: ;
        }
        _id -= 40;
    }
    return _id;
}
void STStripeAnimationView::visibilityChanged(){
    if(isVisible() && opacity()>=.01f && !(m_value>=0.f && m_value<=1.f)){
        if(!m_timer){
            m_timer=startTimer(32);
            timerEvent(NULL);
        }
    }else{
        if(m_timer){
            killTimer(m_timer);
            m_timer=0;
        }
    }
}
Exemple #26
0
MainWindow::MainWindow(QMainWindow *parent)
        :QMainWindow(parent)
{
     mw.setupUi(this);

     //Default Debug Settings. Set in Config file to overwrite
     logLevel=verbose;      //Default Level is Verbose
     logToFile=true;        //Default Level is to log to file


     //Variables
     userHomeDir = QStandardPaths::locate(QStandardPaths::HomeLocation, QString(), QStandardPaths::LocateDirectory);    //Default path to user home
     serverUrl = "";                // Url to destination folder; Must end with /
     defaultPage = "";              // Default page to show in the event of a 404
     defaultPageDuration = 0;      // Length of time to show default page in the event of a 404
     timerDelay = 5000;             // in milliseconds,  1000ms = 1s
     index = 0;                     // set array index to be 0

     //Set application name
     QCoreApplication::setOrganizationName("sign");
     QCoreApplication::setApplicationName("sign");

     //Initialize the application and if successful start timer.
     if(initializeSettings())
     {
         //Create web-engine for displaying the page
         view = new QWebEngineView(this);

         //Errata solution: Make sure we always get the most current page
         view->page()->profile()->setCachePath(userHomeDir + ".config/sign/tmp/browserCache");
         view->page()->profile()->setHttpCacheType(QWebEngineProfile::NoCache);
         view->page()->profile()->setPersistentCookiesPolicy(QWebEngineProfile::NoPersistentCookies);

         //Set display to the view
         setCentralWidget(view);

         //Create Timer
         timer = new QTimer(this);
         connect(timer, SIGNAL(timeout()), this, SLOT(timerEvent()));
         connect(timer, SIGNAL(timeout()), this, SLOT(timerStart()));
         timer->start(timerDelay);

         //Load initial page
         loadPage();
     }
     else
     {
         exit(EXIT_FAILURE);
     }
}
OrdinalPropertyAnimator::OrdinalPropertyAnimator()
    : Processor()
    , type_("property", "Property")
    , delay_("delay", "Delay (ms)", 50, 1, 10000, 1)
    , pbc_("pbc", "Periodic", true)
    , active_("active", "Active", false) 
    , timer_(delay_, [this](){timerEvent();})
{
    delay_.onChange(this, &OrdinalPropertyAnimator::updateTimerInterval);

    properties_.push_back(new PrimProp<float>("org.inviwo.FloatProperty", "org.inviwo.FloatProperty"));
    properties_.push_back(new VecProp<vec2>("org.inviwo.FloatVec2Property", "org.inviwo.FloatVec2Property"));
    properties_.push_back(new VecProp<vec3>("org.inviwo.FloatVec3Property", "org.inviwo.FloatVec3Property"));
    properties_.push_back(new VecProp<vec4>("org.inviwo.FloatVec4Property", "org.inviwo.FloatVec4Property"));
    properties_.push_back(new PrimProp<double>("org.inviwo.DoubleProperty","org.inviwo.DoubleProperty"));
    properties_.push_back(new VecProp<dvec2>("org.inviwo.DoubleVec2Property", "org.inviwo.DoubleVec2Property"));
    properties_.push_back(new VecProp<dvec3>("org.inviwo.DoubleVec3Property", "org.inviwo.DoubleVec3Property"));
    properties_.push_back(new VecProp<dvec4>("org.inviwo.DoubleVec4Property", "org.inviwo.DoubleVec4Property"));
    properties_.push_back(new PrimProp<int>("org.inviwo.IntProperty", "org.inviwo.IntProperty"));
    properties_.push_back(new VecProp<ivec2>("org.inviwo.IntVec2Property", "org.inviwo.IntVec2Property"));
    properties_.push_back(new VecProp<ivec3>("org.inviwo.IntVec3Property", "org.inviwo.IntVec3Property"));
    properties_.push_back(new VecProp<ivec4>("org.inviwo.IntVec4Property", "org.inviwo.IntVec4Property"));

    addProperty(type_);
    addProperty(active_);
    addProperty(delay_);
    addProperty(pbc_);

    int count = 0;
    for (auto p : properties_) {
        type_.addOption(p->classname_, p->displayName_, count);
        Property* prop = p->getProp();
        Property* delta = p->getDelta();

        addProperty(prop);
        addProperty(delta);
        prop->setVisible(false);
        delta->setVisible(false);
        count++;
    }
    type_.setSelectedIndex(0);
    type_.setCurrentStateAsDefault();
    
    type_.onChange(this, &OrdinalPropertyAnimator::changeProperty);
    active_.onChange(this, &OrdinalPropertyAnimator::changeActive);

    changeProperty();

    setAllPropertiesCurrentStateAsDefault();
}
Exemple #28
0
capture::capture(QObject *parent) : QObject(parent)
{
    cap.open(CamNum);
    if( cap.isOpened() )
    {
        cap.set(CV_CAP_PROP_FPS, _VIDEO_FPS);
        cap.set(CV_CAP_PROP_FRAME_WIDTH, _FRAME_WIDTH);
        cap.set(CV_CAP_PROP_FRAME_HEIGHT, _FRAME_HEIGTH);
        cap >> frame;


        main_timer = new QTimer(this);
        connect(main_timer,SIGNAL(timeout()),this,SLOT(timerEvent()));
        main_timer->start(2); //zaman? //chera delay?
    }
TasMultiGestureRunner::TasMultiGestureRunner(QList<TasGesture*> gestures, QObject* parent)
  :QObject(parent), mUseTapScreen(false)
{    
    connect(&mTimeLine, SIGNAL(valueChanged(qreal)), this, SLOT(timerEvent(qreal)));
    connect(&mTimeLine, SIGNAL(finished()), this, SLOT(finished()));
    //calculate duration multipliers
    int maxDuration = 0;
    foreach(TasGesture* gesture, gestures){
        if(gesture->getDuration() > maxDuration){
            maxDuration = gesture->getDuration();
        }
    }
    foreach(TasGesture* gesture, gestures){
        mGestures.insert(gesture, maxDuration/gesture->getDuration());
    }
EntitieCustomeWidget::EntitieCustomeWidget(QWidget *parent) :
    QWidget(parent){
    this->timer = new QTimer(this);
    connect(this->timer, SIGNAL(timeout()), SLOT(timerEvent()));
    this->timer->start(100);
    this->core = new Core;
    this->fildlist = new List<LineOfField*>();
    this->curFocus = -1;
    this->curObj = true;
    this->qbl = new QBoxLayout(QBoxLayout::TopToBottom);

    // Layout
    this->setLayout(qbl);

}