added aboutDialog
authorinsilmaril
Mon Aug 08 16:16:42 2005 +0000 (2005-08-08)
changeset 1494426ecd854bb
parent 148 401f76b830d1
child 150 85eab6b8120b
added aboutDialog
aboutdialog.cpp
aboutdialog.h
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/aboutdialog.cpp	Mon Aug 08 16:16:42 2005 +0000
     1.3 @@ -0,0 +1,69 @@
     1.4 +#include "aboutdialog.h"
     1.5 +#include "version.h"
     1.6 +
     1.7 +#include "icons/vym-48x48.xpm"
     1.8 +
     1.9 +AboutDialog::AboutDialog( QWidget *parent, const char *name )
    1.10 +    : QDialog ( parent, name)
    1.11 +
    1.12 +{
    1.13 +	mainLayout=new QVBoxLayout( this);
    1.14 +
    1.15 +	tabs=new QTabWidget (this);
    1.16 +
    1.17 +	credits=new QTextBrowser (this,"credits");
    1.18 +
    1.19 +	
    1.20 +	credits->setText (
    1.21 +		"<h3>VYM - View Your Mind </h3>"
    1.22 +		"<p> A tool to put the things you have got in your mind into a map.</p>"
    1.23 +			"<ul>"
    1.24 +				"<li> (c) by Uwe Drechsel (vym@InSilmaril.de)</li>"
    1.25 +				"<li> vym is released under the GPL (Gnu General Public License)"
    1.26 +				", with one exception (see the file \"LICENSE\"which "
    1.27 +				"comes with vym). This exception is needed to build vym with QT libraries for proprietary operating systems.</li>"
    1.28 +				"<li> Project homepage <a href=\"http:/www.InSilmaril.de/vym\">"
    1.29 +    					"http:/www.InSilmaril.de/vym</a></li>"
    1.30 +			"<li> Credits " 
    1.31 +				"<ul>"
    1.32 +					"<li>Jakob Hilmer for image drag and drop patch </li>"
    1.33 +					"<li>Thomas Schraitle for the stylesheet  used for XHTML-export </li>"
    1.34 +					"<li>Clemens Kraus for stylesheets and script used for HTML-export "
    1.35 +					"<a href=\"http://www.clemens-kraus.de\">(www.clemens-kraus.de)</a></li>"
    1.36 +					"<li>Alexander Johannesen for providing stylesheets from his xsiteable project " 
    1.37 +					"<a href=\"http://www.shelter.nu/xsiteable/xsiteable.html\">(www.shelter.nu/xsiteable/xsiteable.html)</a>. </li>"
    1.38 +					"<li>Ken Wimer and Olaf Hering for Mac support</li>"
    1.39 +				"</ul>"
    1.40 +			"</li>");
    1.41 +	credits->setFrameStyle( QFrame::Panel | QFrame::Plain );
    1.42 +    tabs->addTab (credits,"Credits");
    1.43 +
    1.44 +	license=new QTextBrowser (this,"license");
    1.45 +	license->setText ("License text...");
    1.46 +	credits->setFrameStyle( QFrame::Panel | QFrame::Plain );
    1.47 +	tabs->addTab (license,"License");
    1.48 +
    1.49 +	mainLayout->addWidget (tabs);
    1.50 +	tabs->showPage (credits);
    1.51 +
    1.52 +	okbutton =new QPushButton (this,"okbutton");
    1.53 +	okbutton->setText ("ok");
    1.54 +	okbutton->setMaximumSize (QSize (50,30));
    1.55 +	okbutton->setAutoDefault (true);
    1.56 +    mainLayout->addWidget( okbutton); 
    1.57 +
    1.58 +	connect (credits,SIGNAL (linkClicked(const QString&)),this ,SLOT
    1.59 +	(openLnk(const QString&)));
    1.60 +
    1.61 +	connect( okbutton, SIGNAL( clicked() ), this, SLOT( accept() ) );
    1.62 +}
    1.63 +
    1.64 +AboutDialog::~AboutDialog()
    1.65 +{
    1.66 +}
    1.67 +
    1.68 +
    1.69 +void AboutDialog::openLnk(const QString &url)
    1.70 +{
    1.71 +	okbutton->setText (url);
    1.72 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/aboutdialog.h	Mon Aug 08 16:16:42 2005 +0000
     2.3 @@ -0,0 +1,34 @@
     2.4 +#ifndef ABOUTDIALOG_H
     2.5 +#define ABOUTDIALOG_H
     2.6 +
     2.7 +#include <qtabwidget.h>
     2.8 +#include <qtextbrowser.h>
     2.9 +#include <qlayout.h>
    2.10 +#include <qdialog.h>
    2.11 +#include <qpushbutton.h>
    2.12 +#include <qstring.h>
    2.13 +
    2.14 +
    2.15 +/////////////////////////////////////////////////////////////////////////////
    2.16 +class AboutDialog :public QDialog
    2.17 +{
    2.18 +public:
    2.19 +	AboutDialog( QWidget * parent = 0, const char * name = 0);
    2.20 +	~AboutDialog();
    2.21 +
    2.22 +public slots:
    2.23 +	virtual void openLnk (const QString &);
    2.24 +
    2.25 +private:
    2.26 +	QTabWidget *tabs;
    2.27 +	QTextBrowser *credits;
    2.28 +	QTextBrowser *license;
    2.29 +
    2.30 +	QBoxLayout *mainLayout;
    2.31 +	QBoxLayout *topLayout;
    2.32 +	QBoxLayout *bottomLayout;
    2.33 +	QPushButton *okbutton;
    2.34 +	
    2.35 +};
    2.36 +
    2.37 +#endif