#include <httpbutton.h>
Definition at line 40 of file httpbutton.h.
◆ HttpButton()
HttpButton::HttpButton |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
Default constructor
Definition at line 38 of file httpbutton.cpp.
38 : QPushButton(parent)
39{
40 qDebug();
41}
◆ ~HttpButton()
pappso::HttpButton::~HttpButton |
( |
| ) |
|
◆ getChEBIUrl()
const QUrl HttpButton::getChEBIUrl |
( |
QString |
accession | ) |
|
|
protected |
Definition at line 124 of file httpbutton.cpp.
125{
126
127
128 QUrl url(QString("https://www.ebi.ac.uk/chebi/searchId.do?chebiId=%1")
129 .arg(accession.replace("ChEBI:", "")));
130 return url;
131}
◆ getOlsUrl()
const QUrl HttpButton::getOlsUrl |
( |
QString |
psimod_accession | ) |
|
|
protected |
Definition at line 93 of file httpbutton.cpp.
94{
95
96 QString iri(QString("http://purl.obolibrary.org/obo/%1")
97 .arg(psimod_accession.replace(":", "_")));
98 QUrl url(
99 QString("http://www.ebi.ac.uk/ols/ontologies/mod/terms?iri=%1").arg(iri));
100 return url;
101}
◆ getPubMedUrl()
const QUrl HttpButton::getPubMedUrl |
( |
QString |
accession | ) |
|
|
protected |
Definition at line 104 of file httpbutton.cpp.
105{
106
107 QUrl url(QString("https://pubmed.ncbi.nlm.nih.gov/%1/")
108 .arg(accession.replace("PubMed:", "")));
109 return url;
110}
◆ getRESIDUrl()
const QUrl HttpButton::getRESIDUrl |
( |
QString |
accession | ) |
|
|
protected |
Definition at line 114 of file httpbutton.cpp.
115{
116
117 QUrl url(QString("https://annotation.dbi.udel.edu/cgi-bin/resid?id=%1")
118 .arg(accession.replace("RESID:", "")));
119 return url;
120}
◆ getUnimodUrl()
const QUrl HttpButton::getUnimodUrl |
( |
QString |
accession | ) |
|
|
protected |
Definition at line 135 of file httpbutton.cpp.
136{
137
138
139 QUrl url(QString("http://www.unimod.org/modifications_view.php?editid1=%1")
140 .arg(accession.replace("Unimod:", "")));
141 return url;
142}
◆ mousePressEvent()
void pappso::HttpButton::mousePressEvent |
( |
QMouseEvent * |
e | ) |
|
|
overrideprotected |
Definition at line 48 of file httpbutton.cpp.
49{
50 if(!text().isEmpty())
51 {
52 if(text().startsWith("MOD:"))
53 {
54 QDesktopServices::openUrl(
getOlsUrl(this->text()));
55
56 }
57 else if(text().startsWith("PubMed:"))
58 {
60
61 }
62 else if(text().startsWith("RESID:"))
63 {
64 QDesktopServices::openUrl(
getRESIDUrl(this->text()));
65
66 }
67 else if(text().startsWith("ChEBI:"))
68 {
69 QDesktopServices::openUrl(
getChEBIUrl(this->text()));
70
71 }
72 else if(text().startsWith("Unimod:"))
73 {
75
76 }
77 else
78 {
79 qDebug() << "unknown" << this->text();
80 }
81 }
82 QPushButton::mousePressEvent(e);
83}
◆ setText()
void pappso::HttpButton::setText |
( |
const QString & |
text | ) |
|
The documentation for this class was generated from the following files: