支持显示版本号
This commit is contained in:
parent
a569f6b63c
commit
89d14e7e96
BIN
Donate/Alipay.jpg
Normal file
BIN
Donate/Alipay.jpg
Normal file
Binary file not shown.
After ![]() (image error) Size: 270 KiB |
BIN
Donate/QQ.png
Normal file
BIN
Donate/QQ.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 66 KiB |
BIN
Donate/Wechat.png
Normal file
BIN
Donate/Wechat.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 76 KiB |
BIN
Donate/advertisement0.jpg
Normal file
BIN
Donate/advertisement0.jpg
Normal file
Binary file not shown.
After ![]() (image error) Size: 338 KiB |
@ -18,5 +18,10 @@
|
||||
<file>data/new/zh_CN.html</file>
|
||||
<file>data/version</file>
|
||||
<file>shell/kernel-installer-upgrade-template.sh</file>
|
||||
<file>icon/icon1.png</file>
|
||||
<file>Donate/advertisement0.jpg</file>
|
||||
<file>Donate/Alipay.jpg</file>
|
||||
<file>Donate/QQ.png</file>
|
||||
<file>Donate/Wechat.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -17,7 +17,8 @@ AboutWindow::AboutWindow(QWidget *parent) :
|
||||
info += "<pre>";
|
||||
info += tr("A kernel manager allows users to install or remove kernels easily.") + "\n\n";
|
||||
info += "<b>" + tr("Warning: You may damage your system unless you know what you will do!") + "</b>\n";
|
||||
info += tr("Built Time: ") + QString(__DATE__) + " " + __TIME__;
|
||||
info += tr("Built Time: ") + QString(__DATE__) + " " + __TIME__ + "\n";
|
||||
info += tr("QQ Group: 881201853") + "\n";
|
||||
info += "</pre>";
|
||||
info += "<hr/>";
|
||||
info += ProgramInfo::updateInfo();
|
||||
@ -25,6 +26,8 @@ AboutWindow::AboutWindow(QWidget *parent) :
|
||||
info += "<h3>" + tr("Website") + "</h3>";
|
||||
info += "<p>Gitee: <a href='https://gitee.com/GXDE-OS/gxde-kernel-manager'>https://gitee.com/GXDE-OS/gxde-kernel-manager</a></p>";
|
||||
info += "<p>Github: <a href='https://github.com/GXDE-OS/gxde-kernel-manager'>https://github.com/GXDE-OS/gxde-kernel-manager</a></p>";
|
||||
info += "<p>Sourceforge: <a href='https://sourceforge.net/projects/gxde-kernel-manager/'>https://sourceforge.net/projects/gxde-kernel-manager/</a></p>";
|
||||
info += "<p>GXDE Homepage: <a href='https://gxde.gfdgdxi.top'>https://gxde.gfdgdxi.top</a></p>";
|
||||
info += "<hr/>\n";
|
||||
info += "<h1>©2023~" + QDateTime::currentDateTime().toString("yyyy") + " gfdgd xi</h1>\n";
|
||||
ui->textBrowser->setHtml(info);
|
||||
@ -40,3 +43,9 @@ void AboutWindow::on_m_closeButton_clicked()
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
void AboutWindow::on_m_logoShower_linkActivated(const QString &link)
|
||||
{
|
||||
ui->m_logoShower->setText("<html><head/><body><p><a href='https://gxde.gfdgdxi.top'><img width=128 src=\":/icon/icon1.png\"/></a></p></body></html>");
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,8 @@ public:
|
||||
private slots:
|
||||
void on_m_closeButton_clicked();
|
||||
|
||||
void on_m_logoShower_linkActivated(const QString &link);
|
||||
|
||||
private:
|
||||
Ui::AboutWindow *ui;
|
||||
};
|
||||
|
@ -22,7 +22,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="m_logoShower">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><img width=128 src=":/icon/icon.svg"/></p></body></html></string>
|
||||
<string><html><head/><body><p><a href='https://gxde.gfdgdxi.top'><img width=128 src=":/icon/icon.svg"/></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
|
@ -5,5 +5,5 @@
|
||||
※3、下载/更新内核时支持调用 aptss 提升下载速度
|
||||
</b>
|
||||
4、优化表格显示效果
|
||||
5、支持显示内核描述
|
||||
5、支持显示内核描述和版本
|
||||
</pre>
|
BIN
icon/icon1.png
Normal file
BIN
icon/icon1.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 257 KiB |
@ -20,6 +20,7 @@ void KernelInformation::LoadInfo()
|
||||
object.insert("Name", i);
|
||||
object.insert("Author", kernelManagerinfo.get_maintainer(i));
|
||||
object.insert("Des", kernelManagerinfo.get_description(i));
|
||||
object.insert("Ver", kernelManagerinfo.get_version(i));
|
||||
object.insert("Arch", QJsonArray::fromStringList(QStringList() << arch()));
|
||||
object.insert("PkgName", QJsonArray::fromStringList(QStringList() << i));
|
||||
array.append(object);
|
||||
@ -76,6 +77,7 @@ void KernelInformation::LoadInfo()
|
||||
object.insert("Name", strTemp);
|
||||
object.insert("Author", info.get_maintainer(i));
|
||||
object.insert("Des", info.get_description(i));
|
||||
object.insert("Ver", info.get_version(i));
|
||||
object.insert("Arch", QJsonArray::fromStringList(QStringList() << info.get_architecture(i)));
|
||||
object.insert("PkgName", QJsonArray::fromStringList(QStringList() << i));
|
||||
indexMap.insert(strTemp, array.count());
|
||||
|
@ -32,9 +32,10 @@ void MainWindow::RefreshKernelListView(KernelInformation *info, bool showLocalAr
|
||||
// 更新列表
|
||||
int count = info->get_count();
|
||||
QStandardItemModel *model = new QStandardItemModel();
|
||||
model->setHorizontalHeaderLabels(QStringList() << tr("ID") << tr("Kernel Name") << tr("Author") << tr("Arch") << tr("Installed") << tr("Description"));
|
||||
model->setHorizontalHeaderLabels(QStringList() << tr("ID") << tr("Kernel Name") << tr("Author") << tr("Arch") << tr("Version") << tr("Installed") << tr("Description"));
|
||||
const QString arch = info->arch();
|
||||
int line = 0;
|
||||
kernelNumber = 0;
|
||||
for(int i = 0; i < count; i++) {
|
||||
// 显示所有架构
|
||||
QString kernelArch = "";
|
||||
@ -56,8 +57,13 @@ void MainWindow::RefreshKernelListView(KernelInformation *info, bool showLocalAr
|
||||
model->setItem(line, 1, new QStandardItem(info->get_name(i)));
|
||||
model->setItem(line, 2, new QStandardItem(info->get_author(i)));
|
||||
model->setItem(line, 3, new QStandardItem(kernelArch));
|
||||
model->setItem(line, 4, new QStandardItem((QStringList() << "" << "Y").at(info->get_installedAlready(i))));
|
||||
model->setItem(line, 5, new QStandardItem(info->get_des(i)));
|
||||
model->setItem(line, 4, new QStandardItem(info->get_ver(i)));
|
||||
bool installed = info->get_installedAlready(i);
|
||||
model->setItem(line, 5, new QStandardItem((QStringList() << "" << "Y").at(installed)));
|
||||
if (installed) {
|
||||
kernelNumber++;
|
||||
}
|
||||
model->setItem(line, 6, new QStandardItem(info->get_des(i)));
|
||||
line++;
|
||||
}
|
||||
ui->m_kernelShow->setModel(model);
|
||||
@ -135,6 +141,17 @@ void MainWindow::on_m_removeButton_clicked()
|
||||
// 获取 ID
|
||||
QModelIndex index = ui->m_kernelShow->model()->index(row, 0);
|
||||
int id = ui->m_kernelShow->model()->data(index).toUInt();
|
||||
if(kernelNumber <= 1) {
|
||||
QMessageBox msgBox;
|
||||
msgBox.setIcon(QMessageBox::Warning);
|
||||
msgBox.setWindowTitle(tr("Warning"));
|
||||
msgBox.setInformativeText(tr("Are you sure you want to remove all installed kernel versions? Please note that this may render your system unstable or unbootable."));
|
||||
msgBox.addButton(tr("Confirm"), QMessageBox::AcceptRole);
|
||||
msgBox.addButton(tr("Cancel"), QMessageBox::RejectRole);
|
||||
if(msgBox.exec() == QMessageBox::RejectRole) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
// 获取选中行
|
||||
KernelInstaller *installer = new KernelInstaller(KernelInstaller::Option::Remove, kernelInformation->get_pkgName(id));
|
||||
installer->show();
|
||||
|
@ -48,5 +48,7 @@ private:
|
||||
KernelInformation *kernelInformation;
|
||||
void RefreshKernelList();
|
||||
void RefreshKernelListView(KernelInformation *info, bool showLocalArchOnly = true);
|
||||
|
||||
int kernelNumber = 0;
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user