aboutdialog.cpp
changeset 364 7b74fa3772bf
parent 350 13b9befc665e
child 381 c79df732d095
     1.1 --- a/aboutdialog.cpp	Tue Aug 01 09:30:57 2006 +0000
     1.2 +++ b/aboutdialog.cpp	Tue Sep 05 09:47:13 2006 +0000
     1.3 @@ -1,5 +1,6 @@
     1.4 -#include <qmime.h>
     1.5 -#include <qprocess.h>
     1.6 +#include <QProcess>
     1.7 +#include <QVBoxLayout>
     1.8 +#include <QFrame>
     1.9  
    1.10  #include "aboutdialog.h"
    1.11  #include "version.h"
    1.12 @@ -18,9 +19,9 @@
    1.13      mainLayout=new QVBoxLayout( this, 10);
    1.14  
    1.15      tabs=new QTabWidget (this);
    1.16 -    credits=new AboutTextBrowser (this,"credits");
    1.17 +    credits=new AboutTextBrowser (parent,"credits");
    1.18  
    1.19 -    credits->setText (
    1.20 +    credits->setHtml(
    1.21  	"<center><img src=\""+iconPath+"vym-128x128.png\"></center>"
    1.22  	"<h3><center>VYM - View Your Mind </h3>"
    1.23  	"<p align=\"center\"> A tool to put the things you have got in your mind into a map.</p>"
    1.24 @@ -52,11 +53,12 @@
    1.25      credits->setFrameStyle( QFrame::Panel | QFrame::Plain );
    1.26      tabs->addTab (credits,"Credits");
    1.27  
    1.28 -    license=new AboutTextBrowser (this,"license");
    1.29 -	//license->setTextFormat (PlainText);
    1.30 +    license=new AboutTextBrowser (parent,"license");
    1.31      license->setText (
    1.32 +	"<center>"
    1.33  	"<h3>VYM - View Your Mind</h3>"
    1.34 -    "<p>Copyright (C) 2004-2005  Uwe Drechsel</p>"  
    1.35 +    "<p>Copyright (C) 2004-2006  Uwe Drechsel</p>"  
    1.36 +	"</center>"
    1.37  
    1.38      "<p>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.</p>"
    1.39  
    1.40 @@ -185,19 +187,9 @@
    1.41      
    1.42  }
    1.43  
    1.44 -void AboutTextBrowser::setSource(const QString &name)
    1.45 +void AboutTextBrowser::setSource(const QUrl &url )
    1.46  {
    1.47 -    QMimeSourceFactory *factory = QMimeSourceFactory::defaultFactory();
    1.48 -    const QMimeSource *data = factory->data(name);
    1.49 -    if (data) {
    1.50 -	QTextBrowser::setSource(name);
    1.51 -    } else {
    1.52 -	QProcess *proc = new QProcess( this );
    1.53 -	proc->addArgument( settings.readEntry("/vym/mainwindow/readerURL" ));
    1.54 -	proc->addArgument( name);
    1.55 -	
    1.56 -	if ( !proc->start() ) 
    1.57 -	    if (mainWindow->settingsURL() ) 
    1.58 -		setSource(name);
    1.59 -    }
    1.60 +	QProcess *proc= new QProcess ();
    1.61 +	proc->start( settings.value("/mainwindow/readerURL").toString(),QStringList ()<<url.toString());
    1.62 +	if (!proc->waitForStarted() &&mainWindow->settingsURL() ) setSource(url);
    1.63  }