NCL Composer  0.1.5
 All Classes Functions Variables Pages
LanguageControl.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 LANGUAGECONTROL_H
11 #define LANGUAGECONTROL_H
12 
13 #include <QObject>
14 #include <QMap>
15 #include <QPluginLoader>
16 #include <QDir>
17 
18 #include "../util/ComposerCoreControl_global.h"
19 
20 #include "../extensions/ILanguageProfile.h"
21 using namespace composer::extension;
22 
23 #include "../util/Singleton.h"
24 #include "../util/Utilities.h"
25 using namespace composer::core::util;
26 
27 namespace composer {
28  namespace core {
29 
30 
35 class COMPOSERCORESHARED_EXPORT LanguageControl : public QObject
36 {
37  Q_OBJECT
38  SINGLETON(LanguageControl)
39 
40 private:
48  ~LanguageControl();
49 
50  QMap<LanguageType, ILanguageProfile*> profiles;
51 public:
58  void loadProfiles(QString profilesDirPath);
59 
65  ILanguageProfile* loadProfile(QString fileName);
66 
72  ILanguageProfile* getProfileFromType(LanguageType type);
73 
79  bool removeProfile(LanguageType type);
80 
85  QList<ILanguageProfile*> getLoadedProfiles();
86 signals:
92  void notifyError(QString);
93  public slots:
94 
95 };
96 
97 } } //end namespace
98 
99 #endif // LANGUAGECONTROL_H