NCL Composer  0.1.5
 All Classes Functions Variables Pages
Utilities.h
1 /* Copyright (c) 2011 Telemidia/PUC-Rio.
2  * All rights reserved. This program and the accompanying materials
3  * are made available under the terms of the Eclipse Public License v1.0
4  * which accompanies this distribution, and is available at
5  * http://www.eclipse.org/legal/epl-v10.html
6  *
7  * Contributors:
8  * Telemidia/PUC-Rio - initial API and implementation
9  */
10 #ifndef DEFINITIONS_H
11 #define DEFINITIONS_H
12 
13 #include "ComposerCoreControl_global.h"
14 
15 #include <QString>
16 #include <QMap>
17 #include <QDir>
18 #include <QFileInfo>
19 
20 #include "util/ComposerSettings.h"
21 
25 typedef enum {
26  CPR,
27  NCL,
28  SMIL,
29  HTML,
30  NONE
31 } LanguageType;
32 
33 namespace composer {
34  namespace core {
35  namespace util {
36 
40 class COMPOSERCORESHARED_EXPORT Utilities
41 {
42 
43 private:
44  static QMap<QString,LanguageType> types;
46 public:
51  static LanguageType getLanguageTypeByExtension(QString ext);
56  static QString getExtensionForLanguageType(LanguageType type);
60  static QString relativePath( QString absolutePath, QString relativeTo,
61  bool bIsFile = false );
65  static QString getLastFileDialogPath();
66 
70  static void updateLastFileDialogPath(QString filepath);
71 };
72 
73 } } } //end namespace
74 
75 #endif // DEFINITIONS_H