1.1 --- a/mapeditor.cpp Tue Jun 13 08:49:12 2006 +0000
1.2 +++ b/mapeditor.cpp Wed Jun 14 10:28:01 2006 +0000
1.3 @@ -127,18 +127,25 @@
1.4 extern QAction *actionSettingsPasteNewHeading;
1.5 extern QAction *actionSettingsUseFlagGroups;
1.6
1.7 -extern Q3PopupMenu *branchContextMenu;
1.8 -extern Q3PopupMenu *branchLinksContextMenu;
1.9 -extern Q3PopupMenu *branchLinksContextMenuDup;
1.10 -extern Q3PopupMenu *floatimageContextMenu;
1.11 -extern Q3PopupMenu *saveImageFormatMenu;
1.12 -extern Q3PopupMenu *exportImageFormatMenu;
1.13 -extern Q3PopupMenu *canvasContextMenu;
1.14 +extern QMenu* branchContextMenu;
1.15 +extern QMenu* branchAddContextMenu;
1.16 +extern QMenu* branchRemoveContextMenu;
1.17 +extern QMenu* branchLinksContextMenu;
1.18 +extern QMenu* branchLinksContextMenuDup;
1.19 +extern QMenu* floatimageContextMenu;
1.20 +extern QMenu* saveImageFormatMenu;
1.21 +extern QMenu* canvasContextMenu;
1.22 +extern QMenu* lastMapsMenu;
1.23 +extern QMenu* importMenu;
1.24 +extern QMenu* exportMenu;
1.25 +
1.26
1.27 extern Settings settings;
1.28 +extern ImageIO imageIO;
1.29
1.30 extern QString iconPath;
1.31 extern QDir vymBaseDir;
1.32 +extern QDir lastImageDir;
1.33
1.34 int MapEditor::mapNum=0; // make instance
1.35
1.36 @@ -1124,14 +1131,14 @@
1.37 setHideTmpMode (HideNone);
1.38 }
1.39
1.40 -void MapEditor::exportImage(QString fn, int item)
1.41 +void MapEditor::exportImage(QString fn, QString format)
1.42 {
1.43 // Finish open lineEdits
1.44 if (lineedit) finishedLineEdit();
1.45
1.46 setExportMode (true);
1.47 QPixmap pix (getPixmap());
1.48 - pix.save(fn, exportImageFormatMenu->text(item) );
1.49 + pix.save(fn, format);
1.50 setExportMode (false);
1.51 }
1.52
1.53 @@ -2506,6 +2513,7 @@
1.54
1.55 void MapEditor::updateActions()
1.56 {
1.57 +return; //FIXME testing
1.58 QAction *a;
1.59 if (getLinkColorHint()==HeadingColor)
1.60 actionFormatLinkColorHint->setOn(true);
1.61 @@ -2850,7 +2858,8 @@
1.62 if ( fd->exec() == QDialog::Accepted )
1.63 {
1.64 saveState(selection, QString("Add floatimage to %1").arg(getName(selection)));
1.65 - lastImageDir=fn.left(fn.findRev ("/"));
1.66 + // FIXME in QT4 use: lastImageDir=fd->directory();
1.67 + lastImageDir=QDir (fd->dirPath());
1.68 QStringList flist = fd->selectedFiles();
1.69 QStringList::Iterator it = flist.begin();
1.70 while( it != flist.end() )