mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
SpkPageQssTest重命名为SpkPageUiTest
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
|
||||
#include <QEventLoop>
|
||||
#include "spkdialog.h"
|
||||
#include <QEventLoop>
|
||||
|
||||
SpkDialog::SpkDialog(QWidget *parent) :
|
||||
SpkWindow(parent, Qt::Dialog)
|
||||
SpkDialog::SpkDialog(QWidget *parent) : SpkWindow(parent, Qt::Dialog)
|
||||
{
|
||||
mDialogWidget = new QWidget;
|
||||
mMainVLay = new QVBoxLayout(mDialogWidget);
|
||||
@@ -30,7 +29,7 @@ SpkDialog::~SpkDialog()
|
||||
auto itp = mParentsList.begin();
|
||||
for(auto itw = mWidgetsList.begin(); itw != mWidgetsList.end(); itw++)
|
||||
{
|
||||
(*itw)->setParent(*(itp++)); // We shall never take the ownership of these widgets
|
||||
(*itw)->setParent(*(itp++));// We shall never take the ownership of these widgets
|
||||
}
|
||||
delete mDialogWidget;
|
||||
}
|
||||
@@ -103,3 +102,8 @@ void SpkDialog::ForceClose()
|
||||
disconnect(this, &SpkDialog::CloseWindow, this, &QMainWindow::close);
|
||||
emit ExitEventLoop(-1);
|
||||
}
|
||||
|
||||
void SpkDialog::SetMargin(int left, int top, int right, int bottom)
|
||||
{
|
||||
mWidgetsVLay->setContentsMargins(left, top, right, bottom);
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ SpkUi::SpkMainWidget::SpkMainWidget(QWidget *parent) : QFrame(parent)
|
||||
HorizontalDivide->addLayout(VLayMain);
|
||||
|
||||
// Initialize pages
|
||||
PageQssTest = new SpkUi::SpkPageQssTest(this);
|
||||
PageQssTest = new SpkUi::SpkPageUiTest(this);
|
||||
Pager->addWidget(PageQssTest);
|
||||
|
||||
setLayout(HorizontalDivide);
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include "spkpageqsstest.h"
|
||||
#include "spkpageuitest.h"
|
||||
#include "spkpopup.h"
|
||||
#include "spkui_general.h"
|
||||
|
||||
SpkUi::SpkPageQssTest::SpkPageQssTest(QWidget *parent) : QSplitter(parent)
|
||||
SpkUi::SpkPageUiTest::SpkPageUiTest(QWidget *parent) : QSplitter(parent)
|
||||
{
|
||||
setObjectName("spk_pg_qsstest");
|
||||
|
||||
@@ -15,12 +15,12 @@ SpkUi::SpkPageQssTest::SpkPageQssTest(QWidget *parent) : QSplitter(parent)
|
||||
BtnApply = new QPushButton(this);
|
||||
BtnApply->setObjectName("spk_pg_qsstest_btnapply");
|
||||
BtnApply->setText("Apply");
|
||||
connect(BtnApply, &QPushButton::pressed, this, &SpkPageQssTest::SetStylesheet);
|
||||
connect(BtnApply, &QPushButton::pressed, this, &SpkPageUiTest::SetStylesheet);
|
||||
|
||||
BtnFetch = new QPushButton(this);
|
||||
BtnFetch->setObjectName("spk_pg_qsstest_btnfetch");
|
||||
BtnFetch->setText("Fetch Stylesheet");
|
||||
connect(BtnFetch, &QPushButton::pressed, this, &SpkPageQssTest::FetchStylesheet);
|
||||
connect(BtnFetch, &QPushButton::pressed, this, &SpkPageUiTest::FetchStylesheet);
|
||||
|
||||
HLayInputBtns = new QHBoxLayout;
|
||||
HLayInputBtns->setObjectName("spk_pg_qsstest_hlay_inputbtns");
|
||||
@@ -49,7 +49,7 @@ SpkUi::SpkPageQssTest::SpkPageQssTest(QWidget *parent) : QSplitter(parent)
|
||||
|
||||
ShowPopup = new QPushButton(this);
|
||||
ShowPopup->setText("Show Popup");
|
||||
connect(ShowPopup, &QPushButton::clicked, this, &SpkPageQssTest::ShowPopupSlot);
|
||||
connect(ShowPopup, &QPushButton::clicked, this, &SpkPageUiTest::ShowPopupSlot);
|
||||
|
||||
SlideV = new QSlider(this);
|
||||
SlideV->setObjectName("spk_pg_qsstest_slider_v");
|
||||
@@ -104,17 +104,17 @@ SpkUi::SpkPageQssTest::SpkPageQssTest(QWidget *parent) : QSplitter(parent)
|
||||
addWidget(WidR);
|
||||
}
|
||||
|
||||
void SpkUi::SpkPageQssTest::SetStylesheet()
|
||||
void SpkUi::SpkPageUiTest::SetStylesheet()
|
||||
{
|
||||
qApp->setStyleSheet(TextStylesheet->toPlainText());
|
||||
}
|
||||
|
||||
void SpkUi::SpkPageQssTest::FetchStylesheet()
|
||||
void SpkUi::SpkPageUiTest::FetchStylesheet()
|
||||
{
|
||||
TextStylesheet->setPlainText(SpkUi::CurrentStylesheet);
|
||||
}
|
||||
|
||||
void SpkUi::SpkPageQssTest::ShowPopupSlot()
|
||||
void SpkUi::SpkPageUiTest::ShowPopupSlot()
|
||||
{
|
||||
SpkUi::Popup->Show(PopupText->text());
|
||||
}
|
||||
Reference in New Issue
Block a user