Skip to contentSkip to conversation

Add SIM reset button

PATCH New Gustavo F. Padovan 1 participant 1 message Nov 9, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add SIM reset button

AT+CRST now send a reset resquest command

---
 src/control.cpp    |    6 ++++++
 src/control.h      |    1 +
 src/controlbase.ui |   16 ++++++++++++++++
 3 files changed, 23 insertions(+), 0 deletions(-)
src/control.cpp +6 -0
index 2e22f69..1fa1978 100644
@@ -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(simAppReset()));
 
     QStringList headers;
     headers << "Sender" << "Priority" << "Notification Status";
@@ -459,6 +460,11 @@ void ControlWidget::simAppAbort()
     p->simAppAbort();
 }
 
+void ControlWidget::simAppReset()
+{
+    emit unsolicitedCommand("AT+CRST");
+}
+
 Script::Script(QObject *obj, Ui_ControlBase *ui) : QDBusAbstractAdaptor(obj)
 {
     /* Export tabs to be accessed by script */
src/control.h +1 -0
index 3c85e22..6c4d8a8 100644
@@ -94,6 +94,7 @@ private slots:
     void simInsertRemove();
     void simAppStart();
     void simAppAbort();
+    void simAppReset();
 
 signals:
     void unsolicitedCommand(const QString &);
src/controlbase.ui +16 -0
index eca1898..ab06b51 100644
@@ -1406,6 +1406,22 @@ p, li { white-space: pre-wrap; }
             </property>
            </widget>
           </item>
+          <item>
+           <widget class="QPushButton" name="pbReset">
+            <property name="enabled">
+             <bool>true</bool>
+            </property>
+            <property name="maximumSize">
+             <size>
+              <width>185</width>
+              <height>25</height>
+             </size>
+            </property>
+            <property name="text">
+             <string>Reset</string>
+            </property>
+           </widget>
+          </item>
          </layout>
         </widget>
        </item>
Signature · 1 line
1.7.3.1