[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/devtools/kommander-plugins/timewidget/src
From:       Eric Laffoon <sequitur () kde ! org>
Date:       2009-09-07 15:56:06
Message-ID: 1252338966.867558.5465.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1020927 by sequitur:

added geometry, hasFocus and background color functions

 M  +20 -1     timewidget.cpp  


--- trunk/playground/devtools/kommander-plugins/timewidget/src/timewidget.cpp \
#1020926:1020927 @@ -134,7 +134,7 @@
 
 bool TimeWidget::isFunctionSupported(int f)
 {
-  return f == DCOP::text || f == DCOP::setText || f == DCOP::clear || (f >= \
FirstFunction && f <= LastFunction); +  return f == DCOP::text || f == DCOP::setText \
|| f == DCOP::clear || f == DCOP::geometry || f == DCOP::hasFocus || f == \
DCOP::getBackgroundColor || f == DCOP::setBackgroundColor || (f >= FirstFunction && f \
<= LastFunction);  //  return (f >= FirstFunction && f <= LastFunction); //see \
specials.h for other DCOP functions you might want to support  }
 
@@ -161,6 +161,25 @@
     case tw_setDisplay:
       setDisplay(args[0].toInt() + args[1].toInt()*2 + args[2].toInt()*4 + \
args[3].toInt()*16);  break;
+    case DCOP::geometry:
+    {
+      QString geo = QString::number(this->x())+" "+QString::number(this->y())+" \
"+QString::number(this->width())+" "+QString::number(this->height()); +      return \
geo; +      break;
+    }
+    case DCOP::hasFocus:
+      return QString::number(this->hasFocus());
+      break;
+    case DCOP::getBackgroundColor:
+      return this->paletteBackgroundColor().name();
+      break;
+    case DCOP::setBackgroundColor:
+    {
+      QColor color;
+      color.setNamedColor(args[0]);
+      this->setPaletteBackgroundColor(color);
+      break;
+    }
     default:
       return KommanderWidget::handleDCOP(function, args);
   }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic