All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add SIM reset button
@ 2010-11-16 20:48 Gustavo F. Padovan
  2010-11-22 15:40 ` Denis Kenzior
  0 siblings, 1 reply; 3+ messages in thread
From: Gustavo F. Padovan @ 2010-11-16 20:48 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2974 bytes --]

+CRST now send a reset resquest command
---
 src/control.cpp    |    6 ++++++
 src/control.h      |    1 +
 src/controlbase.ui |   40 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 47 insertions(+), 0 deletions(-)

diff --git a/src/control.cpp b/src/control.cpp
index ab71752..014e657 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(simAppReset()));
 
     QStringList headers;
     headers << "Sender" << "Priority" << "Notification Status";
@@ -466,6 +467,11 @@ void ControlWidget::simAppAbort()
     p->simAppAbort();
 }
 
+void ControlWidget::simAppReset()
+{
+    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..6c4d8a8 100644
--- a/src/control.h
+++ b/src/control.h
@@ -94,6 +94,7 @@ private slots:
     void simInsertRemove();
     void simAppStart();
     void simAppAbort();
+    void simAppReset();
 
 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>
-- 
1.7.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Add SIM reset button
  2010-11-16 20:48 [PATCH] Add SIM reset button Gustavo F. Padovan
@ 2010-11-22 15:40 ` Denis Kenzior
  0 siblings, 0 replies; 3+ messages in thread
From: Denis Kenzior @ 2010-11-22 15:40 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1403 bytes --]

Hi Gustavo,

On 11/16/2010 02:48 PM, Gustavo F. Padovan wrote:
> +CRST now send a reset resquest command
> ---
>  src/control.cpp    |    6 ++++++
>  src/control.h      |    1 +
>  src/controlbase.ui |   40 ++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 47 insertions(+), 0 deletions(-)
> 
> diff --git a/src/control.cpp b/src/control.cpp
> index ab71752..014e657 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(simAppReset()));
>  
>      QStringList headers;
>      headers << "Sender" << "Priority" << "Notification Status";
> @@ -466,6 +467,11 @@ void ControlWidget::simAppAbort()
>      p->simAppAbort();
>  }
>  
> +void ControlWidget::simAppReset()

Can you rename this slot into modemSilentReset or something?  This
really has nothing to do with the SIM Application.

> +{
> +    emit unsolicitedCommand("+CRST:");
> +}
> +
>  Script::Script(QObject *obj, Ui_ControlBase *ui) : QDBusAbstractAdaptor(obj)
>  {

Otherwise looks good

Regards,
-Denis

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] Add SIM reset button
@ 2010-11-09 20:21 Gustavo F. Padovan
  0 siblings, 0 replies; 3+ messages in thread
From: Gustavo F. Padovan @ 2010-11-09 20:21 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 2300 bytes --]

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(-)

diff --git a/src/control.cpp b/src/control.cpp
index 2e22f69..1fa1978 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(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 */
diff --git a/src/control.h b/src/control.h
index 3c85e22..6c4d8a8 100644
--- a/src/control.h
+++ b/src/control.h
@@ -94,6 +94,7 @@ private slots:
     void simInsertRemove();
     void simAppStart();
     void simAppAbort();
+    void simAppReset();
 
 signals:
     void unsolicitedCommand(const QString &);
diff --git a/src/controlbase.ui b/src/controlbase.ui
index eca1898..ab06b51 100644
--- a/src/controlbase.ui
+++ b/src/controlbase.ui
@@ -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>
-- 
1.7.3.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-11-22 15:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-16 20:48 [PATCH] Add SIM reset button Gustavo F. Padovan
2010-11-22 15:40 ` Denis Kenzior
  -- strict thread matches above, loose matches on Subject: below --
2010-11-09 20:21 Gustavo F. Padovan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.