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