diff options
author | Gustavo F. Padovan <padovan@profusion.mobi> | 2010-11-22 20:05:22 -0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-11-23 03:02:19 -0600 |
commit | ee55a06dae425d50ec649069dc2e0833dc7c7e81 (patch) | |
tree | 0ba81628388424d8a17ecd1fe75b806400bb646f | |
parent | b2e540b92562cc52928c82778072ae77e0674b0d (diff) | |
download | phonesim-ee55a06dae425d50ec649069dc2e0833dc7c7e81.tar.gz |
Add modem silent reset button
+CRST now send a reset resquest command
-rw-r--r-- | src/control.cpp | 6 | ||||
-rw-r--r-- | src/control.h | 1 | ||||
-rw-r--r-- | src/controlbase.ui | 40 |
3 files changed, 47 insertions, 0 deletions
diff --git a/src/control.cpp b/src/control.cpp index ab71752..75dae98 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -84,6 +84,7 @@ ControlWidget::ControlWidget(const QString &ruleFile, Control *parent) connect(ui->cbSimInserted, SIGNAL(clicked()), this, SLOT(simInsertRemove())); connect(ui->pbStart, SIGNAL(clicked()), this, SLOT(simAppStart())); connect(ui->pbAbort, SIGNAL(clicked()), this, SLOT(simAppAbort())); + connect(ui->pbReset, SIGNAL(clicked()), this, SLOT(modemSilentReset())); QStringList headers; headers << "Sender" << "Priority" << "Notification Status"; @@ -466,6 +467,11 @@ void ControlWidget::simAppAbort() p->simAppAbort(); } +void ControlWidget::modemSilentReset() +{ + emit unsolicitedCommand("+CRST:"); +} + Script::Script(QObject *obj, Ui_ControlBase *ui) : QDBusAbstractAdaptor(obj) { /* Export tabs to be accessed by script */ diff --git a/src/control.h b/src/control.h index 3c85e22..64a7af7 100644 --- a/src/control.h +++ b/src/control.h @@ -94,6 +94,7 @@ private slots: void simInsertRemove(); void simAppStart(); void simAppAbort(); + void modemSilentReset(); signals: void unsolicitedCommand(const QString &); diff --git a/src/controlbase.ui b/src/controlbase.ui index e0cb5b5..2c91f95 100644 --- a/src/controlbase.ui +++ b/src/controlbase.ui @@ -1294,6 +1294,46 @@ p, li { white-space: pre-wrap; } </item> </layout> </widget> + <widget class="QWidget" name="tab_7"> + <attribute name="title"> + <string>Modem</string> + </attribute> + <widget class="QWidget" name="gridLayoutWidget"> + <property name="geometry"> + <rect> + <x>9</x> + <y>9</y> + <width>591</width> + <height>511</height> + </rect> + </property> + <layout class="QGridLayout" > + <item row="0" column="1"> + <spacer> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>450</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="0" column="0"> + <widget class="QPushButton" name="pbReset"> + <property name="text"> + <string>Reset</string> + </property> + </widget> + </item> + </layout> + </widget> + </widget> </widget> </item> <item> |