#ifndef BackupPointListDialog_H #define BackupPointListDialog_H #include #include #include #include #include "../backup-daemon/parsebackuplist.h" #include "./module/udiskdetector.h" namespace Ui { class BackupPointListDialog; } class BackupPointListDialog : public QDialog { Q_OBJECT public: enum Column_Index { Backup_Name = 0, UUID, Backup_Time, Backup_Device, Backup_State, Prefix_Path }; explicit BackupPointListDialog(QWidget *parent = nullptr, bool isOnlyShowLocal = false); virtual ~BackupPointListDialog(); QList getBackupPointList(); bool isOnlyShowLocal() const { return m_onlyShowLocal; } signals: void udiskChange(); void selected(ParseBackupList::BackupPoint); protected: void keyPressEvent(QKeyEvent* event); void setItem(int row, int column, const QString& text, int alignFlag = Qt::AlignCenter); QString text(int row, int column); QTableWidget *m_tableWidget; QHBoxLayout *m_bottomLayout = nullptr; private: Ui::BackupPointListDialog *ui; // U盘探测 UdiskDetector* m_udector; // U盘挂载路径列表 QStringList m_udiskPaths; // 是否只展示本地备份 bool m_onlyShowLocal; }; #endif // BackupPointListDialog_H