Utils.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
3 
4  This file is part of the TerraLib - a Framework for building GIS enabled applications.
5 
6  TerraLib is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published by
8  the Free Software Foundation, either version 3 of the License,
9  or (at your option) any later version.
10 
11  TerraLib is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with TerraLib. See COPYING. If not, write to
18  TerraLib Team at <terralib-team@terralib.org>.
19  */
20 
21 /*!
22  \file terralib/qsci/ceditor/Utils.h
23 
24  \brief Utility functions for dealing with code editor.
25 */
26 
27 #ifndef __TERRALIB_QSCI_CEDITOR_UTILS_H__
28 #define __TERRALIB_QSCI_CEDITOR_UTILS_H__
29 
30 // TerraLib
31 #include "../Config.h"
32 
33 // Qt
34 #include <QIcon>
35 
36 // Qt Forward Declaration
37 class QObject;
38 class QString;
39 
40 // QScintilla Forward Declaration
41 class QsciLexer;
42 
43 namespace te
44 {
45  namespace ce
46  {
47  /*!
48  \brief A factory method for language lexers.
49  */
50  QsciLexer* LexerFactory(const QString& lang, QObject* parent = 0);
51 
52  /*!
53  \brief A factory method for language icons.
54  */
55  QIcon ScriptIconFactory(const QString& lang);
56 
57  /*!
58  \brief Returns the icon related to the extension of the file.
59 
60  \param fileName Name of the file that contains the script. Script allowed are written in Python and Lua.
61  */
62  TECEDITOREXPORT QIcon CreateLangIcon(const QString& fileName);
63  }
64 }
65 
66 #endif // __TERRALIB_QSCI_CEDITOR_UTILS_H__
#define TECEDITOREXPORT
Definition: Config.h:40
QIcon ScriptIconFactory(const QString &lang)
A factory method for language icons.
URI C++ Library.
QsciLexer * LexerFactory(const QString &lang, QObject *parent=0)
A factory method for language lexers.
TECEDITOREXPORT QIcon CreateLangIcon(const QString &fileName)
Returns the icon related to the extension of the file.