Minor tidying

This commit is contained in:
Sergio Martins
2020-09-18 17:48:31 +01:00
parent 890e750c23
commit d28e61f412
2 changed files with 11 additions and 13 deletions

View File

@@ -541,7 +541,7 @@ bool Frame::isInFloatingWindow() const
bool Frame::isInMainWindow() const
{
return m_dropArea && m_dropArea->isInMainWindow();
return mainWindow() != nullptr;
}
bool Frame::event(QEvent *e)

View File

@@ -112,8 +112,12 @@ public:
QString title() const;
QIcon icon() const;
const QVector<DockWidgetBase *> dockWidgets() const;
void setDropArea(DropArea *);
///@brief Returns the drop area this Frame is in.
DropArea *dropArea() const;
bool isTheOnlyFrame() const;
/**
@@ -136,13 +140,6 @@ public:
*/
bool isInMainWindow() const;
/**
* @brief Returns the main window this frame is in.
* nullptr if not inside a main window.
*/
MainWindowBase *mainWindow() const;
/**
* @brief returns if this widget is the central frame
* MainWindow supports a mode where the middle frame is persistent even if no dock widget is there.
@@ -162,14 +159,18 @@ public:
*/
bool alwaysShowsTabs() const { return m_options & FrameOption_AlwaysShowsTabs; }
/// @brief returns whether the dockwidget @p w is inside this frame
bool contains(DockWidgetBase *w) const;
///@brief returns the FloatingWindow this frame is in, if any
FloatingWindow *floatingWindow() const;
/**
* @brief Returns the main window this frame is in.
* nullptr if not inside a main window.
*/
MainWindowBase *mainWindow() const;
/**
* @brief Puts the Frame back in its previous main window position
*
@@ -228,9 +229,6 @@ public:
*/
virtual QRect dragRect() const;
///@brief Returns the drop area this Frame is in.
DropArea *dropArea() const;
Q_SIGNALS:
void currentDockWidgetChanged(KDDockWidgets::DockWidgetBase *);
void numDockWidgetsChanged();