Merged muonspin/musrfit:root6 into master
This commit is contained in:
commit
02f7c459c5
@ -39,6 +39,8 @@
|
||||
#include <QDoubleValidator>
|
||||
#include <QTextStream>
|
||||
#include <QPixmap>
|
||||
#include <QGuiApplication>
|
||||
#include <QScreen>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
@ -175,6 +177,12 @@ PMusrStep::PMusrStep(const char *fln, QWidget *parent) :
|
||||
height = 20*fParamVec.size();
|
||||
else
|
||||
height = 900;
|
||||
// make sure that the minimal height is not larger than the screen resolution height
|
||||
QScreen *screen = QGuiApplication::primaryScreen();
|
||||
int hh = screen->geometry().height();
|
||||
if (height > hh)
|
||||
height = hh - 70;
|
||||
|
||||
setMinimumSize(400, height);
|
||||
|
||||
// populate dialog
|
||||
|
@ -103,7 +103,7 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>returns the msr2data relavant parameters from the GUI.
|
||||
* <p>returns the msr2data relevant parameters from the GUI.
|
||||
*/
|
||||
PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
|
||||
{
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include <QFileSystemWatcher>
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include <QRegExp>
|
||||
|
||||
#include <QtDebug>
|
||||
|
||||
@ -2287,7 +2288,11 @@ void PTextEdit::musrMsr2Data()
|
||||
// parameter export list
|
||||
if (!fMsr2DataParam->paramList.isEmpty()) {
|
||||
cmd.append("paramList");
|
||||
QStringList list = fMsr2DataParam->paramList.split(' ');
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(5, 14, 0))
|
||||
QStringList list = fMsr2DataParam->paramList.split(QRegExp("[(\\s|,|;)]"), QString::SkipEmptyParts);
|
||||
#else
|
||||
QStringList list = fMsr2DataParam->paramList.split(QRegExp("[(\\s|,|;)]"), Qt::SkipEmptyParts);
|
||||
#endif
|
||||
for (int i=0; i<list.size(); i++)
|
||||
cmd.append(list[i]);
|
||||
}
|
||||
@ -2859,13 +2864,16 @@ void PTextEdit::musrSwapMsrMlog()
|
||||
return;
|
||||
}
|
||||
|
||||
if (QMessageBox::information(this, "INFO",
|
||||
QString("Will now swap files: %1 <-> %2").arg(currentFileName).arg(swapFileName),
|
||||
QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
|
||||
return;
|
||||
|
||||
// check if the file needs to be saved
|
||||
if (fTabWidget->tabText(fTabWidget->currentIndex()).indexOf("*") > 0) { // needs to be saved first
|
||||
fileSave();
|
||||
}
|
||||
|
||||
QMessageBox::information(nullptr, "INFO", QString("Will now swap files: %1 <-> %2").arg(currentFileName).arg(swapFileName));
|
||||
|
||||
// swap files
|
||||
|
||||
// copy currentFile -> tempFile
|
||||
|
@ -39,6 +39,8 @@
|
||||
#include <QDoubleValidator>
|
||||
#include <QTextStream>
|
||||
#include <QPixmap>
|
||||
#include <QGuiApplication>
|
||||
#include <QScreen>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
@ -175,6 +177,11 @@ PMusrStep::PMusrStep(const char *fln, QWidget *parent) :
|
||||
height = 20*fParamVec.size();
|
||||
else
|
||||
height = 900;
|
||||
// make sure that the minimal height is not larger than the screen resolution height
|
||||
QScreen *screen = QGuiApplication::primaryScreen();
|
||||
int hh = screen->geometry().height();
|
||||
if (height > hh)
|
||||
height = hh - 70;
|
||||
setMinimumSize(400, height);
|
||||
|
||||
// populate dialog
|
||||
|
@ -103,7 +103,7 @@ PMsr2DataDialog::PMsr2DataDialog(PMsr2DataParam *msr2DataParam, const QString he
|
||||
|
||||
//----------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* <p>returns the msr2data relavant parameters from the GUI.
|
||||
* <p>returns the msr2data relevant parameters from the GUI.
|
||||
*/
|
||||
PMsr2DataParam* PMsr2DataDialog::getMsr2DataParam()
|
||||
{
|
||||
|
@ -2288,7 +2288,7 @@ void PTextEdit::musrMsr2Data()
|
||||
// parameter export list
|
||||
if (!fMsr2DataParam->paramList.isEmpty()) {
|
||||
cmd.append("paramList");
|
||||
QStringList list = fMsr2DataParam->paramList.split(' ');
|
||||
QStringList list = fMsr2DataParam->paramList.split(QRegExp("[(\\s|,|;)]"), Qt::SkipEmptyParts);
|
||||
for (int i=0; i<list.size(); i++)
|
||||
cmd.append(list[i]);
|
||||
}
|
||||
@ -2848,13 +2848,16 @@ void PTextEdit::musrSwapMsrMlog()
|
||||
return;
|
||||
}
|
||||
|
||||
if (QMessageBox::information(this, "INFO",
|
||||
QString("Will now swap files: %1 <-> %2").arg(currentFileName).arg(swapFileName),
|
||||
QMessageBox::Ok, QMessageBox::Cancel) == QMessageBox::Cancel)
|
||||
return;
|
||||
|
||||
// check if the file needs to be saved
|
||||
if (fTabWidget->tabText(fTabWidget->currentIndex()).indexOf("*") > 0) { // needs to be saved first
|
||||
fileSave();
|
||||
}
|
||||
|
||||
QMessageBox::information(nullptr, "INFO", QString("Will now swap files: %1 <-> %2").arg(currentFileName).arg(swapFileName));
|
||||
|
||||
// swap files
|
||||
|
||||
// copy currentFile -> tempFile
|
||||
|
Loading…
x
Reference in New Issue
Block a user