1.1 --- a/api.cpp Tue Sep 05 15:05:18 2006 +0000
1.2 +++ b/api.cpp Wed Sep 06 12:47:06 2006 +0000
1.3 @@ -92,7 +92,7 @@
1.4 errorString=e;
1.5 }
1.6
1.7 -bool API::checkParamCount (const uint &expected)
1.8 +bool API::checkParamCount (const int &expected)
1.9 {
1.10 if (paramList.count()!=expected)
1.11 {
1.12 @@ -103,7 +103,7 @@
1.13 return noErr;
1.14 }
1.15
1.16 -bool API::checkParamIsInt(const uint &index)
1.17 +bool API::checkParamIsInt(const int &index)
1.18 {
1.19 bool ok;
1.20 if (index > paramList.count())
1.21 @@ -131,7 +131,7 @@
1.22 return 0;
1.23 }
1.24
1.25 -QString API::parString (bool &ok,const uint &index)
1.26 +QString API::parString (bool &ok,const int &index)
1.27 {
1.28 // return the string at index, this could be also stored in
1.29 // a variable later
2.1 --- a/api.h Tue Sep 05 15:05:18 2006 +0000
2.2 +++ b/api.h Wed Sep 06 12:47:06 2006 +0000
2.3 @@ -14,10 +14,10 @@
2.4 QString errorDesc();
2.5 bool error();
2.6 void setError (const QString &);
2.7 - bool checkParamCount (const uint &);
2.8 - bool checkParamIsInt (const uint &);
2.9 + bool checkParamCount (const int &);
2.10 + bool checkParamIsInt (const int &);
2.11 int parInt (bool &,const uint&);
2.12 - QString parString(bool &,const uint &);
2.13 + QString parString(bool &,const int &);
2.14 private:
2.15 QString com;
2.16 QStringList paramList;
3.1 --- a/branchobj.cpp Tue Sep 05 15:05:18 2006 +0000
3.2 +++ b/branchobj.cpp Wed Sep 06 12:47:06 2006 +0000
3.3 @@ -804,7 +804,7 @@
3.4 // Save FloatImages
3.5 FloatImageObj *fio;
3.6 for (fio=floatimage.first(); fio; fio=floatimage.next() )
3.7 - s+=fio->saveToDir (tmpdir,prefix,offset);
3.8 + s+=fio->saveToDir (tmpdir,prefix);
3.9
3.10 // save note
3.11 if (!note.isEmpty() )
4.1 Binary file demos/todo.vym has changed
5.1 --- a/exports.cpp Tue Sep 05 15:05:18 2006 +0000
5.2 +++ b/exports.cpp Wed Sep 06 12:47:06 2006 +0000
5.3 @@ -1,7 +1,6 @@
5.4 #include <q3filedialog.h>
5.5 -#include <qmessagebox.h>
5.6 +#include <QMessageBox>
5.7 #include <QProcess>
5.8 -//Added by qt3to4:
5.9 #include <QTextStream>
5.10
5.11 #include "exports.h"
5.12 @@ -19,16 +18,16 @@
5.13 ExportBase::ExportBase()
5.14 {
5.15 indentPerDepth=" ";
5.16 - // Create tmpdir
5.17 - // FIXME not neededtmpDir.setPath (makeUniqueDir("/tmp/vym-XXXXXX"));
5.18 - if (!tmpDir.cd ("tmp"))
5.19 - qWarning ("Could not access temporary directory for export");
5.20 - // FIXME there's more needed here...
5.21 + bool ok;
5.22 + tmpDir.setPath (makeUniqueDir(ok,"/tmp/vym-XXXXXX"));
5.23 + if (!tmpDir.exists() || !ok)
5.24 + QMessageBox::critical( 0, QObject::tr( "Error" ),
5.25 + QObject::tr("Couldn't access temporary directory\n"));
5.26 }
5.27
5.28 ExportBase::~ExportBase()
5.29 {
5.30 - // Remove tmpdir
5.31 + // Cleanup tmpdir
5.32 removeDir (tmpDir);
5.33 }
5.34
5.35 @@ -187,9 +186,9 @@
5.36 p.process();
5.37
5.38 QString ub=vymBaseDir.path()+"/scripts/update-bookmarks";
5.39 - QProcess *proc= new QProcess ();
5.40 + QProcess *proc= new QProcess ;
5.41 proc->start( ub);
5.42 - if (!proc->waitForStarted());
5.43 + if (!proc->waitForStarted())
5.44 {
5.45 QMessageBox::warning(0,
5.46 QObject::tr("Warning"),
6.1 --- a/floatimageobj.cpp Tue Sep 05 15:05:18 2006 +0000
6.2 +++ b/floatimageobj.cpp Wed Sep 06 12:47:06 2006 +0000
6.3 @@ -154,7 +154,7 @@
6.4 // TODO
6.5 }
6.6
6.7 -QString FloatImageObj::saveToDir (const QString &tmpdir,const QString &prefix, const QPoint &p)
6.8 +QString FloatImageObj::saveToDir (const QString &tmpdir,const QString &prefix)
6.9 {
6.10 if (hidden) return "";
6.11
7.1 --- a/floatimageobj.h Tue Sep 05 15:05:18 2006 +0000
7.2 +++ b/floatimageobj.h Wed Sep 06 12:47:06 2006 +0000
7.3 @@ -30,7 +30,7 @@
7.4 virtual QRect getTotalBBox(); // return BBox including childs
7.5 virtual QRect getBBoxSizeWithChilds(); // return size of BBox including childs
7.6 virtual void calcBBoxSizeWithChilds(); // calc size of BBox including childs recursivly
7.7 - virtual QString saveToDir(const QString &,const QString&, const QPoint &);
7.8 + virtual QString saveToDir(const QString &,const QString&);
7.9 virtual void resetSaveCounter();
7.10 virtual QString getSelectString();
7.11
8.1 --- a/headingobj.h Tue Sep 05 15:05:18 2006 +0000
8.2 +++ b/headingobj.h Wed Sep 06 12:47:06 2006 +0000
8.3 @@ -31,7 +31,7 @@
8.4
8.5 protected:
8.6 QString heading;
8.7 - uint textwidth; // width for formatting text
8.8 + int textwidth; // width for formatting text
8.9 Q3PtrList <Q3CanvasText> textline; // a part of e.g. the parabel
8.10 QColor color;
8.11 QFont font;
9.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
9.2 +++ b/historywindow.cpp Wed Sep 06 12:47:06 2006 +0000
9.3 @@ -0,0 +1,46 @@
9.4 +#include "historywindow.h"
9.5 +
9.6 +HistoryWindow::HistoryWindow (QWidget *parent):QDialog (parent)
9.7 +{
9.8 + ui.setupUi (this);
9.9 + ui.historyTable->setRowCount (20);
9.10 + ui.historyTable->setColumnCount (3);
9.11 +
9.12 +
9.13 + QTableWidgetItem *item;
9.14 +
9.15 + item= new QTableWidgetItem(tr("Action"));
9.16 + ui.historyTable->setHorizontalHeaderItem(0, item);
9.17 +
9.18 + item= new QTableWidgetItem(tr("Comment"));
9.19 + ui.historyTable->setHorizontalHeaderItem(1, item);
9.20 +
9.21 + item= new QTableWidgetItem(tr("Undo action"));
9.22 + ui.historyTable->setHorizontalHeaderItem(2, item);
9.23 +
9.24 + ui.historyTable->setSelectionBehavior (QAbstractItemView::SelectRows);
9.25 +}
9.26 +
9.27 +
9.28 +void HistoryWindow::update(SimpleSettings &set)
9.29 +{
9.30 + //int rows=set.readNumEntry("/history/undosTotal");
9.31 + //ui.historyTable->setRowCount (rows);
9.32 +
9.33 + int i;
9.34 + for (i=0;i<= set.readNumEntry("/history/undosAvail",0); i++)
9.35 + {
9.36 + QTableWidgetItem *item;
9.37 +
9.38 + item= new QTableWidgetItem(set.readEntry(QString("/history/step-%1/redoCommand").arg(i)));
9.39 + ui.historyTable->setItem(i, 0, item);
9.40 +
9.41 + item= new QTableWidgetItem(set.readEntry(QString("/history/step-%1/comment").arg(i)));
9.42 + ui.historyTable->setItem(i, 1, item);
9.43 +
9.44 + item=new QTableWidgetItem(set.readEntry(QString("/history/step-%1/undoCommand").arg(i)));
9.45 + ui.historyTable->setItem(i, 2, item);
9.46 + }
9.47 +
9.48 + ui.historyTable->resizeColumnsToContents();
9.49 +}
10.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
10.2 +++ b/historywindow.h Wed Sep 06 12:47:06 2006 +0000
10.3 @@ -0,0 +1,22 @@
10.4 +#ifndef HISTORYWINDOW_H
10.5 +#define HISTORYWINDOW_H
10.6 +
10.7 +#include "settings.h"
10.8 +#include "ui_historywindow.h"
10.9 +
10.10 +/////////////////////////////////////////////////////////////////////////////
10.11 +class HistoryWindow:public QDialog
10.12 +{
10.13 + Q_OBJECT
10.14 +
10.15 +public:
10.16 + HistoryWindow(QWidget* parent = 0);
10.17 + void update (SimpleSettings &);
10.18 +
10.19 +
10.20 +private:
10.21 + Ui::HistoryWindow ui;
10.22 +};
10.23 +
10.24 +
10.25 +#endif
11.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
11.2 +++ b/historywindow.ui Wed Sep 06 12:47:06 2006 +0000
11.3 @@ -0,0 +1,136 @@
11.4 +<ui version="4.0" >
11.5 + <author></author>
11.6 + <comment></comment>
11.7 + <exportmacro></exportmacro>
11.8 + <class>HistoryWindow</class>
11.9 + <widget class="QDialog" name="HistoryWindow" >
11.10 + <property name="geometry" >
11.11 + <rect>
11.12 + <x>0</x>
11.13 + <y>0</y>
11.14 + <width>1160</width>
11.15 + <height>340</height>
11.16 + </rect>
11.17 + </property>
11.18 + <property name="windowTitle" >
11.19 + <string>Dialog</string>
11.20 + </property>
11.21 + <layout class="QGridLayout" >
11.22 + <property name="margin" >
11.23 + <number>9</number>
11.24 + </property>
11.25 + <property name="spacing" >
11.26 + <number>6</number>
11.27 + </property>
11.28 + <item row="0" column="0" >
11.29 + <spacer>
11.30 + <property name="orientation" >
11.31 + <enum>Qt::Vertical</enum>
11.32 + </property>
11.33 + <property name="sizeHint" >
11.34 + <size>
11.35 + <width>20</width>
11.36 + <height>40</height>
11.37 + </size>
11.38 + </property>
11.39 + </spacer>
11.40 + </item>
11.41 + <item row="2" column="0" >
11.42 + <widget class="QPushButton" name="redoButton" >
11.43 + <property name="text" >
11.44 + <string>Redo</string>
11.45 + </property>
11.46 + </widget>
11.47 + </item>
11.48 + <item row="3" column="0" >
11.49 + <spacer>
11.50 + <property name="orientation" >
11.51 + <enum>Qt::Vertical</enum>
11.52 + </property>
11.53 + <property name="sizeHint" >
11.54 + <size>
11.55 + <width>20</width>
11.56 + <height>61</height>
11.57 + </size>
11.58 + </property>
11.59 + </spacer>
11.60 + </item>
11.61 + <item rowspan="4" row="0" column="1" >
11.62 + <widget class="QTableWidget" name="historyTable" >
11.63 + <row>
11.64 + <property name="text" >
11.65 + <string>New Row</string>
11.66 + </property>
11.67 + </row>
11.68 + <column>
11.69 + <property name="text" >
11.70 + <string>Time</string>
11.71 + </property>
11.72 + </column>
11.73 + <column>
11.74 + <property name="text" >
11.75 + <string>Comment</string>
11.76 + </property>
11.77 + </column>
11.78 + </widget>
11.79 + </item>
11.80 + <item row="1" column="0" >
11.81 + <widget class="QPushButton" name="undoButton" >
11.82 + <property name="text" >
11.83 + <string>Undo</string>
11.84 + </property>
11.85 + </widget>
11.86 + </item>
11.87 + <item row="4" column="0" colspan="2" >
11.88 + <layout class="QHBoxLayout" >
11.89 + <property name="margin" >
11.90 + <number>0</number>
11.91 + </property>
11.92 + <property name="spacing" >
11.93 + <number>6</number>
11.94 + </property>
11.95 + <item>
11.96 + <spacer>
11.97 + <property name="orientation" >
11.98 + <enum>Qt::Horizontal</enum>
11.99 + </property>
11.100 + <property name="sizeHint" >
11.101 + <size>
11.102 + <width>131</width>
11.103 + <height>31</height>
11.104 + </size>
11.105 + </property>
11.106 + </spacer>
11.107 + </item>
11.108 + <item>
11.109 + <widget class="QPushButton" name="closeButton" >
11.110 + <property name="text" >
11.111 + <string>Close</string>
11.112 + </property>
11.113 + </widget>
11.114 + </item>
11.115 + </layout>
11.116 + </item>
11.117 + </layout>
11.118 + </widget>
11.119 + <pixmapfunction></pixmapfunction>
11.120 + <resources/>
11.121 + <connections>
11.122 + <connection>
11.123 + <sender>closeButton</sender>
11.124 + <signal>clicked()</signal>
11.125 + <receiver>HistoryWindow</receiver>
11.126 + <slot>close()</slot>
11.127 + <hints>
11.128 + <hint type="sourcelabel" >
11.129 + <x>369</x>
11.130 + <y>253</y>
11.131 + </hint>
11.132 + <hint type="destinationlabel" >
11.133 + <x>179</x>
11.134 + <y>282</y>
11.135 + </hint>
11.136 + </hints>
11.137 + </connection>
11.138 + </connections>
11.139 +</ui>
12.1 --- a/imports.cpp Tue Sep 05 15:05:18 2006 +0000
12.2 +++ b/imports.cpp Wed Sep 06 12:47:06 2006 +0000
12.3 @@ -14,11 +14,11 @@
12.4
12.5 ImportBase::ImportBase()
12.6 {
12.7 - // Create tmpdir
12.8 - // FIXME not neededtmpDir.setPath (makeUniqueDir("/tmp/vym-XXXXXX"));
12.9 - if (!tmpDir.cd ("tmp"))
12.10 - qWarning ("Could not access temporary directory for export");
12.11 - // FIXME
12.12 + bool ok;
12.13 + tmpDir.setPath (makeUniqueDir(ok,"/tmp/vym-XXXXXX"));
12.14 + if (!tmpDir.exists() || !ok)
12.15 + QMessageBox::critical( 0, QObject::tr( "Error" ),
12.16 + QObject::tr("Couldn't access temporary directory\n"));
12.17 }
12.18
12.19
13.1 --- a/linkablemapobj.h Tue Sep 05 15:05:18 2006 +0000
13.2 +++ b/linkablemapobj.h Wed Sep 06 12:47:06 2006 +0000
13.3 @@ -85,15 +85,15 @@
13.4 // of mapeditor e.g. in noteeditor
13.5 virtual bool repositionRequested();
13.6
13.7 - virtual QRect getTotalBBox()=0; // return BBox including childs
13.8 - virtual QRect getBBoxSizeWithChilds()=0;// return size of BBox including childs
13.9 + //virtual QRect getTotalBBox(); // return BBox including childs
13.10 + //virtual QRect getBBoxSizeWithChilds();// return size of BBox including childs
13.11 virtual void calcBBoxSizeWithChilds()=0;// calc size of BBox including childs recursivly
13.12
13.13 virtual void setSelBox();
13.14 virtual void select();
13.15 virtual void unselect();
13.16 virtual QString getSelectString()=0;
13.17 - virtual QString saveToDir (const QString&,const QString&, const QPoint&)=0;// Save data to tempdir
13.18 + //virtual QString saveToDir (const QString&,const QString&, const QPoint&);// Save data to XML
13.19
13.20 protected:
13.21 void parabel(Q3PointArray &,double,double,double,double); // Create Parabel connecting two points
14.1 --- a/mainwindow.cpp Tue Sep 05 15:05:18 2006 +0000
14.2 +++ b/mainwindow.cpp Wed Sep 06 12:47:06 2006 +0000
14.3 @@ -30,13 +30,13 @@
14.4 #include "exportxhtmldialog.h"
14.5 #include "file.h"
14.6 #include "flagrowobj.h"
14.7 +#include "historywindow.h"
14.8 #include "imports.h"
14.9 #include "mapeditor.h"
14.10 #include "misc.h"
14.11 #include "options.h"
14.12 #include "process.h"
14.13 #include "settings.h"
14.14 -#include "showtextdialog.h"
14.15 #include "texteditor.h"
14.16 #include "version.h"
14.17
14.18 @@ -1850,8 +1850,14 @@
14.19 me->viewport()->setFocus();
14.20
14.21 // Create temporary directory for packing
14.22 - char tmpdir1[]="/tmp/vym-XXXXXX";
14.23 - QString tmpMapDir=mkdtemp(tmpdir1);
14.24 + bool ok;
14.25 + QString tmpMapDir=makeUniqueDir (ok,"/tmp/vym-XXXXXX");
14.26 + if (!ok)
14.27 + {
14.28 + QMessageBox::critical( 0, tr( "Critical Load Error" ),
14.29 + tr("Couldn't create temporary directory before load\n"));
14.30 + return aborted;
14.31 + }
14.32
14.33 // Try to unzip file
14.34 err=unzipDir (tmpMapDir,fn);
14.35 @@ -1945,21 +1951,22 @@
14.36
14.37 void Main::fileLoad(const LoadMode &lmode)
14.38 {
14.39 - Q3FileDialog *fd=new Q3FileDialog( this);
14.40 + QStringList filters;
14.41 + filters <<"XML (*.xml)"<<"VYM map (*.vym *.vyp)";
14.42 + QFileDialog *fd=new QFileDialog( this);
14.43 fd->setDir (lastFileDir);
14.44 - fd->setMode (Q3FileDialog::ExistingFiles);
14.45 - fd->addFilter ("XML (*.xml)");
14.46 - fd->addFilter ("VYM map (*.vym *.vyp)");
14.47 + fd->setFileMode (QFileDialog::ExistingFiles);
14.48 + fd->setFilters (filters);
14.49 switch (lmode)
14.50 {
14.51 case NewMap:
14.52 - fd->setCaption(tr("Load vym map"));
14.53 + fd->setCaption(__VYM " - " +tr("Load vym map"));
14.54 break;
14.55 case ImportAdd:
14.56 - fd->setCaption(tr("Import: Add vym map to selection"));
14.57 + fd->setCaption(__VYM " - " +tr("Import: Add vym map to selection"));
14.58 break;
14.59 case ImportReplace:
14.60 - fd->setCaption(tr("Import: Replace selection with vym map"));
14.61 + fd->setCaption(__VYM " - " +tr("Import: Replace selection with vym map"));
14.62 break;
14.63 }
14.64 fd->show();
14.65 @@ -1967,7 +1974,7 @@
14.66 QString fn;
14.67 if ( fd->exec() == QDialog::Accepted )
14.68 {
14.69 - lastFileDir=fd->dirPath();
14.70 + lastFileDir=fd->directory().path();
14.71 QStringList flist = fd->selectedFiles();
14.72 QStringList::Iterator it = flist.begin();
14.73 while( it != flist.end() )
14.74 @@ -2052,9 +2059,16 @@
14.75
14.76 if (saveZipped)
14.77 {
14.78 - char tmpdir1[]="/tmp/vym-XXXXXX";
14.79 - tmpMapDir=mkdtemp(tmpdir1);
14.80 -
14.81 + // Create temporary directory for packing
14.82 + bool ok;
14.83 + QString tmpMapDir=makeUniqueDir (ok,"/tmp/vym-XXXXXX");
14.84 + if (!ok)
14.85 + {
14.86 + QMessageBox::critical( 0, tr( "Critical Load Error" ),
14.87 + tr("Couldn't create temporary directory before save\n"));
14.88 + return;
14.89 + }
14.90 +
14.91 safeFilePath=me->getFilePath();
14.92 me->setFilePath (tmpMapDir+"/"+
14.93 me->getMapName()+ ".xml",
14.94 @@ -3201,7 +3215,9 @@
14.95
14.96 void Main::testFunction()
14.97 {
14.98 - currentMapEditor()->testFunction();
14.99 + HistoryWindow hw;
14.100 + hw.exec();
14.101 + //currentMapEditor()->testFunction();
14.102 }
14.103
14.104 void Main::helpDoc()
15.1 --- a/mapcenterobj.cpp Tue Sep 05 15:05:18 2006 +0000
15.2 +++ b/mapcenterobj.cpp Wed Sep 06 12:47:06 2006 +0000
15.3 @@ -152,7 +152,7 @@
15.4 // Save FloatImages
15.5 FloatImageObj *fio;
15.6 for (fio=floatimage.first(); fio; fio=floatimage.next() )
15.7 - s+=fio->saveToDir (tmpdir,prefix,offset);
15.8 + s+=fio->saveToDir (tmpdir,prefix);
15.9
15.10 // Save XLinks
15.11 XLinkObj *xlo;
16.1 --- a/mapeditor.cpp Tue Sep 05 15:05:18 2006 +0000
16.2 +++ b/mapeditor.cpp Wed Sep 06 12:47:06 2006 +0000
16.3 @@ -223,21 +223,15 @@
16.4
16.5 hidemode=HideNone;
16.6
16.7 - isInteractive=interactive;
16.8 - if (isInteractive)
16.9 - // Create temporary files
16.10 - makeTmpDirs();
16.11 + isInteractive=interactive; // FIXME still needed?
16.12 +
16.13 + // Create temporary files
16.14 + makeTmpDirs();
16.15
16.16 // Initially set movingCentre
16.17 updateViewCenter();
16.18
16.19 - // For testing purposes create history window
16.20 - historyWindow = new ShowTextDialog (this);
16.21 - historyWindow->setCaption (fileName);
16.22 -
16.23 mapCenter->reposition(); // for positioning heading
16.24 -
16.25 -
16.26 }
16.27
16.28 MapEditor::~MapEditor()
16.29 @@ -352,10 +346,12 @@
16.30
16.31 s=(((BranchObj*)lmo)->getHeading());
16.32 if (s=="") s="unnamed";
16.33 - return QString("branch (<font color=\"#0000ff\">%1</font>)").arg(s);
16.34 + return QString("branch (%1)").arg(s);
16.35 + //return QString("branch (<font color=\"#0000ff\">%1</font>)").arg(s);
16.36 }
16.37 if ((typeid(*lmo) == typeid(FloatImageObj) ))
16.38 - return QString ("floatimage [<font color=\"#0000ff\">%1</font>]").arg(((FloatImageObj*)lmo)->getOriginalFilename());
16.39 + return QString ("floatimage [%1]").arg(((FloatImageObj*)lmo)->getOriginalFilename());
16.40 + //return QString ("floatimage [<font color=\"#0000ff\">%1</font>]").arg(((FloatImageObj*)lmo)->getOriginalFilename());
16.41 return QString("Unknown type has no name!");
16.42 }
16.43
16.44 @@ -365,7 +361,7 @@
16.45 tmpMapDir=QDir::convertSeparators (tmpVymDir+QString("/mapeditor-%1").arg(mapNum));
16.46 histPath=QDir::convertSeparators (tmpMapDir+"/history");
16.47 QDir d;
16.48 - d.mkdir (tmpMapDir,true);
16.49 + d.mkdir (tmpMapDir);
16.50 }
16.51
16.52 QString MapEditor::saveToDir(const QString &tmpdir, const QString &prefix, bool writeflags, const QPoint &offset, LinkableMapObj *saveSel)
16.53 @@ -430,7 +426,7 @@
16.54 s+=((BranchObj*)(saveSel))->saveToDir(tmpdir,prefix,offset);
16.55 else if ( typeid(*saveSel) == typeid(FloatImageObj) )
16.56 // Save image
16.57 - s+=((FloatImageObj*)(saveSel))->saveToDir(tmpdir,prefix,offset);
16.58 + s+=((FloatImageObj*)(saveSel))->saveToDir(tmpdir,prefix);
16.59
16.60 else if (selection && typeid(*selection)==typeid(BranchObj))
16.61 // Save selected branch is saved from mainwindow //FIXME maybe use "subtree" above?
16.62 @@ -545,7 +541,6 @@
16.63 /* TODO remove after testing
16.64 */
16.65 cout << "ME::saveState() begin"<<endl;
16.66 - historyWindow->append (comment);
16.67
16.68 setChanged();
16.69
16.70 @@ -609,6 +604,8 @@
16.71 cout << " redoCom="<<redoCom.toStdString()<<endl;
16.72 cout << " redoSel="<<redoSelection.toStdString()<<endl;
16.73 cout << " ---------------------------"<<endl;
16.74 +
16.75 + historyWindow.update (undoSet);
16.76 }
16.77
16.78 void MapEditor::parseAtom(const QString &atom)
16.79 @@ -792,10 +789,10 @@
16.80
16.81 void MapEditor::toggleHistoryWindow()
16.82 {
16.83 - if (historyWindow->isVisible())
16.84 - historyWindow->hide();
16.85 + if (historyWindow.isVisible())
16.86 + historyWindow.hide();
16.87 else
16.88 - historyWindow->show();
16.89 + historyWindow.show();
16.90 }
16.91
16.92
16.93 @@ -865,7 +862,7 @@
16.94 mapName=fileName.left(fileName.findRev(".",-1,true) );
16.95
16.96 // Adjust history window
16.97 - historyWindow->setCaption (fileName);
16.98 + historyWindow.setCaption (__VYM " - " +tr("History for ")+fileName);
16.99 }
16.100 }
16.101
16.102 @@ -3040,12 +3037,14 @@
16.103 break;;
16.104 case QMessageBox::Cancel:
16.105 // do nothing
16.106 + delete (fd);
16.107 return;
16.108 break;
16.109 }
16.110 }
16.111 fio->save (fd->selectedFile(),imageIO.getType (fd->selectedFilter() ) );
16.112 }
16.113 + delete (fd);
16.114 }
16.115 }
16.116
17.1 --- a/mapeditor.h Tue Sep 05 15:05:18 2006 +0000
17.2 +++ b/mapeditor.h Wed Sep 06 12:47:06 2006 +0000
17.3 @@ -17,10 +17,10 @@
17.4
17.5 #include "mapcenterobj.h"
17.6 #include "file.h"
17.7 +#include "historywindow.h"
17.8 #include "misc.h"
17.9 #include "selection.h"
17.10 #include "settings.h"
17.11 -#include "showtextdialog.h"
17.12
17.13 class Q3NetworkOperation;
17.14 class Q3UrlOperator;
17.15 @@ -247,7 +247,7 @@
17.16 QString mapName; // fileName without ".vym"
17.17
17.18 bool isInteractive; // non interactive don't need tmpdirs
17.19 - QString tmpMapDir; // tmp directory with data for undo/redo
17.20 + QString tmpMapDir; // tmp directory with undo history
17.21 QString histPath; // Path to history file
17.22 int undosTotal; // total number of undos
17.23 SimpleSettings undoSet; // undo/redo commands
17.24 @@ -266,7 +266,7 @@
17.25 QDataStream *imageData;
17.26 QBuffer *imageBuffer;
17.27
17.28 - ShowTextDialog *historyWindow;
17.29 + HistoryWindow historyWindow;
17.30
17.31 };
17.32 #endif
18.1 --- a/ornamentedobj.cpp Tue Sep 05 15:05:18 2006 +0000
18.2 +++ b/ornamentedobj.cpp Wed Sep 06 12:47:06 2006 +0000
18.3 @@ -159,7 +159,7 @@
18.4
18.5 void OrnamentedObj::move2RelPos(double x, double y)
18.6 {
18.7 - setRelPos (QPoint(x,y));
18.8 + setRelPos (QPoint((int)x,(int)y));
18.9 }
18.10
18.11 void OrnamentedObj::move2RelPos(QPoint p)
19.1 --- a/showtextdialog.ui.h Tue Sep 05 15:05:18 2006 +0000
19.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
19.3 @@ -1,19 +0,0 @@
19.4 -void ShowTextDialog::init()
19.5 -{
19.6 - textEdit1->setReadOnly (true);
19.7 -}
19.8 -
19.9 -void ShowTextDialog::setCaption (const QString &t)
19.10 -{
19.11 - QDialog::setCaption ("VYM - " + tr ("History of %1").arg(t));
19.12 -}
19.13 -
19.14 -void ShowTextDialog::setText(const QString &t)
19.15 -{
19.16 - textEdit1->setText (t);
19.17 -}
19.18 -
19.19 -void ShowTextDialog::append( const QString &t )
19.20 -{
19.21 - textEdit1->append (t);
19.22 -}