high_flyer thanks for your support,
Here's the MainWindow.cpp file
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow
::MainWindow(QWidget *parent
) : ui(new Ui::MainWindow){
ui->setupUi(this);
ui->label->setShown(false);
ui->label_2->setShown(false);
ui->label_3->setShown(false);
ui->label_4->setShown(false);
ui->label_5->setShown(false);
ui->label_6->setShown(false);
ui->label_7->setShown(false);
ui->label_8->setShown(false);
ui->label_9->setShown(false);
ui->label_10->setShown(false);
ui->progressBar->setShown(false);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
ui->label->setShown(true);
ui->label_2->setShown(true);
ui->label_3->setShown(true);
ui->label_4->setShown(true);
ui->label_5->setShown(true);
ui->label_6->setShown(true);
ui->label_7->setShown(true);
ui->label_8->setShown(true);
ui->label_9->setShown(true);
ui->label_10->setShown(true);
ui->progressBar->setShown(true);
ui->progressBar->setValue(file.batteryLevel());
ui
->label
->setText
("Battery Left: " + QString::number(file.
batteryLevel()));
ui->label_2->setText("IMEI: " + file.imei());
ui->label_3->setText("Model: " + file.model());
ui
->label_4
->setText
("Signal Strength: " + QString::number(file1.
networkSignalStrength(QSystemNetworkInfo
::GsmMode))+ "%");
ui
->label_5
->setText
("Stand By: " + QString::number(file.
batteryLevel()*2) + "mins");
ui->label_7->setText("Net Name: " + file1.networkName(QSystemNetworkInfo::GsmMode));
ui->label_8->setText("Cell Id Of BS: " + file1.cellId());
ui->label_9->setText("Mob Code: " + file1.currentMobileNetworkCode());
ui->label_10->setText("MAC: " + file1.macAddress(QSystemNetworkInfo::GsmMode));
}
#include "mainwindow.h"
#include "ui_mainwindow.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow){
ui->setupUi(this);
ui->label->setShown(false);
ui->label_2->setShown(false);
ui->label_3->setShown(false);
ui->label_4->setShown(false);
ui->label_5->setShown(false);
ui->label_6->setShown(false);
ui->label_7->setShown(false);
ui->label_8->setShown(false);
ui->label_9->setShown(false);
ui->label_10->setShown(false);
ui->progressBar->setShown(false);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_pushButton_clicked()
{
ui->label->setShown(true);
ui->label_2->setShown(true);
ui->label_3->setShown(true);
ui->label_4->setShown(true);
ui->label_5->setShown(true);
ui->label_6->setShown(true);
ui->label_7->setShown(true);
ui->label_8->setShown(true);
ui->label_9->setShown(true);
ui->label_10->setShown(true);
ui->progressBar->setShown(true);
ui->progressBar->setValue(file.batteryLevel());
ui->label->setText("Battery Left: " + QString::number(file.batteryLevel()));
ui->label_2->setText("IMEI: " + file.imei());
ui->label_3->setText("Model: " + file.model());
ui->label_4->setText("Signal Strength: " + QString::number(file1.networkSignalStrength(QSystemNetworkInfo::GsmMode))+ "%");
ui->label_5->setText("Stand By: " + QString::number(file.batteryLevel()*2) + "mins");
ui->label_7->setText("Net Name: " + file1.networkName(QSystemNetworkInfo::GsmMode));
ui->label_8->setText("Cell Id Of BS: " + file1.cellId());
ui->label_9->setText("Mob Code: " + file1.currentMobileNetworkCode());
ui->label_10->setText("MAC: " + file1.macAddress(QSystemNetworkInfo::GsmMode));
}
To copy to clipboard, switch view to plain text mode
networkinfo.pro fil
QT += core gui
Qt += network
TARGET = NetworkInfo
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h \
../../Simulator/QtMobility/mingw/include/qmobilityglobal.h
FORMS += mainwindow.ui
CONFIG += mobility
MOBILITY = systeminfo
symbian {
TARGET.UID3 = 0xe07c5851
TARGET.CAPABILITY += LocalServices ReadUserData WriteUserData NetworkServices UserEnvironment ReadDeviceData WriteDeviceData
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
QT += core gui
Qt += network
TARGET = NetworkInfo
TEMPLATE = app
SOURCES += main.cpp\
mainwindow.cpp
HEADERS += mainwindow.h \
../../Simulator/QtMobility/mingw/include/qmobilityglobal.h
FORMS += mainwindow.ui
CONFIG += mobility
MOBILITY = systeminfo
symbian {
TARGET.UID3 = 0xe07c5851
TARGET.CAPABILITY += LocalServices ReadUserData WriteUserData NetworkServices UserEnvironment ReadDeviceData WriteDeviceData
TARGET.EPOCSTACKSIZE = 0x14000
TARGET.EPOCHEAPSIZE = 0x020000 0x800000
To copy to clipboard, switch view to plain text mode
and mainwindow.h header file
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include<QtSystemInfo/QSystemDeviceInfo>
#include<QtSystemInfo/QSystemNetworkInfo>
QTM_USE_NAMESPACE
namespace Ui {
class MainWindow;
}
{
Q_OBJECT
public:
explicit MainWindow
(QWidget *parent
= 0);
~MainWindow();
private:
Ui::MainWindow *ui;
QSystemDeviceInfo file;
QSystemNetworkInfo file1;
private slots:
void on_pushButton_clicked();
};
#endif // MAINWINDOW_H
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include<QtSystemInfo/QSystemDeviceInfo>
#include<QtSystemInfo/QSystemNetworkInfo>
QTM_USE_NAMESPACE
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
QSystemDeviceInfo file;
QSystemNetworkInfo file1;
private slots:
void on_pushButton_clicked();
};
#endif // MAINWINDOW_H
To copy to clipboard, switch view to plain text mode
Bookmarks