File: aboutDlg.cpp

package info (click to toggle)
massxpert 2.3.6-1squeeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 20,736 kB
  • ctags: 3,541
  • sloc: cpp: 44,108; xml: 7,381; sh: 604; makefile: 108; ansic: 7
file content (158 lines) | stat: -rw-r--r-- 5,829 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/* massXpert - the true massist's program.
   --------------------------------------
   Copyright(C) 2006, 2007 Filippo Rusconi

   http://www.massxpert.org/massXpert

   This file is part of the massXpert project.

   The massxpert project is the successor to the "GNU polyxmass"
   project that is an official GNU project package(see
   www.gnu.org). The massXpert project is not endorsed by the GNU
   project, although it is released ---in its entirety--- under the
   GNU General Public License. A huge part of the code in massXpert
   is actually a C++ rewrite of code in GNU polyxmass. As such
   massXpert was started at the Centre National de la Recherche
   Scientifique(FRANCE), that granted me the formal authorization to
   publish it under this Free Software License.

   This software is free software; you can redistribute it and/or
   modify it under the terms of the GNU  General Public
   License version 3, as published by the Free Software Foundation.
   

   This software is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this software; if not, write to the

   Free Software Foundation, Inc.,

   51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/


/////////////////////// Qt includes
#include <QGraphicsPixmapItem>


/////////////////////// Local includes
#include "aboutDlg.hpp"
#include "config.h"
#include "about_gpl_v30.hpp"
#include "about_history.hpp"


namespace massXpert
{

  AboutDlg::AboutDlg(QWidget *parent)
    : QDialog(parent)
  {
    Q_ASSERT(parent);
  
    m_ui.setupUi(this);

    QString text = QString(tr("massXpert, version %1.").arg(VERSION));
    m_ui.programVersionLabel->setText(text);
  

    connect(m_ui.closePushButton,
	    SIGNAL(clicked()),
	    this,
	    SLOT(accept()));
    

    setupGraphicsView();
  

    m_ui.aboutTextEdit->setText("This software is licensed under the "
				 "General Public License version 3. \n"
				 "Please, read the license on the \"General Public License\" tab.\n"
				 "NO WARRANTY \n"
				 "\n"
				 "\n  15. Disclaimer of Warranty.\n"
				 "\n"
				 "  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\n"
				 "APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\n"
				 "HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ""AS IS"" WITHOUT WARRANTY\n"
				 "OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\n"
				 "THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n"
				 "PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\n"
				 "IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\n"
				 "ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\n"
				 "\n"
				 "  16. Limitation of Liability.\n"
				 "\n"
				 "  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\n"
				 "WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\n"
				 "THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\n"
				 "GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\n"
				 "USE OR INABILITY TO USE THE PROGRAM(INCLUDING BUT NOT LIMITED TO LOSS OF\n"
				 "DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\n"
				 "PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\n"
				 "EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\n"
				 "SUCH DAMAGES.\n");
    

  
  
    m_ui.copyrightLabel->setText("massXpert Copyright 2000,2001,2002,2003,2004,2005,2006,2007,2008 by Filippo Rusconi");
  
  
    m_ui.featuresTextEdit->setHtml("<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">\n"
				    " p, li { white-space: pre-wrap; }\n"
				    " </style></head><body style=\" font-family:'Sans Serif'; font-size:12pt; font-weight:400; font-style:normal; text-decoration:none;\">\n"
				    "<p style=\"-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\"></p>\n"
				    "<br>\n"
				    "<br>\n"
				    "<em>massXpert</em> provides the following main features:\n"
				    "<br>\n"
				    "<ul>\n"
				    "<li>highly configurable sequence editor using user-defined monomer vignettes</li>\n"
				    "<li>definition of atoms with any number of isotopic mass/abundance pairs</li>\n"
				    "<li>definition of brand new polymer chemistries</li>\n"
				    "<li>polymer sequence cleavage using user-defined flexible cleavage agents</li>\n"
				    "<li>gas-phase fragmentation of oligomers using user-defined flexible fragmentation rules</li>\n"
				    "<li>powerful mass search in a polymer sequence with associated ion charge values ranges</li>\n"
				    "<li>powerful Copy/Paste paradigm allowing the pasted polymer sequence to be purified</li>\n"
				    "<li>calculation of isotopic pattern of any chemical starting from a formula</li>\n"
				    "</ul>\n"
				    "<br>\n"
				    "Visit http://www.massxpert.org\n"
				    "</body></html>\n");

    m_ui.gplTextEdit->setText(gpl);
    m_ui.historyTextEdit->setHtml(history);
  }


  void
  AboutDlg::setupGraphicsView()
  {
    mp_graphicsScene = new QGraphicsScene();

    QPixmap pixmap(":/images/splashscreen.png");

    QGraphicsPixmapItem *pixmapItem = mp_graphicsScene->addPixmap(pixmap);
    if (!pixmapItem)
      return;
    m_ui.graphicsView->setScene(mp_graphicsScene);
  }


  void 
  AboutDlg::showHowToCiteTab()
  {
    m_ui.tabWidget->setCurrentIndex(1);
  }
  

  AboutDlg::~AboutDlg()
  {
  }

} // namespace massXpert