~timo-jyrinki/notes-app/stop_depending_on_transitional_packages

« back to all changes in this revision

Viewing changes to src/main.cpp

  • Committer: Ugo Riboni
  • Date: 2013-04-16 09:10:51 UTC
  • mto: This revision was merged to the branch mainline in revision 106.
  • Revision ID: ugo.riboni@canonical.com-20130416091051-1jfii5h31w5btmsd
Add a C++ wrapper around the notes application

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (C) 2013 Canonical, Ltd.
 
3
 *
 
4
 * This program is free software; you can redistribute it and/or modify
 
5
 * it under the terms of the GNU General Public License as published by
 
6
 * the Free Software Foundation; version 3.
 
7
 *
 
8
 * This program is distributed in the hope that it will be useful,
 
9
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
11
 * GNU General Public License for more details.
 
12
 *
 
13
 * You should have received a copy of the GNU General Public License
 
14
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
15
 */
 
16
 
 
17
// Qt
 
18
#include <QGuiApplication>
 
19
 
 
20
// local
 
21
#include "notesapplication.h"
 
22
#include "config.h"
 
23
 
 
24
#include <QDebug>
 
25
 
 
26
int main(int argc, char** argv)
 
27
{
 
28
    QGuiApplication::setApplicationName("Notes App");
 
29
    NotesApplication application(argc, argv);
 
30
 
 
31
    QString themeFile(notesAppDirectory() + "notes-app.qmltheme");
 
32
    setenv("UITK_THEME_FILE", themeFile.toUtf8(), true);
 
33
 
 
34
    if (!application.setup()) {
 
35
        return 0;
 
36
    }
 
37
 
 
38
    return application.exec();
 
39
}
 
40