add startupmanager plugin
|
@ -1,4 +1,5 @@
|
|||
TEMPLATE = subdirs
|
||||
SUBDIRS = \
|
||||
shredmanager \
|
||||
systemmonitor
|
||||
systemmonitor \
|
||||
startupmanager
|
||||
|
|
|
@ -29,8 +29,8 @@ CpuBallWidget::CpuBallWidget(QWidget *parent) : QWidget(parent)
|
|||
{
|
||||
this->setFixedSize(100, 100);
|
||||
|
||||
m_frontImagePath = ":/res/wave-front.png";
|
||||
m_backimagePath = ":/res/wave-back.png";
|
||||
m_frontImagePath = "://res/wave-front.png";
|
||||
m_backimagePath = "://res/wave-back.png";
|
||||
|
||||
m_xFrontOffset = 0;
|
||||
m_xBackOffset = this->width();
|
||||
|
|
|
@ -256,7 +256,7 @@ void NetworkFlow::paintEvent(QPaintEvent *)
|
|||
|
||||
//download
|
||||
painter.setOpacity(1);
|
||||
QSvgRenderer uploadRender(QString(":/res/download.svg"));
|
||||
QSvgRenderer uploadRender(QString("://res/download.svg"));
|
||||
QImage uploadimage(20, 20, QImage::Format_ARGB32);
|
||||
uploadimage.fill(QColor("#1E90FF"));
|
||||
QPainter uploadPainter(&uploadimage);
|
||||
|
@ -273,7 +273,7 @@ void NetworkFlow::paintEvent(QPaintEvent *)
|
|||
painter.drawText(QRect(rect().x() + 20 + rateW + 14, rect().y() + 40, fm.width(downloadContent), rect().height()), Qt::AlignLeft | Qt::AlignTop, downloadContent);
|
||||
|
||||
//upload
|
||||
QSvgRenderer downloadRender(QString(":/res/upload.svg"));
|
||||
QSvgRenderer downloadRender(QString("://res/upload.svg"));
|
||||
QImage downloadimage(20, 20, QImage::Format_ARGB32);
|
||||
downloadimage.fill(QColor("#FF0000"));
|
||||
QPainter downloadPainter(&downloadimage);
|
||||
|
|
Before Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 3.1 KiB |
|
@ -94,4 +94,4 @@ OTHER_FILES += \
|
|||
systemmonitor.json
|
||||
|
||||
RESOURCES += \
|
||||
res.qrc
|
||||
../../src/img.qrc
|
||||
|
|
|
@ -152,22 +152,22 @@ void BoxWidget::initPluginWidget()
|
|||
//set icon
|
||||
pluginModel.setData(qindex,QIcon(QPixmap("://res/ubuntukylin-software-center.png")),Qt::DecorationRole);
|
||||
|
||||
QStringList icon_list;
|
||||
//icon_list<<"://res/boot"<<"://res/camera";
|
||||
icon_list<<"://res/boot";
|
||||
QStringList text_list;
|
||||
//text_list << tr("Boot Manager") << tr("Camera");
|
||||
text_list << tr("Boot Manager");
|
||||
for (int index = 0;index < 1;++index)
|
||||
{
|
||||
pluginModel.insertRows(index + 1,1,QModelIndex());
|
||||
qindex = pluginModel.index(index + 1,0,QModelIndex());
|
||||
pluginModel.setData(qindex, text_list.at(index));
|
||||
//set icon
|
||||
pluginModel.setData(qindex,QIcon(QPixmap(icon_list.at(index))),Qt::DecorationRole);
|
||||
//set tooltip
|
||||
pluginModel.setData(qindex, text_list.at(index),Qt::WhatsThisRole);
|
||||
}
|
||||
// QStringList icon_list;
|
||||
// //icon_list<<"://res/boot"<<"://res/camera";
|
||||
// icon_list<<"://res/boot";
|
||||
// QStringList text_list;
|
||||
// //text_list << tr("Boot Manager") << tr("Camera");
|
||||
// text_list << tr("Boot Manager");
|
||||
// for (int index = 0;index < 1;++index)
|
||||
// {
|
||||
// pluginModel.insertRows(index + 1,1,QModelIndex());
|
||||
// qindex = pluginModel.index(index + 1,0,QModelIndex());
|
||||
// pluginModel.setData(qindex, text_list.at(index));
|
||||
// //set icon
|
||||
// pluginModel.setData(qindex,QIcon(QPixmap(icon_list.at(index))),Qt::DecorationRole);
|
||||
// //set tooltip
|
||||
// pluginModel.setData(qindex, text_list.at(index),Qt::WhatsThisRole);
|
||||
// }
|
||||
|
||||
int count = PluginManager::Instance()->count();
|
||||
for (int i = 0;i < count;++i)
|
||||
|
@ -178,8 +178,8 @@ void BoxWidget::initPluginWidget()
|
|||
pluginModel.setGuid(ICommon->getGuid());
|
||||
// pluginModel.insertRows(i + 1,1,QModelIndex());
|
||||
// qindex = pluginModel.index(i + 1,0,QModelIndex());
|
||||
pluginModel.insertRows(i + 2,1,QModelIndex());
|
||||
qindex = pluginModel.index(i + 2,0,QModelIndex());
|
||||
pluginModel.insertRows(i + 1,1,QModelIndex());
|
||||
qindex = pluginModel.index(i + 1,0,QModelIndex());
|
||||
pluginModel.setData(qindex,ICommon->getName());
|
||||
pluginModel.setData(qindex,QIcon(QPixmap(pacture_path)),Qt::DecorationRole);
|
||||
pluginModel.setData(qindex,ICommon->getName(),Qt::WhatsThisRole);
|
||||
|
@ -188,26 +188,24 @@ void BoxWidget::initPluginWidget()
|
|||
|
||||
void BoxWidget::OnClickListView(const QModelIndex & index)
|
||||
{
|
||||
if(index.row() == 0)
|
||||
{
|
||||
if(index.row() == 0) {
|
||||
if(this->osarch == "aarch64" || this->osname == "Kylin" || this->osname == "YHKylin")
|
||||
sessionProxy->runApp("kylin-software-center");
|
||||
else
|
||||
sessionProxy->runApp("ubuntu-kylin-software-center");
|
||||
}
|
||||
else if(index.row() == 1) {
|
||||
emit this->sendSubIndex(0);
|
||||
}
|
||||
else if(index.row() == -1) {
|
||||
if(this->osarch == "aarch64" || this->osname == "Kylin" || this->osname == "YHKylin")
|
||||
sessionProxy->runApp("cheese");
|
||||
else
|
||||
emit this->sendSubIndex(1);
|
||||
}
|
||||
else
|
||||
{
|
||||
// else if(index.row() == 1) {
|
||||
// emit this->sendSubIndex(0);
|
||||
// }
|
||||
// else if(index.row() == -1) {
|
||||
// if(this->osarch == "aarch64" || this->osname == "Kylin" || this->osname == "YHKylin")
|
||||
// sessionProxy->runApp("cheese");
|
||||
// else
|
||||
// emit this->sendSubIndex(1);
|
||||
// }
|
||||
else {
|
||||
// QString guid = pluginModel.getGuid(index.row() - 1);
|
||||
QString guid = pluginModel.getGuid(index.row() - 2);
|
||||
QString guid = pluginModel.getGuid(index.row() - 1);
|
||||
PluginInterface* interface = PluginManager::Instance()->getInterfaceByGuid<PluginInterface>(guid);
|
||||
interface->doAction();
|
||||
}
|
||||
|
|
|
@ -218,6 +218,10 @@
|
|||
<file>res/search.png</file>
|
||||
<file>res/ok.png</file>
|
||||
<file>res/menu_selected.png</file>
|
||||
<file>res/download.svg</file>
|
||||
<file>res/upload.svg</file>
|
||||
<file>res/wave-back.png</file>
|
||||
<file>res/wave-front.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/sys">
|
||||
<file>res/sysBtn/close_button.png</file>
|
||||
|
@ -570,5 +574,6 @@
|
|||
<qresource prefix="/model">
|
||||
<file>res/plugin/processmanager.png</file>
|
||||
<file>res/plugin/shredder.png</file>
|
||||
<file>res/plugin/startupmanager.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
|
@ -1104,7 +1104,7 @@ void MainWindow::initOtherPages()
|
|||
if(box_widget == NULL)
|
||||
box_widget = new BoxWidget(this, this->arch, this->osName, getPluginsDirectory());
|
||||
// box_widget->setSessionDbusProxy(sessioninterface);
|
||||
connect(box_widget, SIGNAL(sendSubIndex(int)), this, SLOT(displaySubPage(int)));
|
||||
// connect(box_widget, SIGNAL(sendSubIndex(int)), this, SLOT(displaySubPage(int)));
|
||||
bottomStack->addWidget(box_widget);
|
||||
}
|
||||
|
||||
|
|
Before Width: | Height: | Size: 8.1 KiB After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 2.0 KiB |
|
@ -93,7 +93,6 @@ SOURCES += main.cpp\
|
|||
# ../setting/deadpixelwidget.cpp \
|
||||
../setting/energywidget.cpp \
|
||||
../setting/filemanagerwidget.cpp \
|
||||
../component/scrollwidget.cpp \
|
||||
../component/agentlistitem.cpp \
|
||||
../component/quibo.cpp \
|
||||
../component/kylinfontdialog.cpp \
|
||||
|
@ -181,7 +180,6 @@ HEADERS += mainwindow.h \
|
|||
# ../setting/deadpixelwidget.h \
|
||||
../setting/energywidget.h \
|
||||
../setting/filemanagerwidget.h \
|
||||
../component/scrollwidget.h \
|
||||
../component/agentlistitem.h \
|
||||
../component/quibo.h \
|
||||
../component/kylinfontdialog.h \
|
||||
|
|