summaryrefslogtreecommitdiffstats
path: root/src/widgets/ntqprogressbar.h
diff options
context:
space:
mode:
authorFrerich Raabe <raabe@kde.org>2014-09-16 03:15:39 +0200
committerSlávek Banko <slavek.banko@axis.cz>2014-09-16 03:41:40 +0200
commit0c5a2640a6ab97b1ba97eb2399bd58fb1e890f0c (patch)
treea25e6f2cdec89e052e1ffc5bb631030d4d07a653 /src/widgets/ntqprogressbar.h
parentb47847259808cc29f6bf98b8c788603d0d21a038 (diff)
downloadtqt3-0c5a2640a6ab97b1ba97eb2399bd58fb1e890f0c.tar.gz
tqt3-0c5a2640a6ab97b1ba97eb2399bd58fb1e890f0c.zip
Add repaint optimization to TQProgressBar
This optimization makes TQProgressBar::setProgress() only repaint itself if stepping to the new progress would cause a graphical change. This means that for a width W and a total number of steps S, it will repaint itself 'W' times (every 'S/W' steps) instead of 'S' times (every step) as it is right now.
Diffstat (limited to 'src/widgets/ntqprogressbar.h')
-rw-r--r--src/widgets/ntqprogressbar.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/ntqprogressbar.h b/src/widgets/ntqprogressbar.h
index ca73cd8a..ca90da2a 100644
--- a/src/widgets/ntqprogressbar.h
+++ b/src/widgets/ntqprogressbar.h
@@ -65,6 +65,7 @@ class Q_EXPORT TQProgressBar : public TQFrame
public:
TQProgressBar( TQWidget* parent=0, const char* name=0, WFlags f=0 );
TQProgressBar( int totalSteps, TQWidget* parent=0, const char* name=0, WFlags f=0 );
+ virtual ~TQProgressBar();
int totalSteps() const;
int progress() const;
@@ -95,6 +96,7 @@ protected:
virtual bool setIndicator( TQString & progress_str, int progress,
int totalSteps );
void styleChange( TQStyle& );
+ bool requireRepaint( int newProgress ) const;
private:
int total_steps;