diff --git a/Modules/devinfo/soldevice.h b/Modules/devinfo/soldevice.h index 78ae77a..751feb0 100644 --- a/Modules/devinfo/soldevice.h +++ b/Modules/devinfo/soldevice.h @@ -1,127 +1,127 @@ /* * soldevice.h * * Copyright (C) 2009 David Hubner * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * */ #ifndef SOLDEVICE #define SOLDEVICE //QT #include #include #include //Solid #include #include #include #include #include #include #include #include #include #include //KDE // Local #include "qvlistlayout.h" class QVListLayout; class SolDevice : public QTreeWidgetItem { public: SolDevice(const Solid::DeviceInterface::Type &); SolDevice(const Solid::DeviceInterface::Type &, const QString &); SolDevice(QTreeWidgetItem *); SolDevice(QTreeWidgetItem *, const Solid::Device &); QIcon deviceIcon() const; Solid::Device *device(); Solid::DeviceInterface::Type deviceType() const; template const IFace *interface() { if (deviceSet) { IFace *dev = tiedDevice.as(); if (!dev) { qDebug() << "Device unable to be cast to correct device"; } return dev; } else { return nullptr; } } template const IFace *interface(const Solid::Device &device) { IFace *dev = device.as(); if (!dev) { qDebug() << "Device unable to be cast to correct device"; } return dev; } template void createDeviceChildren( QTreeWidgetItem *treeParent, const QString &parentUid, const Solid::DeviceInterface::Type &type) { const QList list = Solid::Device::listFromType(type, parentUid); foreach (const Solid::Device &dev, list) { new IFace(treeParent, dev); } } void setDeviceIcon(const QIcon &); void setDeviceToolTip(const QString &); virtual QVListLayout *infoPanelLayout(); virtual void addItem(const Solid::Device &dev) { new SolDevice(this, dev); } virtual void refreshName() { setDefaultDeviceText(); } QString udi() const; bool isDeviceSet(); - bool operator< (const QTreeWidgetItem & other) const; + bool operator< (const QTreeWidgetItem & other) const override; protected: void setDeviceText(const QString &); virtual void setDefaultDeviceToolTip(); virtual void setDefaultDeviceText(); virtual void setDefaultDeviceIcon(); virtual void setDefaultListing(const Solid::DeviceInterface::Type &); bool deviceSet; QVListLayout *deviceInfoLayout; Solid::DeviceInterface::Type deviceTypeHolder; Solid::Device tiedDevice; }; #endif //SOLDEVICE