wxQt: Rename wxMDIParentFrame::Layout enum type to wxMDIParentFrame::Kind

Fixes #25742
This commit is contained in:
ali kettab
2025-11-11 22:38:34 +01:00
parent 205425c669
commit 06a4a1d53c
2 changed files with 11 additions and 11 deletions
+4 -4
View File
@@ -36,13 +36,13 @@ public:
QMdiArea* GetQtMdiArea() const;
enum class Layout
enum class Kind
{
MDI,
Tabbed
};
void QtSetPreferredDILayout(Layout layout);
void QtSetPreferredDILayout(Kind layout);
// override/implement base class [pure] virtual methods
// ----------------------------------------------------
@@ -50,7 +50,7 @@ public:
// The default is to return what wxMDIParentFrame::IsTDI() is supposed to
// return under the target platform. i.e. wxMSW and wxOSX return false,
// while wxGTK returns true. Use QtSetPreferredDILayout() to change that.
static bool IsTDI() { return ms_layout == Layout::Tabbed; }
static bool IsTDI() { return ms_layout == Kind::Tabbed; }
virtual void Cascade() override;
virtual void Tile(wxOrientation orient = wxHORIZONTAL) override;
@@ -86,7 +86,7 @@ private:
// TDI=true, MDI=false
// Default to false under Windows, true otherwise.
static Layout ms_layout;
static Kind ms_layout;
wxDECLARE_DYNAMIC_CLASS(wxMDIParentFrame);
};
+7 -7
View File
@@ -27,11 +27,11 @@ static QMdiSubWindow* gs_qtActiveSubWindow = nullptr;
}
/*static*/
wxMDIParentFrame::Layout wxMDIParentFrame::ms_layout =
wxMDIParentFrame::Kind wxMDIParentFrame::ms_layout =
#if defined(__WINDOWS__)
Layout::MDI;
Kind::MDI;
#else // !__WINDOWS__
Layout::Tabbed;
Kind::Tabbed;
#endif // __WINDOWS__
// Central widget helper (provides an area in which MDI windows are displayed):
@@ -89,7 +89,7 @@ bool wxMDIParentFrame::Create(wxWindow *parent,
return true;
}
void wxMDIParentFrame::QtSetPreferredDILayout(Layout layout)
void wxMDIParentFrame::QtSetPreferredDILayout(Kind layout)
{
ms_layout = layout;
@@ -97,11 +97,11 @@ void wxMDIParentFrame::QtSetPreferredDILayout(Layout layout)
switch ( layout )
{
case Layout::MDI:
case Kind::MDI:
viewMode = QMdiArea::SubWindowView;
break;
case Layout::Tabbed:
case Kind::Tabbed:
viewMode = QMdiArea::TabbedView;
break;
@@ -245,7 +245,7 @@ void wxMDIParentFrame::AddWindowMenu()
// Qt offers only "Tile" without specifying any direction, so just
// reuse one of the predifined ids.
if ( ms_layout == Layout::MDI )
if ( ms_layout == Kind::MDI )
{
// Qt offers only "Tile" without specifying any direction, so just
// reuse one of the predifined ids.