mirror of
https://github.com/LongSoft/UEFITool.git
synced 2025-05-24 20:14:39 -04:00
Big structure update
- files split into common and app-specific ones - messages from parser and finder separated - ffsEngine split into multiple classes to reduce complexity - still no image rebuild
This commit is contained in:
parent
1f0a80d035
commit
2e788a8a1a
64 changed files with 477 additions and 2469 deletions
78
treemodel.h
78
treemodel.h
|
@ -1,78 +0,0 @@
|
|||
/* treemodel.h
|
||||
|
||||
Copyright (c) 2015, Nikolaj Schlej. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef __TREEMODEL_H__
|
||||
#define __TREEMODEL_H__
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QModelIndex>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
|
||||
#include "basetypes.h"
|
||||
#include "types.h"
|
||||
|
||||
class TreeItem;
|
||||
|
||||
class TreeModel : public QAbstractItemModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TreeModel(QObject *parent = 0);
|
||||
~TreeModel();
|
||||
|
||||
QVariant data(const QModelIndex &index, int role) const;
|
||||
Qt::ItemFlags flags(const QModelIndex &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;
|
||||
|
||||
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);
|
||||
void setParsingData(const QModelIndex &index, const QByteArray &data);
|
||||
|
||||
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 parsingData(const QModelIndex &index) const;
|
||||
bool hasEmptyParsingData(const QModelIndex &index) const;
|
||||
UINT8 action(const QModelIndex &index) const;
|
||||
|
||||
QModelIndex addItem(const UINT8 type, const UINT8 subtype = 0,
|
||||
const QString & name = QString(), const QString & text = QString(), const QString & info = QString(),
|
||||
const QByteArray & header = QByteArray(), const QByteArray & body = QByteArray(), const QByteArray & parsingData = QByteArray(),
|
||||
const QModelIndex & parent = QModelIndex(), const UINT8 mode = CREATE_MODE_APPEND);
|
||||
|
||||
QModelIndex findParentOfType(const QModelIndex & index, UINT8 type) const;
|
||||
|
||||
private:
|
||||
TreeItem *rootItem;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue