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

List:       kde-commits
Subject:    branches/work/koffice-isi/kpresenter/part
From:       Johann Hingue <yoan1703 () hotmail ! fr>
Date:       2009-01-16 13:58:05
Message-ID: 1232114285.530147.21400.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 912007 by hingue:

Delete static methods


 M  +30 -23    KPrPresentationTool.cpp  
 M  +6 -5      KPrPresentationTool.h  


--- branches/work/koffice-isi/kpresenter/part/KPrPresentationTool.cpp #912006:912007
@@ -41,15 +41,14 @@
 #include "KPrViewModePresentation.h"
 
 
-bool KPrPresentationTool::drawMode = false;
-bool KPrPresentationTool::highlightMode = false;
 
 KPrPresentationTool::KPrPresentationTool( KPrViewModePresentation & viewMode )
 : KoTool( viewMode.canvas() )
 , m_viewMode( viewMode )
 {    
     // init
-    KPrPresentationTool::highlightMode = false;
+    m_drawMode = false;
+    m_highlightMode = false;
 
     // tool box
     m_frame = new QFrame( m_viewMode.canvas() );
@@ -126,10 +125,10 @@
     switch ( event->key() )
     {
         case Qt::Key_Escape:
-	    if(KPrPresentationTool::drawMode)
-	    this->drawOnPresentation();
-	else
-            m_viewMode.activateSavedViewMode();
+	    if(m_drawMode)
+	      this->drawOnPresentation();
+	    else
+	      m_viewMode.activateSavedViewMode();
             break;
         case Qt::Key_Home:
             m_viewMode.navigate( KPrAnimationDirector::FirstPage );
@@ -198,13 +197,16 @@
     QSize size = m_viewMode.canvas()->size();
     QPixmap newPage( size );
     if(newPage.isNull())
-	return;
-	
-    if ( KPrPresentationTool::highlightMode ) {
-	KPrPresentationTool::highlightMode = false;
+      return;
+
+    if ( m_highlightMode )
+    {
+	m_highlightMode = false;
 	delete m_blackBackgroundwidget;
-    } else {
-	KPrPresentationTool::highlightMode = true;
+    } 
+    else 
+    {
+	m_highlightMode = true;
 	m_blackBackgroundwidget = new KPrPresentationHighlightWidget( m_viewMode.canvas() );
 	m_blackBackgroundwidget->show();
     }
@@ -250,14 +252,14 @@
 
 bool KPrPresentationTool::getDrawMode()
 {
-    return KPrPresentationTool::drawMode;
+    return m_drawMode;
 }
 
 void KPrPresentationTool::switchDrawMode()
 {
-    if(!KPrPresentationTool::drawMode)
+    if(!m_drawMode)
     {
-        KPrPresentationTool::drawMode = true;
+        m_drawMode = true;
         QString str("kpresenter");
         KIconLoader kicon(str);
         str.clear();
@@ -272,19 +274,24 @@
     }
     else
     {
-        KPrPresentationTool::drawMode = false;
+        m_drawMode = false;
         QApplication::restoreOverrideCursor();
     }
 }
 
+bool KPrPresentationTool::getHighlightMode()
+{
+    return m_highlightMode;
+}
+
 void KPrPresentationTool::switchHighlightMode()
 {
-    if(!KPrPresentationTool::highlightMode){
-	KPrPresentationTool::highlightMode = true;
+    if(!m_highlightMode){
+	m_highlightMode = true;
     }
     else
     {
-	KPrPresentationTool::highlightMode = false;
+	m_highlightMode = false;
     }
 }
 
@@ -292,7 +299,7 @@
 {
     presentationToolWidget->presentationToolUi().penButton->setText("test...");
     switchDrawMode();
-    presentationToolWidget->presentationToolUi().penButton->setDown(KPrPresentationTool::drawMode);
+    presentationToolWidget->presentationToolUi().penButton->setDown(m_drawMode);
 }
 
 // get the acces on m_frame
@@ -310,11 +317,11 @@
 
 void KPrPresentationTool::setBlackBackgroundVisibility(bool b)
 {
-    KPrPresentationTool::highlightMode = b;
+    m_highlightMode = b;
 }
 
 bool KPrPresentationTool::getBlackBackgroundVisibility()
 {
-    return KPrPresentationTool::highlightMode;
+    return m_highlightMode;
 }
 #include "KPrPresentationTool.moc"
--- branches/work/koffice-isi/kpresenter/part/KPrPresentationTool.h #912006:912007
@@ -54,7 +54,8 @@
     QWidget *m_blackBackgroundPresentation();
     void setBlackBackgroundVisibility(bool b);
     bool getBlackBackgroundVisibility();
-		static bool getDrawMode();
+    bool getDrawMode();
+    bool getHighlightMode();
     
 public slots:
     void activate( bool temporary = false );
@@ -64,16 +65,16 @@
 
 private:
     void finishEventActions();
-		void switchDrawMode();
-    static void switchHighlightMode();
     KPrViewModePresentation & m_viewMode;
+    void switchDrawMode();
+    void switchHighlightMode();
     QList<KoEventAction *> m_eventActions;
     KPrPresentationToolWidget *presentationToolWidget;
     QFrame *m_frame;
     QFrame *m_blackBackgroundframe;
     KPrPresentationHighlightWidget * m_blackBackgroundwidget;
-    static bool highlightMode;
-    static bool drawMode;
+    bool m_highlightMode;
+    bool m_drawMode;
 
 };
 
[prev in list] [next in list] [prev in thread] [next in thread] 

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