Additional Qt keyword conversion. (#299)

This comit is an addtion to pull request #295. Not all Qt keywords were included.

Co-authored-by: Walter Bormans <walter.bormans@paradoxcat.com>
This commit is contained in:
Walter Bormans 2021-01-22 06:18:34 +01:00 committed by GitHub
parent b6b4c626e8
commit 13853573ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 66 additions and 66 deletions

View File

@ -180,11 +180,11 @@ void CDockAreaTabBar::setCurrentIndex(int index)
return;
}
emit currentChanging(index);
Q_EMIT currentChanging(index);
d->CurrentIndex = index;
d->updateTabs();
updateGeometry();
emit currentChanged(index);
Q_EMIT currentChanged(index);
}
@ -206,7 +206,7 @@ void CDockAreaTabBar::insertTab(int Index, CDockWidgetTab* Tab)
connect(Tab, SIGNAL(moved(const QPoint&)), this, SLOT(onTabWidgetMoved(const QPoint&)));
connect(Tab, SIGNAL(elidedChanged(bool)), this, SIGNAL(elidedChanged(bool)));
Tab->installEventFilter(this);
emit tabInserted(Index);
Q_EMIT tabInserted(Index);
if (Index <= d->CurrentIndex)
{
setCurrentIndex(d->CurrentIndex + 1);
@ -266,7 +266,7 @@ void CDockAreaTabBar::removeTab(CDockWidgetTab* Tab)
}
}
emit removingTab(RemoveIndex);
Q_EMIT removingTab(RemoveIndex);
d->TabsLayout->removeWidget(Tab);
Tab->disconnect(this);
Tab->removeEventFilter(this);
@ -320,7 +320,7 @@ void CDockAreaTabBar::onTabClicked()
return;
}
setCurrentIndex(index);
emit tabBarClicked(index);
Q_EMIT tabBarClicked(index);
}
@ -409,7 +409,7 @@ void CDockAreaTabBar::onTabWidgetMoved(const QPoint& GlobalPos)
d->TabsLayout->removeWidget(MovingTab);
d->TabsLayout->insertWidget(toIndex, MovingTab);
ADS_PRINT("tabMoved from " << fromIndex << " to " << toIndex);
emit tabMoved(fromIndex, toIndex);
Q_EMIT tabMoved(fromIndex, toIndex);
setCurrentIndex(toIndex);
}
else
@ -432,7 +432,7 @@ void CDockAreaTabBar::closeTab(int Index)
{
return;
}
emit tabCloseRequested(Index);
Q_EMIT tabCloseRequested(Index);
}
@ -449,12 +449,12 @@ bool CDockAreaTabBar::eventFilter(QObject *watched, QEvent *event)
switch (event->type())
{
case QEvent::Hide:
emit tabClosed(d->TabsLayout->indexOf(Tab));
Q_EMIT tabClosed(d->TabsLayout->indexOf(Tab));
updateGeometry();
break;
case QEvent::Show:
emit tabOpened(d->TabsLayout->indexOf(Tab));
Q_EMIT tabOpened(d->TabsLayout->indexOf(Tab));
updateGeometry();
break;

View File

@ -58,7 +58,7 @@ private:
friend struct DockAreaTabBarPrivate;
friend class CDockAreaTitleBar;
private slots:
private Q_SLOTS:
void onTabClicked();
void onTabCloseRequested();
void onCloseOtherTabsRequested();
@ -140,7 +140,7 @@ public:
*/
virtual QSize sizeHint() const override;
public slots:
public Q_SLOTS:
/**
* This property sets the index of the tab bar's visible tab
*/
@ -152,7 +152,7 @@ public slots:
*/
void closeTab(int Index);
signals:
Q_SIGNALS:
/**
* This signal is emitted when the tab bar's current tab is about to be changed. The new
* current has the given index, or -1 if there isn't a new one.

View File

@ -382,7 +382,7 @@ void CDockAreaTitleBar::onTabsMenuActionTriggered(QAction* Action)
{
int Index = Action->data().toInt();
d->TabBar->setCurrentIndex(Index);
emit tabBarClicked(Index);
Q_EMIT tabBarClicked(Index);
}

View File

@ -54,7 +54,7 @@ private:
DockAreaTitleBarPrivate* d; ///< private data (pimpl)
friend struct DockAreaTitleBarPrivate;
private slots:
private Q_SLOTS:
void onTabsMenuAboutToShow();
void onCloseButtonClicked();
void onUndockButtonClicked();
@ -88,7 +88,7 @@ protected:
*/
virtual void contextMenuEvent(QContextMenuEvent *event) override;
public slots:
public Q_SLOTS:
/**
* Call this slot to tell the title bar that it should update the tabs menu
* the next time it is shown.
@ -148,7 +148,7 @@ public:
*/
int indexOf(QWidget *widget) const;
signals:
Q_SIGNALS:
/**
* This signal is emitted if a tab in the tab bar is clicked by the user
* or if the user clicks on a tab item in the title bar tab menu.

View File

@ -378,7 +378,7 @@ CDockAreaWidget::CDockAreaWidget(CDockManager* DockManager, CDockContainerWidget
d->ContentsLayout = new DockAreaLayout(d->Layout);
if (d->DockManager)
{
emit d->DockManager->dockAreaCreated(this);
Q_EMIT d->DockManager->dockAreaCreated(this);
}
}
@ -604,11 +604,11 @@ void CDockAreaWidget::setCurrentIndex(int index)
return;
}
emit currentChanging(index);
Q_EMIT currentChanging(index);
TabBar->setCurrentIndex(index);
d->ContentsLayout->setCurrentIndex(index);
d->ContentsLayout->currentWidget()->show();
emit currentChanged(index);
Q_EMIT currentChanged(index);
}
@ -888,7 +888,7 @@ void CDockAreaWidget::toggleView(bool Open)
{
setVisible(Open);
emit viewToggled(Open);
Q_EMIT viewToggled(Open);
}

View File

@ -67,7 +67,7 @@ private:
friend class CDockManager;
void onDockWidgetFeaturesChanged();
private slots:
private Q_SLOTS:
void onTabCloseRequested(int Index);
/**
@ -138,7 +138,7 @@ protected:
*/
void markTitleBarMenuOutdated();
protected slots:
protected Q_SLOTS:
void toggleView(bool Open);
public:
@ -312,7 +312,7 @@ public:
*/
bool isCentralWidgetArea() const;
public slots:
public Q_SLOTS:
/**
* This activates the tab for the given tab index.
* If the dock widget for the given tab is not visible, the this function
@ -330,7 +330,7 @@ public slots:
*/
void closeOtherAreas();
signals:
Q_SIGNALS:
/**
* This signal is emitted when user clicks on a tab at an index.
*/

View File

@ -284,13 +284,13 @@ public:
void emitDockAreasRemoved()
{
onVisibleDockAreaCountChanged();
emit _this->dockAreasRemoved();
Q_EMIT _this->dockAreasRemoved();
}
void emitDockAreasAdded()
{
onVisibleDockAreaCountChanged();
emit _this->dockAreasAdded();
Q_EMIT _this->dockAreasAdded();
}
/**
@ -341,7 +341,7 @@ public:
CDockAreaWidget* DockArea = qobject_cast<CDockAreaWidget*>(_this->sender());
VisibleDockAreaCount += Visible ? 1 : -1;
onVisibleDockAreaCountChanged();
emit _this->dockAreaViewToggled(DockArea, Visible);
Q_EMIT _this->dockAreaViewToggled(DockArea, Visible);
}
}; // struct DockContainerWidgetPrivate

View File

@ -174,7 +174,7 @@ void DockFocusControllerPrivate::updateDockWidgetFocus(CDockWidget* DockWidget)
ForceFocusChangedSignal = false;
if (DockWidget->isVisible())
{
emit DockManager->focusedDockWidgetChanged(old, DockWidget);
Q_EMIT DockManager->focusedDockWidgetChanged(old, DockWidget);
}
else
{
@ -193,7 +193,7 @@ void CDockFocusController::onDockWidgetVisibilityChanged(bool Visible)
disconnect(Sender, SIGNAL(visibilityChanged(bool)), this, SLOT(onDockWidgetVisibilityChanged(bool)));
if (DockWidget && Visible)
{
emit d->DockManager->focusedDockWidgetChanged(d->OldFocusedDockWidget, DockWidget);
Q_EMIT d->DockManager->focusedDockWidgetChanged(d->OldFocusedDockWidget, DockWidget);
}
}

View File

@ -30,7 +30,7 @@ private:
DockFocusControllerPrivate* d; ///< private data (pimpl)
friend struct DockFocusControllerPrivate;
private slots:
private Q_SLOTS:
void onApplicationFocusChanged(QWidget *old, QWidget *now);
void onFocusedDockAreaViewToggled(bool Open);
void onStateRestored();
@ -83,7 +83,7 @@ public:
*/
CDockWidget* focusedDockWidget() const;
public slots:
public Q_SLOTS:
/**
* Request a focus change to the given dock widget
*/

View File

@ -343,7 +343,7 @@ void DockManagerPrivate::restoreDockWidgetsOpenState()
if (DockWidget->property(internal::DirtyProperty).toBool())
{
DockWidget->flagAsUnassigned();
emit DockWidget->viewToggled(false);
Q_EMIT DockWidget->viewToggled(false);
}
else
{
@ -582,7 +582,7 @@ bool CDockManager::eventFilter(QObject *obj, QEvent *e)
void CDockManager::registerFloatingWidget(CFloatingDockContainer* FloatingWidget)
{
d->FloatingWidgets.append(FloatingWidget);
emit floatingWidgetCreated(FloatingWidget);
Q_EMIT floatingWidgetCreated(FloatingWidget);
ADS_PRINT("d->FloatingWidgets.count() " << d->FloatingWidgets.count());
}
@ -699,14 +699,14 @@ bool CDockManager::restoreState(const QByteArray &state, int version)
hide();
}
d->RestoringState = true;
emit restoringState();
Q_EMIT restoringState();
bool Result = d->restoreState(state, version);
d->RestoringState = false;
if (!IsHidden)
{
show();
}
emit stateRestored();
Q_EMIT stateRestored();
return Result;
}
@ -732,7 +732,7 @@ CFloatingDockContainer* CDockManager::addDockWidgetFloating(CDockWidget* Dockwid
{
d->UninitializedFloatingWidgets.append(FloatingWidget);
}
emit dockWidgetAdded(Dockwidget);
Q_EMIT dockWidgetAdded(Dockwidget);
return FloatingWidget;
}
@ -761,7 +761,7 @@ CDockAreaWidget* CDockManager::addDockWidget(DockWidgetArea area,
d->DockWidgetsMap.insert(Dockwidget->objectName(), Dockwidget);
auto Container = DockAreaWidget ? DockAreaWidget->dockContainer(): this;
auto AreaOfAddedDockWidget = Container->addDockWidget(area, Dockwidget, DockAreaWidget);
emit dockWidgetAdded(Dockwidget);
Q_EMIT dockWidgetAdded(Dockwidget);
return AreaOfAddedDockWidget;
}
@ -803,11 +803,11 @@ CDockWidget* CDockManager::findDockWidget(const QString& ObjectName) const
//============================================================================
void CDockManager::removeDockWidget(CDockWidget* Dockwidget)
{
emit dockWidgetAboutToBeRemoved(Dockwidget);
Q_EMIT dockWidgetAboutToBeRemoved(Dockwidget);
d->DockWidgetsMap.remove(Dockwidget->objectName());
CDockContainerWidget::removeDockWidget(Dockwidget);
Dockwidget->setDockManager(nullptr);
emit dockWidgetRemoved(Dockwidget);
Q_EMIT dockWidgetRemoved(Dockwidget);
}
//============================================================================
@ -821,7 +821,7 @@ QMap<QString, CDockWidget*> CDockManager::dockWidgetsMap() const
void CDockManager::addPerspective(const QString& UniquePrespectiveName)
{
d->Perspectives.insert(UniquePrespectiveName, saveState());
emit perspectiveListChanged();
Q_EMIT perspectiveListChanged();
}
@ -843,8 +843,8 @@ void CDockManager::removePerspectives(const QStringList& Names)
if (Count)
{
emit perspectivesRemoved();
emit perspectiveListChanged();
Q_EMIT perspectivesRemoved();
Q_EMIT perspectiveListChanged();
}
}
@ -865,9 +865,9 @@ void CDockManager::openPerspective(const QString& PerspectiveName)
return;
}
emit openingPerspective(PerspectiveName);
Q_EMIT openingPerspective(PerspectiveName);
restoreState(Iterator.value());
emit perspectiveOpened(PerspectiveName);
Q_EMIT perspectiveOpened(PerspectiveName);
}

View File

@ -338,7 +338,7 @@ void CDockWidget::setFeatures(DockWidgetFeatures features)
return;
}
d->Features = features;
emit featuresChanged(d->Features);
Q_EMIT featuresChanged(d->Features);
d->TabWidget->onDockWidgetFeaturesChanged();
if(CDockAreaWidget* DockArea = dockAreaWidget())
DockArea->onDockWidgetFeaturesChanged();
@ -538,9 +538,9 @@ void CDockWidget::toggleViewInternal(bool Open)
if (!Open)
{
emit closed();
Q_EMIT closed();
}
emit viewToggled(Open);
Q_EMIT viewToggled(Open);
}
@ -580,11 +580,11 @@ bool CDockWidget::event(QEvent *e)
switch (e->type())
{
case QEvent::Hide:
emit visibilityChanged(false);
Q_EMIT visibilityChanged(false);
break;
case QEvent::Show:
emit visibilityChanged(geometry().right() >= 0 && geometry().bottom() >= 0);
Q_EMIT visibilityChanged(geometry().right() >= 0 && geometry().bottom() >= 0);
break;
case QEvent::WindowTitleChange :
@ -602,7 +602,7 @@ bool CDockWidget::event(QEvent *e)
{
d->DockArea->markTitleBarMenuOutdated();//update tabs menu
}
emit titleChanged(title);
Q_EMIT titleChanged(title);
}
break;
@ -785,7 +785,7 @@ void CDockWidget::emitTopLevelChanged(bool Floating)
if (Floating != d->IsFloatingTopLevel)
{
d->IsFloatingTopLevel = Floating;
emit topLevelChanged(d->IsFloatingTopLevel);
Q_EMIT topLevelChanged(d->IsFloatingTopLevel);
}
}
@ -843,7 +843,7 @@ bool CDockWidget::closeDockWidgetInternal(bool ForceClose)
{
if (!ForceClose)
{
emit closeRequested();
Q_EMIT closeRequested();
}
if (!ForceClose && features().testFlag(CDockWidget::CustomCloseHandling))
@ -869,7 +869,7 @@ bool CDockWidget::closeDockWidgetInternal(bool ForceClose)
}
}
deleteDockWidget();
emit closed();
Q_EMIT closed();
}
else
{

View File

@ -353,7 +353,7 @@ void CDockWidgetTab::mousePressEvent(QMouseEvent* ev)
ev->accept();
d->saveDragStartMousePosition(internal::globalPositionOf(ev));
d->DragState = DraggingMousePressed;
emit clicked();
Q_EMIT clicked();
return;
}
Super::mousePressEvent(ev);
@ -377,7 +377,7 @@ void CDockWidgetTab::mouseReleaseEvent(QMouseEvent* ev)
// End of tab moving, emit signal
if (d->DockArea)
{
emit moved(internal::globalPositionOf(ev));
Q_EMIT moved(internal::globalPositionOf(ev));
}
break;
@ -538,7 +538,7 @@ void CDockWidgetTab::setActiveTab(bool active)
update();
updateGeometry();
emit activeTabChanged();
Q_EMIT activeTabChanged();
}

