Commit 67019a0f authored by Julien Y. Dutheil's avatar Julien Y. Dutheil
Browse files

New upstream version 0.6.0

parent 871982c5
Loading
Loading
Loading
Loading
+12 −9
Original line number Diff line number Diff line
@@ -60,7 +60,8 @@ else ()
  # Generate command line args (always add -c to output compressed file to stdout)
  if (${COMPRESS_PROGRAM} STREQUAL "gzip")
    # -n for no timestamp in files (reproducible builds)
    set (COMPRESS_ARGS -c -n)
    # -9 for maximal compression (lintian warning)
    set (COMPRESS_ARGS -c -9 -n)
  else ()
    set (COMPRESS_ARGS -c)
  endif ()
@@ -73,13 +74,15 @@ if (CMAKE_INSTALL_PREFIX)
endif (CMAKE_INSTALL_PREFIX)

include (GNUInstallDirs)
find_package (bpp-qt 1.0.1 REQUIRED)
find_package (bpp-qt 2.0.0 REQUIRED)

# Find the Qt installation
set (QT_USE_IMPORTED_TARGETS TRUE)
find_package (Qt4 4.4.0 COMPONENTS QtCore QtGui REQUIRED)
include (${QT_USE_FILE})
set (qt-libs ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
set(CMAKE_AUTOMOC ON)
find_package (Qt5Widgets)
find_package (Qt5Core)
find_package (Qt5Gui)
find_package (Qt5PrintSupport)
set (qt-libs Qt5::Core Qt5::Gui Qt5::Widgets Qt5::PrintSupport)

# Subdirectories
add_subdirectory (bppPhyView)
@@ -90,10 +93,10 @@ ENDIF(NO_DEP_CHECK)
# Packager
SET(CPACK_PACKAGE_NAME "bppphyview")
SET(CPACK_PACKAGE_VENDOR "Bio++ Development Team")
SET(CPACK_PACKAGE_VERSION "0.5.1")
SET(CPACK_PACKAGE_VERSION "0.6.0")
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "5")
SET(CPACK_PACKAGE_VERSION_PATCH "1")
SET(CPACK_PACKAGE_VERSION_MINOR "6")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "The Bio++ Phylogenetic Viewer")
SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/COPYING.txt")
SET(CPACK_RESOURCE_FILE_AUTHORS "${CMAKE_SOURCE_DIR}/AUTHORS.txt")
+8 −0
Original line number Diff line number Diff line
25/02/18 -*- Version 0.6.0 -*-

27/12/17 Julien Dutheil
* Added "removeAllLengths" command.

13/09/17 Julien Dutheil
* Ported to Qt5.

10/05/17 -*- Version 0.5.0 -*-
* Compatibility update with Bio++ 2.3.0.

+1 −2
Original line number Diff line number Diff line
@@ -13,10 +13,9 @@ set (H_MOC_FILES
  PhyView.h
  TreeSubWindow.h
  )
qt4_wrap_cpp (CPP_MOC_FILES ${H_MOC_FILES})

# Phyview
add_executable (phyview ${CPP_FILES} ${CPP_MOC_FILES})
add_executable (phyview ${CPP_FILES} ${CPP_FILES})
if (BUILD_STATIC)
  target_link_libraries (phyview ${BPP_LIBS_STATIC} ${qt-libs})
else (BUILD_STATIC)
+37 −13
Original line number Diff line number Diff line
@@ -43,6 +43,18 @@ knowledge of the CeCILL license and that you accept its terms.

#include <QApplication>
#include <QtGui>
#include <QVBoxLayout>
#include <QFormLayout>
#include <QPushButton>
#include <QMessageBox>
#include <QButtonGroup>
#include <QDockWidget>
#include <QUndoView>
#include <QLineEdit>
#include <QAction>
#include <QMenuBar>
#include <QInputDialog>
#include <QGraphicsTextItem>

#include <Bpp/Qt/QtGraphicDevice.h>

