From c65e205db3093a0523890809b2e49260b6bc0cff Mon Sep 17 00:00:00 2001 From: nemu Date: Mon, 10 May 2010 10:43:30 +0000 Subject: [PATCH] added some more docu --- src/musredit/PGetAsymmetryRunBlockDialog.cpp | 6 ++- .../PGetSingleHistoRunBlockDialog.cpp | 44 ++++++++++++++----- src/musredit/PGetSingleHistoRunBlockDialog.h | 6 ++- src/musredit/PGetTheoryBlockDialog.cpp | 13 +++--- src/musredit/PGetTheoryBlockDialog.h | 8 +++- src/musredit/PGetTitleBlockDialog.cpp | 6 ++- src/musredit/PGetTitleBlockDialog.h | 6 ++- src/musredit/PHelp.cpp | 22 ++++++---- src/musredit/PHelp.h | 11 +++-- 9 files changed, 87 insertions(+), 35 deletions(-) diff --git a/src/musredit/PGetAsymmetryRunBlockDialog.cpp b/src/musredit/PGetAsymmetryRunBlockDialog.cpp index a85c7bbe..70036ae6 100644 --- a/src/musredit/PGetAsymmetryRunBlockDialog.cpp +++ b/src/musredit/PGetAsymmetryRunBlockDialog.cpp @@ -233,7 +233,8 @@ QString PGetAsymmetryRunBlockDialog::getT0(bool &present) //---------------------------------------------------------------------------------------------------- /** - *

returns a fit range entry for the asymmetry run block. + *

returns a fit range entry for the asymmetry run block. If no fit range has been provided, + * a fit range [0,10] will be set and the valid flag will be set to false. * * \param valid flag indicating if a fit range was provided. */ @@ -256,7 +257,8 @@ QString PGetAsymmetryRunBlockDialog::getFitRange(bool &valid) //---------------------------------------------------------------------------------------------------- /** - *

returns the packing/binning of the asymmetry run block. + *

returns the packing/binning of the asymmetry run block. If no packing has been provided, + * a packing of '1' will be set and the present flag will be set to false. * * \param present flag indicating if a packing parameter was provided. */ diff --git a/src/musredit/PGetSingleHistoRunBlockDialog.cpp b/src/musredit/PGetSingleHistoRunBlockDialog.cpp index 0be381aa..176d769b 100644 --- a/src/musredit/PGetSingleHistoRunBlockDialog.cpp +++ b/src/musredit/PGetSingleHistoRunBlockDialog.cpp @@ -40,7 +40,10 @@ //---------------------------------------------------------------------------------------------------- /** - *

+ *

