author | korovkin <korovkin> | 2006-04-20 12:37:33 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-04-20 12:37:33 (UTC) |
commit | fce7a143353e2bdd41d878c6f0a1224e0f2a158e (patch) (side-by-side diff) | |
tree | 41fc68d13e148b8979dde51401ce160f10197a6c /noncore/net/opietooth/manager/bluebase.cpp | |
parent | 6d3a8eaf3b92f8eec9908eed91568342fac5de1d (diff) | |
download | opie-fce7a143353e2bdd41d878c6f0a1224e0f2a158e.zip opie-fce7a143353e2bdd41d878c6f0a1224e0f2a158e.tar.gz opie-fce7a143353e2bdd41d878c6f0a1224e0f2a158e.tar.bz2 |
Added services configuration dialog.
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 @@ -19,12 +19,13 @@ #include "scandialog.h" #include "hciconfwrapper.h" #include "devicehandler.h" #include "btconnectionitem.h" #include "rfcommassigndialogimpl.h" #include "forwarder.h" +#include "servicesdialog.h" #include <termios.h> #include <string.h> #include <errno.h> /* OPIE */ #include <qpe/qpeapplication.h> @@ -93,12 +94,13 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) connect( m_localDevice, SIGNAL( connections(ConnectionState::ValueList) ), this, SLOT( addConnectedDevices(ConnectionState::ValueList) ) ); 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); //Load all icons needed @@ -124,18 +126,12 @@ BlueBase::BlueBase( QWidget* parent, const char* name, WFlags fl ) writeToHciConfig(); addConnectedDevices(); 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 */ void BlueBase::readConfig() @@ -250,12 +246,18 @@ void BlueBase::initGui() pagescanCheckBox->setChecked( m_enablePagescan ); inquiryscanCheckBox->setChecked( m_enableInquiryscan ); 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); } /** * Get the status informations and returns it * @return QString the status informations gathered @@ -757,7 +759,23 @@ void BlueBase::forwardExit(Opie::Core::OProcess* proc) */ 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 |