GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GeneralMainWindow.h
1 
29 #pragma once
30 
31 #include "ui/GpgFrontendUI.h"
32 
33 namespace GpgFrontend::UI {
34 
38 class GeneralMainWindow : public QMainWindow {
39  public:
44  explicit GeneralMainWindow(QString name, QWidget* parent = nullptr);
45 
49  ~GeneralMainWindow() override;
50 
51  protected:
56  void closeEvent(QCloseEvent* event) override;
57 
61  void setPosCenterOfScreen();
62 
67  void movePosition2CenterOfParent();
68 
69  QSize icon_size_{};
70  int font_size_{};
71  Qt::ToolButtonStyle icon_style_;
72 
73  private slots:
77  void slot_restore_settings() noexcept;
78 
82  void slot_save_settings() noexcept;
83 
88  void update_rect_cache();
89 
90  private:
91  QString name_;
92  QPoint pos_;
93  QSize size_;
94  QRect rect_;
95  QRect screen_rect_;
96  QRect parent_rect_;
97 };
98 } // namespace GpgFrontend::UI
Definition: GeneralMainWindow.h:38
GeneralMainWindow(QString name, QWidget *parent=nullptr)
Definition: GeneralMainWindow.cpp:39
void closeEvent(QCloseEvent *event) override
Definition: GeneralMainWindow.cpp:47
Definition: FileReadTask.cpp:31