From eae9ec73ba26638e25d23ba2261422461150ad73 Mon Sep 17 00:00:00 2001 From: necoro <> Date: Thu, 16 Aug 2007 03:39:18 +0000 Subject: removed qt --- portato/gui/qt/highlighter.py | 168 ------------------------------------------ 1 file changed, 168 deletions(-) delete mode 100644 portato/gui/qt/highlighter.py (limited to 'portato/gui/qt/highlighter.py') diff --git a/portato/gui/qt/highlighter.py b/portato/gui/qt/highlighter.py deleted file mode 100644 index 74d9ac9..0000000 --- a/portato/gui/qt/highlighter.py +++ /dev/null @@ -1,168 +0,0 @@ -# -*- coding: utf-8 -*- -# -# File: portato/gui/qt/highlighter.py -# This file is part of the Portato-Project, a graphical portage-frontend. -# -# Copyright (C) 2007 René 'Necoro' Neumann -# This is free software. You may redistribute copies of it under the terms of -# the GNU General Public License version 2. -# There is NO WARRANTY, to the extent permitted by law. -# -# Written by René 'Necoro' Neumann - -# The syntax is inspired by the gtksourceview syntax by -# Leonardo Ferreira Fontenelle - -from PyQt4 import Qt -from portato.helper import debug - -import re # prefer Python-Module over Qt-one - -class EbuildHighlighter (Qt.QSyntaxHighlighter): - """A QSyntaxHighlighter implementation for the use with ebuild-syntax.""" - - NORMAL_STATE = 0 - STRING_STATE = 1 - - def __init__ (self, edit): - """Constructor. - - @param edit: the EditWidget to use the highlighter with - @type edit: Qt.QTextEdit""" - - Qt.QSyntaxHighlighter.__init__(self, edit) - - # - # the regular expressions ... *muahahaha* - # - - # comments - self.comment = self.__create(r'#.*', color = "steelblue", italic = True) - - # bash variables - self.bashVar = self.__create(r'(\$\{.+?\})|(\$\w+)', color = "green") - - # a string - self.string = self.__create(r'(?