Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 924d191..13954c5 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -21,8 +21,9 @@ | |||
21 | #include "devicehandler.h" | 21 | #include "devicehandler.h" |
22 | #include "btconnectionitem.h" | 22 | #include "btconnectionitem.h" |
23 | #include "rfcommassigndialogimpl.h" | 23 | #include "rfcommassigndialogimpl.h" |
24 | #include "forwarder.h" | 24 | #include "forwarder.h" |
25 | #include "servicesdialog.h" | ||
25 | #include <termios.h> | 26 | #include <termios.h> |
26 | #include <string.h> | 27 | #include <string.h> |
27 | #include <errno.h> | 28 | #include <errno.h> |
28 | 29 | ||
@@ -95,8 +96,9 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) | |||
95 | connect( m_localDevice, SIGNAL( signalStrength(const QString&,const QString&) ), | 96 | connect( m_localDevice, SIGNAL( signalStrength(const QString&,const QString&) ), |
96 | this, SLOT( addSignalStrength(const QString&,const QString&) ) ); | 97 | this, SLOT( addSignalStrength(const QString&,const QString&) ) ); |
97 | connect(runButton, SIGNAL(clicked()), this, SLOT(doForward())); | 98 | connect(runButton, SIGNAL(clicked()), this, SLOT(doForward())); |
98 | connect(encCheckBox, SIGNAL(toggled(bool)), this, SLOT(doEncrypt(bool))); | 99 | connect(encCheckBox, SIGNAL(toggled(bool)), this, SLOT(doEncrypt(bool))); |
100 | connect(servicesEditButton, SIGNAL(clicked()), this, SLOT(editServices())); | ||
99 | 101 | ||
100 | // let hold be rightButtonClicked() | 102 | // let hold be rightButtonClicked() |
101 | QPEApplication::setStylusOperation( devicesView->viewport(), QPEApplication::RightOnHold); | 103 | QPEApplication::setStylusOperation( devicesView->viewport(), QPEApplication::RightOnHold); |
102 | QPEApplication::setStylusOperation( connectionsView->viewport(), QPEApplication::RightOnHold); | 104 | QPEApplication::setStylusOperation( connectionsView->viewport(), QPEApplication::RightOnHold); |
@@ -126,14 +128,8 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) | |||
126 | readSavedDevices(); | 128 | readSavedDevices(); |
127 | addServicesToDevices(); | 129 | addServicesToDevices(); |
128 | QTimer::singleShot( 3000, this, SLOT( addServicesToDevices() ) ); | 130 | QTimer::singleShot( 3000, this, SLOT( addServicesToDevices() ) ); |
129 | forwarder = NULL; | 131 | forwarder = NULL; |
130 | serDevName->setText(tr("/dev/ircomm0")); | ||
131 | for (unsigned int i = 0; i < (sizeof(speeds) / sizeof(speeds[0])); i++) { | ||
132 | serSpeed->insertItem(speeds[i].str); | ||
133 | } | ||
134 | serSpeed->setCurrentItem((sizeof(speeds) / sizeof(speeds[0])) - 1); | ||
135 | encCheckBox->setChecked(true); | ||
136 | } | 132 | } |
137 | 133 | ||
138 | /** | 134 | /** |
139 | * Reads all options from the config file | 135 | * Reads all options from the config file |
@@ -252,8 +248,14 @@ void BlueBase::initGui() | |||
252 | deviceNameLine->setText( m_deviceName ); | 248 | deviceNameLine->setText( m_deviceName ); |
253 | passkeyLine->setText( m_defaultPasskey ); | 249 | passkeyLine->setText( m_defaultPasskey ); |
254 | // set info tab | 250 | // set info tab |
255 | setInfo(); | 251 | setInfo(); |
252 | serDevName->setText(tr("/dev/ircomm0")); | ||
253 | for (unsigned int i = 0; i < (sizeof(speeds) / sizeof(speeds[0])); i++) { | ||
254 | serSpeed->insertItem(speeds[i].str); | ||
255 | } | ||
256 | serSpeed->setCurrentItem((sizeof(speeds) / sizeof(speeds[0])) - 1); | ||
257 | encCheckBox->setChecked(true); | ||
256 | } | 258 | } |
257 | 259 | ||
258 | 260 | ||
259 | /** | 261 | /** |
@@ -759,5 +761,21 @@ void BlueBase::doEncrypt(bool doit) | |||
759 | { | 761 | { |
760 | passkeyLine->setEchoMode((doit)? QLineEdit::Password: QLineEdit::Normal); | 762 | passkeyLine->setEchoMode((doit)? QLineEdit::Password: QLineEdit::Normal); |
761 | } | 763 | } |
762 | 764 | ||
765 | /** | ||
766 | * Start services edit dialog | ||
767 | */ | ||
768 | void BlueBase::editServices() | ||
769 | { | ||
770 | QString conf = "/etc/default/bluetooth"; | ||
771 | //// Use for debugging purposes | ||
772 | //// QString conf = "/mnt/net/opie/bin/bluetooth"; | ||
773 | ServicesDialog svcEdit(conf, this, "ServicesDialog", true, | ||
774 | WStyle_ContextHelp); | ||
775 | |||
776 | if (QPEApplication::execDialog(&svcEdit) == QDialog::Accepted) | ||
777 | { | ||
778 | } | ||
779 | } | ||
780 | |||
763 | //eof | 781 | //eof |