Skip to content

Commit

Permalink
chore: doxygen refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
fizzyade committed May 15, 2021
1 parent 9e068d1 commit a40836d
Show file tree
Hide file tree
Showing 24 changed files with 155 additions and 52 deletions.
2 changes: 1 addition & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

The following document contains a set of guidelines for contributing to the project. Any pull-requests should be compliant with this guide. Code style is often fluent, if you have a suggestion which you think will improve the readability of the code then please open an issue so that we can discuss that potentially modify the style guide to accommodate any new changes.

#C++ Style Guide
# C++ Style Guide

The following guide should be followed to ensure consistent code throughout the project.

Expand Down
7 changes: 5 additions & 2 deletions src/RibbonButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ namespace Nedrysoft { namespace Ribbon {
auto updateStyleSheets(bool isDarkMode) -> void;

private:
std::shared_ptr<RibbonButtonData> d;
Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport; //! an instance of theme support
//! @cond

Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport;

//! @endcond
};
}}

Expand Down
6 changes: 5 additions & 1 deletion src/RibbonButtonPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ class RibbonButtonPlugin :
void initialize(QDesignerFormEditorInterface *core) override;

private:
bool m_initialized = false; //! holds whether designer has initialised the factory yet
//! @cond

bool m_initialized = false;

//! @endcond
};

#endif // NEDRYSOFT_RIBBONBUTTONPLUGIN_H
6 changes: 5 additions & 1 deletion src/RibbonCheckBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ namespace Nedrysoft { namespace Ribbon {
auto updateStyleSheet(bool isDarkMode) -> void;

private:
Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport; //! theme support instance
//! @cond

Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport;

//! @endcond
};
}}

Expand Down
6 changes: 5 additions & 1 deletion src/RibbonCheckBoxPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ class RibbonCheckBoxPlugin :
void initialize(QDesignerFormEditorInterface *core) override;

private:
bool m_initialized = false; //! holds whether designer has initialised the factory yet
//! @cond

bool m_initialized = false;

//! @endcond
};

#endif // NEDRYSOFT_RIBBONCHECKBOXPLUGIN_H
6 changes: 5 additions & 1 deletion src/RibbonComboBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ namespace Nedrysoft { namespace Ribbon {
auto updateStyleSheet(bool isDarkMode) -> void;

private:
Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport; //! theme support instance
//! @cond

Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport;

//! @endcond
};
}}

Expand Down
6 changes: 5 additions & 1 deletion src/RibbonComboBoxPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ class RibbonComboBoxPlugin :
void initialize(QDesignerFormEditorInterface *core) override;

private:
bool m_initialized = false; //! holds whether designer has initialised the factory yet
//! @cond

bool m_initialized = false;

//! @endcond
};

#endif // NEDRYSOFT_RIBBONCOMBOBOXPLUGIN_H
18 changes: 13 additions & 5 deletions src/RibbonDropButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,13 @@ namespace Nedrysoft { namespace Ribbon {
private:
Q_OBJECT

//! @cond

Q_PROPERTY(QIcon icon READ icon WRITE setIcon)
Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)

//! @endcond

public:
/**
* @brief Constructs a new RibbonDropButton which is a child of the parent.
Expand Down Expand Up @@ -116,11 +120,15 @@ namespace Nedrysoft { namespace Ribbon {
Q_SIGNAL void clicked(bool dropdown);

private:
QVBoxLayout *m_layout; //! the layout for this widget
QPushButton *m_mainButton; //! the main button
QPushButton *m_dropButton; //! the drop down button
QSize m_iconSize; //! the size of the icon
Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport; //! theme support instance
//! @cond

QVBoxLayout *m_layout;
QPushButton *m_mainButton;
QPushButton *m_dropButton;
QSize m_iconSize;
Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport;

//! @endcond
};
}}

Expand Down
6 changes: 5 additions & 1 deletion src/RibbonDropButtonPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ class RibbonDropButtonPlugin :
void initialize(QDesignerFormEditorInterface *core) override;

private:
bool m_initialized = false; //! holds whether designer has initialised the factory yet
//! @cond

bool m_initialized = false;

//! @endcond
};

#endif // NEDRYSOFT_RIBBONDROPBUTTONPLUGIN_H
8 changes: 6 additions & 2 deletions src/RibbonFontManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ namespace Nedrysoft { namespace Ribbon {
auto boldFont() -> QString const;

private:
int m_regularFontId; //! Regular font id after loading
int m_boldFontId; //! Bold font id after loading
//! @cond

int m_regularFontId;
int m_boldFontId;

//! @endcond
};
}}

Expand Down
16 changes: 12 additions & 4 deletions src/RibbonGroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@ namespace Nedrysoft { namespace Ribbon {
private:
Q_OBJECT

//! @cond

Q_PROPERTY(QString groupName READ groupName WRITE setGroupName)

//! @endcond

public:
/**
* @brief Constructs a new RibbonGroup which is a child of the parent.
Expand Down Expand Up @@ -97,10 +101,14 @@ namespace Nedrysoft { namespace Ribbon {
auto event(QEvent *event) -> bool override;

private:
QString m_groupName; //! Group name that is displayed
QFont m_font; //! Font used to draw the group name
QFontMetrics m_fontMetrics; //! The font metrics of the selected font
QRect m_textRect; //! The rectangle of the group name in the selected font
//! @cond

QString m_groupName;
QFont m_font;
QFontMetrics m_fontMetrics;
QRect m_textRect;

//! @endcond
};
}}

Expand Down
6 changes: 5 additions & 1 deletion src/RibbonGroupPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ class RibbonGroupPlugin :
void initialize(QDesignerFormEditorInterface *core) override;

private:
bool m_initialized = false; //! holds whether designer has initialised the factory yet
//! @cond

bool m_initialized = false;

//! @endcond
};

#endif // NEDRYSOFT_RIBBONGROUPPLUGIN_H
14 changes: 9 additions & 5 deletions src/RibbonLineEdit.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ namespace Nedrysoft { namespace Ribbon {
/**
* @brief Reimplements QWidget::setMinimumHeight(int minimumHeight)
*
* @note This hides the superclasses implemention as the ribbon line edit has a fixed height and
* @note This hides the superclasses implementation as the ribbon line edit has a fixed height and
* we ignore any attempts to set it.
*
* @param[in] minimumHeight the minimum height for the widget.
Expand All @@ -68,10 +68,10 @@ namespace Nedrysoft { namespace Ribbon {
/**
* @brief Reimplements QWidget::setMaximumHeight(int maximumHeight)
*
* @note This hides the superclasses implemention as the ribbon line edit has a fixed height and
* @note This hides the superclasses implementation as the ribbon line edit has a fixed height and
* we ignore any attempts to set it.
*
* @param[in] minimumHeight the maximum height for the widget.
* @param[in] maximumHeight the maximum height for the widget.
*/
void setMaximumHeight(int maximumHeight);

Expand Down Expand Up @@ -109,7 +109,7 @@ namespace Nedrysoft { namespace Ribbon {
*
* @note Used to discard enter + return keys.
*
* @param[in[ event the event information.
* @param[in] event the event information.
*
* @returns true if event handled; otherwise false.
*/
Expand All @@ -132,7 +132,11 @@ namespace Nedrysoft { namespace Ribbon {
auto updateStyleSheet(bool isDarkMode) -> void;

private:
Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport; //! theme support instance
//! @cond

Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport;

//! @endcond
};
}}

Expand Down
6 changes: 5 additions & 1 deletion src/RibbonLineEditPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ class RibbonLineEditPlugin :
void initialize(QDesignerFormEditorInterface *core) override;

private:
bool m_initialized = false; //! holds whether designer has initialised the factory yet
//! @cond

bool m_initialized = false;

//! @endcond
};

#endif // NEDRYSOFT_RIBBONLINEDITPLUGIN_H
18 changes: 13 additions & 5 deletions src/RibbonPushButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,14 @@ namespace Nedrysoft { namespace Ribbon {
private:
Q_OBJECT

//! @cond

Q_PROPERTY(QIcon icon READ icon WRITE setIcon)
Q_PROPERTY(QSize iconSize READ iconSize WRITE setIconSize)
Q_PROPERTY(QString text READ text WRITE setText)

//! @endcond

public:
/**
* @brief Constructs a new RibbonPushButton instance which is a child of the parent.
Expand Down Expand Up @@ -139,11 +143,15 @@ namespace Nedrysoft { namespace Ribbon {
auto eventFilter(QObject *object, QEvent *event) -> bool override;

private:
QVBoxLayout *m_layout; //! the layout for this widget
QPushButton *m_mainButton; //! the main button
QLabel *m_buttonLabel; //! the main button label
QSize m_iconSize; //! the size of the icon
Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport; //! an instance of theme support
//! @cond

QVBoxLayout *m_layout;
QPushButton *m_mainButton;
QLabel *m_buttonLabel;
QSize m_iconSize;
Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport;

//! @endcond
};
}}

Expand Down
6 changes: 5 additions & 1 deletion src/RibbonPushButtonPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ class RibbonPushButtonPlugin :
void initialize(QDesignerFormEditorInterface *core) override;

private:
bool m_initialized = false; //! holds whether designer has initialised the factory yet
//! @cond

bool m_initialized = false;

//! @endcond
};

#endif // NEDRYSOFT_RIBBONPUSHBUTTONPLUGIN_H
6 changes: 5 additions & 1 deletion src/RibbonSlider.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ namespace Nedrysoft { namespace Ribbon {
auto updateStyleSheet(bool isDarkMode) -> void;

private:
Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport; //! theme support instance
//! @cond

Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport;

//! @endcond
};
}}

Expand Down
6 changes: 5 additions & 1 deletion src/RibbonSliderPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ class RibbonSliderPlugin :
void initialize(QDesignerFormEditorInterface *core) override;

private:
bool m_initialized = false; //! holds whether designer has initialised the factory yet
//! @cond

bool m_initialized = false;

//! @endcond
};

#endif // NEDRYSOFT_RIBBONSLIDERPLUGIN_H
12 changes: 8 additions & 4 deletions src/RibbonTabBar.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,15 @@ namespace Nedrysoft { namespace Ribbon {
auto updateStyleSheet(bool isDarkMode) -> void;

private:
QFont m_selectedFont; //! font to use on selected tab
QFont m_normalFont; //! font to use on deselected tabs
bool m_mouseInWidget; //! tracks whether the mouse is tracked inside the widget
//! @cond

Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport; //! theme support instance
QFont m_selectedFont;
QFont m_normalFont;
bool m_mouseInWidget;

Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport;

//! @endcond
};
}}

Expand Down
6 changes: 5 additions & 1 deletion src/RibbonToolButton.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ namespace Nedrysoft { namespace Ribbon {
auto updateStyleSheet(bool isDarkMode) -> void;

private:
Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport; //! an instance of theme support
//! @cond

Nedrysoft::ThemeSupport::ThemeSupport *m_themeSupport;

//! @endcond
};
}}

Expand Down
6 changes: 5 additions & 1 deletion src/RibbonToolButtonPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ class RibbonToolButtonPlugin :
void initialize(QDesignerFormEditorInterface *core) override;

private:
bool m_initialized = false; //! holds whether designer has initialised the factory yet
//! @cond

bool m_initialized = false;

//! @endcond
};

#endif // NEDRYSOFT_RIBBONTOOLBUTTONPLUGIN_H
Loading

0 comments on commit a40836d

Please sign in to comment.