forked from openkylin/quarkai
Adjust structure of the plugin
This commit is contained in:
parent
5f2b46a90d
commit
ad1896858b
|
@ -1,5 +1,5 @@
|
||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
shredmanager \
|
shredmanager \
|
||||||
systemmonitor \
|
systemmonitor
|
||||||
startupmanager
|
# startupmanager
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "diskitem.h"
|
#include "diskitem.h"
|
||||||
#include "myimagebutton.h"
|
#include "../widgets/myimagebutton.h"
|
||||||
|
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QMouseEvent>
|
#include <QMouseEvent>
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "titlewidget.h"
|
#include "monitortitlewidget.h"
|
||||||
#include "myimagebutton.h"
|
#include "../widgets/myimagebutton.h"
|
||||||
#include "mytipimagebutton.h"
|
#include "../widgets/mytipimagebutton.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
#include <QResizeEvent>
|
#include <QResizeEvent>
|
||||||
#include <QStyleFactory>
|
#include <QStyleFactory>
|
||||||
|
|
||||||
TitleWidget::TitleWidget(QWidget *parent)
|
MonitorTitleWidget::MonitorTitleWidget(QWidget *parent)
|
||||||
:QFrame(parent)
|
:QFrame(parent)
|
||||||
{
|
{
|
||||||
installEventFilter(this);
|
installEventFilter(this);
|
||||||
|
@ -45,7 +45,7 @@ TitleWidget::TitleWidget(QWidget *parent)
|
||||||
initWidgets();
|
initWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
TitleWidget::~TitleWidget()
|
MonitorTitleWidget::~MonitorTitleWidget()
|
||||||
{
|
{
|
||||||
//Segmentation fault
|
//Segmentation fault
|
||||||
QLayoutItem *child;
|
QLayoutItem *child;
|
||||||
|
@ -63,7 +63,7 @@ TitleWidget::~TitleWidget()
|
||||||
delete m_layout;
|
delete m_layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TitleWidget::mouseDoubleClickEvent(QMouseEvent *e)
|
void MonitorTitleWidget::mouseDoubleClickEvent(QMouseEvent *e)
|
||||||
{
|
{
|
||||||
if (e->button() == Qt::LeftButton) {
|
if (e->button() == Qt::LeftButton) {
|
||||||
if (window()->isMaximized())
|
if (window()->isMaximized())
|
||||||
|
@ -75,7 +75,7 @@ void TitleWidget::mouseDoubleClickEvent(QMouseEvent *e)
|
||||||
QFrame::mouseDoubleClickEvent(e);
|
QFrame::mouseDoubleClickEvent(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TitleWidget::paintEvent(QPaintEvent *e)
|
void MonitorTitleWidget::paintEvent(QPaintEvent *e)
|
||||||
{
|
{
|
||||||
|
|
||||||
QFrame::paintEvent(e);
|
QFrame::paintEvent(e);
|
||||||
|
@ -92,7 +92,7 @@ void TitleWidget::paintEvent(QPaintEvent *e)
|
||||||
p.drawPath(tPath);
|
p.drawPath(tPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TitleWidget::initLeftContent()
|
void MonitorTitleWidget::initLeftContent()
|
||||||
{
|
{
|
||||||
QWidget *w = new QWidget;
|
QWidget *w = new QWidget;
|
||||||
m_lLayout = new QHBoxLayout(w);
|
m_lLayout = new QHBoxLayout(w);
|
||||||
|
@ -100,7 +100,7 @@ void TitleWidget::initLeftContent()
|
||||||
m_lLayout->setSpacing(0);
|
m_lLayout->setSpacing(0);
|
||||||
|
|
||||||
QLabel *label = new QLabel;
|
QLabel *label = new QLabel;
|
||||||
label->setStyleSheet("QLabel{border-image: url(:/../../src/res/kylin-assistant.png);}");
|
label->setStyleSheet("QLabel{border-image: url(://res/kylin-assistant.png);}");
|
||||||
label->setFixedSize(24, 24);
|
label->setFixedSize(24, 24);
|
||||||
m_lLayout->addWidget(label);
|
m_lLayout->addWidget(label);
|
||||||
|
|
||||||
|
@ -113,7 +113,7 @@ void TitleWidget::initLeftContent()
|
||||||
m_layout->addWidget(w, 1, Qt::AlignLeft);
|
m_layout->addWidget(w, 1, Qt::AlignLeft);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TitleWidget::initRightContent()
|
void MonitorTitleWidget::initRightContent()
|
||||||
{
|
{
|
||||||
QWidget *w = new QWidget;
|
QWidget *w = new QWidget;
|
||||||
m_rLayout = new QHBoxLayout(w);
|
m_rLayout = new QHBoxLayout(w);
|
||||||
|
@ -141,7 +141,7 @@ void TitleWidget::initRightContent()
|
||||||
maxBtn->setObjectName("UnMaxButton");
|
maxBtn->setObjectName("UnMaxButton");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
connect(this, &TitleWidget::updateMaxBtn, this, [=]{
|
connect(this, &MonitorTitleWidget::updateMaxBtn, this, [=]{
|
||||||
if (window()->isMaximized()) {
|
if (window()->isMaximized()) {
|
||||||
maxBtn->setObjectName("UnMaxButton");
|
maxBtn->setObjectName("UnMaxButton");
|
||||||
} else {
|
} else {
|
||||||
|
@ -159,7 +159,7 @@ void TitleWidget::initRightContent()
|
||||||
m_rLayout->addWidget(closeBtn);
|
m_rLayout->addWidget(closeBtn);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TitleWidget::initWidgets()
|
void MonitorTitleWidget::initWidgets()
|
||||||
{
|
{
|
||||||
m_layout = new QHBoxLayout(this);
|
m_layout = new QHBoxLayout(this);
|
||||||
m_layout->setContentsMargins(0, 0, 0, 0);
|
m_layout->setContentsMargins(0, 0, 0, 0);
|
|
@ -25,12 +25,12 @@
|
||||||
|
|
||||||
class QHBoxLayout;
|
class QHBoxLayout;
|
||||||
|
|
||||||
class TitleWidget : public QFrame
|
class MonitorTitleWidget : public QFrame
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
TitleWidget(QWidget *parent);
|
MonitorTitleWidget(QWidget *parent);
|
||||||
~TitleWidget();
|
~MonitorTitleWidget();
|
||||||
void initLeftContent();
|
void initLeftContent();
|
||||||
void initRightContent();
|
void initRightContent();
|
||||||
void initWidgets();
|
void initWidgets();
|
|
@ -18,7 +18,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "processcategory.h"
|
#include "processcategory.h"
|
||||||
#include "myimagebutton.h"
|
#include "../widgets/myimagebutton.h"
|
||||||
|
|
||||||
ProcessCategory::ProcessCategory(int tabIndex, QWidget *parent)
|
ProcessCategory::ProcessCategory(int tabIndex, QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
|
|
||||||
#include "processworker.h"
|
#include "processworker.h"
|
||||||
#include "../../component/utils.h"
|
#include "../../component/utils.h"
|
||||||
#include "mydialog.h"
|
#include "../widgets/mydialog.h"
|
||||||
#include "processlistitem.h"
|
#include "processlistitem.h"
|
||||||
#include "myactiongroup.h"
|
#include "../widgets/myactiongroup.h"
|
||||||
#include "myactiongroupitem.h"
|
#include "../widgets/myactiongroupitem.h"
|
||||||
#include "myaction.h"
|
#include "../widgets/myaction.h"
|
||||||
#include "processlistwidget.h"
|
#include "processlistwidget.h"
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
#include "propertiesdialog.h"
|
#include "propertiesdialog.h"
|
||||||
#include "processworker.h"
|
#include "processworker.h"
|
||||||
#include "myimagebutton.h"
|
#include "../widgets/myimagebutton.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
@ -91,11 +91,11 @@ PropertiesDialog::PropertiesDialog(QWidget *parent, pid_t processId) : QDialog(p
|
||||||
nameTitleLabel->setFixedWidth(100);
|
nameTitleLabel->setFixedWidth(100);
|
||||||
nameTitleLabel->setAlignment(Qt::AlignRight);
|
nameTitleLabel->setAlignment(Qt::AlignRight);
|
||||||
|
|
||||||
nameLabel = new QLabel();
|
m_appNameLabel = new QLabel();
|
||||||
nameLabel->setStyleSheet("QLabel { background-color : transparent; color : #000000; }");
|
m_appNameLabel->setStyleSheet("QLabel { background-color : transparent; color : #000000; }");
|
||||||
|
|
||||||
nameLayout->addWidget(nameTitleLabel);
|
nameLayout->addWidget(nameTitleLabel);
|
||||||
nameLayout->addWidget(nameLabel);
|
nameLayout->addWidget(m_appNameLabel);
|
||||||
nameLayout->addSpacing(20);
|
nameLayout->addSpacing(20);
|
||||||
|
|
||||||
cmdlineTitleLabel = new QLabel(QString("%1:").arg(tr("Command line")));
|
cmdlineTitleLabel = new QLabel(QString("%1:").arg(tr("Command line")));
|
||||||
|
@ -178,7 +178,7 @@ PropertiesDialog::~PropertiesDialog()
|
||||||
delete userTitleLabel;
|
delete userTitleLabel;
|
||||||
delete userLabel;
|
delete userLabel;
|
||||||
delete nameTitleLabel;
|
delete nameTitleLabel;
|
||||||
delete nameLabel;
|
delete m_appNameLabel;
|
||||||
delete titleLabel;
|
delete titleLabel;
|
||||||
delete cmdlineTitleLabel;
|
delete cmdlineTitleLabel;
|
||||||
delete cpuDurationLabel;
|
delete cpuDurationLabel;
|
||||||
|
@ -227,7 +227,7 @@ void PropertiesDialog::initProcproperties()
|
||||||
iconLabel->setPixmap(icon_pixmap);
|
iconLabel->setPixmap(icon_pixmap);
|
||||||
titleLabel->setText(displayName);
|
titleLabel->setText(displayName);
|
||||||
userLabel->setText(username);
|
userLabel->setText(username);
|
||||||
nameLabel->setText(QString(info->name));
|
m_appNameLabel->setText(QString(info->name));
|
||||||
cmdlineLabel->setText(QString(info->arguments));
|
cmdlineLabel->setText(QString(info->arguments));
|
||||||
startTimeLabel->setText(QFileInfo(QString("/proc/%1").arg(pid)).created().toString("yyyy-MM-dd hh:mm:ss"));
|
startTimeLabel->setText(QFileInfo(QString("/proc/%1").arg(pid)).created().toString("yyyy-MM-dd hh:mm:ss"));
|
||||||
cpuDurationLabel->setText(formatDurationForDisplay(100 * info->cpu_time / info->frequency));
|
cpuDurationLabel->setText(formatDurationForDisplay(100 * info->cpu_time / info->frequency));
|
||||||
|
|
|
@ -69,7 +69,7 @@ private:
|
||||||
QLabel *userLabel;
|
QLabel *userLabel;
|
||||||
QLabel *userTitleLabel;
|
QLabel *userTitleLabel;
|
||||||
QLabel *iconLabel;
|
QLabel *iconLabel;
|
||||||
QLabel *nameLabel;
|
QLabel *m_appNameLabel;
|
||||||
QLabel *nameTitleLabel;
|
QLabel *nameTitleLabel;
|
||||||
QLabel *cpuDurationLabel;
|
QLabel *cpuDurationLabel;
|
||||||
QLabel *cpuDurationTitleLabel;
|
QLabel *cpuDurationTitleLabel;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -205,7 +205,7 @@ void SystemMonitor::initPanelStack()
|
||||||
|
|
||||||
void SystemMonitor::initTitleWidget()
|
void SystemMonitor::initTitleWidget()
|
||||||
{
|
{
|
||||||
m_titleWidget = new TitleWidget(this);
|
m_titleWidget = new MonitorTitleWidget(this);
|
||||||
m_titleWidget->resize(width(), TOP_TITLE_WIDGET_HEIGHT);
|
m_titleWidget->resize(width(), TOP_TITLE_WIDGET_HEIGHT);
|
||||||
m_titleWidget->move(0, 0);
|
m_titleWidget->move(0, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#ifndef SYSTEMMONITOR_H
|
#ifndef SYSTEMMONITOR_H
|
||||||
#define SYSTEMMONITOR_H
|
#define SYSTEMMONITOR_H
|
||||||
|
|
||||||
#include "titlewidget.h"
|
#include "monitortitlewidget.h"
|
||||||
#include "toolbar.h"
|
#include "toolbar.h"
|
||||||
#include "processdialog.h"
|
#include "processdialog.h"
|
||||||
#include "resourcesdialog.h"
|
#include "resourcesdialog.h"
|
||||||
|
@ -31,8 +31,6 @@
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
|
||||||
enum PDragState {NOT_PDRAGGING, START_PDRAGGING, PDRAGGING};
|
|
||||||
|
|
||||||
class SystemMonitor : public QFrame
|
class SystemMonitor : public QFrame
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -50,7 +48,6 @@ public:
|
||||||
bool getSortOrder();
|
bool getSortOrder();
|
||||||
int getSortIndex();
|
int getSortIndex();
|
||||||
void moveCenter();
|
void moveCenter();
|
||||||
// void moveDialog(QPoint diff);
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void recordVisibleColumn(int, bool, QList<bool> columnVisible);
|
void recordVisibleColumn(int, bool, QList<bool> columnVisible);
|
||||||
|
@ -59,7 +56,6 @@ public slots:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *e) override;
|
void resizeEvent(QResizeEvent *e) override;
|
||||||
// bool eventFilter(QObject *, QEvent *);
|
|
||||||
void paintEvent(QPaintEvent *);
|
void paintEvent(QPaintEvent *);
|
||||||
void closeEvent(QCloseEvent *event);
|
void closeEvent(QCloseEvent *event);
|
||||||
void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
|
void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
|
||||||
|
@ -68,13 +64,11 @@ protected:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QStackedWidget *m_sysMonitorStack = nullptr;
|
QStackedWidget *m_sysMonitorStack = nullptr;
|
||||||
TitleWidget *m_titleWidget = nullptr;
|
MonitorTitleWidget *m_titleWidget = nullptr;
|
||||||
ToolBar *m_toolBar = nullptr;
|
ToolBar *m_toolBar = nullptr;
|
||||||
ProcessDialog *process_dialog = nullptr;
|
ProcessDialog *process_dialog = nullptr;
|
||||||
ResouresDialog *resources_dialog = nullptr;
|
ResouresDialog *resources_dialog = nullptr;
|
||||||
FileSystemDialog *filesystem_dialog = nullptr;
|
FileSystemDialog *filesystem_dialog = nullptr;
|
||||||
// PDragState drag_state;
|
|
||||||
// QPoint start_drag;
|
|
||||||
QSettings *proSettings;
|
QSettings *proSettings;
|
||||||
|
|
||||||
QPoint dragPosition;
|
QPoint dragPosition;
|
||||||
|
|
|
@ -35,17 +35,17 @@ HEADERS += \
|
||||||
processworker.h \
|
processworker.h \
|
||||||
util.h \
|
util.h \
|
||||||
../../component/utils.h \
|
../../component/utils.h \
|
||||||
mydialog.h \
|
../widgets/mydialog.h \
|
||||||
myimagebutton.h \
|
../widgets/myimagebutton.h \
|
||||||
propertiesdialog.h \
|
propertiesdialog.h \
|
||||||
processcategory.h \
|
processcategory.h \
|
||||||
processdata.h \
|
processdata.h \
|
||||||
myactiongroup.h \
|
../widgets/myactiongroup.h \
|
||||||
myactiongroupitem.h \
|
../widgets/myactiongroupitem.h \
|
||||||
myaction.h \
|
../widgets/myaction.h \
|
||||||
titlewidget.h \
|
monitortitlewidget.h \
|
||||||
toolbar.h \
|
toolbar.h \
|
||||||
mytipimagebutton.h \
|
../widgets/mytipimagebutton.h \
|
||||||
resourcesdialog.h \
|
resourcesdialog.h \
|
||||||
filesystemdialog.h \
|
filesystemdialog.h \
|
||||||
diskitemlist.h \
|
diskitemlist.h \
|
||||||
|
@ -53,7 +53,7 @@ HEADERS += \
|
||||||
filesystemworker.h \
|
filesystemworker.h \
|
||||||
diskmodel.h \
|
diskmodel.h \
|
||||||
diskinfo.h \
|
diskinfo.h \
|
||||||
mysearchedit.h \
|
../widgets/mysearchedit.h \
|
||||||
networkflow.h \
|
networkflow.h \
|
||||||
cpuoccupancyrate.h \
|
cpuoccupancyrate.h \
|
||||||
cpuballwidget.h \
|
cpuballwidget.h \
|
||||||
|
@ -67,16 +67,16 @@ SOURCES += \
|
||||||
processlistitem.cpp \
|
processlistitem.cpp \
|
||||||
processworker.cpp \
|
processworker.cpp \
|
||||||
util.cpp \
|
util.cpp \
|
||||||
mydialog.cpp \
|
../widgets/mydialog.cpp \
|
||||||
myimagebutton.cpp \
|
../widgets/myimagebutton.cpp \
|
||||||
propertiesdialog.cpp \
|
propertiesdialog.cpp \
|
||||||
processcategory.cpp \
|
processcategory.cpp \
|
||||||
myactiongroup.cpp \
|
../widgets/myactiongroup.cpp \
|
||||||
myactiongroupitem.cpp \
|
../widgets/myactiongroupitem.cpp \
|
||||||
myaction.cpp \
|
../widgets/myaction.cpp \
|
||||||
titlewidget.cpp \
|
monitortitlewidget.cpp \
|
||||||
toolbar.cpp \
|
toolbar.cpp \
|
||||||
mytipimagebutton.cpp \
|
../widgets/mytipimagebutton.cpp \
|
||||||
resourcesdialog.cpp \
|
resourcesdialog.cpp \
|
||||||
filesystemdialog.cpp \
|
filesystemdialog.cpp \
|
||||||
diskitemlist.cpp \
|
diskitemlist.cpp \
|
||||||
|
@ -84,7 +84,7 @@ SOURCES += \
|
||||||
filesystemworker.cpp \
|
filesystemworker.cpp \
|
||||||
diskmodel.cpp \
|
diskmodel.cpp \
|
||||||
diskinfo.cpp \
|
diskinfo.cpp \
|
||||||
mysearchedit.cpp \
|
../widgets/mysearchedit.cpp \
|
||||||
networkflow.cpp \
|
networkflow.cpp \
|
||||||
cpuoccupancyrate.cpp \
|
cpuoccupancyrate.cpp \
|
||||||
cpuballwidget.cpp \
|
cpuballwidget.cpp \
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "toolbar.h"
|
#include "toolbar.h"
|
||||||
#include "myimagebutton.h"
|
#include "../widgets/myimagebutton.h"
|
||||||
#include "mytipimagebutton.h"
|
#include "../widgets/mytipimagebutton.h"
|
||||||
#include "processcategory.h"
|
#include "processcategory.h"
|
||||||
#include "mysearchedit.h"
|
#include "../widgets/mysearchedit.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
|
|
@ -59,8 +59,8 @@ AboutDialog::AboutDialog(QWidget *parent, /*const QString &version, */QString sk
|
||||||
iconLabel = new QLabel(baseWidget);
|
iconLabel = new QLabel(baseWidget);
|
||||||
//iconLabel->setGeometry(QRect(380, 20, 44, 44));
|
//iconLabel->setGeometry(QRect(380, 20, 44, 44));
|
||||||
iconLabel->setGeometry(QRect(360, 36, 44, 44));//20161228
|
iconLabel->setGeometry(QRect(360, 36, 44, 44));//20161228
|
||||||
nameLabel = new QLabel(baseWidget);
|
m_appNameLabel = new QLabel(baseWidget);
|
||||||
nameLabel->setGeometry(QRect(71, 0, 300, 30));
|
m_appNameLabel->setGeometry(QRect(71, 0, 300, 30));
|
||||||
// linkLabel = new QLabel();
|
// linkLabel = new QLabel();
|
||||||
// iconLabel->setStyleSheet("QLabel{background-image:url(':/res/kylin-assistant.png')}");
|
// iconLabel->setStyleSheet("QLabel{background-image:url(':/res/kylin-assistant.png')}");
|
||||||
|
|
||||||
|
@ -68,19 +68,19 @@ AboutDialog::AboutDialog(QWidget *parent, /*const QString &version, */QString sk
|
||||||
image = image.scaled(QSize(44, 44), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
image = image.scaled(QSize(44, 44), Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||||
iconLabel->setPixmap(QPixmap::fromImage(image));
|
iconLabel->setPixmap(QPixmap::fromImage(image));
|
||||||
|
|
||||||
nameLabel->setStyleSheet("QLabel{color:#ffffff;font-family: 方正黑体_GBK;font-size: 12px;text-align: center;font-weight:bold;}");
|
m_appNameLabel->setStyleSheet("QLabel{color:#ffffff;font-family: 方正黑体_GBK;font-size: 12px;text-align: center;font-weight:bold;}");
|
||||||
nameLabel->setAlignment(Qt::AlignCenter);
|
m_appNameLabel->setAlignment(Qt::AlignCenter);
|
||||||
// if (arch == "aarch64" || os == "Kylin" || os == "YHKylin") {//20161228
|
// if (arch == "aarch64" || os == "Kylin" || os == "YHKylin") {//20161228
|
||||||
// close_btn->move(442-36, 0);
|
// close_btn->move(442-36, 0);
|
||||||
// nameLabel->setText(tr("Kylin Assisant") + " " + VERSION);
|
// m_appNameLabel->setText(tr("Kylin Assisant") + " " + VERSION);
|
||||||
// }
|
// }
|
||||||
// else {
|
// else {
|
||||||
// close_btn->move(0, 0);
|
// close_btn->move(0, 0);
|
||||||
// nameLabel->setText(tr("Youker Assisant") + " " + VERSION);
|
// m_appNameLabel->setText(tr("Youker Assisant") + " " + VERSION);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
close_btn->move(442-36, 0);
|
close_btn->move(442-36, 0);
|
||||||
nameLabel->setText(tr("Kylin Assistant") + " " + qApp->applicationVersion());
|
m_appNameLabel->setText(tr("Kylin Assistant") + " " + qApp->applicationVersion());
|
||||||
|
|
||||||
// linkLabel->setAlignment(Qt::AlignRight);
|
// linkLabel->setAlignment(Qt::AlignRight);
|
||||||
// linkLabel->setText(QString::fromLocal8Bit("<a style='color: green;' href = https://launchpad.net/youker-assistant> home page</a>"));
|
// linkLabel->setText(QString::fromLocal8Bit("<a style='color: green;' href = https://launchpad.net/youker-assistant> home page</a>"));
|
||||||
|
|
|
@ -65,7 +65,7 @@ private:
|
||||||
QTextBrowser *aboutEdit;
|
QTextBrowser *aboutEdit;
|
||||||
QTextEdit *contributorEdit;
|
QTextEdit *contributorEdit;
|
||||||
QLabel *iconLabel;
|
QLabel *iconLabel;
|
||||||
QLabel *nameLabel;
|
QLabel *m_appNameLabel;
|
||||||
QPushButton *okBtn;
|
QPushButton *okBtn;
|
||||||
// QLabel *versionLabel;
|
// QLabel *versionLabel;
|
||||||
// QLabel *linkLabel;
|
// QLabel *linkLabel;
|
||||||
|
|
|
@ -129,13 +129,13 @@ HomePage::~HomePage()
|
||||||
delete box_tip;
|
delete box_tip;
|
||||||
box_tip = NULL;
|
box_tip = NULL;
|
||||||
}
|
}
|
||||||
for(int i=0; i<item_list.count(); i++)
|
// for(int i=0; i<item_list.count(); i++)
|
||||||
{
|
// {
|
||||||
ToolButton *btn = item_list.at(i);
|
// ToolButton *btn = item_list.at(i);
|
||||||
delete btn;
|
// delete btn;
|
||||||
btn = NULL;
|
// btn = NULL;
|
||||||
}
|
// }
|
||||||
item_list.clear();
|
// item_list.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void HomePage::initUI()
|
void HomePage::initUI()
|
||||||
|
@ -176,7 +176,7 @@ void HomePage::initUI()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
QStringList icon_list;
|
/*QStringList icon_list;
|
||||||
// icon_list<<"://res/ubuntukylin-software-center"<<"://res/boot"<<"://res/camera";
|
// icon_list<<"://res/ubuntukylin-software-center"<<"://res/boot"<<"://res/camera";
|
||||||
icon_list<<"://res/boot" << "://res/more.png";
|
icon_list<<"://res/boot" << "://res/more.png";
|
||||||
QStringList text_list;
|
QStringList text_list;
|
||||||
|
@ -194,10 +194,9 @@ void HomePage::initUI()
|
||||||
signal_mapper->setMapping(tool_button, QString::number(i, 10));
|
signal_mapper->setMapping(tool_button, QString::number(i, 10));
|
||||||
button_layout->addWidget(tool_button);
|
button_layout->addWidget(tool_button);
|
||||||
item_list.append(tool_button);
|
item_list.append(tool_button);
|
||||||
|
|
||||||
}
|
}
|
||||||
connect(signal_mapper, SIGNAL(mapped(QString)), this, SLOT(switchPageIndex(QString)));
|
connect(signal_mapper, SIGNAL(mapped(QString)), this, SLOT(switchPageIndex(QString)));
|
||||||
|
*/
|
||||||
|
|
||||||
// more_btn->setFocusPolicy(Qt::NoFocus);
|
// more_btn->setFocusPolicy(Qt::NoFocus);
|
||||||
// QPixmap pixmap("://res/more.png");
|
// QPixmap pixmap("://res/more.png");
|
||||||
|
@ -224,7 +223,7 @@ void HomePage::initUI()
|
||||||
layout5->addWidget(box_logo);
|
layout5->addWidget(box_logo);
|
||||||
layout5->addLayout(layout4);
|
layout5->addLayout(layout4);
|
||||||
layout5->addStretch();
|
layout5->addStretch();
|
||||||
layout5->addLayout(button_layout);
|
// layout5->addLayout(button_layout);
|
||||||
layout5->setMargin(0);
|
layout5->setMargin(0);
|
||||||
layout5->setSpacing(5);
|
layout5->setSpacing(5);
|
||||||
layout5->setContentsMargins(0,0,0,0);
|
layout5->setContentsMargins(0,0,0,0);
|
||||||
|
|
|
@ -82,7 +82,7 @@ private:
|
||||||
QString current_version;
|
QString current_version;
|
||||||
QString osname;
|
QString osname;
|
||||||
QString osarch;
|
QString osarch;
|
||||||
QList<ToolButton *> item_list;
|
// QList<ToolButton *> item_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // HOMEPAGE_H
|
#endif // HOMEPAGE_H
|
||||||
|
|
|
@ -139,7 +139,7 @@ MainWindow::MainWindow(QString cur_arch, int d_count, QWidget* parent, Qt::Windo
|
||||||
box_widget = NULL;
|
box_widget = NULL;
|
||||||
aboutDlg = NULL;
|
aboutDlg = NULL;
|
||||||
|
|
||||||
auto_start = NULL;
|
// auto_start = NULL;
|
||||||
upgrade_dialog = NULL;
|
upgrade_dialog = NULL;
|
||||||
// camera_manager = NULL;
|
// camera_manager = NULL;
|
||||||
|
|
||||||
|
@ -300,11 +300,11 @@ MainWindow::~MainWindow()
|
||||||
mSettings = NULL;
|
mSettings = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(auto_start != NULL)
|
// if(auto_start != NULL)
|
||||||
{
|
// {
|
||||||
delete auto_start;
|
// delete auto_start;
|
||||||
auto_start = NULL;
|
// auto_start = NULL;
|
||||||
}
|
// }
|
||||||
// if(camera_manager != NULL)
|
// if(camera_manager != NULL)
|
||||||
// {
|
// {
|
||||||
// delete camera_manager;
|
// delete camera_manager;
|
||||||
|
@ -1180,9 +1180,9 @@ void MainWindow::changeSkin(QString pciture)
|
||||||
mSettings->endGroup();
|
mSettings->endGroup();
|
||||||
mSettings->sync();
|
mSettings->sync();
|
||||||
|
|
||||||
if(auto_start != NULL) {
|
// if(auto_start != NULL) {
|
||||||
auto_start->resetTitleSkin(last_skin_path);
|
// auto_start->resetTitleSkin(last_skin_path);
|
||||||
}
|
// }
|
||||||
// if(camera_manager != NULL) {
|
// if(camera_manager != NULL) {
|
||||||
// camera_manager->resetTitleSkin(last_skin_path);
|
// camera_manager->resetTitleSkin(last_skin_path);
|
||||||
// }
|
// }
|
||||||
|
|
|
@ -163,7 +163,7 @@ private:
|
||||||
QParallelAnimationGroup *gatherGroup;
|
QParallelAnimationGroup *gatherGroup;
|
||||||
PAGESTATUS status;
|
PAGESTATUS status;
|
||||||
bool statusFlag;
|
bool statusFlag;
|
||||||
AutoStartWidget *auto_start;
|
// AutoStartWidget *auto_start;
|
||||||
// CameraManager *camera_manager;
|
// CameraManager *camera_manager;
|
||||||
UpgradeDialog *upgrade_dialog;
|
UpgradeDialog *upgrade_dialog;
|
||||||
// QStringList skinlist;
|
// QStringList skinlist;
|
||||||
|
|
|
@ -54,11 +54,11 @@ UpgradeDialog::UpgradeDialog(QWidget *parent, /*const QString &version, */QStrin
|
||||||
close_btn->move(0, 0);
|
close_btn->move(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
nameLabel = new QLabel(baseWidget);
|
m_appNameLabel = new QLabel(baseWidget);
|
||||||
nameLabel->setGeometry(QRect(37, 0, 260, 30));
|
m_appNameLabel->setGeometry(QRect(37, 0, 260, 30));
|
||||||
nameLabel->setStyleSheet("QLabel{color:#ffffff;font-family: 方正黑体_GBK;font-size: 12px;text-align: center;font-weight:bold;}");
|
m_appNameLabel->setStyleSheet("QLabel{color:#ffffff;font-family: 方正黑体_GBK;font-size: 12px;text-align: center;font-weight:bold;}");
|
||||||
nameLabel->setAlignment(Qt::AlignCenter);
|
m_appNameLabel->setAlignment(Qt::AlignCenter);
|
||||||
nameLabel->setText(tr("check and update"));
|
m_appNameLabel->setText(tr("check and update"));
|
||||||
|
|
||||||
// msg_label = new QLabel(baseWidget);
|
// msg_label = new QLabel(baseWidget);
|
||||||
// msg_label->setGeometry(QRect(10, 40, 324, 20));
|
// msg_label->setGeometry(QRect(10, 40, 324, 20));
|
||||||
|
|
|
@ -80,7 +80,7 @@ private:
|
||||||
QLabel *ok_icon_label;
|
QLabel *ok_icon_label;
|
||||||
LoadingLabel *work_loading_label;
|
LoadingLabel *work_loading_label;
|
||||||
LoadingLabel *upgrade_loading_label;
|
LoadingLabel *upgrade_loading_label;
|
||||||
QLabel *nameLabel;
|
QLabel *m_appNameLabel;
|
||||||
QLabel *doing_label;
|
QLabel *doing_label;
|
||||||
QLabel *error_label;
|
QLabel *error_label;
|
||||||
QLabel *tip_label;
|
QLabel *tip_label;
|
||||||
|
|
Loading…
Reference in New Issue