View File

@ -60,7 +60,7 @@ private:
friend class CDockManager;
void onDockWidgetFeaturesChanged();
private slots:
private Q_SLOTS:
void detachDockWidget();
protected:
@ -175,10 +175,10 @@ public:
*/
void setIconSize(const QSize& Size);
public slots:
public Q_SLOTS:
virtual void setVisible(bool visible) override;
signals:
Q_SIGNALS:
void activeTabChanged();
void clicked();
void closeRequested();

View File

@ -74,7 +74,7 @@ void ElidingLabelPrivate::elideText(int Width)
IsElided = str != Text;
if(IsElided != WasElided)
{
emit _this->elidedChanged(IsElided);
Q_EMIT _this->elidedChanged(IsElided);
}
_this->QLabel::setText(str);
}
@ -136,7 +136,7 @@ void CElidingLabel::mouseReleaseEvent(QMouseEvent* event)
return;
}
emit clicked();
Q_EMIT clicked();
}
@ -144,7 +144,7 @@ void CElidingLabel::mouseReleaseEvent(QMouseEvent* event)
void CElidingLabel::mouseDoubleClickEvent( QMouseEvent *ev )
{
Q_UNUSED(ev)
emit doubleClicked();
Q_EMIT doubleClicked();
Super::mouseDoubleClickEvent(ev);
}

View File

@ -84,7 +84,7 @@ public: // reimplements QLabel ----------------------------------------------
void setText(const QString &text);
QString text() const;
signals:
Q_SIGNALS:
/**
* This signal is emitted if the user clicks on the label (i.e. pressed
* down then released while the mouse cursor is inside the label)

View File

@ -60,7 +60,7 @@ struct FloatingDragPreviewPrivate
void cancelDragging()
{
Canceled = true;
emit _this->draggingCanceled();
Q_EMIT _this->draggingCanceled();
DockManager->containerOverlay()->hideOverlay();
DockManager->dockAreaOverlay()->hideOverlay();
_this->close();

View File

@ -32,7 +32,7 @@ private:
FloatingDragPreviewPrivate* d;
friend struct FloatingDragPreviewPrivate;
private slots:
private Q_SLOTS:
/**
* Cancel non opaque undocking if application becomes inactive
*/
@ -92,7 +92,7 @@ public: // implements IFloatingWidget -----------------------------------------
*/
virtual void finishDragging() override;
signals:
Q_SIGNALS:
/**
* This signal is emitted, if dragging has been canceled by escape key
* or by active application switching via task manager