Skip to content

Commit

Permalink
Merge branch 'develop' into feature-minor-env-additions
Browse files Browse the repository at this point in the history
  • Loading branch information
mainegra authored May 10, 2018
2 parents 6a37420 + 98126e4 commit 6e6f196
Show file tree
Hide file tree
Showing 36 changed files with 258 additions and 375 deletions.
3 changes: 3 additions & 0 deletions HEN_HOUSE/egs++/egs_particle_track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ void EGS_ParticleTrackContainer::addVertex(EGS_ParticleTrack::Vertex *x) {
}

void EGS_ParticleTrackContainer::addVertex(int stackIndex, EGS_ParticleTrack::Vertex *x) {
if (m_stackMap[stackIndex] < 0) {
return;
}
if (!m_isScoring[m_stackMap[stackIndex]]) {
return;
}
Expand Down
11 changes: 9 additions & 2 deletions HEN_HOUSE/egs++/egs_particle_track.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ class EGS_EXPORT EGS_ParticleTrackContainer {

/*! \brief Are we still scoring the particle mapped by the stack? */
bool isScoringParticle(int stackIndex) {
if (m_stackMap[stackIndex] < 0) {
return false;
}
return m_isScoring[m_stackMap[stackIndex]];
}

Expand All @@ -281,7 +284,9 @@ class EGS_EXPORT EGS_ParticleTrackContainer {

/*! \brief Stop scoring the particle mapped by the stack. */
void stopScoringParticle(int stackIndex) {
m_isScoring[m_stackMap[stackIndex]] = false;
if (m_stackMap[stackIndex] >= 0) {
m_isScoring[m_stackMap[stackIndex]] = false;
}
m_stackMap[stackIndex] = -1;
}

Expand All @@ -302,7 +307,9 @@ class EGS_EXPORT EGS_ParticleTrackContainer {

/*! \brief Set the type of mapped particle to \a p .*/
void setParticleInfo(int stackIndex, EGS_ParticleTrack::ParticleInfo *p) {
m_buffer[m_stackMap[stackIndex]]->setParticleInfo(p);
if (m_stackMap[stackIndex] >= 0) {
m_buffer[m_stackMap[stackIndex]]->setParticleInfo(p);
}
}

/*! \brief Set the type of the currently tracked particle to \a p .*/
Expand Down
5 changes: 5 additions & 0 deletions HEN_HOUSE/egs++/view/clippingplanes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
###############################################################################
*/

#include <QtGlobal>
#include "clippingplanes.h"

#include "egs_libconfig.h"
Expand All @@ -43,7 +44,11 @@ ClippingPlanesWidget::ClippingPlanesWidget(QWidget *parent, const char *name)
: QWidget(parent) {
setObjectName(name);
setupUi(this);
#if QT_VERSION >= 0x050000
planeTable->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch);
#else
planeTable->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
#endif
}

ClippingPlanesWidget::~ClippingPlanesWidget() {
Expand Down
8 changes: 7 additions & 1 deletion HEN_HOUSE/egs++/view/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,13 @@
*/


#include <qapplication.h>
#include <QApplication>
#include <QtGlobal>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QWidget>
#endif
#include <qfile.h>
#include <qstring.h>
#include <qfiledialog.h>
Expand Down
2 changes: 2 additions & 0 deletions HEN_HOUSE/egs++/view/view.pro
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ LANGUAGE = C++

INCLUDEPATH += . .. ../../lib/$$my_machine

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

HEADERS += egs_visualizer.h image_window.h egs_light.h \
clippingplanes.h viewcontrol.h geometryview.ui.h \
saveimage.h egs_user_color.h egs_track_view.h \
Expand Down
5 changes: 4 additions & 1 deletion HEN_HOUSE/gui/egs_configure/egs_beam_install.pro
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@ win32 {
QMAKE_CXXFLAGS += -fpermissive
####################################################
CONFIG += qt thread warn_off release windows
greaterThan(QT_MAJOR_VERSION, 4): LIBS += -lz -lole32 -luuid
DESTDIR = ../../pieces/windows
RC_FILE = egs_beam_install.rc
}

unix {
CONFIG += qt thread warn_on debug_and_release $$my_build
#LIBS += -lz #Needed if not using Qt own zlib
LIBS += -lz #Needed if not using Qt own zlib, in QT5 using Qtzlibh is not recommended according to documentation
#message("CONFIG = $$CONFIG")
contains( CONFIG, shared ):message( "Dynamic build..." )
contains( CONFIG, static ){
Expand All @@ -91,3 +92,5 @@ RESOURCES = egs_beam_install.qrc # resource collection file to store images in t
TEMPLATE = app
LANGUAGE = C++
QT += xml
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

4 changes: 2 additions & 2 deletions HEN_HOUSE/gui/egs_configure/egs_install_env.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,9 +277,9 @@ void QInstallPage::createEGSFolders(){
else desc = "EGSnrc GUI for egs++ geometries";
lnk = DESKTOP + *it + (QString)".lnk";
if( *it != "egs_view" )
target = QDir::convertSeparators( egsBinDir + s + *it + ".exe" );
target = QDir::toNativeSeparators( egsBinDir + s + *it + ".exe" );
else{
target = QDir::convertSeparators( henHouse() + "egs++" + s + "dso" + s + "win-static" + s + *it + ".exe");
target = QDir::toNativeSeparators( henHouse() + "egs++" + s + "dso" + s + "win-static" + s + *it + ".exe");
icon = henHouse() + "egs++" + s + "view" + s + *it + ".ico";
}
if ( ! fileExists( target ) ) {
Expand Down
2 changes: 1 addition & 1 deletion HEN_HOUSE/gui/egs_configure/egs_wizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

using namespace std;

EGS_Wizard::EGS_Wizard(QWidget *parent, Qt::WFlags f)
EGS_Wizard::EGS_Wizard(QWidget *parent, Qt::WindowFlags f)
: QWizard(parent,f),
the_year("0000?"),version("0?"),
custom(false)
Expand Down
11 changes: 8 additions & 3 deletions HEN_HOUSE/gui/egs_configure/egs_wizard.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@
#ifndef EGS_WIZARD_H
#define EGS_WIZARD_H

#include <QWidget>
#include <QtGlobal>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QWidget>
#endif
#include <QString>
#include <QPixmap>
#include <QWizard>
Expand All @@ -56,7 +61,7 @@ class EGS_Wizard : public QWizard
enum { Page_Intro, Page_Location, Page_Compiler,
Page_Licence, Page_Install, Page_Conclusion };

EGS_Wizard(QWidget * parent = 0, Qt::WFlags f = 0);
EGS_Wizard(QWidget * parent = 0, Qt::WindowFlags f = 0);
~EGS_Wizard(){}

public slots:
Expand Down Expand Up @@ -95,4 +100,4 @@ void processCustomButtonClick(int id);

};

#endif
#endif
4 changes: 2 additions & 2 deletions HEN_HOUSE/gui/egs_gui/egs_compile_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ const QSizePolicy preferred(QSizePolicy::Preferred,QSizePolicy::Preferred);
using namespace Qt;

EGS_CompilePage::EGS_CompilePage(QWidget *parent, const char *name,
WFlags f) : EGS_GUI_Widget(parent,name,f) { make(); }
WindowFlags f) : EGS_GUI_Widget(parent,name,f) { make(); }

EGS_CompilePage::EGS_CompilePage(EGS_ConfigReader *cr, QWidget *parent,
const char *name, WFlags f) : EGS_GUI_Widget(cr,parent,name,f) { make(); }
const char *name, WindowFlags f) : EGS_GUI_Widget(cr,parent,name,f) { make(); }

void EGS_CompilePage::make() {

Expand Down
4 changes: 2 additions & 2 deletions HEN_HOUSE/gui/egs_gui/egs_compile_page.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ class EGS_CompilePage : public EGS_GUI_Widget {

public:

EGS_CompilePage(QWidget *parent = 0, const char * name = 0, Qt::WFlags f = 0);
EGS_CompilePage(QWidget *parent = 0, const char * name = 0, Qt::WindowFlags f = 0);
EGS_CompilePage(EGS_ConfigReader *,
QWidget *parent = 0, const char * name = 0, Qt::WFlags f = 0);
QWidget *parent = 0, const char * name = 0, Qt::WindowFlags f = 0);
~EGS_CompilePage(){}

void sendSignals();
Expand Down
4 changes: 2 additions & 2 deletions HEN_HOUSE/gui/egs_gui/egs_configuration_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
using namespace Qt;

EGS_ConfigurationPage::EGS_ConfigurationPage(QWidget *parent,
const char *name, WFlags f) : EGS_GUI_Widget(parent,name,f) {
const char *name, WindowFlags f) : EGS_GUI_Widget(parent,name,f) {
make();
}

EGS_ConfigurationPage::EGS_ConfigurationPage(EGS_ConfigReader *cr,
QWidget *parent, const char *name, WFlags f) :
QWidget *parent, const char *name, WindowFlags f) :
EGS_GUI_Widget(cr,parent,name,f) { make(); }

void EGS_ConfigurationPage::make() {
Expand Down
4 changes: 2 additions & 2 deletions HEN_HOUSE/gui/egs_gui/egs_configuration_page.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ class EGS_ConfigurationPage : public EGS_GUI_Widget {

public:

EGS_ConfigurationPage(QWidget *parent=0, const char *name=0, Qt::WFlags f=0);
EGS_ConfigurationPage(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=0);
EGS_ConfigurationPage(EGS_ConfigReader *cr,
QWidget *parent=0, const char *name=0, Qt::WFlags f=0);
QWidget *parent=0, const char *name=0, Qt::WindowFlags f=0);
~EGS_ConfigurationPage(){}
public slots:

Expand Down
2 changes: 2 additions & 0 deletions HEN_HOUSE/gui/egs_gui/egs_gui.pro
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ HEADERS += main_widget.h \
egs_configuration_page.h \
egs_config_reader.h

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

MOC_DIR = .moc/$$my_machine
OBJECTS_DIR = .obj/$$my_machine
DESTDIR = ../../bin/$$my_machine
Expand Down
4 changes: 2 additions & 2 deletions HEN_HOUSE/gui/egs_gui/egs_gui_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
using namespace std;
using namespace Qt;

EGS_GUI_Widget::EGS_GUI_Widget(QWidget *parent, const char *name,WFlags f) :
EGS_GUI_Widget::EGS_GUI_Widget(QWidget *parent, const char *name,WindowFlags f) :
QWidget(parent,f), the_name(name)
{
config_reader = 0; killed = false;
}

EGS_GUI_Widget::EGS_GUI_Widget(EGS_ConfigReader *cr, QWidget *parent, const char *name, WFlags f) :
EGS_GUI_Widget::EGS_GUI_Widget(EGS_ConfigReader *cr, QWidget *parent, const char *name, WindowFlags f) :
QWidget(parent,f), the_name(name)
{
config_reader = cr; killed = false;
Expand Down
4 changes: 2 additions & 2 deletions HEN_HOUSE/gui/egs_gui/egs_gui_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class EGS_GUI_Widget : public QWidget {

public:

EGS_GUI_Widget(QWidget *parent=0, const char *name=0, Qt::WFlags f=0);
EGS_GUI_Widget(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=0);
EGS_GUI_Widget(EGS_ConfigReader *, QWidget *parent=0,
const char *name=0, Qt::WFlags f=0);
const char *name=0, Qt::WindowFlags f=0);

virtual ~EGS_GUI_Widget(){}

Expand Down
4 changes: 2 additions & 2 deletions HEN_HOUSE/gui/egs_gui/egs_run_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@

using namespace Qt;

EGS_RunPage::EGS_RunPage(QWidget *parent, const char *name, WFlags f) :
EGS_RunPage::EGS_RunPage(QWidget *parent, const char *name, WindowFlags f) :
EGS_GUI_Widget(parent,name,f) { make(); }

EGS_RunPage::EGS_RunPage(EGS_ConfigReader *cr,
QWidget *parent, const char *name, WFlags f) :
QWidget *parent, const char *name, WindowFlags f) :
EGS_GUI_Widget(cr,parent,name,f) { make(); }

void EGS_RunPage::make() {
Expand Down
4 changes: 2 additions & 2 deletions HEN_HOUSE/gui/egs_gui/egs_run_page.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ class EGS_RunPage : public EGS_GUI_Widget {

public:

EGS_RunPage(QWidget *parent=0, const char *name=0, Qt::WFlags f=0);
EGS_RunPage(QWidget *parent=0, const char *name=0, Qt::WindowFlags f=0);
EGS_RunPage(EGS_ConfigReader *cr,
QWidget *parent=0, const char *name=0, Qt::WFlags f=0);
QWidget *parent=0, const char *name=0, Qt::WindowFlags f=0);
~EGS_RunPage(){}
public slots:

Expand Down
7 changes: 6 additions & 1 deletion HEN_HOUSE/gui/egs_gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@


#include "main_widget.h"
#include <QtGui>
#include <QtGlobal>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QWidget>
#endif
#include <QMainWindow>

#include <qapplication.h>
Expand Down
2 changes: 1 addition & 1 deletion HEN_HOUSE/gui/egs_gui/main_widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool configLibExists(const QString& lib );

using namespace std;

EGS_MainWidget::EGS_MainWidget(QWidget *parent, Qt::WFlags f)
EGS_MainWidget::EGS_MainWidget(QWidget *parent, Qt::WindowFlags f)
: QWidget(parent,f)
{

Expand Down
2 changes: 1 addition & 1 deletion HEN_HOUSE/gui/egs_gui/main_widget.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class EGS_MainWidget : public QWidget

public:

EGS_MainWidget(QWidget * parent = 0, Qt::WFlags f = 0);
EGS_MainWidget(QWidget * parent = 0, Qt::WindowFlags f = 0);
~EGS_MainWidget(){}
public slots:

Expand Down
8 changes: 7 additions & 1 deletion HEN_HOUSE/gui/egs_gui/pegs_page.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
#include <QItemSelectionModel>
#include <QMessageBox>
#include <QTextStream>
#include <QtGlobal>
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
#include <QWidget>
#endif

#include <qstringlist.h>
#include <qfiledialog.h>
Expand Down Expand Up @@ -837,7 +843,7 @@ bool TableEventHandler::eventFilter(QObject *o, QEvent *e) {
return true;
}
else
to->eventFilter(o, e);
return false;
}
return false;
}
6 changes: 4 additions & 2 deletions HEN_HOUSE/gui/egs_inprz/egs_inprz.pro
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@


SOURCES += src/cavinputs.cpp \
src/comboboxtooltip.cpp \
src/commandManager.cpp \
src/de_parser.cpp \
src/errordlg.cpp \
Expand Down Expand Up @@ -59,7 +58,6 @@ SOURCES += src/cavinputs.cpp \
src/tools.cpp \
src/egs_config_reader.cpp
HEADERS += include/cavinputs.h \
include/comboboxtooltip.h \
include/commandManager.h \
include/datainp.h \
include/de_parser.h \
Expand All @@ -86,6 +84,10 @@ HEADERS += include/cavinputs.h \
include/varinputs.h \
include/tools.h \
../egs_gui/egs_config_reader.h

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport


######################################################################
# Automatically generated by qmake (1.03a) Thu Dec 5 10:07:20 2002
######################################################################
Expand Down
Loading

0 comments on commit 6e6f196

Please sign in to comment.