From d977a8cd1af1d8485622ab89676cccd6cee0a241 Mon Sep 17 00:00:00 2001 From: Andreas Suter Date: Tue, 31 May 2022 12:32:58 +0200 Subject: [PATCH] move on to modernize towards modern c++. --- src/external/MagProximity/PMagProximity.h | 4 +-- .../TCalcMeanFieldsLEM.cpp | 10 +++--- src/include/PFourierCanvas.h | 4 +-- src/include/PMusr.h | 36 +++++++++---------- src/include/PMusrCanvas.h | 12 +++---- src/include/PPrepFourier.h | 4 +-- src/include/PRgeHandler.h | 4 +-- src/musredit_qt5/mupp/PmuppScript.h | 4 +-- src/musredit_qt5/mupp/plotter/PMuppCanvas.h | 8 ++--- src/musredit_qt5/musrStep/PMusrStep.h | 4 +-- src/musredit_qt5/musrWiz/PMusrWiz.h | 28 +++++++-------- src/musredit_qt5/musrWiz/musrWiz.h | 4 +-- src/musredit_qt5/musredit/PAdmin.h | 4 +-- src/musredit_qt5/musredit/musredit.h | 8 ++--- src/musredit_qt6/mupp/PmuppScript.h | 4 +-- src/musredit_qt6/mupp/plotter/PMuppCanvas.h | 8 ++--- src/musredit_qt6/musrStep/PMusrStep.h | 4 +-- src/musredit_qt6/musrWiz/PMusrWiz.h | 28 +++++++-------- src/musredit_qt6/musrWiz/musrWiz.h | 4 +-- src/musredit_qt6/musredit/PAdmin.h | 4 +-- src/musredit_qt6/musredit/musredit.h | 8 ++--- 21 files changed, 97 insertions(+), 97 deletions(-) diff --git a/src/external/MagProximity/PMagProximity.h b/src/external/MagProximity/PMagProximity.h index 3a8294f8..a69a6287 100644 --- a/src/external/MagProximity/PMagProximity.h +++ b/src/external/MagProximity/PMagProximity.h @@ -50,11 +50,11 @@ typedef std::vector PDoubleVector; /** *

*/ -typedef struct { +struct PMPRgeData { Double_t energy; PDoubleVector stoppingDistance; PDoubleVector stoppingAmplitude; -} PMPRgeData; +}; //------------------------------------------------------------- /** diff --git a/src/external/libCalcMeanFieldsLEM/TCalcMeanFieldsLEM.cpp b/src/external/libCalcMeanFieldsLEM/TCalcMeanFieldsLEM.cpp index 93951ccb..c4961f95 100644 --- a/src/external/libCalcMeanFieldsLEM/TCalcMeanFieldsLEM.cpp +++ b/src/external/libCalcMeanFieldsLEM/TCalcMeanFieldsLEM.cpp @@ -101,7 +101,7 @@ double TMeanFieldsForScHalfSpace::operator()(double E, const std::vector if (E > energies.back()) return CalcMeanB(energies.back(), BofZ); - energyIter = find_if(energies.begin(), energies.end(), bind2nd( greater(), E)); + energyIter = find_if(energies.begin(), energies.end(), [E](const double ee){ return E < ee; }); //as35: bind2nd( greater(), E)); // cout << *(energyIter - 1) << " " << *(energyIter) << endl; double E1(*(energyIter - 1)); @@ -201,7 +201,7 @@ double TMeanFieldsForScSingleLayer::operator()(double E, const std::vector energies.back()) return CalcMeanB(energies.back(), interfaces, weights, BofZ); - energyIter = find_if(energies.begin(), energies.end(), bind2nd( greater(), E)); + energyIter = find_if(energies.begin(), energies.end(), [E](const double ee){ return E < ee; }); //as35: bind2nd( greater(), E)); // cout << *(energyIter - 1) << " " << *(energyIter) << endl; double E1(*(energyIter - 1)); @@ -310,7 +310,7 @@ double TMeanFieldsForScBilayer::operator()(double E, const std::vector & if (E > energies.back()) return CalcMeanB(energies.back(), interfaces, weights, BofZ, width); - energyIter = find_if(energies.begin(), energies.end(), bind2nd( greater(), E)); + energyIter = find_if(energies.begin(), energies.end(), [E](const double ee){ return E < ee; }); //as35: bind2nd( greater(), E)); // cout << *(energyIter - 1) << " " << *(energyIter) << endl; double E1(*(energyIter - 1)); @@ -425,7 +425,7 @@ double TMeanFieldsForScTrilayer::operator()(double E, const std::vector if (E > energies.back()) return CalcMeanB(energies.back(), interfaces, weights, BofZ); - energyIter = find_if(energies.begin(), energies.end(), bind2nd( greater(), E)); + energyIter = find_if(energies.begin(), energies.end(), [E](const double ee){ return E < ee; }); //as35: bind2nd( greater(), E)); // cout << *(energyIter - 1) << " " << *(energyIter) << endl; double E1(*(energyIter - 1)); @@ -530,7 +530,7 @@ double TMeanFieldsForScTrilayerWithInsulator::operator()(double E, const std::ve if (E > energies.back()) return CalcMeanB(energies.back(), interfaces, weights, BofZ); - energyIter = find_if(energies.begin(), energies.end(), bind2nd( greater(), E)); + energyIter = find_if(energies.begin(), energies.end(), [E](const double ee){ return E < ee; }); //as35: bind2nd( greater(), E)); // cout << *(energyIter - 1) << " " << *(energyIter) << endl; double E1(*(energyIter - 1)); diff --git a/src/include/PFourierCanvas.h b/src/include/PFourierCanvas.h index 7e27f004..205da9ab 100644 --- a/src/include/PFourierCanvas.h +++ b/src/include/PFourierCanvas.h @@ -67,14 +67,14 @@ /** *

