GpgFrontend Project
A Free, Powerful, Easy-to-Use, Compact, Cross-Platform, and Installation-Free OpenPGP(pgp) Crypto Tool.
GeneralDialog.h
1 
29 #pragma once
30 
31 #include "ui/GpgFrontendUI.h"
32 
33 namespace GpgFrontend::UI {
34 
35 class GeneralDialog : public QDialog {
36  public:
41  explicit GeneralDialog(QString name, QWidget* parent = nullptr);
42 
46  ~GeneralDialog() override;
47 
48  protected:
52  void setPosCenterOfScreen();
53 
58  void movePosition2CenterOfParent();
59 
64  [[nodiscard]] auto isRectRestored() -> bool;
65 
70  void showEvent(QShowEvent* event) override;
71 
72  private slots:
76  void slot_restore_settings() noexcept;
77 
81  void slot_save_settings() noexcept;
82 
83  private:
87  void update_rect_cache();
88 
89  QString name_;
90  QRect rect_;
91  QRect parent_rect_;
92  QRect screen_rect_;
93  bool rect_restored_ = false;
94 };
95 } // namespace GpgFrontend::UI
Definition: GeneralDialog.h:35
GeneralDialog(QString name, QWidget *parent=nullptr)
Definition: GeneralDialog.cpp:36
Definition: FileReadTask.cpp:31