mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
f0fede4e81
- Updated `CableInfoWidget` to include a TODO comment regarding manufacturer verification. - Refactored `CustomTab` and `CustomTabWidget` to remove notification label functionality, simplifying the class structure. - Improved `DeviceInfoWidget` by adding a destructor to manage graphics view memory and initializing graphics scene properly. - Introduced `DiskUsageBar` and `DiskUsageWidget` classes to manage disk usage visualization, including hover popover functionality for detailed information. - Enhanced `MediaPreviewDialog` to include more descriptive window titles and adjusted status label styling based on platform. - Added platform-specific functionality in `macos.h` and `macos.mm` for popover management. - Cleaned up `ToolboxWidget` by adjusting label styles and removing fixed sizes for better responsiveness.
37 lines
958 B
C++
37 lines
958 B
C++
#ifndef DEVICEINFOWIDGET_H
|
|
#define DEVICEINFOWIDGET_H
|
|
#include "batterywidget.h"
|
|
#include "iDescriptor.h"
|
|
#include <QGraphicsScene>
|
|
#include <QGraphicsView>
|
|
#include <QLabel>
|
|
#include <QTimer>
|
|
#include <QWidget>
|
|
class DeviceInfoWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit DeviceInfoWidget(iDescriptorDevice *device,
|
|
QWidget *parent = nullptr);
|
|
~DeviceInfoWidget(); // added destructor
|
|
|
|
private slots:
|
|
void onBatteryMoreClicked();
|
|
|
|
private:
|
|
QPixmap getDeviceIcon(const std::string &productType);
|
|
iDescriptorDevice *m_device;
|
|
QTimer *m_updateTimer;
|
|
void updateBatteryInfo();
|
|
void updateChargingStatusIcon();
|
|
QLabel *m_chargingStatusLabel;
|
|
QLabel *m_chargingWattsWithCableTypeLabel;
|
|
BatteryWidget *m_batteryWidget;
|
|
QLabel *m_lightningIconLabel;
|
|
|
|
QGraphicsView *m_graphicsView = nullptr;
|
|
QGraphicsScene *m_graphicsScene = nullptr;
|
|
};
|
|
|
|
#endif // DEVICEINFOWIDGET_H
|