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;
491 cout << tr("Device CanRepair: %1").arg(device.as<Solid::StorageAccess>()->canRepair() == 0 ? tr("no") : tr("yes")) << endl;
573void SolidHardware::slotStorageCheckResult(Solid::ErrorType error, const QVariant &errorData, const QString &udi)
577 cout << tr("Device check: %1").arg(errorData.toBool() ? tr("no error") : tr("has error")) << endl;
Base class of all the device interfaces.
Definition frontend/deviceinterface.h:30
Type
This enum type defines the type of device interface that a Device can have.
Definition frontend/deviceinterface.h:50
This class allows applications to deal with devices available in the underlying system.
Definition frontend/device.h:34
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
void propertyChanged(const QMap< QString, int > &changes)
This signal is emitted when a property is changed in the device.
Type type(const QSqlDatabase &db)
KSERVICE_EXPORT KService::List query(FilterFunc filterFunc)
QAction * end(const QObject *recvr, const char *slot, QObject *parent)
QString path(const QString &relativePath)
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
typedef 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-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:55:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:55:36 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.