3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author Kalle Dalheimer
8 * Full author contact details are available in file CREDITS.
15 #include "qt_helpers.h"
18 #include "support/filetools.h"
19 #include "support/Package.h"
24 using lyx::support::package;
25 using lyx::support::makeDisplayPath;
31 static QString credits()
34 QFile file(toqstr(package().system_support().absFilename()) + "/CREDITS");
35 QTextStream out(&res);
37 if (file.isReadable()) {
38 out << qt_("ERROR: LyX wasn't able to read CREDITS file\n");
39 out << qt_("Please install correctly to estimate the great\n");
40 out << qt_("amount of work other people have done for the LyX project.");
42 file.open(QIODevice::ReadOnly);
43 QTextStream ts(&file);
48 if (line.startsWith("@b"))
49 out << "<b>" << line.mid(2) << "</b>";
50 else if (line.startsWith("@i"))
51 out << "<i>" << line.mid(2) << "</i>";
55 } while (!line.isNull());
62 static QString copyright()
64 return qt_("LyX is Copyright (C) 1995 by Matthias Ettrich,\n1995-2008 LyX Team");
68 static QString license()
70 return qt_("This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.");
74 static QString disclaimer()
76 return qt_("LyX 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.\nSee the GNU General Public License for more details.\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.");
80 static QString version()
83 QTextStream out(&res);
84 out << qt_("LyX Version ");
87 out << lyx_release_date;
89 out << qt_("Library directory: ");
90 out << toqstr(makeDisplayPath(package().system_support().absFilename()));
92 out << qt_("User directory: ");
93 out << toqstr(makeDisplayPath(package().user_support().absFilename()));
98 GuiAbout::GuiAbout(GuiView & lv)
99 : GuiDialog(lv, "aboutlyx", qt_("About LyX"))
103 connect(closePB, SIGNAL(clicked()), this, SLOT(reject()));
105 copyrightTB->setPlainText(copyright());
106 copyrightTB->append(QString());
107 copyrightTB->append(license());
108 copyrightTB->append(QString());
109 copyrightTB->append(disclaimer());
111 versionLA->setText(version());
112 creditsTB->setHtml(credits());
116 Dialog * createGuiAbout(GuiView & lv) { return new GuiAbout(lv); }
119 } // namespace frontend
122 #include "GuiAbout_moc.cpp"