From 328abba1c635b7490a8e751c55b519b69f92b849 Mon Sep 17 00:00:00 2001 From: Rene Gassmoeller Date: Fri, 7 Apr 2017 19:52:22 -0600 Subject: [PATCH] Indent --- browse_lineedit.h | 154 +++++++-------- info_message.h | 136 ++++++------- mainwindow.h | 430 ++++++++++++++++++++--------------------- parameter_delegate.h | 118 +++++------ prm_parameter_writer.h | 102 +++++----- settings_dialog.h | 42 ++-- xml_parameter_reader.h | 180 ++++++++--------- xml_parameter_writer.h | 126 ++++++------ 8 files changed, 644 insertions(+), 644 deletions(-) diff --git a/browse_lineedit.h b/browse_lineedit.h index 6abe7f0..03dc445 100644 --- a/browse_lineedit.h +++ b/browse_lineedit.h @@ -25,96 +25,96 @@ namespace dealii { -/*! @addtogroup ParameterGui - *@{ - */ + /*! @addtogroup ParameterGui + *@{ + */ namespace ParameterGui { -/** - * The BrowseLineEdit class provides a special line editor for the parameterGUI. - * While editing file- or directory names it is much more easier to have a file-dialog - * and just click on existing files or directories. This editor provides a simple QLineEditor - * and a browse-button which opens a file- or a directory dialog. Clicking on existing files or directories - * copies the path to the line editor. Depending on the BrowseType given in the constructor - * the browse button opens a file or a directory dialog. - * - * @note This class is used in the graphical user interface for the @ref ParameterHandler class. - * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. - * - * @ingroup ParameterGui - * @author Martin Steigemann, Wolfgang Bangerth, 2010 - */ + /** + * The BrowseLineEdit class provides a special line editor for the parameterGUI. + * While editing file- or directory names it is much more easier to have a file-dialog + * and just click on existing files or directories. This editor provides a simple QLineEditor + * and a browse-button which opens a file- or a directory dialog. Clicking on existing files or directories + * copies the path to the line editor. Depending on the BrowseType given in the constructor + * the browse button opens a file or a directory dialog. + * + * @note This class is used in the graphical user interface for the @ref ParameterHandler class. + * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. + * + * @ingroup ParameterGui + * @author Martin Steigemann, Wolfgang Bangerth, 2010 + */ class BrowseLineEdit : public QFrame { Q_OBJECT - public: - /** - * The browse button opens a file or - * a directory dialog. This can be specified - * in the constructor by setting this flag BrowseType. - */ - enum BrowseType {file = 0, directory = 1, files = 2}; - /** - * Constructor. The type of the browse dialog can be specified - * by the flag BrowseType, the default is file. - */ - BrowseLineEdit (const BrowseType type = file, - QWidget *parent = 0); + public: + /** + * The browse button opens a file or + * a directory dialog. This can be specified + * in the constructor by setting this flag BrowseType. + */ + enum BrowseType {file = 0, directory = 1, files = 2}; + /** + * Constructor. The type of the browse dialog can be specified + * by the flag BrowseType, the default is file. + */ + BrowseLineEdit (const BrowseType type = file, + QWidget *parent = 0); - /** - * Reimplemented from the QWidget class. - * Returns the size of the editor. - */ - QSize sizeHint() const; - /** - * Reimplemented from the QWidget class. - */ - QSize minimumSizeHint() const; - /** - * Returns the text of the line editor. - */ - QString text() const; - /** - * This pattern stores the type of the browse dialog. - */ - BrowseType browse_type; + /** + * Reimplemented from the QWidget class. + * Returns the size of the editor. + */ + QSize sizeHint() const; + /** + * Reimplemented from the QWidget class. + */ + QSize minimumSizeHint() const; + /** + * Returns the text of the line editor. + */ + QString text() const; + /** + * This pattern stores the type of the browse dialog. + */ + BrowseType browse_type; - public slots: - /** - * A slot to set @p str as text of the line editor. - */ - void setText(const QString &str); + public slots: + /** + * A slot to set @p str as text of the line editor. + */ + void setText(const QString &str); - signals: - /** - * This signal will be emitted, if editing is finished. - */ - void editingFinished(); + signals: + /** + * This signal will be emitted, if editing is finished. + */ + void editingFinished(); - private slots: - /** - * This slot should be always called, if editing is finished. - */ - void editing_finished(); - /** - * This function opens a file- or a directory dialog as specified in the - * constructor. - */ - void browse(); + private slots: + /** + * This slot should be always called, if editing is finished. + */ + void editing_finished(); + /** + * This function opens a file- or a directory dialog as specified in the + * constructor. + */ + void browse(); - private: - /** - * The line editor. - */ - QLineEdit * line_editor; - /** - * The browse button. - */ - QPushButton * browse_button; + private: + /** + * The line editor. + */ + QLineEdit *line_editor; + /** + * The browse button. + */ + QPushButton *browse_button; }; } -/**@}*/ + /**@}*/ } diff --git a/info_message.h b/info_message.h index 0dd1024..ea147dc 100644 --- a/info_message.h +++ b/info_message.h @@ -26,87 +26,87 @@ namespace dealii { -/*! @addtogroup ParameterGui - *@{ - */ + /*! @addtogroup ParameterGui + *@{ + */ namespace ParameterGui { -/** - * The InfoMessage class implements a special info message for the parameterGUI. - * Besides showing a info message itself, the dialog shows a checkbox "Show this message again". - * If the user unchecks this box, this is stored in the "settings.ini" file and will be reloaded - * the next time the user opens the parameterGUI. The intention of such a info message is the following. - * The user should have some information on how using the GUI "at hand" - * such as "how to edit parameter values" for example. But after reading this message, the user knows - * it and the message should not appear permanently. - * - * @note This class is used in the graphical user interface for the @ref ParameterHandler class. - * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. - * - * @ingroup ParameterGui - * @author Martin Steigemann, Wolfgang Bangerth, 2010 - */ + /** + * The InfoMessage class implements a special info message for the parameterGUI. + * Besides showing a info message itself, the dialog shows a checkbox "Show this message again". + * If the user unchecks this box, this is stored in the "settings.ini" file and will be reloaded + * the next time the user opens the parameterGUI. The intention of such a info message is the following. + * The user should have some information on how using the GUI "at hand" + * such as "how to edit parameter values" for example. But after reading this message, the user knows + * it and the message should not appear permanently. + * + * @note This class is used in the graphical user interface for the @ref ParameterHandler class. + * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. + * + * @ingroup ParameterGui + * @author Martin Steigemann, Wolfgang Bangerth, 2010 + */ class InfoMessage : public QDialog { Q_OBJECT - public: - /** - * Constructor - */ - InfoMessage (QWidget *parent = 0); - /** - * With this function the @p message which will be shown in the - * dialog can be set. - */ - void setInfoMessage(const QString &message); + public: + /** + * Constructor + */ + InfoMessage (QWidget *parent = 0); + /** + * With this function the @p message which will be shown in the + * dialog can be set. + */ + void setInfoMessage(const QString &message); - public slots: - /** - * Show the dialog with the message. - */ - void showMessage(); + public slots: + /** + * Show the dialog with the message. + */ + void showMessage(); - protected: - /** - * Reimplemented from QDialog. - */ - void done(int r); + protected: + /** + * Reimplemented from QDialog. + */ + void done(int r); - private: - /** - * This variable stores, if the message should be shown again the next time. - */ - bool show_again; - /** - * The Ok button. - */ - QPushButton * ok; - /** - * The checkboxShow this message again. - */ - QCheckBox * again; - /** - * The message editor. - */ - QTextEdit * message; - /** - * An icon for the dialog. - */ - QLabel * icon; + private: + /** + * This variable stores, if the message should be shown again the next time. + */ + bool show_again; + /** + * The Ok button. + */ + QPushButton *ok; + /** + * The checkboxShow this message again. + */ + QCheckBox *again; + /** + * The message editor. + */ + QTextEdit *message; + /** + * An icon for the dialog. + */ + QLabel *icon; #ifdef QT_SOFTKEYS_ENABLED - /** - * A action for pressing the Ok button. - */ - QAction * ok_action; + /** + * A action for pressing the Ok button. + */ + QAction *ok_action; #endif - /** - * An object for storing settings in a file. - */ - QSettings * settings; + /** + * An object for storing settings in a file. + */ + QSettings *settings; }; } -/**@}*/ + /**@}*/ } diff --git a/mainwindow.h b/mainwindow.h index 7008af3..b95d948 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -30,249 +30,249 @@ namespace dealii { -/*! @addtogroup ParameterGui - *@{ - */ + /*! @addtogroup ParameterGui + *@{ + */ namespace ParameterGui { -/** - * The MainWindow class of the the parameterGUI. - * The parameterGUI is a graphical user interface for editing parameter files based on the XML format, - * created by the @ref ParameterHandler::print_parameters() function with @ref ParameterHandler::XML as second argument. - * Please see Representation of Parameters in the documentation of the @ref ParameterHandler class for more details. - * The MainWindow class provides the basic functionality of the GUI as save- and load-file-actions and documentation. - * The parameterGUI provides special editors for the different types of parameters defined in the ParameterHandler class. - * - * @note This class is used in the graphical user interface for the @ref ParameterHandler class. - * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. - * - * @ingroup ParameterGui - * @author Martin Steigemann, Wolfgang Bangerth, 2010 - */ + /** + * The MainWindow class of the the parameterGUI. + * The parameterGUI is a graphical user interface for editing parameter files based on the XML format, + * created by the @ref ParameterHandler::print_parameters() function with @ref ParameterHandler::XML as second argument. + * Please see Representation of Parameters in the documentation of the @ref ParameterHandler class for more details. + * The MainWindow class provides the basic functionality of the GUI as save- and load-file-actions and documentation. + * The parameterGUI provides special editors for the different types of parameters defined in the ParameterHandler class. + * + * @note This class is used in the graphical user interface for the @ref ParameterHandler class. + * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. + * + * @ingroup ParameterGui + * @author Martin Steigemann, Wolfgang Bangerth, 2010 + */ class MainWindow : public QMainWindow { Q_OBJECT - public: - /** - * Constructor. - * If a @p filename is given, - * the MainWindow tries to open - * and parse the file. - */ - MainWindow(const QString &filename = ""); + public: + /** + * Constructor. + * If a @p filename is given, + * the MainWindow tries to open + * and parse the file. + */ + MainWindow(const QString &filename = ""); - protected: - /** - * Reimplemented from QMainWindow. - * We ask, if changes should be saved. - */ - void closeEvent(QCloseEvent *event); + protected: + /** + * Reimplemented from QMainWindow. + * We ask, if changes should be saved. + */ + void closeEvent(QCloseEvent *event); - private slots: + private slots: - /** - * Open a parameter file. - */ - void open(); - /** - * Save the parameter file. - */ - bool save(); - /** - * Open a file dialog to save the parameter file. - */ - bool save_as(); - /** - * Show some information on the parameterGUI - */ - void about(); + /** + * Open a parameter file. + */ + void open(); + /** + * Save the parameter file. + */ + bool save(); + /** + * Open a file dialog to save the parameter file. + */ + bool save_as(); + /** + * Show some information on the parameterGUI + */ + void about(); - /** - * A slot that should be always called, - * if parameter values were changed. - */ - void tree_was_modified(); + /** + * A slot that should be always called, + * if parameter values were changed. + */ + void tree_was_modified(); - /** - * A slot that is called when the active - * item has changed. It updates the documentation - * text in the documentation panel. - */ - void set_documentation_text(QTreeWidgetItem *selected_item, - QTreeWidgetItem *previous_item); + /** + * A slot that is called when the active + * item has changed. It updates the documentation + * text in the documentation panel. + */ + void set_documentation_text(QTreeWidgetItem *selected_item, + QTreeWidgetItem *previous_item); - /** - * A slot that is called when the active - * tree item should be set to its default value. - */ - void set_to_default(); + /** + * A slot that is called when the active + * tree item should be set to its default value. + */ + void set_to_default(); - /** - * A slot that is called when any - * item value has changed. It updates the font depending - * on whether the item has a default value or not. - */ - void item_changed(QTreeWidgetItem *item, - int column); + /** + * A slot that is called when any + * item value has changed. It updates the font depending + * on whether the item has a default value or not. + */ + void item_changed(QTreeWidgetItem *item, + int column); - /** - * Show an information dialog, how - * parameters can be edited. - */ - void show_settings (); + /** + * Show an information dialog, how + * parameters can be edited. + */ + void show_settings (); - /** - * Apply the new settings to this window. - */ - void apply_settings (); + /** + * Apply the new settings to this window. + */ + void apply_settings (); - /** - * Hide all default items in tree_widget if set in gui_settings. - * Otherwise restores all default values. - */ - void update_visible_items(); + /** + * Hide all default items in tree_widget if set in gui_settings. + * Otherwise restores all default values. + */ + void update_visible_items(); - /** - * Reads the font from gui_settings and applies it. - */ - void update_font(); + /** + * Reads the font from gui_settings and applies it. + */ + void update_font(); - /** - * Changes whether default items should be displayed in the tree widget - * and calls update_visible_items() to apply the changes. - */ - void toggle_visible_default_items(); + /** + * Changes whether default items should be displayed in the tree widget + * and calls update_visible_items() to apply the changes. + */ + void toggle_visible_default_items(); - /** - * Function that displays a font selection dialog, stores the result - * in gui_settings, and displays the new font. - */ - void select_font(); - private: - /** - * Show an information dialog, how - * parameters can be edited. - */ - void show_message (); - /** - * This function creates all actions. - */ - void create_actions(); - /** - * This function creates all menus. - */ - void create_menus(); + /** + * Function that displays a font selection dialog, stores the result + * in gui_settings, and displays the new font. + */ + void select_font(); + private: + /** + * Show an information dialog, how + * parameters can be edited. + */ + void show_message (); + /** + * This function creates all actions. + */ + void create_actions(); + /** + * This function creates all menus. + */ + void create_menus(); - /** - * This function creates the toolbar. - */ - void create_toolbar(); - /** - * This function checks, if parameters were changed - * and show a dialog, if changes should be saved. - * This function should be always called, - * before open a new parameter file or before closing the GUI - */ - bool maybe_save (); - /** - * Save parameters to @p filename in XML format. - */ - bool save_file (const QString &filename); - /** - * Load parameters from @p filename in XML format. - */ - void load_file (const QString &filename); - /** - * This functions writes the current @p filename to the window title. - */ - void set_current_file (const QString &filename); + /** + * This function creates the toolbar. + */ + void create_toolbar(); + /** + * This function checks, if parameters were changed + * and show a dialog, if changes should be saved. + * This function should be always called, + * before open a new parameter file or before closing the GUI + */ + bool maybe_save (); + /** + * Save parameters to @p filename in XML format. + */ + bool save_file (const QString &filename); + /** + * Load parameters from @p filename in XML format. + */ + void load_file (const QString &filename); + /** + * This functions writes the current @p filename to the window title. + */ + void set_current_file (const QString &filename); - /** - * Determine if the item and all of its children have the default value, - * and hide all default items. Returns true if the item and all of its - * children have default values. - */ - bool hide_item_with_default_value(QTreeWidgetItem *item); + /** + * Determine if the item and all of its children have the default value, + * and hide all default items. Returns true if the item and all of its + * children have default values. + */ + bool hide_item_with_default_value(QTreeWidgetItem *item); - /** - * This is the tree structure in which we store all parameters. - */ - QTreeWidget * tree_widget; - /** - * This is the documentation text area. - */ - QTextEdit *documentation_text_widget; + /** + * This is the tree structure in which we store all parameters. + */ + QTreeWidget *tree_widget; + /** + * This is the documentation text area. + */ + QTextEdit *documentation_text_widget; - /** A tool button that allows to toggle between showing/hiding parameters - * with default values. - */ - QToolButton *hide_default; - /** - * This menu provides all file actions as open, save, save as - * and exit - */ - QMenu * file_menu; - /** - * This menu provides some informations about the parameterGUI - * and about Qt - */ - QMenu * help_menu; - /** - * This menu provides context menu options for the active tree item. - */ - QMenu * context_menu; - /** - * QAction open a file. - */ - QAction * open_act; - /** - * QAction save a file. - */ - QAction * save_act; - /** - * QAction save as a file. - */ - QAction * save_as_act; - /** - * QAction save as a file. - */ - QAction * settings_act; - /** - * QAction exit the GUI. - */ - QAction * exit_act; - /** - * QAction about the parameterGUI. - */ - QAction * about_act; - /** - * QAction about Qt. - */ - QAction * about_qt_act; - /** - * QAction set_to_default. - */ - QAction * set_to_default_act; + /** A tool button that allows to toggle between showing/hiding parameters + * with default values. + */ + QToolButton *hide_default; + /** + * This menu provides all file actions as open, save, save as + * and exit + */ + QMenu *file_menu; + /** + * This menu provides some informations about the parameterGUI + * and about Qt + */ + QMenu *help_menu; + /** + * This menu provides context menu options for the active tree item. + */ + QMenu *context_menu; + /** + * QAction open a file. + */ + QAction *open_act; + /** + * QAction save a file. + */ + QAction *save_act; + /** + * QAction save as a file. + */ + QAction *save_as_act; + /** + * QAction save as a file. + */ + QAction *settings_act; + /** + * QAction exit the GUI. + */ + QAction *exit_act; + /** + * QAction about the parameterGUI. + */ + QAction *about_act; + /** + * QAction about Qt. + */ + QAction *about_qt_act; + /** + * QAction set_to_default. + */ + QAction *set_to_default_act; - /** - * This value stores the current filename we work on. - */ - QString current_file; - /** - * This dialog shows a short information message after loading a file. - */ - InfoMessage * info_message; + /** + * This value stores the current filename we work on. + */ + QString current_file; + /** + * This dialog shows a short information message after loading a file. + */ + InfoMessage *info_message; - SettingsDialog * settings_dialog; + SettingsDialog *settings_dialog; - /** - * An object for storing user settings. - */ - QSettings * gui_settings; + /** + * An object for storing user settings. + */ + QSettings *gui_settings; }; } -/**@}*/ + /**@}*/ } diff --git a/parameter_delegate.h b/parameter_delegate.h index e531111..bccbac0 100644 --- a/parameter_delegate.h +++ b/parameter_delegate.h @@ -29,75 +29,75 @@ namespace dealii { -/*! @addtogroup ParameterGui - *@{ - */ + /*! @addtogroup ParameterGui + *@{ + */ namespace ParameterGui { -/** - * The ParameterDelegate class implements special delegates for the QTreeWidget class used in the parameterGUI. - * The QTreeWidget class provides some different standard delegates for editing parameters shown in the - * tree structure. The ParameterDelegate class provides special editors for the different types of parameters defined in - * the ParameterHandler class. For all parameter types based on strings as "Anything", "MultipleSelection" "Map" and - * "List" a simple line editor will be shown up. In the case of integer and double type parameters the editor is a spin box and for - * "Selection" type parameters a combo box will be shown up. For parameters of type "FileName" and "DirectoryName" - * the delegate shows a @ref BrowseLineEdit editor. The column of the tree structure with the parameter values has to be set - * in the constructor. - * - * @note This class is used in the graphical user interface for the @ref ParameterHandler class. - * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. - * - * @ingroup ParameterGui - * @author Martin Steigemann, Wolfgang Bangerth, 2010 - */ + /** + * The ParameterDelegate class implements special delegates for the QTreeWidget class used in the parameterGUI. + * The QTreeWidget class provides some different standard delegates for editing parameters shown in the + * tree structure. The ParameterDelegate class provides special editors for the different types of parameters defined in + * the ParameterHandler class. For all parameter types based on strings as "Anything", "MultipleSelection" "Map" and + * "List" a simple line editor will be shown up. In the case of integer and double type parameters the editor is a spin box and for + * "Selection" type parameters a combo box will be shown up. For parameters of type "FileName" and "DirectoryName" + * the delegate shows a @ref BrowseLineEdit editor. The column of the tree structure with the parameter values has to be set + * in the constructor. + * + * @note This class is used in the graphical user interface for the @ref ParameterHandler class. + * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. + * + * @ingroup ParameterGui + * @author Martin Steigemann, Wolfgang Bangerth, 2010 + */ class ParameterDelegate : public QItemDelegate { Q_OBJECT - public: - /** - * Constructor, @p value_column specifies the column - * of the parameter tree this delegate will be used on. - */ - ParameterDelegate (const int value_column, QObject *parent = 0); - /** - * This function creates the appropriate editor for the parameter - * based on the index. - */ - QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &option, - const QModelIndex &index) const; - /** - * Reimplemented from QItemDelegate. - */ - QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; - /** - * Reimplemented from QItemDelegate. - */ - void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; - /** - * Reimplemented from QItemDelegate. - */ - void setEditorData(QWidget *editor, const QModelIndex &index) const; - /** - * Reimplemented from QItemDelegate. - */ - void setModelData(QWidget *editor, QAbstractItemModel *model, - const QModelIndex &index) const; + public: + /** + * Constructor, @p value_column specifies the column + * of the parameter tree this delegate will be used on. + */ + ParameterDelegate (const int value_column, QObject *parent = 0); + /** + * This function creates the appropriate editor for the parameter + * based on the index. + */ + QWidget *createEditor(QWidget *parent, const QStyleOptionViewItem &option, + const QModelIndex &index) const; + /** + * Reimplemented from QItemDelegate. + */ + QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const; + /** + * Reimplemented from QItemDelegate. + */ + void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const; + /** + * Reimplemented from QItemDelegate. + */ + void setEditorData(QWidget *editor, const QModelIndex &index) const; + /** + * Reimplemented from QItemDelegate. + */ + void setModelData(QWidget *editor, QAbstractItemModel *model, + const QModelIndex &index) const; - private slots: - /** - * Reimplemented from QItemDelegate. - */ - void commit_and_close_editor(); + private slots: + /** + * Reimplemented from QItemDelegate. + */ + void commit_and_close_editor(); - private: - /** - * The column this delegate will be used on. - */ - int value_column; + private: + /** + * The column this delegate will be used on. + */ + int value_column; }; } -/**@}*/ + /**@}*/ } diff --git a/prm_parameter_writer.h b/prm_parameter_writer.h index 1908418..da720d7 100644 --- a/prm_parameter_writer.h +++ b/prm_parameter_writer.h @@ -23,66 +23,66 @@ namespace dealii { -/*! @addtogroup ParameterGui - *@{ - */ + /*! @addtogroup ParameterGui + *@{ + */ namespace ParameterGui { -/** - * The PRMParameterWriter class provides an interface to write parameters - * stored in a QTreeWidget to a file in deal.II's PRM format. - * This class only writes parameters that deviate from their default values to - * improve the readability of the created file. - * - * @note This class is used in the graphical user interface for the - * @ref ParameterHandler class. - * It is not compiled into the deal.II libraries and can not be used by - * applications using deal.II. - * - * @ingroup ParameterGui - * @author Rene Gassmoeller, 2017 - */ + /** + * The PRMParameterWriter class provides an interface to write parameters + * stored in a QTreeWidget to a file in deal.II's PRM format. + * This class only writes parameters that deviate from their default values to + * improve the readability of the created file. + * + * @note This class is used in the graphical user interface for the + * @ref ParameterHandler class. + * It is not compiled into the deal.II libraries and can not be used by + * applications using deal.II. + * + * @ingroup ParameterGui + * @author Rene Gassmoeller, 2017 + */ class PRMParameterWriter { - public: - /** - * Constructor. - * Parameter values from @p tree_widget will be written. - */ - PRMParameterWriter (QTreeWidget *tree_widget); + public: + /** + * Constructor. + * Parameter values from @p tree_widget will be written. + */ + PRMParameterWriter (QTreeWidget *tree_widget); - /** - * This function writes the parameter values stored in tree_widget - * to @p device in the PRM format. - */ - bool write_prm_file (QIODevice *device); + /** + * This function writes the parameter values stored in tree_widget + * to @p device in the PRM format. + */ + bool write_prm_file (QIODevice *device); - private: - /** - * This function creates a string that corresponds to the data written - * to a prm file for a given @p item of tree_widget. - * If the @p item is a parameter it is only written if its value differs - * from its default value. If the @p item is a subsection, a start element - * subsection is written and write_item is called - * recursively to write the next item. - * If no items in this subsection differ from their default values then - * the subsection is not written. - * @p indentation_level describes the level the current item belongs to. - * 0 describes a top level item and each subsection increases the level - * by one. - * - */ - QString item_to_string (const QTreeWidgetItem *item, - const unsigned int indentation_level); + private: + /** + * This function creates a string that corresponds to the data written + * to a prm file for a given @p item of tree_widget. + * If the @p item is a parameter it is only written if its value differs + * from its default value. If the @p item is a subsection, a start element + * subsection is written and write_item is called + * recursively to write the next item. + * If no items in this subsection differ from their default values then + * the subsection is not written. + * @p indentation_level describes the level the current item belongs to. + * 0 describes a top level item and each subsection increases the level + * by one. + * + */ + QString item_to_string (const QTreeWidgetItem *item, + const unsigned int indentation_level); - /** - * A pointer to the QTreeWidget structure - * which stores the parameters. - */ - QTreeWidget * tree_widget; + /** + * A pointer to the QTreeWidget structure + * which stores the parameters. + */ + QTreeWidget *tree_widget; }; } -/**@}*/ + /**@}*/ } diff --git a/settings_dialog.h b/settings_dialog.h index aa7ab9d..04edc8b 100644 --- a/settings_dialog.h +++ b/settings_dialog.h @@ -24,32 +24,32 @@ namespace dealii { -/*! @addtogroup ParameterGui - *@{ - */ + /*! @addtogroup ParameterGui + *@{ + */ namespace ParameterGui { -/** - * The SettingsDialog class implements a settings dialog for the parameterGUI. - * The dialog shows all available settings, and when the user clicks on 'OK' - * stores them in the QSettings object handed over in the constructor (which - * in turn stores them on disk to allow persistent settings). - * - * @ingroup ParameterGui - * @author Rene Gassmoeller, 2017 - */ + /** + * The SettingsDialog class implements a settings dialog for the parameterGUI. + * The dialog shows all available settings, and when the user clicks on 'OK' + * stores them in the QSettings object handed over in the constructor (which + * in turn stores them on disk to allow persistent settings). + * + * @ingroup ParameterGui + * @author Rene Gassmoeller, 2017 + */ class SettingsDialog : public QDialog { Q_OBJECT - public: + public: /** * Constructor */ SettingsDialog (QSettings *settings, QWidget *parent = 0); - public slots: + public slots: /** * Function that displays a font selection dialog and stores the result. */ @@ -71,7 +71,7 @@ namespace dealii */ void loadSettings(); - private: + private: /** * This variable stores if the default values should be hidden. This * might seem duplicative, since it is also stored in settings, @@ -88,30 +88,30 @@ namespace dealii /** * The Ok button. */ - QPushButton * ok; + QPushButton *ok; /** * The Cancel button. */ - QPushButton * cancel; + QPushButton *cancel; /** * The Change font button. */ - QPushButton * change_font; + QPushButton *change_font; /** * The checkboxHide default values. */ - QCheckBox * hide_default; + QCheckBox *hide_default; /** * An object for storing settings in a file. */ - QSettings * settings; + QSettings *settings; }; } -/**@}*/ + /**@}*/ } diff --git a/xml_parameter_reader.h b/xml_parameter_reader.h index 41e8a9f..f2789d0 100644 --- a/xml_parameter_reader.h +++ b/xml_parameter_reader.h @@ -25,103 +25,103 @@ namespace dealii { -/*! @addtogroup ParameterGui - *@{ - */ + /*! @addtogroup ParameterGui + *@{ + */ namespace ParameterGui { -/** - * The XMLParameterReader class provides an interface to parse parameters from XML files to a QTreeWidget. - * This class makes extensive use of the QXmlStreamReader class, which implements the basic functionalities - * for parsing XML files. - * - * @note This class is used in the graphical user interface for the @ref ParameterHandler class. - * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. - * - * @ingroup ParameterGui - * @author Martin Steigemann, Wolfgang Bangerth, 2010 - */ + /** + * The XMLParameterReader class provides an interface to parse parameters from XML files to a QTreeWidget. + * This class makes extensive use of the QXmlStreamReader class, which implements the basic functionalities + * for parsing XML files. + * + * @note This class is used in the graphical user interface for the @ref ParameterHandler class. + * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. + * + * @ingroup ParameterGui + * @author Martin Steigemann, Wolfgang Bangerth, 2010 + */ class XMLParameterReader { - public: - /** - * Constructor. - * The parameter values will be stored in @p tree_widget. - */ - XMLParameterReader (QTreeWidget *tree_widget); - /** - * This function reads the parameters from @p device into the tree_widget. - * We use the QXmlStreamReader class for this. - * There must be a start element - * <ParameterHandler> - * and an end element </ParameterHandler> - * otherwise an exception is thrown. - */ - bool read_xml_file (QIODevice *device); - /** - * This function returns an error message. - */ - QString error_string () const; + public: + /** + * Constructor. + * The parameter values will be stored in @p tree_widget. + */ + XMLParameterReader (QTreeWidget *tree_widget); + /** + * This function reads the parameters from @p device into the tree_widget. + * We use the QXmlStreamReader class for this. + * There must be a start element + * <ParameterHandler> + * and an end element </ParameterHandler> + * otherwise an exception is thrown. + */ + bool read_xml_file (QIODevice *device); + /** + * This function returns an error message. + */ + QString error_string () const; - private: - /** - * This function implements a loop over the XML file - * and parses XML elements. It calls @ref read_subsection_element - * till the </ParameterHandler> element is found - * or the end of the file is reached. In this case, an exception is thrown. - */ - void parse_parameters (); - /** - * This functions parses a subsection. - * and adds it as a child to @p parent. - * If the next element is <value>, - * this functions calls @ref read_parameter_element - * otherwise the function itself recursively. - */ - void read_subsection_element (QTreeWidgetItem *parent); - /** - * This function parses a parameter and - * and adds it as a child to @p parent. - * A parameter description consists of five elements: - * @code - * value - * default_value - * documentation - * pattern - * [pattern_description] - * @endcode - * If a parameter description is incomplete, an exception - * is thrown. - */ - void read_parameter_element (QTreeWidgetItem *parent); - /** - * Reimplemented from the @ref ParameterHandler class. - * Unmangle a string @p s into its original form. - */ - QString demangle (const QString &s); - /** - * This helper function creates a new child of @p item in the tree. - */ - QTreeWidgetItem * create_child_item(QTreeWidgetItem *item); - /** - * The QXmlStreamReader object for reading XML elements. - */ - QXmlStreamReader xml; - /** - * A pointer to the tree structure. - */ - QTreeWidget * tree_widget; - /** - * An icon for subsections in the tree structure. - */ - QIcon subsection_icon; - /** - * An icon for parameters in the tree structure. - */ - QIcon parameter_icon; + private: + /** + * This function implements a loop over the XML file + * and parses XML elements. It calls @ref read_subsection_element + * till the </ParameterHandler> element is found + * or the end of the file is reached. In this case, an exception is thrown. + */ + void parse_parameters (); + /** + * This functions parses a subsection. + * and adds it as a child to @p parent. + * If the next element is <value>, + * this functions calls @ref read_parameter_element + * otherwise the function itself recursively. + */ + void read_subsection_element (QTreeWidgetItem *parent); + /** + * This function parses a parameter and + * and adds it as a child to @p parent. + * A parameter description consists of five elements: + * @code + * value + * default_value + * documentation + * pattern + * [pattern_description] + * @endcode + * If a parameter description is incomplete, an exception + * is thrown. + */ + void read_parameter_element (QTreeWidgetItem *parent); + /** + * Reimplemented from the @ref ParameterHandler class. + * Unmangle a string @p s into its original form. + */ + QString demangle (const QString &s); + /** + * This helper function creates a new child of @p item in the tree. + */ + QTreeWidgetItem *create_child_item(QTreeWidgetItem *item); + /** + * The QXmlStreamReader object for reading XML elements. + */ + QXmlStreamReader xml; + /** + * A pointer to the tree structure. + */ + QTreeWidget *tree_widget; + /** + * An icon for subsections in the tree structure. + */ + QIcon subsection_icon; + /** + * An icon for parameters in the tree structure. + */ + QIcon parameter_icon; }; } -/**@}*/ + /**@}*/ } diff --git a/xml_parameter_writer.h b/xml_parameter_writer.h index de2f425..2010e91 100644 --- a/xml_parameter_writer.h +++ b/xml_parameter_writer.h @@ -24,76 +24,76 @@ namespace dealii { -/*! @addtogroup ParameterGui - *@{ - */ + /*! @addtogroup ParameterGui + *@{ + */ namespace ParameterGui { -/** - * The XMLParameterWriter class provides an interface to write parameters stored in a QTreeWidget to a file in XML format. - * This class makes extensive use of the QXmlStreamWriter class, which implements the basic functionalities for writing - * XML files. - * - * @note This class is used in the graphical user interface for the @ref ParameterHandler class. - * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. - * - * @ingroup ParameterGui - * @author Martin Steigemann, Wolfgang Bangerth, 2010 - */ + /** + * The XMLParameterWriter class provides an interface to write parameters stored in a QTreeWidget to a file in XML format. + * This class makes extensive use of the QXmlStreamWriter class, which implements the basic functionalities for writing + * XML files. + * + * @note This class is used in the graphical user interface for the @ref ParameterHandler class. + * It is not compiled into the deal.II libraries and can not be used by applications using deal.II. + * + * @ingroup ParameterGui + * @author Martin Steigemann, Wolfgang Bangerth, 2010 + */ class XMLParameterWriter { - public: - /** - * Constructor. - * Parameter values from @p tree_widget will be written. - */ - XMLParameterWriter (QTreeWidget *tree_widget); - /** - * This function writes the parameter values stored in tree_widget - * to @p device in XML format. We use the QXmlStreamWriter class - * for this. The root element is - * <ParameterHandler> - */ - bool write_xml_file (QIODevice *device); + public: + /** + * Constructor. + * Parameter values from @p tree_widget will be written. + */ + XMLParameterWriter (QTreeWidget *tree_widget); + /** + * This function writes the parameter values stored in tree_widget + * to @p device in XML format. We use the QXmlStreamWriter class + * for this. The root element is + * <ParameterHandler> + */ + bool write_xml_file (QIODevice *device); - private: - /** - * This function writes a given @p item of tree_widget - * to a file in XML format. For this the QXmlStreamWriter class is used. - * If the @p item is a parameter, the elements that describes this parameter - * are written: - * @code - * value - * default_value - * documentation - * pattern - * [pattern_description] - * @endcode - * If the @p item is a subsection, a start element this_subsection is written - * and write_item is called recursively to write the next item. - */ - void write_item (QTreeWidgetItem *item); - /** - * Reimplemented from the @ref ParameterHandler class. - * Mangle a string @p s so that it - * doesn't contain any special - * characters or spaces. - */ - QString mangle (const QString &s); - /** - * An QXmlStreamWriter object - * which implements the functionalities - * we need for writing parameters to XML files. - */ - QXmlStreamWriter xml; - /** - * A pointer to the QTreeWidget structure - * which stores the parameters. - */ - QTreeWidget * tree_widget; + private: + /** + * This function writes a given @p item of tree_widget + * to a file in XML format. For this the QXmlStreamWriter class is used. + * If the @p item is a parameter, the elements that describes this parameter + * are written: + * @code + * value + * default_value + * documentation + * pattern + * [pattern_description] + * @endcode + * If the @p item is a subsection, a start element this_subsection is written + * and write_item is called recursively to write the next item. + */ + void write_item (QTreeWidgetItem *item); + /** + * Reimplemented from the @ref ParameterHandler class. + * Mangle a string @p s so that it + * doesn't contain any special + * characters or spaces. + */ + QString mangle (const QString &s); + /** + * An QXmlStreamWriter object + * which implements the functionalities + * we need for writing parameters to XML files. + */ + QXmlStreamWriter xml; + /** + * A pointer to the QTreeWidget structure + * which stores the parameters. + */ + QTreeWidget *tree_widget; }; } -/**@}*/ + /**@}*/ } -- 2.39.5