Example #1
0
void ScanDialog::slotAcquireStart( )
{
   if( m_scanParams )
   {
      KLed *led = m_scanParams->operationLED();
      if( led )
      {
	 led->setColor( Qt::green );
      }

   }
}
Example #2
0
void ScanDialog::slotScanStart( )
{
   if( m_scanParams )
   {
      m_scanParams->setEnabled( false );
      KLed *led = m_scanParams->operationLED();
      if( led )
      {
	 led->setColor( Qt::red );
	 led->setState( KLed::On );
      }

   }
}
Example #3
0
void ScanDialog::slotScanFinished( KScanStat status )
{
   kdDebug(29000) << "Scan finished with status " << status << endl;
   if( m_scanParams )
   {
      m_scanParams->setEnabled( true );
      KLed *led = m_scanParams->operationLED();
      if( led )
      {
	 led->setColor( Qt::green );
	 led->setState( KLed::Off );
      }

   }
}
QPixmap JobModel::statusImage(JobInfo::State state) const
{
    QColor color;
    if ( state == JobInfo::Running )
        color = ( QTime::currentTime().msec() < 500 ) ?  Qt::gray : Qt::green;
    else if ( state == JobInfo::Completed )
        color = Qt::red;
    else
        color = QColor(Qt::yellow).darker();

    KLed led;
    led.setColor(color);

    QPalette pal = led.palette();
    pal.setColor(QPalette::Window, Qt::white);
    led.setPalette(pal);

    return QPixmap::grabWidget(&led);
}
Example #5
0
QPixmap JobModel::statusImage(JobInfo::State state) const
{
    QColor color;
    if ( state == JobInfo::Running )
        color = blinkStateOn ?  Qt::green : Qt::gray;
    else if ( state == JobInfo::Completed )
        color = Qt::red;
    else
        color = QColor(Qt::yellow).darker();

    KLed led;
    led.setColor(color);

    QPalette pal = led.palette();
    pal.setColor(QPalette::Window, Qt::white);
    led.setPalette(pal);

    return led.grab();
}