diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..8a9d35c887947b2618399e6cd64808e7df019e67 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.user diff --git a/appmanagermodel.cpp b/appmanagermodel.cpp index 64537d98ebf8bfbfaa167032936bc030fcc9bc1c..bb1cc1d1675fc4c357fdf5578ebe126d0f53fe2b 100644 --- a/appmanagermodel.cpp +++ b/appmanagermodel.cpp @@ -1,9 +1,10 @@ #include "appmanagermodel.h" #include "appmanagerjob.h" - +#include #include #include #include +#include using namespace AM; @@ -102,6 +103,16 @@ void AppManagerModel::openStoreAppDetailPage(const QString &pkgName) proc.waitForFinished(); } +void AppManagerModel::openSpkStoreAppDetailPage(const QString &pkgName) +{ + QProcess spkopen; + QString cmd = QString("notify-send shenmo \"\因为无法获取分类信息,暂时没有实现这个功能\"\ "); + spkopen.start(cmd); + spkopen.waitForStarted(); + spkopen.waitForFinished(); + +} + QString AppManagerModel::getDownloadDirPath() const { return m_appManagerJob->getDownloadDirPath(); @@ -152,6 +163,11 @@ void AppManagerModel::initConnection() connect(this, &AppManagerModel::notifyThreadUninstallPkg, m_appManagerJob, &AppManagerJob::uninstallPkg); connect(m_appManagerJob, &AppManagerJob::uninstallPkgFinished, this, [this](const QString &pkgName) { + QProcess uninstnotify; + QString cmd = QString("notify-send ccc-app-manager \"\软件包 ")+pkgName+QString(" 已卸载\"\ "); + uninstnotify.start(cmd); + uninstnotify.waitForStarted(); + uninstnotify.waitForFinished(); qInfo() << pkgName << "uninstalled"; }); diff --git a/appmanagermodel.h b/appmanagermodel.h index 088ae2b24860255f2995b03f74995d627f34a782..3dec67da119627aad62064155565c823bebd7f02 100644 --- a/appmanagermodel.h +++ b/appmanagermodel.h @@ -30,6 +30,7 @@ public: QList getShowingAppInfoList() const; void openStoreAppDetailPage(const QString &pkgName); + void openSpkStoreAppDetailPage(const QString &pkgName); QString getDownloadDirPath() const; QString getPkgBuildDirPath() const; diff --git a/appmanagerwidget.cpp b/appmanagerwidget.cpp index be88498d66a41ecfdf6901918125e61e3b5c46d4..68c326e16f78484d633304ee9e5ded386770e15a 100644 --- a/appmanagerwidget.cpp +++ b/appmanagerwidget.cpp @@ -222,7 +222,7 @@ AppManagerWidget::AppManagerWidget(QWidget *parent) firstLineBottomLayout->addWidget(uninstallBtn); firstLineBottomLayout->addSpacing(10); - QPushButton *gotoAppStoreBtn = new QPushButton("在应用商店中查看", this); + QPushButton *gotoAppStoreBtn = new QPushButton("在深度应用商店中查看", this); gotoAppStoreBtn->setMaximumWidth(170); firstLineBottomLayout->addWidget(gotoAppStoreBtn); @@ -237,6 +237,12 @@ AppManagerWidget::AppManagerWidget(QWidget *parent) firstLineBottomLayout->addWidget(getPkgFromLocalBtn); firstLineBottomLayout->addSpacing(10); + firstLineBottomLayout->addSpacing(10); + QPushButton *gotoSpkAppStoreBtn = new QPushButton("在星火应用商店中查看", this); + gotoSpkAppStoreBtn->setMaximumWidth(170); + firstLineBottomLayout->addWidget(gotoSpkAppStoreBtn); + firstLineBottomLayout->addSpacing(10); + // 左置顶 firstLineBottomLayout->addStretch(1); @@ -302,10 +308,14 @@ AppManagerWidget::AppManagerWidget(QWidget *parent) this->m_model->notifyThreadUninstallPkg(m_showingAppInfo.pkgName); }); - // 跳转到商店 + // 跳转到深度商店 connect(gotoAppStoreBtn, &QPushButton::clicked, this, [this](bool) { this->m_model->openStoreAppDetailPage(m_showingAppInfo.pkgName); }); + //跳转到星火商店 + connect(gotoSpkAppStoreBtn, &QPushButton::clicked, this, [this](bool) { + this->m_model->openSpkStoreAppDetailPage(m_showingAppInfo.pkgName); + }); // 在线获取安装包 connect(getPkgFromSrvBtn, &QPushButton::clicked, this, [this](bool) { @@ -358,8 +368,8 @@ AppManagerWidget::AppManagerWidget(QWidget *parent) // model信号连接 connect(m_model, &AppManagerModel::loadAppInfosFinished, this, [this] { m_appInfoList = m_model->getAppInfosList(); - // 显示所有应用 - Q_EMIT m_filterMenu->triggered(m_showAllAppAction); + // 默认显示界面应用 + Q_EMIT m_filterMenu->triggered(m_showGuiAppAction); this->setLoading(false); }); diff --git a/ccc-app-manager.pro.user b/ccc-app-manager.pro.user new file mode 100644 index 0000000000000000000000000000000000000000..5e313c2b3d8e26cc541ddd50afc00a131f8226de --- /dev/null +++ b/ccc-app-manager.pro.user @@ -0,0 +1,267 @@ + + + + + + EnvironmentId + {e449a305-5aa8-4e93-ba50-fb0fb2456d52} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + false + true + false + 0 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + + + ProjectExplorer.Project.Target.0 + + Desktop + 桌面 + 桌面 + {1faf3a27-8017-40cf-a22f-a590b11a0980} + 0 + 0 + 0 + + 0 + /home/shenmo/Desktop/build-ccc-app-manager-unknown-Debug + /home/shenmo/Desktop/build-ccc-app-manager-unknown-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + /home/shenmo/Desktop/build-ccc-app-manager-unknown-Release + /home/shenmo/Desktop/build-ccc-app-manager-unknown-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + /home/shenmo/Desktop/build-ccc-app-manager-unknown-Profile + /home/shenmo/Desktop/build-ccc-app-manager-unknown-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + dwarf + + cpu-cycles + + + 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + + -F + true + 4096 + false + false + 1000 + + true + true + + 2 + + ProjectExplorer.CustomExecutableRunConfiguration + + false + true + false + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/com.github.ccc-app-manager.desktop b/com.github.ccc-app-manager.desktop index 4ee18945e215358bb3373fb73bbba5e31630914c..7e7d851063b82aed1769467e69d6099ba805f379 100644 --- a/com.github.ccc-app-manager.desktop +++ b/com.github.ccc-app-manager.desktop @@ -4,7 +4,7 @@ Name[zh_CN]=应用管理器 Categories=Utility; Comment=app manager,app,system Encoding=UTF-8 -Exec=/opt/apps/com.github.ccc-app-manager/files/ccc-app-manager +Exec=/opt/apps/com.github.ccc-app-manager/files/ccc-app-manager -platformtheme deepin Icon=/opt/apps/com.github.ccc-app-manager/files/ccc-app-manager.svg Name=com.github.ccc-app-manager.desktop StartupNotify=true diff --git a/debian/control b/debian/control index cd355a96f644c24784c3769c80fe4460f978b050..9a2f348e3cbe1d1dec0b384230039c3c87141dcc 100644 --- a/debian/control +++ b/debian/control @@ -4,7 +4,7 @@ Section: unknown Installed-Size: 3985 Maintainer: cloud8352 <243768648@qq.com> Architecture: amd64 -Version: 0.0.1 +Version: 0.0.2 Depends: libc6 (>= 2.28), libgcc1 (>= 1:3.4), libgl1, libqt5core5a (>= 5.11.0~rc1), libqt5gui5 (>= 5.8.0), libqt5multimedia5 (>= 5.6.0~beta), libqt5network5 (>= 5.0.2), libqt5widgets5 (>= 5.0.2) Build-Depends: debhelper (>= 11), libdtkwidget-dev, diff --git a/main.cpp b/main.cpp index b2ee741ed3d547687c0746d52738e5eb7b9dfd0d..4551867c8a680df9c303bb9dfffa4a7cc4d18f95 100644 --- a/main.cpp +++ b/main.cpp @@ -13,14 +13,14 @@ int main(int argc, char *argv[]) a.setAttribute(Qt::AA_UseHighDpiPixmaps); a.setOrganizationName("ccc"); a.setApplicationName("ccc-app-manager"); - a.setApplicationVersion(DApplication::buildVersion("0.0.1")); + a.setApplicationVersion(DApplication::buildVersion("0.0.2")); //change version here a.loadTranslator(); a.setApplicationDisplayName(QObject::tr("App Manager")); a.setStyle("chameleon"); a.setWindowIcon(QIcon::fromTheme("chromium-app-list")); a.setProductIcon(QIcon::fromTheme("chromium-app-list")); - a.setApplicationDescription("app manager"); - a.setQuitOnLastWindowClosed(false); + a.setApplicationDescription("ccc-app-manager是一款方便的第三方应用管理工具\n支持应用的安装,卸载,安装包提取等功能"); + a.setQuitOnLastWindowClosed(true);//关闭主窗口后关闭关于 MainWindow w; w.show(); diff --git a/mainwindow.cpp b/mainwindow.cpp index 81a72fde33292b6db32841eac1794f45565ef077..ca9b2817a46bb8833a79f727423c53e7ce27e76f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -10,7 +10,8 @@ MainWindow::MainWindow(QWidget *parent) : DMainWindow(parent) - , m_centralWidgetBlurBg(nullptr) +// , m_centralWidgetBlurBg(nullptr) +// 在非dde下无法正常blur导致标题栏难以看清 { setMinimumSize(1000, 600); // 设置背景 @@ -21,13 +22,15 @@ MainWindow::MainWindow(QWidget *parent) titlebar()->setIcon(QIcon::fromTheme("chromium-app-list")); titlebar()->setTitle("应用管理器"); titlebar()->setFixedHeight(40); - titlebar()->setBackgroundTransparent(true); + titlebar()->setBackgroundTransparent(false);//透明就彻底啥也看不见了 - m_centralWidgetBlurBg = new DBlurEffectWidget(this); - m_centralWidgetBlurBg->setBlendMode(DBlurEffectWidget::BlendMode::BehindWindowBlend); - m_centralWidgetBlurBg->setMaskAlpha(30); - m_centralWidgetBlurBg->setFixedSize(size()); - m_centralWidgetBlurBg->lower(); +// m_centralWidgetBlurBg = new DBlurEffectWidget(this); +// m_centralWidgetBlurBg->setBlendMode(DBlurEffectWidget::BlendMode::BehindWindowBlend); +// m_centralWidgetBlurBg->setMaskAlpha(30); +// m_centralWidgetBlurBg->setFixedSize(size()); +// m_centralWidgetBlurBg->lower(); + +// 透明+blur确实很好看,但是在非dde上是一场灾难。。。 DFrame *centralWidget = new DFrame(this); centralWidget->setContentsMargins(3, 0, 3, 3); @@ -49,7 +52,7 @@ void MainWindow::resizeEvent(QResizeEvent *event) { DMainWindow::resizeEvent(event); - m_centralWidgetBlurBg->setFixedSize(size()); +// m_centralWidgetBlurBg->setFixedSize(size()); } void MainWindow::closeEvent(QCloseEvent *event)