summaryrefslogtreecommitdiffstats
path: root/examples/sysinfo/dialog.cpp
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@nokia.com>2011-02-23 15:10:22 +1000
committerLorn Potter <lorn.potter@nokia.com>2011-02-23 15:10:22 +1000
commit6214dceeec51e2eab3e75b208aa2eb6617f1c437 (patch)
tree3b77bf5c32ccdcfdf95933b98bc10160bdcade2b /examples/sysinfo/dialog.cpp
parent00b1d6f3672deda676ff78799183c13c182a8bea (diff)
style change
Diffstat (limited to 'examples/sysinfo/dialog.cpp')
-rw-r--r--examples/sysinfo/dialog.cpp132
1 files changed, 66 insertions, 66 deletions
diff --git a/examples/sysinfo/dialog.cpp b/examples/sysinfo/dialog.cpp
index ecd70c4b17..945046867e 100644
--- a/examples/sysinfo/dialog.cpp
+++ b/examples/sysinfo/dialog.cpp
@@ -162,23 +162,23 @@ void Dialog::setupDevice()
//! [inputMethod flags]
QSystemDeviceInfo::InputMethodFlags methods = di->inputMethodType();
QStringList inputs;
- if((methods & QSystemDeviceInfo::Keys)=QSystemDeviceInfo::Keypad){
+ if ((methods & QSystemDeviceInfo::Keys)=QSystemDeviceInfo::Keypad){
inputs << "Keys";
}
- if((methods & QSystemDeviceInfo::Keypad)=QSystemDeviceInfo::Keypad) {
+ if ((methods & QSystemDeviceInfo::Keypad)=QSystemDeviceInfo::Keypad) {
inputs << "Keypad";
}
//! [inputMethod flags]
- if((methods & QSystemDeviceInfo::Keyboard)=QSystemDeviceInfo::Keyboard) {
+ if ((methods & QSystemDeviceInfo::Keyboard)=QSystemDeviceInfo::Keyboard) {
inputs << "Keyboard";
}
- if((methods & QSystemDeviceInfo::SingleTouch)=QSystemDeviceInfo::SingleTouch) {
+ if ((methods & QSystemDeviceInfo::SingleTouch)=QSystemDeviceInfo::SingleTouch) {
inputs << "Touch Screen";
}
- if((methods & QSystemDeviceInfo::MultiTouch)=QSystemDeviceInfo::MultiTouch) {
+ if ((methods & QSystemDeviceInfo::MultiTouch)=QSystemDeviceInfo::MultiTouch) {
inputs << "Multi touch";
}
- if((methods & QSystemDeviceInfo::Mouse)=QSystemDeviceInfo::Mouse){
+ if ((methods & QSystemDeviceInfo::Mouse)=QSystemDeviceInfo::Mouse){
inputs << "Mouse";
}
@@ -198,9 +198,9 @@ void Dialog::setupDevice()
QString lockState;
QSystemDeviceInfo::LockTypeFlags lock = di->lockStatus();
- if((lock & QSystemDeviceInfo::PinLocked)){
+ if ((lock & QSystemDeviceInfo::PinLocked)){
lockState = "Pin/Password Locked";
- } else if((lock & QSystemDeviceInfo::TouchAndKeyboardLocked)){
+ } else if ((lock & QSystemDeviceInfo::TouchAndKeyboardLocked)){
lockState = "Touch and keyboard locked";
} else {
lockState = "Unknown";
@@ -219,7 +219,7 @@ void Dialog::updateKeyboard(QSystemDeviceInfo::KeyboardTypeFlags type)
halfKeysRadioButton->setChecked(true);
} else if ((type & QSystemDeviceInfo::FullQwertyKeyboard)) {
qwertyKeysRadioButton->setChecked(true);
- } else if((type & QSystemDeviceInfo::WirelessKeyboard)) {
+ } else if ((type & QSystemDeviceInfo::WirelessKeyboard)) {
wirelessRadioButton->setChecked(true);
} else {
uknownKeysRadioButton->setChecked(true);
@@ -242,7 +242,7 @@ void Dialog::updateProfile(QSystemDeviceInfo::Profile /*profile*/)
void Dialog::setupDisplay()
{
- if(!dis) {
+ if (!dis) {
dis = new QSystemDisplayInfo(this);
connect(dis,SIGNAL(orientationChanged(QSystemDisplayInfo::DisplayOrientation)),
this,SLOT(orientationChanged(QSystemDisplayInfo::DisplayOrientation )));
@@ -264,7 +264,7 @@ void Dialog::setupDisplay()
void Dialog::setupStorage()
{
- if(!sti) {
+ if (!sti) {
sti = new QSystemStorageInfo(this);
storageTreeWidget->header()->setResizeMode(QHeaderView::ResizeToContents);
@@ -286,22 +286,22 @@ void Dialog::updateStorage()
QString type;
QSystemStorageInfo::DriveType volType;
volType = sti->typeForDrive(volName);
- if(volType == QSystemStorageInfo::InternalDrive) {
+ if (volType == QSystemStorageInfo::InternalDrive) {
type = "Internal";
}
- if(volType == QSystemStorageInfo::RemovableDrive) {
+ if (volType == QSystemStorageInfo::RemovableDrive) {
type = "Removable";
}
- if(volType == QSystemStorageInfo::CdromDrive) {
+ if (volType == QSystemStorageInfo::CdromDrive) {
type = "CDRom";
}
- if(volType == QSystemStorageInfo::RemoteDrive) {
+ if (volType == QSystemStorageInfo::RemoteDrive) {
type = "Network";
}
- if(volType == QSystemStorageInfo::InternalFlashDrive) {
+ if (volType == QSystemStorageInfo::InternalFlashDrive) {
type = "Flash";
}
- if(volType == QSystemStorageInfo::RamDrive) {
+ if (volType == QSystemStorageInfo::RamDrive) {
type = "Ram";
}
QStringList items;
@@ -366,7 +366,7 @@ void Dialog::netStatusComboActivated(int index)
macAddressLabel->setText(ni->macAddress((QSystemNetworkInfo::NetworkMode)reIndex));
int strength = ni->networkSignalStrength((QSystemNetworkInfo::NetworkMode)reIndex);
- if(strength < 0)
+ if (strength < 0)
strength = 0;
signalLevelProgressBar->setValue(strength);
@@ -374,7 +374,7 @@ void Dialog::netStatusComboActivated(int index)
operatorNameLabel->setText(ni->networkName((QSystemNetworkInfo::NetworkMode)reIndex));
- if((index == 1 || index == 2 || index == 3)
+ if ((index == 1 || index == 2 || index == 3)
&& ni->networkStatus((QSystemNetworkInfo::NetworkMode)reIndex)
!= QSystemNetworkInfo::UndefinedStatus) {
@@ -543,7 +543,7 @@ void Dialog::updatePowerState(QSystemDeviceInfo::PowerState /*newState*/)
void Dialog::displayBatteryStatus(QSystemBatteryInfo::BatteryStatus status)
{
- if(currentBatStat == status)
+ if (currentBatStat == status)
return;
QString msg;
switch(status) {
@@ -599,73 +599,73 @@ void Dialog::networkSignalStrengthChanged(QSystemNetworkInfo::NetworkMode mode ,
}
if (mode == QSystemNetworkInfo::UnknownMode) {
- if(netStatusComboBox->currentText() == "Unknown") {
+ if (netStatusComboBox->currentText() == "Unknown") {
signalLevelProgressBar->setValue(strength);
}
}
if (mode == QSystemNetworkInfo::GsmMode) {
- if(netStatusComboBox->currentText() == "Gsm") {
+ if (netStatusComboBox->currentText() == "Gsm") {
signalLevelProgressBar->setValue(strength);
}
}
if (mode == QSystemNetworkInfo::CdmaMode) {
- if(netStatusComboBox->currentText() == "Cdma") {
+ if (netStatusComboBox->currentText() == "Cdma") {
signalLevelProgressBar->setValue(strength);
}
}
if (mode == QSystemNetworkInfo::WcdmaMode) {
- if(netStatusComboBox->currentText() == "Wcdma") {
+ if (netStatusComboBox->currentText() == "Wcdma") {
signalLevelProgressBar->setValue(strength);
}
}
if (mode == QSystemNetworkInfo::WlanMode) {
- if(netStatusComboBox->currentText() == "Wlan") {
+ if (netStatusComboBox->currentText() == "Wlan") {
signalLevelProgressBar->setValue(strength);
}
}
if (mode == QSystemNetworkInfo::EthernetMode) {
- if(netStatusComboBox->currentText() == "Ethernet") {
+ if (netStatusComboBox->currentText() == "Ethernet") {
signalLevelProgressBar->setValue(strength);
}
}
if (mode == QSystemNetworkInfo::BluetoothMode) {
- if(netStatusComboBox->currentText() == "Bluetooth") {
+ if (netStatusComboBox->currentText() == "Bluetooth") {
signalLevelProgressBar->setValue(strength);
}
}
if (mode == QSystemNetworkInfo::WimaxMode) {
- if(netStatusComboBox->currentText() == "Wimax") {
+ if (netStatusComboBox->currentText() == "Wimax") {
signalLevelProgressBar->setValue(strength);
}
}
if (mode == QSystemNetworkInfo::GprsMode) {
- if(netStatusComboBox->currentText() == "Gprs") {
+ if (netStatusComboBox->currentText() == "Gprs") {
signalLevelProgressBar->setValue(strength);
}
}
if (mode == QSystemNetworkInfo::EdgeMode) {
- if(netStatusComboBox->currentText() == "Edge") {
+ if (netStatusComboBox->currentText() == "Edge") {
signalLevelProgressBar->setValue(strength);
}
}
if (mode == QSystemNetworkInfo::HspaMode) {
- if(netStatusComboBox->currentText() == "Hpsa") {
+ if (netStatusComboBox->currentText() == "Hpsa") {
signalLevelProgressBar->setValue(strength);
}
}
if (mode == QSystemNetworkInfo::LteMode) {
- if(netStatusComboBox->currentText() == "Lte") {
+ if (netStatusComboBox->currentText() == "Lte") {
signalLevelProgressBar->setValue(strength);
}
}
@@ -675,73 +675,73 @@ void Dialog::networkSignalStrengthChanged(QSystemNetworkInfo::NetworkMode mode ,
void Dialog::networkNameChanged(QSystemNetworkInfo::NetworkMode mode,const QString &text)
{
if (mode == QSystemNetworkInfo::UnknownMode) {
- if(netStatusComboBox->currentText() == "Unknown") {
+ if (netStatusComboBox->currentText() == "Unknown") {
operatorNameLabel->setText(text);
}
}
if (mode == QSystemNetworkInfo::GsmMode) {
- if(netStatusComboBox->currentText() == "Gsm") {
+ if (netStatusComboBox->currentText() == "Gsm") {
operatorNameLabel->setText(text);
}
}
if (mode == QSystemNetworkInfo::CdmaMode) {
- if(netStatusComboBox->currentText() == "Cdma") {
+ if (netStatusComboBox->currentText() == "Cdma") {
operatorNameLabel->setText(text);
}
}
if (mode == QSystemNetworkInfo::WcdmaMode) {
- if(netStatusComboBox->currentText() == "Wcdma") {
+ if (netStatusComboBox->currentText() == "Wcdma") {
operatorNameLabel->setText(text);
}
}
if (mode == QSystemNetworkInfo::WlanMode) {
- if(netStatusComboBox->currentText() == "Wlan") {
+ if (netStatusComboBox->currentText() == "Wlan") {
operatorNameLabel->setText(text);
}
}
if (mode == QSystemNetworkInfo::EthernetMode) {
- if(netStatusComboBox->currentText() == "Ethernet") {
+ if (netStatusComboBox->currentText() == "Ethernet") {
operatorNameLabel->setText(text);
}
}
if (mode == QSystemNetworkInfo::BluetoothMode) {
- if(netStatusComboBox->currentText() == "Bluetooth") {
+ if (netStatusComboBox->currentText() == "Bluetooth") {
operatorNameLabel->setText(text);
}
}
if (mode == QSystemNetworkInfo::WimaxMode) {
- if(netStatusComboBox->currentText() == "Wimax") {
+ if (netStatusComboBox->currentText() == "Wimax") {
operatorNameLabel->setText(text);
}
}
if (mode == QSystemNetworkInfo::GprsMode) {
- if(netStatusComboBox->currentText() == "Gprs") {
+ if (netStatusComboBox->currentText() == "Gprs") {
operatorNameLabel->setText(text);
}
}
if (mode == QSystemNetworkInfo::EdgeMode) {
- if(netStatusComboBox->currentText() == "Edge") {
+ if (netStatusComboBox->currentText() == "Edge") {
operatorNameLabel->setText(text);
}
}
if (mode == QSystemNetworkInfo::HspaMode) {
- if(netStatusComboBox->currentText() == "Hpsa") {
+ if (netStatusComboBox->currentText() == "Hpsa") {
operatorNameLabel->setText(text);
}
}
if (mode == QSystemNetworkInfo::LteMode) {
- if(netStatusComboBox->currentText() == "Lte") {
+ if (netStatusComboBox->currentText() == "Lte") {
operatorNameLabel->setText(text);
}
}
@@ -751,73 +751,73 @@ void Dialog::networkStatusChanged(QSystemNetworkInfo::NetworkMode mode , QSystem
{
if (mode == QSystemNetworkInfo::UnknownMode) {
- if(netStatusComboBox->currentText() == "Unknown") {
+ if (netStatusComboBox->currentText() == "Unknown") {
displayNetworkStatus(status);
}
}
if (mode == QSystemNetworkInfo::GsmMode) {
- if(netStatusComboBox->currentText() == "Gsm") {
+ if (netStatusComboBox->currentText() == "Gsm") {
displayNetworkStatus(status);
}
}
if (mode == QSystemNetworkInfo::CdmaMode) {
- if(netStatusComboBox->currentText() == "Cdma") {
+ if (netStatusComboBox->currentText() == "Cdma") {
displayNetworkStatus(status);
}
}
if (mode == QSystemNetworkInfo::WcdmaMode) {
- if(netStatusComboBox->currentText() == "Wcdma") {
+ if (netStatusComboBox->currentText() == "Wcdma") {
displayNetworkStatus(status);
}
}
if (mode == QSystemNetworkInfo::WlanMode) {
- if(netStatusComboBox->currentText() == "Wlan") {
+ if (netStatusComboBox->currentText() == "Wlan") {
displayNetworkStatus(status);
}
}
if (mode == QSystemNetworkInfo::EthernetMode) {
- if(netStatusComboBox->currentText() == "Ethernet") {
+ if (netStatusComboBox->currentText() == "Ethernet") {
displayNetworkStatus(status);
}
}
if (mode == QSystemNetworkInfo::BluetoothMode) {
- if(netStatusComboBox->currentText() == "Bluetooth") {
+ if (netStatusComboBox->currentText() == "Bluetooth") {
displayNetworkStatus(status);
}
}
if (mode == QSystemNetworkInfo::WimaxMode) {
- if(netStatusComboBox->currentText() == "Wimax") {
+ if (netStatusComboBox->currentText() == "Wimax") {
displayNetworkStatus(status);
}
}
if (mode == QSystemNetworkInfo::GprsMode) {
- if(netStatusComboBox->currentText() == "Gprs") {
+ if (netStatusComboBox->currentText() == "Gprs") {
displayNetworkStatus(status);
}
}
if (mode == QSystemNetworkInfo::EdgeMode) {
- if(netStatusComboBox->currentText() == "Edge") {
+ if (netStatusComboBox->currentText() == "Edge") {
displayNetworkStatus(status);
}
}
if (mode == QSystemNetworkInfo::HspaMode) {
- if(netStatusComboBox->currentText() == "Hspa") {
+ if (netStatusComboBox->currentText() == "Hspa") {
displayNetworkStatus(status);
}
}
if (mode == QSystemNetworkInfo::LteMode) {
- if(netStatusComboBox->currentText() == "Lte") {
+ if (netStatusComboBox->currentText() == "Lte") {
displayNetworkStatus(status);
}
}
@@ -912,7 +912,7 @@ void Dialog::displayNetworkStatus(QSystemNetworkInfo::NetworkStatus status)
void Dialog::updateProfile()
{
- if(di) {
+ if (di) {
QString profilestring;
switch(di->currentProfile()) {
case QSystemDeviceInfo::SilentProfile:
@@ -972,7 +972,7 @@ void Dialog::updateProfile()
void Dialog::updateSimStatus()
{
- if(di) {
+ if (di) {
QString simstring;
switch(di->simStatus()) {
case QSystemDeviceInfo::SimLocked:
@@ -1005,7 +1005,7 @@ void Dialog::updateSimStatus()
void Dialog::storageChanged(bool added,const QString &volName)
{
- if(added) {
+ if (added) {
updateStorage();
} else {
storageTreeWidget->takeTopLevelItem( storageTreeWidget->indexOfTopLevelItem(storageTreeWidget->findItems(volName,Qt::MatchExactly).at(0)));
@@ -1081,7 +1081,7 @@ void Dialog::setupBattery()
void Dialog::chargingStateChanged(QSystemBatteryInfo::ChargingState chargingState)
{
- if(chargingState == QSystemBatteryInfo::Charging) {
+ if (chargingState == QSystemBatteryInfo::Charging) {
chargingCheckBox->setChecked(true);
} else {
chargingCheckBox->setChecked(false);
@@ -1092,17 +1092,17 @@ void Dialog::chargingStateChanged(QSystemBatteryInfo::ChargingState chargingStat
void Dialog::chargerTypeChanged(QSystemBatteryInfo::ChargerType chargerType)
{
- if(chargerType == QSystemBatteryInfo::NoCharger) {
+ if (chargerType == QSystemBatteryInfo::NoCharger) {
radioButton_2->setChecked(true);
- } else if(chargerType == QSystemBatteryInfo::WallCharger) {
+ } else if (chargerType == QSystemBatteryInfo::WallCharger) {
radioButton_3->setChecked(true);
- } else if(chargerType == QSystemBatteryInfo::USBCharger) {
+ } else if (chargerType == QSystemBatteryInfo::USBCharger) {
radioButton_4->setChecked(true);
- } else if(chargerType == QSystemBatteryInfo::USB_500mACharger) {
+ } else if (chargerType == QSystemBatteryInfo::USB_500mACharger) {
radioButton_5->setChecked(true);
- } else if(chargerType == QSystemBatteryInfo::USB_100mACharger) {
+ } else if (chargerType == QSystemBatteryInfo::USB_100mACharger) {
radioButton_6->setChecked(true);
- } else if(chargerType == QSystemBatteryInfo::VariableCurrentCharger) {
+ } else if (chargerType == QSystemBatteryInfo::VariableCurrentCharger) {
radioButton_7->setChecked(true);
} else {
radioButton->setChecked(true);