Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (show 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 @@ #include "devicehandler.h" #include "btconnectionitem.h" #include "rfcommassigndialogimpl.h" #include "forwarder.h" +#include "servicesdialog.h" #include <termios.h> #include <string.h> #include <errno.h> @@ -95,8 +96,9 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) connect( m_localDevice, SIGNAL( signalStrength(const QString&,const QString&) ), this, SLOT( addSignalStrength(const QString&,const QString&) ) ); connect(runButton, SIGNAL(clicked()), this, SLOT(doForward())); connect(encCheckBox, SIGNAL(toggled(bool)), this, SLOT(doEncrypt(bool))); + connect(servicesEditButton, SIGNAL(clicked()), this, SLOT(editServices())); // let hold be rightButtonClicked() QPEApplication::setStylusOperation( devicesView->viewport(), QPEApplication::RightOnHold); QPEApplication::setStylusOperation( connectionsView->viewport(), QPEApplication::RightOnHold); @@ -126,14 +128,8 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) readSavedDevices(); addServicesToDevices(); QTimer::singleShot( 3000, this, SLOT( addServicesToDevices() ) ); forwarder = NULL; - serDevName->setText(tr("/dev/ircomm0")); - for (unsigned int i = 0; i < (sizeof(speeds) / sizeof(speeds[0])); i++) { - serSpeed->insertItem(speeds[i].str); - } - serSpeed->setCurrentItem((sizeof(speeds) / sizeof(speeds[0])) - 1); - encCheckBox->setChecked(true); } /** * Reads all options from the config file @@ -252,8 +248,14 @@ void BlueBase::initGui() deviceNameLine->setText( m_deviceName ); passkeyLine->setText( m_defaultPasskey ); // set info tab setInfo(); + serDevName->setText(tr("/dev/ircomm0")); + for (unsigned int i = 0; i < (sizeof(speeds) / sizeof(speeds[0])); i++) { + serSpeed->insertItem(speeds[i].str); + } + serSpeed->setCurrentItem((sizeof(speeds) / sizeof(speeds[0])) - 1); + encCheckBox->setChecked(true); } /** @@ -759,5 +761,21 @@ void BlueBase::doEncrypt(bool doit) { passkeyLine->setEchoMode((doit)? QLineEdit::Password: QLineEdit::Normal); } +/** + * Start services edit dialog + */ +void BlueBase::editServices() +{ + QString conf = "/etc/default/bluetooth"; +//// Use for debugging purposes +//// QString conf = "/mnt/net/opie/bin/bluetooth"; + ServicesDialog svcEdit(conf, this, "ServicesDialog", true, + WStyle_ContextHelp); + + if (QPEApplication::execDialog(&svcEdit) == QDialog::Accepted) + { + } +} + //eof |