TimeTrackingWindow::TimeTrackingWindow( QWidget* parent ) : CharmWindow( tr( "Time Tracker" ), parent ) , m_weeklyTimesheetDialog( 0 ) , m_monthlyTimesheetDialog( 0 ) , m_activityReportDialog( 0 ) , m_summaryWidget( new TimeTrackingView( toolBar(), this ) ) , m_billDialog( new BillDialog( this ) ) { setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); setWindowNumber( 3 ); setWindowIdentifier( QLatin1String( "window_tracking" ) ); setCentralWidget( m_summaryWidget ); connect( m_summaryWidget, SIGNAL( startEvent( TaskId ) ), SLOT( slotStartEvent( TaskId ) ) ); connect( m_summaryWidget, SIGNAL( stopEvents() ), SLOT( slotStopEvent() ) ); connect( &m_checkUploadedSheetsTimer, SIGNAL( timeout() ), SLOT( slotCheckUploadedTimesheets() ) ); connect( m_billDialog, SIGNAL( finished(int) ), SLOT( slotBillGone(int) ) ); //Check every 60 minutes if there are timesheets due m_checkUploadedSheetsTimer.setInterval(60 * 60 * 1000); if (CONFIGURATION.warnUnuploadedTimesheets) m_checkUploadedSheetsTimer.start(); }
void RobotControl::stopPosRecording() { posTimer.stop(); stopEvents(); is_recording = false; setPosReporting(false); }
void TimeTrackingView::mouseDoubleClickEvent( QMouseEvent* event ) { // we rely on the mouse press event that was received before the doubleclick! // start tracking const int position = getSummaryAt( event->pos() ); if ( position < 0 ) return; const TaskId id = m_summaries.at( position ).task; if ( !DATAMODEL->isTaskActive( id ) ) { emit stopEvents(); emit startEvent( id ); } else { emit stopEvents(); } }
Raid::~Raid() { stopEvents(); for(RaidEventVector::iterator it = raidEvents.begin(); it != raidEvents.end(); it++) delete (*it); raidEvents.clear(); }
Raid::~Raid() { stopEvents(); for (RaidEvent* raidEvent : raidEvents) { delete raidEvent; } }
void RobotControl::startPosRecording(QList<PositionMeasurement> * pM) { pMmt = pM; if (!is_time_synced) return; stopPosRecording(); stopEvents(); setPosReporting(true); is_recording = true; posTimer.start(200); startEvents(); }
TimeTrackingView::TimeTrackingView( QToolBar* toolBar, QWidget* parent ) : QWidget( parent ) , m_taskSelector( new TimeTrackingTaskSelector( toolBar, this ) ) , m_dayOfWeek( 0 ) { setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); // plumbing m_paintAttributes.initialize( palette() ); for( int i = 0; i < 7; ++i ) { m_shortDayNames[i] = QDate::shortDayName( i + 1 ); } connect( m_taskSelector, SIGNAL( startEvent( TaskId ) ), SIGNAL( startEvent( TaskId ) ) ); connect( m_taskSelector, SIGNAL( stopEvents() ), SIGNAL( stopEvents() ) ); connect( m_taskSelector, SIGNAL( updateSummariesPlease() ), SLOT( slotUpdateSummaries() ) ); setFocusProxy( m_taskSelector ); setFocusPolicy( Qt::StrongFocus ); }
TimeTrackingView::TimeTrackingView( QToolBar* toolBar, QWidget* parent ) : QWidget( parent ) , m_taskSelector( new TimeTrackingTaskSelector( toolBar, this ) ) , m_dayOfWeek( 0 ) { #ifdef Q_WS_MAC m_fixedFont.setFamily( "Andale Mono" ); m_fixedFont.setPointSize( 11 ); m_narrowFont = font(); // stay with the desktop m_narrowFont.setPointSize( 11 ); #else m_fixedFont = font(); m_fixedFont.setPointSizeF( 0.9 * m_fixedFont.pointSizeF() ); m_narrowFont = m_fixedFont; #endif setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); // plumbing m_pulse.setLoopCount( 0 ); m_pulse.setDuration( 2000 ); m_paintAttributes.initialize( palette() ); m_pulse.setCurveShape( QTimeLine::SineCurve ); for( int i = 0; i < 7; ++i ) { m_shortDayNames[i] = QDate::shortDayName( i + 1 ); } connect( &m_pulse, SIGNAL( valueChanged( qreal ) ), SLOT( slotPulseValueChanged( qreal ) ) ); connect( m_taskSelector, SIGNAL( startEvent( TaskId ) ), SIGNAL( startEvent( TaskId ) ) ); connect( m_taskSelector, SIGNAL( stopEvents() ), SIGNAL( stopEvents() ) ); connect( m_taskSelector, SIGNAL( updateSummariesPlease() ), SLOT( slotUpdateSummaries() ) ); setFocusProxy( m_taskSelector ); setFocusPolicy( Qt::StrongFocus ); }
bool Raid::resetRaid(bool checkExecution) { if(checkExecution && nextEvent) return true; stopEvents(); if(refType == REF_BLOCK && refCount > 0) return false; if(refType != REF_SINGLE || refCount <= 0) eventCount = 0; if(Raids::getInstance()->getRunning() == this) { Raids::getInstance()->setRunning(NULL); Raids::getInstance()->setLastRaidEnd(OTSYS_TIME()); } return true; }