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

List:       kde-commits
Subject:    branches/KDE/3.5/kdebase/kdm/kfrontend/themer
From:       Oswald Buddenhagen <ossi () kde ! org>
Date:       2005-08-21 12:18:44
Message-ID: 1124626724.429265.21714.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 451648 by ossi:

less typing for needUpdate()


 M  +8 -2      kdmitem.cpp  
 M  +5 -0      kdmitem.h  
 M  +2 -2      kdmlabel.cpp  
 M  +1 -1      kdmpixmap.cpp  
 M  +1 -1      kdmrect.cpp  


--- branches/KDE/3.5/kdebase/kdm/kfrontend/themer/kdmitem.cpp #451647:451648
@@ -98,6 +98,12 @@
 }
 
 void
+KdmItem::needUpdate()
+{
+	emit needUpdate( area.x(), area.y(), area.width(), area.height() );
+}
+
+void
 KdmItem::show( bool force )
 {
 	if (isShown != InitialHidden && !force)
@@ -113,7 +119,7 @@
 		myWidget->show();
 	// XXX showing of layouts not implemented, prolly pointless anyway
 
-	needUpdate( area.x(), area.y(), area.width(), area.height() );
+	needUpdate();
 }
 
 void
@@ -137,7 +143,7 @@
 		myWidget->hide();
 	// XXX hiding of layouts not implemented, prolly pointless anyway
 
-	needUpdate( area.x(), area.y(), area.width(), area.height() );
+	needUpdate();
 }
 
 void
--- branches/KDE/3.5/kdebase/kdm/kfrontend/themer/kdmitem.h #451647:451648
@@ -188,6 +188,11 @@
 	 */
 	virtual void statusChanged();
 
+	/**
+	 * emits needUpdate( int, int, int, int ) with the full widget area.
+	 */
+	void needUpdate();
+
 	// This enum identifies in which state the item is
 	enum ItemState { Snormal, Sactive, Sprelight } state;
 
--- branches/KDE/3.5/kdebase/kdm/kfrontend/themer/kdmlabel.cpp #451647:451648
@@ -150,7 +150,7 @@
 	if ((state == Sprelight && !label.prelight.present) ||
 	    (state == Sactive && !label.active.present))
 		return;
-	needUpdate( area.x(), area.y(), area.width(), area.height() );
+	needUpdate();
 }
 
 void
@@ -159,7 +159,7 @@
 	QString text = lookupText( label.text );
 	if (text != cText) {
 		cText = text;
-		needUpdate( area.x(), area.y(), area.width(), area.height() );
+		needUpdate();
 	}
 }
 
--- branches/KDE/3.5/kdebase/kdm/kfrontend/themer/kdmpixmap.cpp #451647:451648
@@ -234,7 +234,7 @@
 	if ((state == Sprelight && !pixmap.prelight.present) ||
 	    (state == Sactive && !pixmap.active.present))
 		return;
-	needUpdate( area.x(), area.y(), area.width(), area.height() );
+	needUpdate();
 }
 
 #include "kdmpixmap.moc"
--- branches/KDE/3.5/kdebase/kdm/kfrontend/themer/kdmrect.cpp #451647:451648
@@ -111,7 +111,7 @@
 	if ((state == Sprelight && !rect.prelight.present) ||
 	    (state == Sactive && !rect.active.present))
 		return;
-	needUpdate( area.x(), area.y(), area.width(), area.height() );
+	needUpdate();
 }
 
 /*
[prev in list] [next in list] [prev in thread] [next in thread] 

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