File: main.cpp

package info (click to toggle)
cortina 0.7.3-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 2,420 kB
  • ctags: 132
  • sloc: cpp: 1,280; makefile: 10
file content (35 lines) | stat: -rwxr-xr-x 1,234 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
        This Program was written by Eric Baudach <Eric.Baudach@web.de>
        and is licensed under the GPL version 3 or newer versions of GPL.

                    <Copyright (C) 2010-2011 Eric Baudach>
 */

#include <QtGui/QApplication>
#include <widget.h>
#include <QTranslator>
#include <QGtkStyle>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    //a.setGraphicsSystem("opengl");
    a.setEffectEnabled(Qt::UI_AnimateCombo, true);
    a.setEffectEnabled(Qt::UI_AnimateMenu, true);
    a.setEffectEnabled(Qt::UI_FadeTooltip, true);
    a.setEffectEnabled(Qt::UI_FadeMenu, true);
    a.setStyle(QStyleFactory::create("GTK+"));

    QTranslator qtTranslator;
    if(!qtTranslator.load(QLocale::system().name(), QLibraryInfo::location(QLibraryInfo::TranslationsPath) + "/cortina")) {
        if(QLocale::system().name().startsWith("en_") == false) {
            qDebug() << "Can't load translation file:";
            qDebug() << QLocale::system().name() + ".qm in " + QLibraryInfo::location(QLibraryInfo::TranslationsPath) + "/cortina";
        }
    }
    a.installTranslator(&qtTranslator);
    a.setApplicationName("Cortina");
    a.setApplicationVersion("0.7.3");
    Widget w;
    return a.exec();
}