[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/solid/examples
From: Christopher Blauvelt <cblauvelt () gmail ! com>
Date: 2007-06-12 4:23:09
Message-ID: 1181622189.821816.11428.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 674332 by cblauvelt:
Make some more updates and fix some old ones. Now I just have to make sure
that techbase is consistent.
M +0 -2 tutorial1/tutorial1.cpp
M +0 -2 tutorial2/tutorial2.cpp
M +0 -2 tutorial3/tutorial3.cpp
M +3 -6 tutorial4/tutorial4.cpp
M +4 -7 tutorial5/tutorial5.cpp
--- trunk/KDE/kdelibs/solid/examples/tutorial1/tutorial1.cpp #674331:674332
@@ -38,8 +38,6 @@
{
KComponentData componentData("tutorial1");
- Solid::DeviceNotifier *notifier = Solid::DeviceNotifier::instance();
-
foreach (Solid::Device device, Solid::Device::allDevices())
{
kDebug() << device.udi().toLatin1().constData() << endl;
--- trunk/KDE/kdelibs/solid/examples/tutorial2/tutorial2.cpp #674331:674332
@@ -39,8 +39,6 @@
{
KComponentData componentData("tutorial2");
- Solid::DeviceNotifier *notifier = Solid::DeviceNotifier::instance();
-
//get a list of all devices that are AudioInterface
foreach (Solid::Device device, \
Solid::Device::listFromType(Solid::DeviceInterface::AudioInterface, QString())) {
--- trunk/KDE/kdelibs/solid/examples/tutorial3/tutorial3.cpp #674331:674332
@@ -40,8 +40,6 @@
{
KComponentData componentData("tutorial3");
- Solid::DeviceNotifier *notifier = Solid::DeviceNotifier::instance();
-
//get a Processor
QList<Solid::Device> list = \
Solid::Device::listFromType(Solid::DeviceInterface::Processor, QString());
--- trunk/KDE/kdelibs/solid/examples/tutorial4/tutorial4.cpp #674331:674332
@@ -21,8 +21,8 @@
#include <QList>
//solid specific includes
-#include <solid/devicemanager.h>
-#include <solid/networkmanager.h>
+#include <solid/device.h>
+#include <solid/networking.h>
//kde specific includes
#include <kcomponentdata.h>
@@ -38,11 +38,8 @@
{
KComponentData data("tutorial4");
- //get a reference to the network manager
- Solid::NetworkManager &netmanager = Solid::NetworkManager::self();
-
//test to see if networking is enabled on the system
- if(netmanager.isNetworkingEnabled())
+ if(Solid::Networking::status() == Solid::Networking::Connected)
{
kDebug() << "Networking is enabled. Feel free to go online!" << endl;
}
--- trunk/KDE/kdelibs/solid/examples/tutorial5/tutorial5.cpp #674331:674332
@@ -21,8 +21,8 @@
#include <QList>
//solid specific includes
-#include <solid/devicemanager.h>
-#include <solid/networkmanager.h>
+#include <solid/deviceinterface.h>
+#include <solid/networking.h>
#include <solid/device.h>
#include <solid/networkinterface.h>
@@ -40,12 +40,9 @@
{
KComponentData data("tutorial5");
- //get a reference to the device manager
- Solid::DeviceManager &manager = Solid::DeviceManager::self();
+ //get a Network Device
+ QList<Solid::Device> netlist = \
Solid::Device::listFromType(Solid::DeviceInterface::NetworkInterface, QString());
- //get a network device
- Solid::DeviceList netlist = \
manager.findDevicesFromQuery(Solid::DeviceInterface::NetworkInterface, \
QString());
-
//check to see if no network devices were found
if(netlist.empty())
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic