diff -r 6a0342b3c519 -r 5cfbba1dc2f8 mapeditor.cpp --- a/mapeditor.cpp Tue Jun 13 08:49:12 2006 +0000 +++ b/mapeditor.cpp Wed Jun 14 10:28:01 2006 +0000 @@ -127,18 +127,25 @@ extern QAction *actionSettingsPasteNewHeading; extern QAction *actionSettingsUseFlagGroups; -extern Q3PopupMenu *branchContextMenu; -extern Q3PopupMenu *branchLinksContextMenu; -extern Q3PopupMenu *branchLinksContextMenuDup; -extern Q3PopupMenu *floatimageContextMenu; -extern Q3PopupMenu *saveImageFormatMenu; -extern Q3PopupMenu *exportImageFormatMenu; -extern Q3PopupMenu *canvasContextMenu; +extern QMenu* branchContextMenu; +extern QMenu* branchAddContextMenu; +extern QMenu* branchRemoveContextMenu; +extern QMenu* branchLinksContextMenu; +extern QMenu* branchLinksContextMenuDup; +extern QMenu* floatimageContextMenu; +extern QMenu* saveImageFormatMenu; +extern QMenu* canvasContextMenu; +extern QMenu* lastMapsMenu; +extern QMenu* importMenu; +extern QMenu* exportMenu; + extern Settings settings; +extern ImageIO imageIO; extern QString iconPath; extern QDir vymBaseDir; +extern QDir lastImageDir; int MapEditor::mapNum=0; // make instance @@ -1124,14 +1131,14 @@ setHideTmpMode (HideNone); } -void MapEditor::exportImage(QString fn, int item) +void MapEditor::exportImage(QString fn, QString format) { // Finish open lineEdits if (lineedit) finishedLineEdit(); setExportMode (true); QPixmap pix (getPixmap()); - pix.save(fn, exportImageFormatMenu->text(item) ); + pix.save(fn, format); setExportMode (false); } @@ -2506,6 +2513,7 @@ void MapEditor::updateActions() { +return; //FIXME testing QAction *a; if (getLinkColorHint()==HeadingColor) actionFormatLinkColorHint->setOn(true); @@ -2850,7 +2858,8 @@ if ( fd->exec() == QDialog::Accepted ) { saveState(selection, QString("Add floatimage to %1").arg(getName(selection))); - lastImageDir=fn.left(fn.findRev ("/")); + // FIXME in QT4 use: lastImageDir=fd->directory(); + lastImageDir=QDir (fd->dirPath()); QStringList flist = fd->selectedFiles(); QStringList::Iterator it = flist.begin(); while( it != flist.end() )