Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
xtpcpp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PAPPSO
xtpcpp
Commits
ee477b81
Commit
ee477b81
authored
6 years ago
by
Langella Olivier
Browse files
Options
Downloads
Patches
Plain Diff
set size policy in peptide details status bar
parent
17c07767
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gui/peptide_detail_view/peptidewindow.cpp
+56
-26
56 additions, 26 deletions
src/gui/peptide_detail_view/peptidewindow.cpp
with
56 additions
and
26 deletions
src/gui/peptide_detail_view/peptidewindow.cpp
+
56
−
26
View file @
ee477b81
...
...
@@ -97,13 +97,16 @@ PeptideWindow::PeptideWindow(ProjectWindow *parent)
_mz_label
=
new
QLabel
(
""
);
_mz_label
->
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
ui
->
statusbar
->
addWidget
(
_mz_label
);
QWidget
*
p_spacer
=
new
QWidget
();
p_spacer
->
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
ui
->
statusbar
->
addWidget
(
p_spacer
);
_peak_label
=
new
QLabel
(
""
);
_peak_label
->
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
ui
->
statusbar
->
addWidget
(
_peak_label
);
_ion_label
=
new
QLabel
(
""
);
_ion_label
->
setSizePolicy
(
QSizePolicy
::
Expanding
,
QSizePolicy
::
Minimum
);
ui
->
statusbar
->
addWidget
(
_ion_label
);
ui
->
spectrum_widget
->
setMaximumIsotopeNumber
(
3
);
...
...
@@ -111,31 +114,48 @@ PeptideWindow::PeptideWindow(ProjectWindow *parent)
#if QT_VERSION >= 0x050000
// Qt5 code
connect
(
_p_project_window
,
&
ProjectWindow
::
identificationGroupGrouped
,
this
,
connect
(
_p_project_window
,
&
ProjectWindow
::
identificationGroupGrouped
,
this
,
&
PeptideWindow
::
doIdentificationGroupGrouped
);
connect
(
this
,
&
PeptideWindow
::
loadSpectrumSp
,
worker
,
connect
(
this
,
&
PeptideWindow
::
loadSpectrumSp
,
worker
,
&
SpectrumSpLoaderThread
::
doLoadSpectrumSp
);
connect
(
worker
,
&
SpectrumSpLoaderThread
::
spectrumSpReady
,
this
,
connect
(
worker
,
&
SpectrumSpLoaderThread
::
spectrumSpReady
,
this
,
&
PeptideWindow
::
doSpectrumSpReady
);
connect
(
ui
->
spectrum_widget
,
&
pappso
::
SpectrumWidget
::
mzChanged
,
this
,
connect
(
ui
->
spectrum_widget
,
&
pappso
::
SpectrumWidget
::
mzChanged
,
this
,
&
PeptideWindow
::
setMz
);
connect
(
ui
->
spectrum_widget
,
&
pappso
::
SpectrumWidget
::
peakChanged
,
this
,
connect
(
ui
->
spectrum_widget
,
&
pappso
::
SpectrumWidget
::
peakChanged
,
this
,
&
PeptideWindow
::
setPeak
);
connect
(
ui
->
spectrum_widget
,
&
pappso
::
SpectrumWidget
::
ionChanged
,
this
,
connect
(
ui
->
spectrum_widget
,
&
pappso
::
SpectrumWidget
::
ionChanged
,
this
,
&
PeptideWindow
::
setIon
);
#else
// Qt4 code
connect
(
_p_project_window
,
SIGNAL
(
identificationGroupGrouped
(
IdentificationGroup
*
)),
this
,
SIGNAL
(
identificationGroupGrouped
(
IdentificationGroup
*
)),
this
,
SLOT
(
doIdentificationGroupGrouped
(
IdentificationGroup
*
)));
connect
(
this
,
SIGNAL
(
loadSpectrumSp
(
PeptideMatch
*
)),
worker
,
connect
(
this
,
SIGNAL
(
loadSpectrumSp
(
PeptideMatch
*
)),
worker
,
SLOT
(
doLoadSpectrumSp
(
PeptideMatch
*
)));
connect
(
worker
,
SIGNAL
(
spectrumSpReady
(
pappso
::
SpectrumSp
,
QString
,
QString
)),
this
,
SLOT
(
doSpectrumSpReady
(
pappso
::
SpectrumSp
,
QString
,
QString
)));
connect
(
_p_spectrum_overlay
,
SIGNAL
(
mzChanged
(
double
)),
this
,
SLOT
(
setMz
(
double
)));
connect
(
worker
,
SIGNAL
(
spectrumSpReady
(
pappso
::
SpectrumSp
,
QString
,
QString
)),
this
,
SLOT
(
doSpectrumSpReady
(
pappso
::
SpectrumSp
,
QString
,
QString
)));
connect
(
_p_spectrum_overlay
,
SIGNAL
(
mzChanged
(
double
)),
this
,
SLOT
(
setMz
(
double
)));
// connect(_protein_table_model_p, SIGNAL(layoutChanged()), this,
// SLOT(updateStatusBar()));
#endif
...
...
@@ -230,7 +250,8 @@ PeptideWindow::updateDisplay()
ui
->
mz_label
->
setText
(
QString
::
number
(
_p_peptide_evidence
->
getPeptideXtpSp
().
get
()
->
getMz
(
_p_peptide_evidence
->
getCharge
()),
'f'
,
4
));
'f'
,
4
));
ui
->
expmz_label
->
setText
(
QString
::
number
(
_p_peptide_evidence
->
getExperimentalMz
(),
'f'
,
4
));
ui
->
delta_label
->
setText
(
...
...
@@ -242,13 +263,14 @@ PeptideWindow::updateDisplay()
}
catch
(
pappso
::
PappsoException
exception_pappso
)
{
QMessageBox
::
warning
(
this
,
tr
(
"Unable to display peptide details :"
),
QMessageBox
::
warning
(
this
,
tr
(
"Unable to display peptide details :"
),
exception_pappso
.
qwhat
());
}
catch
(
std
::
exception
exception_std
)
{
QMessageBox
::
warning
(
this
,
tr
(
"Unable to display peptide details :"
),
exception_std
.
what
());
QMessageBox
::
warning
(
this
,
tr
(
"Unable to display peptide details :"
),
exception_std
.
what
());
}
}
...
...
@@ -259,9 +281,11 @@ PeptideWindow::chooseDefaultMzDataDir()
QSettings
settings
;
QString
default_location
=
settings
.
value
(
"path/mzdatadir"
,
""
).
toString
();
QString
filename
=
QFileDialog
::
getExistingDirectory
(
this
,
tr
(
"Choose default mz data directory"
),
default_location
,
QFileDialog
::
ShowDirsOnly
);
QString
filename
=
QFileDialog
::
getExistingDirectory
(
this
,
tr
(
"Choose default mz data directory"
),
default_location
,
QFileDialog
::
ShowDirsOnly
);
if
(
filename
.
isEmpty
())
{
...
...
@@ -307,7 +331,8 @@ PeptideWindow::openInXicViewer()
}
void
PeptideWindow
::
doSpectrumSpReady
(
pappso
::
SpectrumSp
spectrum_sp
,
QString
error
,
PeptideWindow
::
doSpectrumSpReady
(
pappso
::
SpectrumSp
spectrum_sp
,
QString
error
,
QString
fatal_error
)
{
qDebug
()
<<
"PeptideWindow::doSpectrumSpReady begin error="
<<
error
...
...
@@ -347,7 +372,8 @@ PeptideWindow::doSpectrumSpReady(pappso::SpectrumSp spectrum_sp, QString error,
// fatal_error
QMessageBox
::
warning
(
this
,
tr
(
"Oops! an error occurred in XTPCPP. Dont Panic :"
),
this
,
tr
(
"Oops! an error occurred in XTPCPP. Dont Panic :"
),
fatal_error
);
ui
->
statusbar
->
showMessage
(
tr
(
"ERROR reading spectrum"
));
QSettings
settings
;
...
...
@@ -436,9 +462,11 @@ PeptideWindow::doSaveSvg()
.
arg
(
_p_peptide_evidence
->
getScan
());
}
QString
filename
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Save SVG file"
),
proposed_filename
,
tr
(
"Scalable Vector Graphic (*.svg)"
));
QString
filename
=
QFileDialog
::
getSaveFileName
(
this
,
tr
(
"Save SVG file"
),
proposed_filename
,
tr
(
"Scalable Vector Graphic (*.svg)"
));
if
(
filename
.
isEmpty
())
{
...
...
@@ -449,8 +477,10 @@ PeptideWindow::doSaveSvg()
ui
->
spectrum_widget
->
toSvgFile
(
filename
,
tr
(
"%1 SVG spectrum generator"
).
arg
(
SOFTWARE_NAME
),
tr
(
"This is an annotated SVG spectrum"
),
QSize
(
1200
,
500
));
filename
,
tr
(
"%1 SVG spectrum generator"
).
arg
(
SOFTWARE_NAME
),
tr
(
"This is an annotated SVG spectrum"
),
QSize
(
1200
,
500
));
// emit operateXpipFile(filename);
}
catch
(
pappso
::
PappsoException
&
error
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment