NE A21: deQtization begins

- added FfsBuilder code and UI, but reconstruction routines for volumes,
files and sections are still not ready
- FfsOps moved to common
- QVector and QPair aren't used anymore, replaces with std::vector and
std::pair
- common classes are now independent from QObject
- next step is to replace QString with CBString from bstrlib
This commit is contained in:
Nikolaj Schlej 2016-03-01 08:20:44 +01:00
parent b7ec76e091
commit 2024c1898b
21 changed files with 729 additions and 658 deletions

View file

@ -13,42 +13,41 @@ WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#ifndef __FITPARSER_H__
#define __FITPARSER_H__
#include <vector>
#include <QObject>
#include <QModelIndex>
#include <QByteArray>
#include <QStringList>
#include <QVector>
#include "basetypes.h"
#include "treemodel.h"
#include "utility.h"
#include "parsingdata.h"
#include "fit.h"
#include "types.h"
#include "treemodel.h"
class TreeModel;
class FitParser : public QObject
class FitParser
{
Q_OBJECT
public:
// Default constructor and destructor
FitParser(TreeModel* treeModel, QObject *parent = 0);
FitParser(TreeModel* treeModel);
~FitParser();
// Returns messages
QVector<QPair<QString, QModelIndex> > getMessages() const;
std::vector<std::pair<QString, QModelIndex> > getMessages() const;
// Clears messages
void clearMessages();
STATUS parse(const QModelIndex & index, const QModelIndex & lastVtf);
QVector<QVector<QString> > getFitTable() const { return fitTable; }
std::vector<std::vector<QString> > getFitTable() const { return fitTable; }
private:
TreeModel *model;
QVector<QPair<QString, QModelIndex> > messagesVector;
std::vector<std::pair<QString, QModelIndex> > messagesVector;
QModelIndex lastVtf;
QVector<QVector<QString> > fitTable;
std::vector<std::vector<QString> > fitTable;
STATUS findFitRecursive(const QModelIndex & index, QModelIndex & found, UINT32 & fitOffset);
QString fitEntryTypeToQString(UINT8 type);