mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-09-29 15:12:21 +08:00
完成应用搜索列表的滚动问题
This commit is contained in:
parent
6f3e4398df
commit
a73a4416fc
@ -1,5 +1,10 @@
|
|||||||
#include "appitem.h"
|
#include "appitem.h"
|
||||||
#include "ui_appitem.h"
|
#include "ui_appitem.h"
|
||||||
|
#include <QtConcurrent>
|
||||||
|
#include <QNetworkAccessManager>
|
||||||
|
#include <QNetworkReply>
|
||||||
|
#include <QNetworkRequest>
|
||||||
|
#include <QEventLoop>
|
||||||
|
|
||||||
AppItem::AppItem(QWidget *parent) :
|
AppItem::AppItem(QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
@ -12,3 +17,60 @@ AppItem::~AppItem()
|
|||||||
{
|
{
|
||||||
delete ui;
|
delete ui;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AppItem::setTitle(QString title)
|
||||||
|
{
|
||||||
|
m_title = title;
|
||||||
|
ui->lbl_title->setText(title);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppItem::setDescription(QString description)
|
||||||
|
{
|
||||||
|
m_description = description;
|
||||||
|
ui->lbl_desc->setText(description);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppItem::setIcon(QString icon)
|
||||||
|
{
|
||||||
|
m_icon = icon;
|
||||||
|
downloadIcon(icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppItem::setUrl(QString url)
|
||||||
|
{
|
||||||
|
m_url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppItem::mousePressEvent(QMouseEvent *event)
|
||||||
|
{
|
||||||
|
emit clicked(QUrl(m_url));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 下载图标
|
||||||
|
* @param icon
|
||||||
|
*/
|
||||||
|
void AppItem::downloadIcon(QString icon)
|
||||||
|
{
|
||||||
|
QtConcurrent::run([=](){
|
||||||
|
auto reqManager = new QNetworkAccessManager();
|
||||||
|
QUrl url(icon);
|
||||||
|
QNetworkReply *reply = reqManager->get(QNetworkRequest(url));
|
||||||
|
QEventLoop loop;
|
||||||
|
connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit);
|
||||||
|
loop.exec();
|
||||||
|
reqManager->deleteLater();
|
||||||
|
QPixmap pixmap;
|
||||||
|
pixmap.loadFromData(reply->readAll());
|
||||||
|
if (reply->error() == QNetworkReply::NoError) {
|
||||||
|
QMetaObject::invokeMethod(this, "loadIcon", Qt::QueuedConnection,
|
||||||
|
Q_ARG(QPixmap, pixmap));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
void AppItem::loadIcon(QPixmap pic)
|
||||||
|
{
|
||||||
|
qDebug() << pic;
|
||||||
|
ui->lbl_icon->setPixmap(pic);
|
||||||
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
#define APPITEM_H
|
#define APPITEM_H
|
||||||
|
|
||||||
#include <QWidget>
|
#include <QWidget>
|
||||||
|
#include <QUrl>
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class AppItem;
|
class AppItem;
|
||||||
@ -15,8 +16,29 @@ public:
|
|||||||
explicit AppItem(QWidget *parent = nullptr);
|
explicit AppItem(QWidget *parent = nullptr);
|
||||||
~AppItem();
|
~AppItem();
|
||||||
|
|
||||||
|
void setTitle(QString title);
|
||||||
|
void setDescription(QString description);
|
||||||
|
void setIcon(QString icon);
|
||||||
|
void setUrl(QString url);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void mousePressEvent(QMouseEvent *event) override;
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void clicked(QUrl url);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void downloadIcon(QString icon);
|
||||||
|
void loadIcon(QPixmap pic);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::AppItem *ui;
|
Ui::AppItem *ui;
|
||||||
|
|
||||||
|
QString m_title;
|
||||||
|
QString m_description;
|
||||||
|
QString m_icon;
|
||||||
|
QString m_pkgname;
|
||||||
|
QString m_url;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // APPITEM_H
|
#endif // APPITEM_H
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<ui version="4.0">
|
<ui version="4.0">
|
||||||
<author/>
|
|
||||||
<comment/>
|
|
||||||
<exportmacro/>
|
|
||||||
<class>AppItem</class>
|
<class>AppItem</class>
|
||||||
<widget name="AppItem" class="QWidget">
|
<widget class="QWidget" name="AppItem">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
@ -15,7 +13,34 @@
|
|||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lbl_icon">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<pixmapfunction/>
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lbl_title">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="lbl_desc">
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
223
src/flowlayout.cpp
Normal file
223
src/flowlayout.cpp
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of the examples of the Qt Toolkit.
|
||||||
|
**
|
||||||
|
** $QT_BEGIN_LICENSE:BSD$
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and The Qt Company. For licensing terms
|
||||||
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||||
|
** information use the contact form at https://www.qt.io/contact-us.
|
||||||
|
**
|
||||||
|
** BSD License Usage
|
||||||
|
** Alternatively, you may use this file under the terms of the BSD license
|
||||||
|
** as follows:
|
||||||
|
**
|
||||||
|
** "Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions are
|
||||||
|
** met:
|
||||||
|
** * Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** * Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in
|
||||||
|
** the documentation and/or other materials provided with the
|
||||||
|
** distribution.
|
||||||
|
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||||
|
** contributors may be used to endorse or promote products derived
|
||||||
|
** from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||||
|
**
|
||||||
|
** $QT_END_LICENSE$
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <QtWidgets>
|
||||||
|
|
||||||
|
#include "flowlayout.h"
|
||||||
|
//! [1]
|
||||||
|
FlowLayout::FlowLayout(QWidget *parent, int margin, int hSpacing, int vSpacing)
|
||||||
|
: QLayout(parent), m_hSpace(hSpacing), m_vSpace(vSpacing)
|
||||||
|
{
|
||||||
|
setContentsMargins(margin, margin, margin, margin);
|
||||||
|
}
|
||||||
|
|
||||||
|
FlowLayout::FlowLayout(int margin, int hSpacing, int vSpacing)
|
||||||
|
: m_hSpace(hSpacing), m_vSpace(vSpacing)
|
||||||
|
{
|
||||||
|
setContentsMargins(margin, margin, margin, margin);
|
||||||
|
}
|
||||||
|
//! [1]
|
||||||
|
|
||||||
|
//! [2]
|
||||||
|
FlowLayout::~FlowLayout()
|
||||||
|
{
|
||||||
|
QLayoutItem *item;
|
||||||
|
while ((item = takeAt(0)))
|
||||||
|
delete item;
|
||||||
|
}
|
||||||
|
//! [2]
|
||||||
|
|
||||||
|
//! [3]
|
||||||
|
void FlowLayout::addItem(QLayoutItem *item)
|
||||||
|
{
|
||||||
|
itemList.append(item);
|
||||||
|
}
|
||||||
|
//! [3]
|
||||||
|
|
||||||
|
//! [4]
|
||||||
|
int FlowLayout::horizontalSpacing() const
|
||||||
|
{
|
||||||
|
if (m_hSpace >= 0) {
|
||||||
|
return m_hSpace;
|
||||||
|
} else {
|
||||||
|
return smartSpacing(QStyle::PM_LayoutHorizontalSpacing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int FlowLayout::verticalSpacing() const
|
||||||
|
{
|
||||||
|
if (m_vSpace >= 0) {
|
||||||
|
return m_vSpace;
|
||||||
|
} else {
|
||||||
|
return smartSpacing(QStyle::PM_LayoutVerticalSpacing);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//! [4]
|
||||||
|
|
||||||
|
//! [5]
|
||||||
|
int FlowLayout::count() const
|
||||||
|
{
|
||||||
|
return itemList.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
QLayoutItem *FlowLayout::itemAt(int index) const
|
||||||
|
{
|
||||||
|
return itemList.value(index);
|
||||||
|
}
|
||||||
|
|
||||||
|
QLayoutItem *FlowLayout::takeAt(int index)
|
||||||
|
{
|
||||||
|
if (index >= 0 && index < itemList.size())
|
||||||
|
return itemList.takeAt(index);
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
//! [5]
|
||||||
|
|
||||||
|
//! [6]
|
||||||
|
Qt::Orientations FlowLayout::expandingDirections() const
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
//! [6]
|
||||||
|
|
||||||
|
//! [7]
|
||||||
|
bool FlowLayout::hasHeightForWidth() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
int FlowLayout::heightForWidth(int width) const
|
||||||
|
{
|
||||||
|
int height = doLayout(QRect(0, 0, width, 0), true);
|
||||||
|
return height;
|
||||||
|
}
|
||||||
|
//! [7]
|
||||||
|
|
||||||
|
//! [8]
|
||||||
|
void FlowLayout::setGeometry(const QRect &rect)
|
||||||
|
{
|
||||||
|
QLayout::setGeometry(rect);
|
||||||
|
doLayout(rect, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize FlowLayout::sizeHint() const
|
||||||
|
{
|
||||||
|
return minimumSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
QSize FlowLayout::minimumSize() const
|
||||||
|
{
|
||||||
|
QSize size;
|
||||||
|
QLayoutItem *item;
|
||||||
|
foreach (item, itemList)
|
||||||
|
size = size.expandedTo(item->minimumSize());
|
||||||
|
|
||||||
|
size += QSize(2*margin(), 2*margin());
|
||||||
|
return size;
|
||||||
|
}
|
||||||
|
//! [8]
|
||||||
|
|
||||||
|
//! [9]
|
||||||
|
int FlowLayout::doLayout(const QRect &rect, bool testOnly) const
|
||||||
|
{
|
||||||
|
int left, top, right, bottom;
|
||||||
|
getContentsMargins(&left, &top, &right, &bottom);
|
||||||
|
QRect effectiveRect = rect.adjusted(+left, +top, -right, -bottom);
|
||||||
|
int x = effectiveRect.x();
|
||||||
|
int y = effectiveRect.y();
|
||||||
|
int lineHeight = 0;
|
||||||
|
//! [9]
|
||||||
|
|
||||||
|
//! [10]
|
||||||
|
QLayoutItem *item;
|
||||||
|
foreach (item, itemList) {
|
||||||
|
QWidget *wid = item->widget();
|
||||||
|
int spaceX = horizontalSpacing();
|
||||||
|
if (spaceX == -1)
|
||||||
|
spaceX = wid->style()->layoutSpacing(
|
||||||
|
QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Horizontal);
|
||||||
|
int spaceY = verticalSpacing();
|
||||||
|
if (spaceY == -1)
|
||||||
|
spaceY = wid->style()->layoutSpacing(
|
||||||
|
QSizePolicy::PushButton, QSizePolicy::PushButton, Qt::Vertical);
|
||||||
|
//! [10]
|
||||||
|
//! [11]
|
||||||
|
int nextX = x + item->sizeHint().width() + spaceX;
|
||||||
|
if (nextX - spaceX > effectiveRect.right() && lineHeight > 0) {
|
||||||
|
x = effectiveRect.x();
|
||||||
|
y = y + lineHeight + spaceY;
|
||||||
|
nextX = x + item->sizeHint().width() + spaceX;
|
||||||
|
lineHeight = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!testOnly)
|
||||||
|
item->setGeometry(QRect(QPoint(x, y), item->sizeHint()));
|
||||||
|
|
||||||
|
x = nextX;
|
||||||
|
lineHeight = qMax(lineHeight, item->sizeHint().height());
|
||||||
|
}
|
||||||
|
return y + lineHeight - rect.y() + bottom;
|
||||||
|
}
|
||||||
|
//! [11]
|
||||||
|
//! [12]
|
||||||
|
int FlowLayout::smartSpacing(QStyle::PixelMetric pm) const
|
||||||
|
{
|
||||||
|
QObject *parent = this->parent();
|
||||||
|
if (!parent) {
|
||||||
|
return -1;
|
||||||
|
} else if (parent->isWidgetType()) {
|
||||||
|
QWidget *pw = static_cast<QWidget *>(parent);
|
||||||
|
return pw->style()->pixelMetric(pm, 0, pw);
|
||||||
|
} else {
|
||||||
|
return static_cast<QLayout *>(parent)->spacing();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//! [12]
|
88
src/flowlayout.h
Normal file
88
src/flowlayout.h
Normal file
@ -0,0 +1,88 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
**
|
||||||
|
** Copyright (C) 2016 The Qt Company Ltd.
|
||||||
|
** Contact: https://www.qt.io/licensing/
|
||||||
|
**
|
||||||
|
** This file is part of the examples of the Qt Toolkit.
|
||||||
|
**
|
||||||
|
** $QT_BEGIN_LICENSE:BSD$
|
||||||
|
** Commercial License Usage
|
||||||
|
** Licensees holding valid commercial Qt licenses may use this file in
|
||||||
|
** accordance with the commercial license agreement provided with the
|
||||||
|
** Software or, alternatively, in accordance with the terms contained in
|
||||||
|
** a written agreement between you and The Qt Company. For licensing terms
|
||||||
|
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||||
|
** information use the contact form at https://www.qt.io/contact-us.
|
||||||
|
**
|
||||||
|
** BSD License Usage
|
||||||
|
** Alternatively, you may use this file under the terms of the BSD license
|
||||||
|
** as follows:
|
||||||
|
**
|
||||||
|
** "Redistribution and use in source and binary forms, with or without
|
||||||
|
** modification, are permitted provided that the following conditions are
|
||||||
|
** met:
|
||||||
|
** * Redistributions of source code must retain the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer.
|
||||||
|
** * Redistributions in binary form must reproduce the above copyright
|
||||||
|
** notice, this list of conditions and the following disclaimer in
|
||||||
|
** the documentation and/or other materials provided with the
|
||||||
|
** distribution.
|
||||||
|
** * Neither the name of The Qt Company Ltd nor the names of its
|
||||||
|
** contributors may be used to endorse or promote products derived
|
||||||
|
** from this software without specific prior written permission.
|
||||||
|
**
|
||||||
|
**
|
||||||
|
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
|
||||||
|
**
|
||||||
|
** $QT_END_LICENSE$
|
||||||
|
**
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef FLOWLAYOUT_H
|
||||||
|
#define FLOWLAYOUT_H
|
||||||
|
|
||||||
|
#include <QLayout>
|
||||||
|
#include <QRect>
|
||||||
|
#include <QStyle>
|
||||||
|
//! [0]
|
||||||
|
class FlowLayout : public QLayout
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit FlowLayout(QWidget *parent, int margin = -1, int hSpacing = -1, int vSpacing = -1);
|
||||||
|
explicit FlowLayout(int margin = -1, int hSpacing = -1, int vSpacing = -1);
|
||||||
|
~FlowLayout();
|
||||||
|
|
||||||
|
void addItem(QLayoutItem *item) override;
|
||||||
|
int horizontalSpacing() const;
|
||||||
|
int verticalSpacing() const;
|
||||||
|
Qt::Orientations expandingDirections() const override;
|
||||||
|
bool hasHeightForWidth() const override;
|
||||||
|
int heightForWidth(int) const override;
|
||||||
|
int count() const override;
|
||||||
|
QLayoutItem *itemAt(int index) const override;
|
||||||
|
QSize minimumSize() const override;
|
||||||
|
void setGeometry(const QRect &rect) override;
|
||||||
|
QSize sizeHint() const override;
|
||||||
|
QLayoutItem *takeAt(int index) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
int doLayout(const QRect &rect, bool testOnly) const;
|
||||||
|
int smartSpacing(QStyle::PixelMetric pm) const;
|
||||||
|
|
||||||
|
QList<QLayoutItem *> itemList;
|
||||||
|
int m_hSpace;
|
||||||
|
int m_vSpace;
|
||||||
|
};
|
||||||
|
//! [0]
|
||||||
|
|
||||||
|
#endif // FLOWLAYOUT_H
|
@ -4,6 +4,8 @@
|
|||||||
#include <widget.h>
|
#include <widget.h>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <DAboutDialog>
|
#include <DAboutDialog>
|
||||||
|
#include "appitem.h"
|
||||||
|
|
||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,7 @@ SOURCES += main.cpp\
|
|||||||
image_show.cpp \
|
image_show.cpp \
|
||||||
big_image.cpp \
|
big_image.cpp \
|
||||||
progressload.cpp \
|
progressload.cpp \
|
||||||
|
flowlayout.cpp \
|
||||||
workerthreads.cpp
|
workerthreads.cpp
|
||||||
|
|
||||||
HEADERS += \
|
HEADERS += \
|
||||||
@ -41,6 +42,7 @@ HEADERS += \
|
|||||||
image_show.h \
|
image_show.h \
|
||||||
big_image.h \
|
big_image.h \
|
||||||
progressload.h \
|
progressload.h \
|
||||||
|
flowlayout.h \
|
||||||
workerthreads.h
|
workerthreads.h
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
#include <QJsonDocument>
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
#include <QJsonDocument>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
@ -30,6 +30,8 @@
|
|||||||
#include <DGuiApplicationHelper>
|
#include <DGuiApplicationHelper>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include "HttpClient.h"
|
#include "HttpClient.h"
|
||||||
|
#include "appitem.h"
|
||||||
|
#include "flowlayout.h"
|
||||||
|
|
||||||
DWIDGET_USE_NAMESPACE
|
DWIDGET_USE_NAMESPACE
|
||||||
|
|
||||||
@ -205,6 +207,9 @@ void Widget::initUI()
|
|||||||
left_list[13]=ui->menu_download;
|
left_list[13]=ui->menu_download;
|
||||||
|
|
||||||
ui->label_show->hide();
|
ui->label_show->hide();
|
||||||
|
|
||||||
|
// 搜索列表页
|
||||||
|
applist_grid = new FlowLayout;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::initConfig()
|
void Widget::initConfig()
|
||||||
@ -722,26 +727,65 @@ void Widget::searchApp(QString text)
|
|||||||
// ui->webView->setUrl(QUrl("http://www.baidu.com/s?wd="+text));//这东西对接百度
|
// ui->webView->setUrl(QUrl("http://www.baidu.com/s?wd="+text));//这东西对接百度
|
||||||
// ui->stackedWidget->setCurrentIndex(0);
|
// ui->stackedWidget->setCurrentIndex(0);
|
||||||
// 关键字搜索处理
|
// 关键字搜索处理
|
||||||
httpClient->get("http://192.168.0.102:8000/appinfo/search")
|
httpClient->get("http://192.168.0.103:8000/appinfo/search")
|
||||||
.header("content-type", "application/json")
|
.header("content-type", "application/json")
|
||||||
.queryParam("keyword", text)
|
.queryParam("keyword", text)
|
||||||
.onResponse([](QByteArray result) {
|
.onResponse([this](QByteArray result) {
|
||||||
auto json = QJsonDocument::fromJson(result).array();
|
auto json = QJsonDocument::fromJson(result).array();
|
||||||
if (json.empty()) {
|
if (json.empty()) {
|
||||||
qDebug() << "搜索不到相关应用!";
|
qDebug() << "搜索不到相关应用!";
|
||||||
|
sendNotification(tr("Not found relative App!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO 展示应用
|
// TODO 展示应用
|
||||||
|
qDebug() << json;
|
||||||
|
displaySearchApp(json);
|
||||||
|
|
||||||
})
|
})
|
||||||
.onError([](QString errorStr) {
|
.onError([](QString errorStr) {
|
||||||
qDebug() << "请求出错:" << errorStr;
|
qDebug() << "请求出错:" << errorStr;
|
||||||
})
|
})
|
||||||
.timeout(10 * 1000)
|
.timeout(10 * 1000)
|
||||||
.exec();
|
.exec();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief 展示搜索的APP信息
|
||||||
|
*/
|
||||||
|
void Widget::displaySearchApp(QJsonArray array)
|
||||||
|
{
|
||||||
|
ui->stackedWidget->setCurrentIndex(4);
|
||||||
|
|
||||||
|
// 清除原有的搜索结果
|
||||||
|
QLayoutItem *item;
|
||||||
|
while ((item = applist_grid->takeAt(0)) != nullptr) {
|
||||||
|
item->widget()->disconnect();
|
||||||
|
delete item->widget();
|
||||||
|
delete item;
|
||||||
|
}
|
||||||
|
item = nullptr;
|
||||||
|
|
||||||
|
for(int i = 0; i < array.size(); i++)
|
||||||
|
{
|
||||||
|
QJsonObject appInfo = array.at(i).toObject();
|
||||||
|
AppItem *appItem = new AppItem(this);
|
||||||
|
QString url = QString("spk://store/%1/%2")
|
||||||
|
.arg(appInfo["category_slug"].toString())
|
||||||
|
.arg(appInfo["pkgname"].toString());
|
||||||
|
appItem->setTitle(appInfo["name"].toString());
|
||||||
|
appItem->setDescription(appInfo["more"].toString());
|
||||||
|
appItem->setIcon(appInfo["icon"].toString());
|
||||||
|
appItem->setUrl(url);
|
||||||
|
applist_grid->addWidget(appItem);
|
||||||
|
qDebug() << "应用链接为:" << url;
|
||||||
|
connect(appItem, &AppItem::clicked, this, &Widget::openUrl);
|
||||||
|
}
|
||||||
|
ui->applist_scrollarea->widget()->setLayout(applist_grid);
|
||||||
|
qDebug() << "显示结果了吗????喵喵喵";
|
||||||
|
}
|
||||||
|
|
||||||
void Widget::httpReadyRead()
|
void Widget::httpReadyRead()
|
||||||
{
|
{
|
||||||
if(file)
|
if(file)
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <QFutureWatcher>
|
#include <QFutureWatcher>
|
||||||
#include <QToolButton>
|
#include <QToolButton>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QJsonArray>
|
||||||
|
|
||||||
#include <QFontDatabase>
|
#include <QFontDatabase>
|
||||||
|
|
||||||
@ -36,6 +37,8 @@ class Widget;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
class FlowLayout;
|
||||||
|
|
||||||
namespace AeaQt {
|
namespace AeaQt {
|
||||||
class HttpClient;
|
class HttpClient;
|
||||||
}
|
}
|
||||||
@ -76,6 +79,8 @@ private slots:
|
|||||||
void sltAppinfoScreenshot(QPixmap *picture, int index);
|
void sltAppinfoScreenshot(QPixmap *picture, int index);
|
||||||
void sltAppinfoFinish();
|
void sltAppinfoFinish();
|
||||||
|
|
||||||
|
void displaySearchApp(QJsonArray array); // 展示搜索的APP信息
|
||||||
|
|
||||||
void on_pushButton_download_clicked();
|
void on_pushButton_download_clicked();
|
||||||
void on_pushButton_return_clicked();
|
void on_pushButton_return_clicked();
|
||||||
void on_comboBox_server_currentIndexChanged(const QString &arg1);
|
void on_comboBox_server_currentIndexChanged(const QString &arg1);
|
||||||
@ -149,6 +154,7 @@ private:
|
|||||||
SpkAppInfoLoaderThread appinfoLoadThread;
|
SpkAppInfoLoaderThread appinfoLoadThread;
|
||||||
|
|
||||||
AeaQt::HttpClient *httpClient;
|
AeaQt::HttpClient *httpClient;
|
||||||
|
FlowLayout *applist_grid;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // WIDGET_H
|
#endif // WIDGET_H
|
||||||
|
630
src/widget.ui
630
src/widget.ui
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1053</width>
|
<width>1053</width>
|
||||||
<height>697</height>
|
<height>711</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -51,6 +51,291 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="DTitlebar" name="titlebar" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" rowspan="4">
|
||||||
|
<widget class="QWidget" name="widget_menuList" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>150</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>11</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="accessibleDescription">
|
||||||
|
<string>background-color:#FFFFFF</string>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true"/>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_5">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>5</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<spacer name="verticalSpacer_7">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="5" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_music">
|
||||||
|
<property name="text">
|
||||||
|
<string>Music</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="7" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_photo">
|
||||||
|
<property name="text">
|
||||||
|
<string>Graphics</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="11" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_dev">
|
||||||
|
<property name="text">
|
||||||
|
<string>Development</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0" colspan="2">
|
||||||
|
<widget class="QLabel" name="icon">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>36</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>36</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>icon</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="5">
|
||||||
|
<spacer name="horizontalSpacer_8">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>3</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<spacer name="horizontalSpacer_9">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="12" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_system">
|
||||||
|
<property name="text">
|
||||||
|
<string>Tools</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="10" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_read">
|
||||||
|
<property name="text">
|
||||||
|
<string>Reading</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="9" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_office">
|
||||||
|
<property name="text">
|
||||||
|
<string>Office</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QPushButton" name="pushButton_refresh">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Reload</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../assets/icons.qrc">
|
||||||
|
<normaloff>:/icons/icons/refresh-page.svg</normaloff>:/icons/icons/refresh-page.svg</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_chat">
|
||||||
|
<property name="text">
|
||||||
|
<string>Chat</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="4">
|
||||||
|
<widget class="QPushButton" name="pushButton_return">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>16777215</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Back to category</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../assets/icons.qrc">
|
||||||
|
<normaloff>:/icons/icons/category_active.svg</normaloff>:/icons/icons/category_active.svg</iconset>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="17" column="0">
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="13" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_theme">
|
||||||
|
<property name="text">
|
||||||
|
<string>Beautify</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="3" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_network">
|
||||||
|
<property name="text">
|
||||||
|
<string>Network</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="8" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_game">
|
||||||
|
<property name="text">
|
||||||
|
<string>Games</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="14" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_other">
|
||||||
|
<property name="text">
|
||||||
|
<string>Others</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_main">
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">font: 11pt "Zeniq";</string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Home</string>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="16" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_download">
|
||||||
|
<property name="text">
|
||||||
|
<string>Download</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0" colspan="6">
|
||||||
|
<widget class="QPushButton" name="menu_video">
|
||||||
|
<property name="text">
|
||||||
|
<string>Video</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="15" column="0" colspan="6">
|
||||||
|
<widget class="QWidget" name="line1_widget" native="true">
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>1</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>4</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color:#808080</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="2" column="1">
|
<item row="2" column="1">
|
||||||
<widget class="QStackedWidget" name="stackedWidget">
|
<widget class="QStackedWidget" name="stackedWidget">
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@ -204,7 +489,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>886</width>
|
<width>655</width>
|
||||||
<height>865</height>
|
<height>865</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -699,7 +984,7 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>840</width>
|
<width>609</width>
|
||||||
<height>318</height>
|
<height>318</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
@ -829,8 +1114,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>886</width>
|
<width>808</width>
|
||||||
<height>921</height>
|
<height>941</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_23">
|
<layout class="QVBoxLayout" name="verticalLayout_23">
|
||||||
@ -1102,346 +1387,27 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="applist_page">
|
<widget class="QWidget" name="applist_page">
|
||||||
<widget class="QStackedWidget" name="applist_stack">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<property name="geometry">
|
<item>
|
||||||
<rect>
|
<widget class="QScrollArea" name="applist_scrollarea">
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>903</width>
|
|
||||||
<height>667</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="currentIndex">
|
|
||||||
<number>1</number>
|
|
||||||
</property>
|
|
||||||
<widget class="QWidget" name="tips_page">
|
|
||||||
<widget class="QLabel" name="listload_tips">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>250</x>
|
|
||||||
<y>210</y>
|
|
||||||
<width>231</width>
|
|
||||||
<height>121</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Not found applist info!</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
<widget class="QWidget" name="widgets_page">
|
|
||||||
<widget class="QScrollArea" name="widgets_scrollarea">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>903</width>
|
|
||||||
<height>667</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="widgetResizable">
|
<property name="widgetResizable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="scrollAreaWidgetContents_4">
|
<widget class="QWidget" name="applist_scrollAreaWidget">
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>901</width>
|
<width>879</width>
|
||||||
<height>665</height>
|
<height>657</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="DTitlebar" name="titlebar" native="true">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" rowspan="4">
|
|
||||||
<widget class="QWidget" name="widget_menuList" native="true">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>150</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>150</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<pointsize>11</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="accessibleDescription">
|
|
||||||
<string>background-color:#FFFFFF</string>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true"/>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="gridLayout_5">
|
|
||||||
<property name="leftMargin">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<property name="rightMargin">
|
|
||||||
<number>5</number>
|
|
||||||
</property>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<spacer name="verticalSpacer_7">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="5" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_music">
|
|
||||||
<property name="text">
|
|
||||||
<string>Music</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="7" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_photo">
|
|
||||||
<property name="text">
|
|
||||||
<string>Graphics</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="11" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_dev">
|
|
||||||
<property name="text">
|
|
||||||
<string>Development</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0" colspan="2">
|
|
||||||
<widget class="QLabel" name="icon">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>36</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>36</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>icon</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="5">
|
|
||||||
<spacer name="horizontalSpacer_8">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>3</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<spacer name="horizontalSpacer_9">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="12" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_system">
|
|
||||||
<property name="text">
|
|
||||||
<string>Tools</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="10" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_read">
|
|
||||||
<property name="text">
|
|
||||||
<string>Reading</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_office">
|
|
||||||
<property name="text">
|
|
||||||
<string>Office</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="3">
|
|
||||||
<widget class="QPushButton" name="pushButton_refresh">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Reload</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="icons.qrc">
|
|
||||||
<normaloff>:/icons/icons/refresh-page.svg</normaloff>:/icons/icons/refresh-page.svg</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="4" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_chat">
|
|
||||||
<property name="text">
|
|
||||||
<string>Chat</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="4">
|
|
||||||
<widget class="QPushButton" name="pushButton_return">
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>40</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Back to category</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string/>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="icons.qrc">
|
|
||||||
<normaloff>:/icons/icons/category_active.svg</normaloff>:/icons/icons/category_active.svg</iconset>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="17" column="0">
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
<item row="13" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_theme">
|
|
||||||
<property name="text">
|
|
||||||
<string>Beautify</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_network">
|
|
||||||
<property name="text">
|
|
||||||
<string>Network</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="8" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_game">
|
|
||||||
<property name="text">
|
|
||||||
<string>Games</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="14" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_other">
|
|
||||||
<property name="text">
|
|
||||||
<string>Others</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_main">
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">font: 11pt "Zeniq";</string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Home</string>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="16" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_download">
|
|
||||||
<property name="text">
|
|
||||||
<string>Download</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="6" column="0" colspan="6">
|
|
||||||
<widget class="QPushButton" name="menu_video">
|
|
||||||
<property name="text">
|
|
||||||
<string>Video</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="15" column="0" colspan="6">
|
|
||||||
<widget class="QWidget" name="line1_widget" native="true">
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>1</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>4</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
|
||||||
<string notr="true">background-color:#808080</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
@ -1471,7 +1437,7 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="icons.qrc"/>
|
<include location="../assets/icons.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user