* [PATCH 0/2] Phonesim: add support for CSSU/CSSI notification
@ 2011-03-29 15:16 Nicolas Bertrand
2011-03-29 15:16 ` [PATCH 1/2] phonesim: add CSSU/CSSI UI Nicolas Bertrand
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Nicolas Bertrand @ 2011-03-29 15:16 UTC (permalink / raw)
To: ofono
[-- Attachment #1: Type: text/plain, Size: 391 bytes --]
Add UI to be able to send CSSU and CSSI notification with phonesim
Nicolas Bertrand (2):
phonesim: add CSSU/CSSI UI
phonesim: Add CSSU/CSSI notification support
src/control.cpp | 30 +++++++++++++++++++++++-
src/control.h | 2 +
src/controlbase.ui | 65 +++++++++++++++++++++++++++++++++++++++++++--------
3 files changed, 85 insertions(+), 12 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] phonesim: add CSSU/CSSI UI 2011-03-29 15:16 [PATCH 0/2] Phonesim: add support for CSSU/CSSI notification Nicolas Bertrand @ 2011-03-29 15:16 ` Nicolas Bertrand 2011-03-29 15:16 ` [PATCH 2/2] phonesim: Add CSSU/CSSI notification support Nicolas Bertrand 2011-03-30 3:41 ` [PATCH 0/2] Phonesim: add support for CSSU/CSSI notification Denis Kenzior 2 siblings, 0 replies; 4+ messages in thread From: Nicolas Bertrand @ 2011-03-29 15:16 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 2682 bytes --] --- src/controlbase.ui | 65 +++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 54 insertions(+), 11 deletions(-) diff --git a/src/controlbase.ui b/src/controlbase.ui index 11943ed..cfadfe8 100644 --- a/src/controlbase.ui +++ b/src/controlbase.ui @@ -195,17 +195,60 @@ </layout> </item> <item> - <spacer> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>566</width> - <height>101</height> - </size> - </property> - </spacer> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Fixed</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>322</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QGroupBox" name="gbCallSettings"> + <property name="title"> + <string>Call Settings</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="0" column="1"> + <widget class="QComboBox" name="cbCSSU"/> + </item> + <item row="1" column="1"> + <widget class="QComboBox" name="cbCSSI"/> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="lbCSSU"> + <property name="text"> + <string>CSSU</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="lbCSSI"> + <property name="text"> + <string>CSSI</string> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QPushButton" name="pbSendNotif"> + <property name="text"> + <string>Send Notification</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> </item> <item> <widget class="QCheckBox" name="atCheckBox"> -- 1.7.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] phonesim: Add CSSU/CSSI notification support 2011-03-29 15:16 [PATCH 0/2] Phonesim: add support for CSSU/CSSI notification Nicolas Bertrand 2011-03-29 15:16 ` [PATCH 1/2] phonesim: add CSSU/CSSI UI Nicolas Bertrand @ 2011-03-29 15:16 ` Nicolas Bertrand 2011-03-30 3:41 ` [PATCH 0/2] Phonesim: add support for CSSU/CSSI notification Denis Kenzior 2 siblings, 0 replies; 4+ messages in thread From: Nicolas Bertrand @ 2011-03-29 15:16 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 2935 bytes --] --- src/control.cpp | 30 +++++++++++++++++++++++++++++- src/control.h | 2 ++ 2 files changed, 31 insertions(+), 1 deletions(-) diff --git a/src/control.cpp b/src/control.cpp index 279bade..645219c 100644 --- a/src/control.cpp +++ b/src/control.cpp @@ -87,6 +87,7 @@ ControlWidget::ControlWidget(const QString &ruleFile, Control *parent) connect(ui->pbReset, SIGNAL(clicked()), this, SLOT(modemSilentReset())); connect(ui->pbSendGNSSData, SIGNAL(clicked()), this, SLOT(sendGNSSData())); connect(ui->pbGNSSDefault, SIGNAL(clicked()), this, SLOT(setDefaultGNSSData())); + connect(ui->pbSendNotif, SIGNAL(clicked()), this, SLOT(sendCSSN())); QStringList headers; headers << "Sender" << "Priority" << "Notification Status"; @@ -94,6 +95,7 @@ ControlWidget::ControlWidget(const QString &ruleFile, Control *parent) ui->twMessageList->verticalHeader()->hide(); handleNewApp(); + handleCSSNNotif(); show(); } @@ -142,13 +144,39 @@ void Control::warning( const QString &title, const QString &message ) QMessageBox::warning(widget, title, message, "OK"); } +void ControlWidget::handleCSSNNotif() +{ + ui->cbCSSU->insertItem(0, ""); + ui->cbCSSU->insertItem(1, "0 - forwarded", 0); + ui->cbCSSU->insertItem(3, "2 - on hold", 2); + ui->cbCSSU->insertItem(4, "3 - retrieved", 3); + ui->cbCSSU->insertItem(5, "4 - multiparty", 4); + + ui->cbCSSI->insertItem(0, ""); + ui->cbCSSI->insertItem(3, "2 - forwarded", 2); + ui->cbCSSI->insertItem(6, "5 - outgoing barred", 5); + ui->cbCSSI->insertItem(7, "6 - incomming barred", 6); +} + +void ControlWidget::sendCSSN() +{ + QVariant v = ui->cbCSSU->itemData(ui->cbCSSU->currentIndex()); + + if (v.canConvert<int>()) + emit unsolicitedCommand("+CSSU: "+QString::number(v.toInt())); + + v = ui->cbCSSI->itemData(ui->cbCSSI->currentIndex()); + + if (v.canConvert<int>()) + emit unsolicitedCommand("+CSSI: "+QString::number(v.toInt())); +} + void ControlWidget::sendSQ() { emit variableChanged("SQ",QString::number(ui->hsSignalQuality->value())+",99"); emit unsolicitedCommand("+CSQ: "+QString::number(ui->hsSignalQuality->value())+",99"); } - void ControlWidget::sendBC() { bool charging = ui->hsBatteryCharging->checkState() == Qt::Checked; diff --git a/src/control.h b/src/control.h index eac4288..c17146a 100644 --- a/src/control.h +++ b/src/control.h @@ -70,6 +70,7 @@ public: void handleFromData( const QString& ); void handleToData( const QString& ); void handleNewApp(); + void handleCSSNNotif(); private slots: void sendSQ(); @@ -97,6 +98,7 @@ private slots: void modemSilentReset(); void sendGNSSData(); void setDefaultGNSSData(); + void sendCSSN(); signals: void unsolicitedCommand(const QString &); -- 1.7.1 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] Phonesim: add support for CSSU/CSSI notification 2011-03-29 15:16 [PATCH 0/2] Phonesim: add support for CSSU/CSSI notification Nicolas Bertrand 2011-03-29 15:16 ` [PATCH 1/2] phonesim: add CSSU/CSSI UI Nicolas Bertrand 2011-03-29 15:16 ` [PATCH 2/2] phonesim: Add CSSU/CSSI notification support Nicolas Bertrand @ 2011-03-30 3:41 ` Denis Kenzior 2 siblings, 0 replies; 4+ messages in thread From: Denis Kenzior @ 2011-03-30 3:41 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 540 bytes --] Hi Nicolas, On 03/29/2011 10:16 AM, Nicolas Bertrand wrote: > Add UI to be able to send CSSU and CSSI notification with phonesim > > Nicolas Bertrand (2): > phonesim: add CSSU/CSSI UI > phonesim: Add CSSU/CSSI notification support > > src/control.cpp | 30 +++++++++++++++++++++++- > src/control.h | 2 + > src/controlbase.ui | 65 +++++++++++++++++++++++++++++++++++++++++++-------- > 3 files changed, 85 insertions(+), 12 deletions(-) > Both patches have been applied, thanks. Regards, -Denis ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-03-30 3:41 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-03-29 15:16 [PATCH 0/2] Phonesim: add support for CSSU/CSSI notification Nicolas Bertrand 2011-03-29 15:16 ` [PATCH 1/2] phonesim: add CSSU/CSSI UI Nicolas Bertrand 2011-03-29 15:16 ` [PATCH 2/2] phonesim: Add CSSU/CSSI notification support Nicolas Bertrand 2011-03-30 3:41 ` [PATCH 0/2] Phonesim: add support for CSSU/CSSI notification Denis Kenzior
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox