Mod doc set style de same

This commit is contained in:
Simon De Backer
2020-08-16 11:19:36 +02:00
parent 90417ae509
commit d4ee161c07
274 changed files with 6823 additions and 6756 deletions

View File

@@ -24,16 +24,16 @@
#include <QAbstractButton>
/**
* @brief The PropertiesEditorDialog class
* Create a dialog to edit some properties of a thing.
* Only create a instance of this class and call exec, all is done for you in this class.
* The first argument (a template) must be a subclass of QWidget and provide the 3 methods bellow :
* QString::title()
* void::apply()
* void::reset()
* You can subclass the interface PropertiesEditorWidget who provide all this methods.
* This dialog take ownership of the editor, so the editor will be deleted by this dialog
*/
@brief The PropertiesEditorDialog class
Create a dialog to edit some properties of a thing.
Only create a instance of this class and call exec, all is done for you in this class.
The first argument (a template) must be a subclass of QWidget and provide the 3 methods bellow :
QString::title()
void::apply()
void::reset()
You can subclass the interface PropertiesEditorWidget who provide all this methods.
This dialog take ownership of the editor, so the editor will be deleted by this dialog
*/
class PropertiesEditorDialog : public QDialog
{
Q_OBJECT

View File

@@ -20,10 +20,10 @@
#include "propertieseditorwidget.h"
/**
* @brief PropertiesEditorDockWidget::PropertiesEditorDockWidget
* Constructor
* @param parent : parent widget
*/
@brief PropertiesEditorDockWidget::PropertiesEditorDockWidget
Constructor
@param parent : parent widget
*/
PropertiesEditorDockWidget::PropertiesEditorDockWidget(QWidget *parent) :
QDockWidget(parent),
ui(new Ui::PropertiesEditorDockWidget)
@@ -32,9 +32,9 @@ PropertiesEditorDockWidget::PropertiesEditorDockWidget(QWidget *parent) :
}
/**
* @brief PropertiesEditorDockWidget::~PropertiesEditorDockWidget
* Destructor
*/
@brief PropertiesEditorDockWidget::~PropertiesEditorDockWidget
Destructor
*/
PropertiesEditorDockWidget::~PropertiesEditorDockWidget()
{
clear();
@@ -42,10 +42,10 @@ PropertiesEditorDockWidget::~PropertiesEditorDockWidget()
}
/**
* @brief PropertiesEditorDockWidget::clear
* Remove all editor present in this dock and delete it.
* They also disabled the button box at the bottom of this dock
*/
@brief PropertiesEditorDockWidget::clear
Remove all editor present in this dock and delete it.
They also disabled the button box at the bottom of this dock
*/
void PropertiesEditorDockWidget::clear()
{
foreach (PropertiesEditorWidget *editor, m_editor_list)
@@ -59,9 +59,9 @@ void PropertiesEditorDockWidget::clear()
}
/**
* @brief PropertiesEditorDockWidget::apply
* Call the apply method for each editor present in this dock
*/
@brief PropertiesEditorDockWidget::apply
Call the apply method for each editor present in this dock
*/
void PropertiesEditorDockWidget::apply()
{
foreach(PropertiesEditorWidget *editor, m_editor_list)
@@ -69,9 +69,9 @@ void PropertiesEditorDockWidget::apply()
}
/**
* @brief PropertiesEditorDockWidget::reset
* Call the reset method for each editor present in this widget
*/
@brief PropertiesEditorDockWidget::reset
Call the reset method for each editor present in this widget
*/
void PropertiesEditorDockWidget::reset()
{
foreach(PropertiesEditorWidget *editor, m_editor_list)
@@ -79,14 +79,14 @@ void PropertiesEditorDockWidget::reset()
}
/**
* @brief PropertiesEditorDockWidget::addEditor
* Add an @editor in this dock at @index in the main vertical layout (note the button box
* are displayed at bottom of this layout by default)
* When an editor is added, we enable the button box
* @param editor : editor to add;
* @param index : index of editor in the layout
* @return true if was added (or already add) or false if can't be add (editor = nullptr)
*/
@brief PropertiesEditorDockWidget::addEditor
Add an @editor in this dock at @index in the main vertical layout (note the button box
are displayed at bottom of this layout by default)
When an editor is added, we enable the button box
@param editor : editor to add;
@param index : index of editor in the layout
@return true if was added (or already add) or false if can't be add (editor = nullptr)
*/
bool PropertiesEditorDockWidget::addEditor(PropertiesEditorWidget *editor, int index)
{
if (!editor) return false;
@@ -98,20 +98,20 @@ bool PropertiesEditorDockWidget::addEditor(PropertiesEditorWidget *editor, int i
}
/**
* @brief PropertiesEditorDockWidget::editors
* @return all editor used in this dock
*/
@brief PropertiesEditorDockWidget::editors
@return all editor used in this dock
*/
QList<PropertiesEditorWidget *> PropertiesEditorDockWidget::editors() const {
return m_editor_list;
}
/**
* @brief PropertiesEditorDockWidget::removeEditor
* Remove @editor from this dock. The editor wasn't delete a the end of this method
* If the editor was the last on this widget, we disabled the button box
* @param editor : editor to remove
* @return true on success, else false
*/
@brief PropertiesEditorDockWidget::removeEditor
Remove @editor from this dock. The editor wasn't delete a the end of this method
If the editor was the last on this widget, we disabled the button box
@param editor : editor to remove
@return true on success, else false
*/
bool PropertiesEditorDockWidget::removeEditor(PropertiesEditorWidget *editor)
{
bool result = m_editor_list.removeOne(editor);

View File

@@ -19,52 +19,52 @@
#include <QUndoCommand>
/**
* @brief PropertiesEditorWidget::PropertiesEditorWidget
* Constructor
* @param parent : parent widget
*/
@brief PropertiesEditorWidget::PropertiesEditorWidget
Constructor
@param parent : parent widget
*/
PropertiesEditorWidget::PropertiesEditorWidget(QWidget *parent) :
QWidget(parent),
m_live_edit(false)
{}
/**
* @brief PropertiesEditorWidget::associatedUndo
* By default, return a nullptr
* @return nullptr
*/
@brief PropertiesEditorWidget::associatedUndo
By default, return a nullptr
@return nullptr
*/
QUndoCommand *PropertiesEditorWidget::associatedUndo() const{
return nullptr;
}
/**
* @brief PropertiesEditorWidget::title
* @return the title of this editor
*/
@brief PropertiesEditorWidget::title
@return the title of this editor
*/
QString PropertiesEditorWidget::title() const {
return QString();
}
/**
* @brief PropertiesEditorWidget::setLiveEdit
* Set the editor in live edit mode.
* When an editor is in live edit mode, every change is applied immediately (no need to call apply).
* If live edit can be enable, return true, else false.
* By default this method do nothing and return false (live edit is disable).
* Herited class of PropertiesEditorWidget must reimplemente this methode to manage the live edit mode.
* @param live_edit true to enable live edit
* @return true if live edit is enable, else false.
*/
@brief PropertiesEditorWidget::setLiveEdit
Set the editor in live edit mode.
When an editor is in live edit mode, every change is applied immediately (no need to call apply).
If live edit can be enable, return true, else false.
By default this method do nothing and return false (live edit is disable).
Herited class of PropertiesEditorWidget must reimplemente this methode to manage the live edit mode.
@param live_edit true to enable live edit
@return true if live edit is enable, else false.
*/
bool PropertiesEditorWidget::setLiveEdit(bool live_edit) {
Q_UNUSED(live_edit);
return false;
}
/**
* @brief PropertiesEditorWidget::isLiveEdit
* @return true if this editor is in live edit mode
* else return fasle.
*/
@brief PropertiesEditorWidget::isLiveEdit
@return true if this editor is in live edit mode
else return fasle.
*/
bool PropertiesEditorWidget::isLiveEdit() const {
return m_live_edit;
}

View File

@@ -23,10 +23,10 @@
class QUndoCommand;
/**
* @brief The PropertiesEditorWidget class
* This class extend QWidget method for have common way
* to edit propertie.
*/
@brief The PropertiesEditorWidget class
This class extend QWidget method for have common way
to edit propertie.
*/
class PropertiesEditorWidget : public QWidget
{
Q_OBJECT