connected all the missing signal/slots

This commit is contained in:
nemu 2010-05-12 07:43:25 +00:00
parent c65e205db3
commit 16970b6772
4 changed files with 111 additions and 8 deletions

View File

@ -35,13 +35,15 @@
#include <QTextEdit>
#include <QCheckBox>
#include "PHelp.h"
#include "PMsr2DataDialog.h"
//----------------------------------------------------------------------------------------------------
/**
* <p>
*/
PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam) : fMsr2DataParam(msr2DataParam)
PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString helpUrl) : fMsr2DataParam(msr2DataParam), fHelpUrl(helpUrl)
{
setupUi(this);
@ -246,6 +248,20 @@ void PMsr2DataDialog::fitOnlyChanged(int buttonState)
}
}
//----------------------------------------------------------------------------------------------------
/**
* <p>
*/
void PMsr2DataDialog::helpContent()
{
if (fHelpUrl.isEmpty()) {
QMessageBox::information(this, "**INFO**", "Will eventually show a help window");
} else {
PHelp *help = new PHelp(fHelpUrl);
help->show();
}
}
//----------------------------------------------------------------------------------------------------
// END
//----------------------------------------------------------------------------------------------------

View File

@ -43,7 +43,7 @@ class PMsr2DataDialog : public QDialog, private Ui::PMsr2DataDialog
Q_OBJECT
public:
PMsr2DataDialog(PMsr2DataParam *msr2DataParam);
PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString helpUrl);
virtual int getRunTag() { return fRunTag; }
virtual PMsr2DataParam* getMsr2DataParam();
@ -56,10 +56,12 @@ class PMsr2DataDialog : public QDialog, private Ui::PMsr2DataDialog
void templateRunEntered(const QString&);
void createMsrFileOnlyChanged(int);
void fitOnlyChanged(int);
void helpContent();
private:
int fRunTag; // -1 = not valid, 0 = first last, 1 = run list, 2 = run list file name
int fRunTag; ///< -1 = not valid, 0 = first last, 1 = run list, 2 = run list file name
PMsr2DataParam *fMsr2DataParam;
QString fHelpUrl; ///< help url for the Fourier block
};
#endif // _PMSR2DATADIALOG_H_

View File

@ -1668,7 +1668,7 @@ void PTextEdit::musrMsr2Data()
fMsr2DataParam->fitOnly = false;
}
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam);
PMsr2DataDialog *dlg = new PMsr2DataDialog(fMsr2DataParam, fAdmin->getHelpUrl("msr2data"));
if (dlg == 0) {
QMessageBox::critical(this, "**ERROR**", "Couldn't invoke msr2data dialog, sorry :-(", QMessageBox::Ok, QMessageBox::NoButton);

View File

@ -564,8 +564,8 @@
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>457</x>
<y>488</y>
<x>453</x>
<y>506</y>
</hint>
<hint type="destinationlabel">
<x>380</x>
@ -596,8 +596,8 @@
<slot>fitOnlyChanged(int)</slot>
<hints>
<hint type="sourcelabel">
<x>363</x>
<y>457</y>
<x>406</x>
<y>460</y>
</hint>
<hint type="destinationlabel">
<x>301</x>
@ -621,10 +621,95 @@
</hint>
</hints>
</connection>
<connection>
<sender>fFirst_lineEdit</sender>
<signal>textChanged(QString)</signal>
<receiver>PMsr2DataDialog</receiver>
<slot>runFirstEntered(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>82</x>
<y>44</y>
</hint>
<hint type="destinationlabel">
<x>113</x>
<y>504</y>
</hint>
</hints>
</connection>
<connection>
<sender>fLast_lineEdit</sender>
<signal>textChanged(QString)</signal>
<receiver>PMsr2DataDialog</receiver>
<slot>runLastEntered(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>229</x>
<y>44</y>
</hint>
<hint type="destinationlabel">
<x>348</x>
<y>500</y>
</hint>
</hints>
</connection>
<connection>
<sender>fRunList_lineEdit</sender>
<signal>textChanged(QString)</signal>
<receiver>PMsr2DataDialog</receiver>
<slot>runListEntered(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>151</x>
<y>77</y>
</hint>
<hint type="destinationlabel">
<x>183</x>
<y>515</y>
</hint>
</hints>
</connection>
<connection>
<sender>fRunListFileName_lineEdit</sender>
<signal>textChanged(QString)</signal>
<receiver>PMsr2DataDialog</receiver>
<slot>runListFileNameEntered(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>295</x>
<y>115</y>
</hint>
<hint type="destinationlabel">
<x>332</x>
<y>492</y>
</hint>
</hints>
</connection>
<connection>
<sender>fTemplateRunNumber_lineEdit</sender>
<signal>textChanged(QString)</signal>
<receiver>PMsr2DataDialog</receiver>
<slot>templateRunEntered(QString)</slot>
<hints>
<hint type="sourcelabel">
<x>190</x>
<y>245</y>
</hint>
<hint type="destinationlabel">
<x>137</x>
<y>516</y>
</hint>
</hints>
</connection>
</connections>
<slots>
<slot>helpContent()</slot>
<slot>fitOnlyChanged(int)</slot>
<slot>createMsrFileOnlyChanged(int)</slot>
<slot>runFirstEntered(QString)</slot>
<slot>runLastEntered(QString)</slot>
<slot>runListEntered(QString)</slot>
<slot>runListFileNameEntered(QString)</slot>
<slot>templateRunEntered(QString)</slot>
</slots>
</ui>