mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
添加了首页的雏形,和一个关于如何添加页面的文档
This commit is contained in:
25
inc/page/spkpagehome.h
Normal file
25
inc/page/spkpagehome.h
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QVBoxLayout>
|
||||
#include "page/spkpagebase.h"
|
||||
#include "ui_homepage.h"
|
||||
|
||||
namespace SpkUi
|
||||
{
|
||||
class SpkPageHome : public SpkPageBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SpkPageHome(QWidget *parent = nullptr);
|
||||
~SpkPageHome() { }
|
||||
|
||||
Ui::SpkHomepage *ui;
|
||||
|
||||
private slots:
|
||||
void LinkActivated(QString);
|
||||
|
||||
private:
|
||||
void SetupUi();
|
||||
};
|
||||
}
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "spkfocuslineedit.h"
|
||||
#include "spkiconbutton.h"
|
||||
#include "page/spkpageuitest.h"
|
||||
#include "page/spkpagehome.h"
|
||||
#include "page/spkpageapplist.h"
|
||||
#include "page/spkpageappdetails.h"
|
||||
#include "page/spkpagedownloads.h"
|
||||
@@ -29,6 +30,7 @@ namespace SpkUi
|
||||
enum SpkStackedPages
|
||||
{
|
||||
PgInvalid = -1,
|
||||
PgHomepage,
|
||||
PgAppList,
|
||||
PgAppDetails,
|
||||
PgDownloads,
|
||||
@@ -170,7 +172,8 @@ namespace SpkUi
|
||||
QMap<int, QTreeWidgetItem> *CategoryItemMap;
|
||||
SpkSidebarSelector *SidebarMgr;
|
||||
|
||||
QTreeWidgetItem *CategoryParentItem,
|
||||
QTreeWidgetItem *HomepageItem,
|
||||
*CategoryParentItem,
|
||||
*AppDetailsItem,
|
||||
*DownloadsItem,
|
||||
*UiTestItem;
|
||||
@@ -182,6 +185,8 @@ namespace SpkUi
|
||||
|
||||
//Pages
|
||||
SpkPageUiTest *PageQssTest;
|
||||
|
||||
SpkPageHome *PageHome;
|
||||
SpkPageAppList *PageAppList;
|
||||
SpkPageAppDetails *PageAppDetails;
|
||||
SpkPageDownloads *PageDownloads;
|
||||
|
||||
17
inc/spknotifydot.h
Normal file
17
inc/spknotifydot.h
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QLabel>
|
||||
|
||||
class SpkNotifyDot : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
SpkNotifyDot(QWidget *parent = nullptr);
|
||||
~SpkNotifyDot() {}
|
||||
|
||||
protected:
|
||||
virtual void paintEvent(QPaintEvent *) override;
|
||||
// virtual int widthForHeight(int h) override;
|
||||
};
|
||||
Reference in New Issue
Block a user