2021-10-16 16:19:51 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QtWidgets/QMainWindow>
|
|
|
|
#include "ui_SnapshotsWindow.h"
|
|
|
|
#include "SbiePlusAPI.h"
|
|
|
|
class CSimpleTreeModel;
|
|
|
|
|
|
|
|
class CSnapshotsWindow : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
CSnapshotsWindow(const CSandBoxPtr& pBox, QWidget *parent = Q_NULLPTR);
|
|
|
|
~CSnapshotsWindow();
|
|
|
|
|
|
|
|
virtual void accept() {}
|
|
|
|
virtual void reject() { this->close(); }
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void Closed();
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
void UpdateSnapshots(bool AndSelect = false);
|
|
|
|
void UpdateSnapshot(const QModelIndex& Index);
|
|
|
|
|
|
|
|
void SaveInfo();
|
|
|
|
|
|
|
|
void OnTakeSnapshot();
|
|
|
|
void OnSelectSnapshot();
|
2022-01-30 14:53:37 +00:00
|
|
|
void OnSelectEmpty();
|
|
|
|
void OnChangeDefault();
|
2021-10-16 16:19:51 +01:00
|
|
|
void OnRemoveSnapshot();
|
|
|
|
|
|
|
|
void OnSaveInfo();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void closeEvent(QCloseEvent *e);
|
|
|
|
|
2022-01-30 14:53:37 +00:00
|
|
|
void SelectSnapshot(const QString& ID);
|
2021-10-16 16:19:51 +01:00
|
|
|
void HandleResult(SB_PROGRESS Status);
|
|
|
|
|
2022-04-16 14:01:01 +01:00
|
|
|
QVariant GetCurrentItem();
|
|
|
|
|
2021-10-16 16:19:51 +01:00
|
|
|
CSandBoxPtr m_pBox;
|
|
|
|
QString m_CurSnapshot;
|
2022-01-30 14:53:37 +00:00
|
|
|
QString m_DefaultSnapshot;
|
2021-10-16 16:19:51 +01:00
|
|
|
QMap<QVariant, QVariantMap> m_SnapshotMap;
|
|
|
|
|
|
|
|
QVariant m_SellectedID;
|
|
|
|
int m_SaveInfoPending;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::SnapshotsWindow ui;
|
|
|
|
CSimpleTreeModel* m_pSnapshotModel;
|
|
|
|
};
|