Began proof-of-concept memory module.
[aesalon.git] / src / visualizer / Aesalon.cpp
blob20d6e232cfdcb2b4655a65f2cca49f43dcc21a84
1 /** Aesalon, a tool to visualize program behaviour in real time.
2 Copyright (C) 2009-2011, Aesalon development team.
4 Aesalon is distributed under the terms of the GNU GPLv3. See
5 the included file LICENSE for more information.
7 @file src/visualizer/Aesalon.cpp
8 */
10 #include <QApplication>
11 #include <QThreadPool>
13 #include "visualizer/RootWindow.h"
14 #include "util/MessageSystem.h"
15 #include "util/StringTo.h"
16 #include "config/GlobalVault.h"
18 int main(int argc, char *argv[]) {
19 QApplication qapp(argc, argv);
21 Message(Debug, "According to Qt, the ideal thread count is " << QThread::idealThreadCount() << ".");
23 Config::GlobalVault gv;
24 int threadCount = Util::StringTo<int>(gv.get("visualizer:threadCount"));
26 if(threadCount != 0) {
27 Message(Debug, "Setting thread count to " << threadCount << ".");
28 QThreadPool::globalInstance()->setMaxThreadCount(threadCount);
31 Visualizer::RootWindow rw;
32 rw.show();
34 return qapp.exec();