summaryrefslogtreecommitdiff
path: root/src/transfersavesdialog.h
diff options
context:
space:
mode:
authorTannin <sherb@gmx.net>2016-02-12 19:08:25 +0100
committerTannin <sherb@gmx.net>2016-02-12 19:08:25 +0100
commit4f8c71d62626aa61fb4d13f80bc043d5e6492c3e (patch)
treec16531f7609668321d780e88a523319d18fc8667 /src/transfersavesdialog.h
parentfd68248698357591f99c3091d5b15a3084fc078d (diff)
merged master into new_vfs_library
Diffstat (limited to 'src/transfersavesdialog.h')
-rw-r--r--src/transfersavesdialog.h31
1 files changed, 27 insertions, 4 deletions
diff --git a/src/transfersavesdialog.h b/src/transfersavesdialog.h
index e2c556b4..6961e8c6 100644
--- a/src/transfersavesdialog.h
+++ b/src/transfersavesdialog.h
@@ -23,10 +23,19 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
#include "tutorabledialog.h"
#include "profile.h"
+class QListWidget;
+#include <QObject>
+class QPushButton;
+#include <QString>
+class QWidget;
+
+#include <memory>
+#include <map>
+#include <vector>
+
namespace Ui { class TransferSavesDialog; }
namespace MOBase { class IPluginGame; }
-
-class SaveGame;
+namespace MOBase { class ISaveGame; }
class TransferSavesDialog : public MOBase::TutorableDialog
{
@@ -76,9 +85,23 @@ private:
MOBase::IPluginGame const *m_GamePlugin;
- std::vector<SaveGame*> m_GlobalSaves;
- std::vector<SaveGame*> m_LocalSaves;
+ typedef std::unique_ptr<MOBase::ISaveGame const> SaveListItem;
+ typedef std::vector<SaveListItem> SaveList;
+ typedef std::map<QString, SaveList> SaveCollection;
+ SaveCollection m_GlobalSaves;
+ SaveCollection m_LocalSaves;
+
+ void refreshSaves(SaveCollection &saveCollection, const QString &savedir);
+ void refreshCharacters(SaveCollection const &saveCollection,
+ QListWidget *charList,
+ QPushButton *copy,
+ QPushButton *move);
+ bool transferCharacters(
+ QString const &character, char const *message, SaveList &saves,
+ QString const &dest,
+ const std::function<bool(const QString &, const QString &)> &method,
+ char const *errmsg);
};
#endif // TRANSFERSAVESDIALOG_H