diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9bc5d36a9b81956551764f74ab86c8f0aa89232c..a019b1b1a119878ac3a27d921edd6180ed0acbe0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -86,6 +86,7 @@ SET(XTPCPP_SRCS ./gui/peptide_list_view/peptidelistwindow.cpp ./gui/peptide_list_view/peptidetablemodel.cpp ./gui/project_view/projectwindow.cpp + ./gui/protein_view/proteinwindow.cpp ./gui/protein_list_view/proteinlistwindow.cpp ./gui/protein_list_view/proteintablemodel.cpp ) @@ -95,6 +96,7 @@ SET (GUI_UIS ./gui/peptide_list_view/peptide_view.ui ./gui/project_view/project_view.ui ./gui/protein_list_view/protein_view.ui + ./gui/protein_view/protein_detail_view.ui ) SET(XTPCPP_MOC_HDRS @@ -129,4 +131,4 @@ TARGET_LINK_LIBRARIES(xtpcpp ${PAPPSOMSPP_QT4_LIBRARY} ${Pwiz_LIBRARY} ${ODSSTRE INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/xtpcpp DESTINATION bin) -#configure_file (${CMAKE_SOURCE_DIR}/templates/share/applications/pt-peptideviewer.desktop.cmake ${CMAKE_BINARY_DIR}/templates/share/applications/pt-peptideviewer.desktop) +#configure_file (${CMAKE_SOURCE_DIR}/templates/share/applications/pt-peptideviewer.desktop.cmake ${CMAKE_BINARY_DIR}/templates/share/applications/pt-peptideviewer.desktop) \ No newline at end of file diff --git a/src/gui/protein_view/protein_detail_view.ui b/src/gui/protein_view/protein_detail_view.ui new file mode 100644 index 0000000000000000000000000000000000000000..455bec3fee9a3bb99326e11f155d7835e9dcea5f --- /dev/null +++ b/src/gui/protein_view/protein_detail_view.ui @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>ProteinDetailWindow</class> + <widget class="QMainWindow" name="ProteinDetailWindow"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>609</width> + <height>409</height> + </rect> + </property> + <property name="windowTitle"> + <string>MainWindow</string> + </property> + <widget class="QWidget" name="centralwidget"> + <layout class="QGridLayout" name="gridLayout"> + <item row="1" column="0"> + <layout class="QVBoxLayout" name="verticalLayout"> + <item> + <widget class="QLabel" name="descriptionLabel"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>TextLabel</string> + </property> + </widget> + </item> + <item> + <widget class="QLabel" name="sequenceLabel"> + <property name="text"> + <string>TextLabel</string> + </property> + </widget> + </item> + </layout> + </item> + </layout> + </widget> + <widget class="QMenuBar" name="menubar"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>609</width> + <height>23</height> + </rect> + </property> + </widget> + <widget class="QStatusBar" name="statusbar"/> + </widget> + <resources/> + <connections/> +</ui> diff --git a/src/gui/protein_view/proteinwindow.cpp b/src/gui/protein_view/proteinwindow.cpp new file mode 100644 index 0000000000000000000000000000000000000000..aa8e4b393e5e37ed2928a39bba07da6c10dbbe42 --- /dev/null +++ b/src/gui/protein_view/proteinwindow.cpp @@ -0,0 +1,59 @@ + +/******************************************************************************* +* Copyright (c) 2017 Olivier Langella <olivier.langella@u-psud.fr>. +* +* This file is part of XTPcpp. +* +* XTPcpp is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* XTPcpp is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with XTPcpp. If not, see <http://www.gnu.org/licenses/>. +* +* Contributors: +* Olivier Langella <olivier.langella@u-psud.fr> - initial API and implementation +******************************************************************************/ + +#include "proteinwindow.h" + +ProteinWindow::ProteinWindow(ProjectWindow *parent): + QMainWindow(parent), + ui(new Ui::ProteinDetailView) +{ + ui->setupUi(this); + /* + */ + + +#if QT_VERSION >= 0x050000 + // Qt5 code + /* + connect(&workerThread, &QThread::finished, worker, &QObject::deleteLater); + connect(this, &PtSpectrumViewer::operateMsDataFile, worker, &PwizLoaderThread::doMsDataFileLoad); + connect(worker, &PwizLoaderThread::msDataReady, this, &PtSpectrumViewer::handleMsDataFile); + */ +#else +// Qt4 code + connect(ui->tableView, SIGNAL(clicked(const QModelIndex &)), _p_proxy_model, SLOT(onTableClicked(const QModelIndex &))); + connect(ui->tableView, SIGNAL(doubleClicked(const QModelIndex &)), _p_proxy_model, SLOT(onTableDoubleClicked(const QModelIndex &))); + connect(ui->proteinSearchEdit, SIGNAL(textChanged(QString)), _protein_table_model_p, SLOT(onProteinSearchEdit(QString))); + + + connect( this, SIGNAL( focusReceived(bool) ),this, SLOT(doFocusReceived(bool)) ); + connect(ui->centralwidget, SIGNAL(customContextMenuRequested(const QPoint &)), + this, SLOT(showContextMenu(const QPoint &))); + //connect(_protein_table_model_p, SIGNAL(layoutChanged()), this, SLOT(updateStatusBar())); +#endif +} + +ProteinWindow::~ProteinWindow() +{ + +} diff --git a/src/gui/protein_view/proteinwindow.h b/src/gui/protein_view/proteinwindow.h new file mode 100644 index 0000000000000000000000000000000000000000..467e8378cba658f26e10d4f20b9f77ca7ff73ad2 --- /dev/null +++ b/src/gui/protein_view/proteinwindow.h @@ -0,0 +1,42 @@ + +/******************************************************************************* +* Copyright (c) 2017 Olivier Langella <olivier.langella@u-psud.fr>. +* +* This file is part of XTPcpp. +* +* XTPcpp is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* XTPcpp is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with XTPcpp. If not, see <http://www.gnu.org/licenses/>. +* +* Contributors: +* Olivier Langella <olivier.langella@u-psud.fr> - initial API and implementation +******************************************************************************/ + +#ifndef PROTEINWINDOW_H +#define PROTEINWINDOW_H + +#include <QMainWindow> + +namespace Ui { +class ProteinDetailView; +} + +class ProteinWindow: public QMainWindow { + Q_OBJECT + +public: + + explicit ProteinWindow(ProjectWindow * parent = 0); + ~ProteinWindow(); +}; + +#endif // PROTEINWINDOW_H