Skip to content

Commit

Permalink
Gui: Fix header uniformity, whitespace, and doxygen fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
luzpaz authored and wwmayer committed Nov 26, 2020
1 parent c6faecd commit 298c677
Show file tree
Hide file tree
Showing 283 changed files with 2,026 additions and 1,903 deletions.
34 changes: 17 additions & 17 deletions src/Gui/Action.cpp
Expand Up @@ -101,7 +101,7 @@ void Action::addTo(QWidget *w)
/**
* Activates the command.
*/
void Action::onActivated ()
void Action::onActivated ()
{
_pcCmd->invoke(0,Command::TriggerAction);
}
Expand All @@ -112,7 +112,7 @@ void Action::onActivated ()
void Action::onToggled(bool b)
{
_pcCmd->invoke( b ? 1 : 0 , Command::TriggerAction);
}
}

void Action::setCheckable(bool b)
{
Expand All @@ -132,7 +132,7 @@ void Action::setCheckable(bool b)
void Action::setChecked(bool b, bool no_signal)
{
bool blocked;
if(no_signal)
if(no_signal)
blocked = _action->blockSignals(true);
_action->setChecked(b);
if(no_signal)
Expand All @@ -147,12 +147,12 @@ bool Action::isChecked() const
/**
* Sets whether the action is enabled.
*/
void Action::setEnabled(bool b)
void Action::setEnabled(bool b)
{
_action->setEnabled(b);
}

void Action::setVisible(bool b)
void Action::setVisible(bool b)
{
_action->setVisible(b);
}
Expand Down Expand Up @@ -201,7 +201,7 @@ void Action::setToolTip(const QString & s)
{
_action->setToolTip(s);
}

QString Action::toolTip() const
{
return _action->toolTip();
Expand All @@ -219,7 +219,7 @@ QString Action::whatsThis() const

void Action::setMenuRole(QAction::MenuRole menuRole)
{
_action->setMenuRole(menuRole);
_action->setMenuRole(menuRole);
}

// --------------------------------------------------------------------
Expand Down Expand Up @@ -247,7 +247,7 @@ ActionGroup::~ActionGroup()
void ActionGroup::addTo(QWidget *w)
{
// When adding an action that has defined a menu then shortcuts
// of the menu actions don't work. To make this working we must
// of the menu actions don't work. To make this working we must
// set the menu explicitly. This means calling QAction::setMenu()
// and adding this action to the widget doesn't work.
if (_dropDown) {
Expand All @@ -268,7 +268,7 @@ void ActionGroup::addTo(QWidget *w)
//tb->addActions(_group->actions());
}
else {
w->addActions(_group->actions()); // no drop-down
w->addActions(_group->actions()); // no drop-down
}
}
else {
Expand Down Expand Up @@ -343,20 +343,20 @@ void ActionGroup::setCheckedAction(int i)
/**
* Activates the command.
*/
void ActionGroup::onActivated ()
void ActionGroup::onActivated ()
{
_pcCmd->invoke(this->property("defaultAction").toInt(), Command::TriggerAction);
}

void ActionGroup::onToggled(bool)
{
onActivated();
}
}

/**
* Activates the command.
*/
void ActionGroup::onActivated (QAction* a)
void ActionGroup::onActivated (QAction* a)
{
int index = _group->actions().indexOf(a);

Expand All @@ -383,7 +383,7 @@ void ActionGroup::onActivated (QAction* a)
_pcCmd->invoke(index, Command::TriggerChildAction);
}

void ActionGroup::onHovered (QAction *a)
void ActionGroup::onHovered (QAction *a)
{
Gui::ToolTip::showText(QCursor::pos(), a->toolTip());
}
Expand Down Expand Up @@ -416,7 +416,7 @@ class WorkbenchActionEvent : public QEvent
WorkbenchComboBox::WorkbenchComboBox(WorkbenchGroup* wb, QWidget* parent) : QComboBox(parent), group(wb)
{
connect(this, SIGNAL(activated(int)), this, SLOT(onActivated(int)));
connect(getMainWindow(), SIGNAL(workbenchActivated(const QString&)),
connect(getMainWindow(), SIGNAL(workbenchActivated(const QString&)),
this, SLOT(onWorkbenchActivated(const QString&)));
}

Expand Down Expand Up @@ -702,7 +702,7 @@ void RecentFilesAction::appendFile(const QString& filename)

/**
* Set the list of recent files. For each item an action object is
* created and added to this action group.
* created and added to this action group.
*/
void RecentFilesAction::setFiles(const QStringList& files)
{
Expand Down Expand Up @@ -1135,7 +1135,7 @@ void DockWidgetAction::addTo ( QWidget * w )
_action->setMenu(_menu);
connect(_menu, SIGNAL(aboutToShow()), getMainWindow(), SLOT(onDockWindowMenuAboutToShow()));
}

w->addAction(_action);
}

Expand All @@ -1158,7 +1158,7 @@ void ToolBarAction::addTo ( QWidget * w )
_action->setMenu(_menu);
connect(_menu, SIGNAL(aboutToShow()), getMainWindow(), SLOT(onToolBarMenuAboutToShow()));
}

w->addAction(_action);
}

Expand Down
18 changes: 9 additions & 9 deletions src/Gui/Action.h
Expand Up @@ -28,12 +28,12 @@
#include <QComboBox>
#include <QKeySequence>

namespace Gui
namespace Gui
{
class Command;

/**
* The Action class is the link between Qt's QAction class and FreeCAD's
* The Action class is the link between Qt's QAction class and FreeCAD's
* command classes (@ref Command). So, it is possible to have all actions
* (from toolbars, menus, ...) implemented in classes instead of many slot
* methods in the class @ref MainWindow.
Expand Down Expand Up @@ -74,7 +74,7 @@ class GuiExport Action : public QObject

public Q_SLOTS:
virtual void onActivated ();
virtual void onToggled (bool);
virtual void onToggled (bool);

protected:
QAction* _action;
Expand All @@ -84,7 +84,7 @@ public Q_SLOTS:
// --------------------------------------------------------------------

/**
* The ActionGroup class is the link between Qt's QActionGroup class and
* The ActionGroup class is the link between Qt's QActionGroup class and
* FreeCAD's command classes (@ref Command). Compared to Action with an
* ActionGroup it is possible to implement a single command with a group
* of toggable actions where e.g. one is set exclusive.
Expand Down Expand Up @@ -161,7 +161,7 @@ class GuiExport WorkbenchGroup : public ActionGroup
Q_OBJECT

public:
/**
/**
* Creates an action for the command \a pcCmd to load the workbench \a name
* when it gets activated.
*/
Expand All @@ -184,7 +184,7 @@ class GuiExport WorkbenchGroup : public ActionGroup
// --------------------------------------------------------------------

/**
* The RecentFilesAction class holds a menu listed with the recent files.
* The RecentFilesAction class holds a menu listed with the recent files.
* @author Werner Mayer
*/
class GuiExport RecentFilesAction : public ActionGroup
Expand All @@ -207,7 +207,7 @@ class GuiExport RecentFilesAction : public ActionGroup

private:
int visibleItems; /**< Number of visible items */
int maximumItems; /**< Number of maximum items */
int maximumItems; /**< Number of maximum items */
};

// --------------------------------------------------------------------
Expand Down Expand Up @@ -245,7 +245,7 @@ class GuiExport RecentMacrosAction : public ActionGroup
// --------------------------------------------------------------------

/**
* The UndoAction class reimplements a special behaviour to make a menu
* The UndoAction class reimplements a special behaviour to make a menu
* appearing when the button with the arrow is clicked.
* @author Werner Mayer
*/
Expand All @@ -270,7 +270,7 @@ private Q_SLOTS:
// --------------------------------------------------------------------

/**
* The RedoAction class reimplements a special behaviour to make a menu
* The RedoAction class reimplements a special behaviour to make a menu
* appearing when the button with the arrow is clicked.
* @author Werner Mayer
*/
Expand Down
10 changes: 5 additions & 5 deletions src/Gui/ActiveObjectList.cpp
Expand Up @@ -109,7 +109,7 @@ Gui::ActiveObjectList::ObjectInfo Gui::ActiveObjectList::getObjectInfo(App::Docu
return info;
}

bool Gui::ActiveObjectList::hasObject(App::DocumentObject *obj,
bool Gui::ActiveObjectList::hasObject(App::DocumentObject *obj,
const char *name, const char *subname) const
{
auto it = _ObjectMap.find(name);
Expand All @@ -119,7 +119,7 @@ bool Gui::ActiveObjectList::hasObject(App::DocumentObject *obj,
return info.obj==it->second.obj && info.subname==it->second.subname;
}

void Gui::ActiveObjectList::setObject(App::DocumentObject* obj, const char* name,
void Gui::ActiveObjectList::setObject(App::DocumentObject* obj, const char* name,
const char *subname, const Gui::HighlightMode& mode)
{
auto it = _ObjectMap.find(name);
Expand All @@ -132,8 +132,8 @@ void Gui::ActiveObjectList::setObject(App::DocumentObject* obj, const char* name
auto info = getObjectInfo(obj,subname);
if(!info.obj) {
FC_ERR("Cannot set active object "
<< obj->getFullName() << '.' << (subname?subname:"")
<< " in document '" << _Doc->getDocument()->getName()
<< obj->getFullName() << '.' << (subname?subname:"")
<< " in document '" << _Doc->getDocument()->getName()
<< "'. Not found in current selection");
return;
}
Expand All @@ -142,7 +142,7 @@ void Gui::ActiveObjectList::setObject(App::DocumentObject* obj, const char* name
setHighlight(info,mode,true);
}

bool Gui::ActiveObjectList::hasObject(const char*name)const
bool Gui::ActiveObjectList::hasObject(const char*name)const
{
return _ObjectMap.find(name) != _ObjectMap.end();
}
Expand Down
4 changes: 2 additions & 2 deletions src/Gui/ActiveObjectList.h
Expand Up @@ -44,7 +44,7 @@ namespace Gui
* @see Gui::MDIViewer
* @author Jürgen Riegel
*/
class GuiExport ActiveObjectList
class GuiExport ActiveObjectList
{
public:
ActiveObjectList(Document *doc)
Expand Down Expand Up @@ -85,4 +85,4 @@ namespace Gui
static const char PDBODYKEY[] = "pdbody";
static const char PARTKEY[] = "part";

#endif
#endif
4 changes: 2 additions & 2 deletions src/Gui/Application.cpp
Expand Up @@ -1089,7 +1089,7 @@ Gui::MDIView* Application::editViewOfNode(SoNode *node) const
void Application::setEditDocument(Gui::Document *doc) {
if(doc == d->editDocument)
return;
if(!doc)
if(!doc)
d->editDocument = 0;
for(auto &v : d->documents)
v.second->_resetEdit();
Expand Down Expand Up @@ -2504,7 +2504,7 @@ App::Document *Application::reopen(App::Document *doc) {
WaitCursor wc;
wc.setIgnoreEvents(WaitCursor::NoEvents);

if(doc->testStatus(App::Document::PartialDoc)
if(doc->testStatus(App::Document::PartialDoc)
|| doc->testStatus(App::Document::PartialRestore))
{
App::GetApplication().openDocument(name.c_str());
Expand Down

0 comments on commit 298c677

Please sign in to comment.