QT-CART
This commit is contained in:
1 parent
e429161a89
commit
0c55b8f1aa
134 files changed
+6071
-5801
No files matched your search
@@ -0,0 +1,56 @@
|
||||
#ifndef PAGEWELCOME_H
|
||||
#define PAGEWELCOME_H
|
||||
|
||||
#include <QWidget>
|
||||
|
||||
class QPropertyAnimation;
|
||||
class QShowEvent;
|
||||
class QHideEvent;
|
||||
class QResizeEvent;
|
||||
|
||||
namespace Ui {
|
||||
class PageWelcome;
|
||||
}
|
||||
|
||||
class PageWelcome : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit PageWelcome(QWidget *parent = nullptr);
|
||||
~PageWelcome();
|
||||
|
||||
signals:
|
||||
void startClicked();
|
||||
void startRequested();
|
||||
|
||||
protected:
|
||||
void showEvent(QShowEvent *e) override;
|
||||
void hideEvent(QHideEvent *e) override;
|
||||
void resizeEvent(QResizeEvent *e) override;
|
||||
|
||||
private slots:
|
||||
void onStartClicked();
|
||||
|
||||
private:
|
||||
void loadPixmapsOnce();
|
||||
void centerStartImage(); // ✅ 기존: start_image만 가운데
|
||||
void centerWelcomeWidgets(); // ✅ 추가: 텍스트/버튼도 가운데
|
||||
void resetWelcome();
|
||||
|
||||
private:
|
||||
Ui::PageWelcome *ui;
|
||||
|
||||
bool m_leaving = false;
|
||||
bool m_pixLoaded = false;
|
||||
|
||||
// ✅ 각 위젯의 "기본 Y"를 기억해두고 X만 중앙정렬
|
||||
int m_baseYStartImage = -1;
|
||||
int m_baseYTitle = -1; // qcart_text
|
||||
int m_baseYStartText = -1; // start_text
|
||||
int m_baseYStartBtn = -1; // start_button
|
||||
|
||||
QPropertyAnimation *m_anim = nullptr;
|
||||
};
|
||||
|
||||
#endif // PAGEWELCOME_H
|
||||
Reference in new issue
Block a user