Cute Chess  0.1
pgnimporter.h
1 /*
2  This file is part of Cute Chess.
3 
4  Cute Chess is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  Cute Chess is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with Cute Chess. If not, see <http://www.gnu.org/licenses/>.
16 */
17 
18 #ifndef PGN_IMPORTER_H
19 #define PGN_IMPORTER_H
20 
21 #include <worker.h>
22 
23 class PgnDatabase;
24 
30 class PgnImporter : public Worker
31 {
32  Q_OBJECT
33 
34  public:
36  enum Error
37  {
40  };
41 
48  QString fileName() const;
49 
50  protected:
51  void work() override;
52 
53  signals:
55  void databaseRead(PgnDatabase* database);
62  void databaseReadStatus(const QTime& started, int numReadGames, qint64 numReadBytes);
63 
64  private:
65  QString m_fileName;
66 
67 };
68 
69 #endif // PGN_IMPORTER_H
70 
void databaseRead(PgnDatabase *database)
The PGN file was not found.
Definition: pgnimporter.h:38
Definition: worker.h:29
PgnImporter(const QString &fileName)
Definition: pgnimporter.cpp:27
QString fileName() const
Definition: pgnimporter.cpp:33
void work() override
Definition: pgnimporter.cpp:38
A generic I/O error.
Definition: pgnimporter.h:39
PGN database.
Definition: pgndatabase.h:36
Reads PGN database in a separate thread.
Definition: pgnimporter.h:30
Error
Definition: pgnimporter.h:36
void databaseReadStatus(const QTime &started, int numReadGames, qint64 numReadBytes)
void started()