equal
deleted
inserted
replaced
|
1 /* |
|
2 * $Id: main.cpp 54 2008-01-10 00:24:52Z mbroeker $ |
|
3 * $URL: http://localhost/svn/cpp/qMonitor/trunk/main.cpp $ |
|
4 */ |
|
5 |
|
6 #include <QApplication> |
|
7 |
|
8 #include "include/monitor.h" |
|
9 #include <version.h> |
|
10 |
|
11 int main (int argc, char *argv[]) |
|
12 { |
|
13 int i; |
|
14 |
|
15 while ((i = getopt (argc, argv, "hv")) >= 0) { |
|
16 switch (i) { |
|
17 case 'h': |
|
18 std::cout << "Usage: " << argv[0] << " [OPTIONS]" << std::endl; |
|
19 std::cout << "qMonitor displays the online traffic." << std::endl << std::endl; |
|
20 std::cout << "Options:" << std::endl << std::endl; |
|
21 std::cout << "-h: \t\t\tShow this help" << std::endl; |
|
22 std::cout << "-v: \t\t\tShow Version" << std::endl; |
|
23 |
|
24 exit (0); |
|
25 break; |
|
26 case 'v': |
|
27 std::cout << VERSION_STRING << std::endl; |
|
28 exit (0); |
|
29 break; |
|
30 |
|
31 default: |
|
32 ; |
|
33 } |
|
34 } |
|
35 |
|
36 QApplication app (argc, argv); |
|
37 Monitor *dialog = new Monitor; |
|
38 |
|
39 dialog->show (); |
|
40 return app.exec (); |
|
41 } |