Release version 0.6-2
[vicar] / src / vicar-config / src / profilesettingsdialog.cpp
index 314e9ca..a0c827d 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
-@version: 0.5
+@version: 0.6
 @author: Sudheer K. <scifi1947 at gmail.com>
 @license: GNU General Public License
 */
 @author: Sudheer K. <scifi1947 at gmail.com>
 @license: GNU General Public License
 */
@@ -8,6 +8,7 @@
 #include "ui_profilesettingsdialog.h"
 #include "vicarprofiletypes.h"
 #include <QMessageBox>
 #include "ui_profilesettingsdialog.h"
 #include "vicarprofiletypes.h"
 #include <QMessageBox>
+#include <QDebug>
 
 ProfileSettingsDialog::ProfileSettingsDialog(QWidget *parent, org::maemo::vicar::Profile *profile) :
     QDialog(parent),
 
 ProfileSettingsDialog::ProfileSettingsDialog(QWidget *parent, org::maemo::vicar::Profile *profile) :
     QDialog(parent),
@@ -18,6 +19,12 @@ ProfileSettingsDialog::ProfileSettingsDialog(QWidget *parent, org::maemo::vicar:
 
     if (profile != 0){
         //Load Profile values
 
     if (profile != 0){
         //Load Profile values
+
+        if (profile->phoneNumberPattern == "%"){
+            ui->labelNumberStartsWith->setText("-- Default Profile --");
+            ui->lineEditNumberStartsWith->setVisible(false);
+        }
+
         ui->lineEditNumberStartsWith->setText(profile->phoneNumberPattern);
         ui->lineEditCallingCardNumber->setText(profile->gatewayNumber);
         int intIndex = ui->comboBoxDTMFFormat->findText(profile->dtmfFormat);
         ui->lineEditNumberStartsWith->setText(profile->phoneNumberPattern);
         ui->lineEditCallingCardNumber->setText(profile->gatewayNumber);
         int intIndex = ui->comboBoxDTMFFormat->findText(profile->dtmfFormat);
@@ -26,7 +33,8 @@ ProfileSettingsDialog::ProfileSettingsDialog(QWidget *parent, org::maemo::vicar:
         ui->lineEditDTMFSuffix->setText(profile->dtmfSuffix);
     }
 
         ui->lineEditDTMFSuffix->setText(profile->dtmfSuffix);
     }
 
-    ui->lineEditCallingCardNumber->setValidator(new QRegExpValidator(QRegExp( "^-?\\d\\d*$"), this));
+    //ui->lineEditCallingCardNumber->setValidator(new QRegExpValidator(QRegExp( "^-?\\d\\d*$"), this));
+    ui->lineEditCallingCardNumber->setValidator(new QRegExpValidator(QRegExp( "^[0-9\\+]*$"), this));
     ui->lineEditDTMFPrefix->setValidator(new QRegExpValidator(QRegExp( "^[0-9p#\\*]*$"), this));
     ui->lineEditDTMFSuffix->setValidator(new QRegExpValidator(QRegExp( "^[0-9p#\\*]*$"), this));
 }
     ui->lineEditDTMFPrefix->setValidator(new QRegExpValidator(QRegExp( "^[0-9p#\\*]*$"), this));
     ui->lineEditDTMFSuffix->setValidator(new QRegExpValidator(QRegExp( "^[0-9p#\\*]*$"), this));
 }