print current magnification during zooming
[presencevnc] / src / main.cpp
1 /*
2     Presence VNC
3     Copyright (C) 2010 Christian Pulvermacher
4
5     This program is free software; you can redistribute it and/or modify
6     it under the terms of the GNU General Public License as published by
7     the Free Software Foundation; either version 2 of the License, or
8     (at your option) any later version.
9
10     This program is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13     GNU General Public License for more details.
14
15     You should have received a copy of the GNU General Public License along
16     with this program; if not, write to the Free Software Foundation, Inc.,
17     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19 #include <QApplication>
20 #include <QInputDialog>
21 #include <QString>
22
23 #include "mainwindow.h"
24
25 int main(int argc, char *argv[])
26 {
27         QCoreApplication::setOrganizationName("Presence VNC");
28         QCoreApplication::setApplicationName("Presence VNC");
29
30         QApplication app(argc, argv);
31
32         QString url;
33         int quality = 2;
34         QStringList arguments = QCoreApplication::arguments();
35         if (arguments.count() > 1) {
36                 //Example: vnc://:password@server:1\n"
37                 //"Optionally, you can define the quality as second argument (1-3, where 1 is the best). Default is 2.");
38
39                 url = arguments.at(1);
40                 if(arguments.count() > 2)
41                         quality = arguments.at(2).toInt();
42         }
43         MainWindow main(url, quality);
44         main.show();
45         return app.exec();
46 }