EventViewer::EventViewer(QWidget *parent) : QWidget(parent) { EVLayout = new QVBoxLayout(this); m_data = 0; setMinimumHeight(500); titleLabel = new QLabel; setTitleLabel("DEMO"); EVLayout->addWidget(titleLabel); evt_plot = new Plot(this); rasterData = (SpectrogramData*) evt_plot->getSpectrogram()->data(); rasterData->resetData(); evt_plot->setMaximumSize(640,160); evt_plot->setMinimumSize(640,160); evt_plot->showContour(false); evt_plot->updateScale(); EVLayout->addWidget(evt_plot); btnLayout = new QHBoxLayout(); evtN_lab = new QLabel("Event N:",this); evtN_lcd = new QLCDNumber(6,this); integrate_chbx = new QCheckBox("Integrate",this); integrate_chbx->setProperty("isPixel",false); nextEvent_pbtn = new QPushButton(QIcon(":/images/next.png"),"Next",this); prevEvent_pbtn= new QPushButton(QIcon(":/images/prev.png"),"Prev",this);; rwd_pbtn = new QPushButton(QIcon(":/images/rew.png"),"RWD",this); fwd_pbtn = new QPushButton(QIcon(":/images/fwd.png"),"FWD",this); connect(nextEvent_pbtn, SIGNAL(clicked()), this, SLOT(nextEvent())); connect(prevEvent_pbtn, SIGNAL(clicked()), this, SLOT(prevEvent())); connect(rwd_pbtn, SIGNAL(clicked()), this, SLOT(rewindEvent())); connect(fwd_pbtn, SIGNAL(clicked()), this, SLOT(forwardEvent())); btnLayout->addWidget(evtN_lab); btnLayout->addWidget(evtN_lcd); btnLayout->addWidget(integrate_chbx); btnLayout->addWidget(prevEvent_pbtn); btnLayout->addWidget(nextEvent_pbtn); btnLayout->addWidget(rwd_pbtn); btnLayout->addWidget(fwd_pbtn); EVLayout->addLayout(btnLayout); evtView = new QTreeView(this); setupModel(); evtView->setColumnWidth(0 , 180); EVLayout->addWidget(evtView); }
bool LogFile::assertBefore(ACE_Time_Value const& _t) { bool valid = true; while (valid && coursor_->first >= _t) { valid = prevEvent(); } return valid; }
DECLARE_EXPORT Calendar::EventIterator& Calendar::EventIterator::operator--() { if (!theCalendar) throw LogicException("Can't walk backward on event iterator of NULL calendar."); // Go over all entries and ask them to update the iterator Date d = curDate; curDate = Date::infinitePast; for (const CalendarBucket *b = theCalendar->firstBucket; b; b = b->nextBucket) prevEvent(b, d); // Remember the bucket that won the evaluation lastBucket = curBucket; lastPriority = curPriority; return *this; }
void FileSystemManager::update() { if (_memberMutex.tryLock()) { // filter out duplicates QList<WatchableEvent> uniqueEventsList; WatchableEvent prevEvent(NULL, FileAdded, "", ""); for (unsigned int i = 0; i < eventList.size(); ++i) { if (eventList[i] != prevEvent) uniqueEventsList.append(eventList[i]); } // loop through each of the events in the unique list and // handle them QListIterator<WatchableEvent> iter(uniqueEventsList); while (iter.hasNext()) { const WatchableEvent& event = iter.next(); switch (event.watchEvent) { case FileAdded: event.obj->onFileAdded(event.param1); break; case FileDeleted: event.obj->onFileRemoved(event.param1); break; case FileRenamed: event.obj->onFileNameChanged(event.param1, event.param2); break; case FileModified: event.obj->onFileModified(event.param1); break; } } // clear the list of events eventList.clear(); _memberMutex.unlock(); } }
int eEventDisplay::eventHandler(const eWidgetEvent &event) { int addtype=-1; switch (event.type) { case eWidgetEvent::evtAction: if (event.action == &i_cursorActions->left) { if (events) prevEvent(); else close(1); // this go the prev event and call exec() (in epgwindow.cpp) } else if (event.action == &i_cursorActions->right) { if (events) nextEvent(); else close(2); // this go the next event and call exec() (in epgwindow.cpp) } else if (total && event.action == &i_cursorActions->up) { ePoint curPos = long_description->getPosition(); if ( curPos.y() < 0 ) { long_description->move( ePoint( curPos.x(), curPos.y() + pageHeight ) ); updateScrollbar(); } } else if (total && event.action == &i_cursorActions->down) { ePoint curPos = long_description->getPosition(); if ( (total - pageHeight ) >= abs( curPos.y() - pageHeight ) ) { long_description->move( ePoint( curPos.x(), curPos.y() - pageHeight ) ); updateScrollbar(); } } else if (event.action == &i_enigmaEventViewActions->close) close(0); else if ( (addtype = i_epgSelectorActions->checkTimerActions( event.action )) != -1 ) ; else if ( event.action == &i_epgSelectorActions->removeTimerEvent) { if ((evt || events) && eTimerManager::getInstance()->removeEventFromTimerList( this, &ref, evt?evt:*events ) ) timer_icon->hide(); } else break; if ( valid >= 7 && addtype != -1 && (evt || events) && !eTimerManager::getInstance()->eventAlreadyInList(this, evt?*evt:*events, ref) ) { hide(); eTimerEditView v( evt?*evt:*events, addtype, ref ); v.show(); v.exec(); v.hide(); checkTimerIcon(evt?evt:*events); show(); } return 1; default: break; } return eWindow::eventHandler(event); }