mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-02-01 00:49:58 +01:00
Fix some doxygen issues (~100)
This commit is contained in:
@@ -26,13 +26,17 @@
|
||||
/**
|
||||
@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 :
|
||||
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
|
||||
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
|
||||
{
|
||||
@@ -42,12 +46,13 @@ class PropertiesEditorDialog : public QDialog
|
||||
PropertiesEditorDialog(T editor, QWidget *parent = nullptr) :
|
||||
QDialog (parent)
|
||||
{
|
||||
//Set dialog title
|
||||
//Set dialog title
|
||||
setWindowTitle(editor->title());
|
||||
//Reparent the editor, to be deleted at the same time of this dialog
|
||||
// Reparent the editor,
|
||||
// to be deleted at the same time of this dialog
|
||||
editor->setParent(this);
|
||||
|
||||
//Build the dialog
|
||||
//Build the dialog
|
||||
QVBoxLayout *vlayout = new QVBoxLayout(this);
|
||||
vlayout->addWidget(editor);
|
||||
QDialogButtonBox *button_box = new QDialogButtonBox (QDialogButtonBox::Apply | QDialogButtonBox::Cancel | QDialogButtonBox::Reset, this);
|
||||
|
||||
@@ -80,12 +80,13 @@ 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)
|
||||
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)
|
||||
@return true if was added (or already add)
|
||||
or false if can't be add (editor = nullptr)
|
||||
*/
|
||||
bool PropertiesEditorDockWidget::addEditor(PropertiesEditorWidget *editor, int index)
|
||||
{
|
||||
@@ -107,7 +108,8 @@ QList<PropertiesEditorWidget *> PropertiesEditorDockWidget::editors() const {
|
||||
|
||||
/**
|
||||
@brief PropertiesEditorDockWidget::removeEditor
|
||||
Remove @editor from this dock. The editor wasn't delete a the end of this method
|
||||
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
|
||||
|
||||
@@ -48,10 +48,13 @@ QString PropertiesEditorWidget::title() const {
|
||||
/**
|
||||
@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).
|
||||
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.
|
||||
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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user