[Kst] kdeextragear-2/kst/kst

George Staikos staikos at kde.org
Wed Sep 8 08:06:04 CEST 2004


CVS commit by staikos: 

add comments, remove unused members, and make the slots work (Q_OBJECT
required)


  M +4 -12     kstquicklabel.cpp   1.2
  M +4 -3      kstquicklabel.h   1.2
  M +4 -3      kstquickprogressbar.cpp   1.3
  M +4 -0      kstquickprogressbar.h   1.3


--- kdeextragear-2/kst/kst/kstquicklabel.cpp  #1.1:1.2
@@ -18,5 +18,6 @@
 #include "kstquicklabel.h"
 
-KstQuickLabel::KstQuickLabel(const QString& text, QWidget* parent) : QLabel(text, parent) {
+KstQuickLabel::KstQuickLabel(const QString& text, QWidget *parent)
+: QLabel(text, parent) {
 }
 
@@ -24,16 +25,7 @@ KstQuickLabel::KstQuickLabel(const QStri
 void KstQuickLabel::setText(const QString& text) {
   QLabel::setText(text);
-  repaint(TRUE);
-}
-
-
-void KstQuickLabel::show() {
-  QLabel::show();
-}
-
-
-void KstQuickLabel::hide() {
-  QLabel::hide();
+  repaint(true);
 }
 
+#include "kstquicklabel.moc"
 // vim: ts=2 sw=2 et

--- kdeextragear-2/kst/kst/kstquicklabel.h  #1.1:1.2
@@ -21,13 +21,14 @@
 #include <qlabel.h>
 
+// Inefficient - only use if you want to force a repaint immediately after
+// each setText(QString)
 
 class KstQuickLabel : public QLabel {
+  Q_OBJECT
   public:
-    KstQuickLabel(const QString& text, QWidget * parent);
+    KstQuickLabel(const QString& text, QWidget *parent);
 
   public slots:
     virtual void setText(const QString&);
-    virtual void show();
-    virtual void hide();           
 };
 

--- kdeextragear-2/kst/kst/kstquickprogressbar.cpp  #1.2:1.3
@@ -29,5 +29,5 @@ KstQuickProgressBar::~KstQuickProgressBa
 void KstQuickProgressBar::setTotalSteps(int totalSteps) {
   KProgress::setTotalSteps(totalSteps); 
-  repaint(FALSE);
+  repaint(false);
 }
 
@@ -35,6 +35,7 @@ void KstQuickProgressBar::setTotalSteps(
 void KstQuickProgressBar::setProgress(int progress) {
   KProgress::setProgress(progress);
-  repaint(FALSE);
+  repaint(false);
 }          
 
+#include "kstquickprogressbar.moc"
 // vim: ts=2 sw=2 et

--- kdeextragear-2/kst/kst/kstquickprogressbar.h  #1.2:1.3
@@ -21,5 +21,9 @@
 #include <kprogress.h>
 
+// Inefficient - only use if you want a repaint forced immediately after
+// setTotalSteps() or setProgress()
+
 class KstQuickProgressBar : public KProgress {
+  Q_OBJECT
   public:
     KstQuickProgressBar(QWidget * parent = 0, const char * name = 0);





More information about the Kst mailing list