# HG changeset patch # User insilmaril # Date 1152095394 0 # Node ID 21379539d95294efafd725e10d6a07981a52b39c # Parent 84f76a3876d78b4c3e427154552079a879aeee17 ported aboutdialog to QT4 completely diff -r 84f76a3876d7 -r 21379539d952 aboutdialog.cpp --- a/aboutdialog.cpp Tue Jul 04 12:10:56 2006 +0000 +++ b/aboutdialog.cpp Wed Jul 05 10:29:54 2006 +0000 @@ -1,8 +1,6 @@ -#include -#include -//Added by qt3to4: -#include -#include +#include +#include +#include #include "aboutdialog.h" #include "version.h" @@ -23,7 +21,7 @@ tabs=new QTabWidget (this); credits=new AboutTextBrowser (parent,"credits"); - credits->setText ( + credits->setHtml( "
" "

VYM - View Your Mind

" "

A tool to put the things you have got in your mind into a map.

" @@ -52,13 +50,15 @@ "
  • Matt from www.satbp.com for Taskjuggler export
  • " "" ""); - credits->setFrameStyle( Q3Frame::Panel | Q3Frame::Plain ); + credits->setFrameStyle( QFrame::Panel | QFrame::Plain ); tabs->addTab (credits,"Credits"); license=new AboutTextBrowser (parent,"license"); license->setText ( + "
    " "

    VYM - View Your Mind

    " "

    Copyright (C) 2004-2005 Uwe Drechsel

    " + "
    " "

    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.

    " @@ -166,7 +166,7 @@ "

    END OF TERMS AND CONDITIONS

    " ); - credits->setFrameStyle( Q3Frame::Panel | Q3Frame::Plain ); + credits->setFrameStyle( QFrame::Panel | QFrame::Plain ); tabs->addTab (license,"License"); mainLayout->addWidget (tabs); @@ -182,24 +182,14 @@ } AboutTextBrowser::AboutTextBrowser(QWidget *parent, const char *name) - : Q3TextBrowser(parent, name) + : QTextBrowser(parent, name) { } -void AboutTextBrowser::setSource(const QString &name) +void AboutTextBrowser::setSource(const QUrl &url ) { - Q3MimeSourceFactory *factory = Q3MimeSourceFactory::defaultFactory(); - const QMimeSource *data = factory->data(name); - if (data) { - Q3TextBrowser::setSource(name); - } else { - Q3Process *proc = new Q3Process( this ); - proc->addArgument( settings.readEntry("/vym/mainwindow/readerURL" )); - proc->addArgument( name); - - if ( !proc->start() ) - if (mainWindow->settingsURL() ) - setSource(name); - } + QProcess *proc= new QProcess (); + proc->start( settings.readEntry("/vym/mainwindow/readerURL"),QStringList ()<waitForStarted() &&mainWindow->settingsURL() ) setSource(url); } diff -r 84f76a3876d7 -r 21379539d952 aboutdialog.h --- a/aboutdialog.h Tue Jul 04 12:10:56 2006 +0000 +++ b/aboutdialog.h Wed Jul 05 10:29:54 2006 +0000 @@ -1,12 +1,12 @@ #ifndef ABOUTDIALOG_H #define ABOUTDIALOG_H -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include class AboutTextBrowser; ///////////////////////////////////////////////////////////////////////////// @@ -29,13 +29,13 @@ }; -class AboutTextBrowser : public Q3TextBrowser +class AboutTextBrowser : public QTextBrowser { Q_OBJECT; public: AboutTextBrowser(QWidget *parent, const char *name = 0); public slots: - void setSource(const QString &name); + virtual void setSource(const QUrl &url); }; #endif diff -r 84f76a3876d7 -r 21379539d952 demos/todo.vym Binary file demos/todo.vym has changed diff -r 84f76a3876d7 -r 21379539d952 main.cpp --- a/main.cpp Tue Jul 04 12:10:56 2006 +0000 +++ b/main.cpp Wed Jul 05 10:29:54 2006 +0000 @@ -1,13 +1,11 @@ #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include -#include -//Added by qt3to4: -#include +#include #include #include "settings.h" @@ -202,9 +200,6 @@ cout << "Testing: "<setPixmap("vym-128x128", QPixmap(iconPath+"vym-128x128.png")); q3InitNetworkProtocols(); diff -r 84f76a3876d7 -r 21379539d952 mainwindow.cpp --- a/mainwindow.cpp Tue Jul 04 12:10:56 2006 +0000 +++ b/mainwindow.cpp Wed Jul 05 10:29:54 2006 +0000 @@ -683,6 +683,7 @@ a = new QAction(QPixmap(), tr( "Edit URL"+QString("...") ), this); a->setStatusTip ( tr( "Edit URL" ) ); a->setShortcut (Qt::SHIFT + Qt::CTRL+Qt::Key_U ); + a->setShortcutContext (Qt::WindowShortcut); a->setEnabled (false); actionListBranches.append(a); connect( a, SIGNAL( activated() ), this, SLOT( editURL() ) ); @@ -1561,17 +1562,6 @@ saveImageFormatMenu->addAction ( a ); } -/* FIXME not needed any longer - Q3StrList fmt = QImageWriter::supportedImageFormats(); - for (const char* f = fmt.first(); f; f = fmt.next()) - { - saveImageFormatMenu->insertItem( f ); - exportImageFormatMenu->insertItem( f ); - } -*/ -// connect( saveImageFormatMenu, SIGNAL( activated(int) ), this, SLOT( editSaveImage(int ) ) ); -// connect( exportImageFormatMenu, SIGNAL( activated(int) ), this, SLOT( fileExportImage(int ) ) ); - floatimageContextMenu->addSeparator(); actionEditCopy->addTo( floatimageContextMenu ); actionEditCut->addTo( floatimageContextMenu );