Added the ability to edit the PID number using the number pad.
[profile/ivi/hfdialer.git] / src / main.cpp
1 /*
2  * hfdialer - Hands Free Voice Call Manager
3  * Copyright (c) 2012, Intel Corporation.
4  *
5  * This program is licensed under the terms and conditions of the
6  * Apache License, version 2.0.  The full text of the Apache License is at
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  */
10
11 #include "dialercontext.h"
12 #include "dialerapplication.h"
13 #include "qmlmainwindow.h"
14 #include "common.h"
15
16 #include <QtGui>
17 #include <QApplication>
18 #include <QDeclarativeView>
19 #include <QFile>
20
21 int main(int argc, char *argv[])
22 {
23     TRACE
24     DialerApplication app(argc, argv);  
25
26     QMLMainWindow *qmw = QMLMainWindow::instance();
27     qmw->tryToShow();
28
29     return app.exec();
30 }
31
32 QString stripLineID(QString lineid)
33 {
34     TRACE
35     static QRegExp rx = QRegExp("([^0-9*#])");
36
37     if (lineid.indexOf('+') == 0) {
38         lineid.replace(rx, "");
39         return lineid.insert(0,"+");
40     }
41     else
42         return lineid.replace(rx, "");
43 }
44