mirror of
https://gitee.com/spark-store-project/spark-web-app-runtime.git
synced 2025-08-22 12:22:20 +08:00
54 lines
1.0 KiB
C++
54 lines
1.0 KiB
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <DMainWindow>
|
|
#include <DAboutDialog>
|
|
#include <DToolButton>
|
|
|
|
#include "widget.h"
|
|
#include "globaldefine.h"
|
|
|
|
DWIDGET_USE_NAMESPACE
|
|
|
|
class MainWindow : public DMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MainWindow(QString szTitle = DEFAULT_TITLE,
|
|
QString szUrl = DEFAULT_URL,
|
|
int nWidth = DEFAULT_WIDTH,
|
|
int nHeight = DEFAULT_HEIGHT,
|
|
bool nFixSize = false,
|
|
bool nHideButtons = false,
|
|
DAboutDialog *dialog = nullptr,
|
|
QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
|
|
void setIcon(QString);
|
|
void fixSize();
|
|
void hideButtons();
|
|
|
|
signals:
|
|
void sigQuit();
|
|
|
|
private:
|
|
Widget *m_widget;
|
|
DAboutDialog *m_dialog;
|
|
|
|
DToolButton *btnBackward;
|
|
DToolButton *btnForward;
|
|
DToolButton *btnRefresh;
|
|
|
|
QMenu *m_menu;
|
|
QAction *m_fixSize;
|
|
QAction *m_hideButtons;
|
|
|
|
int m_width, m_height;
|
|
|
|
void closeEvent(QCloseEvent *event);
|
|
|
|
};
|
|
|
|
#endif // MAINWINDOW_H
|