Refactor and enhance UI components

- 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.
This commit is contained in:
uncor3
2025-10-02 09:29:55 -07:00
parent 6bbad2a3b6
commit f0fede4e81
17 changed files with 605 additions and 271 deletions
+34
View File
@@ -1,7 +1,12 @@
#ifndef DISKUSAGEWIDGET_H
#define DISKUSAGEWIDGET_H
#include "diskusagebar.h"
#include "iDescriptor.h"
#include <QHBoxLayout>
#include <QLabel>
#include <QProgressBar>
#include <QVBoxLayout>
#include <QWidget>
#include <cstdint>
@@ -18,6 +23,8 @@ protected:
private:
void fetchData();
void setupUI();
void updateUI();
enum State { Loading, Ready, Error };
@@ -25,6 +32,33 @@ private:
State m_state;
QString m_errorMessage;
// UI widgets
QVBoxLayout *m_mainLayout;
QLabel *m_titleLabel;
QLabel *m_statusLabel;
QWidget *m_diskBarContainer;
QHBoxLayout *m_diskBarLayout;
#ifdef Q_OS_MAC
DiskUsageBar *m_systemBar;
DiskUsageBar *m_appsBar;
DiskUsageBar *m_mediaBar;
DiskUsageBar *m_othersBar;
DiskUsageBar *m_freeBar;
#else
QWidget *m_systemBar;
QWidget *m_appsBar;
QWidget *m_mediaBar;
QWidget *m_othersBar;
QWidget *m_freeBar;
#endif
QHBoxLayout *m_legendLayout;
QLabel *m_systemLabel;
QLabel *m_appsLabel;
QLabel *m_mediaLabel;
QLabel *m_othersLabel;
QLabel *m_freeLabel;
uint64_t m_totalCapacity;
uint64_t m_systemUsage;
uint64_t m_appsUsage;