mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-28 05:54:50 -04:00
LessQt, part 1
- added wrappers over Qt classes for seamless replacement if Qt is not available - added bstrlib as submodule - only UEFIExtract works with this changes for now, others will followa bit later
This commit is contained in:
parent
71ce2a07b2
commit
bf8632c063
32 changed files with 2891 additions and 2774 deletions
|
@ -15,12 +15,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|||
#define TREEMODEL_H
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QModelIndex>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QObject>
|
||||
|
||||
#include "ustring.h"
|
||||
#include "ubytearray.h"
|
||||
#include "basetypes.h"
|
||||
#include "types.h"
|
||||
#include "umodelindex.h"
|
||||
|
||||
class TreeItem;
|
||||
|
||||
|
@ -32,52 +34,52 @@ public:
|
|||
TreeModel(QObject *parent = 0);
|
||||
~TreeModel();
|
||||
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &index) const;
|
||||
QVariant data(const UModelIndex &index, int role) const;
|
||||
Qt::ItemFlags flags(const UModelIndex &index) const;
|
||||
QVariant headerData(int section, Qt::Orientation orientation,
|
||||
int role = Qt::DisplayRole) const;
|
||||
QModelIndex index(int row, int column,
|
||||
const QModelIndex &parent = QModelIndex()) const;
|
||||
QModelIndex parent(const QModelIndex &index) const;
|
||||
int rowCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
int columnCount(const QModelIndex &parent = QModelIndex()) const;
|
||||
UModelIndex index(int row, int column,
|
||||
const UModelIndex &parent = UModelIndex()) const;
|
||||
UModelIndex parent(const UModelIndex &index) const;
|
||||
int rowCount(const UModelIndex &parent = UModelIndex()) const;
|
||||
int columnCount(const UModelIndex &parent = UModelIndex()) const;
|
||||
|
||||
void setAction(const QModelIndex &index, const UINT8 action);
|
||||
void setType(const QModelIndex &index, const UINT8 type);
|
||||
void setSubtype(const QModelIndex &index, const UINT8 subtype);
|
||||
void setName(const QModelIndex &index, const QString &name);
|
||||
void setText(const QModelIndex &index, const QString &text);
|
||||
void setInfo(const QModelIndex &index, const QString &info);
|
||||
void addInfo(const QModelIndex &index, const QString &info, const bool append = TRUE);
|
||||
void setParsingData(const QModelIndex &index, const QByteArray &data);
|
||||
void setFixed(const QModelIndex &index, const bool fixed);
|
||||
void setCompressed(const QModelIndex &index, const bool compressed);
|
||||
void setAction(const UModelIndex &index, const UINT8 action);
|
||||
void setType(const UModelIndex &index, const UINT8 type);
|
||||
void setSubtype(const UModelIndex &index, const UINT8 subtype);
|
||||
void setName(const UModelIndex &index, const UString &name);
|
||||
void setText(const UModelIndex &index, const UString &text);
|
||||
void setInfo(const UModelIndex &index, const UString &info);
|
||||
void addInfo(const UModelIndex &index, const UString &info, const bool append = TRUE);
|
||||
void setParsingData(const UModelIndex &index, const UByteArray &data);
|
||||
void setFixed(const UModelIndex &index, const bool fixed);
|
||||
void setCompressed(const UModelIndex &index, const bool compressed);
|
||||
|
||||
QString name(const QModelIndex &index) const;
|
||||
QString text(const QModelIndex &index) const;
|
||||
QString info(const QModelIndex &index) const;
|
||||
UINT8 type(const QModelIndex &index) const;
|
||||
UINT8 subtype(const QModelIndex &index) const;
|
||||
QByteArray header(const QModelIndex &index) const;
|
||||
bool hasEmptyHeader(const QModelIndex &index) const;
|
||||
QByteArray body(const QModelIndex &index) const;
|
||||
bool hasEmptyBody(const QModelIndex &index) const;
|
||||
QByteArray tail(const QModelIndex &index) const;
|
||||
bool hasEmptyTail(const QModelIndex &index) const;
|
||||
QByteArray parsingData(const QModelIndex &index) const;
|
||||
bool hasEmptyParsingData(const QModelIndex &index) const;
|
||||
UINT8 action(const QModelIndex &index) const;
|
||||
bool fixed(const QModelIndex &index) const;
|
||||
UString name(const UModelIndex &index) const;
|
||||
UString text(const UModelIndex &index) const;
|
||||
UString info(const UModelIndex &index) const;
|
||||
UINT8 type(const UModelIndex &index) const;
|
||||
UINT8 subtype(const UModelIndex &index) const;
|
||||
UByteArray header(const UModelIndex &index) const;
|
||||
bool hasEmptyHeader(const UModelIndex &index) const;
|
||||
UByteArray body(const UModelIndex &index) const;
|
||||
bool hasEmptyBody(const UModelIndex &index) const;
|
||||
UByteArray tail(const UModelIndex &index) const;
|
||||
bool hasEmptyTail(const UModelIndex &index) const;
|
||||
UByteArray parsingData(const UModelIndex &index) const;
|
||||
bool hasEmptyParsingData(const UModelIndex &index) const;
|
||||
UINT8 action(const UModelIndex &index) const;
|
||||
bool fixed(const UModelIndex &index) const;
|
||||
|
||||
bool compressed(const QModelIndex &index) const;
|
||||
bool compressed(const UModelIndex &index) const;
|
||||
|
||||
QModelIndex addItem(const UINT8 type, const UINT8 subtype,
|
||||
const QString & name, const QString & text, const QString & info,
|
||||
const QByteArray & header, const QByteArray & body, const QByteArray & tail,
|
||||
const bool fixed, const QByteArray & parsingData = QByteArray(),
|
||||
const QModelIndex & parent = QModelIndex(), const UINT8 mode = CREATE_MODE_APPEND);
|
||||
UModelIndex addItem(const UINT8 type, const UINT8 subtype,
|
||||
const UString & name, const UString & text, const UString & info,
|
||||
const UByteArray & header, const UByteArray & body, const UByteArray & tail,
|
||||
const bool fixed, const UByteArray & parsingData = UByteArray(),
|
||||
const UModelIndex & parent = UModelIndex(), const UINT8 mode = CREATE_MODE_APPEND);
|
||||
|
||||
QModelIndex findParentOfType(const QModelIndex & index, UINT8 type) const;
|
||||
UModelIndex findParentOfType(const UModelIndex & index, UINT8 type) const;
|
||||
|
||||
private:
|
||||
TreeItem *rootItem;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue