peptideDialog.h

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 
00005 #ifndef BALL_VIEW_DIALOGS_PEPTIDEDIALOG_H
00006 #define BALL_VIEW_DIALOGS_PEPTIDEDIALOG_H
00007 
00008 #ifndef BALL_COMMON_GLOBAL_H
00009 # include <BALL/COMMON/global.h>
00010 #endif
00011 
00012 #ifndef BALL_STRUCTURE_PEPTIDEBUILDER_H
00013 #include <BALL/STRUCTURE/peptideBuilder.h>
00014 #endif
00015 
00016 #include <BALL/VIEW/UIC/ui_peptideDialog.h>
00017 
00018 namespace BALL
00019 {
00020   namespace VIEW
00021   {
00025     class BALL_VIEW_EXPORT PeptideDialog
00026       : public QDialog,
00027         public Ui_PeptideDialogData,
00028         public Peptides::PeptideBuilder
00029     { 
00030       Q_OBJECT
00031 
00032       public:
00033 
00035       PeptideDialog( QWidget* parent = 0, const char* name = "PeptideDialog", Qt::WFlags fl = 0 );
00036 
00038       ~PeptideDialog() {}
00039 
00041       String getSequence();
00042 
00044       Protein* getProtein() { return protein_;}
00045 
00046       public slots:
00047 
00049       void ala_pressed() {insert_('a');}
00050 
00052       void arg_pressed() {insert_('r');}
00053       
00055       void asn_pressed() {insert_('n');}
00056       
00058       void asp_pressed() {insert_('d');}
00059       
00061       void cys_pressed() {insert_('c');}
00062       
00064       void gln_pressed() {insert_('q');}
00065       
00067       void glu_pressed() {insert_('e');}
00068       
00070       void gly_pressed() {insert_('g');}
00071       
00073       void his_pressed() {insert_('h');}
00074       
00076       void ile_pressed() {insert_('i');}
00077       
00079       void leu_pressed() {insert_('l');}
00080       
00082       void lys_pressed() {insert_('k');}
00083       
00085       void met_pressed() {insert_('m');}
00086       
00088       void phe_pressed() {insert_('f');}
00089       
00091       void pro_pressed() {insert_('p');}
00092       
00094       void ser_pressed() {insert_('s');}
00095       
00097       void thr_pressed() {insert_('t');}
00098       
00100       void trp_pressed() {insert_('w');}
00101       
00103       void tyr_pressed() {insert_('y');}
00104       
00106       void val_pressed() {insert_('v');}
00107 
00109       void back_pressed();
00110 
00112       void close_pressed();
00113 
00115       void angle_changed();
00116       
00118       void insert_seq();
00119         
00121       void prolineActivated(); 
00122       
00124       void prolineDeactivated();
00125 
00127       virtual bool eventFilter(QObject* object, QEvent* event);
00128 
00129       protected:
00130  
00131       void insert_(char a);
00132 
00133       void truncString_(String& data);
00134 
00135       bool isAminoAcid_(char a) const;
00136 
00137       Protein* protein_;
00138       static String all_amino_acids_;
00139     };
00140 
00141 } } // namespaces
00142 #endif