Skip to content
Snippets Groups Projects
Commit 679e38e2 authored by Langella Olivier's avatar Langella Olivier
Browse files

preparing xtpcpp to write entire Qt table

parent 5463eb7b
No related branches found
No related tags found
No related merge requests found
......@@ -135,8 +135,20 @@
<height>25</height>
</rect>
</property>
<widget class="QMenu" name="menuExport">
<property name="title">
<string>e&amp;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>
......@@ -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__;
}
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment