1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 15:39:02 +00:00
OpenMW/apps/opencs/view/doc/loader.hpp

62 lines
1.1 KiB
C++
Raw Normal View History

2014-04-29 12:17:25 +00:00
#ifndef CSV_DOC_LOADER_H
#define CSV_DOC_LOADER_H
#include <map>
#include <QObject>
#include <QWidget>
2014-05-03 11:01:29 +00:00
class QLabel;
class QProgressBar;
2014-04-29 12:17:25 +00:00
namespace CSMDoc
{
class Document;
}
namespace CSVDoc
{
class LoadingDocument : public QWidget
{
Q_OBJECT
2014-05-03 11:01:29 +00:00
QLabel *mFile;
QProgressBar *mFileProgress;
2014-05-03 13:33:35 +00:00
QProgressBar *mRecordProgress;
2014-05-03 11:01:29 +00:00
2014-04-29 12:17:25 +00:00
public:
LoadingDocument (CSMDoc::Document *document);
2014-05-03 11:01:29 +00:00
2014-05-03 13:33:35 +00:00
void nextStage (const std::string& name, int steps);
void nextRecord();
2014-04-29 12:17:25 +00:00
};
class Loader : public QObject
{
Q_OBJECT
std::map<CSMDoc::Document *, LoadingDocument *> mDocuments;
public:
Loader();
virtual ~Loader();
public slots:
void add (CSMDoc::Document *document);
2014-04-29 12:17:25 +00:00
void loadingStopped (CSMDoc::Document *document, bool completed,
const std::string& error);
2014-05-03 11:01:29 +00:00
2014-05-03 13:33:35 +00:00
void nextStage (CSMDoc::Document *document, const std::string& name, int steps);
void nextRecord (CSMDoc::Document *document);
2014-04-29 12:17:25 +00:00
};
}
#endif