PictureCrypt  1.4.1
An image-steganography project
main.cpp
Go to the documentation of this file.
1 #include "controllerpc.h"
2 #include <QApplication>
3 #include <QTranslator>
4 #include <QLocale>
5 #include <QFontDatabase>
6 
7 int main(int argc, char *argv[])
8 {
9  QApplication a(argc, argv);
10 
11  QList<QString> fonts = { "Montserrat-Black.ttf", "Montserrat-BlackItalic.ttf", "Montserrat-Bold.ttf", "Montserrat-BoldItalic.ttf", "Montserrat-Medium.ttf", "Montserrat-MediumItalic.ttf", "Montserrat-Regular.ttf", "Montserrat-Italic.ttf", "Montserrat-Light.ttf", "Montserrat-LightItalic.ttf", "Montserrat-Thin.ttf", "Montserrat-ThinItalic.ttf" };
12 
13  foreach(const QString &font, fonts) {
14  if(QFontDatabase::addApplicationFont(":/fonts/" + font) == -1)
15  qDebug() << "Error loading font: " + font;
16  }
17 
18  QTranslator translator;
19  if (translator.load(QLocale(), QLatin1String("picturecrypt"), QLatin1String("_"), QLatin1String(":/translations"))) {
20  a.installTranslator(&translator);
21  } else {
22  qDebug() << "[!!!] cannot load translator " << QLocale::system().name() << " check content of translations.qrc";
23  }
24 
25  ControllerPC w;
26  return a.exec();
27 }
The ControllerPC class Controller class, which controls View and Model layers.
Definition: controllerpc.h:20
int main(int argc, char *argv[])
Definition: main.cpp:7