# HG changeset patch # User insilmaril # Date 1154424682 0 # Node ID 58e7594239dfc6a4f740e4ddaa3c0eea23b645f0 # Parent b8c547f0fc582d9a2126c80ce1d57045540f8625 updated vym.pro to respect INSTALLDIR diff -r b8c547f0fc58 -r 58e7594239df demos/todo.vym Binary file demos/todo.vym has changed diff -r b8c547f0fc58 -r 58e7594239df mainwindow.cpp --- a/mainwindow.cpp Thu Jul 27 14:07:11 2006 +0000 +++ b/mainwindow.cpp Tue Aug 01 09:31:22 2006 +0000 @@ -234,6 +234,15 @@ statusBar(); + // Position toolbars + settings.beginGroup("/vym/mainwindow/toolbars/standardFlags"); + TB_standardFlags->move(settings.value("pos").toPoint()); + cout << "moving TB to pos="<<settings.value("pos").toPoint()<<endl; +// FIXME proceed here... +// TB_standardFlags->setOrientation(settings.value("orientation").toInt()); +// TB_standardFlags->setVisible(settings.value<QVariant::Bool>("visible",true)); + settings.endGroup(); + // Initialize Find window findWindow=new FindWindow(NULL,"findwindow"); @@ -256,6 +265,14 @@ settings.writeEntry( "/vym/mainwindow/geometry/posX", pos().x() ); settings.writeEntry( "/vym/mainwindow/geometry/posY", pos().y() ); + settings.beginGroup ("/vym/mainwindow/toolbar/standardFlags"); + settings.setValue ("pos",TB_standardFlags->pos()); + settings.setValue ("visible",TB_standardFlags->isVisible()); + settings.setValue ("orientation",TB_standardFlags->orientation()); + settings.endGroup(); + + settings.writeEntry( "/vym/mainwindow/toobar/posY", pos().y() ); + settings.writeEntry( "/vym/version/version", __VYM_VERSION ); settings.writeEntry( "/vym/version/builddate", __BUILD_DATE ); @@ -1107,6 +1124,7 @@ // Create Standard Flags QToolBar *tb=addToolBar (tr ("Standard Flags","Standard Flag Toolbar")); + TB_standardFlags=tb; standardFlagsDefault = new FlagRowObj (); standardFlagsDefault->setVisibility (false); @@ -3056,7 +3074,8 @@ void Main::testFunction() { - currentMapEditor()->testFunction(); + cout <<TB_standardFlags->pos()<<endl; + //currentMapEditor()->testFunction(); } void Main::helpDoc() diff -r b8c547f0fc58 -r 58e7594239df mainwindow.h --- a/mainwindow.h Thu Jul 27 14:07:11 2006 +0000 +++ b/mainwindow.h Tue Aug 01 09:31:22 2006 +0000 @@ -2,12 +2,13 @@ #define MAINWINDOW_H #include <q3popupmenu.h> -#include <QMainWindow> #include <q3textedit.h> #include <q3intdict.h> #include <q3canvas.h> #include <qlineedit.h> #include <QAction> +#include <QMainWindow> +#include <QToolBar> #include <qcursor.h> #include <qtabwidget.h> #include <qmap.h> @@ -183,7 +184,7 @@ void helpAboutQT(); private: -// not needed? QCanvas* canvas; + QToolBar *TB_standardFlags; QTabWidget *tabWidget; FindWindow *findWindow; QStringList lastMaps; diff -r b8c547f0fc58 -r 58e7594239df styles/vym2kdebookmarks.xsl --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/styles/vym2kdebookmarks.xsl Tue Aug 01 09:31:22 2006 +0000 @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE xsl:stylesheet +[ + <!-- Namespace for XHTML --> + <!ENTITY xhtmlns "http://www.w3.org/1999/xhtml"> +]> + +<!-- + Author : Uwe Drechsel <vym@InSilmaril.de> + Credits to : Thomas Schraitle for his patience in explaining XSL to me + Description : transforms vym maps into KDE Bookmarks +--> + +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:date="http://exslt.org/dates-and-times" + extension-element-prefixes="date"> + + +<xsl:output method="xml" + doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" + doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" + encoding="UTF-8" + indent="yes" + media-type="application/xhtml+xml"/> + +<!-- ======================================= --> + +<xsl:template match="/"> + <xsl:apply-templates/> +</xsl:template> + + +<xsl:template match="text()"/> + + +<xsl:template match="vymmap"> + <xbel> + <xsl:apply-templates/> + </xbel> +</xsl:template> + + +<xsl:template match="mapcenter"> + + <xsl:apply-templates/> +</xsl:template> + + +<xsl:template match="branch"> + <xsl:choose> + <xsl:when test="heading='KDE'"> + <xsl:apply-templates select="branch" mode="kde"/> + </xsl:when> + <xsl:when test=". = 'Firefox'"> + <xsl:apply-templates mode="firefox"/> + </xsl:when> + <!-- ... --> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + + <xsl:apply-templates/> +</xsl:template> + +<xsl:template match="heading" mode="kde"> + <title> + <xsl:value-of select="normalize-space (.)"/> + </title> + + <xsl:choose> + <xsl:when test=". = 'KDE'"> + <xsl:apply-templates mode="kde"/> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + + <xsl:apply-templates/> +</xsl:template> + + +<xsl:template match="branch" mode="kde"> + <xsl:choose> + <xsl:when test="@url"> + <xsl:element name="bookmark"> + <xsl:attribute name="href" ><xsl:value-of select="@url" /> + </xsl:attribute> + <xsl:apply-templates mode="kde"/> + </xsl:element> + </xsl:when> + <xsl:otherwise> + <xsl:choose> + <xsl:when test="contains(heading,'***')"> + <separator folded="yes" /> + </xsl:when> + <xsl:otherwise> + <folder folded="yes" icon="bookmark_folder"> + <xsl:apply-templates mode="kde"/> + </folder> + </xsl:otherwise> + </xsl:choose> + + </xsl:otherwise> + </xsl:choose> +</xsl:template> + +<!-- + <xsl:text> </xsl:text> + + <xsl:message> WARNING: No @url attribute given of "<xsl:value-of select="normalize-space(heading)"/>"</xsl:message> + +<xsl:template match="branch"> + <xsl:choose> + <xsl:when test="@url"> + <xsl:text> *nokde* </xsl:text> + <xsl:value-of select="@url"/> + <xsl:text> </xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:message> WARNING: No @url attribute given of "<xsl:value-of select="normalize-space(heading)"/>"</xsl:message> + </xsl:otherwise> + </xsl:choose> + + <xsl:apply-templates/> + +</xsl:template> +--> + + +</xsl:stylesheet> diff -r b8c547f0fc58 -r 58e7594239df vym.pro --- a/vym.pro Thu Jul 27 14:07:11 2006 +0000 +++ b/vym.pro Tue Aug 01 09:31:22 2006 +0000 @@ -2,7 +2,6 @@ LANGUAGE = C++ CONFIG += qt warn_on release -QT += qt3support HEADERS += aboutdialog.h \ api.h \ @@ -70,8 +69,7 @@ settings.cpp \ options.cpp -#The following line was changed from FORMS to FORMS3 by qt3to4 -FORMS3 = exportxhtmldialog.ui \ +FORMS = exportxhtmldialog.ui \ showtextdialog.ui \ extrainfodialog.ui \ editxlinkdialog.ui \ @@ -83,27 +81,35 @@ TRANSLATIONS += lang/vym_es.ts TRANSLATIONS += lang/vym_it.ts +count( INSTALLDIR, 0 ) { + INSTALLDIR = /usr/local/bin +} +message( "Installation directory" ) +message( $$INSTALLDIR ) -DESTROOT = /usr -target.path = $${DESTROOT}/bin +target.path = $$INSTALLDIR INSTALLS += target -support.files = exports/ styles/ scripts/ icons/ flags/ lang/ -support.path = $${DESTROOT}/share/vym + +target.path = $${INSTALLDIR}/bin +INSTALLS += target + +support.files = styles/ scripts/ icons/ flags/ lang/ +support.path = $${INSTALLDIR}/share/vym INSTALLS += support doc.files = tex/vym.pdf -doc.path = $${DESTROOT}/share/doc/packages/vym +doc.path = $${INSTALLDIR}/share/doc/packages/vym INSTALLS += doc demo.files = demos/ -demo.path = $${DESTROOT}/share/doc/packages/vym +demo.path = $${INSTALLDIR}/share/doc/packages/vym INSTALLS += demo -#The following line was inserted by qt3to4 -QT += xml -#The following line was inserted by qt3to4 -CONFIG += uic3 +exports.files = exports/ +exports.path =$${INSTALLDIR}/share/vym +INSTALLS += exports +