Mercurial > minori
view src/core/session.cc @ 367:8d45d892be88 default tip
*: instead of pugixml, use Qt XML features
this means we have one extra Qt dependency though...
author | Paper <paper@tflc.us> |
---|---|
date | Sun, 17 Nov 2024 22:55:47 -0500 |
parents | d928ec7b6a0d |
children |
line wrap: on
line source
#include "core/session.h" #include "core/strings.h" #include "core/config.h" #include "gui/window.h" #include "gui/locale.h" #include <QElapsedTimer> #include <QStatusBar> #include "semver/semver.hpp" #include <atomic> Session session; Session::Session() : gen(Time::GetSystemTime()) { timer_.start(); } void Session::SetMainWindow(MainWindow* window) { disconnect(); window_ = window; connect(this, &Session::StatusBarChange, window_, &MainWindow::SetStatusMessage); } void Session::SetStatusBar(const std::string& message) { emit StatusBarChange(message); } void Session::IncrementRequests() { requests_++; }; unsigned int Session::GetRequests() { return requests_; }; int Session::uptime() { return timer_.elapsed(); }