appmgrmodel.h

来自「程序代码使用说明: (1)所有源代码目录下都提供了Makefile(非Qt)」· C头文件 代码 · 共 47 行

H
47
字号
#ifndef APPMGR_MODEL_H#define APPMGR_MODEL_H#include <QAbstractTableModel>#include <QList>#define TOP_FOLDER_FLAG "TOP_FOLDER_FLAG"struct AppNode;class AppMgrModel : public QAbstractTableModel{    Q_OBJECTpublic:    AppMgrModel(const QString& children, QObject* parent = 0);    ~AppMgrModel();    int rowCount(const QModelIndex & parent = QModelIndex()) const     {         return (int)((double)nodesCount/COL_NUM + 0.5);     }        int columnCount(const QModelIndex & parent = QModelIndex()) const     {         return COL_NUM;     }    QVariant data(const QModelIndex &, int role = Qt::DisplayRole) const;public slots:    void loadChildNodes();private:    void clearNodes();    QList<AppNode* > mNodeList;    QString mChildren;        int nodesCount;            static const QString iniFileName;    static const int COL_NUM;};#endif //APPMGR_MODEL_H

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?