cmdlineexportallviewsevent.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "cmdlineexportallviewsevent.h"
00014
00015
00016 #include <qstringlist.h>
00017
00018
00019 #include <kapplication.h>
00020 #include <kdebug.h>
00021
00022
00023 #include "uml.h"
00024 #include "umlviewimageexportermodel.h"
00025
00026
00027 int CmdLineExportAllViewsEvent::getType() {
00028 return QEvent::User + 1;
00029 }
00030
00031 CmdLineExportAllViewsEvent::CmdLineExportAllViewsEvent(const QString &imageType, const KURL &directory, const bool useFolders)
00032 : QCustomEvent(CmdLineExportAllViewsEvent::getType()) {
00033 m_imageType = imageType;
00034 m_directory = directory;
00035 m_useFolders = useFolders;
00036 }
00037
00038 void CmdLineExportAllViewsEvent::exportAllViews() {
00039 QStringList errors = UMLViewImageExporterModel().exportAllViews(m_imageType, m_directory, m_useFolders);
00040 if (!errors.isEmpty()) {
00041 kError() << "Errors while exporting:" << endl;
00042 for (QStringList::Iterator it = errors.begin(); it != errors.end(); ++it) {
00043 kError() << *it << endl;
00044 }
00045 }
00046
00047 kapp->sendEvent(UMLApp::app(), new QCloseEvent());
00048 }
This file is part of the documentation for umbrello Version 3.1.0.