Skip to content

Commit

Permalink
提交修改
Browse files Browse the repository at this point in the history
  • Loading branch information
daodaoliang committed May 16, 2017
1 parent 50b622b commit d34fe1c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Example/nbaseuikittest.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ private slots:
*/
void on_pushButton_26_clicked();

/**
* @brief on_pushButton_27_clicked 倒计时按钮
*/
void on_pushButton_27_clicked();

private:
Expand Down
10 changes: 10 additions & 0 deletions NBaseUiKit/inc/nbasecountdown.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ class NBASEUIKITSHARED_EXPORT NBaseCountDown : public NBaseMoveableWidget
*/
void startCountDown();

/**
* @brief stopCountDown 结束倒计时
*/
void stopCountDown();

/**
* @brief getWaveRadius 获取波纹半径
* @return
Expand Down Expand Up @@ -66,6 +71,11 @@ class NBASEUIKITSHARED_EXPORT NBaseCountDown : public NBaseMoveableWidget
*/
void signalWaveRadius(qreal paramWaveRadius);

/**
* @brief signalCountFinshed 倒计时结束信号
*/
void signalCountFinshed();

protected:

/**
Expand Down
6 changes: 6 additions & 0 deletions NBaseUiKit/src/nbasecountdown.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ void NBaseCountDown::startCountDown()
timerId = startTimer(1000);
}

void NBaseCountDown::stopCountDown()
{
close();
}

qreal NBaseCountDown::getWaveRadius() const
{
return waveRadius;
Expand Down Expand Up @@ -187,6 +192,7 @@ void NBaseCountDown::setCountDown(int value)
tempGreen = coreColorEnd.green() - 140/changeStep;
coreColorEnd.setGreen(tempGreen<0?0:tempGreen);
if(countDown-- <= 0){
emit signalCountFinshed();
close();
}
}

0 comments on commit d34fe1c

Please sign in to comment.