mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-06-23 06:33:49 +08:00
添加API调用接口,添加读取分类,添加SpkUtils实用函数
使用了SpkSidebarTree子类实现对TreeWidget的特殊要求:不能取消选择,不能拖拽选择。 API调用接口暂时写死。API会获取 配置文件已添加但暂不使用。
This commit is contained in:
+7
-3
@@ -19,7 +19,7 @@ SpkMsgBox::SpkMsgBox(QWidget *parent)
|
||||
}
|
||||
|
||||
int SpkMsgBox::StaticExec(QString msg, QString title, QMessageBox::Icon icon,
|
||||
QMessageBox::StandardButtons buttons, QString extra)
|
||||
QMessageBox::StandardButtons buttons, QString extra, bool expanded)
|
||||
{
|
||||
SpkMsgBox *b = new SpkMsgBox(SpkStore::Instance->GetRootWindow());
|
||||
QWidget *wMsgWidget = new QWidget;
|
||||
@@ -98,8 +98,12 @@ int SpkMsgBox::StaticExec(QString msg, QString title, QMessageBox::Icon icon,
|
||||
|
||||
b->AddSpacing(3);
|
||||
AddButtons(b, buttons);
|
||||
if(hasextra) // Keep conventional buttons centered
|
||||
b->mBtnLay->addStretch();
|
||||
if(hasextra)
|
||||
{
|
||||
b->mBtnLay->addStretch(); // Keep conventional buttons centered
|
||||
if(expanded)
|
||||
emit wExpandBtn->clicked();
|
||||
}
|
||||
InitialHeight = b->minimumSizeHint().height();
|
||||
auto pos = (SpkUi::PrimaryScreenSize - b->sizeHint()) / 2;
|
||||
b->move(pos.width(), pos.height());
|
||||
|
||||
Reference in New Issue
Block a user