diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | bd9e6617827818fd043452c08c606f07b78014a0 (patch) | |
tree | 425bb4c3168f9c02f10150f235d2cb998dcc6108 /umbrello/umbrello/cmdlineexportallviewsevent.h | |
download | tdesdk-bd9e6617.tar.gz tdesdk-bd9e6617.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'umbrello/umbrello/cmdlineexportallviewsevent.h')
-rw-r--r-- | umbrello/umbrello/cmdlineexportallviewsevent.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/umbrello/umbrello/cmdlineexportallviewsevent.h b/umbrello/umbrello/cmdlineexportallviewsevent.h new file mode 100644 index 00000000..8c613bee --- /dev/null +++ b/umbrello/umbrello/cmdlineexportallviewsevent.h @@ -0,0 +1,78 @@ +/*************************************************************************** + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * copyright (C) 2006 * + * Umbrello UML Modeller Authors <uml-devel@uml.sf.net> * + ***************************************************************************/ + +#ifndef CMDLINEEXPORTALLVIEWSEVENT_H +#define CMDLINEEXPORTALLVIEWSEVENT_H + +#include <qevent.h> +#include <kurl.h> + +/** + * This class provides an event that is posted to the UMLApp when the "export all views" + * option was set in the command line. Once the QT main loop begins, the event is processed. + * + * The processing made in UMLApp is execute the exportAllViews method in the event. + * This method exports all the views using UMLViewImageExporterModel and then finishes + * the application using a close event. + * + * @see UMLViewImageExporterModel + */ +class CmdLineExportAllViewsEvent : public QCustomEvent { +public: + + /** + * Returns the type of the event. + */ + static int getType(); + + /** + * Constructor for CmdLineExportAllViewsEvent. + * + * @param imageType The type of the images the views will be exported to. + * @param directory The url of the directory where the images will be saved. + * @param useFolders If the tree structure of the views in the document must be created + * in the target directory. + */ + CmdLineExportAllViewsEvent(const QString &imageType, const KURL &directory, const bool useFolders); + + /** + * Destructor for CmdLineExportAllViewsEvent + */ + virtual ~CmdLineExportAllViewsEvent() { + } + + /** + * Exports all the views using UMLViewImageExporterModel, prints the errors + * occurred in the error output and sends a close event to the application to finish it. + * To export the views, it uses the attributes set when the event was created. + */ + void exportAllViews(); + +private: + + /** + * The type of the images the views will be exported to. + */ + QString m_imageType; + + /** + * The url of the directory where the images will be saved. + */ + KURL m_directory; + + /** + * If the tree structure of the views in the document must be created + * in the target directory. + */ + bool m_useFolders; +}; + +#endif |