Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.64 KB | None | 0 0
  1. void wagerwindow::updateFiles()
  2. {
  3.     ccStream.device()->open(QIODevice::WriteOnly);
  4.     hsStream.device()->open(QIODevice::WriteOnly);
  5.     ccStream<<(qint32)currentBalance;
  6.     hsStream<<(qint32)highScore;
  7.     ccStream.device()->close();
  8.     hsStream.device()->close();
  9. }
  10.  
  11. void wagerwindow::readFromFiles()
  12. {
  13.    ccStream.device()->open(QIODevice::ReadOnly);
  14.    hsStream.device()->open(QIODevice::ReadOnly);
  15.    ccStream>>currentBalance;
  16.    hsStream>>highScore;
  17.    ccStream.device()->close();
  18.    hsStream.device()->close();
  19.  
  20.    wagerButton->setText(QString::number(currentBalance));
  21.    this->setWindowTitle(QString::number(highScore));
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement