#pragma once

#include "ElaWindow.h"
#include "UI/CBTableView.h"
#include <QMainWindow>
#include <QSystemTrayIcon>

class MainWindow : public ElaWindow {
    Q_OBJECT
    /* F */
public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    void initWindow();
    void createActions();
    void createTrayIcon();
    void setIcon();

    CBTableView *_tablePage{nullptr};

    // 图标
    QIcon *icon;

    // 系统托盘选项
    QAction *minimizeAction;
    QAction *maximizeAction;
    QAction *restoreAction;
    QAction *quitAction;
    // 系统托盘与菜单
    QSystemTrayIcon *trayIcon;
    QMenu           *trayMenu;

protected:
};
