1 // Copyright (C) 2015-2016 OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
19 // File : PyEditor_Keywords.h
20 // Author : Sergey TELKOV, Open CASCADE S.A.S. (sergey.telkov@opencascade.com)
23 #ifndef PYEDITOR_KEYWORDS_H
24 #define PYEDITOR_KEYWORDS_H
31 class PyEditor_Keywords : public QObject
36 PyEditor_Keywords( QObject* = 0 );
37 virtual ~PyEditor_Keywords();
39 QList<int> types() const;
40 QList<QColor> colors() const;
42 int type( const QString& ) const;
43 QColor color( const QString& ) const;
45 QStringList keywords() const;
46 QStringList keywords( int ) const;
47 QStringList keywords( const QColor& ) const;
49 void append( const QString&, int, const QColor& = QColor() );
50 void append( const QStringList&, int, const QColor& = QColor() );
53 void remove( const QString& );
54 void remove( const QStringList& );
59 void keywordsChanged();
62 typedef struct { int type; QColor color; } KeywordInfo;
63 typedef QMap<QString, KeywordInfo> KeywordMap;
66 KeywordMap myKeywords;
69 class PyEditor_StandardKeywords : public PyEditor_Keywords
74 typedef enum { Base, Exceptions } KeywordType;
77 PyEditor_StandardKeywords( QObject* = 0 );
78 virtual ~PyEditor_StandardKeywords();