1 /* emacs: -*- Mode: C; c-style: "bsd"; c-basic-offset: 4; c-recognize-knr-p: nil; -*- */
6 #include "aboutdialog.h"
9 #include "mainwindow.h"
11 extern Main *mainWindow;
12 extern Settings settings;
14 AboutDialog::AboutDialog( QWidget *parent, const char *name)
15 : QDialog( parent, name)
18 mainLayout=new QVBoxLayout( this, 10);
20 tabs=new QTabWidget (this);
21 credits=new AboutTextBrowser (this,"credits");
24 "<h3><img src=\"vym_logo\">VYM - View Your Mind </h3>"
25 "<p> A tool to put the things you have got in your mind into a map.</p>"
27 "<li> (c) by Uwe Drechsel (<a href=\"mailto:vym@InSilmaril.de\">vym@InSilmaril.de</a>)</li>"
28 "<li> vym is released under the GPL (Gnu General Public License)"
29 ", with one exception (see the file \"LICENSE\"which "
30 "comes with vym). This exception is needed to build vym with QT libraries for proprietary operating systems.</li>"
31 "<li> Project homepage <a href=\"http:/www.InSilmaril.de/vym\">"
32 "http://www.InSilmaril.de/vym</a></li>"
35 "<li>Jakob Hilmer for image drag and drop patch </li>"
36 "<li>Thomas Schraitle for the stylesheet used for XHTML-export </li>"
37 "<li>Clemens Kraus for stylesheets and script used for HTML-export "
38 "<a href=\"http://www.clemens-kraus.de\">(www.clemens-kraus.de)</a></li>"
39 "<li>Alexander Johannesen for providing stylesheets from his xsiteable project "
40 "<a href=\"http://www.shelter.nu/xsiteable/xsiteable.html\">(www.shelter.nu/xsiteable/xsiteable.html)</a>. </li>"
41 "<li>Ken Wimer and Olaf Hering for Mac support</li>"
44 credits->setFrameStyle( QFrame::Panel | QFrame::Plain );
45 tabs->addTab (credits,"Credits");
47 license=new AboutTextBrowser (this,"license");
48 license->setText ("License text...");
49 credits->setFrameStyle( QFrame::Panel | QFrame::Plain );
50 tabs->addTab (license,"License");
52 mainLayout->addWidget (tabs);
53 tabs->showPage (credits);
55 okbutton =new QPushButton (this,"okbutton");
56 okbutton->setText (tr("Ok"));
57 okbutton->setMaximumSize (QSize (50,30));
58 okbutton->setAutoDefault (true);
59 mainLayout->addWidget( okbutton);
61 connect( okbutton, SIGNAL( clicked() ), this, SLOT( accept() ) );
64 AboutTextBrowser::AboutTextBrowser(QWidget *parent, const char *name)
65 : QTextBrowser(parent, name)
70 void AboutTextBrowser::setSource(const QString &name)
72 QMimeSourceFactory *factory = QMimeSourceFactory::defaultFactory();
73 const QMimeSource *data = factory->data(name);
75 QTextBrowser::setSource(name);
77 QProcess *proc = new QProcess( this );
78 proc->addArgument( settings.readEntry("/vym/mainwindow/readerURL" ));
79 proc->addArgument( name);
82 if (mainWindow->settingsURL() )