mirror of
https://gitee.com/spark-store-project/spark-store
synced 2025-12-14 04:42:03 +08:00
进度更新
This commit is contained in:
@@ -23,7 +23,7 @@ class SpkTitleBarDefaultButton : public QPushButton
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SpkTitleBarDefaultButton();
|
||||
SpkTitleBarDefaultButton(QWidget* parent = nullptr);
|
||||
enum OperationButton { Minimize = 1, MaximizeRestore = 2, Close = 4, Restore = 3 };
|
||||
void SetRole(OperationButton);
|
||||
constexpr static int ButtonWidth = 60;
|
||||
@@ -46,23 +46,22 @@ class SpkTitleBar : public QWidget
|
||||
using OperationButton = SpkTitleBarDefaultButton::OperationButton;
|
||||
void SetOperationButton(OperationButton);
|
||||
|
||||
void SetIcon(QPixmap &p) { mIcon.setPixmap(p); };
|
||||
void SetTitle(QString t) { mTitle.setText(t); };
|
||||
QString GetTitle() { return mTitle.text(); };
|
||||
void SetUseIcon(bool t) { mIcon.setVisible(t); };
|
||||
void SetLinkedWindow(QMainWindow *w) { mLinkedWindow = w; };
|
||||
void SetIcon(QPixmap &p) { mIcon->setPixmap(p); }
|
||||
void SetTitle(QString t) { mTitle->setText(t); }
|
||||
QString GetTitle() { return mTitle->text(); }
|
||||
void SetUseIcon(bool t) { mIcon->setVisible(t); }
|
||||
void SetLinkedWindow(QMainWindow *w) { mLinkedWindow = w; }
|
||||
|
||||
QHBoxLayout &GetLeftUserSpace() { return mUserSpaceL; };
|
||||
QHBoxLayout &GetRightUserSpace() { return mUserSpaceR; };
|
||||
QHBoxLayout *GetUserSpace() { return mUserSpace; }
|
||||
protected:
|
||||
bool event(QEvent*) override;
|
||||
|
||||
private:
|
||||
QLabel mIcon;
|
||||
QLabel mTitle;
|
||||
QLabel *mIcon;
|
||||
QLabel *mTitle;
|
||||
QMainWindow *mLinkedWindow;
|
||||
QHBoxLayout mMainLayout, mUserSpaceL, mUserSpaceR;
|
||||
SpkTitleBarDefaultButton mBtnMin, mBtnMaxRestore, mBtnClose;
|
||||
QHBoxLayout *mMainLayout, *mUserSpace, *mBtnGroup;
|
||||
SpkTitleBarDefaultButton *mBtnMin, *mBtnMaxRestore, *mBtnClose;
|
||||
|
||||
private slots:
|
||||
void CloseWindow();
|
||||
|
||||
Reference in New Issue
Block a user