RsAutoUpdatePage

- Changed the timer of RsAutoUpdatePage to a single-shot timer.
  The update can take longer than the given timer interval.

Changed status service:
- send status when the peer connects (new monitor)
- send status to all online peers only when user changed it (not in every timer tick)

MessengerWindow:
- remove load and save of custom state string in settings

p3ChatService::sendCustomState
- send empty custom state string too

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3307 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2010-07-20 19:45:07 +00:00
parent f7282edf33
commit e3e4c97369
15 changed files with 145 additions and 133 deletions

View file

@ -9,10 +9,12 @@ RsAutoUpdatePage::RsAutoUpdatePage(int ms_update_period,QWidget *parent)
: MainPage(parent)
{
_timer = new QTimer ;
_timer->setInterval(ms_update_period);
_timer->setSingleShot(true);
QObject::connect(_timer,SIGNAL(timeout()),this,SLOT(timerUpdate())) ;
_timer->start(ms_update_period) ;
_timer->start() ;
}
void RsAutoUpdatePage::showEvent(QShowEvent *event)
@ -26,11 +28,12 @@ void RsAutoUpdatePage::timerUpdate()
{
// only update when the widget is visible.
//
if(_locked || !isVisible())
return ;
updateDisplay();
update() ; // Qt flush
if(_locked == false && isVisible()) {
updateDisplay();
update() ; // Qt flush
}
_timer->start() ;
}
void RsAutoUpdatePage::lockAllEvents() { _locked = true ; }