void MainWindow::updateEverythingOtherThanExpenses() { getJobsAndTasksForCurrentDate(); updateListWidgets(); calculateIncome(); calculateGrandTotal(); checkForUnpaidJobs(); }
void Map::swapTurn() { movType=NOTHING; selectedRegion = NULL; if(playerTurn==NULL || playerTurn==nullptr) { std::vector<Player>::iterator it; for(it = players.begin(); it!=players.end(); it++) { if(it->numberId == 1) playerTurn = &*it; } } else { playerTurn->realm->money += calculateIncome(playerTurn->realm); int num=playerTurn->numberId+1; std::vector<Player>::iterator it; for(it = players.begin(); it!=players.end(); it++) { if(it->numberId == num) playerTurn = &*it; } if(playerTurn->numberId>=players.size() && playerTurn->numberId!=num) { turnNumber+=1; std::vector<Player>::iterator it2; for(it2 = players.begin(); it2!=players.end(); it2++) { if(it2->numberId == 1) { playerTurn = &*it2; } } } } }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow), timer(new QTimer(this)), unpaidJobsReminderClicked(false) { ui->setupUi(this); setWindowTitle(windowTitle); EmailerThread::init(this); connect(timer, SIGNAL(timeout()), this, SLOT(checkInternetConnection())); timer->start(EmailerThread::queueCheckTimePeriod); getJobsAndTasksForCurrentDate(); updateListWidgets(); calculateIncome(); calculateExpenses(); calculateGrandTotal(); checkForUnpaidJobs(); if (SettingController::getAllSettings()->empty()) SettingForm(this).exec(); updateFinancialMonthText(); }