aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/GeneralDialog.h
diff options
context:
space:
mode:
authorSaturn&Eric <[email protected]>2023-07-14 15:35:39 +0000
committerGitHub <[email protected]>2023-07-14 15:35:39 +0000
commit9cee8cf8e3cce9af62549f824823049fdac0276f (patch)
treed2cb1899825cd12b814b4a1fa1097dd858137707 /src/ui/dialog/GeneralDialog.h
parentMerge pull request #108 from saturneric/dev/2.1.0/main (diff)
parentfix: slove border issues at GernalDialog (diff)
downloadGpgFrontend-9cee8cf8e3cce9af62549f824823049fdac0276f.tar.gz
GpgFrontend-9cee8cf8e3cce9af62549f824823049fdac0276f.zip
Merge pull request #109 from saturneric/dev/2.1.0/main
Develop 2.1.1.6
Diffstat (limited to 'src/ui/dialog/GeneralDialog.h')
-rw-r--r--src/ui/dialog/GeneralDialog.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/ui/dialog/GeneralDialog.h b/src/ui/dialog/GeneralDialog.h
index 41018105..dc42fb6b 100644
--- a/src/ui/dialog/GeneralDialog.h
+++ b/src/ui/dialog/GeneralDialog.h
@@ -57,6 +57,18 @@ class GeneralDialog : public QDialog {
*/
void movePosition2CenterOfParent();
+ /**
+ * @brief
+ *
+ */
+ [[nodiscard]] bool isRectRestored();
+
+ /**
+ * @brief
+ *
+ */
+ void showEvent(QShowEvent* event) override;
+
private slots:
/**
*
@@ -69,11 +81,16 @@ class GeneralDialog : public QDialog {
void slot_save_settings() noexcept;
private:
+ /**
+ *
+ */
+ void update_rect_cache();
+
std::string name_; ///<
- QPoint pos_; ///<
- QSize size_; ///<
- QPoint parent_pos_;
- QSize parent_size_;
+ QRect rect_;
+ QRect parent_rect_;
+ QRect screen_rect_;
+ bool rect_restored_ = false;
};
} // namespace GpgFrontend::UI