3 Star 0 Fork 0

openEuler-competition / Summer2021-No.16 开发DDE桌面上基于rpm的软件包安装器

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
pkgdetaildialog.h 2.07 KB
一键复制 编辑 原始数据 按行查看 历史
#ifndef PKGDETAILDIALOG_H
#define PKGDETAILDIALOG_H
#include <QObject>
#include <QWidget>
#include <QDialog>
#include <QVBoxLayout>
#include <QLabel>
#include <QPushButton>
#include <QScrollArea>
#include <QVector>
#include "datastructs.h"
class PkgDetailDialog : public QDialog
{
Q_OBJECT
public:
PkgDetailDialog(QWidget *parent = nullptr);
~PkgDetailDialog();
void initData(RPMInfoStruct rpmInfo);
void initUI();
private:
/**
* @brief 为 content 加上标题样式
* @param content 要被加样式的内容
*/
QString headerStyle(QString content);
/**
* @brief 为 content 加上次级标题样式
* @param content 要被加样式的内容
*/
QString subHeaderStyle(QString content);
/**
* @brief 为 content 加上带左缩进的样式
* @param content 要被加缩进的内容
*/
QString marginStyle(QString content);
/**
* @brief 为 content 加上文本块风格的样式
* @param content 要被加样式的内容
*/
QString docblockStyle(QString content);
/**
* @brief 将字符串向量变为带样式的 html 文本, 每个向量元素一行
* @param list 列表
*/
QString styledList(QVector<QString> list);
RPMInfoStruct *rpmInfo = nullptr;
QWidget *viewport = nullptr;
QScrollArea *mainScrollArea = nullptr;
QVBoxLayout *mainLayout = nullptr;
QVBoxLayout *dialogLayout = nullptr;
QLabel *name = nullptr;
QLabel *archLabel = nullptr;
QLabel *arch = nullptr;
QLabel *licenseLabel = nullptr;
QLabel *license = nullptr;
QLabel *summaryLabel = nullptr;
QLabel *summary = nullptr;
QLabel *descriptionLabel = nullptr;
QLabel *description = nullptr;
QLabel *versionReleaseLabel = nullptr;
QLabel *versionRelease = nullptr;
QLabel *requiresLabel = nullptr;
QLabel *requiresArea = nullptr;
QScrollArea *requiresScrollArea = nullptr;
QLabel *providesLabel = nullptr;
QLabel *providesArea = nullptr;
QScrollArea *providesScrollArea = nullptr;
};
#endif // PKGDETAILDIALOG_H
1
https://gitee.com/openeuler-competition/summer2021-16.git
git@gitee.com:openeuler-competition/summer2021-16.git
openeuler-competition
summer2021-16
Summer2021-No.16 开发DDE桌面上基于rpm的软件包安装器
master

搜索帮助