diff --git a/src/gui/protein_list_view/protein_view.ui b/src/gui/protein_list_view/protein_view.ui index ada3765aac46b0dbe3437eb607790c2b98116428..d8a6f55282b497470dca2f8eb7db822f3e1982cf 100644 --- a/src/gui/protein_list_view/protein_view.ui +++ b/src/gui/protein_list_view/protein_view.ui @@ -135,8 +135,20 @@ <height>25</height> </rect> </property> + <widget class="QMenu" name="menuExport"> + <property name="title"> + <string>e&xport</string> + </property> + <addaction name="actionAs_ODS_file"/> + </widget> + <addaction name="menuExport"/> </widget> <widget class="QStatusBar" name="statusbar"/> + <action name="actionAs_ODS_file"> + <property name="text"> + <string>as ODS file</string> + </property> + </action> </widget> <resources/> <connections> @@ -268,6 +280,22 @@ </hint> </hints> </connection> + <connection> + <sender>actionAs_ODS_file</sender> + <signal>triggered()</signal> + <receiver>ProteinView</receiver> + <slot>doExportAsOdsFile()</slot> + <hints> + <hint type="sourcelabel"> + <x>-1</x> + <y>-1</y> + </hint> + <hint type="destinationlabel"> + <x>412</x> + <y>201</y> + </hint> + </hints> + </connection> </connections> <slots> <slot>doNotValidHide(bool)</slot> @@ -278,5 +306,6 @@ <slot>doMsrunFileSearch(QString)</slot> <slot>doScanNumberSearch(int)</slot> <slot>doModificationSearch(QString)</slot> + <slot>doExportAsOdsFile()</slot> </slots> </ui> diff --git a/src/gui/protein_list_view/proteinlistwindow.cpp b/src/gui/protein_list_view/proteinlistwindow.cpp index 73648355426d11880bc79d9f6c6fcf09d939c753..90324356786f223a7bfa494721d1196eaa40c6f0 100644 --- a/src/gui/protein_list_view/proteinlistwindow.cpp +++ b/src/gui/protein_list_view/proteinlistwindow.cpp @@ -47,7 +47,9 @@ ProteinListQactionColumn::ProteinListQactionColumn(ProteinListWindow *parent, #if QT_VERSION >= 0x050000 // Qt5 code - connect(this, &ProteinListQactionColumn::toggled, this, + connect(this, + &ProteinListQactionColumn::toggled, + this, &ProteinListQactionColumn::doToggled); #else // Qt4 code @@ -116,26 +118,41 @@ ProteinListWindow::ProteinListWindow(ProjectWindow *parent) #if QT_VERSION >= 0x050000 // Qt5 code - connect(_project_window, &ProjectWindow::identificationGroupGrouped, this, + connect(_project_window, + &ProjectWindow::identificationGroupGrouped, + this, &ProteinListWindow::doIdentificationGroupGrouped); - connect(this, &ProteinListWindow::proteinDataChanged, _protein_table_model_p, + connect(this, + &ProteinListWindow::proteinDataChanged, + _protein_table_model_p, &ProteinTableModel::onProteinDataChanged); - connect(ui->tableView, &QTableView::clicked, _p_proxy_model, + connect(ui->tableView, + &QTableView::clicked, + _p_proxy_model, &ProteinTableProxyModel::onTableClicked); - connect(ui->centralwidget, &QWidget::customContextMenuRequested, this, + connect(ui->centralwidget, + &QWidget::customContextMenuRequested, + this, &ProteinListWindow::showContextMenu); - connect(_protein_table_model_p, &ProteinTableModel::layoutChanged, this, + connect(_protein_table_model_p, + &ProteinTableModel::layoutChanged, + this, &ProteinListWindow::updateStatusBar); #else // Qt4 code connect(_project_window, - SIGNAL(identificationGroupGrouped(IdentificationGroup *)), this, + SIGNAL(identificationGroupGrouped(IdentificationGroup *)), + this, SLOT(doIdentificationGroupGrouped(IdentificationGroup *))); - connect(this, SIGNAL(proteinDataChanged()), _protein_table_model_p, + connect(this, + SIGNAL(proteinDataChanged()), + _protein_table_model_p, SLOT(onProteinDataChanged())); - connect(ui->tableView, SIGNAL(clicked(const QModelIndex &)), _p_proxy_model, + 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 &))); @@ -145,11 +162,15 @@ ProteinListWindow::ProteinListWindow(ProjectWindow *parent) // connect( this, SIGNAL( focusReceived(bool) ),this, // SLOT(doFocusReceived(bool)) ); - connect(ui->centralwidget, SIGNAL(customContextMenuRequested(const QPoint &)), - this, SLOT(showContextMenu(const QPoint &))); + connect(ui->centralwidget, + SIGNAL(customContextMenuRequested(const QPoint &)), + this, + SLOT(showContextMenu(const QPoint &))); // connect(_p_proxy_model, SIGNAL(layoutChanged()), // this, SLOT(doProxyLayoutChanged())); - connect(_protein_table_model_p, SIGNAL(layoutChanged()), this, + connect(_protein_table_model_p, + SIGNAL(layoutChanged()), + this, SLOT(updateStatusBar())); #endif } @@ -448,3 +469,10 @@ ProteinListWindow::getProjectWindow() { return _project_window; } + + +void +ProteinListWindow::doExportAsOdsFile() +{ + qDebug() << __FILE__ << " " << __FUNCTION__ << " " << __LINE__; +} diff --git a/src/gui/protein_list_view/proteinlistwindow.h b/src/gui/protein_list_view/proteinlistwindow.h index a1015a9a3cb4dae50f4d6ba401aacd6fc6ad002b..0f49e0100975f5b87d4204bc66d11239763208ac 100644 --- a/src/gui/protein_list_view/proteinlistwindow.h +++ b/src/gui/protein_list_view/proteinlistwindow.h @@ -78,6 +78,7 @@ class ProteinListWindow : public QMainWindow void doFocusReceived(bool has_focus); void doIdentificationGroupGrouped(IdentificationGroup *p_identification_group); + void doExportAsOdsFile(); // void peptideEdited(QString peptideStr); // void setColor(const QColor &color); // void setShape(Shape shape);