diff --git a/graphics/Qat/QatPresenterApp/CMakeLists.txt b/graphics/Qat/QatPresenterApp/CMakeLists.txt index 949355642993a66974079006e64b8cb42754e3f4..dca081acac650fdbc05fe0cffc2de1447967cba6 100644 --- a/graphics/Qat/QatPresenterApp/CMakeLists.txt +++ b/graphics/Qat/QatPresenterApp/CMakeLists.txt @@ -12,6 +12,19 @@ atlas_depends_on_subdirs( PUBLIC # External dependencies: find_package( Qt4 COMPONENTS QtCore QtOpenGL QtGui ) +# Generate UI files automatically: +set( CMAKE_AUTOUIC TRUE ) +# Generate MOC files automatically: +set( CMAKE_AUTOMOC TRUE ) +# Generate resource files automatically: +set( CMAKE_AUTORCC TRUE ) +# to let CMake find .h files automatically-generated from .ui files +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +# set additional compilation flags +SET(MY_GCC_COMPILE_FLAGS "-g -O0") +SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${MY_GCC_COMPILE_FLAGS}" ) + include_directories( /usr/X11R6/include ) # Remove the --as-needed linker flags: @@ -21,5 +34,5 @@ atlas_disable_as_needed() atlas_add_executable( present src/present.cpp INCLUDE_DIRS ${QT4_INCLUDE_DIRS} - LINK_LIBRARIES ${QT4_LIBRARIES} GL QatPresenter ) + LINK_LIBRARIES ${QT4_LIBRARIES} GL QatPresenter) diff --git a/graphics/Qat/QatPresenterApp/cmt/requirements b/graphics/Qat/QatPresenterApp/cmt/requirements index a303ff8ce1e133c9b314cc50fd0de87385b39979..cc16366f1e5289c1defc153189a583b8998e554b 100644 --- a/graphics/Qat/QatPresenterApp/cmt/requirements +++ b/graphics/Qat/QatPresenterApp/cmt/requirements @@ -1,6 +1,7 @@ package QatPresenterApp author Joe Boudreau +manager Riccardo Maria Bianchi use AtlasPolicy AtlasPolicy-* use VP1Qt VP1Qt-* graphics/VP1 diff --git a/graphics/Qat/QatPresenterApp/qat-project/QatProjectForm.cpp b/graphics/Qat/QatPresenterApp/qat-project/QatProjectForm.cpp index 3b3dd6b1330569917128f023ba865ca738a95848..03ae2ad42db965628fef98dad45e1e206fa40e1d 100644 --- a/graphics/Qat/QatPresenterApp/qat-project/QatProjectForm.cpp +++ b/graphics/Qat/QatPresenterApp/qat-project/QatProjectForm.cpp @@ -67,8 +67,12 @@ void QatProjectForm::createProject() { } mkdir((directoryName+"/src").c_str(),0755); system ((std::string("cp /usr/local/share/templates/qt.pro ") + directoryName+"/src").c_str()); - system (("sed -i s/\\<app\\>/" + programName + "/g " + directoryName + "/src/qt.pro").c_str()); +#ifdef __APPLE__ + system (("sed -i .orig s/\"<app>\"/" + programName + "/g " + directoryName + "/src/qt.pro").c_str()); +#else + system (("sed -i s/\\<app\\>/" + programName + "/g " + directoryName + "/src/qt.pro").c_str()); +#endif // There are eight templates. Choose one of them: if (plotView) { if (type==ZeroToZero) system (("cp /usr/local/share/templates/templateZeroToZeroView.cpp " + directoryName + "/src/" + programName + ".cpp").c_str()); @@ -93,13 +97,15 @@ void QatProjectForm::createProject() { } void QatProjectForm::editingFinished() { + char BUFF[1024]; if (!ui.programNameLineEdit->text().isEmpty() && ui.directoryLabel->text().isEmpty()) - ui.directoryLabel->setText(QString(get_current_dir_name())+QString("/")+ui.programNameLineEdit->text().toUpper()); + ui.directoryLabel->setText(QString(getcwd(BUFF,1024))+QString("/")+ui.programNameLineEdit->text().toUpper()); } void QatProjectForm::changeDir() { + char BUFF[1024]; QString fileName = QFileDialog::getSaveFileName(this, tr("Set Project Directory"), - get_current_dir_name(), + getcwd(BUFF,1024), QString(""), NULL, QFileDialog::ShowDirsOnly); diff --git a/graphics/Qat/QatPresenterApp/qat-project/TEMPLATES/qt.pro b/graphics/Qat/QatPresenterApp/qat-project/TEMPLATES/qt.pro index 0d6923b603b5f8d1659547a64816d29a2044fcec..5ff4f49b36bb2449b537305fc948a015fce956de 100644 --- a/graphics/Qat/QatPresenterApp/qat-project/TEMPLATES/qt.pro +++ b/graphics/Qat/QatPresenterApp/qat-project/TEMPLATES/qt.pro @@ -7,9 +7,13 @@ TARGET = <app> DESTDIR = ../local/bin DEPENDPATH += . INCLUDEPATH += . .. -LIBS=-L../local/lib -lQatPlotWidgets -lQatPlotting -lQatDataModeling -lgfortran -lQatDataAnalysis -lCLHEP -lgsl -lgslcblas +LIBS=-lQatPlotWidgets -lQatPlotting -lQatDataModeling -lgfortran -lQatDataAnalysis -lCLHEP -lgsl -lgslcblas -ldl CONFIG += qt debug # Input SOURCES += <app>.cpp + +mac { + CONFIG -= app_bundle +} diff --git a/graphics/Qat/QatPresenterApp/qat-project/qt.pro b/graphics/Qat/QatPresenterApp/qat-project/qt.pro index 9e47728beeed1390c234754ee32734d16702e1bb..cc4b162945ea09a0b1eeb726aa81d118d0ceb3a0 100644 --- a/graphics/Qat/QatPresenterApp/qat-project/qt.pro +++ b/graphics/Qat/QatPresenterApp/qat-project/qt.pro @@ -18,6 +18,8 @@ target.path=/usr/local/bin templates.path = /usr/local/share/templates templates.files = TEMPLATES/*.cpp TEMPLATES/*.pro INSTALLS += templates - +mac { + CONFIG -= app_bundle +} diff --git a/graphics/Qat/QatPresenterApp/src/QatPresenterApp.pro b/graphics/Qat/QatPresenterApp/src/QatPresenterApp.pro index 1066d8c624ac5265bfec6e4244cc17df8a711dcd..532ba812b0d034443f9489e9b218bc8a5d1defb8 100644 --- a/graphics/Qat/QatPresenterApp/src/QatPresenterApp.pro +++ b/graphics/Qat/QatPresenterApp/src/QatPresenterApp.pro @@ -16,3 +16,6 @@ target.path=/usr/local/bin INSTALLS += target +mac { + CONFIG -= app_bundle +}