Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > a6bc312ce50b5c8d0c51736e58ac32bc > files > 251

kdebase-3.4.2-55mdk.src.rpm

--- kdebase-3.1.94/ksmserver/shutdown.cpp--	2003-12-19 08:28:12.271846184 -0500
+++ kdebase-3.1.94/ksmserver/shutdown.cpp	2003-12-19 08:28:34.248505224 -0500
@@ -61,6 +61,34 @@ void KSMShutdownFeedback::paintEvent( QP
     p.end();
 }
 
+void KSMShutdownFeedback::drawBackground( BrushStyle style )
+{
+    m_bBackgroundDraw = true;
+    QPainter p;
+    QBrush b( style );
+    p.begin( this );
+    p.fillRect( rect(), b);
+    p.end();
+    QTimer::singleShot( 150, this, SLOT(backgroundDraw()) );
+    while (m_bBackgroundDraw)
+        kapp->processEvents();
+
+}
+
+void KSMShutdownFeedback::backgroundDraw()
+{
+    m_bBackgroundDraw = false;
+}
+
+void KSMShutdownFeedback::specific()
+{
+    drawBackground( Qt::Dense7Pattern );
+    drawBackground( Qt::Dense6Pattern  );
+    drawBackground( Qt::Dense5Pattern  );
+    drawBackground( Qt::Dense4Pattern  );
+}
+
+
 //////
 
 KSMShutdownDlg::KSMShutdownDlg( QWidget* parent,
--- kdebase-3.1.94/ksmserver/shutdown.h--	2003-12-19 08:28:15.224397328 -0500
+++ kdebase-3.1.94/ksmserver/shutdown.h	2003-12-19 08:29:18.226819504 -0500
@@ -21,9 +21,11 @@ class KSMShutdownFeedback : public QWidg
     Q_OBJECT
 
 public:
-    static void start() { s_pSelf = new KSMShutdownFeedback(); s_pSelf->show(); }
+    static void start() { s_pSelf = new KSMShutdownFeedback(); s_pSelf->show();s_pSelf->specific(); }
     static void stop() { delete s_pSelf; s_pSelf = 0L; }
     static KSMShutdownFeedback * self() { return s_pSelf; }
+public slots:
+    void backgroundDraw();
 
 
 protected:
@@ -33,6 +35,10 @@ private:
     void paintEvent( QPaintEvent* );
     static KSMShutdownFeedback * s_pSelf;
     KSMShutdownFeedback();
+    void specific();
+    void drawBackground( BrushStyle style );
+    bool m_bBackgroundDraw;
+
 };
 
 // A radiobutton with a dblclk signal