~ubuntu-branches/ubuntu/karmic/eric/karmic

« back to all changes in this revision

Viewing changes to eric/QScintilla/Lexers/LexerCMake.py

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2008-01-28 18:02:25 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080128180225-6nrox6yrworh2c4v
Tags: 4.0.4-1ubuntu1
* Add python-qt3 to build-depends becuase that's where Ubuntu puts 
  pyqtconfig
* Change maintainer to MOTU

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: utf-8 -*-
 
2
 
 
3
# Copyright (c) 2007 Detlev Offenbach <detlev@die-offenbachs.de>
 
4
#
 
5
 
 
6
"""
 
7
Module implementing a CMake lexer with some additional methods.
 
8
"""
 
9
 
 
10
from PyQt4.Qsci import QsciLexerCMake
 
11
from PyQt4.QtCore import QString
 
12
 
 
13
from Lexer import Lexer
 
14
import Preferences
 
15
 
 
16
class LexerCMake(QsciLexerCMake, Lexer):
 
17
    """ 
 
18
    Subclass to implement some additional lexer dependant methods.
 
19
    """
 
20
    def __init__(self, parent=None):
 
21
        """
 
22
        Constructor
 
23
        
 
24
        @param parent parent widget of this lexer
 
25
        """
 
26
        QsciLexerCMake.__init__(self, parent)
 
27
        Lexer.__init__(self)
 
28
        
 
29
        self.commentString = QString("#")
 
30
    
 
31
    def initProperties(self):
 
32
        """
 
33
        Public slot to initialize the properties.
 
34
        """
 
35
        self.setFoldAtElse(Preferences.getEditor("CMakeFoldAtElse"))