Constructor. + * + * \param helpUrl help url for the asymmetry run block + * \param lifetimeCorrection flag indicating if lifetime correction shall be enabled. */ PGetSingleHistoRunBlockDialog::PGetSingleHistoRunBlockDialog(const QString helpUrl, const bool lifetimeCorrection) : fHelpUrl(helpUrl) @@ -67,7 +70,7 @@ PGetSingleHistoRunBlockDialog::PGetSingleHistoRunBlockDialog(const QString helpU //---------------------------------------------------------------------------------------------------- /** - *

+ *

returns the run information line of the single histogram run block. */ QString PGetSingleHistoRunBlockDialog::getRunHeaderInfo() { @@ -83,7 +86,9 @@ QString PGetSingleHistoRunBlockDialog::getRunHeaderInfo() //---------------------------------------------------------------------------------------------------- /** - *

+ *

returns the map for the single histogram run block. + * + * \param valid flag indicating if the map is potentially valid. */ QString PGetSingleHistoRunBlockDialog::getMap(bool &valid) { @@ -104,7 +109,9 @@ QString PGetSingleHistoRunBlockDialog::getMap(bool &valid) //---------------------------------------------------------------------------------------------------- /** - *

+ *

returns a data range (in bins) entry for the single histogram run block. + * + * \param valid flag indicating if the data entries are valid. */ QString PGetSingleHistoRunBlockDialog::getData(bool &valid) { @@ -124,7 +131,10 @@ QString PGetSingleHistoRunBlockDialog::getData(bool &valid) //---------------------------------------------------------------------------------------------------- /** - *

+ *

returns the background information for the single histogram run block. + * + * \param valid flag indicating if a valid background (either backgr.fix, background, or backgr.fit is given, but only one) + * is present. */ QString PGetSingleHistoRunBlockDialog::getBackground(bool &valid) { @@ -159,7 +169,10 @@ QString PGetSingleHistoRunBlockDialog::getBackground(bool &valid) //---------------------------------------------------------------------------------------------------- /** - *

+ *

returns a fit range entry for the single histogram run block. If no fit range has been provided, + * a fit range [0,10] will be set and the valid flag will be set to false. + * + * \param valid flag indicating if a fit range was provided. */ QString PGetSingleHistoRunBlockDialog::getFitRange(bool &valid) { @@ -180,7 +193,10 @@ QString PGetSingleHistoRunBlockDialog::getFitRange(bool &valid) //---------------------------------------------------------------------------------------------------- /** - *

+ *

returns the packing/binning of the single histogram run block. If no packing has been provided, + * a packing of '1' will be set and the present flag will be set to false. + * + * \param present flag indicating if a packing parameter was provided. */ QString PGetSingleHistoRunBlockDialog::getPacking(bool &present) { @@ -199,7 +215,9 @@ QString PGetSingleHistoRunBlockDialog::getPacking(bool &present) //---------------------------------------------------------------------------------------------------- /** - *

+ *

returns a t0 parameter for the single histogram run block. + * + * \param present flag indicating if a t0 parameter is set. */ QString PGetSingleHistoRunBlockDialog::getT0(bool &present) { @@ -218,7 +236,9 @@ QString PGetSingleHistoRunBlockDialog::getT0(bool &present) //---------------------------------------------------------------------------------------------------- /** - *

+ *

returns the muon lifetime parameter if present. + * + * \param present flag indicating if a muon life time parameter has been present. */ QString PGetSingleHistoRunBlockDialog::getMuonLifetimeParam(bool &present) { @@ -237,7 +257,9 @@ QString PGetSingleHistoRunBlockDialog::getMuonLifetimeParam(bool &present) //---------------------------------------------------------------------------------------------------- /** - *

+ *

returns the lifetime correction flag. + * + * \param present flag showing if the lifetime correction flag should be set. */ QString PGetSingleHistoRunBlockDialog::getLifetimeCorrection(bool &present) { @@ -255,7 +277,7 @@ QString PGetSingleHistoRunBlockDialog::getLifetimeCorrection(bool &present) //---------------------------------------------------------------------------------------------------- /** - *

+ *

Generates a help content window showing the description of the single histogram run block. */ void PGetSingleHistoRunBlockDialog::helpContent() { diff --git a/src/musredit/PGetSingleHistoRunBlockDialog.h b/src/musredit/PGetSingleHistoRunBlockDialog.h index 94fb5303..7eaae8e7 100644 --- a/src/musredit/PGetSingleHistoRunBlockDialog.h +++ b/src/musredit/PGetSingleHistoRunBlockDialog.h @@ -37,6 +37,10 @@ #include "ui_PGetSingleHistoRunBlockDialog.h" +//-------------------------------------------------------------------------- +/** + *

Class handling the content of the menu: Edit/Add Block/Single Histo Run Block. + */ class PGetSingleHistoRunBlockDialog : public QDialog, private Ui::PGetSingleHistoRunBlockDialog { Q_OBJECT @@ -60,7 +64,7 @@ class PGetSingleHistoRunBlockDialog : public QDialog, private Ui::PGetSingleHist void helpContent(); private: - QString fHelpUrl; + QString fHelpUrl; ///< help url for the asymmetry run block }; #endif // _PGETSINGLEHISTORUNBLOCKDIALOG_H_ diff --git a/src/musredit/PGetTheoryBlockDialog.cpp b/src/musredit/PGetTheoryBlockDialog.cpp index 4f08b960..dcb9ba4c 100644 --- a/src/musredit/PGetTheoryBlockDialog.cpp +++ b/src/musredit/PGetTheoryBlockDialog.cpp @@ -42,7 +42,10 @@ //---------------------------------------------------------------------------------------------------- /** - *

+ *

Constructor. + * + * \param admin pointer to the administration class object needed to extract the default theory set informations. + * \param helpUrl help url for the asymmetry run block */ PGetTheoryBlockDialog::PGetTheoryBlockDialog(PAdmin *admin, const QString helpUrl) : fAdmin(admin), @@ -71,7 +74,7 @@ PGetTheoryBlockDialog::PGetTheoryBlockDialog(PAdmin *admin, const QString helpUr //---------------------------------------------------------------------------------------------------- /** - *

+ *

returns the theory function string of the currently selected theory function. */ QString PGetTheoryBlockDialog::getTheoFuncString() { @@ -98,7 +101,7 @@ QString PGetTheoryBlockDialog::getTheoFuncString() //---------------------------------------------------------------------------------------------------- /** - *

+ *

adds the current theory function to the text field and additionally adds a '+'. */ void PGetTheoryBlockDialog::addPlus() { @@ -108,7 +111,7 @@ void PGetTheoryBlockDialog::addPlus() //---------------------------------------------------------------------------------------------------- /** - *

+ *

adds the current theory function to the text field (newline == '*'). */ void PGetTheoryBlockDialog::addMultiply() { @@ -118,7 +121,7 @@ void PGetTheoryBlockDialog::addMultiply() //---------------------------------------------------------------------------------------------------- /** - *

+ *

Generates a help content window showing the description of the theory block. */ void PGetTheoryBlockDialog::helpContent() { diff --git a/src/musredit/PGetTheoryBlockDialog.h b/src/musredit/PGetTheoryBlockDialog.h index c228168c..1762a61e 100644 --- a/src/musredit/PGetTheoryBlockDialog.h +++ b/src/musredit/PGetTheoryBlockDialog.h @@ -35,6 +35,10 @@ #include "PAdmin.h" #include "ui_PGetTheoryBlockDialog.h" +//----------------------------------------------------------------------------- +/** + *

Class handling the content of the menu: Edit/Add Block/Theory Block. + */ class PGetTheoryBlockDialog : public QDialog, private Ui::PGetTheoryBlockDialog { Q_OBJECT @@ -51,8 +55,8 @@ class PGetTheoryBlockDialog : public QDialog, private Ui::PGetTheoryBlockDialog void helpContent(); private: - PAdmin *fAdmin; - QString fHelpUrl; + PAdmin *fAdmin; ///< pointer to the administration class object needed to extract the default theory set informations. + QString fHelpUrl; ///< help url for the asymmetry run block }; #endif // _PGETTHEORYBLOCKDIALOG_H_ diff --git a/src/musredit/PGetTitleBlockDialog.cpp b/src/musredit/PGetTitleBlockDialog.cpp index 07e28057..6cca2ed2 100644 --- a/src/musredit/PGetTitleBlockDialog.cpp +++ b/src/musredit/PGetTitleBlockDialog.cpp @@ -36,7 +36,9 @@ //--------------------------------------------------------------------------- /** - *

+ *

Constructor. + * + * \param helpUrl help url for the title. */ PGetTitleBlockDialog::PGetTitleBlockDialog(const QString helpUrl) : fHelpUrl(helpUrl) { @@ -47,7 +49,7 @@ PGetTitleBlockDialog::PGetTitleBlockDialog(const QString helpUrl) : fHelpUrl(hel //--------------------------------------------------------------------------- /** - *

+ *

Generates a help content window showing the description of title block. */ void PGetTitleBlockDialog::helpContent() { diff --git a/src/musredit/PGetTitleBlockDialog.h b/src/musredit/PGetTitleBlockDialog.h index 93dfc805..21acb6af 100644 --- a/src/musredit/PGetTitleBlockDialog.h +++ b/src/musredit/PGetTitleBlockDialog.h @@ -35,6 +35,10 @@ #include "musredit.h" #include "ui_PGetTitleBlockDialog.h" +//-------------------------------------------------------------------------- +/** + *

Class handling the content of the menu: Edit/Add Block/Title Block. + */ class PGetTitleBlockDialog : public QDialog, private Ui::PGetTitleBlockDialog { Q_OBJECT @@ -49,7 +53,7 @@ class PGetTitleBlockDialog : public QDialog, private Ui::PGetTitleBlockDialog void helpContent(); private: - QString fHelpUrl; + QString fHelpUrl; ///< help url for the asymmetry run block }; #endif // _PGETTITLEBLOCKDIALOG_H_ diff --git a/src/musredit/PHelp.cpp b/src/musredit/PHelp.cpp index 93ac3214..a63ab6e0 100644 --- a/src/musredit/PHelp.cpp +++ b/src/musredit/PHelp.cpp @@ -32,11 +32,15 @@ #include #include +#include + #include "PHelp.h" //--------------------------------------------------------------------------- /** - *

+ *

Constructor. + * + * \param url help url */ PHelp::PHelp(const QString &url) { @@ -71,7 +75,7 @@ PHelp::PHelp(const QString &url) //--------------------------------------------------------------------------- /** - *

+ *

Destructor */ PHelp::~PHelp() { @@ -88,7 +92,7 @@ PHelp::~PHelp() //--------------------------------------------------------------------------- /** - *

+ *

Called on exit (SLOT). Closes the web-browser help GUI. */ void PHelp::done() { @@ -97,7 +101,7 @@ void PHelp::done() //--------------------------------------------------------------------------- /** - *

+ *

Called after an url is loaded (SLOT). Adjusts the url address. */ void PHelp::adjustLocation() { @@ -106,7 +110,8 @@ void PHelp::adjustLocation() //--------------------------------------------------------------------------- /** - *

+ *

Called when the url address in the line edit changed (SLOT). Will execute + * the load of the new url. */ void PHelp::changeLocation() { @@ -117,7 +122,8 @@ void PHelp::changeLocation() //--------------------------------------------------------------------------- /** - *

+ *

Called when the title changed (SLOT). Will change the window title according + * to the state of the web-browser. */ void PHelp::adjustTitle() { @@ -129,7 +135,7 @@ void PHelp::adjustTitle() //--------------------------------------------------------------------------- /** - *

+ *

Adjusts the progess value while loading an url. Also calls adjustTitle(). */ void PHelp::setProgress(int p) { @@ -139,7 +145,7 @@ void PHelp::setProgress(int p) //--------------------------------------------------------------------------- /** - *

+ *

Ajusts the title when an url has been loaded. */ void PHelp::finishLoading(bool) { diff --git a/src/musredit/PHelp.h b/src/musredit/PHelp.h index ab409cdc..fb2fbc8a 100644 --- a/src/musredit/PHelp.h +++ b/src/musredit/PHelp.h @@ -39,6 +39,11 @@ QT_BEGIN_NAMESPACE class QLineEdit; QT_END_NAMESPACE +//------------------------------------------------------------------------- +/** + *

Class providing the help interface for the user. It opens the wiki docu + * pages such that a user has the chance to read. + */ class PHelp : public QMainWindow { Q_OBJECT @@ -56,9 +61,9 @@ class PHelp : public QMainWindow void finishLoading(bool); private: - QWebView *fView; - QLineEdit *fLocationEdit; - int fProgress; + QWebView *fView; ///< web viewer + QLineEdit *fLocationEdit; ///< url address line edit + int fProgress; ///< progress value (0-100) while loading an url }; #endif // _PHELP_H_