Structure holding all necessary Fourier histograms. */ -typedef struct { +struct PFourierCanvasDataSet { TH1F *dataFourierRe; ///< real part of the Fourier transform of the data histogram TH1F *dataFourierIm; ///< imaginary part of the Fourier transform of the data histogram TH1F *dataFourierPwr; ///< power spectrum of the Fourier transform of the data histogram TH1F *dataFourierPhase; ///< phase spectrum of the Fourier transform of the data histogram TH1F *dataFourierPhaseOptReal; ///< phase otpimized real Fourier transform of the data histogram std::vector optPhase; ///< optimal phase which maximizes the real Fourier -} PFourierCanvasDataSet; +}; //------------------------------------------------------------------------ /** diff --git a/src/include/PMusr.h b/src/include/PMusr.h index 248e755c..a555d16c 100644 --- a/src/include/PMusr.h +++ b/src/include/PMusr.h @@ -533,10 +533,10 @@ typedef std::vector PRawRunDataList; /** *

Helper structure for parsing. Keeps a msr-file line string and the corresponding line number. */ -typedef struct { +struct PMsrLineStructure { Int_t fLineNo; ///< original line number of the msr-file TString fLine; ///< msr-file line -} PMsrLineStructure; +}; //------------------------------------------------------------- /** @@ -548,7 +548,7 @@ typedef std::vector PMsrLines; /** *

Handles the information of a parameter. */ -typedef struct { +struct PMsrParamStructure{ Int_t fNoOfParams; ///< how many parameters are given Int_t fNo; ///< parameter number TString fName; ///< name @@ -561,7 +561,7 @@ typedef struct { Bool_t fUpperBoundaryPresent; ///< flag showing if an upper boundary is present Double_t fUpperBoundary; ///< upper boundary for the fit parameter Bool_t fIsGlobal; ///< flag showing if the parameter is a global one (used for msr2data global) -} PMsrParamStructure; +}; //------------------------------------------------------------- /** @@ -763,7 +763,7 @@ typedef std::vector PMsrRunList; /** *

Holds the information of the Fourier block */ -typedef struct { +struct PMsrFourierStructure { Bool_t fFourierBlockPresent; ///< flag indicating if a Fourier block is present in the msr-file Int_t fUnits; ///< flag used to indicate the units. 1=field units (G); 2=field units (T); 3=frequency units (MHz); 4=Mc/s Bool_t fDCCorrected; ///< if set true, the dc offset of the signal/theory will be removed before the FFT is made. @@ -776,13 +776,13 @@ typedef struct { Double_t fRangeForPhaseCorrection[2]; ///< field/frequency range for automatic phase correction Double_t fPlotRange[2]; ///< field/frequency plot range Double_t fPhaseIncrement; ///< phase increment for manual phase optimization -} PMsrFourierStructure; +}; //------------------------------------------------------------- /** *

Holds the information of a single plot block */ -typedef struct { +struct PMsrPlotStructure{ Int_t fPlotType; ///< plot type Bool_t fLifeTimeCorrection; ///< needed for single histo. If yes, only the asymmetry is shown, otherweise the positron spectrum Bool_t fUseFitRanges; ///< yes -> use the fit ranges to plot the data, no (default) -> use range information if present @@ -799,7 +799,7 @@ typedef struct { UInt_t fRRFUnit; ///< RRF frequency unit. 0=kHz, 1=MHz, 2=Mc/s, 3=Gauss, 4=Tesla Int_t fRRFPhaseParamNo; ///< parameter number if used instead of a RRF phase value Double_t fRRFPhase; ///< RRF phase -} PMsrPlotStructure; +}; //------------------------------------------------------------- /** @@ -811,7 +811,7 @@ typedef std::vector PMsrPlotList; /** *

Holds the informations for the statistics block. */ -typedef struct { +struct PMsrStatisticStructure { Bool_t fValid; ///< flag showing if the statistics block is valid, i.e. a fit took place which converged PMsrLines fStatLines; ///< statistics block in msr-file clear text TString fDate; ///< string holding fitting date and time @@ -822,13 +822,13 @@ typedef struct { Double_t fMinExpected; ///< expected total chi2 or max. likelihood PDoubleVector fMinExpectedPerHisto; ///< expected pre histo chi2 or max. likelihood PUIntVector fNdfPerHisto; ///< number of degrees of freedom per histo -} PMsrStatisticStructure; +}; //------------------------------------------------------------- /** *

Holds the informations for the any2many converter program */ -typedef struct { +struct PAny2ManyInfo { Bool_t useStandardOutput{false}; ///< flag showing if the converted shall be sent to the standard output TString inFormat{""}; ///< holds the information about the input data file format TString outFormat{""}; ///< holds the information about the output data file format @@ -845,17 +845,17 @@ typedef struct { UInt_t compressionTag{0}; ///< 0=no compression, 1=gzip compression, 2=bzip2 compression TString compressFileName{""}; ///< holds the name of the outputfile name in case of compression is used UInt_t idf{0}; ///< IDF version for NeXus files. -} PAny2ManyInfo; +}; //------------------------------------------------------------- /** *

Holds information given at startup */ -typedef struct { - Bool_t writeExpectedChisq; ///< if set to true, expected chisq and chisq per block will be written (from command line) - Bool_t estimateN0; ///< if set to true, for single histogram fits N0 will be estimated (from command line) +struct PStartupOptions { + Bool_t writeExpectedChisq; ///< if set to true, expected chisq and chisq per block will be written + Bool_t estimateN0; ///< if set to true, for single histogram fits N0 will be estimated Bool_t useDKS; ///< if set to true, use DKS if present and "sensible" (from xml) -} PStartupOptions; +}; //------------------------------------------------------------- /** @@ -886,10 +886,10 @@ class PStringNumberList { /** *

Run name template structure. */ -typedef struct { +struct PRunNameTemplate { TString instrument{""}; TString runNameTemplate{""}; -} PRunNameTemplate; +}; //------------------------------------------------------------- /** diff --git a/src/include/PMusrCanvas.h b/src/include/PMusrCanvas.h index feba49da..50a06899 100644 --- a/src/include/PMusrCanvas.h +++ b/src/include/PMusrCanvas.h @@ -118,7 +118,7 @@ class PMusrCanvasPlotRange : public TObject *

Structure holding all necessary histograms for a single plot block entry for * fit types: asymmetry fit and single histogram fit. */ -typedef struct { +struct PMusrCanvasDataSet { TH1F *data; ///< data histogram TH1F *dataFourierRe; ///< real part of the Fourier transform of the data histogram TH1F *dataFourierIm; ///< imaginary part of the Fourier transform of the data histogram @@ -139,7 +139,7 @@ typedef struct { TH1F *diffFourierPhaseOptReal; ///< phase optimized real part spectrum Fourier transform of the diff histogram PMusrCanvasPlotRange *dataRange; ///< keep the msr-file plot data range UInt_t diffFourierTag; ///< 0=not relevant, 1=d-f (Fourier of difference time spectra), 2=f-d (difference of Fourier spectra) -} PMusrCanvasDataSet; +}; //------------------------------------------------------------------------ /** @@ -152,7 +152,7 @@ typedef std::vector PMusrCanvasDataList; *

Structure holding all necessary error graphs for a single plot block entry for * fit types: non-muSR fit. */ -typedef struct { +struct PMusrCanvasNonMusrDataSet { TGraphErrors *data; ///< data error graph TGraphErrors *dataFourierRe; ///< real part of the Fourier transform of the data error graph TGraphErrors *dataFourierIm; ///< imaginary part of the Fourier transform of the data error graph @@ -170,7 +170,7 @@ typedef struct { TGraphErrors *diffFourierPhase; ///< phase spectrum of the Fourier transform of the diff error graph PMusrCanvasPlotRange *dataRange; ///< keep the msr-file plot data range UInt_t diffFourierTag; ///< 0=not relevant, 1=d-f (Fourier of difference time spectra), 2=f-d (difference of Fourier spectra) -} PMusrCanvasNonMusrDataSet; +}; //------------------------------------------------------------------------ /** @@ -182,11 +182,11 @@ typedef std::vector PMusrCanvasNonMusrDataList; /** *

data structure needed for ascii dump within musrview. */ -typedef struct { +struct PMusrCanvasAsciiDump { PDoubleVector dataX; ///< x-axis data set PDoubleVector data; ///< y-axis data set PDoubleVector dataErr; ///< error of the y-axis data set -} PMusrCanvasAsciiDump; +}; //------------------------------------------------------------------------ /** diff --git a/src/include/PPrepFourier.h b/src/include/PPrepFourier.h index 8b6f3222..3e4cf52e 100644 --- a/src/include/PPrepFourier.h +++ b/src/include/PPrepFourier.h @@ -43,14 +43,14 @@ *

Data structure holding raw time domain uSR data together with some * necessary meta information. */ -typedef struct { +struct musrFT_data { Int_t dataSetTag; ///< tag to label the data set. Needed for average-per-data-set TString info; ///< keeps all the meta information Double_t timeResolution; ///< time resolution in (usec) Int_t t0; ///< keep the t0 bin Double_t timeRange[2]; ///< time range to be used, given in (usec). PDoubleVector rawData; ///< a single time domain data vector -} musrFT_data; +}; //---------------------------------------------------------------------------- /** diff --git a/src/include/PRgeHandler.h b/src/include/PRgeHandler.h index fa4e39fc..a4255983 100644 --- a/src/include/PRgeHandler.h +++ b/src/include/PRgeHandler.h @@ -43,13 +43,13 @@ /** *

Keep a single rge table from TrimSP for a given energy. */ -typedef struct { +struct PRgeData { Double_t energy; PDoubleVector depth; PDoubleVector amplitude; PDoubleVector nn; // normalized int n(z) dz = 1 amplitudes Double_t noOfParticles; -} PRgeData; +}; //----------------------------------------------------------------------------- /** diff --git a/src/musredit_qt5/mupp/PmuppScript.h b/src/musredit_qt5/mupp/PmuppScript.h index 78c945e8..9403343d 100644 --- a/src/musredit_qt5/mupp/PmuppScript.h +++ b/src/musredit_qt5/mupp/PmuppScript.h @@ -38,11 +38,11 @@ #include "PVarHandler.h" //---------------------------------------------------------------------------- -typedef struct { +struct PmuppPlotEntry { int collIdx; ///< collection index QString xLabel; ///< x-axis label QVector yLabel; ///< y-axis label(s) -} PmuppPlotEntry; +}; //---------------------------------------------------------------------------- /** diff --git a/src/musredit_qt5/mupp/plotter/PMuppCanvas.h b/src/musredit_qt5/mupp/plotter/PMuppCanvas.h index a0658c4a..9cbe61d8 100644 --- a/src/musredit_qt5/mupp/plotter/PMuppCanvas.h +++ b/src/musredit_qt5/mupp/plotter/PMuppCanvas.h @@ -50,20 +50,20 @@ #define P_MENU_ID_ABOUT 10002 //-------------------------------------------------------------------------- -typedef struct { +struct PDataPoint { Double_t y; Double_t eYpos; Double_t eYneg; -} PDataPoint; +}; //-------------------------------------------------------------------------- -typedef struct { +struct PDataCollection { TString name; // collection name TString xLabel; PStringVector yLabel; PDoubleVector xValue; std::vector< std::vector > yValue; -} PDataCollection; +}; //-------------------------------------------------------------------------- class PMuppCanvas : public TObject, public TQObject diff --git a/src/musredit_qt5/musrStep/PMusrStep.h b/src/musredit_qt5/musrStep/PMusrStep.h index f57217c6..8707a969 100644 --- a/src/musredit_qt5/musrStep/PMusrStep.h +++ b/src/musredit_qt5/musrStep/PMusrStep.h @@ -38,7 +38,7 @@ #include #include -typedef struct { +struct PParam { QString number; QString name; QString value; @@ -46,7 +46,7 @@ typedef struct { QString posErr; QString boundLow; QString boundHigh; -} PParam; +}; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class PModSelect : public QDialog diff --git a/src/musredit_qt5/musrWiz/PMusrWiz.h b/src/musredit_qt5/musrWiz/PMusrWiz.h index d840ed93..ca131293 100644 --- a/src/musredit_qt5/musrWiz/PMusrWiz.h +++ b/src/musredit_qt5/musrWiz/PMusrWiz.h @@ -70,13 +70,13 @@ #define T0_ENTER_WIZ 2 //------------------------------------------------------------------- -typedef struct { +struct PParamGui { QLineEdit *paramName; QLineEdit *paramVal; QLineEdit *paramStep; QLineEdit *paramBoundLow; QLineEdit *paramBoundHigh; -} PParamGui; +}; //------------------------------------------------------------------- class PMsrData @@ -192,7 +192,7 @@ class PIntroPage : public QWizardPage PIntroPage(PAdmin *admin, PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - bool validatePage(); + bool validatePage() override; private slots: void handleInstituteChanged(int idx); @@ -223,8 +223,8 @@ class PTheoPage : public QWizardPage PTheoPage(PAdmin *admin, PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - void initializePage(); - bool validatePage(); + void initializePage() override; + bool validatePage() override; private slots: void templateState(int); @@ -269,9 +269,9 @@ class PFuncPage : public QWizardPage PFuncPage(PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - void initializePage(); - void cleanupPage(); - bool validatePage(); + void initializePage() override; + void cleanupPage() override; + bool validatePage() override; private slots: void showTheo(); @@ -295,8 +295,8 @@ class PMapPage : public QWizardPage PMapPage(PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - void initializePage(); - bool validatePage(); + void initializePage() override; + bool validatePage() override; private slots: void showTheo(); @@ -318,8 +318,8 @@ class PParamPage : public QWizardPage PParamPage(PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - void initializePage(); - bool validatePage(); + void initializePage() override; + bool validatePage() override; private slots: void showTheo(); @@ -341,8 +341,8 @@ class PFitInfoPage : public QWizardPage PFitInfoPage(PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - void initializePage(); - bool validatePage(); + void initializePage() override; + bool validatePage() override; private: PMsrData *fMsrData; diff --git a/src/musredit_qt5/musrWiz/musrWiz.h b/src/musredit_qt5/musrWiz/musrWiz.h index d795d45e..9716004d 100644 --- a/src/musredit_qt5/musrWiz/musrWiz.h +++ b/src/musredit_qt5/musrWiz/musrWiz.h @@ -67,9 +67,9 @@ class PParam { }; //------------------------------------------------------------------- -typedef struct { +struct PFunc { int number; QString fun; -} PFunc; +}; #endif // _MUSRWIZ_H_ diff --git a/src/musredit_qt5/musredit/PAdmin.h b/src/musredit_qt5/musredit/PAdmin.h index c63f8126..bab42863 100644 --- a/src/musredit_qt5/musredit/PAdmin.h +++ b/src/musredit_qt5/musredit/PAdmin.h @@ -45,14 +45,14 @@ class PAdmin; *

This structure is keeping informations necessary to handle musrfit * theory functions (see also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-theory-block). */ -typedef struct { +struct PTheory { QString name; QString comment; QString label; QString pixmapName; QPixmap pixmap; int params; -} PTheory; +}; //--------------------------------------------------------------------------- /** diff --git a/src/musredit_qt5/musredit/musredit.h b/src/musredit_qt5/musredit/musredit.h index 281ac601..10c825dd 100644 --- a/src/musredit_qt5/musredit/musredit.h +++ b/src/musredit_qt5/musredit/musredit.h @@ -40,7 +40,7 @@ * parameters to handle msr2data. For a detailed description of the meaning of these * parameters see msr2data --help and the online documentation. */ -typedef struct { +struct PMsr2DataParam { QString runList; ///< list of run numbers (usage 3 of msr2data) QString runListFileName; ///< run list filename (usage 4 of msr2data) QString msrFileExtension; ///< msr filename extension, e.g. '0100_h13.msr' -> '_h13' @@ -61,13 +61,13 @@ typedef struct { bool fitOnly; ///< flag: true = just perform the fits wihtout generating any msr-files ('fit' in msr2data). bool global; ///< flag: true = 'global' option bool globalPlus; ///< flag: true = 'global+' option -} PMsr2DataParam; +}; //------------------------------------------------------------------------------------------------- /** * This structure is used to handle find (and replace) within musredit properly. */ -typedef struct { +struct PFindReplaceData { QString findText; ///< text to be found QString replaceText; ///< replacement string bool caseSensitive; ///< true = case sensitive @@ -76,6 +76,6 @@ typedef struct { bool findBackwards; ///< true = reversed search bool selectedText; ///< true = handle only the selected text bool promptOnReplace; ///< true = request on OK from the user before performing the replace action -} PFindReplaceData; +}; #endif // _MUSREDIT_H_ diff --git a/src/musredit_qt6/mupp/PmuppScript.h b/src/musredit_qt6/mupp/PmuppScript.h index 78c945e8..9403343d 100644 --- a/src/musredit_qt6/mupp/PmuppScript.h +++ b/src/musredit_qt6/mupp/PmuppScript.h @@ -38,11 +38,11 @@ #include "PVarHandler.h" //---------------------------------------------------------------------------- -typedef struct { +struct PmuppPlotEntry { int collIdx; ///< collection index QString xLabel; ///< x-axis label QVector yLabel; ///< y-axis label(s) -} PmuppPlotEntry; +}; //---------------------------------------------------------------------------- /** diff --git a/src/musredit_qt6/mupp/plotter/PMuppCanvas.h b/src/musredit_qt6/mupp/plotter/PMuppCanvas.h index a0658c4a..9cbe61d8 100644 --- a/src/musredit_qt6/mupp/plotter/PMuppCanvas.h +++ b/src/musredit_qt6/mupp/plotter/PMuppCanvas.h @@ -50,20 +50,20 @@ #define P_MENU_ID_ABOUT 10002 //-------------------------------------------------------------------------- -typedef struct { +struct PDataPoint { Double_t y; Double_t eYpos; Double_t eYneg; -} PDataPoint; +}; //-------------------------------------------------------------------------- -typedef struct { +struct PDataCollection { TString name; // collection name TString xLabel; PStringVector yLabel; PDoubleVector xValue; std::vector< std::vector > yValue; -} PDataCollection; +}; //-------------------------------------------------------------------------- class PMuppCanvas : public TObject, public TQObject diff --git a/src/musredit_qt6/musrStep/PMusrStep.h b/src/musredit_qt6/musrStep/PMusrStep.h index f57217c6..8707a969 100644 --- a/src/musredit_qt6/musrStep/PMusrStep.h +++ b/src/musredit_qt6/musrStep/PMusrStep.h @@ -38,7 +38,7 @@ #include #include -typedef struct { +struct PParam { QString number; QString name; QString value; @@ -46,7 +46,7 @@ typedef struct { QString posErr; QString boundLow; QString boundHigh; -} PParam; +}; //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ class PModSelect : public QDialog diff --git a/src/musredit_qt6/musrWiz/PMusrWiz.h b/src/musredit_qt6/musrWiz/PMusrWiz.h index d840ed93..ca131293 100644 --- a/src/musredit_qt6/musrWiz/PMusrWiz.h +++ b/src/musredit_qt6/musrWiz/PMusrWiz.h @@ -70,13 +70,13 @@ #define T0_ENTER_WIZ 2 //------------------------------------------------------------------- -typedef struct { +struct PParamGui { QLineEdit *paramName; QLineEdit *paramVal; QLineEdit *paramStep; QLineEdit *paramBoundLow; QLineEdit *paramBoundHigh; -} PParamGui; +}; //------------------------------------------------------------------- class PMsrData @@ -192,7 +192,7 @@ class PIntroPage : public QWizardPage PIntroPage(PAdmin *admin, PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - bool validatePage(); + bool validatePage() override; private slots: void handleInstituteChanged(int idx); @@ -223,8 +223,8 @@ class PTheoPage : public QWizardPage PTheoPage(PAdmin *admin, PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - void initializePage(); - bool validatePage(); + void initializePage() override; + bool validatePage() override; private slots: void templateState(int); @@ -269,9 +269,9 @@ class PFuncPage : public QWizardPage PFuncPage(PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - void initializePage(); - void cleanupPage(); - bool validatePage(); + void initializePage() override; + void cleanupPage() override; + bool validatePage() override; private slots: void showTheo(); @@ -295,8 +295,8 @@ class PMapPage : public QWizardPage PMapPage(PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - void initializePage(); - bool validatePage(); + void initializePage() override; + bool validatePage() override; private slots: void showTheo(); @@ -318,8 +318,8 @@ class PParamPage : public QWizardPage PParamPage(PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - void initializePage(); - bool validatePage(); + void initializePage() override; + bool validatePage() override; private slots: void showTheo(); @@ -341,8 +341,8 @@ class PFitInfoPage : public QWizardPage PFitInfoPage(PMsrData *data, QWidget *parent=0); int nextId() const Q_DECL_OVERRIDE; - void initializePage(); - bool validatePage(); + void initializePage() override; + bool validatePage() override; private: PMsrData *fMsrData; diff --git a/src/musredit_qt6/musrWiz/musrWiz.h b/src/musredit_qt6/musrWiz/musrWiz.h index d795d45e..9716004d 100644 --- a/src/musredit_qt6/musrWiz/musrWiz.h +++ b/src/musredit_qt6/musrWiz/musrWiz.h @@ -67,9 +67,9 @@ class PParam { }; //------------------------------------------------------------------- -typedef struct { +struct PFunc { int number; QString fun; -} PFunc; +}; #endif // _MUSRWIZ_H_ diff --git a/src/musredit_qt6/musredit/PAdmin.h b/src/musredit_qt6/musredit/PAdmin.h index 2622bfe4..adde816e 100644 --- a/src/musredit_qt6/musredit/PAdmin.h +++ b/src/musredit_qt6/musredit/PAdmin.h @@ -45,14 +45,14 @@ class PAdmin; *

This structure is keeping informations necessary to handle musrfit * theory functions (see also http://lmu.web.psi.ch/musrfit/user/html/user-manual.html#the-theory-block). */ -typedef struct { +struct PTheory { QString name; QString comment; QString label; QString pixmapName; QPixmap pixmap; int params; -} PTheory; +}; //--------------------------------------------------------------------------- /** diff --git a/src/musredit_qt6/musredit/musredit.h b/src/musredit_qt6/musredit/musredit.h index 281ac601..10c825dd 100644 --- a/src/musredit_qt6/musredit/musredit.h +++ b/src/musredit_qt6/musredit/musredit.h @@ -40,7 +40,7 @@ * parameters to handle msr2data. For a detailed description of the meaning of these * parameters see msr2data --help and the online documentation. */ -typedef struct { +struct PMsr2DataParam { QString runList; ///< list of run numbers (usage 3 of msr2data) QString runListFileName; ///< run list filename (usage 4 of msr2data) QString msrFileExtension; ///< msr filename extension, e.g. '0100_h13.msr' -> '_h13' @@ -61,13 +61,13 @@ typedef struct { bool fitOnly; ///< flag: true = just perform the fits wihtout generating any msr-files ('fit' in msr2data). bool global; ///< flag: true = 'global' option bool globalPlus; ///< flag: true = 'global+' option -} PMsr2DataParam; +}; //------------------------------------------------------------------------------------------------- /** * This structure is used to handle find (and replace) within musredit properly. */ -typedef struct { +struct PFindReplaceData { QString findText; ///< text to be found QString replaceText; ///< replacement string bool caseSensitive; ///< true = case sensitive @@ -76,6 +76,6 @@ typedef struct { bool findBackwards; ///< true = reversed search bool selectedText; ///< true = handle only the selected text bool promptOnReplace; ///< true = request on OK from the user before performing the replace action -} PFindReplaceData; +}; #endif // _MUSREDIT_H_