mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
add toolbox network devices & enhance UI with new icons
- Added new icons to resources.qrc for improved UI representation. - Implemented ZIconWidget for buttons in AfcExplorerWidget, replacing ClickableIconWidget. - Introduced NetworkDevicesWidget for discovering and monitoring network devices. - Updated AppInstallDialog to use QTemporaryDir for better temporary directory management. - Enhanced FileExportDialog to prompt user for opening the export directory upon completion. - Refactored styles in various widgets for consistency and improved theming support. - Cleaned up unused code and comments across multiple files.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
#ifndef NETWORKDEVICESWIDGET_H
|
||||
#define NETWORKDEVICESWIDGET_H
|
||||
|
||||
#ifdef __linux__
|
||||
#include "core/services/avahi/avahi_service.h"
|
||||
#else
|
||||
#include "core/services/dnssd/dnssd_service.h"
|
||||
#endif
|
||||
|
||||
#include <QGroupBox>
|
||||
#include <QLabel>
|
||||
#include <QScrollArea>
|
||||
#include <QVBoxLayout>
|
||||
#include <QWidget>
|
||||
|
||||
class NetworkDevicesWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit NetworkDevicesWidget(QWidget *parent = nullptr);
|
||||
~NetworkDevicesWidget();
|
||||
|
||||
private slots:
|
||||
void onWirelessDeviceAdded(const NetworkDevice &device);
|
||||
void onWirelessDeviceRemoved(const QString &deviceName);
|
||||
|
||||
private:
|
||||
void setupUI();
|
||||
void createDeviceCard(const NetworkDevice &device);
|
||||
void clearDeviceCards();
|
||||
void updateDeviceList();
|
||||
|
||||
QGroupBox *m_deviceGroup = nullptr;
|
||||
QScrollArea *m_scrollArea = nullptr;
|
||||
QWidget *m_scrollContent = nullptr;
|
||||
QVBoxLayout *m_deviceLayout = nullptr;
|
||||
QLabel *m_statusLabel = nullptr;
|
||||
|
||||
#ifdef __linux__
|
||||
AvahiService *m_networkProvider = nullptr;
|
||||
#else
|
||||
DnssdService *m_networkProvider = nullptr;
|
||||
#endif
|
||||
|
||||
QList<QWidget *> m_deviceCards;
|
||||
};
|
||||
|
||||
#endif // NETWORKDEVICESWIDGET_H
|
||||
Reference in New Issue
Block a user