Solid
solid-hardware.cpp
121 out << value.toString() << " (0x" << QString::number(value.toLongLong(), 16) << ") (" << value.typeName() << ")";
125 out << value.toString() << " (0x" << QString::number(value.toULongLong(), 16) << ") (" << value.typeName() << ")";
183 out << " " << QByteArray(meta->className()).mid(7).constData() << "." << property.name() << " = ";
218 parser.addPositionalArgument(QStringLiteral("udi"), QCoreApplication::translate("solid-hardware", "Device udi"));
265 cout << QCoreApplication::translate("solid-hardware", " # If applicable, mount the device corresponding to 'udi'.\n") << '\n';
268 cout << QCoreApplication::translate("solid-hardware", " # If applicable, unmount the device corresponding to 'udi'.\n") << '\n';
271 cout << QCoreApplication::translate("solid-hardware", " # If applicable, eject the device corresponding to 'udi'.\n") << '\n';
274 cout << QCoreApplication::translate("solid-hardware", " # Listen to all add/remove events on supported hardware.\n") << '\n';
277 cout << QCoreApplication::translate("solid-hardware", " # Monitor devices for changes.\n") << '\n';
280 cout << QCoreApplication::translate("solid-hardware", " # Send \"CanCheck\" request to the device corresponding to 'udi'.\n") << '\n';
283 cout << QCoreApplication::translate("solid-hardware", " # Send \"Check\" request to the device corresponding to 'udi'.\n") << '\n';
286 cout << QCoreApplication::translate("solid-hardware", " # Send \"CanRepair\" request to the device corresponding to 'udi'.\n") << '\n';
289 cout << QCoreApplication::translate("solid-hardware", " # Send \"Repair\" request to the device corresponding to 'udi'.\n");
301 parser.setApplicationDescription(QCoreApplication::translate("solid-hardware", "KDE tool for querying your hardware from the command line"));
304 parser.addPositionalArgument(QStringLiteral("command"), QCoreApplication::translate("solid-hardware", "Command to execute"), commandsHelp());
306 QCommandLineOption commands(QStringLiteral("commands"), QCoreApplication::translate("solid-hardware", "Show available commands"));
328 parser.addPositionalArgument(QStringLiteral("details"), QCoreApplication::translate("solid-hardware", "Show device details"));
329 parser.addPositionalArgument(QStringLiteral("nonportableinfo"), QCoreApplication::translate("solid-hardware", "Show non portable information"));
341 parser.addPositionalArgument(QStringLiteral("udi"), QCoreApplication::translate("solid-hardware", "Device udi"));
342 parser.addPositionalArgument(QStringLiteral("parent"), QCoreApplication::translate("solid-hardware", "Parent device udi"));
384 cerr << QCoreApplication::translate("solid-hardware", "Syntax Error: Unknown command '%1'").arg(command) << endl;
476 cout << tr("Device CanCheck: %1").arg(device.as<Solid::StorageAccess>()->canCheck() == 0 ? tr("no") : tr("yes")) << endl;
481 cout << tr("Device Check: %1").arg(device.as<Solid::StorageAccess>()->check() == 0 ? tr("has error") : tr("no error")) << endl;
488 cout << tr("Device CanRepair: %1").arg(device.as<Solid::StorageAccess>()->canRepair() == 0 ? tr("no") : tr("yes")) << endl;
Base class of all the device interfaces.
Type
This enum type defines the type of device interface that a Device can have.
Definition frontend/deviceinterface.h:50
This class allow to query the underlying system to obtain information about the hardware available.
This class allows applications to deal with devices available in the underlying system.
QString udi() const
Retrieves the Universal Device Identifier (UDI).
Definition frontend/device.cpp:68
QString parentUdi() const
Retrieves the Universal Device Identifier (UDI) of the Device's parent.
Definition frontend/device.cpp:73
QString icon() const
Retrieves the name of the icon representing this device.
Definition frontend/device.cpp:99
static QList< Device > allDevices()
Retrieves all the devices available in the underlying system.
Definition frontend/devicemanager.cpp:59
static QList< Device > listFromQuery(const Predicate &predicate, const QString &parentUdi=QString())
Retrieves a list of devices of the system given matching the given constraints (parent and predicate)
Definition frontend/devicemanager.cpp:104
QString product() const
Retrieves the name of the product corresponding to this device.
Definition frontend/device.cpp:94
DevIface * as()
Retrieves a specialized interface to interact with the device corresponding to a given device interfa...
Definition frontend/device.h:235
Generic interface to deal with a device.
void propertyChanged(const QMap< QString, int > &changes)
This signal is emitted when a property is changed in the device.
This device interface is available on CD-R*,DVD*,Blu-Ray,HD-DVD drives.
This device interface is available on volume devices to access them (i.e.
bool canRepair() const
Indicates if the filesystem of this volume supports repair attempts.
Definition frontend/storageaccess.cpp:99
bool check()
Checks the filesystem for consistency avoiding any modifications or repairs.
Definition frontend/storageaccess.cpp:93
bool canCheck() const
Indicates if this volume can check for filesystem errors.
Definition frontend/storageaccess.cpp:87
KSERVICE_EXPORT KService::List query(FilterFunc filterFunc)
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
QAction * end(const QObject *recvr, const char *slot, QObject *parent)
QString path(const QString &relativePath)
VehicleSection::Type type(QStringView coachNumber, QStringView coachClassification)
KIOCORE_EXPORT QStringList list(const QString &fileClass)
KGuiItem properties()
PHONON_EXPORT Notifier * notifier()
const char * constData() const const
QByteArray mid(qsizetype pos, qsizetype len) const const
HiddenFromHelp
QCommandLineOption addHelpOption()
bool addOption(const QCommandLineOption &option)
void addPositionalArgument(const QString &name, const QString &description, const QString &syntax)
QCommandLineOption addVersionOption()
void clearPositionalArguments()
bool isSet(const QCommandLineOption &option) const const
QStringList positionalArguments() const const
void process(const QCoreApplication &app)
void setApplicationDescription(const QString &description)
void showHelp(int exitCode)
void setApplicationName(const QString &application)
void setApplicationVersion(const QString &version)
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)
ArrayType
bool atEnd() const const
void beginArray(QMetaType id)
ElementType currentType() const const
int exec(ProcessEventsFlags flags)
void exit(int returnCode)
ConstIterator
void append(QList< T > &&value)
const_reference at(qsizetype i) const const
const_iterator constBegin() const const
const_iterator constEnd() const const
qsizetype count() const const
bool isFlag() const const
int keyCount() const const
int value(int index) const const
const char * valueToKey(int value) const const
QByteArray valueToKeys(int value) const const
const char * className() const const
QMetaProperty property(int index) const const
int propertyOffset() const const
QStringList
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QString tr(const char *sourceText, const char *disambiguation, int n)
QString arg(Args &&... args) const const
QString number(double n, char format, int precision)
QByteArray toLocal8Bit() const const
QTextStream & endl(QTextStream &stream)
bool canConvert() const const
bool toBool() const const
int toInt(bool *ok) const const
qlonglong toLongLong(bool *ok) const const
QString toString() const const
QStringList toStringList() const const
qulonglong toULongLong(bool *ok) const const
const char * typeName() const const
int userType() const const
T value() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:01:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:01:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.