File indexing completed on 2024-05-19 16:31:57
0001 /* 0002 * SPDX-FileCopyrightText: 2009 David Hubner <hubnerd@ntlworld.com> 0003 * 0004 * SPDX-License-Identifier: GPL-2.0-or-later 0005 * 0006 */ 0007 0008 #ifndef INFOPANEL 0009 #define INFOPANEL 0010 0011 // QT 0012 #include <QGroupBox> 0013 0014 // KDE 0015 #include <KLocalizedString> 0016 0017 class QVListLayout; 0018 class QLabel; 0019 class DevInfoPlugin; 0020 class QVBoxLayout; 0021 namespace Solid 0022 { 0023 class Device; 0024 } 0025 0026 class InfoPanel : public QGroupBox 0027 { 0028 Q_OBJECT 0029 0030 public: 0031 explicit InfoPanel(QWidget *, DevInfoPlugin *); 0032 ~InfoPanel() override; 0033 0034 void setTopInfo(const QIcon &, Solid::Device *); 0035 void setBottomInfo(QVListLayout *lay); 0036 static QString friendlyString(const QString &, const QString & = i18nc("name of something is not known", "Unknown")); 0037 static QString convertTf(bool); 0038 0039 private: 0040 void setTopWidgetLayout(bool = false); 0041 void setBottomWidgetLayout(QVListLayout *, bool = false); 0042 void setInfoPanelLayout(); 0043 void setDefaultText(); 0044 0045 QLabel *setDevicesIcon(const QIcon &); 0046 QVBoxLayout *setAlignedLayout(QWidget *parent, int = 0); 0047 0048 QWidget *top; 0049 QWidget *bottom; 0050 QVBoxLayout *vLayout; 0051 Solid::Device *dev; 0052 DevInfoPlugin *status; 0053 }; 0054 0055 #endif // INFOPANEL