Compare commits
1 Commits
v2.0
...
bug/loadim
| Author | SHA1 | Date | |
|---|---|---|---|
| 8b8b70c671 |
@@ -2,6 +2,7 @@
|
|||||||
#include "ui_frmalbum.h"
|
#include "ui_frmalbum.h"
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
|
|
||||||
|
int FrmAlbum::m_copyType = 0;
|
||||||
|
|
||||||
FrmAlbum::FrmAlbum(QWidget *parent) : QWidget(parent)
|
FrmAlbum::FrmAlbum(QWidget *parent) : QWidget(parent)
|
||||||
{
|
{
|
||||||
@@ -13,52 +14,168 @@ FrmAlbum::~FrmAlbum()
|
|||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// QSet<QString> FrmAlbum::getUrlSet()
|
||||||
|
// {
|
||||||
|
// return m_selectedImageSet;
|
||||||
|
// }
|
||||||
|
|
||||||
|
int FrmAlbum::getCopyType()
|
||||||
|
{
|
||||||
|
return m_copyType;
|
||||||
|
}
|
||||||
|
|
||||||
void FrmAlbum::slot_updateImage()
|
void FrmAlbum::slot_updateImage()
|
||||||
{
|
{
|
||||||
QList<QUrl> urls = {
|
|
||||||
QUrl("https://imagehyj.oss-cn-hangzhou.aliyuncs.com/blog/20250320201317.png"),
|
|
||||||
QUrl("https://imagehyj.oss-cn-hangzhou.aliyuncs.com/blog/EDH386.jpeg"),
|
|
||||||
QUrl("https://imagehyj.oss-cn-hangzhou.aliyuncs.com/blog/20250321103557.png"),
|
|
||||||
QUrl("https://imagehyj.oss-cn-hangzhou.aliyuncs.com/blog/logo512.png")
|
|
||||||
};
|
|
||||||
|
|
||||||
foreach (const QUrl& u, urls) {
|
qDebug() <<"slot_updateImage";
|
||||||
FrmImgShow* widget = new FrmImgShow(this);
|
// QList<QUrl> urls = ImageManager::instance()->getImageUrls(FileConfigDecode::getInstance()->getAddress(),
|
||||||
widget->loadImage(u);
|
// FileConfigDecode::getInstance()->getUserName());
|
||||||
picWidgetList.push_front(widget);
|
|
||||||
}
|
// foreach (const QUrl& u, urls) {
|
||||||
|
// qDebug() << "image url:" <<u;
|
||||||
|
// FrmImgShow* widget = new FrmImgShow;
|
||||||
|
// connect(widget, &FrmImgShow::signal_imageSelected, [this](const QString& url){
|
||||||
|
// m_selectedImageSet.insert(url);
|
||||||
|
// });
|
||||||
|
// connect(widget, &FrmImgShow::signal_imageUnselected, [this](const QString& url){
|
||||||
|
// m_selectedImageSet.remove(url);
|
||||||
|
// });
|
||||||
|
// widget->loadImage(u);
|
||||||
|
// picWidgetList.push_front(widget);
|
||||||
|
// panelWidget->setWidget(picWidgetList, 3);
|
||||||
|
// }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrmAlbum::initForm()
|
void FrmAlbum::initForm()
|
||||||
{
|
{
|
||||||
layout = new QHBoxLayout(this);
|
|
||||||
panelWidget = new PanelWidget(this);
|
layout = new QVBoxLayout();
|
||||||
|
setLayout(layout);
|
||||||
|
panelWidget = new PanelWidget();
|
||||||
|
panelWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||||
|
panelWidget->setStyleSheet("border:1px solid white;");
|
||||||
panelWidget->setSpace(5);
|
panelWidget->setSpace(5);
|
||||||
layout->addWidget(panelWidget);
|
|
||||||
|
|
||||||
layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
layout->setSpacing(0);
|
layout->setSpacing(0);
|
||||||
this->setLayout(layout);
|
|
||||||
panelWidget->setObjectName("widget");
|
panelWidget->setObjectName("widget");
|
||||||
panelWidget->setStyleSheet("background-color: rgb(63, 60, 55)");
|
panelWidget->setStyleSheet("background-color: rgb(63, 60, 55)");
|
||||||
|
// panelWidget->setStyleSheet("background-color: #FFFFFF");
|
||||||
panelWidget->setAutoHeight(false);
|
panelWidget->setAutoHeight(false);
|
||||||
panelWidget->setAutoWidth(false);
|
panelWidget->setAutoWidth(false);
|
||||||
panelWidget->setAutoHeight(false);
|
panelWidget->setAutoHeight(false);
|
||||||
panelWidget->setAutoWidth(false);
|
panelWidget->setAutoWidth(false);
|
||||||
|
|
||||||
|
btnCopy = new QPushButton;
|
||||||
|
btnCopy->setText("复制");
|
||||||
|
btnCopy->setCursor(Qt::PointingHandCursor);
|
||||||
|
btnCopy->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
|
btnCopy->setStyleSheet("height:25px;width:70px;background-color:#1B9EF3;color:white;border-style:none;border-radius:8px");
|
||||||
|
connect(btnCopy, &QPushButton::clicked, [this](){
|
||||||
|
qDebug() <<"btnCopy";
|
||||||
|
QString clipStr = "";
|
||||||
|
foreach (QString s, m_selectedImageSet) {
|
||||||
|
switch (cbbCopyType->currentIndex()) {
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
QString curStr = QString("").arg(s);
|
||||||
|
curStr += "\n";
|
||||||
|
clipStr += curStr;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
QString curStr = QString("%1").arg(s);
|
||||||
|
curStr += "\n";
|
||||||
|
clipStr += curStr;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
QString curStr = QString("<img src=\"%1\"/>").arg(s);
|
||||||
|
curStr += "\n";
|
||||||
|
clipStr += curStr;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
QString curStr = QString("[IMG]%1[/IMG]").arg(s);
|
||||||
|
curStr += "\n";
|
||||||
|
clipStr += curStr;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QClipboard* clipboard = QApplication::clipboard();
|
||||||
|
clipboard->setText(clipStr);
|
||||||
|
});
|
||||||
|
|
||||||
|
btnDelete = new QPushButton;
|
||||||
|
btnDelete->setText("删除");
|
||||||
|
btnDelete->setCursor(Qt::PointingHandCursor);
|
||||||
|
btnDelete->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
|
btnDelete->setStyleSheet("height:25px;width:70px;background-color:#F15140;color:white;border-style:none;border-radius:8px");
|
||||||
|
|
||||||
|
btnSelectAll = new QPushButton;
|
||||||
|
btnSelectAll->setText("全选");
|
||||||
|
btnSelectAll->setCursor(Qt::PointingHandCursor);
|
||||||
|
btnSelectAll->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
|
btnSelectAll->setStyleSheet("height:25px;width:70px;background-color:#44B363;color:white;border-style:none;border-radius:8px");
|
||||||
|
|
||||||
|
cbbCopyType = new QComboBox;
|
||||||
|
cbbCopyType->setCursor(Qt::PointingHandCursor);
|
||||||
|
cbbCopyType->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||||
|
cbbCopyType->setStyleSheet("height:25px;width:300;background-color:white;padding-left:16px;");
|
||||||
|
|
||||||
|
QList<QString> copyTypeList{"Markdown", "URL", "HTML", "UBB"};
|
||||||
|
cbbCopyType->addItems(copyTypeList);
|
||||||
|
|
||||||
|
connect(cbbCopyType, &QComboBox::currentIndexChanged, [this](int index){
|
||||||
|
m_copyType = index;
|
||||||
|
qDebug() << m_copyType;
|
||||||
|
});
|
||||||
|
|
||||||
|
spacerItem = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Fixed);
|
||||||
|
menuLayout = new QHBoxLayout();
|
||||||
|
menuLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
menuLayout->setSpacing(8);
|
||||||
|
menuLayout->addWidget(cbbCopyType);
|
||||||
|
menuLayout->addWidget(btnCopy);
|
||||||
|
menuLayout->addWidget(btnDelete);
|
||||||
|
menuLayout->addWidget(btnSelectAll);
|
||||||
|
menuLayout->addSpacerItem(spacerItem);
|
||||||
|
|
||||||
|
layout->addLayout(menuLayout);
|
||||||
|
layout->addWidget(panelWidget);
|
||||||
|
layout->setSpacing(6);
|
||||||
// qDebug() << ui->widget;
|
// qDebug() << ui->widget;
|
||||||
|
|
||||||
QList<QUrl> urls = {
|
connect(TCHttpService::getInstance(), &TCHttpService::signal_loginSuc, [this](){
|
||||||
QUrl("https://imagehyj.oss-cn-hangzhou.aliyuncs.com/blog/20250320201317.png"),
|
qDebug() <<"login success";
|
||||||
QUrl("https://imagehyj.oss-cn-hangzhou.aliyuncs.com/blog/EDH386.jpeg"),
|
QList<QUrl> urls = ImageManager::instance()->getImageUrls(FileConfigDecode::getInstance()->getAddress(),
|
||||||
QUrl("https://imagehyj.oss-cn-hangzhou.aliyuncs.com/blog/20250321103557.png"),
|
FileConfigDecode::getInstance()->getUserName());
|
||||||
QUrl("https://imagehyj.oss-cn-hangzhou.aliyuncs.com/blog/logo512.png")
|
|
||||||
};
|
|
||||||
|
|
||||||
foreach (const QUrl& u, urls) {
|
foreach (const QUrl& u, urls) {
|
||||||
FrmImgShow* widget = new FrmImgShow(this);
|
qDebug() << "image url:" <<u;
|
||||||
|
FrmImgShow* widget = new FrmImgShow(panelWidget);
|
||||||
|
connect(widget, &FrmImgShow::signal_imageSelected, [this](const QString& url){
|
||||||
|
m_selectedImageSet.insert(url);
|
||||||
|
});
|
||||||
|
connect(widget, &FrmImgShow::signal_imageUnselected, [this](const QString& url){
|
||||||
|
m_selectedImageSet.remove(url);
|
||||||
|
});
|
||||||
widget->loadImage(u);
|
widget->loadImage(u);
|
||||||
picWidgetList.push_front(widget);
|
picWidgetList.push_front(widget);
|
||||||
|
panelWidget->setWidget(picWidgetList, 3);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
panelWidget->setWidget(picWidgetList, 4);
|
panelWidget->setWidget(picWidgetList, 4);
|
||||||
panelWidget->setSpace(15);
|
panelWidget->setSpace(15);
|
||||||
|
|||||||
@@ -2,8 +2,12 @@
|
|||||||
#define FRMALBUM_H
|
#define FRMALBUM_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include <QPushButton>
|
||||||
|
#include <QComboBox>
|
||||||
|
#include <QSet>
|
||||||
#include "panelwidget.h"
|
#include "panelwidget.h"
|
||||||
#include "frmimgshow.h"
|
#include "frmimgshow.h"
|
||||||
|
#include "fileconfigdecode.h"`
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
@@ -18,6 +22,9 @@ public:
|
|||||||
explicit FrmAlbum(QWidget *parent = nullptr);
|
explicit FrmAlbum(QWidget *parent = nullptr);
|
||||||
~FrmAlbum();
|
~FrmAlbum();
|
||||||
|
|
||||||
|
// QSet<QString> getUrlSet();
|
||||||
|
|
||||||
|
static int getCopyType();
|
||||||
public slots:
|
public slots:
|
||||||
void slot_updateImage();
|
void slot_updateImage();
|
||||||
|
|
||||||
@@ -25,8 +32,19 @@ private:
|
|||||||
Ui::FrmAlbum *ui;
|
Ui::FrmAlbum *ui;
|
||||||
QList<QWidget*> picWidgetList;
|
QList<QWidget*> picWidgetList;
|
||||||
PanelWidget* panelWidget;
|
PanelWidget* panelWidget;
|
||||||
QHBoxLayout* layout;
|
QVBoxLayout* layout;
|
||||||
void initForm();
|
void initForm();
|
||||||
|
|
||||||
|
QPushButton* btnCopy;
|
||||||
|
QPushButton* btnDelete;
|
||||||
|
QPushButton* btnSelectAll;
|
||||||
|
QComboBox* cbbCopyType;
|
||||||
|
QHBoxLayout* menuLayout;
|
||||||
|
QSpacerItem* spacerItem;
|
||||||
|
|
||||||
|
QSet<QString> m_selectedImageSet;
|
||||||
|
|
||||||
|
static int m_copyType;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FRMALBUM_H
|
#endif // FRMALBUM_H
|
||||||
|
|||||||
@@ -1,12 +1,15 @@
|
|||||||
#include "frmimgshow.h"
|
#include "frmimgshow.h"
|
||||||
|
#include "frmalbum.h"
|
||||||
|
|
||||||
FrmImgShow::FrmImgShow(QWidget *parent) : QWidget(parent)
|
FrmImgShow::FrmImgShow(QWidget *parent) : QWidget(parent)
|
||||||
{
|
{
|
||||||
initForm();
|
initForm();
|
||||||
|
initSignalSlot();
|
||||||
connect(TCHttpService::getInstance(), &TCHttpService::signal_imageDownloaded,
|
connect(TCHttpService::getInstance(), &TCHttpService::signal_imageDownloaded,
|
||||||
this, [this](const QString& requestId, const QPixmap& pixmap){
|
this, [this](const QString& requestId, const QPixmap& pixmap){
|
||||||
if (requestId == m_requestId) {
|
if (requestId == m_requestId) {
|
||||||
setLoadingState(false);
|
// setLoadingState(false);
|
||||||
|
qDebug() << "load success";
|
||||||
setImage(pixmap);
|
setImage(pixmap);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -14,7 +17,7 @@ FrmImgShow::FrmImgShow(QWidget *parent) : QWidget(parent)
|
|||||||
connect(TCHttpService::getInstance(), &TCHttpService::signal_downloadFailed,
|
connect(TCHttpService::getInstance(), &TCHttpService::signal_downloadFailed,
|
||||||
this, [this](const QString& requestId, const QString& error){
|
this, [this](const QString& requestId, const QString& error){
|
||||||
if (requestId == m_requestId) {
|
if (requestId == m_requestId) {
|
||||||
setLoadingState(true);
|
qDebug() << "load failed";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -24,14 +27,11 @@ void FrmImgShow::loadImage(const QUrl &imageUrl)
|
|||||||
qDebug() << "loadImage";
|
qDebug() << "loadImage";
|
||||||
m_currentUrl = imageUrl;
|
m_currentUrl = imageUrl;
|
||||||
m_requestId = QUuid::createUuid().toString();
|
m_requestId = QUuid::createUuid().toString();
|
||||||
setLoadingState(true);
|
|
||||||
qDebug() << "downlaodImage";
|
|
||||||
TCHttpService::getInstance()->downloadImage(m_requestId, imageUrl);
|
TCHttpService::getInstance()->downloadImage(m_requestId, imageUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrmImgShow::setImage(const QPixmap &pixmap)
|
void FrmImgShow::setImage(const QPixmap &pixmap)
|
||||||
{
|
{
|
||||||
qDebug() << "setImage";
|
|
||||||
// int h = pixmap.height();
|
// int h = pixmap.height();
|
||||||
// int w = pixmap.width();
|
// int w = pixmap.width();
|
||||||
// int sh, sw;
|
// int sh, sw;
|
||||||
@@ -51,6 +51,52 @@ void FrmImgShow::setLoadingState(bool loading)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FrmImgShow::initSignalSlot()
|
||||||
|
{
|
||||||
|
connect(btnCopy, &QPushButton::clicked, [this](){
|
||||||
|
switch(FrmAlbum::getCopyType()) {
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
QClipboard* clipboard = QApplication::clipboard();
|
||||||
|
QString mdStr = QString("").arg(m_currentUrl.toString());
|
||||||
|
clipboard->setText(mdStr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
QClipboard* clipboard = QApplication::clipboard();
|
||||||
|
QString urlStr = m_currentUrl.toString();
|
||||||
|
clipboard->setText(urlStr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
QClipboard* clipboard = QApplication::clipboard();
|
||||||
|
QString htmlStr = QString("<img src=\"%1\"/>").arg(m_currentUrl.toString());
|
||||||
|
clipboard->setText(htmlStr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
QClipboard* clipboard = QApplication::clipboard();
|
||||||
|
QString ubbStr = QString("[IMG]%1[/IMG]").arg(m_currentUrl.toString());
|
||||||
|
clipboard->setText(ubbStr);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
connect(ckbSelect, &QCheckBox::checkStateChanged, [this](Qt::CheckState state){
|
||||||
|
if (state == Qt::Unchecked) {
|
||||||
|
emit signal_imageUnselected(m_currentUrl.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state == Qt::Checked) {
|
||||||
|
emit signal_imageSelected(m_currentUrl.toString());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
QSize FrmImgShow::sizeHint()
|
QSize FrmImgShow::sizeHint()
|
||||||
{
|
{
|
||||||
@@ -113,6 +159,7 @@ void FrmImgShow::initForm()
|
|||||||
btnCopy->setMinimumSize(22, 22);
|
btnCopy->setMinimumSize(22, 22);
|
||||||
btnCopy->setFlat(true);
|
btnCopy->setFlat(true);
|
||||||
btnCopy->setIcon(QIcon(":/qrc/image/copy_white.png"));
|
btnCopy->setIcon(QIcon(":/qrc/image/copy_white.png"));
|
||||||
|
btnCopy->setCursor(Qt::PointingHandCursor);
|
||||||
|
|
||||||
btnCopy->installEventFilter(this);
|
btnCopy->installEventFilter(this);
|
||||||
|
|
||||||
@@ -121,14 +168,17 @@ void FrmImgShow::initForm()
|
|||||||
btnDelete->setFlat(true);
|
btnDelete->setFlat(true);
|
||||||
btnDelete->setIcon(QIcon(":/qrc/image/delete_white.png"));
|
btnDelete->setIcon(QIcon(":/qrc/image/delete_white.png"));
|
||||||
btnDelete->installEventFilter(this);
|
btnDelete->installEventFilter(this);
|
||||||
|
btnDelete->setCursor(Qt::PointingHandCursor);
|
||||||
|
|
||||||
horizenSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
horizenSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
|
||||||
hLayout = new QHBoxLayout();
|
hLayout = new QHBoxLayout();
|
||||||
|
|
||||||
ckbSelect = new QCheckBox();
|
ckbSelect = new QCheckBox();
|
||||||
// ckbSelect->setMinimumSize(20, 20);
|
ckbSelect->setText("");
|
||||||
|
ckbSelect->setMinimumSize(20, 20);
|
||||||
|
ckbSelect->setCursor(Qt::PointingHandCursor);
|
||||||
// ckbSelect->setStyleSheet("border:1px solid white;border-radius:5px");
|
// ckbSelect->setStyleSheet("border:1px solid white;border-radius:5px");
|
||||||
ckbSelect->setStyleSheet("border-style:none;");
|
// ckbSelect->setStyleSheet("border-style:none;background-color:green;spacing:0px;");
|
||||||
|
|
||||||
hLayout->addWidget(btnCopy);
|
hLayout->addWidget(btnCopy);
|
||||||
hLayout->addWidget(btnDelete);
|
hLayout->addWidget(btnDelete);
|
||||||
@@ -143,12 +193,13 @@ void FrmImgShow::initForm()
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// btnCopy->setIcon(QIcon(QPixmap(":/qrc/image/copy_white.png")));
|
// btnCopy->setIcon(QIcon(QPixmap(":/qrc/image/copy_white.png")));
|
||||||
// btnDelete->setIcon(QIcon(QPixmap(":/qrc/image/delete_white.png")));
|
// btnDelete->setIcon(QIcon(QPixmap(":/qrc/image/delete_white.png")));
|
||||||
// btnCopy->setFixedSize(32, 32);
|
// btnCopy->setFixedSize(32, 32);
|
||||||
// btnCopy->setCursor(Qt::PointingHandCursor);
|
// btnCopy->setCursor(Qt::PointingHandCursor);
|
||||||
|
|
||||||
// setStyleSheet("background-color: #FF0000;border: 1px solid white");
|
setStyleSheet("background-color: #FF0000");
|
||||||
|
|
||||||
setFixedSize(134, 160);
|
setFixedSize(134, 160);
|
||||||
|
|
||||||
@@ -158,6 +209,6 @@ void FrmImgShow::initForm()
|
|||||||
|
|
||||||
void FrmImgShow::initWidget()
|
void FrmImgShow::initWidget()
|
||||||
{
|
{
|
||||||
// btnCopy->installEventFilter(this);
|
btnCopy->installEventFilter(this);
|
||||||
// btnDelete->installEventFilter(this);
|
btnDelete->installEventFilter(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
#include <QSpacerItem>
|
#include <QSpacerItem>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
|
#include <QClipboard>
|
||||||
|
#include <QApplication>
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include "tchttpservice.h"
|
#include "tchttpservice.h"
|
||||||
|
|
||||||
@@ -23,7 +25,9 @@ public:
|
|||||||
void setImage(const QPixmap& pixmap);
|
void setImage(const QPixmap& pixmap);
|
||||||
void setLoadingState(bool loading);
|
void setLoadingState(bool loading);
|
||||||
|
|
||||||
QSize sizeHint();
|
void initSignalSlot();
|
||||||
|
|
||||||
|
virtual QSize sizeHint();
|
||||||
private:
|
private:
|
||||||
QLabel* labImg;
|
QLabel* labImg;
|
||||||
// QLabel* labLoading;
|
// QLabel* labLoading;
|
||||||
@@ -48,6 +52,10 @@ private:
|
|||||||
|
|
||||||
QString m_requestId;
|
QString m_requestId;
|
||||||
QUrl m_currentUrl;
|
QUrl m_currentUrl;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void signal_imageSelected(QString);
|
||||||
|
void signal_imageUnselected(QString);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // FRMIMGSHOW_H
|
#endif // FRMIMGSHOW_H
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ void FrmSetting::initForm()
|
|||||||
ui->schEnableSsl->enableText(false);
|
ui->schEnableSsl->enableText(false);
|
||||||
ui->schEnableSsl->setAnimation(true);
|
ui->schEnableSsl->setAnimation(true);
|
||||||
|
|
||||||
|
ui->schAutoLogin->setBgColorOn(QColor("#409EFF"));
|
||||||
|
ui->schAutoLogin->enableText(false);
|
||||||
|
ui->schAutoLogin->setAnimation(true);
|
||||||
|
|
||||||
ui->btnServer->setCursor(Qt::PointingHandCursor);
|
ui->btnServer->setCursor(Qt::PointingHandCursor);
|
||||||
ui->schRename->setCursor(Qt::PointingHandCursor);
|
ui->schRename->setCursor(Qt::PointingHandCursor);
|
||||||
|
|
||||||
@@ -81,23 +85,36 @@ void FrmSetting::initWidget()
|
|||||||
ui->labTimeRenameClose->setStyleSheet(OPENQSS);
|
ui->labTimeRenameClose->setStyleSheet(OPENQSS);
|
||||||
}
|
}
|
||||||
if (FileConfigDecode::getInstance()->getAutoCopy()) {
|
if (FileConfigDecode::getInstance()->getAutoCopy()) {
|
||||||
ui->labEnableSsl->setStyleSheet(OPENQSS);
|
ui->labEnableSslOpen->setStyleSheet(OPENQSS);
|
||||||
ui->labEnableSsl->setStyleSheet(CLOSEQSS);
|
ui->labEnableSslClose->setStyleSheet(CLOSEQSS);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ui->labEnableSsl->setStyleSheet(CLOSEQSS);
|
ui->labEnableSslOpen->setStyleSheet(CLOSEQSS);
|
||||||
ui->labEnableSsl->setStyleSheet(OPENQSS);
|
ui->labEnableSslClose->setStyleSheet(OPENQSS);
|
||||||
|
}
|
||||||
|
if (FileConfigDecode::getInstance()->getAutoLogin()) {
|
||||||
|
ui->labAUtoLoginOpen->setStyleSheet(OPENQSS);
|
||||||
|
ui->labAUtoLoginOpen->setStyleSheet(CLOSEQSS);
|
||||||
|
TCHttpService::getInstance()->setConfiguration(FileConfigDecode::getInstance()->getUserName(),
|
||||||
|
FileConfigDecode::getInstance()->getPassword(),
|
||||||
|
FileConfigDecode::getInstance()->getAddress());
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ui->labAUtoLoginOpen->setStyleSheet(CLOSEQSS);
|
||||||
|
ui->labAUtoLoginOpen->setStyleSheet(OPENQSS);
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->schRename->setChecked(FileConfigDecode::getInstance()->getRename());
|
ui->schRename->setChecked(FileConfigDecode::getInstance()->getRename());
|
||||||
ui->schAutoSetup->setChecked(FileConfigDecode::getInstance()->getAutoSetup());
|
ui->schAutoSetup->setChecked(FileConfigDecode::getInstance()->getAutoSetup());
|
||||||
ui->schTimeRename->setChecked(FileConfigDecode::getInstance()->getTimeRename());
|
ui->schTimeRename->setChecked(FileConfigDecode::getInstance()->getTimeRename());
|
||||||
ui->schEnableSsl->setChecked(FileConfigDecode::getInstance()->getAutoCopy());
|
ui->schEnableSsl->setChecked(FileConfigDecode::getInstance()->getAutoCopy());
|
||||||
|
ui->schAutoLogin->setChecked(FileConfigDecode::getInstance()->getAutoLogin());
|
||||||
|
|
||||||
connect(ui->schRename, &SwitchButton::checkedChanged, this, &FrmSetting::schRenameSlot);
|
connect(ui->schRename, &SwitchButton::checkedChanged, this, &FrmSetting::schRenameSlot);
|
||||||
connect(ui->schAutoSetup, &SwitchButton::checkedChanged, this, &FrmSetting::schAutoSetup);
|
connect(ui->schAutoSetup, &SwitchButton::checkedChanged, this, &FrmSetting::schAutoSetup);
|
||||||
connect(ui->schTimeRename, &SwitchButton::checkedChanged, this, &FrmSetting::schTimeRename);
|
connect(ui->schTimeRename, &SwitchButton::checkedChanged, this, &FrmSetting::schTimeRename);
|
||||||
connect(ui->schEnableSsl, &SwitchButton::checkedChanged, this, &FrmSetting::schEnableSsl);
|
connect(ui->schEnableSsl, &SwitchButton::checkedChanged, this, &FrmSetting::schEnableSsl);
|
||||||
|
connect(ui->schAutoLogin, &SwitchButton::checkedChanged, this, &FrmSetting::schAutoLogin);
|
||||||
connect(ui->btnServer, &QPushButton::clicked, serversetting, &ServerSetting::show);
|
connect(ui->btnServer, &QPushButton::clicked, serversetting, &ServerSetting::show);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -136,6 +153,13 @@ void FrmSetting::schEnableSsl(bool checked)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FrmSetting::schAutoLogin(bool checked)
|
||||||
|
{
|
||||||
|
FileConfigDecode::getInstance()->setAutoLogin(checked);
|
||||||
|
ui->labAUtoLoginOpen->setStyleSheet(checked?OPENQSS:CLOSEQSS);
|
||||||
|
ui->labAutoLoginClose->setStyleSheet(checked?CLOSEQSS:OPENQSS);
|
||||||
|
}
|
||||||
|
|
||||||
void FrmSetting::slot_updateServerConfig(QString address, QString username, QString password)
|
void FrmSetting::slot_updateServerConfig(QString address, QString username, QString password)
|
||||||
{
|
{
|
||||||
FileConfigDecode::getInstance()->setAddress(address);
|
FileConfigDecode::getInstance()->setAddress(address);
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ private slots:
|
|||||||
void schAutoSetup(bool checked);
|
void schAutoSetup(bool checked);
|
||||||
void schTimeRename(bool checked);
|
void schTimeRename(bool checked);
|
||||||
void schEnableSsl(bool checked);
|
void schEnableSsl(bool checked);
|
||||||
|
void schAutoLogin(bool checked);
|
||||||
|
|
||||||
void slot_updateServerConfig(QString address, QString username, QString password);
|
void slot_updateServerConfig(QString address, QString username, QString password);
|
||||||
|
|
||||||
|
|||||||
@@ -368,7 +368,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labEnableSsl_2">
|
<widget class="QLabel" name="lanAUtoLogin">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">color: rgb(255, 255, 255);</string>
|
<string notr="true">color: rgb(255, 255, 255);</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -391,14 +391,14 @@
|
|||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labEnableSslClose_2">
|
<widget class="QLabel" name="labAutoLoginClose">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>关</string>
|
<string>关</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="SwitchButton" name="schEnableSsl_2" native="true">
|
<widget class="SwitchButton" name="schAutoLogin" native="true">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
@@ -420,7 +420,7 @@
|
|||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="labEnableSslOpen_2">
|
<widget class="QLabel" name="labAUtoLoginOpen">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>开</string>
|
<string>开</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -47,7 +47,9 @@ void FrmUpload::slot_uploadFileSec(QString url)
|
|||||||
qDebug() << "slot_uploadFileSec:" << url;
|
qDebug() << "slot_uploadFileSec:" << url;
|
||||||
QClipboard* clipboard = QApplication::clipboard();
|
QClipboard* clipboard = QApplication::clipboard();
|
||||||
|
|
||||||
|
QString domain = FileConfigDecode::getInstance()->getAddress();
|
||||||
|
QString userName = FileConfigDecode::getInstance()->getUserName();
|
||||||
|
ImageManager::instance()->addImageUrl(domain, userName, url);
|
||||||
if (copyType == COPY_TYPE_MARKDOWN) {
|
if (copyType == COPY_TYPE_MARKDOWN) {
|
||||||
clipboard->setText(QString("").arg(url));
|
clipboard->setText(QString("").arg(url));
|
||||||
emit signal_uploadSuccess(url);
|
emit signal_uploadSuccess(url);
|
||||||
@@ -70,6 +72,11 @@ void FrmUpload::slot_uploadFileSec(QString url)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FrmUpload::slot_progressUpdate(int v)
|
||||||
|
{
|
||||||
|
ui->progressBar->setValue(v);
|
||||||
|
}
|
||||||
|
|
||||||
bool FrmUpload::eventFilter(QObject *watched, QEvent *event)
|
bool FrmUpload::eventFilter(QObject *watched, QEvent *event)
|
||||||
{
|
{
|
||||||
static bool mousePressed = false;
|
static bool mousePressed = false;
|
||||||
@@ -159,6 +166,8 @@ void FrmUpload::initWidget()
|
|||||||
this->setAcceptDrops(true);
|
this->setAcceptDrops(true);
|
||||||
setWindowFlags(Qt::FramelessWindowHint); // 移除系统边框
|
setWindowFlags(Qt::FramelessWindowHint); // 移除系统边框
|
||||||
setAttribute(Qt::WA_TranslucentBackground); // 启用透明背景
|
setAttribute(Qt::WA_TranslucentBackground); // 启用透明背景
|
||||||
|
|
||||||
|
connect(TCHttpService::getInstance(), &TCHttpService::signal_progressUpdate, this, &FrmUpload::slot_progressUpdate);
|
||||||
// ui->frmUpload->setAcceptDrops(true);
|
// ui->frmUpload->setAcceptDrops(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -179,6 +188,7 @@ void FrmUpload::on_btnFastUpload_clicked()
|
|||||||
{
|
{
|
||||||
// QString addDataPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
|
// QString addDataPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
|
||||||
// QString cacheDirPath = addDataPath + "/cache/";
|
// QString cacheDirPath = addDataPath + "/cache/";
|
||||||
|
|
||||||
QDir cacheDir(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
|
QDir cacheDir(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
|
||||||
if (!cacheDir.exists()) {
|
if (!cacheDir.exists()) {
|
||||||
cacheDir.mkpath(".");
|
cacheDir.mkpath(".");
|
||||||
@@ -187,6 +197,7 @@ void FrmUpload::on_btnFastUpload_clicked()
|
|||||||
const QMimeData* mimeData = clipboard->mimeData();
|
const QMimeData* mimeData = clipboard->mimeData();
|
||||||
|
|
||||||
if (mimeData->hasImage()) {
|
if (mimeData->hasImage()) {
|
||||||
|
ui->progressBar->setValue(0);
|
||||||
QImage image = clipboard->image();
|
QImage image = clipboard->image();
|
||||||
if (!image.isNull()) {
|
if (!image.isNull()) {
|
||||||
RenameType renametype = FileConfigDecode::getInstance()->getRenameType();
|
RenameType renametype = FileConfigDecode::getInstance()->getRenameType();
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ public:
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void slot_uploadFileSec(QString url);
|
void slot_uploadFileSec(QString url);
|
||||||
|
void slot_progressUpdate(int v);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool eventFilter(QObject* watched, QEvent* event);
|
virtual bool eventFilter(QObject* watched, QEvent* event);
|
||||||
|
|||||||
@@ -162,6 +162,45 @@
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||||
|
<item>
|
||||||
|
<widget class="QProgressBar" name="progressBar">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>10</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="value">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignmentFlag::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="textVisible">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_7">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Orientation::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Policy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||||
<item>
|
<item>
|
||||||
|
|||||||
@@ -94,6 +94,7 @@ void PanelWidget::setWidget(QList<QWidget *> widgets, int columnCount)
|
|||||||
foreach (QWidget *widget, widgets) {
|
foreach (QWidget *widget, widgets) {
|
||||||
gridLayout->removeWidget(widget);
|
gridLayout->removeWidget(widget);
|
||||||
widget->setVisible(false);
|
widget->setVisible(false);
|
||||||
|
delete widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
//重新添加到布局中并可见
|
//重新添加到布局中并可见
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ public:
|
|||||||
QList<QWidget *> getWidgets();
|
QList<QWidget *> getWidgets();
|
||||||
int getColumnCount();
|
int getColumnCount();
|
||||||
|
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
void setWidget(QList<QWidget *> widgets, int columnCount);
|
void setWidget(QList<QWidget *> widgets, int columnCount);
|
||||||
void setMargin(int left, int top, int right, int bottom);
|
void setMargin(int left, int top, int right, int bottom);
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ FileConfigDecode *FileConfigDecode::getInstance()
|
|||||||
|
|
||||||
FileConfigDecode::~FileConfigDecode()
|
FileConfigDecode::~FileConfigDecode()
|
||||||
{
|
{
|
||||||
// updateFile();
|
updateFile();
|
||||||
// qDebug() << "write:" << autoSetup << rename << timeRename << autoCopy;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QString FileConfigDecode::getAddress()
|
QString FileConfigDecode::getAddress()
|
||||||
@@ -73,23 +72,27 @@ RenameType FileConfigDecode::getRenameType()
|
|||||||
return renameType;
|
return renameType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool FileConfigDecode::getAutoLogin()
|
||||||
|
{
|
||||||
|
return autoLogin;
|
||||||
|
}
|
||||||
|
|
||||||
void FileConfigDecode::setAddress(QString value)
|
void FileConfigDecode::setAddress(QString value)
|
||||||
{
|
{
|
||||||
this->address = value;
|
this->address = value;
|
||||||
// updateFile();
|
updateFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileConfigDecode::setPort(quint16 value)
|
void FileConfigDecode::setPort(quint16 value)
|
||||||
{
|
{
|
||||||
this->port = value;
|
this->port = value;
|
||||||
// updateFile();
|
updateFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileConfigDecode::setAutoSetup(bool value)
|
void FileConfigDecode::setAutoSetup(bool value)
|
||||||
{
|
{
|
||||||
this->autoSetup = value;
|
this->autoSetup = value;
|
||||||
updateFile();
|
updateFile();
|
||||||
// updateFile();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileConfigDecode::setRename(bool value)
|
void FileConfigDecode::setRename(bool value)
|
||||||
@@ -101,13 +104,13 @@ void FileConfigDecode::setRename(bool value)
|
|||||||
else {
|
else {
|
||||||
renameType = (renameType == RENAME_TYPE_TIME) ? RENAME_TYPE_TIME : RENAME_TYPE_NORMAL;
|
renameType = (renameType == RENAME_TYPE_TIME) ? RENAME_TYPE_TIME : RENAME_TYPE_NORMAL;
|
||||||
}
|
}
|
||||||
qDebug() << renameType;
|
// qDebug() << renameType;
|
||||||
updateFile();
|
updateFile();
|
||||||
// updateFile();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileConfigDecode::setTimeRename(bool value, int flag)
|
void FileConfigDecode::setTimeRename(bool value, int flag)
|
||||||
{
|
{
|
||||||
|
qDebug() << value;
|
||||||
this->timeRename = value;
|
this->timeRename = value;
|
||||||
if (value) {
|
if (value) {
|
||||||
renameType = RENAME_TYPE_TIME;
|
renameType = RENAME_TYPE_TIME;
|
||||||
@@ -120,16 +123,14 @@ void FileConfigDecode::setTimeRename(bool value, int flag)
|
|||||||
if (!value && flag == 0) {
|
if (!value && flag == 0) {
|
||||||
renameType = RENAME_TYPE_NONE;
|
renameType = RENAME_TYPE_NONE;
|
||||||
}
|
}
|
||||||
qDebug() << renameType;
|
// qDebug() << renameType;
|
||||||
updateFile();
|
updateFile();
|
||||||
// updateFile();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileConfigDecode::setAutoCopy(bool value)
|
void FileConfigDecode::setAutoCopy(bool value)
|
||||||
{
|
{
|
||||||
this->autoCopy = value;
|
this->autoCopy = value;
|
||||||
updateFile();
|
updateFile();
|
||||||
// updateFile();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileConfigDecode::setUserName(QString username)
|
void FileConfigDecode::setUserName(QString username)
|
||||||
@@ -144,8 +145,14 @@ void FileConfigDecode::setPassword(QString password)
|
|||||||
updateFile();
|
updateFile();
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileConfigDecode::fileWrite(QString path, QString address, bool autosetup,
|
void FileConfigDecode::setAutoLogin(bool value)
|
||||||
bool rename, bool timerename, bool autocopy, QString username, QString password)
|
{
|
||||||
|
autoLogin = value;
|
||||||
|
updateFile();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void FileConfigDecode::fileWrite(QString path)
|
||||||
{
|
{
|
||||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||||
QSettings* config = new QSettings(path, QSettings::IniFormat);
|
QSettings* config = new QSettings(path, QSettings::IniFormat);
|
||||||
@@ -153,7 +160,6 @@ void FileConfigDecode::fileWrite(QString path, QString address, bool autosetup,
|
|||||||
QString section = QString("config");
|
QString section = QString("config");
|
||||||
config->beginGroup(section);
|
config->beginGroup(section);
|
||||||
config->setValue("address", address);
|
config->setValue("address", address);
|
||||||
config->setValue("port", port);
|
|
||||||
config->setValue("autosetup", autosetup);
|
config->setValue("autosetup", autosetup);
|
||||||
config->setValue("rename", rename);
|
config->setValue("rename", rename);
|
||||||
config->setValue("timerename", timerename);
|
config->setValue("timerename", timerename);
|
||||||
@@ -166,14 +172,13 @@ void FileConfigDecode::fileWrite(QString path, QString address, bool autosetup,
|
|||||||
QString section = QString("config");
|
QString section = QString("config");
|
||||||
config->beginGroup(section);
|
config->beginGroup(section);
|
||||||
config->setValue("address", address);
|
config->setValue("address", address);
|
||||||
config->setValue("port", port);
|
config->setValue("autosetup", autoSetup);
|
||||||
config->setValue("autosetup", autosetup);
|
|
||||||
config->setValue("rename", rename);
|
config->setValue("rename", rename);
|
||||||
config->setValue("timerename", timerename);
|
config->setValue("timerename", timeRename);
|
||||||
config->setValue("autocopy", autocopy);
|
config->setValue("autocopy", autoCopy);
|
||||||
config->setValue("username", username);
|
config->setValue("username", userName);
|
||||||
config->setValue("password", password);
|
config->setValue("password", password);
|
||||||
config->endGroup();
|
config->setValue("autologin", autoLogin);
|
||||||
delete config;
|
delete config;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@@ -196,12 +201,14 @@ void FileConfigDecode::initFile()
|
|||||||
this->autoCopy = config->value(section + "autocopy").toBool();
|
this->autoCopy = config->value(section + "autocopy").toBool();
|
||||||
this->userName = config->value(section+"username").toString();
|
this->userName = config->value(section+"username").toString();
|
||||||
this->password = config->value(section+"password").toString();
|
this->password = config->value(section+"password").toString();
|
||||||
|
this->autoLogin = config->value(section+"autologin").toBool();
|
||||||
|
|
||||||
checkConfig();
|
checkConfig();
|
||||||
|
|
||||||
this->firstCreate = false;
|
this->firstCreate = false;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
qDebug() << "file not exists";
|
||||||
this->firstCreate = true;
|
this->firstCreate = true;
|
||||||
|
|
||||||
this->address = "127.0.0.1:8080";
|
this->address = "127.0.0.1:8080";
|
||||||
@@ -211,8 +218,9 @@ void FileConfigDecode::initFile()
|
|||||||
this->autoCopy = false;
|
this->autoCopy = false;
|
||||||
this->userName = "admin";
|
this->userName = "admin";
|
||||||
this->password = "admin";
|
this->password = "admin";
|
||||||
|
this->autoLogin = false;
|
||||||
|
|
||||||
fileWrite(addFilePath, address, autoSetup, rename, timeRename, autoCopy, userName, password);
|
fileWrite(addFilePath);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -235,7 +243,7 @@ void FileConfigDecode::updateFile()
|
|||||||
QString addDataPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
|
QString addDataPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
|
||||||
QString addFilePath = addDataPath + "/config.ini";
|
QString addFilePath = addDataPath + "/config.ini";
|
||||||
|
|
||||||
qDebug() << "write" << autoSetup << rename << timeRename << autoCopy;
|
// qDebug() << "write" << this->autoSetup << this->rename << this->timeRename << this->autoCopy;
|
||||||
fileWrite(addFilePath, address, autoSetup, rename, timeRename, autoCopy, userName, password);
|
fileWrite(addFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ public:
|
|||||||
QString getUserName();
|
QString getUserName();
|
||||||
QString getPassword();
|
QString getPassword();
|
||||||
RenameType getRenameType();
|
RenameType getRenameType();
|
||||||
|
bool getAutoLogin();
|
||||||
|
|
||||||
void setAddress(QString value);
|
void setAddress(QString value);
|
||||||
void setPort(quint16 value);
|
void setPort(quint16 value);
|
||||||
@@ -41,6 +42,7 @@ public:
|
|||||||
void setAutoCopy(bool value);
|
void setAutoCopy(bool value);
|
||||||
void setUserName(QString username);
|
void setUserName(QString username);
|
||||||
void setPassword(QString password);
|
void setPassword(QString password);
|
||||||
|
void setAutoLogin(bool value);
|
||||||
|
|
||||||
void initFile();
|
void initFile();
|
||||||
void updateFile();
|
void updateFile();
|
||||||
@@ -54,12 +56,13 @@ private:
|
|||||||
bool autoCopy;
|
bool autoCopy;
|
||||||
QString userName;
|
QString userName;
|
||||||
QString password;
|
QString password;
|
||||||
|
bool autoLogin;
|
||||||
|
|
||||||
bool firstCreate;
|
bool firstCreate;
|
||||||
|
|
||||||
RenameType renameType = RENAME_TYPE_NONE;
|
RenameType renameType = RENAME_TYPE_NONE;
|
||||||
|
|
||||||
void fileWrite(QString path, QString address, bool autosetup, bool rename, bool timerename, bool autocopy, QString username, QString password);
|
void fileWrite(QString path);
|
||||||
|
|
||||||
static QScopedPointer<FileConfigDecode> m_instance;
|
static QScopedPointer<FileConfigDecode> m_instance;
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ void TCHttpService::apiLogin()
|
|||||||
qDebug() << this->m_token;
|
qDebug() << this->m_token;
|
||||||
m_isOnline = true;
|
m_isOnline = true;
|
||||||
ImageManager::instance()->addDomainUser(m_domain, m_userName);
|
ImageManager::instance()->addDomainUser(m_domain, m_userName);
|
||||||
|
QString stdPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
|
||||||
|
ImageManager::instance()->initialize(stdPath + "/picpanel.db");
|
||||||
|
|
||||||
|
|
||||||
emit signal_loginSuc();
|
emit signal_loginSuc();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -57,119 +61,6 @@ void TCHttpService::apiLogin()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void TCHttpService::apiMyfileCount()
|
|
||||||
{
|
|
||||||
|
|
||||||
QString urlStr;
|
|
||||||
if (m_enableSsl)
|
|
||||||
urlStr = "https://" + m_domain + "/api/myfiles";
|
|
||||||
else
|
|
||||||
urlStr = "http://" + m_domain + "/api/myfiles";
|
|
||||||
|
|
||||||
QMap<QString, QString> headers;
|
|
||||||
headers.insert("Content-Type", "application/json");
|
|
||||||
|
|
||||||
QMap<QString, QString> params;
|
|
||||||
params.insert("cmd", "count");
|
|
||||||
QUrl url = encodeUrl(urlStr, params);
|
|
||||||
QJsonObject jsonObj;
|
|
||||||
jsonObj["token"] = m_token;
|
|
||||||
jsonObj["user"] = m_userName;
|
|
||||||
QJsonDocument jsonDoc(jsonObj);
|
|
||||||
QByteArray jsonData = jsonDoc.toJson();
|
|
||||||
|
|
||||||
QNetworkRequest request(url);
|
|
||||||
for (auto ite = headers.constBegin(); ite != headers.constEnd(); ite++){
|
|
||||||
request.setRawHeader(ite.key().toUtf8(), ite.value().toUtf8());
|
|
||||||
}
|
|
||||||
|
|
||||||
QNetworkReply* reply = nullptr;
|
|
||||||
reply = m_manager.post(request, jsonData);
|
|
||||||
QObject::connect(reply, &QNetworkReply::finished, [this, reply](){
|
|
||||||
|
|
||||||
emit requestFinished(reply, "myfilecount");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void TCHttpService::apiMyfileNormal(int start, int count)
|
|
||||||
{
|
|
||||||
QString urlStr;
|
|
||||||
if (m_enableSsl)
|
|
||||||
urlStr = "https://" + m_domain + "/api/myfiles";
|
|
||||||
else
|
|
||||||
urlStr = "http://" + m_domain + "/api/myfiles";
|
|
||||||
|
|
||||||
QMap<QString, QString> headers;
|
|
||||||
headers.insert("Content-Type", "application/json");
|
|
||||||
|
|
||||||
QMap<QString, QString> params;
|
|
||||||
params.insert("cmd", "normal");
|
|
||||||
|
|
||||||
QUrl url = encodeUrl(urlStr, params);
|
|
||||||
QNetworkRequest request(url);
|
|
||||||
for (auto ite = headers.constBegin(); ite != headers.constEnd(); ite++){
|
|
||||||
request.setRawHeader(ite.key().toUtf8(), ite.value().toUtf8());
|
|
||||||
}
|
|
||||||
|
|
||||||
QJsonObject jsonObj;
|
|
||||||
jsonObj["token"] = m_token;
|
|
||||||
jsonObj["user"] = m_userName;
|
|
||||||
jsonObj["count"] = count;
|
|
||||||
jsonObj["start"] = start;
|
|
||||||
|
|
||||||
QJsonDocument jsonDoc(jsonObj);
|
|
||||||
QByteArray jsonData = jsonDoc.toJson();
|
|
||||||
|
|
||||||
QNetworkReply* reply = nullptr;
|
|
||||||
reply = m_manager.post(request, jsonData);
|
|
||||||
connect(reply, &QNetworkReply::finished, [this, reply](){
|
|
||||||
emit requestFinished(reply, "myfilenormal");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
void TCHttpService::apiMd5(const QString& filePath)
|
|
||||||
{
|
|
||||||
QFile file(filePath);
|
|
||||||
if (!file.open(QIODevice::ReadOnly)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
QByteArray fileMd5;
|
|
||||||
QCryptographicHash hash(QCryptographicHash::Md5);
|
|
||||||
if (hash.addData(&file)) {
|
|
||||||
fileMd5 = hash.result().toHex();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
return;
|
|
||||||
|
|
||||||
QString urlStr;
|
|
||||||
if (m_enableSsl)
|
|
||||||
urlStr = "https://" + m_domain + "/api/md5";
|
|
||||||
else
|
|
||||||
urlStr = "http://" + m_domain + "/api/md5";
|
|
||||||
QMap<QString, QString> headers;
|
|
||||||
headers.insert("Content-Type", "application/json");
|
|
||||||
QString md5Str = QString::fromUtf8(fileMd5);
|
|
||||||
QJsonObject jsonObj;
|
|
||||||
jsonObj["token"] = m_token;
|
|
||||||
jsonObj["md5"] = md5Str;
|
|
||||||
jsonObj["filename"] = QFileInfo(file).fileName();
|
|
||||||
jsonObj["user"] = m_userName;
|
|
||||||
file.close();
|
|
||||||
|
|
||||||
QJsonDocument jsonDoc(jsonObj);
|
|
||||||
QByteArray jsonData = jsonDoc.toJson();
|
|
||||||
QNetworkReply* reply = nullptr;
|
|
||||||
|
|
||||||
QNetworkRequest request(urlStr);
|
|
||||||
reply = m_manager.post(request, jsonData);
|
|
||||||
|
|
||||||
QObject::connect(reply, &QNetworkReply::finished, [this, reply](){
|
|
||||||
emit requestFinished(reply, "md5");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
void TCHttpService::apiUpload(const QString &filePath)
|
void TCHttpService::apiUpload(const QString &filePath)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -246,6 +137,7 @@ void TCHttpService::apiUpload(const QString &filePath)
|
|||||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll());
|
QJsonDocument jsonDoc = QJsonDocument::fromJson(reply->readAll());
|
||||||
QJsonObject jsonObj = jsonDoc.object();
|
QJsonObject jsonObj = jsonDoc.object();
|
||||||
QString fileUrl = jsonObj["url"].toString();
|
QString fileUrl = jsonObj["url"].toString();
|
||||||
|
ImageManager::instance()->addImageUrl(m_domain, m_userName, fileUrl);
|
||||||
emit signal_uploadFileSec(fileUrl);
|
emit signal_uploadFileSec(fileUrl);
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "上传失败:" << reply->errorString();
|
qDebug() << "上传失败:" << reply->errorString();
|
||||||
@@ -255,9 +147,10 @@ void TCHttpService::apiUpload(const QString &filePath)
|
|||||||
multiPart->deleteLater();
|
multiPart->deleteLater();
|
||||||
});
|
});
|
||||||
|
|
||||||
connect(reply, &QNetworkReply::uploadProgress, this, [](qint64 bytesSent, qint64 bytesTotal) {
|
connect(reply, &QNetworkReply::uploadProgress, this, [this](qint64 bytesSent, qint64 bytesTotal) {
|
||||||
if (bytesTotal > 0) {
|
if (bytesTotal > 0) {
|
||||||
int progress = (bytesSent * 100) / bytesTotal;
|
int progress = (bytesSent * 100) / bytesTotal;
|
||||||
|
emit signal_progressUpdate(progress);
|
||||||
qDebug() << "上传进度:" << progress << "%";
|
qDebug() << "上传进度:" << progress << "%";
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -290,118 +183,6 @@ void TCHttpService::setConfiguration(QString userName, QString firstPwd, QString
|
|||||||
this->m_domain = domain;
|
this->m_domain = domain;
|
||||||
this->m_userName = userName;
|
this->m_userName = userName;
|
||||||
this->m_firstPwd = firstPwd;
|
this->m_firstPwd = firstPwd;
|
||||||
#if 0
|
|
||||||
connect(this, &TCHttpService::requestFinished, [this](QNetworkReply* reply, QString api){
|
|
||||||
QByteArray rawData = reply->readAll();
|
|
||||||
if (api == "login") {
|
|
||||||
|
|
||||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(rawData);
|
|
||||||
if (jsonDoc.isEmpty())
|
|
||||||
return;
|
|
||||||
QJsonObject jsonObj = jsonDoc.object();
|
|
||||||
int code = jsonObj["code"].toInt();
|
|
||||||
if (code == 0) {
|
|
||||||
this->m_token = jsonObj["token"].toString();
|
|
||||||
qDebug() << this->m_token;
|
|
||||||
m_isOnline = true;
|
|
||||||
emit signal_loginSuc();
|
|
||||||
// apiMyfileCount();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#if 0
|
|
||||||
if (api == "myfilecount") {
|
|
||||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(rawData);
|
|
||||||
if (jsonDoc.isEmpty())
|
|
||||||
return;
|
|
||||||
QJsonObject jsonObj = jsonDoc.object();
|
|
||||||
int code = jsonObj["code"].toInt();
|
|
||||||
|
|
||||||
if (code == 0) {
|
|
||||||
int total = jsonObj["total"].toInt();
|
|
||||||
this->m_total = total;
|
|
||||||
int n = total / 10 + 1;
|
|
||||||
int pendingRequests = n;
|
|
||||||
for (int i = 0; i < n; i++) {
|
|
||||||
int count = (total - i * 10 >= 10) ? 10 : (total - i * 10);
|
|
||||||
apiMyfileNormal(i*10, count);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (api == "myfilenormal") {
|
|
||||||
static int loginCnt = 0;
|
|
||||||
|
|
||||||
QJsonDocument jsonDoc = QJsonDocument::fromJson(rawData);
|
|
||||||
if (jsonDoc.isEmpty())
|
|
||||||
return;
|
|
||||||
QJsonObject jsonObj = jsonDoc.object();
|
|
||||||
|
|
||||||
int code = jsonObj["code"].toInt();
|
|
||||||
if (code != 0)
|
|
||||||
return;
|
|
||||||
QJsonArray jsonArray = jsonObj["files"].toArray();
|
|
||||||
for (const QJsonValue& value : jsonArray) {
|
|
||||||
QJsonObject jsonObj = value.toObject();
|
|
||||||
|
|
||||||
QString file_name = jsonObj["file_name"].toString();
|
|
||||||
int share_status = jsonObj["share_status"].toInt();
|
|
||||||
QString url = jsonObj["url"].toString();
|
|
||||||
qint64 size = jsonObj["size"].toInt();
|
|
||||||
QString md5 = jsonObj["md5"].toString();
|
|
||||||
|
|
||||||
QMap<QString, file_info_t>::iterator ite;
|
|
||||||
ite = m_fileMap.find(md5);
|
|
||||||
if (ite == m_fileMap.end()) {
|
|
||||||
qDebug() << file_name;
|
|
||||||
file_info_t info;
|
|
||||||
info.share_status = share_status;
|
|
||||||
info.size = size;
|
|
||||||
info.url = url;
|
|
||||||
info.file_name = file_name;
|
|
||||||
if (m_isOnline) {
|
|
||||||
qDebug() << "now upload";
|
|
||||||
emit signal_uploadFileSec(url);
|
|
||||||
|
|
||||||
}
|
|
||||||
m_fileMap.insert(md5, info);
|
|
||||||
// if (m_fileMap.size() == m_total && m_isOnline == false)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
#if !DEBUG
|
|
||||||
// for(auto ite = m_fileMap.constBegin(); ite != m_fileMap.constEnd(); ite++) {
|
|
||||||
// qDebug() << "fileMap debug:" << ite.value().file_name;
|
|
||||||
// }
|
|
||||||
qDebug() << "fileMap size:" << m_fileMap.size();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
// if (!m_isOnline) {
|
|
||||||
// loginCnt++;
|
|
||||||
// qDebug() << "loginCnt:" << loginCnt;
|
|
||||||
// if (loginCnt == m_total/10+1) {
|
|
||||||
// m_isOnline = true;
|
|
||||||
// qDebug() << "login success";
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
// if (api == "upload") {
|
|
||||||
// qDebug() <<"upload";
|
|
||||||
// QJsonDocument jsondoc = QJsonDocument::fromJson(rawData);
|
|
||||||
// QJsonObject jsonObj = jsondoc.object();
|
|
||||||
|
|
||||||
// int code = jsonObj["code"].toInt();
|
|
||||||
|
|
||||||
// if (code == 0)
|
|
||||||
// this->apiMyfileCount();
|
|
||||||
// }
|
|
||||||
#endif
|
|
||||||
reply->deleteLater();
|
|
||||||
});
|
|
||||||
#endif
|
|
||||||
apiLogin();
|
apiLogin();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -422,6 +203,19 @@ void TCHttpService::setUploadNum(int nb)
|
|||||||
|
|
||||||
void TCHttpService::downloadImage(const QString &requestId, const QUrl &imageUrl)
|
void TCHttpService::downloadImage(const QString &requestId, const QUrl &imageUrl)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
QPixmap cachedPixmap;
|
||||||
|
if (QPixmapCache::find(imageUrl.toString(), &cachedPixmap)) {
|
||||||
|
emit signal_imageDownloaded(requestId, cachedPixmap);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getCachedImage(imageUrl, cachedPixmap)) {
|
||||||
|
QPixmapCache::insert(imageUrl.toString(), cachedPixmap);
|
||||||
|
emit signal_imageDownloaded(requestId, cachedPixmap);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
QNetworkRequest request(imageUrl);
|
QNetworkRequest request(imageUrl);
|
||||||
QNetworkReply* reply = m_manager.get(request);
|
QNetworkReply* reply = m_manager.get(request);
|
||||||
|
|
||||||
@@ -460,6 +254,66 @@ QUrl TCHttpService::encodeUrl(QString urlStr, QMap<QString, QString> params)
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TCHttpService::cleanOldCacheFiles()
|
||||||
|
{
|
||||||
|
QDir cacheDir(QStandardPaths::writableLocation(QStandardPaths::CacheLocation));
|
||||||
|
cacheDir.setNameFilters(QStringList() << "*.png" << "*.jpg" << "*.jpeg" << "*.svg");
|
||||||
|
cacheDir.setFilter(QDir::Files);
|
||||||
|
|
||||||
|
foreach (QString dirFile, cacheDir.entryList()) {
|
||||||
|
QFileInfo fileInfo(cacheDir.absoluteFilePath(dirFile));
|
||||||
|
if (fileInfo.lastModified().daysTo(QDateTime::currentDateTime()) > m_max_cache_days) {
|
||||||
|
cacheDir.remove(dirFile);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
qint64 totalSize = 0;
|
||||||
|
QFileInfoList files = cacheDir.entryInfoList(QDir::Files, QDir::Time | QDir::Reversed);
|
||||||
|
|
||||||
|
foreach(QFileInfo file, files) {
|
||||||
|
totalSize += file.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (totalSize > m_disk_cache_size_mb * 1024 * 1024) {
|
||||||
|
foreach (QFileInfo file, files) {
|
||||||
|
if (totalSize <= m_disk_cache_size_mb * 1024 * 1024 * 0.9)
|
||||||
|
break;
|
||||||
|
|
||||||
|
totalSize -= file.size();
|
||||||
|
QFile::remove(file.absoluteFilePath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool TCHttpService::getCachedImage(const QUrl &imageUrl, QPixmap &pixmap)
|
||||||
|
{
|
||||||
|
QString filePath = getCacheFilePath(imageUrl);
|
||||||
|
|
||||||
|
if (QFile::exists(filePath)) {
|
||||||
|
QFileInfo info(filePath);
|
||||||
|
if (info.lastModified().daysTo(QDateTime::currentDateTime()) > m_max_cache_days) {
|
||||||
|
QFile::remove(filePath);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (pixmap.load(filePath)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
QString TCHttpService::getCacheFilePath(const QUrl &imageUrl)
|
||||||
|
{
|
||||||
|
QCryptographicHash hash(QCryptographicHash::Md5);
|
||||||
|
hash.addData(imageUrl.toString().toUtf8());
|
||||||
|
QString fileName = hash.result().toHex() + ".png";
|
||||||
|
|
||||||
|
return QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + "/" + fileName;
|
||||||
|
}
|
||||||
|
|
||||||
TCHttpService::TCHttpService(QObject *parent) : QObject(parent)
|
TCHttpService::TCHttpService(QObject *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -482,5 +336,6 @@ void TCHttpService::slot_downloadFinished(QNetworkReply *reply)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,8 +19,11 @@
|
|||||||
#include <QHttpPart>
|
#include <QHttpPart>
|
||||||
#include <QHttpMultiPart>
|
#include <QHttpMultiPart>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
|
#include <QPixmapCache>
|
||||||
|
#include <QDir>
|
||||||
#include "urldatabase.h"
|
#include "urldatabase.h"
|
||||||
|
|
||||||
|
|
||||||
class TCHttpService : public QObject
|
class TCHttpService : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -29,6 +32,8 @@ private:
|
|||||||
public:
|
public:
|
||||||
static TCHttpService* getInstance();
|
static TCHttpService* getInstance();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void apiLogin();
|
void apiLogin();
|
||||||
#if 0
|
#if 0
|
||||||
void apiMyfileCount();
|
void apiMyfileCount();
|
||||||
@@ -47,6 +52,9 @@ public:
|
|||||||
private:
|
private:
|
||||||
|
|
||||||
QUrl encodeUrl(QString url, QMap<QString, QString> params);
|
QUrl encodeUrl(QString url, QMap<QString, QString> params);
|
||||||
|
void cleanOldCacheFiles();
|
||||||
|
bool getCachedImage(const QUrl& imageUrl, QPixmap& pixmap);
|
||||||
|
QString getCacheFilePath(const QUrl& imageUrl);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void signal_loginSuc();
|
void signal_loginSuc();
|
||||||
@@ -56,6 +64,8 @@ signals:
|
|||||||
|
|
||||||
void signal_imageDownloaded(const QString& requestId, const QPixmap& pixmap);
|
void signal_imageDownloaded(const QString& requestId, const QPixmap& pixmap);
|
||||||
void signal_downloadFailed(const QString& requestId, const QString& error);
|
void signal_downloadFailed(const QString& requestId, const QString& error);
|
||||||
|
|
||||||
|
void signal_progressUpdate(int);
|
||||||
private:
|
private:
|
||||||
explicit TCHttpService(QObject *parent = nullptr);
|
explicit TCHttpService(QObject *parent = nullptr);
|
||||||
|
|
||||||
@@ -67,6 +77,11 @@ private:
|
|||||||
QString m_domain;
|
QString m_domain;
|
||||||
QString m_firstPwd;
|
QString m_firstPwd;
|
||||||
QString m_userName;
|
QString m_userName;
|
||||||
|
|
||||||
|
int m_memory_cache_size_kb = 10240;
|
||||||
|
int m_disk_cache_size_mb = 100;
|
||||||
|
int m_max_cache_days = 30;
|
||||||
|
|
||||||
int m_total;
|
int m_total;
|
||||||
bool m_enableSsl = true;
|
bool m_enableSsl = true;
|
||||||
|
|
||||||
|
|||||||
6
main.cpp
6
main.cpp
@@ -2,12 +2,16 @@
|
|||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <QStandardPaths>
|
||||||
|
#include "urldatabase.h"
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
// QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
// QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
|
// QString strPath = QStandardPaths::writableLocation(QStandardPaths::ConfigLocation);
|
||||||
|
// strPath += "/picpanel.db";
|
||||||
|
// ImageManager::instance()->initialize(strPath);
|
||||||
a.setFont(QFont("Microsoft YaHei UI"));
|
a.setFont(QFont("Microsoft YaHei UI"));
|
||||||
Widget w;
|
Widget w;
|
||||||
w.setWindowIcon(QIcon(QPixmap(":/qrc/image/icon.png")));
|
w.setWindowIcon(QIcon(QPixmap(":/qrc/image/icon.png")));
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE QtCreatorProject>
|
<!DOCTYPE QtCreatorProject>
|
||||||
<!-- Written by QtCreator 15.0.0, 2025-03-26T01:05:22. -->
|
<!-- Written by QtCreator 14.0.2, 2025-03-26T18:36:00. -->
|
||||||
<qtcreator>
|
<qtcreator>
|
||||||
<data>
|
<data>
|
||||||
<variable>EnvironmentId</variable>
|
<variable>EnvironmentId</variable>
|
||||||
<value type="QByteArray">{eff88622-f1f6-485c-90af-dd46e6d2c022}</value>
|
<value type="QByteArray">{631b5895-04c2-4f08-83d2-9e1277f189a1}</value>
|
||||||
</data>
|
</data>
|
||||||
<data>
|
<data>
|
||||||
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
@@ -33,7 +33,6 @@
|
|||||||
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||||
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||||
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||||
<value type="int" key="EditorConfiguration.LineEndingBehavior">0</value>
|
|
||||||
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||||
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||||
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||||
@@ -79,7 +78,7 @@
|
|||||||
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||||
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||||
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||||
<value type="int" key="ClangTools.ParallelJobs">8</value>
|
<value type="int" key="ClangTools.ParallelJobs">12</value>
|
||||||
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
||||||
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||||
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||||
@@ -92,16 +91,16 @@
|
|||||||
<variable>ProjectExplorer.Project.Target.0</variable>
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
<valuemap type="QVariantMap">
|
<valuemap type="QVariantMap">
|
||||||
<value type="QString" key="DeviceType">Desktop</value>
|
<value type="QString" key="DeviceType">Desktop</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 6.7.3 for macOS</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.7.3 MinGW 64-bit</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 6.7.3 for macOS</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.7.3 MinGW 64-bit</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.673.clang_64_kit</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.673.win64_mingw_kit</value>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Debug</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:\picpanel\build\Desktop_Qt_6_7_3_MinGW_64_bit-Debug</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Debug</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">E:/picpanel/build/Desktop_Qt_6_7_3_MinGW_64_bit-Debug</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
@@ -139,8 +138,8 @@
|
|||||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Release</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">E:\picpanel\build\Desktop_Qt_6_7_3_MinGW_64_bit-release</value>
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Release</value>
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">E:/picpanel/build/Desktop_Qt_6_7_3_MinGW_64_bit-release</value>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
@@ -173,54 +172,12 @@
|
|||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">release</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
<value type="int" key="QtQuickCompiler">0</value>
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
|
||||||
<value type="int" key="EnableQmlDebugging">0</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Profile</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Profile</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
|
||||||
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
|
||||||
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
|
||||||
</valuemap>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
|
||||||
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
|
||||||
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
|
||||||
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
|
||||||
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
|
||||||
<value type="int" key="QtQuickCompiler">0</value>
|
|
||||||
<value type="int" key="SeparateDebugInfo">0</value>
|
|
||||||
</valuemap>
|
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||||
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
@@ -239,19 +196,20 @@
|
|||||||
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||||
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
||||||
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="QList<int>" key="Analyzer.Valgrind.VisibleErrorKinds"></value>
|
||||||
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||||
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||||
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph dwarf,4096 -F 250</value>
|
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph "dwarf,4096" -F 250</value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:</value>
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:E:/picpanel/picpanel.pro</value>
|
||||||
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/Users/lenn/Workspace/picpanel/picpanel.pro</value>
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">E:/picpanel/picpanel.pro</value>
|
||||||
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||||
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||||
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Debug/picpanel.app/Contents/MacOS</value>
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">E:/picpanel/build/Desktop_Qt_6_7_3_MinGW_64_bit-release</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
</valuemap>
|
</valuemap>
|
||||||
|
|||||||
271
picpanel.pro.user.eff8862
Normal file
271
picpanel.pro.user.eff8862
Normal file
@@ -0,0 +1,271 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE QtCreatorProject>
|
||||||
|
<!-- Written by QtCreator 15.0.0, 2025-03-26T01:05:22. -->
|
||||||
|
<qtcreator>
|
||||||
|
<data>
|
||||||
|
<variable>EnvironmentId</variable>
|
||||||
|
<value type="QByteArray">{eff88622-f1f6-485c-90af-dd46e6d2c022}</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.ActiveTarget</variable>
|
||||||
|
<value type="qlonglong">0</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.EditorSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoIndent">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
|
||||||
|
<value type="QString" key="language">Cpp</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">CppGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
|
||||||
|
<value type="QString" key="language">QmlJS</value>
|
||||||
|
<valuemap type="QVariantMap" key="value">
|
||||||
|
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
|
||||||
|
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.IndentSize">4</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.LineEndingBehavior">0</value>
|
||||||
|
<value type="int" key="EditorConfiguration.MarginColumn">80</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseHiding">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.PaddingMode">1</value>
|
||||||
|
<value type="int" key="EditorConfiguration.PreferAfterWhitespaceComments">0</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.PreferSingleLineComments">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.ShowMargin">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.SmartBackspaceBehavior">2</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SmartSelectionChanging">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
|
||||||
|
<value type="int" key="EditorConfiguration.TabSize">8</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseGlobal">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.UseIndenter">false</value>
|
||||||
|
<value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
|
||||||
|
<value type="QString" key="EditorConfiguration.ignoreFileTypes">*.md, *.MD, Makefile</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.skipTrailingWhitespace">true</value>
|
||||||
|
<value type="bool" key="EditorConfiguration.tintMarginArea">true</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.PluginSettings</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<valuemap type="QVariantMap" key="AutoTest.ActiveFrameworks">
|
||||||
|
<value type="bool" key="AutoTest.Framework.Boost">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.CTest">false</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.Catch">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.GTest">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.QtQuickTest">true</value>
|
||||||
|
<value type="bool" key="AutoTest.Framework.QtTest">true</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="bool" key="AutoTest.ApplyFilter">false</value>
|
||||||
|
<valuemap type="QVariantMap" key="AutoTest.CheckStates"/>
|
||||||
|
<valuelist type="QVariantList" key="AutoTest.PathFilters"/>
|
||||||
|
<value type="int" key="AutoTest.RunAfterBuild">0</value>
|
||||||
|
<value type="bool" key="AutoTest.UseGlobal">true</value>
|
||||||
|
<valuemap type="QVariantMap" key="ClangTools">
|
||||||
|
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
|
||||||
|
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
|
||||||
|
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
|
||||||
|
<value type="int" key="ClangTools.ParallelJobs">8</value>
|
||||||
|
<value type="bool" key="ClangTools.PreferConfigFile">true</value>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
|
||||||
|
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
|
||||||
|
<value type="bool" key="ClangTools.UseGlobalSettings">true</value>
|
||||||
|
</valuemap>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Target.0</variable>
|
||||||
|
<valuemap type="QVariantMap">
|
||||||
|
<value type="QString" key="DeviceType">Desktop</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 6.7.3 for macOS</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 6.7.3 for macOS</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.673.clang_64_kit</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Debug</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Release</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
|
||||||
|
<value type="int" key="EnableQmlDebugging">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Profile</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
|
||||||
|
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
|
||||||
|
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">构建</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">构建</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
|
||||||
|
</valuemap>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
|
||||||
|
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">清除</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">清除</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
|
||||||
|
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
|
||||||
|
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
|
||||||
|
<value type="int" key="QtQuickCompiler">0</value>
|
||||||
|
<value type="int" key="SeparateDebugInfo">0</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">部署</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">部署</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.DeployConfiguration.CustomData"/>
|
||||||
|
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
|
||||||
|
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
|
||||||
|
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
|
||||||
|
<value type="int" key="Analyzer.Valgrind.Callgrind.CostFormat">0</value>
|
||||||
|
<value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value>
|
||||||
|
<valuelist type="QVariantList" key="CustomOutputParsers"/>
|
||||||
|
<value type="int" key="PE.EnvironmentAspect.Base">2</value>
|
||||||
|
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
|
||||||
|
<value type="bool" key="PE.EnvironmentAspect.PrintOnRun">false</value>
|
||||||
|
<value type="QString" key="PerfRecordArgsId">-e cpu-cycles --call-graph dwarf,4096 -F 250</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
|
||||||
|
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:</value>
|
||||||
|
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/Users/lenn/Workspace/picpanel/picpanel.pro</value>
|
||||||
|
<value type="bool" key="ProjectExplorer.RunConfiguration.Customized">false</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
|
||||||
|
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
|
||||||
|
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Users/lenn/Workspace/picpanel/build/Qt_6_7_3_for_macOS-Debug/picpanel.app/Contents/MacOS</value>
|
||||||
|
</valuemap>
|
||||||
|
<value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
|
||||||
|
</valuemap>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.TargetCount</variable>
|
||||||
|
<value type="qlonglong">1</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>ProjectExplorer.Project.Updater.FileVersion</variable>
|
||||||
|
<value type="int">22</value>
|
||||||
|
</data>
|
||||||
|
<data>
|
||||||
|
<variable>Version</variable>
|
||||||
|
<value type="int">22</value>
|
||||||
|
</data>
|
||||||
|
</qtcreator>
|
||||||
BIN
qrc/image/checkbox_checked.png
Normal file
BIN
qrc/image/checkbox_checked.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 683 B |
BIN
qrc/image/checkbox_parcial.png
Normal file
BIN
qrc/image/checkbox_parcial.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 328 B |
BIN
qrc/image/checkbox_unchecked.png
Normal file
BIN
qrc/image/checkbox_unchecked.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 532 B |
Binary file not shown.
|
Before Width: | Height: | Size: 580 B |
Binary file not shown.
|
Before Width: | Height: | Size: 643 B |
Binary file not shown.
|
Before Width: | Height: | Size: 4.0 KiB |
@@ -284,3 +284,66 @@ QWidget#FrmUpload > QLabel#labTitle {
|
|||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QProgressBar {
|
||||||
|
border: 2px solid #3A3A3A;
|
||||||
|
border-radius: 5px;
|
||||||
|
background-color: #D3D3D3;
|
||||||
|
}
|
||||||
|
|
||||||
|
QProgressBar::chunk {
|
||||||
|
background-color: #1E90FF;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QCheckBox {
|
||||||
|
spacing: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QCheckBox::indicator {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QCheckBox::indicator:unchecked {
|
||||||
|
image: url(:/qrc/image/checkbox_unchecked.png)
|
||||||
|
}
|
||||||
|
|
||||||
|
QCheckBox::indicator:checked {
|
||||||
|
image: url(:/qrc/image/checkbox_checked.png)
|
||||||
|
}
|
||||||
|
|
||||||
|
QCheckBox::indicator:indeterminate {
|
||||||
|
image: url(:/qrc/image/checkbox_parcial.png)
|
||||||
|
}
|
||||||
|
|
||||||
|
QComboBox QAbstractItemView {
|
||||||
|
|
||||||
|
border-style: none;
|
||||||
|
border-radius: 10px;
|
||||||
|
outline: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
QComboBox QAbstractItemView::item {
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
QComboBox QAbstractItemView::item:selected {
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
border-style: none;
|
||||||
|
color: black;
|
||||||
|
background-color: #F5F7FA;
|
||||||
|
}
|
||||||
|
|
||||||
|
QComboBox QAbstractItemView::item:hover {
|
||||||
|
padding: 0px;
|
||||||
|
margin: 0px;
|
||||||
|
background-color: #F5F7FA;
|
||||||
|
color: black;
|
||||||
|
border-style: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
3
qss.qrc
3
qss.qrc
@@ -1,5 +1,8 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/">
|
<qresource prefix="/">
|
||||||
<file>qrc/qss/blacksoft.qss</file>
|
<file>qrc/qss/blacksoft.qss</file>
|
||||||
|
<file>qrc/image/checkbox_checked.png</file>
|
||||||
|
<file>qrc/image/checkbox_parcial.png</file>
|
||||||
|
<file>qrc/image/checkbox_unchecked.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|||||||
@@ -12,8 +12,9 @@ Widget::Widget(QWidget *parent)
|
|||||||
initWidget();
|
initWidget();
|
||||||
initSignalSlot();
|
initSignalSlot();
|
||||||
initTrayApp();
|
initTrayApp();
|
||||||
QString stdPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
|
// QString stdPath = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
|
||||||
ImageManager::instance()->initialize(stdPath + "/picpanel.db");
|
// qDebug() << stdPath;
|
||||||
|
// ImageManager::instance()->initialize(stdPath + "/picpanel.db");
|
||||||
// this->btnPageUpload->setChecked(true);
|
// this->btnPageUpload->setChecked(true);
|
||||||
// this->btnPageUpload->setStyleSheet("{border: none;border-right: 4px solid #409EFF;color: #409EFF;}");
|
// this->btnPageUpload->setStyleSheet("{border: none;border-right: 4px solid #409EFF;color: #409EFF;}");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user