diff --git a/src/configurationpanelui.cpp b/src/configurationpanelui.cpp index 6fbe4d140d84aa3ce51deac1323f3a1bbabe889a..159b0fcec0efdee2180e483082273e953a440a7e 100644 --- a/src/configurationpanelui.cpp +++ b/src/configurationpanelui.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'configurationpanel.ui' ** -** Created: Sun Jan 2 10:48:41 2005 +** Created: Sun Jan 2 11:10:33 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! diff --git a/src/configurationpanelui.h b/src/configurationpanelui.h index 27b4e27bb62a906c37fb9f253e4bccd6f7c611a6..03815602156c39a70bb1554a5d2e4bf8c5621a22 100644 --- a/src/configurationpanelui.h +++ b/src/configurationpanelui.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'configurationpanel.ui' ** -** Created: Sun Jan 2 10:48:41 2005 +** Created: Sun Jan 2 11:10:33 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! diff --git a/src/main.cpp b/src/main.cpp index dcdbad58b79cc8048a9b0c3c45069faee9d60867..e15a77d9aae76dae5ccb127d1c26a4f6bd2bd537 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -17,6 +17,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +#include <getopt.h> + #include <qapplication.h> #include <qmessagebox.h> #include <qtranslator.h> @@ -28,13 +30,18 @@ #include "skin.h" #include "qtGUImainwindow.h" +void OptionProcess (int argc,char **argv) ; +QString *pOption = NULL; + + int main (int argc, char **argv) { QApplication a(argc, argv); Manager *manager; - if ( argc > 1) - manager = new Manager(new QString(argv[1])); + OptionProcess (argc,argv); + if ( pOption ) + manager = new Manager(pOption); else manager = new Manager(NULL); @@ -47,3 +54,44 @@ main (int argc, char **argv) { a.setMainWidget(manager->gui()); return a.exec(); } + +void OptionProcess (int argc,char **argv) { +int c; + + while (1) { + int option_index = 0; + static struct option long_options[] = + { + {"phonenumber", 1, 0, 'p'}, + {"stun", 1, 0, 's'}, + {"verbose", 0, 0, 'v'}, + {"help", 0, 0, 'h'}, + {0, 0, 0, 0} + }; + + c = getopt_long (argc, argv, "p:s:vh", long_options, &option_index); + if (c == -1) + break; + + switch (c) { + case 'v': + break; + case 'p': + printf("Phone number to call : %s\n",optarg); + pOption = new QString(optarg); + break; + case 's': + break; + case '?': + case 'h': + break; + default: + printf ("?? caractère de code 0%o ??\n", c); + } + } +} + + + + + diff --git a/src/phonebookui.cpp b/src/phonebookui.cpp index fc240a7080e993b01ee3b8f0ae02850667114088..300bf8f8d1e1049277257f7e38232dad37552dae 100644 --- a/src/phonebookui.cpp +++ b/src/phonebookui.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'phonebook.ui' ** -** Created: Sun Jan 2 10:48:40 2005 +** Created: Sun Jan 2 11:10:33 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! diff --git a/src/phonebookui.h b/src/phonebookui.h index ac4c3e8710c4aff829498e3b46bacd0b9e2d5977..34077cda90928187a06d1ee5983a08e973569b49 100644 --- a/src/phonebookui.h +++ b/src/phonebookui.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'phonebook.ui' ** -** Created: Sun Jan 2 10:48:40 2005 +** Created: Sun Jan 2 11:10:33 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! diff --git a/src/url_inputui.cpp b/src/url_inputui.cpp index 1871edfe3c73d141339126fcf08e21091c09c520..66fc3ab602c88c6441eef2d69088a93d06df9822 100644 --- a/src/url_inputui.cpp +++ b/src/url_inputui.cpp @@ -1,7 +1,7 @@ /**************************************************************************** ** Form implementation generated from reading ui file 'url_input.ui' ** -** Created: Sun Jan 2 10:48:41 2005 +** Created: Sun Jan 2 11:10:33 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost! diff --git a/src/url_inputui.h b/src/url_inputui.h index 97c375e5ee50b8f0f549039bbd82b015a6c667e9..8fea41b8a3cbb0f06b0fcf187555db1f413137fc 100644 --- a/src/url_inputui.h +++ b/src/url_inputui.h @@ -1,7 +1,7 @@ /**************************************************************************** ** Form interface generated from reading ui file 'url_input.ui' ** -** Created: Sun Jan 2 10:48:41 2005 +** Created: Sun Jan 2 11:10:33 2005 ** by: The User Interface Compiler ($Id$) ** ** WARNING! All changes made in this file will be lost!