[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Tue Sep 7 19:16:33 CEST 2004


CVS commit by staikos: 

const cleanup, remove unneeded indirection, use KProgress, not QProgressBar


  M +2 -5      kst.cpp   1.231
  M +2 -6      kst.h   1.108
  M +8 -13     kstquickprogressbar.cpp   1.2
  M +3 -4      kstquickprogressbar.h   1.2


--- kdeextragear-2/kst/kst/kst.cpp  #1.230:1.231
@@ -180,5 +180,5 @@ KstApp::KstApp(QWidget *parent, const ch
   //checkFontPresent("Helvetica");
 
-  QFont defaultFont = QFont::QFont(); // QT's current default font
+  QFont defaultFont; // QT's current default font
   QFontInfo info(defaultFont);
   _defaultFont = info.family();
@@ -219,5 +219,5 @@ void KstApp::addNewWindowMenu() {
 
 
-const QString& KstApp::defaultFont( ) {
+const QString& KstApp::defaultFont() const {
   return _defaultFont;
 }
@@ -664,7 +664,4 @@ KstApp::KstZoomType KstApp::getZoomRadio
 }
 
-bool KstApp::getTieZoom() {
-  return 0; // (TiedZoomAction->isChecked());
-}
 
 void KstApp::initStatusBar() {

--- kdeextragear-2/kst/kst/kst.h  #1.107:1.108
@@ -77,6 +77,6 @@ class KstApp : public KMdiMainFrm {
     static KstApp* inst();
 
-    void checkFontPresent( const QString& strFont );
-    const QString& defaultFont( );
+    void checkFontPresent(const QString& font);
+    const QString& defaultFont() const;
     
     /** add a file to the recent file list */
@@ -105,7 +105,4 @@ class KstApp : public KMdiMainFrm {
     KstZoomType getZoomRadio();
 
-    /** Get tie zoom button state */
-    bool getTieZoom();
-
     KstTopLevelViewPtr activeView();
     Kst2DPlotMap& plotHolderWhileOpeningDocument();

--- kdeextragear-2/kst/kst/kstquickprogressbar.cpp  #1.1:1.2
@@ -18,27 +18,22 @@
 #include "kstquickprogressbar.h"
 
-KstQuickProgressBar::KstQuickProgressBar(QWidget * parent, const char * name) : QProgressBar(parent, name) {
+KstQuickProgressBar::KstQuickProgressBar(QWidget * parent, const char * name)
+: KProgress(parent, name) {
 }
 
 
-void KstQuickProgressBar::setTotalSteps(int totalSteps) {
-  QProgressBar::setTotalSteps(totalSteps);      
-  repaint(FALSE);
+KstQuickProgressBar::~KstQuickProgressBar() {
 }
 
 
-void KstQuickProgressBar::setProgress(int progress) {
-  QProgressBar::setProgress(progress);
+void KstQuickProgressBar::setTotalSteps(int totalSteps) {
+  KProgress::setTotalSteps(totalSteps); 
   repaint(FALSE);
 }          
 
 
-void KstQuickProgressBar::show() {
-  QProgressBar::show();
-}
-
-
-void KstQuickProgressBar::hide() {
-  QProgressBar::hide();
+void KstQuickProgressBar::setProgress(int progress) {
+  KProgress::setProgress(progress);
+  repaint(FALSE);
 }
 

--- kdeextragear-2/kst/kst/kstquickprogressbar.h  #1.1:1.2
@@ -19,15 +19,14 @@
 #define KSTQUICKPROGRESSBAR_H
 
-#include <qprogressbar.h>
+#include <kprogress.h>
 
-class KstQuickProgressBar : public QProgressBar {
+class KstQuickProgressBar : public KProgress {
   public:
     KstQuickProgressBar(QWidget * parent = 0, const char * name = 0);
+    virtual ~KstQuickProgressBar();
 
   public slots:
     virtual void setTotalSteps(int totalSteps);
     virtual void setProgress(int progress);
-    virtual void show();
-    virtual void hide();           
 };
 





More information about the Kst mailing list