[PC-BSD Commits] r15061 - pcbsd/current/src-qt4/pc-bluetoothmanager
svn at pcbsd.org
svn at pcbsd.org
Wed Jan 25 05:07:01 PST 2012
Author: kenmoore
Date: 2012-01-25 13:07:00 +0000 (Wed, 25 Jan 2012)
New Revision: 15061
Modified:
pcbsd/current/src-qt4/pc-bluetoothmanager/btmaingui.cpp
pcbsd/current/src-qt4/pc-bluetoothmanager/btmaingui.ui
Log:
Redo the computer settings tab to make it more intuitive
Modified: pcbsd/current/src-qt4/pc-bluetoothmanager/btmaingui.cpp
===================================================================
--- pcbsd/current/src-qt4/pc-bluetoothmanager/btmaingui.cpp 2012-01-25 11:37:20 UTC (rev 15060)
+++ pcbsd/current/src-qt4/pc-bluetoothmanager/btmaingui.cpp 2012-01-25 13:07:00 UTC (rev 15061)
@@ -3,9 +3,10 @@
#include <pcbsd-hardware.h>
#include <pcbsd-utils.h>
#include <QDebug>
+#include <QMessageBox>
/* UI handles
- * Comp settings Tab: checkIsDiscoverable pushChangeSettings settingsInfo pushRestart
+ * Comp settings Tab: pushChangeCompName pushDisconnectDevice pushRestart lineCompName listConnectedDevices
* New Device Tab: pushAddDevice pushScanNew listNewDevice newDeviceInfo
* Old Device Tab: pushConfigureOld pushRemoveOld listOldDevice oldDeviceInfo
*/
@@ -116,7 +117,7 @@
int row = ui->listOldDevice->currentRow();
if(row == -1){
//No device selected
- //----------put warning box here ------------
+ QMessageBox::warning(this,tr("Warning"),tr("No device has been selected. Please choose a device first."));
return;
}
QString bdaddr = oldSaveBdaddrList[row];
@@ -131,7 +132,7 @@
int row = ui->listNewDevice->currentRow();
if(row == -1){
//No device selected
- //----------put warning box here ------------
+ QMessageBox::warning(this,tr("Warning"),tr("No device has been selected. Please choose a device first."));
return;
}
QString bdaddr = newSaveBdaddrList[row];
@@ -150,18 +151,17 @@
void btmaingui::updateCompInfo(){
//Clear the display for action
- ui->settingsInfo->clear();
+ ui->listConnectedDevices->clear();
//Get computer host/device names and display it
QStringList compName = Hardware::getBTdevNames(); //compName[0]=host name; compName[1]=device name
- ui->settingsInfo->append(tr("Computer/Device ID: ")+compName[0]+" ("+compName[1]+")");
+ ui->lineCompName->setText(compName[0]+" ("+compName[1]+")");
//List all active connections (if any)
QStringList connectionList = Utils::runShellCommand("hccontrol read_connection_list");
if(connectionList.length() > 1){
- ui->settingsInfo->append("\n"+tr("Active Bluetooth Connections:"));
for(int i=1; i<connectionList.length(); i++){ //skip the first line (labels)
QString bdaddr = connectionList[i].section(" ",0,0,QString::SectionSkipEmpty).simplified();
QString name = Hardware::getBTRemoteName(bdaddr);
- ui->settingsInfo->append(" "+name+" ("+bdaddr+")");
+ ui->listConnectedDevices->addItem(name+" ("+bdaddr+")");
}
}
}
Modified: pcbsd/current/src-qt4/pc-bluetoothmanager/btmaingui.ui
===================================================================
(Binary files differ)
More information about the Commits
mailing list