玉兔远程控制 0.1.0-bate10
载入中...
搜索中...
未找到
类 | Public 类型 | Public 成员函数 | Private 成员函数 | Private 属性 | 所有成员列表
CFavoriteModel类 参考
类 CFavoriteModel 继承关系图:
Inheritance graph
[图例]
CFavoriteModel 的协作图:
Collaboration graph
[图例]

类

struct  tree
 

Public 类型

enum  RoleType { RoleFile = Qt::UserRole , RoleNodeType , RoleItem }
 

Public 成员函数

 CFavoriteModel (CFavoriteDatabase *pDatabase, QObject *parent=nullptr)
 
bool AddNode (const QString &szName, int parentId)
 
bool AddFavorite (const QString &szFile, const QString &szName, const QIcon &icon, const QString szDescription, int parentId=0)
 
bool UpdateFavorite (const QString &szFile, const QString &szName=QString(), const QString &szDescription=QString(), const QIcon &icon=QIcon())
 
CFavoriteDatabase::Item GetFavorite (const QString &szFile)
 
void Refresh ()
 
bool Move (QModelIndex index, QModelIndex parentIndex)
 
bool Copy (QModelIndex index, QModelIndex parentIndex)
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
QModelIndex parent (const QModelIndex &index) const override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
bool canFetchMore (const QModelIndex &parent) const override
 
void fetchMore (const QModelIndex &parent) override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
bool setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
bool removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override
 

Private 成员函数

tree * GetTree (int id) const
 
tree * GetTree (QModelIndex index) const
 
QModelIndex CreateIndex (tree *t) const
 
void ClearTree (tree *node)
 
bool AddTree (const CFavoriteDatabase::Item &item, int parentId)
 
bool UpdateTree (const QString &szFile)
 
bool MoveTree (const CFavoriteDatabase::Item &item, int newParentId)
 

Private 属性

CFavoriteDatabase * m_pDatabase
 
tree * m_pRoot
 
QMap< int, tree * > m_Folders
 

详细描述

在文件 FavoriteModel.h 第 9 行定义.

成员枚举类型说明

◆ RoleType

enum CFavoriteModel::RoleType

在文件 FavoriteModel.h 第 31 行定义.

构造及析构函数说明

◆ ~CFavoriteModel()

CFavoriteModel::~CFavoriteModel ( )

在文件 FavoriteModel.cpp 第 22 行定义.

成员函数说明

◆ AddFavorite()

bool CFavoriteModel::AddFavorite ( const QString &  szFile,
const QString &  szName,
const QIcon &  icon,
const QString  szDescription,
int  parentId = 0 
)

在文件 FavoriteModel.cpp 第 229 行定义.

◆ AddNode()

bool CFavoriteModel::AddNode ( const QString &  szName,
int  parentId 
)

在文件 FavoriteModel.cpp 第 342 行定义.

◆ AddTree()

bool CFavoriteModel::AddTree ( const CFavoriteDatabase::Item &  item,
int  parentId 
)
private

在文件 FavoriteModel.cpp 第 413 行定义.

◆ canFetchMore()

bool CFavoriteModel::canFetchMore ( const QModelIndex &  parent) const
override

在文件 FavoriteModel.cpp 第 90 行定义.

◆ ClearTree()

void CFavoriteModel::ClearTree ( tree *  node)
private

在文件 FavoriteModel.cpp 第 367 行定义.

◆ columnCount()

int CFavoriteModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

在文件 FavoriteModel.cpp 第 85 行定义.

◆ Copy()

bool CFavoriteModel::Copy ( QModelIndex  index,
QModelIndex  parentIndex 
)

在文件 FavoriteModel.cpp 第 301 行定义.

◆ CreateIndex()

QModelIndex CFavoriteModel::CreateIndex ( tree *  t) const
private

在文件 FavoriteModel.cpp 第 397 行定义.

◆ data()

QVariant CFavoriteModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

在文件 FavoriteModel.cpp 第 148 行定义.

◆ fetchMore()

void CFavoriteModel::fetchMore ( const QModelIndex &  parent)
override

在文件 FavoriteModel.cpp 第 111 行定义.

◆ flags()

Qt::ItemFlags CFavoriteModel::flags ( const QModelIndex &  index) const
override

在文件 FavoriteModel.cpp 第 197 行定义.

◆ GetFavorite()

CFavoriteDatabase::Item CFavoriteModel::GetFavorite ( const QString &  szFile)

在文件 FavoriteModel.cpp 第 323 行定义.

◆ GetTree() [1/2]

CFavoriteModel::tree * CFavoriteModel::GetTree ( int  id) const
private

在文件 FavoriteModel.cpp 第 379 行定义.

◆ GetTree() [2/2]

CFavoriteModel::tree * CFavoriteModel::GetTree ( QModelIndex  index) const
private

在文件 FavoriteModel.cpp 第 387 行定义.

◆ index()

QModelIndex CFavoriteModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
override

在文件 FavoriteModel.cpp 第 30 行定义.

◆ Move()

bool CFavoriteModel::Move ( QModelIndex  index,
QModelIndex  parentIndex 
)

在文件 FavoriteModel.cpp 第 272 行定义.

◆ MoveTree()

bool CFavoriteModel::MoveTree ( const CFavoriteDatabase::Item &  item,
int  newParentId 
)
private

在文件 FavoriteModel.cpp 第 468 行定义.

◆ parent()

QModelIndex CFavoriteModel::parent ( const QModelIndex &  index) const
override

在文件 FavoriteModel.cpp 第 51 行定义.

◆ Refresh()

void CFavoriteModel::Refresh ( )

在文件 FavoriteModel.cpp 第 334 行定义.

◆ removeRows()

bool CFavoriteModel::removeRows ( int  row,
int  count,
const QModelIndex &  parent = QModelIndex() 
)
override

在文件 FavoriteModel.cpp 第 205 行定义.

◆ rowCount()

int CFavoriteModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

在文件 FavoriteModel.cpp 第 66 行定义.

◆ setData()

bool CFavoriteModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role = Qt::EditRole 
)
override

在文件 FavoriteModel.cpp 第 177 行定义.

◆ UpdateFavorite()

bool CFavoriteModel::UpdateFavorite ( const QString &  szFile,
const QString &  szName = QString(),
const QString &  szDescription = QString(),
const QIcon &  icon = QIcon() 
)

在文件 FavoriteModel.cpp 第 262 行定义.

◆ UpdateTree()

bool CFavoriteModel::UpdateTree ( const QString &  szFile)
private

在文件 FavoriteModel.cpp 第 448 行定义.

类成员变量说明

◆ m_Folders

QMap<int, tree*> CFavoriteModel::m_Folders
private

在文件 FavoriteModel.h 第 89 行定义.

◆ m_pDatabase

CFavoriteDatabase* CFavoriteModel::m_pDatabase
private

在文件 FavoriteModel.h 第 59 行定义.

◆ m_pRoot

tree* CFavoriteModel::m_pRoot
private

在文件 FavoriteModel.h 第 87 行定义.


该类的文档由以下文件生成: