添加API调用接口,添加读取分类,添加SpkUtils实用函数

使用了SpkSidebarTree子类实现对TreeWidget的特殊要求:不能取消选择,不能拖拽选择。

API调用接口暂时写死。API会获取

配置文件已添加但暂不使用。
This commit is contained in:
RigoLigoRLC
2021-07-17 19:22:31 +08:00
parent 48c9046993
commit e3c43198b9
17 changed files with 317 additions and 110 deletions
+7 -3
View File
@@ -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());