mirror of
https://github.com/wxWidgets/wxWidgets.git
synced 2026-09-28 15:50:17 +08:00
wxQt: Rename wxMDIParentFrame::Layout enum type to wxMDIParentFrame::Kind
Fixes #25742
This commit is contained in:
+4
-4
@@ -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
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user