main.cpp
changeset 0 826dd5531eb0
child 4 fdf04a93faeb
new file mode 100644
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,41 @@
+/*
+ *  $Id: main.cpp 54 2008-01-10 00:24:52Z mbroeker $
+ * $URL: http://localhost/svn/cpp/qMonitor/trunk/main.cpp $
+ */
+
+#include <QApplication>
+
+#include "include/monitor.h"
+#include <version.h>
+
+int main (int argc, char *argv[])
+{
+    int i;
+
+    while ((i = getopt (argc, argv, "hv")) >= 0) {
+        switch (i) {
+        case 'h':
+            std::cout << "Usage: " << argv[0] << " [OPTIONS]" << std::endl;
+            std::cout << "qMonitor displays the online traffic." << std::endl << std::endl;
+            std::cout << "Options:" << std::endl << std::endl;
+            std::cout << "-h: \t\t\tShow this help" << std::endl;
+            std::cout << "-v: \t\t\tShow Version" << std::endl;
+
+            exit (0);
+            break;
+        case 'v':
+            std::cout << VERSION_STRING << std::endl;
+            exit (0);
+            break;
+
+        default:
+            ;
+        }
+    }
+
+    QApplication app (argc, argv);
+    Monitor *dialog = new Monitor;
+
+    dialog->show ();
+    return app.exec ();
+}