@@ -79,8 +91,9 @@ TranslateNameChooser::TranslateNameChooser(PhyView* phyview) :
  fileFilters_ << "Coma separated columns (*.txt *.csv)"
               << "Tab separated columns (*.txt *.csv)";
  fileDialog_->setNameFilters(fileFilters_);
  fileDialog_->setOptions(QFileDialog::DontUseNativeDialog);
  hasHeader_ = new QCheckBox(tr("File has header line"));
  QGridLayout *dlayout = dynamic_cast<QGridLayout*>(fileDialog_->layout());
  QGridLayout *dlayout = dynamic_cast<QGridLayout*>(fileDialog_->layout()); //Check that here!!
  dlayout->addWidget(hasHeader_, 4, 0);
  QFormLayout* layout = new QFormLayout;
  fromList_ = new QComboBox;
@@ -555,6 +568,11 @@ void PhyView::createBrlenPanel_()
  
  brlenLayout->addWidget(brlenSetLengthsBox);

  //Remove all branch lengths:
  QPushButton* brlenRemoveAll = new QPushButton(tr("Remove all lengths"));
  connect(brlenRemoveAll, SIGNAL(clicked(bool)), this, SLOT(deleteAllLengths()));
  brlenLayout->addWidget(brlenRemoveAll);

  //Grafen method:
  QPushButton* brlenInitGrafen = new QPushButton(tr("Init"));
  connect(brlenInitGrafen, SIGNAL(clicked(bool)), this, SLOT(initLengthsGrafen()));
@@ -1020,15 +1038,15 @@ void PhyView::exit()
void PhyView::aboutBpp()
{
  QMessageBox msgBox;
  msgBox.setText("Bio++ 2.3.0.");
  msgBox.setInformativeText("bpp-core 2.3.0\nbpp-seq 2.3.0.\nbpp-phyl 2.3.0.\nbpp-qt 2.3.0");
  msgBox.setText("Bio++ 2.4.0.");
  msgBox.setInformativeText("bpp-core 2.4.0\nbpp-seq 2.4.0.\nbpp-phyl 2.4.0.\nbpp-qt 2.4.0");
  msgBox.exec();
}

void PhyView::about()
{
  QMessageBox msgBox;
  msgBox.setText("This is Bio++ Phylogenetic Viewer version 0.5.0.");
  msgBox.setText("This is Bio++ Phylogenetic Viewer version 0.6.0.");
  msgBox.setInformativeText("Julien Dutheil <dutheil@evolbio.mpg.de>.");
  msgBox.exec();
}
@@ -1071,6 +1089,13 @@ void PhyView::midpointRooting()
    }
}

void PhyView::deleteAllLengths()
{
  if (hasActiveDocument())
    submitCommand(new DeleteLengthCommand(getActiveDocument()));
}


void PhyView::unresolveUncertainNodes()
{
  if (hasActiveDocument()) {
@@ -1302,7 +1327,7 @@ int main(int argc, char *argv[])
  //Parse command line arguments:
  QStringList args = app.arguments();
  string format = IOTreeFactory::NEWICK_FORMAT;
  QTextCodec* codec = QTextCodec::codecForLocale();
  //QTextCodec* codec = QTextCodec::codecForLocale(); Not supported in Qt5...
  for (int i = 1; i < args.size(); ++i) {
    if (args[i] == "--nhx") {
      format = IOTreeFactory::NHX_FORMAT;
@@ -1310,18 +1335,17 @@ int main(int argc, char *argv[])
      format = IOTreeFactory::NEWICK_FORMAT;
    } else if (args[i] == "--newick") {
      format = IOTreeFactory::NEWICK_FORMAT;
    } else if (args[i] == "--enc") {
      if (i == args.size() - 1) {
        cerr << "You must specify a text encoding after --enc tag." << endl;
        exit(1);
      }
      ++i;
      codec = QTextCodec::codecForName(args[i].toStdString().c_str());
    //} else if (args[i] == "--enc") {
    //  if (i == args.size() - 1) {
    //    cerr << "You must specify a text encoding after --enc tag." << endl;
    //    exit(1);
    //  }
    //  ++i;
    //  codec = QTextCodec::codecForName(args[i].toStdString().c_str());
    } else {
      phyview->readTree(args[i], format);
    }
  }
  QTextCodec::setCodecForCStrings(codec);
  return app.exec();
}

+1 −0
Original line number Diff line number Diff line
@@ -369,6 +369,7 @@ class PhyView :
    void computeLengthsGrafen();
    void convertToClockTree();
    void midpointRooting();
    void deleteAllLengths();
    void unresolveUncertainNodes();
    void translateNames();

Loading