TrayIcon::TrayIcon(MainWindow* parent) : KStatusNotifierItem(parent) { setObjectName( "Ktimetracker Tray" ); // the timer that updates the "running" icon in the tray _taskActiveTimer = new QTimer(this); connect( _taskActiveTimer, SIGNAL( timeout() ), this, SLOT( advanceClock()) ); if (icons == 0) { icons = new QVector<QPixmap*>(8); for (int i=0; i<8; i++) { QPixmap *icon = new QPixmap(); QString name; name.sprintf("active-icon-%d.xpm",i); *icon = UserIcon(name); icons->insert(i,icon); } } TimetrackerWidget *timetrackerWidget = static_cast< TimetrackerWidget * >( parent->centralWidget() ); if ( timetrackerWidget ) { KAction *action = timetrackerWidget->action( "configure_ktimetracker" ); if ( action ) contextMenu()->addAction( action ); action = timetrackerWidget->action( "stopAll" ); if ( action ) contextMenu()->addAction( action ); } resetClock(); initToolTip(); }
/* * update: creates outputBytes to be shifted out * This should probably be in output() * update should probably update the ledArray */ void Display::createOutputBytes() { resetClock(); //clock++; for (int i = 0; i < numLEDs*3; ++i) { // set the bit in the byte if (setBit(ledArray[i])) outputByte[i/8] |= (1 << i); else outputByte[i/8] &= ~(1 << i); } }
void gkStats::nextFrame(void) { m_lastRender = m_render; m_lastLogicBricks = m_logicBricks; m_lastLogicNodes = m_logicNodes; m_lastPhysics = m_physics; m_lastDbvt = m_dbvt; m_lastSound = m_sound; m_lastBufswaplod = m_bufswaplod; m_lastAnimations = m_animations; m_lastProcess = m_process; resetClock(); m_lastTotal = m_clock->getMicroseconds(); m_clock->reset(); }
gkStats::gkStats() : m_start(0), m_render(0), m_logicBricks(0), m_logicNodes(0), m_physics(0), m_sound(0), m_bufswaplod(0), m_animations(0), m_process(0), m_lastRender(0), m_lastLogicBricks(0), m_lastLogicNodes(0), m_lastPhysics(0), m_lastDbvt(0), m_lastSound(0), m_lastBufswaplod(0), m_lastAnimations(0), m_lastTotal(0), m_lastProcess(0) { m_clock = new Ogre::Timer(); resetClock(); }