Allow to reset dockwidget settings/margins

* changed name to object name
* reset to defaults possible
This commit is contained in:
Klaus Basan
2016-06-20 01:07:33 +02:00
parent 30b9900ea3
commit 44bfcc2d9c
4 changed files with 73 additions and 29 deletions

View File

@@ -120,6 +120,9 @@ namespace BlackGui
//! Remember widget state
void saveToSettings();
//! Reset margin settings
void resetSettings();
//! Set title and internally keep a backup
void setWindowTitle(const QString &title);
@@ -140,6 +143,9 @@ namespace BlackGui
//! Constructor
CDockWidget(bool allowStatusBar, QWidget *parent = nullptr);
//! Set margins from settings
void setMargins();
//! Margins when window is floating
void setMarginsWhenFloating(const QMargins &margins);
@@ -223,7 +229,6 @@ namespace BlackGui
bool m_allowStatusBar = true;
bool m_windowTitleWhenDocked = true;
bool m_wasAlreadyFloating = false;
bool m_resetedFloating = false;
bool m_selected = false; //!< selected when tabbed
bool m_dockWidgetVisible = false; //!< logical visible, not to be confused with QDockWidget::isVisible()
bool m_wasFrameless = false; //!< frameless when last floating