summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qpdf/qbusybar.cpp
authoralwin <alwin>2004-03-02 12:21:11 (UTC)
committer alwin <alwin>2004-03-02 12:21:11 (UTC)
commitb6b1c97559c0ed9f2e33632272426bf98f289232 (patch) (side-by-side diff)
treed3a9987704770cdf5eb14e1136f6e3ecb2f36a04 /noncore/unsupported/qpdf/qbusybar.cpp
parent0d59c780513da78033f4d9040475dee9db0256d4 (diff)
downloadopie-b6b1c97559c0ed9f2e33632272426bf98f289232.zip
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.gz
opie-b6b1c97559c0ed9f2e33632272426bf98f289232.tar.bz2
applied the patch generated by the optimize_connect script from
TT.
Diffstat (limited to 'noncore/unsupported/qpdf/qbusybar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/qpdf/qbusybar.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/unsupported/qpdf/qbusybar.cpp b/noncore/unsupported/qpdf/qbusybar.cpp
index ce7ab8e..e942f06 100644
--- a/noncore/unsupported/qpdf/qbusybar.cpp
+++ b/noncore/unsupported/qpdf/qbusybar.cpp
@@ -1,68 +1,68 @@
#include <qapplication.h>
#include <qtimer.h>
#include <qpainter.h>
#include "qbusybar.h"
QBusyBar::QBusyBar ( QWidget *parent, const char *name, int flags ) : QWidget ( parent, name, flags | WRepaintNoErase )
{
m_busy = 0;
m_div = 0;
m_pos = 0;
m_fade = 0;
m_fadecols = 0;
m_speed = 500;
m_timer = new QTimer ( this );
- connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( slotTimeout ( )));
+ connect ( m_timer, SIGNAL( timeout()), this, SLOT( slotTimeout()));
setParameters ( 12, 8, 200 );
}
void QBusyBar::setParameters ( int d, int s, int v )
{
bool running = m_timer-> isActive ( );
if ( running )
m_timer-> stop ( );
m_div = d;
m_speed = v;
delete [] m_fadecols;
m_fade = s;
m_fadecols = new QColor [m_fade];
int rt, gt, bt;
int rf, gf, bf;
colorGroup ( ). color ( QColorGroup::Highlight ). rgb ( &rf, &gf, &bf );
colorGroup ( ). color ( QColorGroup::Background ). rgb ( &rt, &gt, &bt );
for ( int i = 0; i < s; i++ )
m_fadecols [i]. setRgb ( rf + ( rt - rf ) * i / s, gf + ( gt - gf ) * i / s, bf + ( bt - bf ) * i / s );
if ( running ) {
m_pos = 0;
m_timer-> start ( m_speed );
}
}
QBusyBar::~QBusyBar ( )
{
delete [] m_fadecols;
}
bool QBusyBar::isBusy ( ) const
{
return m_busy;
}
void QBusyBar::beginBusy ( )
{
setBusy ( true );
}