added primitve helps

This commit is contained in:
nemu 2009-03-19 07:58:16 +00:00
parent e3eb423cbe
commit d3be43ff70
13 changed files with 226 additions and 156 deletions

View File

@ -108,6 +108,8 @@ bool PAdminXMLParser::endElement( const QString&, const QString&, const QString&
*/ */
bool PAdminXMLParser::characters(const QString& str) bool PAdminXMLParser::characters(const QString& str)
{ {
QString help;
switch (fKeyWord) { switch (fKeyWord) {
case eExecPath: case eExecPath:
fAdmin->setExecPath(QString(str.ascii()).stripWhiteSpace()); fAdmin->setExecPath(QString(str.ascii()).stripWhiteSpace());
@ -135,7 +137,10 @@ bool PAdminXMLParser::characters(const QString& str)
fAdmin->setMsrDefaultFilePath(QString(str.ascii()).stripWhiteSpace()); fAdmin->setMsrDefaultFilePath(QString(str.ascii()).stripWhiteSpace());
break; break;
case eHelpMain: case eHelpMain:
fAdmin->setHelpMain(str); help = str;
help.replace(">", ">");
help.replace("&lt;", "<");
fAdmin->setHelpMain(help);
break; break;
default: default:
break; break;
@ -170,6 +175,8 @@ PAdmin::PAdmin()
fInstitute = QString(""); fInstitute = QString("");
fFileFormat = QString(""); fFileFormat = QString("");
fHelpMain = QString("");
// XML Parser part // XML Parser part
QString path = getenv("MUSRFITPATH"); QString path = getenv("MUSRFITPATH");
if (path.isEmpty()) if (path.isEmpty())

View File

@ -32,6 +32,7 @@
#include <qlineedit.h> #include <qlineedit.h>
#include <qvalidator.h> #include <qvalidator.h>
#include <qcombobox.h> #include <qcombobox.h>
#include <qmessagebox.h>
#include "PGetAsymmetryRunBlockDialog.h" #include "PGetAsymmetryRunBlockDialog.h"
@ -39,7 +40,10 @@
/** /**
* <p> * <p>
*/ */
PGetAsymmetryRunBlockDialog::PGetAsymmetryRunBlockDialog() PGetAsymmetryRunBlockDialog::PGetAsymmetryRunBlockDialog(const QString help, QWidget *parent, const char *name,
bool modal, WFlags f) :
fHelp(help),
PGetAsymmetryRunBlockDialogBase(parent, name, modal, f)
{ {
fForward_lineEdit->setValidator( new QIntValidator(fForward_lineEdit) ); fForward_lineEdit->setValidator( new QIntValidator(fForward_lineEdit) );
fBackward_lineEdit->setValidator( new QIntValidator(fBackward_lineEdit) ); fBackward_lineEdit->setValidator( new QIntValidator(fBackward_lineEdit) );
@ -66,7 +70,7 @@ PGetAsymmetryRunBlockDialog::PGetAsymmetryRunBlockDialog()
/** /**
* <p> * <p>
*/ */
QString PGetAsymmetryRunBlockDialog::GetRunHeaderInfo() QString PGetAsymmetryRunBlockDialog::getRunHeaderInfo()
{ {
QString str; QString str;
@ -82,7 +86,7 @@ QString PGetAsymmetryRunBlockDialog::GetRunHeaderInfo()
/** /**
* <p> * <p>
*/ */
QString PGetAsymmetryRunBlockDialog::GetAlphaParameter(bool &present) QString PGetAsymmetryRunBlockDialog::getAlphaParameter(bool &present)
{ {
QString str = "alpha " + fAlpha_lineEdit->text() + "\n"; QString str = "alpha " + fAlpha_lineEdit->text() + "\n";
@ -98,7 +102,7 @@ QString PGetAsymmetryRunBlockDialog::GetAlphaParameter(bool &present)
/** /**
* <p> * <p>
*/ */
QString PGetAsymmetryRunBlockDialog::GetBetaParameter(bool &present) QString PGetAsymmetryRunBlockDialog::getBetaParameter(bool &present)
{ {
QString str = "beta " + fBeta_lineEdit->text() + "\n"; QString str = "beta " + fBeta_lineEdit->text() + "\n";
@ -114,7 +118,7 @@ QString PGetAsymmetryRunBlockDialog::GetBetaParameter(bool &present)
/** /**
* <p> * <p>
*/ */
QString PGetAsymmetryRunBlockDialog::GetMap(bool &valid) QString PGetAsymmetryRunBlockDialog::getMap(bool &valid)
{ {
QString str = fMap_lineEdit->text().stripWhiteSpace().remove(" "); QString str = fMap_lineEdit->text().stripWhiteSpace().remove(" ");
@ -135,7 +139,7 @@ QString PGetAsymmetryRunBlockDialog::GetMap(bool &valid)
/** /**
* <p> * <p>
*/ */
QString PGetAsymmetryRunBlockDialog::GetBackground(bool &valid) QString PGetAsymmetryRunBlockDialog::getBackground(bool &valid)
{ {
QString str = ""; QString str = "";
@ -169,7 +173,7 @@ QString PGetAsymmetryRunBlockDialog::GetBackground(bool &valid)
/** /**
* <p> * <p>
*/ */
QString PGetAsymmetryRunBlockDialog::GetData(bool &valid) QString PGetAsymmetryRunBlockDialog::getData(bool &valid)
{ {
QString str = ""; QString str = "";
@ -192,7 +196,7 @@ QString PGetAsymmetryRunBlockDialog::GetData(bool &valid)
/** /**
* <p> * <p>
*/ */
QString PGetAsymmetryRunBlockDialog::GetT0(bool &present) QString PGetAsymmetryRunBlockDialog::getT0(bool &present)
{ {
QString str = ""; QString str = "";
@ -212,7 +216,7 @@ QString PGetAsymmetryRunBlockDialog::GetT0(bool &present)
/** /**
* <p> * <p>
*/ */
QString PGetAsymmetryRunBlockDialog::GetFitRange(bool &valid) QString PGetAsymmetryRunBlockDialog::getFitRange(bool &valid)
{ {
QString str = ""; QString str = "";
@ -233,7 +237,7 @@ QString PGetAsymmetryRunBlockDialog::GetFitRange(bool &valid)
/** /**
* <p> * <p>
*/ */
QString PGetAsymmetryRunBlockDialog::GetPacking(bool &present) QString PGetAsymmetryRunBlockDialog::getPacking(bool &present)
{ {
QString str = ""; QString str = "";
@ -248,6 +252,16 @@ QString PGetAsymmetryRunBlockDialog::GetPacking(bool &present)
return str; return str;
} }
//----------------------------------------------------------------------------------------------------
/**
* <p>
*/
void PGetAsymmetryRunBlockDialog::helpContents()
{
QMessageBox::information(this, "helpContents",
fHelp, QMessageBox::Ok);
}
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
// END // END
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------

View File

@ -37,19 +37,26 @@
class PGetAsymmetryRunBlockDialog : public PGetAsymmetryRunBlockDialogBase class PGetAsymmetryRunBlockDialog : public PGetAsymmetryRunBlockDialogBase
{ {
public: public:
PGetAsymmetryRunBlockDialog(); PGetAsymmetryRunBlockDialog(const QString help = "", QWidget * parent = 0, const char * name = 0,
bool modal = FALSE, WFlags f = 0);
QString GetRunHeaderInfo(); QString getRunHeaderInfo();
QString GetAlphaParameter(bool &present); QString getAlphaParameter(bool &present);
QString GetBetaParameter(bool &present); QString getBetaParameter(bool &present);
QString GetMap(bool &valid); QString getMap(bool &valid);
QString GetForward() { return QString("forward " + fForward_lineEdit->text() + "\n"); } QString getForward() { return QString("forward " + fForward_lineEdit->text() + "\n"); }
QString GetBackward() { return QString("backward " + fBackward_lineEdit->text() + "\n"); } QString getBackward() { return QString("backward " + fBackward_lineEdit->text() + "\n"); }
QString GetBackground(bool &valid); QString getBackground(bool &valid);
QString GetData(bool &valid); QString getData(bool &valid);
QString GetT0(bool &present); QString getT0(bool &present);
QString GetFitRange(bool &valid); QString getFitRange(bool &valid);
QString GetPacking(bool &present); QString getPacking(bool &present);
private slots:
void helpContents();
private:
QString fHelp;
}; };
#endif // _PGETASYMMETRYRUNBLOCKDIALOG_H_ #endif // _PGETASYMMETRYRUNBLOCKDIALOG_H_

View File

@ -33,6 +33,7 @@
#include <qvalidator.h> #include <qvalidator.h>
#include <qcombobox.h> #include <qcombobox.h>
#include <qcheckbox.h> #include <qcheckbox.h>
#include <qmessagebox.h>
#include "PGetSingleHistoRunBlockDialog.h" #include "PGetSingleHistoRunBlockDialog.h"
@ -40,10 +41,11 @@
/** /**
* <p> * <p>
*/ */
PGetSingleHistoRunBlockDialog::PGetSingleHistoRunBlockDialog(QWidget * parent, const char *name, PGetSingleHistoRunBlockDialog::PGetSingleHistoRunBlockDialog(const QString help, const bool lifetimeCorrection,
bool modal, WFlags f, QWidget * parent, const char *name,
const bool lifetimeCorrection) : bool modal, WFlags f) :
PGetSingleHistoRunBlockDialogBase(parent, name, modal, f) PGetSingleHistoRunBlockDialogBase(parent, name, modal, f),
fHelp(help)
{ {
fForward_lineEdit->setValidator( new QIntValidator(fForward_lineEdit) ); fForward_lineEdit->setValidator( new QIntValidator(fForward_lineEdit) );
fNorm_lineEdit->setValidator( new QIntValidator(fNorm_lineEdit) ); fNorm_lineEdit->setValidator( new QIntValidator(fNorm_lineEdit) );
@ -65,7 +67,7 @@ PGetSingleHistoRunBlockDialog::PGetSingleHistoRunBlockDialog(QWidget * parent, c
/** /**
* <p> * <p>
*/ */
QString PGetSingleHistoRunBlockDialog::GetRunHeaderInfo() QString PGetSingleHistoRunBlockDialog::getRunHeaderInfo()
{ {
QString str=""; QString str="";
@ -81,7 +83,7 @@ QString PGetSingleHistoRunBlockDialog::GetRunHeaderInfo()
/** /**
* <p> * <p>
*/ */
QString PGetSingleHistoRunBlockDialog::GetMap(bool &valid) QString PGetSingleHistoRunBlockDialog::getMap(bool &valid)
{ {
QString str = fMap_lineEdit->text().stripWhiteSpace().remove(" "); QString str = fMap_lineEdit->text().stripWhiteSpace().remove(" ");
@ -102,7 +104,7 @@ QString PGetSingleHistoRunBlockDialog::GetMap(bool &valid)
/** /**
* <p> * <p>
*/ */
QString PGetSingleHistoRunBlockDialog::GetData(bool &valid) QString PGetSingleHistoRunBlockDialog::getData(bool &valid)
{ {
QString str=""; QString str="";
@ -122,7 +124,7 @@ QString PGetSingleHistoRunBlockDialog::GetData(bool &valid)
/** /**
* <p> * <p>
*/ */
QString PGetSingleHistoRunBlockDialog::GetBackground(bool &valid) QString PGetSingleHistoRunBlockDialog::getBackground(bool &valid)
{ {
QString str=""; QString str="";
@ -157,7 +159,7 @@ QString PGetSingleHistoRunBlockDialog::GetBackground(bool &valid)
/** /**
* <p> * <p>
*/ */
QString PGetSingleHistoRunBlockDialog::GetFitRange(bool &valid) QString PGetSingleHistoRunBlockDialog::getFitRange(bool &valid)
{ {
QString str=""; QString str="";
@ -178,7 +180,7 @@ QString PGetSingleHistoRunBlockDialog::GetFitRange(bool &valid)
/** /**
* <p> * <p>
*/ */
QString PGetSingleHistoRunBlockDialog::GetPacking(bool &present) QString PGetSingleHistoRunBlockDialog::getPacking(bool &present)
{ {
QString str=""; QString str="";
@ -197,7 +199,7 @@ QString PGetSingleHistoRunBlockDialog::GetPacking(bool &present)
/** /**
* <p> * <p>
*/ */
QString PGetSingleHistoRunBlockDialog::GetT0(bool &present) QString PGetSingleHistoRunBlockDialog::getT0(bool &present)
{ {
QString str=""; QString str="";
@ -216,7 +218,7 @@ QString PGetSingleHistoRunBlockDialog::GetT0(bool &present)
/** /**
* <p> * <p>
*/ */
QString PGetSingleHistoRunBlockDialog::GetMuonLifetimeParam(bool &present) QString PGetSingleHistoRunBlockDialog::getMuonLifetimeParam(bool &present)
{ {
QString str=""; QString str="";
@ -235,7 +237,7 @@ QString PGetSingleHistoRunBlockDialog::GetMuonLifetimeParam(bool &present)
/** /**
* <p> * <p>
*/ */
QString PGetSingleHistoRunBlockDialog::GetLifetimeCorrection(bool &present) QString PGetSingleHistoRunBlockDialog::getLifetimeCorrection(bool &present)
{ {
QString str=""; QString str="";
@ -249,6 +251,16 @@ QString PGetSingleHistoRunBlockDialog::GetLifetimeCorrection(bool &present)
return str; return str;
} }
//----------------------------------------------------------------------------------------------------
/**
* <p>
*/
void PGetSingleHistoRunBlockDialog::helpContents()
{
QMessageBox::information(this, "helpContents",
fHelp, QMessageBox::Ok);
}
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------
// END // END
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------

View File

@ -40,20 +40,27 @@
class PGetSingleHistoRunBlockDialog : public PGetSingleHistoRunBlockDialogBase class PGetSingleHistoRunBlockDialog : public PGetSingleHistoRunBlockDialogBase
{ {
public: public:
PGetSingleHistoRunBlockDialog(QWidget * parent = 0, const char * name = 0, bool modal = FALSE, PGetSingleHistoRunBlockDialog(const QString help = "", const bool lifetimeCorrection = true,
WFlags f = 0, const bool lifetimeCorrection = true); QWidget * parent = 0, const char * name = 0, bool modal = FALSE,
WFlags f = 0);
QString GetRunHeaderInfo(); QString getRunHeaderInfo();
QString GetMap(bool &valid); QString getMap(bool &valid);
QString GetForward() { return QString("forward " + fForward_lineEdit->text() + "\n"); } QString getForward() { return QString("forward " + fForward_lineEdit->text() + "\n"); }
QString GetNorm() { return QString("norm " + fNorm_lineEdit->text() + "\n"); } QString getNorm() { return QString("norm " + fNorm_lineEdit->text() + "\n"); }
QString GetData(bool &valid); QString getData(bool &valid);
QString GetBackground(bool &valid); QString getBackground(bool &valid);
QString GetFitRange(bool &valid); QString getFitRange(bool &valid);
QString GetPacking(bool &present); QString getPacking(bool &present);
QString GetT0(bool &present); QString getT0(bool &present);
QString GetMuonLifetimeParam(bool &present); QString getMuonLifetimeParam(bool &present);
QString GetLifetimeCorrection(bool &present); QString getLifetimeCorrection(bool &present);
private slots:
void helpContents();
private:
QString fHelp;
}; };
#endif // _PGETSINGLEHISTORUNBLOCKDIALOG_H_ #endif // _PGETSINGLEHISTORUNBLOCKDIALOG_H_

View File

@ -48,8 +48,11 @@
/** /**
* <p> * <p>
*/ */
PSubTextEdit::PSubTextEdit(QWidget *parent, const char *name, const bool lifetimeCorrectionFlag) : PSubTextEdit::PSubTextEdit(const bool lifetimeCorrectionFlag, const QString help,
QTextEdit(parent, name), fLifetimeCorrectionFlag(lifetimeCorrectionFlag) QWidget *parent, const char *name) :
QTextEdit(parent, name),
fLifetimeCorrectionFlag(lifetimeCorrectionFlag),
fHelp(help)
{ {
} }
@ -160,7 +163,7 @@ void PSubTextEdit::insertFunctionBlock()
*/ */
void PSubTextEdit::insertAsymRunBlock() void PSubTextEdit::insertAsymRunBlock()
{ {
PGetAsymmetryRunBlockDialog *dlg = new PGetAsymmetryRunBlockDialog(); PGetAsymmetryRunBlockDialog *dlg = new PGetAsymmetryRunBlockDialog(fHelp);
if (dlg->exec() == QDialog::Accepted) { if (dlg->exec() == QDialog::Accepted) {
QString str, workStr; QString str, workStr;
bool valid = true, present = true; bool valid = true, present = true;
@ -168,25 +171,25 @@ void PSubTextEdit::insertAsymRunBlock()
// STILL MISSING // STILL MISSING
// add run line // add run line
str += dlg->GetRunHeaderInfo(); str += dlg->getRunHeaderInfo();
// add fittype // add fittype
str += "fittype 2 (asymmetry fit)\n"; str += "fittype 2 (asymmetry fit)\n";
// add alpha if present // add alpha if present
workStr = dlg->GetAlphaParameter(present); workStr = dlg->getAlphaParameter(present);
if (present) { if (present) {
str += workStr; str += workStr;
} }
// add beta if present // add beta if present
workStr = dlg->GetBetaParameter(present); workStr = dlg->getBetaParameter(present);
if (present) { if (present) {
str += workStr; str += workStr;
} }
// add map // add map
workStr = dlg->GetMap(valid); workStr = dlg->getMap(valid);
if (valid) { if (valid) {
str += workStr; str += workStr;
} else { } else {
@ -197,13 +200,13 @@ void PSubTextEdit::insertAsymRunBlock()
} }
// add forward // add forward
str += dlg->GetForward(); str += dlg->getForward();
// add backward // add backward
str += dlg->GetBackward(); str += dlg->getBackward();
// add background or backgr.fix // add background or backgr.fix
workStr = dlg->GetBackground(valid); workStr = dlg->getBackground(valid);
str += workStr; str += workStr;
if (!valid) { if (!valid) {
QMessageBox::critical(this, "**ERROR**", QMessageBox::critical(this, "**ERROR**",
@ -212,7 +215,7 @@ void PSubTextEdit::insertAsymRunBlock()
} }
// add data // add data
workStr = dlg->GetData(valid); workStr = dlg->getData(valid);
if (valid) { if (valid) {
str += workStr; str += workStr;
} else { } else {
@ -222,7 +225,7 @@ void PSubTextEdit::insertAsymRunBlock()
} }
// add t0 if present // add t0 if present
workStr = dlg->GetT0(present); workStr = dlg->getT0(present);
if (present) { if (present) {
str += workStr; str += workStr;
} else { } else {
@ -232,7 +235,7 @@ void PSubTextEdit::insertAsymRunBlock()
} }
// add fit range // add fit range
workStr = dlg->GetFitRange(valid); workStr = dlg->getFitRange(valid);
str += workStr; str += workStr;
if (!valid) { if (!valid) {
QMessageBox::critical(this, "**ERROR**", QMessageBox::critical(this, "**ERROR**",
@ -241,7 +244,7 @@ void PSubTextEdit::insertAsymRunBlock()
} }
// add packing // add packing
workStr = dlg->GetPacking(present); workStr = dlg->getPacking(present);
str += workStr; str += workStr;
if (!present) { if (!present) {
QMessageBox::critical(this, "**ERROR**", QMessageBox::critical(this, "**ERROR**",
@ -260,7 +263,7 @@ void PSubTextEdit::insertAsymRunBlock()
*/ */
void PSubTextEdit::insertSingleHistRunBlock() void PSubTextEdit::insertSingleHistRunBlock()
{ {
PGetSingleHistoRunBlockDialog *dlg = new PGetSingleHistoRunBlockDialog(); PGetSingleHistoRunBlockDialog *dlg = new PGetSingleHistoRunBlockDialog(fHelp);
if (dlg->exec() == QDialog::Accepted) { if (dlg->exec() == QDialog::Accepted) {
QString str, workStr; QString str, workStr;
bool valid = true, present = true; bool valid = true, present = true;
@ -268,13 +271,13 @@ void PSubTextEdit::insertSingleHistRunBlock()
// STILL MISSING // STILL MISSING
// add run line // add run line
str += dlg->GetRunHeaderInfo(); str += dlg->getRunHeaderInfo();
// add fittype // add fittype
str += "fittype 0 (single histogram fit)\n"; str += "fittype 0 (single histogram fit)\n";
// add map // add map
workStr = dlg->GetMap(valid); workStr = dlg->getMap(valid);
if (valid) { if (valid) {
str += workStr; str += workStr;
} else { } else {
@ -285,25 +288,25 @@ void PSubTextEdit::insertSingleHistRunBlock()
} }
// add forward // add forward
str += dlg->GetForward(); str += dlg->getForward();
// add norm // add norm
str += dlg->GetNorm(); str += dlg->getNorm();
// add lifetime parameter // add lifetime parameter
workStr = dlg->GetMuonLifetimeParam(present); workStr = dlg->getMuonLifetimeParam(present);
if (present) { if (present) {
str += workStr; str += workStr;
} }
// add lifetime correction flag if present // add lifetime correction flag if present
workStr = dlg->GetLifetimeCorrection(present); workStr = dlg->getLifetimeCorrection(present);
if (present) { if (present) {
str += workStr; str += workStr;
} }
// add background, backgr.fix or backgr.fit // add background, backgr.fix or backgr.fit
workStr = dlg->GetBackground(valid); workStr = dlg->getBackground(valid);
str += workStr; str += workStr;
if (!valid) { if (!valid) {
QMessageBox::critical(this, "**ERROR**", QMessageBox::critical(this, "**ERROR**",
@ -312,7 +315,7 @@ void PSubTextEdit::insertSingleHistRunBlock()
} }
// add t0 if present // add t0 if present
workStr = dlg->GetT0(present); workStr = dlg->getT0(present);
if (present) { if (present) {
str += workStr; str += workStr;
} else { } else {
@ -322,7 +325,7 @@ void PSubTextEdit::insertSingleHistRunBlock()
} }
// add data // add data
workStr = dlg->GetData(valid); workStr = dlg->getData(valid);
if (valid) { if (valid) {
str += workStr; str += workStr;
} else { } else {
@ -332,7 +335,7 @@ void PSubTextEdit::insertSingleHistRunBlock()
} }
// add fit range // add fit range
workStr = dlg->GetFitRange(valid); workStr = dlg->getFitRange(valid);
str += workStr; str += workStr;
if (!valid) { if (!valid) {
QMessageBox::critical(this, "**ERROR**", QMessageBox::critical(this, "**ERROR**",
@ -341,7 +344,7 @@ void PSubTextEdit::insertSingleHistRunBlock()
} }
// add packing // add packing
workStr = dlg->GetPacking(present); workStr = dlg->getPacking(present);
str += workStr; str += workStr;
if (!present) { if (!present) {
QMessageBox::critical(this, "**ERROR**", QMessageBox::critical(this, "**ERROR**",

View File

@ -39,7 +39,7 @@ class PSubTextEdit : public QTextEdit
Q_OBJECT Q_OBJECT
public: public:
PSubTextEdit( QWidget *parent = 0, const char *name = 0 , const bool lifetimeCorrectionFlag = true); PSubTextEdit(const bool lifetimeCorrectionFlag = true, const QString help ="", QWidget *parent = 0, const char *name = 0);
protected: protected:
virtual QPopupMenu *createPopupMenu( const QPoint &pos); virtual QPopupMenu *createPopupMenu( const QPoint &pos);
@ -59,6 +59,7 @@ class PSubTextEdit : public QTextEdit
private: private:
bool fLifetimeCorrectionFlag; bool fLifetimeCorrectionFlag;
QString fHelp;
}; };

View File

@ -329,7 +329,7 @@ void PTextEdit::load( const QString &f )
{ {
if ( !QFile::exists( f ) ) if ( !QFile::exists( f ) )
return; return;
PSubTextEdit *edit = new PSubTextEdit( fTabWidget, "PSubTextEdit", fAdmin->getLifetimeCorrectionFlag() ); PSubTextEdit *edit = new PSubTextEdit( fAdmin->getLifetimeCorrectionFlag(), fAdmin->getHelpMain() );
edit->setTextFormat( PlainText ); edit->setTextFormat( PlainText );
edit->setFamily("Courier"); edit->setFamily("Courier");
edit->setPointSize(11); // 11pt edit->setPointSize(11); // 11pt
@ -410,7 +410,7 @@ bool PTextEdit::validRunList(const QString runList)
*/ */
void PTextEdit::fileNew() void PTextEdit::fileNew()
{ {
PSubTextEdit *edit = new PSubTextEdit( fTabWidget, "PSubTextEdit", fAdmin->getLifetimeCorrectionFlag() ); PSubTextEdit *edit = new PSubTextEdit( fAdmin->getLifetimeCorrectionFlag(), fAdmin->getHelpMain() );
edit->setTextFormat( PlainText ); edit->setTextFormat( PlainText );
edit->setFamily("Courier"); edit->setFamily("Courier");
edit->setPointSize(11); // 11pt edit->setPointSize(11); // 11pt
@ -1168,8 +1168,8 @@ void PTextEdit::musrSwapMsrMlog()
void PTextEdit::helpContents() void PTextEdit::helpContents()
{ {
QMessageBox::information( this, "helpContents", QMessageBox::information( this, "helpContents",
"Will deliver eventually a help content.\n" fAdmin->getHelpMain(),
"NOT IMPLEMENTED YET :-(" ); QMessageBox::Ok );
} }
//---------------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------------

View File

@ -865,6 +865,12 @@
<receiver>PGetAsymmetryRunBlockDialogBase</receiver> <receiver>PGetAsymmetryRunBlockDialogBase</receiver>
<slot>reject()</slot> <slot>reject()</slot>
</connection> </connection>
<connection>
<sender>fHelp_button</sender>
<signal>clicked()</signal>
<receiver>PGetAsymmetryRunBlockDialogBase</receiver>
<slot>helpContents()</slot>
</connection>
</connections> </connections>
<tabstops> <tabstops>
<tabstop>fRunFileName_lineEdit</tabstop> <tabstop>fRunFileName_lineEdit</tabstop>
@ -895,5 +901,8 @@
<tabstop>fCancel_button</tabstop> <tabstop>fCancel_button</tabstop>
<tabstop>fHelp_button</tabstop> <tabstop>fHelp_button</tabstop>
</tabstops> </tabstops>
<slots>
<slot access="private">helpContents()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
</UI> </UI>

View File

@ -245,6 +245,25 @@
<number>1</number> <number>1</number>
</property> </property>
</widget> </widget>
<widget class="QPushButton">
<property name="name">
<cstring>fAdd_pushButton</cstring>
</property>
<property name="geometry">
<rect>
<x>10</x>
<y>390</y>
<width>56</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string>&amp;Add</string>
</property>
<property name="accel">
<string>Alt+A</string>
</property>
</widget>
<widget class="QTextEdit"> <widget class="QTextEdit">
<property name="name"> <property name="name">
<cstring>fParam_textEdit</cstring> <cstring>fParam_textEdit</cstring>
@ -273,21 +292,24 @@ FITPARAMETER
</widget> </widget>
<widget class="QPushButton"> <widget class="QPushButton">
<property name="name"> <property name="name">
<cstring>fAdd_pushButton</cstring> <cstring>fCancel_pushButton</cstring>
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>10</x> <x>575</x>
<y>390</y> <y>390</y>
<width>56</width> <width>75</width>
<height>26</height> <height>26</height>
</rect> </rect>
</property> </property>
<property name="text"> <property name="text">
<string>&amp;Add</string> <string>&amp;Cancel</string>
</property> </property>
<property name="accel"> <property name="accel">
<string>Alt+A</string> <string></string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property> </property>
</widget> </widget>
<spacer> <spacer>
@ -321,7 +343,7 @@ FITPARAMETER
</property> </property>
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>600</x> <x>515</x>
<y>390</y> <y>390</y>
<width>49</width> <width>49</width>
<height>26</height> <height>26</height>
@ -340,28 +362,6 @@ FITPARAMETER
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton">
<property name="name">
<cstring>fCancel_pushButton</cstring>
</property>
<property name="geometry">
<rect>
<x>520</x>
<y>390</y>
<width>75</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string>&amp;Cancel</string>
</property>
<property name="accel">
<string></string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
</widget> </widget>
<images> <images>
<image name="image0"> <image name="image0">

View File

@ -214,53 +214,6 @@
<string>end value</string> <string>end value</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton">
<property name="name">
<cstring>fCancel_button</cstring>
</property>
<property name="geometry">
<rect>
<x>370</x>
<y>270</y>
<width>75</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string>&amp;Cancel</string>
</property>
<property name="accel">
<string></string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>fOk_button</cstring>
</property>
<property name="geometry">
<rect>
<x>450</x>
<y>270</y>
<width>49</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string>&amp;OK</string>
</property>
<property name="accel">
<string></string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
<spacer> <spacer>
<property name="name"> <property name="name">
<cstring>Horizontal Spacing2</cstring> <cstring>Horizontal Spacing2</cstring>
@ -305,6 +258,53 @@
<string>Alt+A</string> <string>Alt+A</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton">
<property name="name">
<cstring>fCancel_button</cstring>
</property>
<property name="geometry">
<rect>
<x>425</x>
<y>270</y>
<width>75</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string>&amp;Cancel</string>
</property>
<property name="accel">
<string></string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>fOk_button</cstring>
</property>
<property name="geometry">
<rect>
<x>367</x>
<y>270</y>
<width>49</width>
<height>26</height>
</rect>
</property>
<property name="text">
<string>&amp;OK</string>
</property>
<property name="accel">
<string></string>
</property>
<property name="autoDefault">
<bool>true</bool>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</widget> </widget>
<images> <images>
<image name="image0"> <image name="image0">

View File

@ -804,6 +804,12 @@
<receiver>PGetSingleHistoRunBlockDialogBase</receiver> <receiver>PGetSingleHistoRunBlockDialogBase</receiver>
<slot>reject()</slot> <slot>reject()</slot>
</connection> </connection>
<connection>
<sender>fHelp_button</sender>
<signal>clicked()</signal>
<receiver>PGetSingleHistoRunBlockDialogBase</receiver>
<slot>helpContents()</slot>
</connection>
</connections> </connections>
<tabstops> <tabstops>
<tabstop>fRunFileName_lineEdit</tabstop> <tabstop>fRunFileName_lineEdit</tabstop>
@ -829,5 +835,8 @@
<tabstop>fCancel_button</tabstop> <tabstop>fCancel_button</tabstop>
<tabstop>fHelp_button</tabstop> <tabstop>fHelp_button</tabstop>
</tabstops> </tabstops>
<slots>
<slot access="private">helpContents()</slot>
</slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
</UI> </UI>

View File

@ -17,7 +17,8 @@
</msr_file_defaults> </msr_file_defaults>
<help_section> <help_section>
<help_main> <help_main>
For a detailed description of the aim and structure of a msr-file see http://wiki.intranet.psi.ch. For a detailed description of the aim and structure of a msr-file see &lt;b&gt;http://wiki.intranet.psi.ch.&lt;/b&gt;
Starting with &gt;= Qt4.2 this will be linked automatically but until then ...; sorry ;-)
</help_main> </help_main>
</help_section> </help_section>
</musrgui_startup> </musrgui_startup>